react-grab 0.0.97 → 0.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -1,421 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';var child_process=require('child_process'),df=require('fs'),$t=require('path'),Ve=require('process'),hf=require('readline'),qy=require('events'),module$1=require('module'),stream=require('stream'),zy=require('os'),kf=require('tty'),ff=require('fs/promises'),http=require('http');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var df__default=/*#__PURE__*/_interopDefault(df);var $t__default=/*#__PURE__*/_interopDefault($t);var Ve__default=/*#__PURE__*/_interopDefault(Ve);var hf__default=/*#__PURE__*/_interopDefault(hf);var qy__default=/*#__PURE__*/_interopDefault(qy);var zy__default=/*#__PURE__*/_interopDefault(zy);var kf__default=/*#__PURE__*/_interopDefault(kf);var ff__default=/*#__PURE__*/_interopDefault(ff);var hD=Object.create;var _u=Object.defineProperty;var dD=Object.getOwnPropertyDescriptor;var fD=Object.getOwnPropertyNames;var pD=Object.getPrototypeOf,mD=Object.prototype.hasOwnProperty;var N=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var gD=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fD(e))!mD.call(t,i)&&i!==r&&_u(t,i,{get:()=>e[i],enumerable:!(s=dD(e,i))||s.enumerable});return t};var be=(t,e,r)=>(r=t!=null?hD(pD(t)):{},gD(_u(r,"default",{value:t,enumerable:true}),t));var vr=y(Fi=>{var is=class extends Error{constructor(e,r,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0;}},_i=class extends is{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};Fi.CommanderError=is;Fi.InvalidArgumentError=_i;});var ns=y(Ai=>{var{InvalidArgumentError:DD}=vr(),Ei=class{constructor(e,r){switch(this.description=r||"",this.variadic=false,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case "<":this.required=true,this._name=e.slice(1,-1);break;case "[":this.required=false,this._name=e.slice(1,-1);break;default:this.required=true,this._name=e;break}this._name.endsWith("...")&&(this.variadic=true,this._name=this._name.slice(0,-3));}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new DD(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,s):r},this}argRequired(){return this.required=true,this}argOptional(){return this.required=false,this}};function bD(t){let e=t.name()+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ai.Argument=Ei;Ai.humanReadableArgName=bD;});var Si=y(Ri=>{var{humanReadableArgName:yD}=ns(),Oi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=false,this.sortOptions=false,this.showGlobalOptions=false;}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80;}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),s=e._getHelpCommand();return s&&!s._hidden&&r.push(s),this.sortSubcommands&&r.sort((i,n)=>i.name().localeCompare(n.name())),r}compareOptions(e,r){let s=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return s(e).localeCompare(s(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),s=e._getHelpOption();if(s&&!s.hidden){let i=s.short&&e._findOption(s.short),n=s.long&&e._findOption(s.long);!i&&!n?r.push(s):s.long&&!n?r.push(e.createOption(s.long,s.description)):s.short&&!i&&r.push(e.createOption(s.short,s.description));}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return [];let r=[];for(let s=e.parent;s;s=s.parent){let i=s.options.filter(n=>!n.hidden);r.push(...i);}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||"";}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(s=>yD(s)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((s,i)=>Math.max(s,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let s="";for(let i=e.parent;i;i=i.parent)s=i.name()+" "+s;return s+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let s=`(${r.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let s=`(${r.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatItemList(e,r,s){return r.length===0?[]:[s.styleTitle(e),...r,""]}groupItems(e,r,s){let i=new Map;return e.forEach(n=>{let o=s(n);i.has(o)||i.set(o,[]);}),r.forEach(n=>{let o=s(n);i.has(o)||i.set(o,[]),i.get(o).push(n);}),i}formatHelp(e,r){let s=r.padWidth(e,r),i=r.helpWidth??80;function n(c,d){return r.formatItem(c,s,d,r)}let o=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(o=o.concat([r.boxWrap(r.styleCommandDescription(a),i),""]));let u=r.visibleArguments(e).map(c=>n(r.styleArgumentTerm(r.argumentTerm(c)),r.styleArgumentDescription(r.argumentDescription(c))));if(o=o.concat(this.formatItemList("Arguments:",u,r)),this.groupItems(e.options,r.visibleOptions(e),c=>c.helpGroupHeading??"Options:").forEach((c,d)=>{let f=c.map(m=>n(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));o=o.concat(this.formatItemList(d,f,r));}),r.showGlobalOptions){let c=r.visibleGlobalOptions(e).map(d=>n(r.styleOptionTerm(r.optionTerm(d)),r.styleOptionDescription(r.optionDescription(d))));o=o.concat(this.formatItemList("Global Options:",c,r));}return this.groupItems(e.commands,r.visibleCommands(e),c=>c.helpGroup()||"Commands:").forEach((c,d)=>{let f=c.map(m=>n(r.styleSubcommandTerm(r.subcommandTerm(m)),r.styleSubcommandDescription(r.subcommandDescription(m))));o=o.concat(this.formatItemList(d,f,r));}),o.join(`
3
- `)}displayWidth(e){return Fu(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return /\n[^\S\r\n]/.test(e)}formatItem(e,r,s,i){let o=" ".repeat(2);if(!s)return o+e;let a=e.padEnd(r+e.length-i.displayWidth(e)),u=2,l=(this.helpWidth??80)-r-u-2,c;return l<this.minWidthToWrap||i.preformatted(s)?c=s:c=i.boxWrap(s,l).replace(/\n/g,`
4
- `+" ".repeat(r+u)),o+a+" ".repeat(u)+c.replace(/\n/g,`
5
- ${o}`)}boxWrap(e,r){if(r<this.minWidthToWrap)return e;let s=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,n=[];return s.forEach(o=>{let a=o.match(i);if(a===null){n.push("");return}let u=[a.shift()],h=this.displayWidth(u[0]);a.forEach(l=>{let c=this.displayWidth(l);if(h+c<=r){u.push(l),h+=c;return}n.push(u.join(""));let d=l.trimStart();u=[d],h=this.displayWidth(d);}),n.push(u.join(""));}),n.join(`
6
- `)}};function Fu(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Ri.Help=Oi;Ri.stripColor=Fu;});var $i=y(Pi=>{var{InvalidArgumentError:vD}=vr(),Ti=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=false;let s=CD(e);this.short=s.shortFlag,this.long=s.longFlag,this.negate=false,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=false,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0;}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:true}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=true){return this.mandatory=!!e,this}hideHelp(e=true){return this.hidden=!!e,this}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new vD(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,s):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Eu(this.name().replace(/^no-/,"")):Eu(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return !this.required&&!this.optional&&!this.negate}},ki=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r);}),this.negativeOptions.forEach((r,s)=>{this.positiveOptions.has(s)&&this.dualOptions.add(s);});}valueFromOption(e,r){let s=r.attributeName();if(!this.dualOptions.has(s))return true;let i=this.negativeOptions.get(s).presetArg,n=i!==void 0?i:false;return r.negate===(n===e)}};function Eu(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function CD(t){let e,r,s=/^-[^-]$/,i=/^--[^-]/,n=t.split(/[ |,]+/).concat("guard");if(s.test(n[0])&&(e=n.shift()),i.test(n[0])&&(r=n.shift()),!e&&s.test(n[0])&&(e=n.shift()),!e&&i.test(n[0])&&(e=r,r=n.shift()),n[0].startsWith("-")){let o=n[0],a=`option creation failed due to '${o}' in option flags '${t}'`;throw /^-[^-][^-]/.test(o)?new Error(`${a}
7
- - a short flag is a single dash and a single character
8
- - either use a single dash and a single character (for a short flag)
9
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):s.test(o)?new Error(`${a}
10
- - too many short flags`):i.test(o)?new Error(`${a}
11
- - too many long flags`):new Error(`${a}
12
- - unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return {shortFlag:e,longFlag:r}}Pi.Option=Ti;Pi.DualOptions=ki;});var Ou=y(Au=>{function wD(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let s=0;s<=t.length;s++)r[s]=[s];for(let s=0;s<=e.length;s++)r[0][s]=s;for(let s=1;s<=e.length;s++)for(let i=1;i<=t.length;i++){let n=1;t[i-1]===e[s-1]?n=0:n=1,r[i][s]=Math.min(r[i-1][s]+1,r[i][s-1]+1,r[i-1][s-1]+n),i>1&&s>1&&t[i-1]===e[s-2]&&t[i-2]===e[s-1]&&(r[i][s]=Math.min(r[i][s],r[i-2][s-2]+1));}return r[t.length][e.length]}function xD(t,e){if(!e||e.length===0)return "";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let s=[],i=3,n=.4;return e.forEach(o=>{if(o.length<=1)return;let a=wD(t,o),u=Math.max(t.length,o.length);(u-a)/u>n&&(a<i?(i=a,s=[o]):a===i&&s.push(o));}),s.sort((o,a)=>o.localeCompare(a)),r&&(s=s.map(o=>`--${o}`)),s.length>1?`
13
- (Did you mean one of ${s.join(", ")}?)`:s.length===1?`
14
- (Did you mean ${s[0]}?)`:""}Au.suggestSimilar=xD;});var ku=y(Hi=>{var _D=N("events").EventEmitter,Ii=N("child_process"),nt=N("path"),os=N("fs"),V=N("process"),{Argument:FD,humanReadableArgName:ED}=ns(),{CommanderError:Mi}=vr(),{Help:AD,stripColor:OD}=Si(),{Option:Ru,DualOptions:RD}=$i(),{suggestSimilar:Su}=Ou(),Bi=class t extends _D{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=false,this._allowExcessArguments=false,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=false,this._actionHandler=null,this._executableHandler=false,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=true,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=false,this._passThroughOptions=false,this._lifeCycleHooks={},this._showHelpAfterError=false,this._showSuggestionAfterError=true,this._savedState=null,this._outputConfiguration={writeOut:r=>V.stdout.write(r),writeErr:r=>V.stderr.write(r),outputError:(r,s)=>s(r),getOutHelpWidth:()=>V.stdout.isTTY?V.stdout.columns:void 0,getErrHelpWidth:()=>V.stderr.isTTY?V.stderr.columns:void 0,getOutHasColors:()=>Ni()??(V.stdout.isTTY&&V.stdout.hasColors?.()),getErrHasColors:()=>Ni()??(V.stderr.isTTY&&V.stderr.hasColors?.()),stripColor:r=>OD(r)},this._hidden=false,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0;}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,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(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,s){let i=r,n=s;typeof i=="object"&&i!==null&&(n=i,i=null),n=n||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(o);return i&&(u.description(i),u._executableHandler=true),n.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(n.noHelp||n.hidden),u._executableFile=n.executableFile||null,a&&u.arguments(a),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),i?this:u}createCommand(e){return new t(e)}createHelp(){return Object.assign(new AD,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=true){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=true){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
15
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=true),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new FD(e,r)}argument(e,r,s,i){let n=this.createArgument(e,r);return typeof s=="function"?n.default(i).argParser(s):n.default(s),this.addArgument(n),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r);}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let s=e??"help [command]",[,i,n]=s.match(/([^ ]+) *(.*)/),o=r??"display help for command",a=this.createCommand(i);return a.helpOption(false),n&&a.arguments(n),o&&a.description(o),this._addImplicitHelpCommand=true,this._helpCommand=a,(e||r)&&this._initCommandGroup(a),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=true,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let s=["preSubcommand","preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
16
- Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,s){this._exitCallback&&this._exitCallback(new Mi(e,r,s)),V.exit(e);}action(e){let r=s=>{let i=this.registeredArguments.length,n=s.slice(0,i);return this._storeOptionsAsProperties?n[i]=this:n[i]=this.opts(),n.push(this),e.apply(this,n)};return this._actionHandler=r,this}createOption(e,r){return new Ru(e,r)}_callParseArg(e,r,s,i){try{return e.parseArg(r,s)}catch(n){if(n.code==="commander.invalidArgument"){let o=`${i} ${n.message}`;this.error(o,{exitCode:n.exitCode,code:n.code});}throw n}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let s=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${s}'
17
- - already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e);}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),s=r(e).find(i=>this._findCommand(i));if(s){let i=r(this._findCommand(s)).join("|"),n=r(e).join("|");throw new Error(`cannot add command '${n}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e);}addOption(e){this._registerOption(e);let r=e.name(),s=e.attributeName();if(e.negate){let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(s,e.defaultValue===void 0?true:e.defaultValue,"default");}else e.defaultValue!==void 0&&this.setOptionValueWithSource(s,e.defaultValue,"default");let i=(n,o,a)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let u=this.getOptionValue(s);n!==null&&e.parseArg?n=this._callParseArg(e,n,u,o):n!==null&&e.variadic&&(n=e._collectValue(n,u)),n==null&&(e.negate?n=false:e.isBoolean()||e.optional?n=true:n=""),this.setOptionValueWithSource(s,n,a);};return this.on("option:"+r,n=>{let o=`error: option '${e.flags}' argument '${n}' is invalid.`;i(n,o,"cli");}),e.envVar&&this.on("optionEnv:"+r,n=>{let o=`error: option '${e.flags}' value '${n}' from env '${e.envVar}' is invalid.`;i(n,o,"env");}),this}_optionEx(e,r,s,i,n){if(typeof r=="object"&&r instanceof Ru)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,s);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(n).argParser(i);else if(i instanceof RegExp){let a=i;i=(u,h)=>{let l=a.exec(u);return l?l[0]:h},o.default(n).argParser(i);}else o.default(i);return this.addOption(o)}option(e,r,s,i){return this._optionEx({},e,r,s,i)}requiredOption(e,r,s,i){return this._optionEx({mandatory:true},e,r,s,i)}combineFlagAndOptionalValue(e=true){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=true){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=true){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=true){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=true){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=true){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,s){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(s=>{s.getOptionValueSource(e)!==void 0&&(r=s.getOptionValueSource(e));}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){V.versions?.electron&&(r.from="electron");let i=V.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval");}e===void 0&&(e=V.argv),this.rawArgs=e.slice();let s;switch(r.from){case void 0:case "node":this._scriptPath=e[1],s=e.slice(2);break;case "electron":V.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case "user":s=e.slice(0);break;case "eval":s=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return !this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",s}parse(e,r){this._prepareForParse();let s=this._prepareUserArgs(e,r);return this._parseCommand([],s),this}async parseAsync(e,r){this._prepareForParse();let s=this._prepareUserArgs(e,r);return await this._parseCommand([],s),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse();}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}};}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
18
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[];}_checkForMissingExecutable(e,r,s){if(os.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${e}' does not exist
19
- - if '${s}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
- - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
- - ${i}`;throw new Error(n)}_executeSubCommand(e,r){r=r.slice();let s=false,i=[".js",".ts",".tsx",".mjs",".cjs"];function n(l,c){let d=nt.resolve(l,c);if(os.existsSync(d))return d;if(i.includes(nt.extname(c)))return;let f=i.find(m=>os.existsSync(`${d}${m}`));if(f)return `${d}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let l;try{l=os.realpathSync(this._scriptPath);}catch{l=this._scriptPath;}a=nt.resolve(nt.dirname(l),a);}if(a){let l=n(a,o);if(!l&&!e._executableFile&&this._scriptPath){let c=nt.basename(this._scriptPath,nt.extname(this._scriptPath));c!==this._name&&(l=n(a,`${c}-${e._name}`));}o=l||o;}s=i.includes(nt.extname(o));let u;V.platform!=="win32"?s?(r.unshift(o),r=Tu(V.execArgv).concat(r),u=Ii.spawn(V.argv[0],r,{stdio:"inherit"})):u=Ii.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),r.unshift(o),r=Tu(V.execArgv).concat(r),u=Ii.spawn(V.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{V.on(c,()=>{u.killed===false&&u.exitCode===null&&u.kill(c);});});let h=this._exitCallback;u.on("close",l=>{l=l??1,h?h(new Mi(l,"commander.executeSubCommandAsync","(close)")):V.exit(l);}),u.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!h)V.exit(1);else {let c=new Mi(1,"commander.executeSubCommandAsync","(error)");c.nestedError=l,h(c);}}),this.runningCommand=u;}_dispatchSubcommand(e,r,s){let i=this._findCommand(e);i||this.help({error:true}),i._prepareForParse();let n;return n=this._chainOrCallSubCommandHook(n,i,"preSubcommand"),n=this._chainOrCall(n,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(s));else return i._parseCommand(r,s)}),n}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&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(){let e=(s,i,n)=>{let o=i;if(i!==null&&s.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${s.name()}'.`;o=this._callParseArg(s,i,n,a);}return o};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((s,i)=>{let n=s.defaultValue;s.variadic?i<this.args.length?(n=this.args.slice(i),s.parseArg&&(n=n.reduce((o,a)=>e(s,a,o),s.defaultValue))):n===void 0&&(n=[]):i<this.args.length&&(n=this.args[i],s.parseArg&&(n=e(s,n,s.defaultValue))),r[i]=n;}),this.processedArgs=r;}_chainOrCall(e,r){return e?.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let s=e,i=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[r]!==void 0).forEach(n=>{n._lifeCycleHooks[r].forEach(o=>{i.push({hookedCommand:n,callback:o});});}),r==="postAction"&&i.reverse(),i.forEach(n=>{s=this._chainOrCall(s,()=>n.callback(n.hookedCommand,this));}),s}_chainOrCallSubCommandHook(e,r,s){let i=e;return this._lifeCycleHooks[s]!==void 0&&this._lifeCycleHooks[s].forEach(n=>{i=this._chainOrCall(i,()=>n(this,r));}),i}_parseCommand(e,r){let s=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(s.operands),r=s.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:true}),this._outputHelpIfRequested(s.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0]);},n=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(n,e,r);})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent?.listenerCount(n))i(),this._processArguments(),this.parent.emit(n,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments());}else this.commands.length?(i(),this.help({error:true})):(i(),this._processArguments());}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r);});});}_checkForConflictingLocalOptions(){let e=this.options.filter(s=>{let i=s.attributeName();return this.getOptionValue(i)===void 0?false:this.getOptionValueSource(i)!=="default"});e.filter(s=>s.conflictsWith.length>0).forEach(s=>{let i=e.find(n=>s.conflictsWith.includes(n.attributeName()));i&&this._conflictingOption(s,i);});}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions();});}parseOptions(e){let r=[],s=[],i=r;function n(l){return l.length>1&&l[0]==="-"}let o=l=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(c=>c.options.map(d=>d.short).some(d=>/^-\d$/.test(d))):false,a=null,u=null,h=0;for(;h<e.length||u;){let l=u??e[h++];if(u=null,l==="--"){i===s&&i.push(l),i.push(...e.slice(h));break}if(a&&(!n(l)||o(l))){this.emit(`option:${a.name()}`,l);continue}if(a=null,n(l)){let c=this._findOption(l);if(c){if(c.required){let d=e[h++];d===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,d);}else if(c.optional){let d=null;h<e.length&&(!n(e[h])||o(e[h]))&&(d=e[h++]),this.emit(`option:${c.name()}`,d);}else this.emit(`option:${c.name()}`);a=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),u=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),d=this._findOption(l.slice(0,c));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,l.slice(c+1));continue}}if(i===r&&n(l)&&!(this.commands.length===0&&o(l))&&(i=s),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&s.length===0){if(this._findCommand(l)){r.push(l),s.push(...e.slice(h));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l,...e.slice(h));break}else if(this._defaultCommandName){s.push(l,...e.slice(h));break}}if(this._passThroughOptions){i.push(l,...e.slice(h));break}i.push(l);}return {operands:r,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let s=0;s<r;s++){let i=this.options[s].attributeName();e[i]=i===this._versionOptionName?this._version:this[i];}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
22
- `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
- `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
24
- `),this.outputHelp({error:true}));let s=r||{},i=s.exitCode||1,n=s.code||"commander.error";this._exit(i,n,e);}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in V.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,V.env[e.envVar]):this.emit(`optionEnv:${e.name()}`));}});}_parseOptionsImplied(){let e=new RD(this.options),r=s=>this.getOptionValue(s)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(s));this.options.filter(s=>s.implied!==void 0&&r(s.attributeName())&&e.valueFromOption(this.getOptionValue(s.attributeName()),s)).forEach(s=>{Object.keys(s.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,s.implied[i],"implied");});});}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"});}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"});}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"});}_conflictingOption(e,r){let s=o=>{let a=o.attributeName(),u=this.getOptionValue(a),h=this.options.find(c=>c.negate&&a===c.attributeName()),l=this.options.find(c=>!c.negate&&a===c.attributeName());return h&&(h.presetArg===void 0&&u===false||h.presetArg!==void 0&&u===h.presetArg)?h:l||o},i=o=>{let a=s(o),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},n=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(n,{code:"commander.conflictingOption"});}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],n=this;do{let o=n.createHelp().visibleOptions(n).filter(a=>a.long).map(a=>a.long);i=i.concat(o),n=n.parent;}while(n&&!n._enablePositionalOptions);r=Su(e,i);}let s=`error: unknown option '${e}'${r}`;this.error(s,{code:"commander.unknownOption"});}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,s=r===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${s} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"});}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(n=>{i.push(n.name()),n.alias()&&i.push(n.alias());}),r=Su(e,i);}let s=`error: unknown command '${e}'${r}`;this.error(s,{code:"commander.unknownCommand"});}version(e,r,s){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",s=s||"output the version number";let i=this.createOption(r,s);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
25
- `),this._exit(0,"commander.version",e);}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let s=this.parent?._findCommand(e);if(s){let i=[s.name()].concat(s.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(s=>ED(s));return [].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup);}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup);}nameFromFilename(e){return this._name=nt.basename(e,nt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),s=this._getOutputContext(e);r.prepareContext({error:s.error,helpWidth:s.helpWidth,outputHasColors:s.hasColors});let i=r.formatHelp(this,r);return s.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,s,i,n;return r?(s=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(s=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),s(a)),hasColors:i,helpWidth:n}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let s=this._getOutputContext(e),i={error:s.error,write:s.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation({error:s.error});if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");s.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i));}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(V.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)");}addHelpText(e,r){let s=["beforeAll","before","after","afterAll"];if(!s.includes(e))throw new Error(`Unexpected value for position to addHelpText.
26
- Expecting one of '${s.join("', '")}'`);let i=`${e}Help`;return this.on(i,n=>{let o;typeof r=="function"?o=r({error:n.error,command:n.command}):o=r,o&&n.write(`${o}
27
- `);}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"));}};function Tu(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,s="127.0.0.1",i="9229",n;return (n=e.match(/^(--inspect(-brk)?)$/))!==null?r=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=n[1],/^\d+$/.test(n[3])?i=n[3]:s=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=n[1],s=n[3],i=n[4]),r&&i!=="0"?`${r}=${s}:${parseInt(i)+1}`:e})}function Ni(){if(V.env.NO_COLOR||V.env.FORCE_COLOR==="0"||V.env.FORCE_COLOR==="false")return false;if(V.env.FORCE_COLOR||V.env.CLICOLOR_FORCE!==void 0)return true}Hi.Command=Bi;Hi.useColor=Ni;});var Mu=y(Se=>{var{Argument:Pu}=ns(),{Command:qi}=ku(),{CommanderError:SD,InvalidArgumentError:$u}=vr(),{Help:TD}=Si(),{Option:Iu}=$i();Se.program=new qi;Se.createCommand=t=>new qi(t);Se.createOption=(t,e)=>new Iu(t,e);Se.createArgument=(t,e)=>new Pu(t,e);Se.Command=qi;Se.Option=Iu;Se.Argument=Pu;Se.Help=TD;Se.CommanderError=SD;Se.InvalidArgumentError=$u;Se.InvalidOptionArgumentError=$u;});var Rt=y((h1,Li)=>{var us=process||{},Nu=us.argv||[],as=us.env||{},kD=!(as.NO_COLOR||Nu.includes("--no-color"))&&(!!as.FORCE_COLOR||Nu.includes("--color")||us.platform==="win32"||(us.stdout||{}).isTTY&&as.TERM!=="dumb"||!!as.CI),PD=(t,e,r=t)=>s=>{let i=""+s,n=i.indexOf(e,t.length);return ~n?t+$D(i,e,r,n)+e:t+i+e},$D=(t,e,r,s)=>{let i="",n=0;do i+=t.substring(n,s)+r,n=s+e.length,s=t.indexOf(e,n);while(~s);return i+t.substring(n)},Hu=(t=kD)=>{let e=t?PD:()=>String;return {isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Li.exports=Hu();Li.exports.createColors=Hu;});var re=y((d1,Lu)=>{var{FORCE_COLOR:ID,NODE_DISABLE_COLORS:MD,TERM:BD}=process.env,W={enabled:!MD&&BD!=="dumb"&&ID!=="0",reset:Y(0,0),bold:Y(1,22),dim:Y(2,22),italic:Y(3,23),underline:Y(4,24),inverse:Y(7,27),hidden:Y(8,28),strikethrough:Y(9,29),black:Y(30,39),red:Y(31,39),green:Y(32,39),yellow:Y(33,39),blue:Y(34,39),magenta:Y(35,39),cyan:Y(36,39),white:Y(37,39),gray:Y(90,39),grey:Y(90,39),bgBlack:Y(40,49),bgRed:Y(41,49),bgGreen:Y(42,49),bgYellow:Y(43,49),bgBlue:Y(44,49),bgMagenta:Y(45,49),bgCyan:Y(46,49),bgWhite:Y(47,49)};function qu(t,e){let r=0,s,i="",n="";for(;r<t.length;r++)s=t[r],i+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return i+e+n}function ND(t,e){let r={has:t,keys:e};return r.reset=W.reset.bind(r),r.bold=W.bold.bind(r),r.dim=W.dim.bind(r),r.italic=W.italic.bind(r),r.underline=W.underline.bind(r),r.inverse=W.inverse.bind(r),r.hidden=W.hidden.bind(r),r.strikethrough=W.strikethrough.bind(r),r.black=W.black.bind(r),r.red=W.red.bind(r),r.green=W.green.bind(r),r.yellow=W.yellow.bind(r),r.blue=W.blue.bind(r),r.magenta=W.magenta.bind(r),r.cyan=W.cyan.bind(r),r.white=W.white.bind(r),r.gray=W.gray.bind(r),r.grey=W.grey.bind(r),r.bgBlack=W.bgBlack.bind(r),r.bgRed=W.bgRed.bind(r),r.bgGreen=W.bgGreen.bind(r),r.bgYellow=W.bgYellow.bind(r),r.bgBlue=W.bgBlue.bind(r),r.bgMagenta=W.bgMagenta.bind(r),r.bgCyan=W.bgCyan.bind(r),r.bgWhite=W.bgWhite.bind(r),r}function Y(t,e){let r={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(s){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(r)),s===void 0?this:W.enabled?qu(this.keys,s+""):s+""):s===void 0?ND([t],[r]):W.enabled?qu([r],s+""):s+""}}Lu.exports=W;});var Gu=y((f1,ju)=>{ju.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return "first";if(t.name==="c"||t.name==="d")return "abort";if(t.name==="e")return "last";if(t.name==="g")return "reset"}if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}};});var ls=y((p1,Vu)=>{Vu.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};});var ie=y((m1,Uu)=>{var ji="\x1B",se=`${ji}[`,HD="\x07",Gi={to(t,e){return e?`${se}${e+1};${t+1}H`:`${se}${t+1}G`},move(t,e){let r="";return t<0?r+=`${se}${-t}D`:t>0&&(r+=`${se}${t}C`),e<0?r+=`${se}${-e}A`:e>0&&(r+=`${se}${e}B`),r},up:(t=1)=>`${se}${t}A`,down:(t=1)=>`${se}${t}B`,forward:(t=1)=>`${se}${t}C`,backward:(t=1)=>`${se}${t}D`,nextLine:(t=1)=>`${se}E`.repeat(t),prevLine:(t=1)=>`${se}F`.repeat(t),left:`${se}G`,hide:`${se}?25l`,show:`${se}?25h`,save:`${ji}7`,restore:`${ji}8`},qD={up:(t=1)=>`${se}S`.repeat(t),down:(t=1)=>`${se}T`.repeat(t)},LD={screen:`${se}2J`,up:(t=1)=>`${se}1J`.repeat(t),down:(t=1)=>`${se}J`.repeat(t),line:`${se}2K`,lineEnd:`${se}K`,lineStart:`${se}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?Gi.up():"");return t&&(e+=Gi.left),e}};Uu.exports={cursor:Gi,scroll:qD,erase:LD,beep:HD};});var zu=y((g1,Ju)=>{function jD(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=GD(t))||e){r&&(t=r);var s=0,i=function(){};return {s:i,n:function(){return s>=t.length?{done:true}:{done:false,value:t[s++]}},e:function(h){throw h},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=true,o=false,a;return {s:function(){r=r.call(t);},n:function(){var h=r.next();return n=h.done,h},e:function(h){o=true,a=h;},f:function(){try{!n&&r.return!=null&&r.return();}finally{if(o)throw a}}}}function GD(t,e){if(t){if(typeof t=="string")return Wu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wu(t,e)}}function Wu(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var VD=ls(),Yu=ie(),Ku=Yu.erase,UD=Yu.cursor,WD=t=>[...VD(t)].length;Ju.exports=function(t,e){if(!e)return Ku.line+UD.to(0);let r=0,s=t.split(/\r?\n/);var i=jD(s),n;try{for(i.s();!(n=i.n()).done;){let o=n.value;r+=1+Math.floor(Math.max(WD(o)-1,0)/e);}}catch(o){i.e(o);}finally{i.f();}return Ku.lines(r)};});var Vi=y((D1,Xu)=>{var Cr={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},KD={arrowUp:Cr.arrowUp,arrowDown:Cr.arrowDown,arrowLeft:Cr.arrowLeft,arrowRight:Cr.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},YD=process.platform==="win32"?KD:Cr;Xu.exports=YD;});var Qu=y((b1,Zu)=>{var Xt=re(),St=Vi(),Ui=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),JD=t=>Ui[t]||Ui.default,wr=Object.freeze({aborted:Xt.red(St.cross),done:Xt.green(St.tick),exited:Xt.yellow(St.cross),default:Xt.cyan("?")}),zD=(t,e,r)=>e?wr.aborted:r?wr.exited:t?wr.done:wr.default,XD=t=>Xt.gray(t?St.ellipsis:St.pointerSmall),ZD=(t,e)=>Xt.gray(t?e?St.pointerSmall:"+":St.line);Zu.exports={styles:Ui,render:JD,symbols:wr,symbol:zD,delimiter:XD,item:ZD};});var tl=y((y1,el)=>{var QD=ls();el.exports=function(t,e){let r=String(QD(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var sl=y((v1,rl)=>{rl.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
29
- `)).join(`
30
- `)};});var nl=y((C1,il)=>{il.exports=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}};});var Me=y((w1,ol)=>{ol.exports={action:Gu(),clear:zu(),style:Qu(),strip:ls(),figures:Vi(),lines:tl(),wrap:sl(),entriesToDisplay:nl()};});var ot=y((x1,ll)=>{var al=N("readline"),e0=Me(),t0=e0.action,r0=N("events"),ul=ie(),s0=ul.beep,i0=ul.cursor,n0=re(),Wi=class extends r0{constructor(e={}){super(),this.firstRender=true,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=al.createInterface({input:this.in,escapeCodeTimeout:50});al.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(true);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let a=t0(o,s);a===false?this._&&this._(n,o):typeof this[a]=="function"?this[a](o):this.bell();};this.close=()=>{this.out.write(i0.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(false),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",i);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(s0);}render(){this.onRender(n0),this.firstRender&&(this.firstRender=false);}};ll.exports=Wi;});var pl=y((_1,fl)=>{function cl(t,e,r,s,i,n,o){try{var a=t[n](o),u=a.value;}catch(h){r(h);return}a.done?e(u):Promise.resolve(u).then(s,i);}function hl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){cl(n,s,i,o,a,"next",u);}function a(u){cl(n,s,i,o,a,"throw",u);}o(void 0);})}}var cs=re(),o0=ot(),dl=ie(),a0=dl.erase,xr=dl.cursor,hs=Me(),Ki=hs.style,Yi=hs.clear,u0=hs.lines,l0=hs.figures,Ji=class extends o0{constructor(e={}){super(e),this.transform=Ki.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>true),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Yi("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=true,this.rendered=cs.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(e)),this._value=e,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
31
- `),this.close();}validate(){var e=this;return hl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return hl(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=true,e.fire(),e.render();return}e.done=true,e.aborted=false,e.fire(),e.render(),e.out.write(`
32
- `),e.close();})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e);}_(e,r){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=false,this.cursor=this.placeholder?0:s.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=false,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=false,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(xr.down(u0(this.outputError,this.out.columns)-1)+Yi(this.outputError,this.out.columns)),this.out.write(Yi(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ki.symbol(this.done,this.aborted),cs.bold(this.msg),Ki.delimiter(this.done),this.red?cs.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
33
- `).reduce((e,r,s)=>e+`
34
- ${s?" ":l0.pointerSmall} ${cs.red().italic(r)}`,"")),this.out.write(a0.line+xr.to(0)+this.outputText+xr.save+this.outputError+xr.restore+xr.move(this.cursorOffset,0)));}};fl.exports=Ji;});var bl=y((F1,Dl)=>{var at=re(),c0=ot(),_r=Me(),ml=_r.style,gl=_r.clear,ds=_r.figures,h0=_r.wrap,d0=_r.entriesToDisplay,f0=ie(),p0=f0.cursor,zi=class extends c0{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?s:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=gl("",this.out.columns),this.render();}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
35
- `),this.close();}submit(){this.selection.disabled?this.bell():(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
36
- `),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(p0.hide):this.out.write(gl(this.outputText,this.out.columns)),super.render();let e=d0(this.cursor,this.choices.length,this.optionsPerPage),r=e.startIndex,s=e.endIndex;if(this.outputText=[ml.symbol(this.done,this.aborted),at.bold(this.msg),ml.delimiter(false),this.done?this.selection.title:this.selection.disabled?at.yellow(this.warn):at.gray(this.hint)].join(" "),!this.done){this.outputText+=`
37
- `;for(let i=r;i<s;i++){let n,o,a="",u=this.choices[i];i===r&&r>0?o=ds.arrowUp:i===s-1&&s<this.choices.length?o=ds.arrowDown:o=" ",u.disabled?(n=this.cursor===i?at.gray().underline(u.title):at.strikethrough().gray(u.title),o=(this.cursor===i?at.bold().gray(ds.pointer)+" ":" ")+o):(n=this.cursor===i?at.cyan().underline(u.title):u.title,o=(this.cursor===i?at.cyan(ds.pointer)+" ":" ")+o,u.description&&this.cursor===i&&(a=` - ${u.description}`,(o.length+n.length+a.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(a=`
38
- `+h0(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${n}${at.gray(a)}
39
- `;}}this.out.write(this.outputText);}};Dl.exports=zi;});var _l=y((E1,xl)=>{var fs=re(),m0=ot(),Cl=Me(),yl=Cl.style,g0=Cl.clear,wl=ie(),vl=wl.cursor,D0=wl.erase,Xi=class extends m0{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
40
- `),this.close();}submit(){this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
41
- `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=true;else if(e==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(vl.hide):this.out.write(g0(this.outputText,this.out.columns)),super.render(),this.outputText=[yl.symbol(this.done,this.aborted),fs.bold(this.msg),yl.delimiter(this.done),this.value?this.inactive:fs.cyan().underline(this.inactive),fs.gray("/"),this.value?fs.cyan().underline(this.active):this.active].join(" "),this.out.write(D0.line+vl.to(0)+this.outputText));}};xl.exports=Xi;});var We=y((A1,Fl)=>{var Zi=class t{constructor({token:e,date:r,parts:s,locales:i}){this.token=e,this.date=r||new Date,this.parts=s||[this],this.locales=i||{};}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,s)=>s>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((s,i)=>i>r&&s instanceof t)}toString(){return String(this.date)}};Fl.exports=Zi;});var Al=y((O1,El)=>{var b0=We(),Qi=class extends b0{constructor(e={}){super(e);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let e=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?e.toUpperCase():e}};El.exports=Qi;});var Rl=y((R1,Ol)=>{var y0=We(),v0=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),en=class extends y0{constructor(e={}){super(e);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(e){this.date.setDate(parseInt(e.substr(-2)));}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+v0(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};Ol.exports=en;});var Tl=y((S1,Sl)=>{var C0=We(),tn=class extends C0{constructor(e={}){super(e);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(e){this.date.setHours(parseInt(e.substr(-2)));}toString(){let e=this.date.getHours();return /h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};Sl.exports=tn;});var Pl=y((T1,kl)=>{var w0=We(),rn=class extends w0{constructor(e={}){super(e);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};kl.exports=rn;});var Il=y((k1,$l)=>{var x0=We(),sn=class extends x0{constructor(e={}){super(e);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)));}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};$l.exports=sn;});var Bl=y((P1,Ml)=>{var _0=We(),nn=class extends _0{constructor(e={}){super(e);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e);}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};Ml.exports=nn;});var Hl=y(($1,Nl)=>{var F0=We(),on=class extends F0{constructor(e={}){super(e);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)));}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};Nl.exports=on;});var Ll=y((I1,ql)=>{var E0=We(),an=class extends E0{constructor(e={}){super(e);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(e){this.date.setFullYear(e.substr(-4));}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};ql.exports=an;});var Gl=y((M1,jl)=>{jl.exports={DatePart:We(),Meridiem:Al(),Day:Rl(),Hours:Tl(),Milliseconds:Pl(),Minutes:Il(),Month:Bl(),Seconds:Hl(),Year:Ll()};});var Ql=y((B1,Zl)=>{function Vl(t,e,r,s,i,n,o){try{var a=t[n](o),u=a.value;}catch(h){r(h);return}a.done?e(u):Promise.resolve(u).then(s,i);}function Ul(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){Vl(n,s,i,o,a,"next",u);}function a(u){Vl(n,s,i,o,a,"throw",u);}o(void 0);})}}var un=re(),A0=ot(),cn=Me(),Wl=cn.style,Kl=cn.clear,O0=cn.figures,Xl=ie(),R0=Xl.erase,Yl=Xl.cursor,ut=Gl(),Jl=ut.DatePart,S0=ut.Meridiem,T0=ut.Day,k0=ut.Hours,P0=ut.Milliseconds,$0=ut.Minutes,I0=ut.Month,M0=ut.Seconds,B0=ut.Year,N0=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,zl={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new T0(t),3:t=>new I0(t),4:t=>new B0(t),5:t=>new S0(t),6:t=>new k0(t),7:t=>new $0(t),8:t=>new M0(t),9:t=>new P0(t)},H0={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},ln=class extends A0{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(H0,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Kl("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime());}set mask(e){let r;for(this.parts=[];r=N0.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in zl?zl[n]({token:r[n]||i,date:this.date,parts:this.parts,locales:this.locales}):r[n]||i);}let s=this.parts.reduce((i,n)=>(typeof n=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=n:i.push(n),i),[]);this.parts.splice(0),this.parts.push(...s),this.reset();}moveCursor(e){this.typed="",this.cursor=e,this.fire();}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof Jl)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
42
- `),this.close();}validate(){var e=this;return Ul(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Ul(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=true,e.aborted=false,e.fire(),e.render(),e.out.write(`
43
- `),e.close();})()}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof Jl)),this.render();}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(Yl.hide):this.out.write(Kl(this.outputText,this.out.columns)),super.render(),this.outputText=[Wl.symbol(this.done,this.aborted),un.bold(this.msg),Wl.delimiter(false),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?un.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
44
- `).reduce((e,r,s)=>e+`
45
- ${s?" ":O0.pointerSmall} ${un.red().italic(r)}`,"")),this.out.write(R0.line+Yl.to(0)+this.outputText));}};Zl.exports=ln;});var oc=y((N1,nc)=>{function ec(t,e,r,s,i,n,o){try{var a=t[n](o),u=a.value;}catch(h){r(h);return}a.done?e(u):Promise.resolve(u).then(s,i);}function tc(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){ec(n,s,i,o,a,"next",u);}function a(u){ec(n,s,i,o,a,"throw",u);}o(void 0);})}}var ps=re(),q0=ot(),ic=ie(),ms=ic.cursor,L0=ic.erase,gs=Me(),hn=gs.style,j0=gs.figures,rc=gs.clear,G0=gs.lines,V0=/[0-9]/,dn=t=>t!==void 0,sc=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},fn=class extends q0{constructor(e={}){super(e),this.transform=hn.render(e.style),this.msg=e.message,this.initial=dn(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=dn(e.min)?e.min:-1/0,this.max=dn(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(e){!e&&e!==0?(this.placeholder=true,this.rendered=ps.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${sc(e,this.round)}`),this._value=sc(e,this.round)),this.fire();}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||V0.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
46
- `),this.close();}validate(){var e=this;return tc(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return tc(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let r=e.value;e.value=r!==""?r:e.initial,e.done=true,e.aborted=false,e.error=false,e.fire(),e.render(),e.out.write(`
47
- `),e.close();})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(e,r){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ms.down(G0(this.outputError,this.out.columns)-1)+rc(this.outputError,this.out.columns)),this.out.write(rc(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[hn.symbol(this.done,this.aborted),ps.bold(this.msg),hn.delimiter(this.done),!this.done||!this.done&&!this.placeholder?ps[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
48
- `).reduce((e,r,s)=>e+`
49
- ${s?" ":j0.pointerSmall} ${ps.red().italic(r)}`,"")),this.out.write(L0.line+ms.to(0)+this.outputText+ms.save+this.outputError+ms.restore));}};nc.exports=fn;});var mn=y((H1,lc)=>{var Ke=re(),U0=ie(),W0=U0.cursor,K0=ot(),Fr=Me(),ac=Fr.clear,vt=Fr.figures,uc=Fr.style,Y0=Fr.wrap,J0=Fr.entriesToDisplay,pn=class extends K0{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=false,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?s:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=ac("",this.out.columns),e.overrideRender||this.render();}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
50
- `),this.close();}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=true,this.render()):(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
51
- `),this.close());}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.value.length,this.render();}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render();}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.value[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true,this.render();}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render();}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
52
- Instructions:
53
- ${vt.arrowUp}/${vt.arrowDown}: Highlight option
54
- ${vt.arrowLeft}/${vt.arrowRight}/[space]: Toggle selection
55
- `+(this.maxChoices===void 0?` a: Toggle all
56
- `:"")+" enter/return: Complete answer":""}renderOption(e,r,s,i){let n=(r.selected?Ke.green(vt.radioOn):vt.radioOff)+" "+i+" ",o,a;return r.disabled?o=e===s?Ke.gray().underline(r.title):Ke.strikethrough().gray(r.title):(o=e===s?Ke.cyan().underline(r.title):r.title,e===s&&r.description&&(a=` - ${r.description}`,(n.length+o.length+a.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(a=`
57
- `+Y0(r.description,{margin:n.length,width:this.out.columns})))),n+o+Ke.gray(a||"")}paginateOptions(e){if(e.length===0)return Ke.red("No matches for this query.");let r=J0(this.cursor,e.length,this.optionsPerPage),s=r.startIndex,i=r.endIndex,n,o=[];for(let a=s;a<i;a++)a===s&&s>0?n=vt.arrowUp:a===i-1&&i<e.length?n=vt.arrowDown:n=" ",o.push(this.renderOption(this.cursor,e[a],a,n));return `
58
- `+o.join(`
59
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[Ke.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(Ke.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(W0.hide),super.render();let e=[uc.symbol(this.done,this.aborted),Ke.bold(this.msg),uc.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Ke.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=ac(e,this.out.columns);}};lc.exports=pn;});var gc=y((q1,mc)=>{function cc(t,e,r,s,i,n,o){try{var a=t[n](o),u=a.value;}catch(h){r(h);return}a.done?e(u):Promise.resolve(u).then(s,i);}function z0(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){cc(n,s,i,o,a,"next",u);}function a(u){cc(n,s,i,o,a,"throw",u);}o(void 0);})}}var Er=re(),X0=ot(),pc=ie(),Z0=pc.erase,hc=pc.cursor,Ar=Me(),gn=Ar.style,dc=Ar.clear,Dn=Ar.figures,Q0=Ar.wrap,eb=Ar.entriesToDisplay,fc=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),tb=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),rb=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},bn=class extends X0{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:rb(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||false,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=gn.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=dc("",this.out.columns),this.complete(this.render),this.render();}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e;}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=fc(this.suggestions,e):this.value=this.fallback.value,this.fire();}complete(e){var r=this;return z0(function*(){let s=r.completing=r.suggest(r.input,r.choices),i=yield s;if(r.completing!==s)return;r.suggestions=i.map((o,a,u)=>({title:tb(u,a),value:fc(u,a),description:o.description})),r.completing=false;let n=Math.max(i.length-1,0);r.moveSelect(Math.min(n,r.select)),e&&e();})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
60
- `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
61
- `),this.close();}submit(){this.done=true,this.aborted=this.exited=false,this.fire(),this.render(),this.out.write(`
62
- `),this.close();}_(e,r){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(e,r,s,i){let n,o=s?Dn.arrowUp:i?Dn.arrowDown:" ",a=r?Er.cyan().underline(e.title):e.title;return o=(r?Er.cyan(Dn.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+a.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
63
- `+Q0(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Er.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(hc.hide):this.out.write(dc(this.outputText,this.out.columns)),super.render();let e=eb(this.select,this.choices.length,this.limit),r=e.startIndex,s=e.endIndex;if(this.outputText=[gn.symbol(this.done,this.aborted,this.exited),Er.bold(this.msg),gn.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(r,s).map((n,o)=>this.renderOption(n,this.select===o+r,o===0&&r>0,o+r===s-1&&s<this.choices.length)).join(`
64
- `);this.outputText+=`
65
- `+(i||Er.gray(this.fallback.title));}this.out.write(Z0.line+hc.to(0)+this.outputText);}};mc.exports=bn;});var vc=y((L1,yc)=>{var lt=re(),sb=ie(),ib=sb.cursor,nb=mn(),vn=Me(),Dc=vn.clear,bc=vn.style,Zt=vn.figures,yn=class extends nb{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=Dc("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let r=this.filteredOptions.findIndex(s=>s===e);this.cursor=r<0?0:r,this.render();}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions();}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
66
- Instructions:
67
- ${Zt.arrowUp}/${Zt.arrowDown}: Highlight option
68
- ${Zt.arrowLeft}/${Zt.arrowRight}/[space]: Toggle selection
69
- [a,b,c]/delete: Filter choices
70
- enter/return: Complete answer
71
- `:""}renderCurrentInput(){return `
72
- Filtered results for: ${this.inputValue?this.inputValue:lt.gray("Enter something to filter")}
73
- `}renderOption(e,r,s){let i;return r.disabled?i=e===s?lt.gray().underline(r.title):lt.strikethrough().gray(r.title):i=e===s?lt.cyan().underline(r.title):r.title,(r.selected?lt.green(Zt.radioOn):Zt.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[lt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(lt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(ib.hide),super.render();let e=[bc.symbol(this.done,this.aborted),lt.bold(this.msg),bc.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=lt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Dc(e,this.out.columns);}};yc.exports=yn;});var Ac=y((j1,Ec)=>{var Cc=re(),ob=ot(),_c=Me(),wc=_c.style,ab=_c.clear,Fc=ie(),ub=Fc.erase,xc=Fc.cursor,Cn=class extends ob{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
74
- `),this.close();}submit(){this.value=this.value||false,this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
75
- `),this.close();}_(e,r){return e.toLowerCase()==="y"?(this.value=true,this.submit()):e.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(xc.hide):this.out.write(ab(this.outputText,this.out.columns)),super.render(),this.outputText=[wc.symbol(this.done,this.aborted),Cc.bold(this.msg),wc.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Cc.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(ub.line+xc.to(0)+this.outputText));}};Ec.exports=Cn;});var Rc=y((G1,Oc)=>{Oc.exports={TextPrompt:pl(),SelectPrompt:bl(),TogglePrompt:_l(),DatePrompt:Ql(),NumberPrompt:oc(),MultiselectPrompt:mn(),AutocompletePrompt:gc(),AutocompleteMultiselectPrompt:vc(),ConfirmPrompt:Ac()};});var Tc=y(Sc=>{var ve=Sc,lb=Rc(),Ds=t=>t;function Ye(t,e,r={}){return new Promise((s,i)=>{let n=new lb[t](e),o=r.onAbort||Ds,a=r.onSubmit||Ds,u=r.onExit||Ds;n.on("state",e.onState||Ds),n.on("submit",h=>s(a(h))),n.on("exit",h=>s(u(h))),n.on("abort",h=>i(o(h)));})}ve.text=t=>Ye("TextPrompt",t);ve.password=t=>(t.style="password",ve.text(t));ve.invisible=t=>(t.style="invisible",ve.text(t));ve.number=t=>Ye("NumberPrompt",t);ve.date=t=>Ye("DatePrompt",t);ve.confirm=t=>Ye("ConfirmPrompt",t);ve.list=t=>{let e=t.separator||",";return Ye("TextPrompt",t,{onSubmit:r=>r.split(e).map(s=>s.trim())})};ve.toggle=t=>Ye("TogglePrompt",t);ve.select=t=>Ye("SelectPrompt",t);ve.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Ye("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};ve.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Ye("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var cb=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));ve.autocomplete=t=>(t.suggest=t.suggest||cb,t.choices=[].concat(t.choices||[]),Ye("AutocompletePrompt",t));});var Hc=y((U1,Nc)=>{function kc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,s);}return r}function Pc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kc(Object(r),true).forEach(function(s){hb(t,s,r[s]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kc(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s));});}return t}function hb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function db(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=fb(t))||e){r&&(t=r);var s=0,i=function(){};return {s:i,n:function(){return s>=t.length?{done:true}:{done:false,value:t[s++]}},e:function(h){throw h},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=true,o=false,a;return {s:function(){r=r.call(t);},n:function(){var h=r.next();return n=h.done,h},e:function(h){o=true,a=h;},f:function(){try{!n&&r.return!=null&&r.return();}finally{if(o)throw a}}}}function fb(t,e){if(t){if(typeof t=="string")return $c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $c(t,e)}}function $c(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function Ic(t,e,r,s,i,n,o){try{var a=t[n](o),u=a.value;}catch(h){r(h);return}a.done?e(u):Promise.resolve(u).then(s,i);}function Mc(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){Ic(n,s,i,o,a,"next",u);}function a(u){Ic(n,s,i,o,a,"throw",u);}o(void 0);})}}var wn=Tc(),pb=["suggest","format","onState","validate","onRender","type"],Bc=()=>{};function Ct(){return xn.apply(this,arguments)}function xn(){return xn=Mc(function*(t=[],{onSubmit:e=Bc,onCancel:r=Bc}={}){let s={},i=Ct._override||{};t=[].concat(t);let n,o,a,u,h,l,c=function(){var D=Mc(function*(x,b,v=false){if(!(!v&&x.validate&&x.validate(b)!==true))return x.format?yield x.format(b,s):b});return function(b,v){return D.apply(this,arguments)}}();var d=db(t),f;try{for(d.s();!(f=d.n()).done;){o=f.value;var m=o;if(u=m.name,h=m.type,typeof h=="function"&&(h=yield h(n,Pc({},s),o),o.type=h),!!h){for(let D in o){if(pb.includes(D))continue;let x=o[D];o[D]=typeof x=="function"?yield x(n,Pc({},s),l):x;}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");var g=o;if(u=g.name,h=g.type,wn[h]===void 0)throw new Error(`prompt type (${h}) is not defined`);if(i[o.name]!==void 0&&(n=yield c(o,i[o.name]),n!==void 0)){s[u]=n;continue}try{n=Ct._injected?mb(Ct._injected,o.initial):yield wn[h](o),s[u]=n=yield c(o,n,!0),a=yield e(o,n,s);}catch{a=!(yield r(o,s));}if(a)return s}}}catch(D){d.e(D);}finally{d.f();}return s}),xn.apply(this,arguments)}function mb(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function gb(t){Ct._injected=(Ct._injected||[]).concat(t);}function Db(t){Ct._override=Object.assign({},t);}Nc.exports=Object.assign(Ct,{prompt:Ct,prompts:wn,inject:gb,override:Db});});var Lc=y((W1,qc)=>{qc.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return "first";if(t.name==="c"||t.name==="d")return "abort";if(t.name==="e")return "last";if(t.name==="g")return "reset"}if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}};});var bs=y((K1,jc)=>{jc.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};});var Uc=y((Y1,Vc)=>{var bb=bs(),{erase:Gc,cursor:yb}=ie(),vb=t=>[...bb(t)].length;Vc.exports=function(t,e){if(!e)return Gc.line+yb.to(0);let r=0,s=t.split(/\r?\n/);for(let i of s)r+=1+Math.floor(Math.max(vb(i)-1,0)/e);return Gc.lines(r)};});var _n=y((J1,Wc)=>{var Or={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},Cb={arrowUp:Or.arrowUp,arrowDown:Or.arrowDown,arrowLeft:Or.arrowLeft,arrowRight:Or.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},wb=process.platform==="win32"?Cb:Or;Wc.exports=wb;});var Yc=y((z1,Kc)=>{var Qt=re(),Tt=_n(),Fn=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),xb=t=>Fn[t]||Fn.default,Rr=Object.freeze({aborted:Qt.red(Tt.cross),done:Qt.green(Tt.tick),exited:Qt.yellow(Tt.cross),default:Qt.cyan("?")}),_b=(t,e,r)=>e?Rr.aborted:r?Rr.exited:t?Rr.done:Rr.default,Fb=t=>Qt.gray(t?Tt.ellipsis:Tt.pointerSmall),Eb=(t,e)=>Qt.gray(t?e?Tt.pointerSmall:"+":Tt.line);Kc.exports={styles:Fn,render:xb,symbols:Rr,symbol:_b,delimiter:Fb,item:Eb};});var zc=y((X1,Jc)=>{var Ab=bs();Jc.exports=function(t,e){let r=String(Ab(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var Zc=y((Z1,Xc)=>{Xc.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
77
- `)).join(`
78
- `)};});var eh=y((Q1,Qc)=>{Qc.exports=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}};});var Be=y((eA,th)=>{th.exports={action:Lc(),clear:Uc(),style:Yc(),strip:bs(),figures:_n(),lines:zc(),wrap:Zc(),entriesToDisplay:eh()};});var ct=y((tA,sh)=>{var rh=N("readline"),{action:Ob}=Be(),Rb=N("events"),{beep:Sb,cursor:Tb}=ie(),kb=re(),En=class extends Rb{constructor(e={}){super(),this.firstRender=true,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=rh.createInterface({input:this.in,escapeCodeTimeout:50});rh.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(true);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let a=Ob(o,s);a===false?this._&&this._(n,o):typeof this[a]=="function"?this[a](o):this.bell();};this.close=()=>{this.out.write(Tb.show),this.in.removeListener("keypress",i),this.in.isTTY&&this.in.setRawMode(false),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",i);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(Sb);}render(){this.onRender(kb),this.firstRender&&(this.firstRender=false);}};sh.exports=En;});var nh=y((rA,ih)=>{var ys=re(),Pb=ct(),{erase:$b,cursor:Sr}=ie(),{style:An,clear:On,lines:Ib,figures:Mb}=Be(),Rn=class extends Pb{constructor(e={}){super(e),this.transform=An.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>true),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=On("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=true,this.rendered=ys.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(e)),this._value=e,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
79
- `),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=false),this.error=!e;}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=true,this.fire(),this.render();return}this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
80
- `),this.close();}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e);}_(e,r){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${e}${i}`,this.red=false,this.cursor=this.placeholder?0:s.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=false,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=false,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Sr.down(Ib(this.outputError,this.out.columns)-1)+On(this.outputError,this.out.columns)),this.out.write(On(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[An.symbol(this.done,this.aborted),ys.bold(this.msg),An.delimiter(this.done),this.red?ys.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
81
- `).reduce((e,r,s)=>e+`
82
- ${s?" ":Mb.pointerSmall} ${ys.red().italic(r)}`,"")),this.out.write($b.line+Sr.to(0)+this.outputText+Sr.save+this.outputError+Sr.restore+Sr.move(this.cursorOffset,0)));}};ih.exports=Rn;});var lh=y((sA,uh)=>{var ht=re(),Bb=ct(),{style:oh,clear:ah,figures:vs,wrap:Nb,entriesToDisplay:Hb}=Be(),{cursor:qb}=ie(),Sn=class extends Bb{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?s:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=ah("",this.out.columns),this.render();}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
83
- `),this.close();}submit(){this.selection.disabled?this.bell():(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
84
- `),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(qb.hide):this.out.write(ah(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=Hb(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[oh.symbol(this.done,this.aborted),ht.bold(this.msg),oh.delimiter(false),this.done?this.selection.title:this.selection.disabled?ht.yellow(this.warn):ht.gray(this.hint)].join(" "),!this.done){this.outputText+=`
85
- `;for(let s=e;s<r;s++){let i,n,o="",a=this.choices[s];s===e&&e>0?n=vs.arrowUp:s===r-1&&r<this.choices.length?n=vs.arrowDown:n=" ",a.disabled?(i=this.cursor===s?ht.gray().underline(a.title):ht.strikethrough().gray(a.title),n=(this.cursor===s?ht.bold().gray(vs.pointer)+" ":" ")+n):(i=this.cursor===s?ht.cyan().underline(a.title):a.title,n=(this.cursor===s?ht.cyan(vs.pointer)+" ":" ")+n,a.description&&this.cursor===s&&(o=` - ${a.description}`,(n.length+i.length+o.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(o=`
86
- `+Nb(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${i}${ht.gray(o)}
87
- `;}}this.out.write(this.outputText);}};uh.exports=Sn;});var fh=y((iA,dh)=>{var Cs=re(),Lb=ct(),{style:ch,clear:jb}=Be(),{cursor:hh,erase:Gb}=ie(),Tn=class extends Lb{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
88
- `),this.close();}submit(){this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
89
- `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=true;else if(e==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(hh.hide):this.out.write(jb(this.outputText,this.out.columns)),super.render(),this.outputText=[ch.symbol(this.done,this.aborted),Cs.bold(this.msg),ch.delimiter(this.done),this.value?this.inactive:Cs.cyan().underline(this.inactive),Cs.gray("/"),this.value?Cs.cyan().underline(this.active):this.active].join(" "),this.out.write(Gb.line+hh.to(0)+this.outputText));}};dh.exports=Tn;});var Je=y((nA,ph)=>{var kn=class t{constructor({token:e,date:r,parts:s,locales:i}){this.token=e,this.date=r||new Date,this.parts=s||[this],this.locales=i||{};}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,s)=>s>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((s,i)=>i>r&&s instanceof t)}toString(){return String(this.date)}};ph.exports=kn;});var gh=y((oA,mh)=>{var Vb=Je(),Pn=class extends Vb{constructor(e={}){super(e);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let e=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?e.toUpperCase():e}};mh.exports=Pn;});var bh=y((aA,Dh)=>{var Ub=Je(),Wb=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),$n=class extends Ub{constructor(e={}){super(e);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(e){this.date.setDate(parseInt(e.substr(-2)));}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+Wb(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};Dh.exports=$n;});var vh=y((uA,yh)=>{var Kb=Je(),In=class extends Kb{constructor(e={}){super(e);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(e){this.date.setHours(parseInt(e.substr(-2)));}toString(){let e=this.date.getHours();return /h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};yh.exports=In;});var wh=y((lA,Ch)=>{var Yb=Je(),Mn=class extends Yb{constructor(e={}){super(e);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Ch.exports=Mn;});var _h=y((cA,xh)=>{var Jb=Je(),Bn=class extends Jb{constructor(e={}){super(e);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)));}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};xh.exports=Bn;});var Eh=y((hA,Fh)=>{var zb=Je(),Nn=class extends zb{constructor(e={}){super(e);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e);}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};Fh.exports=Nn;});var Oh=y((dA,Ah)=>{var Xb=Je(),Hn=class extends Xb{constructor(e={}){super(e);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)));}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};Ah.exports=Hn;});var Sh=y((fA,Rh)=>{var Zb=Je(),qn=class extends Zb{constructor(e={}){super(e);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(e){this.date.setFullYear(e.substr(-4));}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};Rh.exports=qn;});var kh=y((pA,Th)=>{Th.exports={DatePart:Je(),Meridiem:gh(),Day:bh(),Hours:vh(),Milliseconds:wh(),Minutes:_h(),Month:Eh(),Seconds:Oh(),Year:Sh()};});var Hh=y((mA,Nh)=>{var Ln=re(),Qb=ct(),{style:Ph,clear:$h,figures:ey}=Be(),{erase:ty,cursor:Ih}=ie(),{DatePart:Mh,Meridiem:ry,Day:sy,Hours:iy,Milliseconds:ny,Minutes:oy,Month:ay,Seconds:uy,Year:ly}=kh(),cy=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Bh={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new sy(t),3:t=>new ay(t),4:t=>new ly(t),5:t=>new ry(t),6:t=>new iy(t),7:t=>new oy(t),8:t=>new uy(t),9:t=>new ny(t)},hy={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},jn=class extends Qb{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(hy,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=$h("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime());}set mask(e){let r;for(this.parts=[];r=cy.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in Bh?Bh[n]({token:r[n]||i,date:this.date,parts:this.parts,locales:this.locales}):r[n]||i);}let s=this.parts.reduce((i,n)=>(typeof n=="string"&&typeof i[i.length-1]=="string"?i[i.length-1]+=n:i.push(n),i),[]);this.parts.splice(0),this.parts.push(...s),this.reset();}moveCursor(e){this.typed="",this.cursor=e,this.fire();}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof Mh)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
90
- `),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=false),this.error=!e;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
91
- `),this.close();}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof Mh)),this.render();}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(Ih.hide):this.out.write($h(this.outputText,this.out.columns)),super.render(),this.outputText=[Ph.symbol(this.done,this.aborted),Ln.bold(this.msg),Ph.delimiter(false),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?Ln.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
92
- `).reduce((e,r,s)=>e+`
93
- ${s?" ":ey.pointerSmall} ${Ln.red().italic(r)}`,"")),this.out.write(ty.line+Ih.to(0)+this.outputText));}};Nh.exports=jn;});var Gh=y((gA,jh)=>{var ws=re(),dy=ct(),{cursor:xs,erase:fy}=ie(),{style:Gn,figures:py,clear:qh,lines:my}=Be(),gy=/[0-9]/,Vn=t=>t!==void 0,Lh=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},Un=class extends dy{constructor(e={}){super(e),this.transform=Gn.render(e.style),this.msg=e.message,this.initial=Vn(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=Vn(e.min)?e.min:-1/0,this.max=Vn(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(e){!e&&e!==0?(this.placeholder=true,this.rendered=ws.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${Lh(e,this.round)}`),this._value=Lh(e,this.round)),this.fire();}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||gy.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
94
- `),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=false),this.error=!e;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=true,this.aborted=false,this.error=false,this.fire(),this.render(),this.out.write(`
95
- `),this.close();}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(e,r){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(xs.down(my(this.outputError,this.out.columns)-1)+qh(this.outputError,this.out.columns)),this.out.write(qh(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Gn.symbol(this.done,this.aborted),ws.bold(this.msg),Gn.delimiter(this.done),!this.done||!this.done&&!this.placeholder?ws[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
96
- `).reduce((e,r,s)=>e+`
97
- ${s?" ":py.pointerSmall} ${ws.red().italic(r)}`,"")),this.out.write(fy.line+xs.to(0)+this.outputText+xs.save+this.outputError+xs.restore));}};jh.exports=Un;});var Kn=y((DA,Wh)=>{var ze=re(),{cursor:Dy}=ie(),by=ct(),{clear:Vh,figures:wt,style:Uh,wrap:yy,entriesToDisplay:vy}=Be(),Wn=class extends by{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=false,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?s:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=Vh("",this.out.columns),e.overrideRender||this.render();}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
98
- `),this.close();}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=true,this.render()):(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
99
- `),this.close());}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.value.length,this.render();}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render();}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.value[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true,this.render();}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render();}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
100
- Instructions:
101
- ${wt.arrowUp}/${wt.arrowDown}: Highlight option
102
- ${wt.arrowLeft}/${wt.arrowRight}/[space]: Toggle selection
103
- `+(this.maxChoices===void 0?` a: Toggle all
104
- `:"")+" enter/return: Complete answer":""}renderOption(e,r,s,i){let n=(r.selected?ze.green(wt.radioOn):wt.radioOff)+" "+i+" ",o,a;return r.disabled?o=e===s?ze.gray().underline(r.title):ze.strikethrough().gray(r.title):(o=e===s?ze.cyan().underline(r.title):r.title,e===s&&r.description&&(a=` - ${r.description}`,(n.length+o.length+a.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(a=`
105
- `+yy(r.description,{margin:n.length,width:this.out.columns})))),n+o+ze.gray(a||"")}paginateOptions(e){if(e.length===0)return ze.red("No matches for this query.");let{startIndex:r,endIndex:s}=vy(this.cursor,e.length,this.optionsPerPage),i,n=[];for(let o=r;o<s;o++)o===r&&r>0?i=wt.arrowUp:o===s-1&&s<e.length?i=wt.arrowDown:i=" ",n.push(this.renderOption(this.cursor,e[o],o,i));return `
106
- `+n.join(`
107
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[ze.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(ze.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Dy.hide),super.render();let e=[Uh.symbol(this.done,this.aborted),ze.bold(this.msg),Uh.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=ze.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=Vh(e,this.out.columns);}};Wh.exports=Wn;});var Xh=y((bA,zh)=>{var Tr=re(),Cy=ct(),{erase:wy,cursor:Kh}=ie(),{style:Yn,clear:Yh,figures:Jn,wrap:xy,entriesToDisplay:_y}=Be(),Jh=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),Fy=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),Ey=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},zn=class extends Cy{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Ey(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||false,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Yn.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Yh("",this.out.columns),this.complete(this.render),this.render();}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e;}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=Jh(this.suggestions,e):this.value=this.fallback.value,this.fire();}async complete(e){let r=this.completing=this.suggest(this.input,this.choices),s=await r;if(this.completing!==r)return;this.suggestions=s.map((n,o,a)=>({title:Fy(a,o),value:Jh(a,o),description:n.description})),this.completing=false;let i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),e&&e();}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
108
- `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
109
- `),this.close();}submit(){this.done=true,this.aborted=this.exited=false,this.fire(),this.render(),this.out.write(`
110
- `),this.close();}_(e,r){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${e}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(e,r,s,i){let n,o=s?Jn.arrowUp:i?Jn.arrowDown:" ",a=r?Tr.cyan().underline(e.title):e.title;return o=(r?Tr.cyan(Jn.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+a.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
111
- `+xy(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Tr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Kh.hide):this.out.write(Yh(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=_y(this.select,this.choices.length,this.limit);if(this.outputText=[Yn.symbol(this.done,this.aborted,this.exited),Tr.bold(this.msg),Yn.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let s=this.suggestions.slice(e,r).map((i,n)=>this.renderOption(i,this.select===n+e,n===0&&e>0,n+e===r-1&&r<this.choices.length)).join(`
112
- `);this.outputText+=`
113
- `+(s||Tr.gray(this.fallback.title));}this.out.write(wy.line+Kh.to(0)+this.outputText);}};zh.exports=zn;});var td=y((yA,ed)=>{var dt=re(),{cursor:Ay}=ie(),Oy=Kn(),{clear:Zh,style:Qh,figures:er}=Be(),Xn=class extends Oy{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=Zh("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let r=this.filteredOptions.findIndex(s=>s===e);this.cursor=r<0?0:r,this.render();}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=false,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=true,this.render();}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions();}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
114
- Instructions:
115
- ${er.arrowUp}/${er.arrowDown}: Highlight option
116
- ${er.arrowLeft}/${er.arrowRight}/[space]: Toggle selection
117
- [a,b,c]/delete: Filter choices
118
- enter/return: Complete answer
119
- `:""}renderCurrentInput(){return `
120
- Filtered results for: ${this.inputValue?this.inputValue:dt.gray("Enter something to filter")}
121
- `}renderOption(e,r,s){let i;return r.disabled?i=e===s?dt.gray().underline(r.title):dt.strikethrough().gray(r.title):i=e===s?dt.cyan().underline(r.title):r.title,(r.selected?dt.green(er.radioOn):er.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[dt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(dt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Ay.hide),super.render();let e=[Qh.symbol(this.done,this.aborted),dt.bold(this.msg),Qh.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=dt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Zh(e,this.out.columns);}};ed.exports=Xn;});var od=y((vA,nd)=>{var rd=re(),Ry=ct(),{style:sd,clear:Sy}=Be(),{erase:Ty,cursor:id}=ie(),Zn=class extends Ry{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
122
- `),this.close();}submit(){this.value=this.value||false,this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
123
- `),this.close();}_(e,r){return e.toLowerCase()==="y"?(this.value=true,this.submit()):e.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(id.hide):this.out.write(Sy(this.outputText,this.out.columns)),super.render(),this.outputText=[sd.symbol(this.done,this.aborted),rd.bold(this.msg),sd.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:rd.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Ty.line+id.to(0)+this.outputText));}};nd.exports=Zn;});var ud=y((CA,ad)=>{ad.exports={TextPrompt:nh(),SelectPrompt:lh(),TogglePrompt:fh(),DatePrompt:Hh(),NumberPrompt:Gh(),MultiselectPrompt:Kn(),AutocompletePrompt:Xh(),AutocompleteMultiselectPrompt:td(),ConfirmPrompt:od()};});var cd=y(ld=>{var Ce=ld,ky=ud(),_s=t=>t;function Xe(t,e,r={}){return new Promise((s,i)=>{let n=new ky[t](e),o=r.onAbort||_s,a=r.onSubmit||_s,u=r.onExit||_s;n.on("state",e.onState||_s),n.on("submit",h=>s(a(h))),n.on("exit",h=>s(u(h))),n.on("abort",h=>i(o(h)));})}Ce.text=t=>Xe("TextPrompt",t);Ce.password=t=>(t.style="password",Ce.text(t));Ce.invisible=t=>(t.style="invisible",Ce.text(t));Ce.number=t=>Xe("NumberPrompt",t);Ce.date=t=>Xe("DatePrompt",t);Ce.confirm=t=>Xe("ConfirmPrompt",t);Ce.list=t=>{let e=t.separator||",";return Xe("TextPrompt",t,{onSubmit:r=>r.split(e).map(s=>s.trim())})};Ce.toggle=t=>Xe("TogglePrompt",t);Ce.select=t=>Xe("SelectPrompt",t);Ce.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Xe("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};Ce.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Xe("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var Py=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));Ce.autocomplete=t=>(t.suggest=t.suggest||Py,t.choices=[].concat(t.choices||[]),Xe("AutocompletePrompt",t));});var fd=y((xA,dd)=>{var Qn=cd(),$y=["suggest","format","onState","validate","onRender","type"],hd=()=>{};async function xt(t=[],{onSubmit:e=hd,onCancel:r=hd}={}){let s={},i=xt._override||{};t=[].concat(t);let n,o,a,u,h,l,c=async(d,f,m=false)=>{if(!(!m&&d.validate&&d.validate(f)!==true))return d.format?await d.format(f,s):f};for(o of t)if({name:u,type:h}=o,typeof h=="function"&&(h=await h(n,{...s},o),o.type=h),!!h){for(let d in o){if($y.includes(d))continue;let f=o[d];o[d]=typeof f=="function"?await f(n,{...s},l):f;}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:u,type:h}=o,Qn[h]===void 0)throw new Error(`prompt type (${h}) is not defined`);if(i[o.name]!==void 0&&(n=await c(o,i[o.name]),n!==void 0)){s[u]=n;continue}try{n=xt._injected?Iy(xt._injected,o.initial):await Qn[h](o),s[u]=n=await c(o,n,!0),a=await e(o,n,s);}catch{a=!await r(o,s);}if(a)return s}return s}function Iy(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function My(t){xt._injected=(xt._injected||[]).concat(t);}function By(t){xt._override=Object.assign({},t);}dd.exports=Object.assign(xt,{prompt:xt,prompts:Qn,inject:My,override:By});});var tr=y((_A,pd)=>{function Ny(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return false;if(t[e]>r[e])return true}return false}pd.exports=Ny("8.6.0")?Hc():fd();});var Wf=y((mO,vw)=>{vw.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}};});var na=y((gO,Yf)=>{var $s=Object.assign({},Wf()),Kf=Object.keys($s);Object.defineProperty($s,"random",{get(){let t=Math.floor(Math.random()*Kf.length),e=Kf[t];return $s[e]}});Yf.exports=$s;});var xp=y((LR,ba)=>{var ax=Object.prototype.hasOwnProperty,ye="~";function jr(){}Object.create&&(jr.prototype=Object.create(null),new jr().__proto__||(ye=false));function ux(t,e,r){this.fn=t,this.context=e,this.once=r||false;}function wp(t,e,r,s,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var n=new ux(r,s||t,i),o=ye?ye+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],n]:t._events[o].push(n):(t._events[o]=n,t._eventsCount++),t}function Ks(t,e){--t._eventsCount===0?t._events=new jr:delete t._events[e];}function ge(){this._events=new jr,this._eventsCount=0;}ge.prototype.eventNames=function(){var e=[],r,s;if(this._eventsCount===0)return e;for(s in r=this._events)ax.call(r,s)&&e.push(ye?s.slice(1):s);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};ge.prototype.listeners=function(e){var r=ye?ye+e:e,s=this._events[r];if(!s)return [];if(s.fn)return [s.fn];for(var i=0,n=s.length,o=new Array(n);i<n;i++)o[i]=s[i].fn;return o};ge.prototype.listenerCount=function(e){var r=ye?ye+e:e,s=this._events[r];return s?s.fn?1:s.length:0};ge.prototype.emit=function(e,r,s,i,n,o){var a=ye?ye+e:e;if(!this._events[a])return false;var u=this._events[a],h=arguments.length,l,c;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,true),h){case 1:return u.fn.call(u.context),true;case 2:return u.fn.call(u.context,r),true;case 3:return u.fn.call(u.context,r,s),true;case 4:return u.fn.call(u.context,r,s,i),true;case 5:return u.fn.call(u.context,r,s,i,n),true;case 6:return u.fn.call(u.context,r,s,i,n,o),true}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l);}else {var d=u.length,f;for(c=0;c<d;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,true),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,r);break;case 3:u[c].fn.call(u[c].context,r,s);break;case 4:u[c].fn.call(u[c].context,r,s,i);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l);}}return true};ge.prototype.on=function(e,r,s){return wp(this,e,r,s,false)};ge.prototype.once=function(e,r,s){return wp(this,e,r,s,true)};ge.prototype.removeListener=function(e,r,s,i){var n=ye?ye+e:e;if(!this._events[n])return this;if(!r)return Ks(this,n),this;var o=this._events[n];if(o.fn)o.fn===r&&(!i||o.once)&&(!s||o.context===s)&&Ks(this,n);else {for(var a=0,u=[],h=o.length;a<h;a++)(o[a].fn!==r||i&&!o[a].once||s&&o[a].context!==s)&&u.push(o[a]);u.length?this._events[n]=u.length===1?u[0]:u:Ks(this,n);}return this};ge.prototype.removeAllListeners=function(e){var r;return e?(r=ye?ye+e:e,this._events[r]&&Ks(this,r)):(this._events=new jr,this._eventsCount=0),this};ge.prototype.off=ge.prototype.removeListener;ge.prototype.addListener=ge.prototype.on;ge.prefixed=ye;ge.EventEmitter=ge;typeof ba<"u"&&(ba.exports=ge);});var Fp=y((jR,_p)=>{_p.exports=function(e,r){if(r=r.split(":")[0],e=+e,!e)return false;switch(r){case "http":case "ws":return e!==80;case "https":case "wss":return e!==443;case "ftp":return e!==21;case "gopher":return e!==70;case "file":return false}return e!==0};});var Ys=y(Ap=>{var Dt=Ap,lx=N("url"),Ep=N("util")._extend,cx=Fp(),hx=/(^|,)\s*upgrade\s*($|,)/i,ya=/^https|wss/;Dt.isSSL=ya;Dt.setupOutgoing=function(t,e,r,s){t.port=e[s||"target"].port||(ya.test(e[s||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(a){t[a]=e[s||"target"][a];}),t.method=e.method||r.method,t.headers=Ep({},r.headers),e.headers&&Ep(t.headers,e.headers),e.auth&&(t.auth=e.auth),e.ca&&(t.ca=e.ca),ya.test(e[s||"target"].protocol)&&(t.rejectUnauthorized=typeof e.secure>"u"?true:e.secure),t.agent=e.agent||false,t.localAddress=e.localAddress,t.agent||(t.headers=t.headers||{},(typeof t.headers.connection!="string"||!hx.test(t.headers.connection))&&(t.headers.connection="close"));var i=e[s||"target"],n=i&&e.prependPath!==false&&i.path||"",o=e.toProxy?r.url:lx.parse(r.url).path||"";return o=e.ignorePath?"":o,t.path=Dt.urlJoin(n,o),e.changeOrigin&&(t.headers.host=cx(t.port,e[s||"target"].protocol)&&!dx(t.host)?t.host+":"+t.port:t.host),t};Dt.setupSocket=function(t){return t.setTimeout(0),t.setNoDelay(true),t.setKeepAlive(true,0),t};Dt.getPort=function(t){var e=t.headers.host?t.headers.host.match(/:(\d+)/):"";return e?e[1]:Dt.hasEncryptedConnection(t)?"443":"80"};Dt.hasEncryptedConnection=function(t){return !!(t.connection.encrypted||t.connection.pair)};Dt.urlJoin=function(){var t=Array.prototype.slice.call(arguments),e=t.length-1,r=t[e],s=r.split("?"),i;return t[e]=s.shift(),i=[t.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],i.push.apply(i,s),i.join("?")};Dt.rewriteCookieProperty=function t(e,r,s){return Array.isArray(e)?e.map(function(i){return t(i,r,s)}):e.replace(new RegExp("(;\\s*"+s+"=)([^;]+)","i"),function(i,n,o){var a;if(o in r)a=r[o];else if("*"in r)a=r["*"];else return i;return a?n+a:""})};function dx(t){return !!~t.indexOf(":")}});var Tp=y((VR,Sp)=>{var Op=N("url"),Rp=Ys(),fx=/^201|30(1|2|7|8)$/;Sp.exports={removeChunked:function(e,r,s){e.httpVersion==="1.0"&&delete s.headers["transfer-encoding"];},setConnection:function(e,r,s){e.httpVersion==="1.0"?s.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!s.headers.connection&&(s.headers.connection=e.headers.connection||"keep-alive");},setRedirectHostRewrite:function(e,r,s,i){if((i.hostRewrite||i.autoRewrite||i.protocolRewrite)&&s.headers.location&&fx.test(s.statusCode)){var n=Op.parse(i.target),o=Op.parse(s.headers.location);if(n.host!=o.host)return;i.hostRewrite?o.host=i.hostRewrite:i.autoRewrite&&(o.host=e.headers.host),i.protocolRewrite&&(o.protocol=i.protocolRewrite),s.headers.location=o.format();}},writeHeaders:function(e,r,s,i){var n=i.cookieDomainRewrite,o=i.cookiePathRewrite,a=i.preserveHeaderKeyCase,u,h=function(d,f){f!=null&&(n&&d.toLowerCase()==="set-cookie"&&(f=Rp.rewriteCookieProperty(f,n,"domain")),o&&d.toLowerCase()==="set-cookie"&&(f=Rp.rewriteCookieProperty(f,o,"path")),r.setHeader(String(d).trim(),f));};if(typeof n=="string"&&(n={"*":n}),typeof o=="string"&&(o={"*":o}),a&&s.rawHeaders!=null){u={};for(var l=0;l<s.rawHeaders.length;l+=2){var c=s.rawHeaders[l];u[c.toLowerCase()]=c;}}Object.keys(s.headers).forEach(function(d){var f=s.headers[d];a&&u&&(d=u[d]||d),h(d,f);});},writeStatusCode:function(e,r,s){s.statusMessage?(r.statusCode=s.statusCode,r.statusMessage=s.statusMessage):r.statusCode=s.statusCode;}};});var Pp=y((UR,kp)=>{var hr=1e3,dr=hr*60,fr=dr*60,jt=fr*24,px=jt*7,mx=jt*365.25;kp.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return gx(t);if(r==="number"&&isFinite(t))return e.long?bx(t):Dx(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function gx(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case "years":case "year":case "yrs":case "yr":case "y":return r*mx;case "weeks":case "week":case "w":return r*px;case "days":case "day":case "d":return r*jt;case "hours":case "hour":case "hrs":case "hr":case "h":return r*fr;case "minutes":case "minute":case "mins":case "min":case "m":return r*dr;case "seconds":case "second":case "secs":case "sec":case "s":return r*hr;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return r;default:return}}}}function Dx(t){var e=Math.abs(t);return e>=jt?Math.round(t/jt)+"d":e>=fr?Math.round(t/fr)+"h":e>=dr?Math.round(t/dr)+"m":e>=hr?Math.round(t/hr)+"s":t+"ms"}function bx(t){var e=Math.abs(t);return e>=jt?Js(t,e,jt,"day"):e>=fr?Js(t,e,fr,"hour"):e>=dr?Js(t,e,dr,"minute"):e>=hr?Js(t,e,hr,"second"):t+" ms"}function Js(t,e,r,s){var i=e>=r*1.5;return Math.round(t/r)+" "+s+(i?"s":"")}});var va=y((WR,$p)=>{function yx(t){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=a,r.humanize=Pp(),r.destroy=h,Object.keys(t).forEach(l=>{r[l]=t[l];}),r.names=[],r.skips=[],r.formatters={};function e(l){let c=0;for(let d=0;d<l.length;d++)c=(c<<5)-c+l.charCodeAt(d),c|=0;return r.colors[Math.abs(c)%r.colors.length]}r.selectColor=e;function r(l){let c,d=null,f,m;function g(...D){if(!g.enabled)return;let x=g,b=Number(new Date),v=b-(c||b);x.diff=v,x.prev=c,x.curr=b,c=b,D[0]=r.coerce(D[0]),typeof D[0]!="string"&&D.unshift("%O");let C=0;D[0]=D[0].replace(/%([a-zA-Z%])/g,(R,P)=>{if(R==="%%")return "%";C++;let A=r.formatters[P];if(typeof A=="function"){let T=D[C];R=A.call(x,T),D.splice(C,1),C--;}return R}),r.formatArgs.call(x,D),(x.log||r.log).apply(x,D);}return g.namespace=l,g.useColors=r.useColors(),g.color=r.selectColor(l),g.extend=s,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:true,configurable:false,get:()=>d!==null?d:(f!==r.namespaces&&(f=r.namespaces,m=r.enabled(l)),m),set:D=>{d=D;}}),typeof r.init=="function"&&r.init(g),g}function s(l,c){let d=r(this.namespace+(typeof c>"u"?":":c)+l);return d.log=this.log,d}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let c=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of c)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d);}function n(l,c){let d=0,f=0,m=-1,g=0;for(;d<l.length;)if(f<c.length&&(c[f]===l[d]||c[f]==="*"))c[f]==="*"?(m=f,g=d,f++):(d++,f++);else if(m!==-1)f=m+1,g++,d=g;else return false;for(;f<c.length&&c[f]==="*";)f++;return f===c.length}function o(){let l=[...r.names,...r.skips.map(c=>"-"+c)].join(",");return r.enable(""),l}function a(l){for(let c of r.skips)if(n(l,c))return false;for(let c of r.names)if(n(l,c))return true;return false}function u(l){return l instanceof Error?l.stack||l.message:l}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");}return r.enable(r.load()),r}$p.exports=yx;});var Ip=y((xe,zs)=>{xe.formatArgs=Cx;xe.save=wx;xe.load=xx;xe.useColors=vx;xe.storage=_x();xe.destroy=(()=>{let t=false;return ()=>{t||(t=true,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();xe.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function vx(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return true;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return false;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Cx(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+zs.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(s=r));}),t.splice(s,0,e);}xe.log=console.debug||console.log||(()=>{});function wx(t){try{t?xe.storage.setItem("debug",t):xe.storage.removeItem("debug");}catch{}}function xx(){let t;try{t=xe.storage.getItem("debug")||xe.storage.getItem("DEBUG");}catch{}return !t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function _x(){try{return localStorage}catch{}}zs.exports=va()(xe);var{formatters:Fx}=zs.exports;Fx.j=function(t){try{return JSON.stringify(t)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});var Bp=y((KR,Mp)=>{Mp.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)};});var qp=y((YR,Hp)=>{var Ex=N("os"),Np=N("tty"),$e=Bp(),{env:fe}=process,At;$e("no-color")||$e("no-colors")||$e("color=false")||$e("color=never")?At=0:($e("color")||$e("colors")||$e("color=true")||$e("color=always"))&&(At=1);"FORCE_COLOR"in fe&&(fe.FORCE_COLOR==="true"?At=1:fe.FORCE_COLOR==="false"?At=0:At=fe.FORCE_COLOR.length===0?1:Math.min(parseInt(fe.FORCE_COLOR,10),3));function Ca(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function wa(t,e){if(At===0)return 0;if($e("color=16m")||$e("color=full")||$e("color=truecolor"))return 3;if($e("color=256"))return 2;if(t&&!e&&At===void 0)return 0;let r=At||0;if(fe.TERM==="dumb")return r;if(process.platform==="win32"){let s=Ex.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in fe)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(s=>s in fe)||fe.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in fe)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(fe.TEAMCITY_VERSION)?1:0;if(fe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in fe){let s=parseInt((fe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(fe.TERM_PROGRAM){case "iTerm.app":return s>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(fe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(fe.TERM)||"COLORTERM"in fe?1:r}function Ax(t){let e=wa(t,t&&t.isTTY);return Ca(e)}Hp.exports={supportsColor:Ax,stdout:Ca(wa(true,Np.isatty(1))),stderr:Ca(wa(true,Np.isatty(2)))};});var jp=y((pe,Zs)=>{var Ox=N("tty"),Xs=N("util");pe.init=Ix;pe.log=kx;pe.formatArgs=Sx;pe.save=Px;pe.load=$x;pe.useColors=Rx;pe.destroy=Xs.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");pe.colors=[6,2,3,4,5,1];try{let t=qp();t&&(t.stderr||t).level>=2&&(pe.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]);}catch{}pe.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,n)=>n.toUpperCase()),s=process.env[e];return /^(yes|on|true|enabled)$/i.test(s)?s=true:/^(no|off|false|disabled)$/i.test(s)?s=false:s==="null"?s=null:s=Number(s),t[r]=s,t},{});function Rx(){return "colors"in pe.inspectOpts?!!pe.inspectOpts.colors:Ox.isatty(process.stderr.fd)}function Sx(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,i="\x1B[3"+(s<8?s:"8;5;"+s),n=` ${i};1m${e} \x1B[0m`;t[0]=n+t[0].split(`
124
- `).join(`
125
- `+n),t.push(i+"m+"+Zs.exports.humanize(this.diff)+"\x1B[0m");}else t[0]=Tx()+e+" "+t[0];}function Tx(){return pe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function kx(...t){return process.stderr.write(Xs.formatWithOptions(pe.inspectOpts,...t)+`
126
- `)}function Px(t){t?process.env.DEBUG=t:delete process.env.DEBUG;}function $x(){return process.env.DEBUG}function Ix(t){t.inspectOpts={};let e=Object.keys(pe.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=pe.inspectOpts[e[r]];}Zs.exports=va()(pe);var{formatters:Lp}=Zs.exports;Lp.o=function(t){return this.inspectOpts.colors=this.useColors,Xs.inspect(t,this.inspectOpts).split(`
127
- `).map(e=>e.trim()).join(" ")};Lp.O=function(t){return this.inspectOpts.colors=this.useColors,Xs.inspect(t,this.inspectOpts)};});var _a=y((JR,xa)=>{typeof process>"u"||process.type==="renderer"||process.browser===true||process.__nwjs?xa.exports=Ip():xa.exports=jp();});var Vp=y((zR,Gp)=>{var Gr;Gp.exports=function(){if(!Gr){try{Gr=_a()("follow-redirects");}catch{}typeof Gr!="function"&&(Gr=function(){});}Gr.apply(null,arguments);};});var Jp=y((XR,Ma)=>{var Ur=N("url"),Vr=Ur.URL,Mx=N("http"),Bx=N("https"),Ra=N("stream").Writable,Sa=N("assert"),Up=Vp();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",s=Vt(Error.captureStackTrace);!e&&(r||!s)&&console.warn("The follow-redirects package should be excluded from browser builds.");})();var Ta=false;try{Sa(new Vr(""));}catch(t){Ta=t.code==="ERR_INVALID_URL";}var Nx=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ka=["abort","aborted","connect","error","socket","timeout"],Pa=Object.create(null);ka.forEach(function(t){Pa[t]=function(e,r,s){this._redirectable.emit(t,e,r,s);};});var Ea=Wr("ERR_INVALID_URL","Invalid URL",TypeError),Aa=Wr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Hx=Wr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Aa),qx=Wr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Lx=Wr("ERR_STREAM_WRITE_AFTER_END","write after end"),jx=Ra.prototype.destroy||Kp;function _e(t,e){Ra.call(this),this._sanitizeOptions(t),this._options=t,this._ended=false,this._ending=false,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(s){try{r._processResponse(s);}catch(i){r.emit("error",i instanceof Aa?i:new Aa({cause:i}));}},this._performRequest();}_e.prototype=Object.create(Ra.prototype);_e.prototype.abort=function(){Ia(this._currentRequest),this._currentRequest.abort(),this.emit("abort");};_e.prototype.destroy=function(t){return Ia(this._currentRequest,t),jx.call(this,t),this};_e.prototype.write=function(t,e,r){if(this._ending)throw new Lx;if(!Gt(t)&&!Ux(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Vt(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new qx),this.abort());};_e.prototype.end=function(t,e,r){if(Vt(t)?(r=t,t=e=null):Vt(e)&&(r=e,e=null),!t)this._ended=this._ending=true,this._currentRequest.end(null,null,r);else {var s=this,i=this._currentRequest;this.write(t,e,function(){s._ended=true,i.end(null,null,r);}),this._ending=true;}};_e.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e);};_e.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t);};_e.prototype.setTimeout=function(t,e){var r=this;function s(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy);}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),n();},t),s(o);}function n(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",n),r.removeListener("error",n),r.removeListener("response",n),r.removeListener("close",n),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i);}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",s),this.on("abort",n),this.on("error",n),this.on("response",n),this.on("close",n),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){_e.prototype[t]=function(e,r){return this._currentRequest[t](e,r)};});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(_e.prototype,t,{get:function(){return this._currentRequest[t]}});});_e.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e));}};_e.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r];}var s=this._currentRequest=e.request(this._options,this._onNativeResponse);s._redirectable=this;for(var i of ka)s.on(i,Pa[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ur.format(this._options):this._options.path,this._isRedirect){var n=0,o=this,a=this._requestBodyBuffers;(function u(h){if(s===o._currentRequest)if(h)o.emit("error",h);else if(n<a.length){var l=a[n++];s.finished||s.write(l.data,l.encoding,u);}else o._ended&&s.end();})();}};_e.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===false||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(Ia(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Hx;var s,i=this._options.beforeRedirect;i&&(s=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var n=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Fa(/^content-/i,this._options.headers));var o=Fa(/^host$/i,this._options.headers),a=$a(this._currentUrl),u=o||a.host,h=/^\w+:/.test(r)?this._currentUrl:Ur.format(Object.assign(a,{host:u})),l=Gx(r,h);if(Up("redirecting to",l.href),this._isRedirect=true,Oa(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!Vx(l.host,u))&&Fa(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Vt(i)){var c={headers:t.headers,statusCode:e},d={url:h,method:n,headers:s};i(this._options,c,d),this._sanitizeOptions(this._options);}this._performRequest();};function Wp(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(s){var i=s+":",n=r[i]=t[s],o=e[s]=Object.create(n);function a(h,l,c){return Wx(h)?h=Oa(h):Gt(h)?h=Oa($a(h)):(c=l,l=Yp(h),h={protocol:i}),Vt(l)&&(c=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},h,l),l.nativeProtocols=r,!Gt(l.host)&&!Gt(l.hostname)&&(l.hostname="::1"),Sa.equal(l.protocol,i,"protocol mismatch"),Up("options",l),new _e(l,c)}function u(h,l,c){var d=o.request(h,l,c);return d.end(),d}Object.defineProperties(o,{request:{value:a,configurable:true,enumerable:true,writable:true},get:{value:u,configurable:true,enumerable:true,writable:true}});}),e}function Kp(){}function $a(t){var e;if(Ta)e=new Vr(t);else if(e=Yp(Ur.parse(t)),!Gt(e.protocol))throw new Ea({input:t});return e}function Gx(t,e){return Ta?new Vr(t,e):$a(Ur.resolve(e,t))}function Yp(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Ea({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Ea({input:t.href||t});return t}function Oa(t,e){var r=e||{};for(var s of Nx)r[s]=t[s];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function Fa(t,e){var r;for(var s in e)t.test(s)&&(r=e[s],delete e[s]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Wr(t,e,r){function s(i){Vt(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e;}return s.prototype=new(r||Error),Object.defineProperties(s.prototype,{constructor:{value:s,enumerable:false},name:{value:"Error ["+t+"]",enumerable:false}}),s}function Ia(t,e){for(var r of ka)t.removeListener(r,Pa[r]);t.on("error",Kp),t.destroy(e);}function Vx(t,e){Sa(Gt(t)&&Gt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Gt(t){return typeof t=="string"||t instanceof String}function Vt(t){return typeof t=="function"}function Ux(t){return typeof t=="object"&&"length"in t}function Wx(t){return Vr&&t instanceof Vr}Ma.exports=Wp({http:Mx,https:Bx});Ma.exports.wrap=Wp;});var Xp=y((ZR,zp)=>{var Kx=N("http"),Yx=N("https"),Kr=Tp(),Qs=Ys(),Jx=Jp();Kr=Object.keys(Kr).map(function(t){return Kr[t]});var zx={http:Kx,https:Yx};zp.exports={deleteLength:function(e,r,s){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"]);},timeout:function(e,r,s){s.timeout&&e.socket.setTimeout(s.timeout);},XHeaders:function(e,r,s){if(s.xfwd){var i=e.isSpdy||Qs.hasEncryptedConnection(e),n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Qs.getPort(e),proto:i?"https":"http"};["for","port","proto"].forEach(function(o){e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o];}),e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||"";}},stream:function(e,r,s,i,n,o){n.emit("start",e,r,s.target||s.forward);var a=s.followRedirects?Jx:zx,u=a.http,h=a.https;if(s.forward){var l=(s.forward.protocol==="https:"?h:u).request(Qs.setupOutgoing(s.ssl||{},s,e,"forward")),c=m(l,s.forward);if(e.on("error",c),l.on("error",c),(s.buffer||e).pipe(l),!s.target)return r.end()}var d=(s.target.protocol==="https:"?h:u).request(Qs.setupOutgoing(s.ssl||{},s,e));d.on("socket",function(g){n&&!d.getHeader("expect")&&n.emit("proxyReq",d,e,r,s);}),s.proxyTimeout&&d.setTimeout(s.proxyTimeout,function(){d.abort();}),e.on("aborted",function(){d.abort();});var f=m(d,s.target);e.on("error",f),d.on("error",f);function m(g,D){return function(b){if(e.socket.destroyed&&b.code==="ECONNRESET")return n.emit("econnreset",b,e,r,D),g.abort();o?o(b,e,r,D):n.emit("error",b,e,r,D);}}(s.buffer||e).pipe(d),d.on("response",function(g){if(n&&n.emit("proxyRes",g,e,r),!r.headersSent&&!s.selfHandleResponse)for(var D=0;D<Kr.length&&!Kr[D](e,r,g,s);D++);r.finished?n&&n.emit("end",e,r,g):(g.on("end",function(){n&&n.emit("end",e,r,g);}),s.selfHandleResponse||g.pipe(r));});}};});var Qp=y((QR,Zp)=>{var Xx=N("http"),Zx=N("https"),pr=Ys();Zp.exports={checkMethodAndHeader:function(e,r){if(e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return r.destroy(),true},XHeaders:function(e,r,s){if(s.xfwd){var i={for:e.connection.remoteAddress||e.socket.remoteAddress,port:pr.getPort(e),proto:pr.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach(function(n){e.headers["x-forwarded-"+n]=(e.headers["x-forwarded-"+n]||"")+(e.headers["x-forwarded-"+n]?",":"")+i[n];});}},stream:function(e,r,s,i,n,o){var a=function(l,c){return Object.keys(c).reduce(function(d,f){var m=c[f];if(!Array.isArray(m))return d.push(f+": "+m),d;for(var g=0;g<m.length;g++)d.push(f+": "+m[g]);return d},[l]).join(`\r
128
- `)+`\r
129
- \r
130
- `};pr.setupSocket(r),i&&i.length&&r.unshift(i);var u=(pr.isSSL.test(s.target.protocol)?Zx:Xx).request(pr.setupOutgoing(s.ssl||{},s,e));return n&&n.emit("proxyReqWs",u,e,r,s,i),u.on("error",h),u.on("response",function(l){l.upgrade||(r.write(a("HTTP/"+l.httpVersion+" "+l.statusCode+" "+l.statusMessage,l.headers)),l.pipe(r));}),u.on("upgrade",function(l,c,d){c.on("error",h),c.on("end",function(){n.emit("close",l,c,d);}),r.on("error",function(){c.end();}),pr.setupSocket(c),d&&d.length&&c.unshift(d),r.write(a("HTTP/1.1 101 Switching Protocols",l.headers)),c.pipe(r).pipe(c),n.emit("open",c),n.emit("proxySocket",c);}),u.end();function h(l){o?o(l,e,r):n.emit("error",l,e,r),r.end();}}};});var om=y((eS,nm)=>{var sm=nm.exports,em=N("util")._extend,Qx=N("url").parse,im=xp(),e_=N("http"),t_=N("https"),tm=Xp(),rm=Qp();sm.Server=Ut;function Ba(t){return function(e){return function(r,s){var i=t==="ws"?this.wsPasses:this.webPasses,n=[].slice.call(arguments),o=n.length-1,a,u;typeof n[o]=="function"&&(u=n[o],o--);var h=e;if(!(n[o]instanceof Buffer)&&n[o]!==s&&(h=em({},e),em(h,n[o]),o--),n[o]instanceof Buffer&&(a=n[o]),["target","forward"].forEach(function(c){typeof h[c]=="string"&&(h[c]=Qx(h[c]));}),!h.target&&!h.forward)return this.emit("error",new Error("Must provide a proper URL as target"));for(var l=0;l<i.length&&!i[l](r,s,h,a,this,u);l++);}}}sm.createRightProxy=Ba;function Ut(t){im.call(this),t=t||{},t.prependPath=t.prependPath!==false,this.web=this.proxyRequest=Ba("web")(t),this.ws=this.proxyWebsocketRequest=Ba("ws")(t),this.options=t,this.webPasses=Object.keys(tm).map(function(e){return tm[e]}),this.wsPasses=Object.keys(rm).map(function(e){return rm[e]}),this.on("error",this.onError,this);}N("util").inherits(Ut,im);Ut.prototype.onError=function(t){if(this.listeners("error").length===1)throw t};Ut.prototype.listen=function(t,e){var r=this,s=function(i,n){r.web(i,n);};return this._server=this.options.ssl?t_.createServer(this.options.ssl,s):e_.createServer(s),this.options.ws&&this._server.on("upgrade",function(i,n,o){r.ws(i,n,o);}),this._server.listen(t,e),this};Ut.prototype.close=function(t){var e=this;this._server&&this._server.close(r);function r(){e._server=null,t&&t.apply(null,arguments);}};Ut.prototype.before=function(t,e,r){if(t!=="ws"&&t!=="web")throw new Error("type must be `web` or `ws`");var s=t==="ws"?this.wsPasses:this.webPasses,i=false;if(s.forEach(function(n,o){n.name===e&&(i=o);}),i===false)throw new Error("No such pass");s.splice(i,0,r);};Ut.prototype.after=function(t,e,r){if(t!=="ws"&&t!=="web")throw new Error("type must be `web` or `ws`");var s=t==="ws"?this.wsPasses:this.webPasses,i=false;if(s.forEach(function(n,o){n.name===e&&(i=o);}),i===false)throw new Error("No such pass");s.splice(i++,0,r);};});var um=y((tS,am)=>{var Yr=om().Server;function Na(t){return new Yr(t)}Yr.createProxyServer=Na;Yr.createServer=Na;Yr.createProxy=Na;am.exports=Yr;});var cm=y((rS,lm)=>{lm.exports=um();});var ti=y(ei=>{Object.defineProperty(ei,"__esModule",{value:true});ei.ERRORS=void 0;var hm;(function(t){t.ERR_CONFIG_FACTORY_TARGET_MISSING='[HPM] Missing "target" option. Example: {target: "http://www.example.org"}',t.ERR_CONTEXT_MATCHER_GENERIC='[HPM] Invalid pathFilter. Expecting something like: "/api" or ["/api", "/ajax"]',t.ERR_CONTEXT_MATCHER_INVALID_ARRAY='[HPM] Invalid pathFilter. Plain paths (e.g. "/api") can not be mixed with globs (e.g. "/api/**"). Expecting something like: ["/api", "/ajax"] or ["/api/**", "!**.html"].',t.ERR_PATH_REWRITER_CONFIG="[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";})(hm||(ei.ERRORS=hm={}));});var dm=y(Ha=>{Object.defineProperty(Ha,"__esModule",{value:true});Ha.verifyConfig=s_;var r_=ti();function s_(t){if(!t.target&&!t.router)throw new Error(r_.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING)}});var bt=y(ri=>{Object.defineProperty(ri,"__esModule",{value:true});ri.Debug=void 0;var i_=_a();ri.Debug=i_("http-proxy-middleware");});var fm=y(si=>{Object.defineProperty(si,"__esModule",{value:true});si.debugProxyErrorsPlugin=void 0;var n_=bt(),Wt=n_.Debug.extend("debug-proxy-errors-plugin"),o_=t=>{t.on("error",(e,r,s,i)=>{Wt(`http-proxy error event:
131
- %O`,e);}),t.on("proxyReq",(e,r,s)=>{s.on("error",i=>{Wt(`Socket error in proxyReq event:
132
- %O`,i);});}),t.on("proxyRes",(e,r,s)=>{s.on("close",()=>{s.writableEnded||(Wt("Destroying proxyRes in proxyRes close event"),e.destroy());});}),t.on("proxyReqWs",(e,r,s)=>{s.on("error",i=>{Wt(`Socket error in proxyReqWs event:
133
- %O`,i);});}),t.on("open",e=>{e.on("error",r=>{Wt(`Socket error in open event:
134
- %O`,r);});}),t.on("close",(e,r,s)=>{r.on("error",i=>{Wt(`Socket error in close event:
135
- %O`,i);});}),t.on("econnreset",(e,r,s,i)=>{Wt(`http-proxy econnreset event:
136
- %O`,e);});};si.debugProxyErrorsPlugin=o_;});var pm=y(qa=>{Object.defineProperty(qa,"__esModule",{value:true});qa.getStatusCode=a_;function a_(t){let e;if(/HPE_INVALID/.test(t))e=502;else switch(t){case "ECONNRESET":case "ENOTFOUND":case "ECONNREFUSED":case "ETIMEDOUT":e=504;break;default:e=500;break}return e}});var mm=y(ii=>{Object.defineProperty(ii,"__esModule",{value:true});ii.errorResponsePlugin=void 0;var u_=pm();function l_(t){return t&&typeof t.writeHead=="function"}function c_(t){return t&&typeof t.write=="function"&&!("writeHead"in t)}var h_=(t,e)=>{t.on("error",(r,s,i,n)=>{if(!s&&!i)throw r;if(l_(i)){if(!i.headersSent){let a=(0, u_.getStatusCode)(r.code);i.writeHead(a);}let o=s.headers&&s.headers.host;i.end(`Error occurred while trying to proxy: ${o}${s.url}`);}else c_(i)&&i.destroy();});};ii.errorResponsePlugin=h_;});var ni=y(La=>{Object.defineProperty(La,"__esModule",{value:true});La.getLogger=f_;var d_={info:()=>{},warn:()=>{},error:()=>{}};function f_(t){return t.logger||d_}});var gm=y(ja=>{Object.defineProperty(ja,"__esModule",{value:true});ja.getPort=p_;function p_(t){return Object.keys(t||{})?.[0]?.split(":")[1]}});var bm=y(oi=>{Object.defineProperty(oi,"__esModule",{value:true});oi.loggerPlugin=void 0;var Dm=N("url"),m_=ni(),g_=gm(),D_=(t,e)=>{let r=(0, m_.getLogger)(e);t.on("error",(s,i,n,o)=>{let u=`${i?.headers?.host}${i?.url}`,h=`${o?.href}`;r.error("[HPM] Error occurred while proxying request %s to %s [%s] (%s)",u,h,s.code||s,"https://nodejs.org/api/errors.html#errors_common_system_errors");}),t.on("proxyRes",(s,i,n)=>{let o=i.originalUrl??`${i.baseUrl||""}${i.url}`,a;try{let l=(0,g_.getPort)(s.req?.agent?.sockets),c={protocol:s.req.protocol,host:s.req.host,pathname:s.req.path};a=new Dm.URL(`${c.protocol}//${c.host}${c.pathname}`),l&&(a.port=l);}catch{a=new Dm.URL(e.target),a.pathname=s.req.path;}let u=a.toString(),h=`[HPM] ${i.method} ${o} -> ${u} [${s.statusCode}]`;r.info(h);}),t.on("open",s=>{r.info("[HPM] Client connected: %o",s.address());}),t.on("close",(s,i,n)=>{r.info("[HPM] Client disconnected: %o",i.address());});};oi.loggerPlugin=D_;});var ai=y(Ga=>{Object.defineProperty(Ga,"__esModule",{value:true});Ga.getFunctionName=b_;function b_(t){return t.name||"[anonymous Function]"}});var ym=y(ui=>{Object.defineProperty(ui,"__esModule",{value:true});ui.proxyEventsPlugin=void 0;var y_=bt(),v_=ai(),C_=y_.Debug.extend("proxy-events-plugin"),w_=(t,e)=>{Object.entries(e.on||{}).forEach(([r,s])=>{C_(`register event handler: "${r}" -> "${(0, v_.getFunctionName)(s)}"`),t.on(r,s);});};ui.proxyEventsPlugin=w_;});var Va=y(et=>{var x_=et&&et.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),li=et&&et.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&x_(e,t,r);};Object.defineProperty(et,"__esModule",{value:true});li(fm(),et);li(mm(),et);li(bm(),et);li(ym(),et);});var vm=y(Ua=>{Object.defineProperty(Ua,"__esModule",{value:true});Ua.getPlugins=__;var ci=Va();function __(t){let e=t.on?.error?[]:[ci.errorResponsePlugin],r=t.ejectPlugins?[]:[ci.debugProxyErrorsPlugin,ci.proxyEventsPlugin,ci.loggerPlugin,...e],s=t.plugins??[];return [...r,...s]}});var wm=y((gS,Cm)=>{Cm.exports=function(e){if(typeof e!="string"||e==="")return false;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return true;e=e.slice(r.index+r[0].length);}return false};});var Fm=y((DS,_m)=>{var F_=wm(),xm={"{":"}","(":")","[":"]"},E_=function(t){if(t[0]==="!")return true;for(var e=0,r=-2,s=-2,i=-2,n=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||s!==-1&&t[e]==="["&&t[e+1]!=="]"&&(s<e&&(s=t.indexOf("]",e)),s>e&&(o===-1||o>s||(o=t.indexOf("\\",e),o===-1||o>s)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||n!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(n=t.indexOf(")",e),n>e&&(o=t.indexOf("\\",e),o===-1||o>n))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(n=t.indexOf(")",r),n>r&&(o=t.indexOf("\\",r),o===-1||o>n))))return true;if(t[e]==="\\"){var a=t[e+1];e+=2;var u=xm[a];if(u){var h=t.indexOf(u,e);h!==-1&&(e=h+1);}if(t[e]==="!")return true}else e++;}return false},A_=function(t){if(t[0]==="!")return true;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return true;if(t[e]==="\\"){var r=t[e+1];e+=2;var s=xm[r];if(s){var i=t.indexOf(s,e);i!==-1&&(e=i+1);}if(t[e]==="!")return true}else e++;}return false};_m.exports=function(e,r){if(typeof e!="string"||e==="")return false;if(F_(e))return true;var s=E_;return r&&r.strict===false&&(s=A_),s(e)};});var hi=y(Ie=>{Ie.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):false;Ie.find=(t,e)=>t.nodes.find(r=>r.type===e);Ie.exceedsLimit=(t,e,r=1,s)=>s===false||!Ie.isInteger(t)||!Ie.isInteger(e)?false:(Number(e)-Number(t))/Number(r)>=s;Ie.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==true&&(s.value="\\"+s.value,s.escaped=true);};Ie.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?false:(t.invalid=true,true);Ie.isInvalidBrace=t=>t.type!=="brace"?false:t.invalid===true||t.dollar?true:!(t.commas>>0+t.ranges>>0)||t.open!==true||t.close!==true?(t.invalid=true,true):false;Ie.isOpenOrClose=t=>t.type==="open"||t.type==="close"?true:t.open===true||t.close===true;Ie.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Ie.flatten=(...t)=>{let e=[],r=s=>{for(let i=0;i<s.length;i++){let n=s[i];if(Array.isArray(n)){r(n);continue}n!==void 0&&e.push(n);}return e};return r(t),e};});var di=y((yS,Am)=>{var Em=hi();Am.exports=(t,e={})=>{let r=(s,i={})=>{let n=e.escapeInvalid&&Em.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,a="";if(s.value)return (n||o)&&Em.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let u of s.nodes)a+=r(u);return a};return r(t)};});var Rm=y((vS,Om)=>{Om.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):false};});var Nm=y((CS,Bm)=>{var Sm=Rm(),Kt=(t,e,r)=>{if(Sm(t)===false)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Sm(e)===false)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:true,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===false);let i=String(s.relaxZeros),n=String(s.shorthand),o=String(s.capture),a=String(s.wrap),u=t+":"+e+"="+i+n+o+a;if(Kt.cache.hasOwnProperty(u))return Kt.cache[u].result;let h=Math.min(t,e),l=Math.max(t,e);if(Math.abs(h-l)===1){let g=t+"|"+e;return s.capture?`(${g})`:s.wrap===false?g:`(?:${g})`}let c=Mm(t)||Mm(e),d={min:t,max:e,a:h,b:l},f=[],m=[];if(c&&(d.isPadded=c,d.maxLen=String(d.max).length),h<0){let g=l<0?Math.abs(l):1;m=Tm(g,Math.abs(h),d,s),h=d.a=0;}return l>=0&&(f=Tm(h,l,d,s)),d.negatives=m,d.positives=f,d.result=O_(m,f),s.capture===true?d.result=`(${d.result})`:s.wrap!==false&&f.length+m.length>1&&(d.result=`(?:${d.result})`),Kt.cache[u]=d,d.result};function O_(t,e,r){let s=Wa(t,e,"-",false)||[],i=Wa(e,t,"",false)||[],n=Wa(t,e,"-?",true)||[];return s.concat(n).concat(i).join("|")}function R_(t,e){let r=1,s=1,i=Pm(t,r),n=new Set([e]);for(;t<=i&&i<=e;)n.add(i),r+=1,i=Pm(t,r);for(i=$m(e+1,s)-1;t<i&&i<=e;)n.add(i),s+=1,i=$m(e+1,s)-1;return n=[...n],n.sort(k_),n}function S_(t,e,r){if(t===e)return {pattern:t,count:[],digits:0};let s=T_(t,e),i=s.length,n="",o=0;for(let a=0;a<i;a++){let[u,h]=s[a];u===h?n+=u:u!=="0"||h!=="9"?n+=P_(u,h):o++;}return o&&(n+=r.shorthand===true?"\\d":"[0-9]"),{pattern:n,count:[o],digits:i}}function Tm(t,e,r,s){let i=R_(t,e),n=[],o=t,a;for(let u=0;u<i.length;u++){let h=i[u],l=S_(String(o),String(h),s),c="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+Im(a.count),o=h+1;continue}r.isPadded&&(c=$_(h,r,s)),l.string=c+l.pattern+Im(l.count),n.push(l),o=h+1,a=l;}return n}function Wa(t,e,r,s,i){let n=[];for(let o of t){let{string:a}=o;!s&&!km(e,"string",a)&&n.push(r+a),s&&km(e,"string",a)&&n.push(r+a);}return n}function T_(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function k_(t,e){return t>e?1:e>t?-1:0}function km(t,e,r){return t.some(s=>s[e]===r)}function Pm(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function $m(t,e){return t-t%Math.pow(10,e)}function Im(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function P_(t,e,r){return `[${t}${e-t===1?"":"-"}${e}]`}function Mm(t){return /^-?(0+)\d/.test(t)}function $_(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==false;switch(s){case 0:return "";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${s}}`:`0{${s}}`}}Kt.cache={};Kt.clearCache=()=>Kt.cache={};Bm.exports=Kt;});var Ja=y((wS,Um)=>{var I_=N("util"),qm=Nm(),Hm=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),M_=t=>e=>t===true?Number(e):String(e),Ka=t=>typeof t=="number"||typeof t=="string"&&t!=="",Jr=t=>Number.isInteger(+t),Ya=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return false;for(;e[++r]==="0";);return r>0},B_=(t,e,r)=>typeof t=="string"||typeof e=="string"?true:r.stringify===true,N_=(t,e,r)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0");}return r===false?String(t):t},pi=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},H_=(t,e,r)=>{t.negatives.sort((a,u)=>a<u?-1:a>u?1:0),t.positives.sort((a,u)=>a<u?-1:a>u?1:0);let s=e.capture?"":"?:",i="",n="",o;return t.positives.length&&(i=t.positives.map(a=>pi(String(a),r)).join("|")),t.negatives.length&&(n=`-(${s}${t.negatives.map(a=>pi(String(a),r)).join("|")})`),i&&n?o=`${i}|${n}`:o=i||n,e.wrap?`(${s}${o})`:o},Lm=(t,e,r,s)=>{if(r)return qm(t,e,{wrap:false,...s});let i=String.fromCharCode(t);if(t===e)return i;let n=String.fromCharCode(e);return `[${i}-${n}]`},jm=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===true,i=r.capture?"":"?:";return s?`(${i}${t.join("|")})`:t.join("|")}return qm(t,e,r)},Gm=(...t)=>new RangeError("Invalid range arguments: "+I_.inspect(...t)),Vm=(t,e,r)=>{if(r.strictRanges===true)throw Gm([t,e]);return []},q_=(t,e)=>{if(e.strictRanges===true)throw new TypeError(`Expected step "${t}" to be a number`);return []},L_=(t,e,r=1,s={})=>{let i=Number(t),n=Number(e);if(!Number.isInteger(i)||!Number.isInteger(n)){if(s.strictRanges===true)throw Gm([t,e]);return []}i===0&&(i=0),n===0&&(n=0);let o=i>n,a=String(t),u=String(e),h=String(r);r=Math.max(Math.abs(r),1);let l=Ya(a)||Ya(u)||Ya(h),c=l?Math.max(a.length,u.length,h.length):0,d=l===false&&B_(t,e,s)===false,f=s.transform||M_(d);if(s.toRegex&&r===1)return Lm(pi(t,c),pi(e,c),true,s);let m={negatives:[],positives:[]},g=b=>m[b<0?"negatives":"positives"].push(Math.abs(b)),D=[],x=0;for(;o?i>=n:i<=n;)s.toRegex===true&&r>1?g(i):D.push(N_(f(i,x),c,d)),i=o?i-r:i+r,x++;return s.toRegex===true?r>1?H_(m,s,c):jm(D,null,{wrap:false,...s}):D},j_=(t,e,r=1,s={})=>{if(!Jr(t)&&t.length>1||!Jr(e)&&e.length>1)return Vm(t,e,s);let i=s.transform||(d=>String.fromCharCode(d)),n=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=n>o,u=Math.min(n,o),h=Math.max(n,o);if(s.toRegex&&r===1)return Lm(u,h,false,s);let l=[],c=0;for(;a?n>=o:n<=o;)l.push(i(n,c)),n=a?n-r:n+r,c++;return s.toRegex===true?jm(l,null,{wrap:false,options:s}):l},fi=(t,e,r,s={})=>{if(e==null&&Ka(t))return [t];if(!Ka(t)||!Ka(e))return Vm(t,e,s);if(typeof r=="function")return fi(t,e,1,{transform:r});if(Hm(r))return fi(t,e,0,r);let i={...s};return i.capture===true&&(i.wrap=true),r=r||i.step||1,Jr(r)?Jr(t)&&Jr(e)?L_(t,e,r,i):j_(t,e,Math.max(Math.abs(r),1),i):r!=null&&!Hm(r)?q_(r,i):fi(t,e,1,r)};Um.exports=fi;});var Ym=y((xS,Km)=>{var G_=Ja(),Wm=hi(),V_=(t,e={})=>{let r=(s,i={})=>{let n=Wm.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,a=n===true||o===true,u=e.escapeInvalid===true?"\\":"",h="";if(s.isOpen===true)return u+s.value;if(s.isClose===true)return console.log("node.isClose",u,s.value),u+s.value;if(s.type==="open")return a?u+s.value:"(";if(s.type==="close")return a?u+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":a?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let l=Wm.reduce(s.nodes),c=G_(...l,{...e,wrap:false,toRegex:true,strictZeros:true});if(c.length!==0)return l.length>1&&c.length>1?`(${c})`:c}if(s.nodes)for(let l of s.nodes)h+=r(l,s);return h};return r(t)};Km.exports=V_;});var Xm=y((_S,zm)=>{var U_=Ja(),Jm=di(),mr=hi(),Yt=(t="",e="",r=false)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?mr.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let n of i)s.push(Yt(n,e,r));else for(let n of e)r===true&&typeof n=="string"&&(n=`{${n}}`),s.push(Array.isArray(n)?Yt(i,n,r):i+n);return mr.flatten(s)},W_=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(i,n={})=>{i.queue=[];let o=n,a=n.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(Yt(a.pop(),Jm(i,e)));return}if(i.type==="brace"&&i.invalid!==true&&i.nodes.length===2){a.push(Yt(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let c=mr.reduce(i.nodes);if(mr.exceedsLimit(...c,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=U_(...c,e);d.length===0&&(d=Jm(i,e)),a.push(Yt(a.pop(),d)),i.nodes=[];return}let u=mr.encloseBrace(i),h=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,h=l.queue;for(let c=0;c<i.nodes.length;c++){let d=i.nodes[c];if(d.type==="comma"&&i.type==="brace"){c===1&&h.push(""),h.push("");continue}if(d.type==="close"){a.push(Yt(a.pop(),h,u));continue}if(d.value&&d.type!=="open"){h.push(Yt(h.pop(),d.value));continue}d.nodes&&s(d,i);}return h};return mr.flatten(s(t))};zm.exports=W_;});var Qm=y((FS,Zm)=>{Zm.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
137
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};});var ig=y((ES,sg)=>{var K_=di(),{MAX_LENGTH:eg,CHAR_BACKSLASH:za,CHAR_BACKTICK:Y_,CHAR_COMMA:J_,CHAR_DOT:z_,CHAR_LEFT_PARENTHESES:X_,CHAR_RIGHT_PARENTHESES:Z_,CHAR_LEFT_CURLY_BRACE:Q_,CHAR_RIGHT_CURLY_BRACE:eF,CHAR_LEFT_SQUARE_BRACKET:tg,CHAR_RIGHT_SQUARE_BRACKET:rg,CHAR_DOUBLE_QUOTE:tF,CHAR_SINGLE_QUOTE:rF,CHAR_NO_BREAK_SPACE:sF,CHAR_ZERO_WIDTH_NOBREAK_SPACE:iF}=Qm(),nF=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(eg,r.maxLength):eg;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let i={type:"root",input:t,nodes:[]},n=[i],o=i,a=i,u=0,h=t.length,l=0,c=0,d,f=()=>t[l++],m=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(m({type:"bos"});l<h;)if(o=n[n.length-1],d=f(),!(d===iF||d===sF)){if(d===za){m({type:"text",value:(e.keepEscaping?d:"")+f()});continue}if(d===rg){m({type:"text",value:"\\"+d});continue}if(d===tg){u++;let g;for(;l<h&&(g=f());){if(d+=g,g===tg){u++;continue}if(g===za){d+=f();continue}if(g===rg&&(u--,u===0))break}m({type:"text",value:d});continue}if(d===X_){o=m({type:"paren",nodes:[]}),n.push(o),m({type:"text",value:d});continue}if(d===Z_){if(o.type!=="paren"){m({type:"text",value:d});continue}o=n.pop(),m({type:"text",value:d}),o=n[n.length-1];continue}if(d===tF||d===rF||d===Y_){let g=d,D;for(e.keepQuotes!==true&&(d="");l<h&&(D=f());){if(D===za){d+=D+f();continue}if(D===g){e.keepQuotes===true&&(d+=D);break}d+=D;}m({type:"text",value:d});continue}if(d===Q_){c++;let D={type:"brace",open:true,close:false,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===true,depth:c,commas:0,ranges:0,nodes:[]};o=m(D),n.push(o),m({type:"open",value:d});continue}if(d===eF){if(o.type!=="brace"){m({type:"text",value:d});continue}let g="close";o=n.pop(),o.close=true,m({type:g,value:d}),c--,o=n[n.length-1];continue}if(d===J_&&c>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:K_(o)}];}m({type:"comma",value:d}),o.commas++;continue}if(d===z_&&c>0&&o.commas===0){let g=o.nodes;if(c===0||g.length===0){m({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=true,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let D=g[g.length-1];D.value+=a.value+d,a=D,o.ranges--;continue}m({type:"dot",value:d});continue}m({type:"text",value:d});}do if(o=n.pop(),o.type!=="root"){o.nodes.forEach(x=>{x.nodes||(x.type==="open"&&(x.isOpen=true),x.type==="close"&&(x.isClose=true),x.nodes||(x.type="text"),x.invalid=true);});let g=n[n.length-1],D=g.nodes.indexOf(o);g.nodes.splice(D,1,...o.nodes);}while(n.length>0);return m({type:"eos"}),i};sg.exports=nF;});var ag=y((AS,og)=>{var ng=di(),oF=Ym(),aF=Xm(),uF=ig(),Oe=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let i=Oe.create(s,e);Array.isArray(i)?r.push(...i):r.push(i);}else r=[].concat(Oe.create(t,e));return e&&e.expand===true&&e.nodupes===true&&(r=[...new Set(r)]),r};Oe.parse=(t,e={})=>uF(t,e);Oe.stringify=(t,e={})=>ng(typeof t=="string"?Oe.parse(t,e):t,e);Oe.compile=(t,e={})=>(typeof t=="string"&&(t=Oe.parse(t,e)),oF(t,e));Oe.expand=(t,e={})=>{typeof t=="string"&&(t=Oe.parse(t,e));let r=aF(t,e);return e.noempty===true&&(r=r.filter(Boolean)),e.nodupes===true&&(r=[...new Set(r)]),r};Oe.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==true?Oe.compile(t,e):Oe.expand(t,e);og.exports=Oe;});var zr=y((OS,dg)=>{var lF=N("path"),tt="\\\\/",ug=`[^${tt}]`,yt="\\.",cF="\\+",hF="\\?",mi="\\/",dF="(?=.)",lg="[^/]",Xa=`(?:${mi}|$)`,cg=`(?:^|${mi})`,Za=`${yt}{1,2}${Xa}`,fF=`(?!${yt})`,pF=`(?!${cg}${Za})`,mF=`(?!${yt}{0,1}${Xa})`,gF=`(?!${Za})`,DF=`[^.${mi}]`,bF=`${lg}*?`,hg={DOT_LITERAL:yt,PLUS_LITERAL:cF,QMARK_LITERAL:hF,SLASH_LITERAL:mi,ONE_CHAR:dF,QMARK:lg,END_ANCHOR:Xa,DOTS_SLASH:Za,NO_DOT:fF,NO_DOTS:pF,NO_DOT_SLASH:mF,NO_DOTS_SLASH:gF,QMARK_NO_DOT:DF,STAR:bF,START_ANCHOR:cg},yF={...hg,SLASH_LITERAL:`[${tt}]`,QMARK:ug,STAR:`${ug}*?`,DOTS_SLASH:`${yt}{1,2}(?:[${tt}]|$)`,NO_DOT:`(?!${yt})`,NO_DOTS:`(?!(?:^|[${tt}])${yt}{1,2}(?:[${tt}]|$))`,NO_DOT_SLASH:`(?!${yt}{0,1}(?:[${tt}]|$))`,NO_DOTS_SLASH:`(?!${yt}{1,2}(?:[${tt}]|$))`,QMARK_NO_DOT:`[^.${tt}]`,START_ANCHOR:`(?:^|[${tt}])`,END_ANCHOR:`(?:[${tt}]|$)`},vF={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};dg.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:vF,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:lF.sep,extglobChars(t){return {"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?yF:hg}};});var Xr=y(Fe=>{var CF=N("path"),wF=process.platform==="win32",{REGEX_BACKSLASH:xF,REGEX_REMOVE_BACKSLASH:_F,REGEX_SPECIAL_CHARS:FF,REGEX_SPECIAL_CHARS_GLOBAL:EF}=zr();Fe.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Fe.hasRegexChars=t=>FF.test(t);Fe.isRegexChar=t=>t.length===1&&Fe.hasRegexChars(t);Fe.escapeRegex=t=>t.replace(EF,"\\$1");Fe.toPosixSlashes=t=>t.replace(xF,"/");Fe.removeBackslashes=t=>t.replace(_F,e=>e==="\\"?"":e);Fe.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};Fe.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:wF===true||CF.sep==="\\";Fe.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?Fe.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};Fe.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};Fe.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===true&&(n=`(?:^(?!${n}).*$)`),n};});var vg=y((SS,yg)=>{var fg=Xr(),{CHAR_ASTERISK:Qa,CHAR_AT:AF,CHAR_BACKWARD_SLASH:Zr,CHAR_COMMA:OF,CHAR_DOT:eu,CHAR_EXCLAMATION_MARK:tu,CHAR_FORWARD_SLASH:bg,CHAR_LEFT_CURLY_BRACE:ru,CHAR_LEFT_PARENTHESES:su,CHAR_LEFT_SQUARE_BRACKET:RF,CHAR_PLUS:SF,CHAR_QUESTION_MARK:pg,CHAR_RIGHT_CURLY_BRACE:TF,CHAR_RIGHT_PARENTHESES:mg,CHAR_RIGHT_SQUARE_BRACKET:kF}=zr(),gg=t=>t===bg||t===Zr,Dg=t=>{t.isPrefix!==true&&(t.depth=t.isGlobstar?1/0:1);},PF=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===true||r.scanToEnd===true,n=[],o=[],a=[],u=t,h=-1,l=0,c=0,d=false,f=false,m=false,g=false,D=false,x=false,b=false,v=false,C=false,E=false,R=0,P,A,T={value:"",depth:0,isGlob:false},U=()=>h>=s,F=()=>u.charCodeAt(h+1),B=()=>(P=A,u.charCodeAt(++h));for(;h<s;){A=B();let G;if(A===Zr){b=T.backslashes=true,A=B(),A===ru&&(x=true);continue}if(x===true||A===ru){for(R++;U()!==true&&(A=B());){if(A===Zr){b=T.backslashes=true,B();continue}if(A===ru){R++;continue}if(x!==true&&A===eu&&(A=B())===eu){if(d=T.isBrace=true,m=T.isGlob=true,E=true,i===true)continue;break}if(x!==true&&A===OF){if(d=T.isBrace=true,m=T.isGlob=true,E=true,i===true)continue;break}if(A===TF&&(R--,R===0)){x=false,d=T.isBrace=true,E=true;break}}if(i===true)continue;break}if(A===bg){if(n.push(h),o.push(T),T={value:"",depth:0,isGlob:false},E===true)continue;if(P===eu&&h===l+1){l+=2;continue}c=h+1;continue}if(r.noext!==true&&(A===SF||A===AF||A===Qa||A===pg||A===tu)===true&&F()===su){if(m=T.isGlob=true,g=T.isExtglob=true,E=true,A===tu&&h===l&&(C=true),i===true){for(;U()!==true&&(A=B());){if(A===Zr){b=T.backslashes=true,A=B();continue}if(A===mg){m=T.isGlob=true,E=true;break}}continue}break}if(A===Qa){if(P===Qa&&(D=T.isGlobstar=true),m=T.isGlob=true,E=true,i===true)continue;break}if(A===pg){if(m=T.isGlob=true,E=true,i===true)continue;break}if(A===RF){for(;U()!==true&&(G=B());){if(G===Zr){b=T.backslashes=true,B();continue}if(G===kF){f=T.isBracket=true,m=T.isGlob=true,E=true;break}}if(i===true)continue;break}if(r.nonegate!==true&&A===tu&&h===l){v=T.negated=true,l++;continue}if(r.noparen!==true&&A===su){if(m=T.isGlob=true,i===true){for(;U()!==true&&(A=B());){if(A===su){b=T.backslashes=true,A=B();continue}if(A===mg){E=true;break}}continue}break}if(m===true){if(E=true,i===true)continue;break}}r.noext===true&&(g=false,m=false);let I=u,ee="",_="";l>0&&(ee=u.slice(0,l),u=u.slice(l),c-=l),I&&m===true&&c>0?(I=u.slice(0,c),_=u.slice(c)):m===true?(I="",_=u):I=u,I&&I!==""&&I!=="/"&&I!==u&&gg(I.charCodeAt(I.length-1))&&(I=I.slice(0,-1)),r.unescape===true&&(_&&(_=fg.removeBackslashes(_)),I&&b===true&&(I=fg.removeBackslashes(I)));let w={prefix:ee,input:t,start:l,base:I,glob:_,isBrace:d,isBracket:f,isGlob:m,isExtglob:g,isGlobstar:D,negated:v,negatedExtglob:C};if(r.tokens===true&&(w.maxDepth=0,gg(A)||o.push(T),w.tokens=o),r.parts===true||r.tokens===true){let G;for(let k=0;k<n.length;k++){let ne=G?G+1:l,ue=n[k],oe=t.slice(ne,ue);r.tokens&&(k===0&&l!==0?(o[k].isPrefix=true,o[k].value=ee):o[k].value=oe,Dg(o[k]),w.maxDepth+=o[k].depth),(k!==0||oe!=="")&&a.push(oe),G=ue;}if(G&&G+1<t.length){let k=t.slice(G+1);a.push(k),r.tokens&&(o[o.length-1].value=k,Dg(o[o.length-1]),w.maxDepth+=o[o.length-1].depth);}w.slashes=n,w.parts=a;}return w};yg.exports=PF;});var xg=y((TS,wg)=>{var gi=zr(),Re=Xr(),{MAX_LENGTH:Di,POSIX_REGEX_SOURCE:$F,REGEX_NON_SPECIAL_CHARS:IF,REGEX_SPECIAL_CHARS_BACKREF:MF,REPLACEMENTS:Cg}=gi,BF=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r);}catch{return t.map(i=>Re.escapeRegex(i)).join("..")}return r},gr=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,iu=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Cg[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(Di,r.maxLength):Di,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},o=[n],a=r.capture?"":"?:",u=Re.isWindows(e),h=gi.globChars(u),l=gi.extglobChars(h),{DOT_LITERAL:c,PLUS_LITERAL:d,SLASH_LITERAL:f,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:D,NO_DOT_SLASH:x,NO_DOTS_SLASH:b,QMARK:v,QMARK_NO_DOT:C,STAR:E,START_ANCHOR:R}=h,P=S=>`(${a}(?:(?!${R}${S.dot?g:c}).)*?)`,A=r.dot?"":D,T=r.dot?v:C,U=r.bash===true?P(r):E;r.capture&&(U=`(${U})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let F={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:o};t=Re.removePrefix(t,F),i=t.length;let B=[],I=[],ee=[],_=n,w,G=()=>F.index===i-1,k=F.peek=(S=1)=>t[F.index+S],ne=F.advance=()=>t[++F.index]||"",ue=()=>t.slice(F.index+1),oe=(S="",J=0)=>{F.consumed+=S,F.index+=J;},es=S=>{F.output+=S.output!=null?S.output:S.value,oe(S.value);},lD=()=>{let S=1;for(;k()==="!"&&(k(2)!=="("||k(3)==="?");)ne(),F.start++,S++;return S%2===0?false:(F.negated=true,F.start++,true)},ts=S=>{F[S]++,ee.push(S);},Ot=S=>{F[S]--,ee.pop();},q=S=>{if(_.type==="globstar"){let J=F.braces>0&&(S.type==="comma"||S.type==="brace"),O=S.extglob===true||B.length&&(S.type==="pipe"||S.type==="paren");S.type!=="slash"&&S.type!=="paren"&&!J&&!O&&(F.output=F.output.slice(0,-_.output.length),_.type="star",_.value="*",_.output=U,F.output+=_.output);}if(B.length&&S.type!=="paren"&&(B[B.length-1].inner+=S.value),(S.value||S.output)&&es(S),_&&_.type==="text"&&S.type==="text"){_.value+=S.value,_.output=(_.output||"")+S.value;return}S.prev=_,o.push(S),_=S;},rs=(S,J)=>{let O={...l[J],conditions:1,inner:""};O.prev=_,O.parens=F.parens,O.output=F.output;let H=(r.capture?"(":"")+O.open;ts("parens"),q({type:S,value:J,output:F.output?"":m}),q({type:"paren",extglob:true,value:ne(),output:H}),B.push(O);},cD=S=>{let J=S.close+(r.capture?")":""),O;if(S.type==="negate"){let H=U;if(S.inner&&S.inner.length>1&&S.inner.includes("/")&&(H=P(r)),(H!==U||G()||/^\)+$/.test(ue()))&&(J=S.close=`)$))${H}`),S.inner.includes("*")&&(O=ue())&&/^\.[^\\/.]+$/.test(O)){let te=iu(O,{...e,fastpaths:false}).output;J=S.close=`)${te})${H})`;}S.prev.type==="bos"&&(F.negatedExtglob=true);}q({type:"paren",extglob:true,value:w,output:J}),Ot("parens");};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let S=false,J=t.replace(MF,(O,H,te,De,le,xi)=>De==="\\"?(S=true,O):De==="?"?H?H+De+(le?v.repeat(le.length):""):xi===0?T+(le?v.repeat(le.length):""):v.repeat(te.length):De==="."?c.repeat(te.length):De==="*"?H?H+De+(le?U:""):U:H?O:`\\${O}`);return S===true&&(r.unescape===true?J=J.replace(/\\/g,""):J=J.replace(/\\+/g,O=>O.length%2===0?"\\\\":O?"\\":"")),J===t&&r.contains===true?(F.output=t,F):(F.output=Re.wrapOutput(J,F,e),F)}for(;!G();){if(w=ne(),w==="\0")continue;if(w==="\\"){let O=k();if(O==="/"&&r.bash!==true||O==="."||O===";")continue;if(!O){w+="\\",q({type:"text",value:w});continue}let H=/^\\+/.exec(ue()),te=0;if(H&&H[0].length>2&&(te=H[0].length,F.index+=te,te%2!==0&&(w+="\\")),r.unescape===true?w=ne():w+=ne(),F.brackets===0){q({type:"text",value:w});continue}}if(F.brackets>0&&(w!=="]"||_.value==="["||_.value==="[^")){if(r.posix!==false&&w===":"){let O=_.value.slice(1);if(O.includes("[")&&(_.posix=true,O.includes(":"))){let H=_.value.lastIndexOf("["),te=_.value.slice(0,H),De=_.value.slice(H+2),le=$F[De];if(le){_.value=te+le,F.backtrack=true,ne(),!n.output&&o.indexOf(_)===1&&(n.output=m);continue}}}(w==="["&&k()!==":"||w==="-"&&k()==="]")&&(w=`\\${w}`),w==="]"&&(_.value==="["||_.value==="[^")&&(w=`\\${w}`),r.posix===true&&w==="!"&&_.value==="["&&(w="^"),_.value+=w,es({value:w});continue}if(F.quotes===1&&w!=='"'){w=Re.escapeRegex(w),_.value+=w,es({value:w});continue}if(w==='"'){F.quotes=F.quotes===1?0:1,r.keepQuotes===true&&q({type:"text",value:w});continue}if(w==="("){ts("parens"),q({type:"paren",value:w});continue}if(w===")"){if(F.parens===0&&r.strictBrackets===true)throw new SyntaxError(gr("opening","("));let O=B[B.length-1];if(O&&F.parens===O.parens+1){cD(B.pop());continue}q({type:"paren",value:w,output:F.parens?")":"\\)"}),Ot("parens");continue}if(w==="["){if(r.nobracket===true||!ue().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true)throw new SyntaxError(gr("closing","]"));w=`\\${w}`;}else ts("brackets");q({type:"bracket",value:w});continue}if(w==="]"){if(r.nobracket===true||_&&_.type==="bracket"&&_.value.length===1){q({type:"text",value:w,output:`\\${w}`});continue}if(F.brackets===0){if(r.strictBrackets===true)throw new SyntaxError(gr("opening","["));q({type:"text",value:w,output:`\\${w}`});continue}Ot("brackets");let O=_.value.slice(1);if(_.posix!==true&&O[0]==="^"&&!O.includes("/")&&(w=`/${w}`),_.value+=w,es({value:w}),r.literalBrackets===false||Re.hasRegexChars(O))continue;let H=Re.escapeRegex(_.value);if(F.output=F.output.slice(0,-_.value.length),r.literalBrackets===true){F.output+=H,_.value=H;continue}_.value=`(${a}${H}|${_.value})`,F.output+=_.value;continue}if(w==="{"&&r.nobrace!==true){ts("braces");let O={type:"brace",value:w,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};I.push(O),q(O);continue}if(w==="}"){let O=I[I.length-1];if(r.nobrace===true||!O){q({type:"text",value:w,output:w});continue}let H=")";if(O.dots===true){let te=o.slice(),De=[];for(let le=te.length-1;le>=0&&(o.pop(),te[le].type!=="brace");le--)te[le].type!=="dots"&&De.unshift(te[le].value);H=BF(De,r),F.backtrack=true;}if(O.comma!==true&&O.dots!==true){let te=F.output.slice(0,O.outputIndex),De=F.tokens.slice(O.tokensIndex);O.value=O.output="\\{",w=H="\\}",F.output=te;for(let le of De)F.output+=le.output||le.value;}q({type:"brace",value:w,output:H}),Ot("braces"),I.pop();continue}if(w==="|"){B.length>0&&B[B.length-1].conditions++,q({type:"text",value:w});continue}if(w===","){let O=w,H=I[I.length-1];H&&ee[ee.length-1]==="braces"&&(H.comma=true,O="|"),q({type:"comma",value:w,output:O});continue}if(w==="/"){if(_.type==="dot"&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",o.pop(),_=n;continue}q({type:"slash",value:w,output:f});continue}if(w==="."){if(F.braces>0&&_.type==="dot"){_.value==="."&&(_.output=c);let O=I[I.length-1];_.type="dots",_.output+=w,_.value+=w,O.dots=true;continue}if(F.braces+F.parens===0&&_.type!=="bos"&&_.type!=="slash"){q({type:"text",value:w,output:c});continue}q({type:"dot",value:w,output:c});continue}if(w==="?"){if(!(_&&_.value==="(")&&r.noextglob!==true&&k()==="("&&k(2)!=="?"){rs("qmark",w);continue}if(_&&_.type==="paren"){let H=k(),te=w;if(H==="<"&&!Re.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(_.value==="("&&!/[!=<:]/.test(H)||H==="<"&&!/<([!=]|\w+>)/.test(ue()))&&(te=`\\${w}`),q({type:"text",value:w,output:te});continue}if(r.dot!==true&&(_.type==="slash"||_.type==="bos")){q({type:"qmark",value:w,output:C});continue}q({type:"qmark",value:w,output:v});continue}if(w==="!"){if(r.noextglob!==true&&k()==="("&&(k(2)!=="?"||!/[!=<:]/.test(k(3)))){rs("negate",w);continue}if(r.nonegate!==true&&F.index===0){lD();continue}}if(w==="+"){if(r.noextglob!==true&&k()==="("&&k(2)!=="?"){rs("plus",w);continue}if(_&&_.value==="("||r.regex===false){q({type:"plus",value:w,output:d});continue}if(_&&(_.type==="bracket"||_.type==="paren"||_.type==="brace")||F.parens>0){q({type:"plus",value:w});continue}q({type:"plus",value:d});continue}if(w==="@"){if(r.noextglob!==true&&k()==="("&&k(2)!=="?"){q({type:"at",extglob:true,value:w,output:""});continue}q({type:"text",value:w});continue}if(w!=="*"){(w==="$"||w==="^")&&(w=`\\${w}`);let O=IF.exec(ue());O&&(w+=O[0],F.index+=O[0].length),q({type:"text",value:w});continue}if(_&&(_.type==="globstar"||_.star===true)){_.type="star",_.star=true,_.value+=w,_.output=U,F.backtrack=true,F.globstar=true,oe(w);continue}let S=ue();if(r.noextglob!==true&&/^\([^?]/.test(S)){rs("star",w);continue}if(_.type==="star"){if(r.noglobstar===true){oe(w);continue}let O=_.prev,H=O.prev,te=O.type==="slash"||O.type==="bos",De=H&&(H.type==="star"||H.type==="globstar");if(r.bash===true&&(!te||S[0]&&S[0]!=="/")){q({type:"star",value:w,output:""});continue}let le=F.braces>0&&(O.type==="comma"||O.type==="brace"),xi=B.length&&(O.type==="pipe"||O.type==="paren");if(!te&&O.type!=="paren"&&!le&&!xi){q({type:"star",value:w,output:""});continue}for(;S.slice(0,3)==="/**";){let ss=t[F.index+4];if(ss&&ss!=="/")break;S=S.slice(3),oe("/**",3);}if(O.type==="bos"&&G()){_.type="globstar",_.value+=w,_.output=P(r),F.output=_.output,F.globstar=true,oe(w);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&!De&&G()){F.output=F.output.slice(0,-(O.output+_.output).length),O.output=`(?:${O.output}`,_.type="globstar",_.output=P(r)+(r.strictSlashes?")":"|$)"),_.value+=w,F.globstar=true,F.output+=O.output+_.output,oe(w);continue}if(O.type==="slash"&&O.prev.type!=="bos"&&S[0]==="/"){let ss=S[1]!==void 0?"|$":"";F.output=F.output.slice(0,-(O.output+_.output).length),O.output=`(?:${O.output}`,_.type="globstar",_.output=`${P(r)}${f}|${f}${ss})`,_.value+=w,F.output+=O.output+_.output,F.globstar=true,oe(w+ne()),q({type:"slash",value:"/",output:""});continue}if(O.type==="bos"&&S[0]==="/"){_.type="globstar",_.value+=w,_.output=`(?:^|${f}|${P(r)}${f})`,F.output=_.output,F.globstar=true,oe(w+ne()),q({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-_.output.length),_.type="globstar",_.output=P(r),_.value+=w,F.output+=_.output,F.globstar=true,oe(w);continue}let J={type:"star",value:w,output:U};if(r.bash===true){J.output=".*?",(_.type==="bos"||_.type==="slash")&&(J.output=A+J.output),q(J);continue}if(_&&(_.type==="bracket"||_.type==="paren")&&r.regex===true){J.output=w,q(J);continue}(F.index===F.start||_.type==="slash"||_.type==="dot")&&(_.type==="dot"?(F.output+=x,_.output+=x):r.dot===true?(F.output+=b,_.output+=b):(F.output+=A,_.output+=A),k()!=="*"&&(F.output+=m,_.output+=m)),q(J);}for(;F.brackets>0;){if(r.strictBrackets===true)throw new SyntaxError(gr("closing","]"));F.output=Re.escapeLast(F.output,"["),Ot("brackets");}for(;F.parens>0;){if(r.strictBrackets===true)throw new SyntaxError(gr("closing",")"));F.output=Re.escapeLast(F.output,"("),Ot("parens");}for(;F.braces>0;){if(r.strictBrackets===true)throw new SyntaxError(gr("closing","}"));F.output=Re.escapeLast(F.output,"{"),Ot("braces");}if(r.strictSlashes!==true&&(_.type==="star"||_.type==="bracket")&&q({type:"maybe_slash",value:"",output:`${f}?`}),F.backtrack===true){F.output="";for(let S of F.tokens)F.output+=S.output!=null?S.output:S.value,S.suffix&&(F.output+=S.suffix);}return F};iu.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(Di,r.maxLength):Di,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=Cg[t]||t;let n=Re.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:h,NO_DOT:l,NO_DOTS:c,NO_DOTS_SLASH:d,STAR:f,START_ANCHOR:m}=gi.globChars(n),g=r.dot?c:l,D=r.dot?d:l,x=r.capture?"":"?:",b={negated:false,prefix:""},v=r.bash===true?".*?":f;r.capture&&(v=`(${v})`);let C=A=>A.noglobstar===true?v:`(${x}(?:(?!${m}${A.dot?h:o}).)*?)`,E=A=>{switch(A){case "*":return `${g}${u}${v}`;case ".*":return `${o}${u}${v}`;case "*.*":return `${g}${v}${o}${u}${v}`;case "*/*":return `${g}${v}${a}${u}${D}${v}`;case "**":return g+C(r);case "**/*":return `(?:${g}${C(r)}${a})?${D}${u}${v}`;case "**/*.*":return `(?:${g}${C(r)}${a})?${D}${v}${o}${u}${v}`;case "**/.*":return `(?:${g}${C(r)}${a})?${o}${u}${v}`;default:{let T=/^(.*?)\.(\w+)$/.exec(A);if(!T)return;let U=E(T[1]);return U?U+o+T[2]:void 0}}},R=Re.removePrefix(t,b),P=E(R);return P&&r.strictSlashes!==true&&(P+=`${a}?`),P};wg.exports=iu;});var Fg=y((kS,_g)=>{var NF=N("path"),HF=vg(),nu=xg(),ou=Xr(),qF=zr(),LF=t=>t&&typeof t=="object"&&!Array.isArray(t),ae=(t,e,r=false)=>{if(Array.isArray(t)){let l=t.map(d=>ae(d,e,r));return d=>{for(let f of l){let m=f(d);if(m)return m}return false}}let s=LF(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},n=ou.isWindows(e),o=s?ae.compileRe(t,e):ae.makeRe(t,e,false,true),a=o.state;delete o.state;let u=()=>false;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};u=ae(i.ignore,l,r);}let h=(l,c=false)=>{let{isMatch:d,match:f,output:m}=ae.test(l,o,e,{glob:t,posix:n}),g={glob:t,state:a,regex:o,posix:n,input:l,output:m,match:f,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===false?(g.isMatch=false,c?g:false):u(l)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=false,c?g:false):(typeof i.onMatch=="function"&&i.onMatch(g),c?g:true)};return r&&(h.state=a),h};ae.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return {isMatch:false,output:""};let n=r||{},o=n.format||(i?ou.toPosixSlashes:null),a=t===s,u=a&&o?o(t):t;return a===false&&(u=o?o(t):t,a=u===s),(a===false||n.capture===true)&&(n.matchBase===true||n.basename===true?a=ae.matchBase(t,e,r,i):a=e.exec(u)),{isMatch:!!a,match:a,output:u}};ae.matchBase=(t,e,r,s=ou.isWindows(r))=>(e instanceof RegExp?e:ae.makeRe(e,r)).test(NF.basename(t));ae.isMatch=(t,e,r)=>ae(e,r)(t);ae.parse=(t,e)=>Array.isArray(t)?t.map(r=>ae.parse(r,e)):nu(t,{...e,fastpaths:false});ae.scan=(t,e)=>HF(t,e);ae.compileRe=(t,e,r=false,s=false)=>{if(r===true)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",a=`${n}(?:${t.output})${o}`;t&&t.negated===true&&(a=`^(?!${a}).*$`);let u=ae.toRegex(a,e);return s===true&&(u.state=t),u};ae.makeRe=(t,e={},r=false,s=false)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:false,fastpaths:true};return e.fastpaths!==false&&(t[0]==="."||t[0]==="*")&&(i.output=nu.fastpaths(t,e)),i.output||(i=nu(t,e)),ae.compileRe(i,e,r,s)};ae.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===true)throw r;return /$^/}};ae.constants=qF;_g.exports=ae;});var Ag=y((PS,Eg)=>{Eg.exports=Fg();});var Pg=y(($S,kg)=>{var Rg=N("util"),Sg=ag(),rt=Ag(),au=Xr(),Og=t=>t===""||t==="./",Tg=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},z=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,i=new Set,n=new Set,o=0,a=l=>{n.add(l.output),r&&r.onResult&&r.onResult(l);};for(let l=0;l<e.length;l++){let c=rt(String(e[l]),{...r,onResult:a},true),d=c.state.negated||c.state.negatedExtglob;d&&o++;for(let f of t){let m=c(f,true);(d?!m.isMatch:m.isMatch)&&(d?s.add(m.output):(s.delete(m.output),i.add(m.output)));}}let h=(o===e.length?[...n]:[...i]).filter(l=>!s.has(l));if(r&&h.length===0){if(r.failglob===true)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===true||r.nullglob===true)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return h};z.match=z;z.matcher=(t,e)=>rt(t,e);z.isMatch=(t,e,r)=>rt(e,r)(t);z.any=z.isMatch;z.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,i=[],n=a=>{r.onResult&&r.onResult(a),i.push(a.output);},o=new Set(z(t,e,{...r,onResult:n}));for(let a of i)o.has(a)||s.add(a);return [...s]};z.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Rg.inspect(t)}"`);if(Array.isArray(e))return e.some(s=>z.contains(t,s,r));if(typeof e=="string"){if(Og(t)||Og(e))return false;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return true}return z.isMatch(t,e,{...r,contains:true})};z.matchKeys=(t,e,r)=>{if(!au.isObject(t))throw new TypeError("Expected the first argument to be an object");let s=z(Object.keys(t),e,r),i={};for(let n of s)i[n]=t[n];return i};z.some=(t,e,r)=>{let s=[].concat(t);for(let i of [].concat(e)){let n=rt(String(i),r);if(s.some(o=>n(o)))return true}return false};z.every=(t,e,r)=>{let s=[].concat(t);for(let i of [].concat(e)){let n=rt(String(i),r);if(!s.every(o=>n(o)))return false}return true};z.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Rg.inspect(t)}"`);return [].concat(e).every(s=>rt(s,r)(t))};z.capture=(t,e,r)=>{let s=au.isWindows(r),n=rt.makeRe(String(t),{...r,capture:true}).exec(s?au.toPosixSlashes(e):e);if(n)return n.slice(1).map(o=>o===void 0?"":o)};z.makeRe=(...t)=>rt.makeRe(...t);z.scan=(...t)=>rt.scan(...t);z.parse=(t,e)=>{let r=[];for(let s of [].concat(t||[]))for(let i of Sg(String(s),e))r.push(rt.parse(i,e));return r};z.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===true||!Tg(t)?[t]:Sg(t,e)};z.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return z.braces(t,{...e,expand:true})};z.hasBraces=Tg;kg.exports=z;});var qg=y(lu=>{Object.defineProperty(lu,"__esModule",{value:true});lu.matchPathFilter=VF;var Bg=Fm(),jF=Pg(),GF=N("url"),$g=ti();function VF(t="/",e,r){if(Ig(t))return Ng(t,e);if(Mg(t))return Hg(t,e);if(Array.isArray(t)){if(t.every(Ig))return WF(t,e);if(t.every(Mg))return UF(t,e);throw new Error($g.ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY)}if(typeof t=="function"){let s=uu(e);return t(s,r)}throw new Error($g.ERRORS.ERR_CONTEXT_MATCHER_GENERIC)}function Ng(t,e){return uu(e)?.indexOf(t)===0}function Hg(t,e){let r=uu(e),s=jF([r],t);return s&&s.length>0}function UF(t,e){return Hg(t,e)}function WF(t,e){let r=false;for(let s of t)if(Ng(s,e)){r=true;break}return r}function uu(t){return t&&GF.parse(t).pathname}function Ig(t){return typeof t=="string"&&!Bg(t)}function Mg(t){return Bg(t)}});var hu=y(cu=>{Object.defineProperty(cu,"__esModule",{value:true});function Lg(t){return Object.prototype.toString.call(t)==="[object Object]"}function KF(t){var e,r;return Lg(t)===false?false:(e=t.constructor,e===void 0?true:(r=e.prototype,!(Lg(r)===false||r.hasOwnProperty("isPrototypeOf")===false)))}cu.isPlainObject=KF;});var Vg=y(du=>{Object.defineProperty(du,"__esModule",{value:true});du.createPathRewriter=zF;var jg=hu(),YF=ti(),JF=bt(),Gg=JF.Debug.extend("path-rewriter");function zF(t){let e;if(!XF(t))return;if(typeof t=="function")return t;return e=ZF(t),r;function r(s){let i=s;for(let n of e)if(n.regex.test(s)){i=i.replace(n.regex,n.value),Gg('rewriting path from "%s" to "%s"',s,i);break}return i}}function XF(t){if(typeof t=="function")return true;if((0, jg.isPlainObject)(t))return Object.keys(t).length!==0;if(t==null)return false;throw new Error(YF.ERRORS.ERR_PATH_REWRITER_CONFIG)}function ZF(t){let e=[];if((0, jg.isPlainObject)(t))for(let[r,s]of Object.entries(t))e.push({regex:new RegExp(r),value:s}),Gg('rewrite rule created: "%s" ~> "%s"',r,s);return e}});var Wg=y(fu=>{Object.defineProperty(fu,"__esModule",{value:true});fu.getTarget=tE;var QF=hu(),eE=bt(),Ug=eE.Debug.extend("router");async function tE(t,e){let r,s=e.router;return (0, QF.isPlainObject)(s)?r=rE(t,s):typeof s=="function"&&(r=await s(t)),r}function rE(t,e){let r,s=t.headers.host,i=t.url,n=s+i;for(let[o,a]of Object.entries(e))if(sE(o)){if(n.indexOf(o)>-1){r=a,Ug('match: "%s" -> "%s"',o,r);break}}else if(o===s){r=a,Ug('match: "%s" -> "%s"',s,r);break}return r}function sE(t){return t.indexOf("/")>-1}});var Kg=y(bi=>{Object.defineProperty(bi,"__esModule",{value:true});bi.HttpProxyMiddleware=void 0;var iE=cm(),nE=dm(),oE=vm(),aE=qg(),uE=Vg(),lE=Wg(),st=bt(),cE=ai(),hE=ni(),pu=class{constructor(e){this.wsInternalSubscribed=false,this.serverOnCloseSubscribed=false,this.middleware=async(r,s,i)=>{if(this.shouldProxy(this.proxyOptions.pathFilter,r))try{let o=await this.prepareProxyRequest(r);(0,st.Debug)("proxy request to target: %O",o.target),this.proxy.web(r,s,o);}catch(o){i?.(o);}else i?.();let n=(r.socket??r.connection)?.server;n&&!this.serverOnCloseSubscribed&&(n.on("close",()=>{(0, st.Debug)("server close signal received: closing proxy server"),this.proxy.close();}),this.serverOnCloseSubscribed=true),this.proxyOptions.ws===true&&this.catchUpgradeRequest(n);},this.catchUpgradeRequest=r=>{this.wsInternalSubscribed||((0, st.Debug)("subscribing to server upgrade event"),r.on("upgrade",this.handleUpgrade),this.wsInternalSubscribed=true);},this.handleUpgrade=async(r,s,i)=>{try{if(this.shouldProxy(this.proxyOptions.pathFilter,r)){let n=await this.prepareProxyRequest(r);this.proxy.ws(r,s,i,n),(0,st.Debug)("server upgrade event received. Proxying WebSocket");}}catch(n){this.proxy.emit("error",n,r,s);}},this.shouldProxy=(r,s)=>{try{return (0,aE.matchPathFilter)(r,s.url,s)}catch(i){return (0, st.Debug)("Error: matchPathFilter() called with request url: ",`"${s.url}"`),this.logger.error(i),false}},this.prepareProxyRequest=async r=>{this.middleware.__LEGACY_HTTP_PROXY_MIDDLEWARE__&&(r.url=r.originalUrl||r.url);let s=Object.assign({},this.proxyOptions);return await this.applyRouter(r,s),await this.applyPathRewrite(r,this.pathRewriter),s},this.applyRouter=async(r,s)=>{let i;s.router&&(i=await lE.getTarget(r,s),i&&((0, st.Debug)('router new target: "%s"',i),s.target=i));},this.applyPathRewrite=async(r,s)=>{if(s){let i=await s(r.url,r);typeof i=="string"?((0, st.Debug)("pathRewrite new path: %s",r.url),r.url=i):(0, st.Debug)("pathRewrite: no rewritten path found: %s",r.url);}},(0, nE.verifyConfig)(e),this.proxyOptions=e,this.logger=(0, hE.getLogger)(e),(0, st.Debug)("create proxy server"),this.proxy=iE.createProxyServer({}),this.registerPlugins(this.proxy,this.proxyOptions),this.pathRewriter=uE.createPathRewriter(this.proxyOptions.pathRewrite),this.middleware.upgrade=(r,s,i)=>{this.wsInternalSubscribed||this.handleUpgrade(r,s,i);};}registerPlugins(e,r){(0, oE.getPlugins)(r).forEach(i=>{(0, st.Debug)(`register plugin: "${(0, cE.getFunctionName)(i)}"`),i(e,r);});}};bi.HttpProxyMiddleware=pu;});var gu=y(mu=>{Object.defineProperty(mu,"__esModule",{value:true});mu.createProxyMiddleware=fE;var dE=Kg();function fE(t){let{middleware:e}=new dE.HttpProxyMiddleware(t);return e}});var Yg=y(bu=>{Object.defineProperty(bu,"__esModule",{value:true});bu.responseInterceptor=gE;var Du=N("zlib"),pE=bt(),mE=ai(),Dr=pE.Debug.extend("response-interceptor");function gE(t){return async function(r,s,i){Dr("intercept proxy response");let n=r,o=Buffer.from("","utf8"),a=DE(r,r.headers["content-encoding"]);a.on("data",u=>o=Buffer.concat([o,u])),a.on("end",async()=>{bE(r,i),Dr("call interceptor function: %s",(0, mE.getFunctionName)(t));let u=Buffer.from(await t(o,n,s,i));Dr("set content-length: %s",Buffer.byteLength(u,"utf8")),i.setHeader("content-length",Buffer.byteLength(u,"utf8")),Dr("write intercepted response"),i.write(u),i.end();}),a.on("error",u=>{i.end(`Error fetching proxied request: ${u.message}`);});}}function DE(t,e){let r=t,s;switch(e){case "gzip":s=Du.createGunzip();break;case "br":s=Du.createBrotliDecompress();break;case "deflate":s=Du.createInflate();break;}return s&&(Dr("decompress proxy response with 'content-encoding': %s",e),r.pipe(s),r=s),r}function bE(t,e){if(Dr("copy original response headers"),e.statusCode=t.statusCode,e.statusMessage=t.statusMessage,e.setHeader){let r=Object.keys(t.headers);r=r.filter(s=>!["content-encoding","transfer-encoding"].includes(s)),r.forEach(s=>{let i=t.headers[s];s==="set-cookie"&&(i=Array.isArray(i)?i:[i],i=i.map(n=>n.replace(/Domain=[^;]+?/i,""))),e.setHeader(s,i);});}else e.headers=t.headers;}});var Jg=y(yu=>{Object.defineProperty(yu,"__esModule",{value:true});yu.fixRequestBody=vE;var yE=N("querystring");function vE(t,e){if(e.readableLength!==0)return;let r=e.body;if(!r)return;let s=t.getHeader("Content-Type");if(!s)return;let i=n=>{t.setHeader("Content-Length",Buffer.byteLength(n)),t.write(n);};s.includes("application/json")||s.includes("+json")?i(JSON.stringify(r)):s.includes("application/x-www-form-urlencoded")?i(yE.stringify(r)):s.includes("multipart/form-data")&&i(CE(s,r));}function CE(t,e){let r=t.replace(/^.*boundary=(.*)$/,"$1"),s="";for(let[i,n]of Object.entries(e))s+=`--${r}\r
138
- Content-Disposition: form-data; name="${i}"\r
139
- \r
140
- ${n}\r
141
- `;return s}});var zg=y(br=>{Object.defineProperty(br,"__esModule",{value:true});br.fixRequestBody=br.responseInterceptor=void 0;var wE=Yg();Object.defineProperty(br,"responseInterceptor",{enumerable:true,get:function(){return wE.responseInterceptor}});var xE=Jg();Object.defineProperty(br,"fixRequestBody",{enumerable:true,get:function(){return xE.fixRequestBody}});});var Xg=y(Jt=>{var _E=Jt&&Jt.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),FE=Jt&&Jt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_E(e,t,r);};Object.defineProperty(Jt,"__esModule",{value:true});FE(zg(),Jt);});var Zg=y(Cu=>{Object.defineProperty(Cu,"__esModule",{value:true});Cu.legacyOptionsAdapter=SE;var EE=N("url"),AE=bt(),OE=ni(),Qr=AE.Debug.extend("legacy-options-adapter"),RE={onError:"error",onProxyReq:"proxyReq",onProxyRes:"proxyRes",onProxyReqWs:"proxyReqWs",onOpen:"open",onClose:"close"};function SE(t,e){let r={},s;if(typeof t=="string"&&EE.parse(t).host)throw new Error(`Shorthand syntax is removed from legacyCreateProxyMiddleware().
142
- Please use "legacyCreateProxyMiddleware({ target: 'http://www.example.org' })" instead.
143
-
144
- More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-shorthand-usage
145
- `);t&&e?(Qr("map legacy context/filter to options.pathFilter"),r={...e,pathFilter:t},s=vu(r),s.warn(`[http-proxy-middleware] Legacy "context" argument is deprecated. Migrate your "context" to "options.pathFilter":
146
-
147
- const options = {
148
- pathFilter: '${t}',
149
- }
150
-
151
- More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-context-argument
152
- `)):t&&!e?(r={...t},s=vu(r)):s=vu({}),Object.entries(RE).forEach(([o,a])=>{r[o]&&(r.on={...r.on},r.on[a]=r[o],Qr('map legacy event "%s" to "on.%s"',o,a),s.warn(`[http-proxy-middleware] Legacy "${o}" is deprecated. Migrate to "options.on.${a}":
153
-
154
- const options = {
155
- on: {
156
- ${a}: () => {},
157
- },
158
- }
159
-
160
- More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#refactored-proxy-events
161
- `));});let i=r.logProvider&&r.logProvider(),n=r.logLevel;return Qr("legacy logLevel",n),Qr("legacy logProvider: %O",i),typeof n=="string"&&n!=="silent"&&(Qr('map "logProvider" to "logger"'),s.warn(`[http-proxy-middleware] Legacy "logLevel" and "logProvider" are deprecated. Migrate to "options.logger":
162
-
163
- const options = {
164
- logger: console,
165
- }
166
-
167
- More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-logprovider-and-loglevel-options
168
- `)),r}function vu(t){let e=t.logProvider&&t.logProvider();return e&&(t.logger=e),(0, OE.getLogger)(t)}});var eD=y(wu=>{Object.defineProperty(wu,"__esModule",{value:true});wu.legacyCreateProxyMiddleware=$E;var TE=gu(),kE=bt(),PE=Zg(),Qg=kE.Debug.extend("legacy-create-proxy-middleware");function $E(t,e){Qg("init");let r=(0, PE.legacyOptionsAdapter)(t,e),s=(0, TE.createProxyMiddleware)(r);return Qg("add marker for patching req.url (old behavior)"),s.__LEGACY_HTTP_PROXY_MIDDLEWARE__=true,s}});var tD=y(yi=>{Object.defineProperty(yi,"__esModule",{value:true});yi.legacyCreateProxyMiddleware=void 0;var IE=eD();Object.defineProperty(yi,"legacyCreateProxyMiddleware",{enumerable:true,get:function(){return IE.legacyCreateProxyMiddleware}});});var rD=y(zt=>{var ME=zt&&zt.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),BE=zt&&zt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ME(e,t,r);};Object.defineProperty(zt,"__esModule",{value:true});BE(tD(),zt);});var sD=y(it=>{var NE=it&&it.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return e[r]}}),Object.defineProperty(t,s,i);}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r];}),vi=it&&it.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&NE(e,t,r);};Object.defineProperty(it,"__esModule",{value:true});vi(gu(),it);vi(Xg(),it);vi(Va(),it);vi(rD(),it);});var Bu=be(Mu()),{program:e1,createCommand:t1,createArgument:r1,createOption:s1,CommanderError:i1,InvalidArgumentError:n1,InvalidOptionArgumentError:o1,Command:Te,Argument:a1,Option:u1,Help:l1}=Bu.default;var Hs=be(Rt()),Lr=be(tr());function Go(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var to={},ro,Dd;function He(){if(Dd)return ro;Dd=1;let t,e,r,s,i=true;typeof process<"u"&&({FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:r,TERM:s}=process.env||{},i=process.stdout&&process.stdout.isTTY);let n={enabled:!e&&r==null&&s!=="dumb"&&(t!=null&&t!=="0"||i),reset:u(0,0),bold:u(1,22),dim:u(2,22),italic:u(3,23),underline:u(4,24),inverse:u(7,27),hidden:u(8,28),strikethrough:u(9,29),black:u(30,39),red:u(31,39),green:u(32,39),yellow:u(33,39),blue:u(34,39),magenta:u(35,39),cyan:u(36,39),white:u(37,39),gray:u(90,39),grey:u(90,39),bgBlack:u(40,49),bgRed:u(41,49),bgGreen:u(42,49),bgYellow:u(43,49),bgBlue:u(44,49),bgMagenta:u(45,49),bgCyan:u(46,49),bgWhite:u(47,49)};function o(h,l){let c=0,d,f="",m="";for(;c<h.length;c++)d=h[c],f+=d.open,m+=d.close,~l.indexOf(d.close)&&(l=l.replace(d.rgx,d.close+d.open));return f+l+m}function a(h,l){let c={has:h,keys:l};return c.reset=n.reset.bind(c),c.bold=n.bold.bind(c),c.dim=n.dim.bind(c),c.italic=n.italic.bind(c),c.underline=n.underline.bind(c),c.inverse=n.inverse.bind(c),c.hidden=n.hidden.bind(c),c.strikethrough=n.strikethrough.bind(c),c.black=n.black.bind(c),c.red=n.red.bind(c),c.green=n.green.bind(c),c.yellow=n.yellow.bind(c),c.blue=n.blue.bind(c),c.magenta=n.magenta.bind(c),c.cyan=n.cyan.bind(c),c.white=n.white.bind(c),c.gray=n.gray.bind(c),c.grey=n.grey.bind(c),c.bgBlack=n.bgBlack.bind(c),c.bgRed=n.bgRed.bind(c),c.bgGreen=n.bgGreen.bind(c),c.bgYellow=n.bgYellow.bind(c),c.bgBlue=n.bgBlue.bind(c),c.bgMagenta=n.bgMagenta.bind(c),c.bgCyan=n.bgCyan.bind(c),c.bgWhite=n.bgWhite.bind(c),c}function u(h,l){let c={open:`\x1B[${h}m`,close:`\x1B[${l}m`,rgx:new RegExp(`\\x1b\\[${l}m`,"g")};return function(d){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(h)||(this.has.push(h),this.keys.push(c)),d===void 0?this:n.enabled?o(this.keys,d+""):d+""):d===void 0?a([h],[c]):n.enabled?o([c],d+""):d+""}}return ro=n,ro}var so,bd;function tv(){return bd||(bd=1,so=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl)return t.name==="a"?"first":t.name==="c"||t.name==="d"?"abort":t.name==="e"?"last":t.name==="g"?"reset":t.name==="n"?"down":t.name==="p"?"up":void 0;if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":false}}),so}var io,yd;function Vo(){return yd||(yd=1,io=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t}),io}var no,vd;function qe(){if(vd)return no;vd=1;let t="\x1B",e=`${t}[`,r="\x07",s={to(o,a){return a?`${e}${a+1};${o+1}H`:`${e}${o+1}G`},move(o,a){let u="";return o<0?u+=`${e}${-o}D`:o>0&&(u+=`${e}${o}C`),a<0?u+=`${e}${-a}A`:a>0&&(u+=`${e}${a}B`),u},up:(o=1)=>`${e}${o}A`,down:(o=1)=>`${e}${o}B`,forward:(o=1)=>`${e}${o}C`,backward:(o=1)=>`${e}${o}D`,nextLine:(o=1)=>`${e}E`.repeat(o),prevLine:(o=1)=>`${e}F`.repeat(o),left:`${e}G`,hide:`${e}?25l`,show:`${e}?25h`,save:`${t}7`,restore:`${t}8`},i={up:(o=1)=>`${e}S`.repeat(o),down:(o=1)=>`${e}T`.repeat(o)},n={screen:`${e}2J`,up:(o=1)=>`${e}1J`.repeat(o),down:(o=1)=>`${e}J`.repeat(o),line:`${e}2K`,lineEnd:`${e}K`,lineStart:`${e}1K`,lines(o){let a="";for(let u=0;u<o;u++)a+=this.line+(u<o-1?s.up():"");return o&&(a+=s.left),a}};return no={cursor:s,scroll:i,erase:n,beep:r},no}var oo,Cd;function rv(){if(Cd)return oo;Cd=1;let t=Vo(),{erase:e,cursor:r}=qe(),s=i=>[...t(i)].length;return oo=function(i,n){if(!n)return e.line+r.to(0);let o=0,a=i.split(/\r?\n/);for(let u of a)o+=1+Math.floor(Math.max(s(u)-1,0)/n);return e.lines(o)},oo}var ao,wd;function pf(){if(wd)return ao;wd=1;let t={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},e={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"};return ao=process.platform==="win32"?e:t,ao}var uo,xd;function sv(){if(xd)return uo;xd=1;let t=He(),e=pf(),r=Object.freeze({password:{scale:1,render:u=>"*".repeat(u.length)},emoji:{scale:2,render:u=>"\u{1F603}".repeat(u.length)},invisible:{scale:0,render:u=>""},default:{scale:1,render:u=>`${u}`}}),s=u=>r[u]||r.default,i=Object.freeze({aborted:t.red(e.cross),done:t.green(e.tick),exited:t.yellow(e.cross),default:t.cyan("?")});return uo={styles:r,render:s,symbols:i,symbol:(u,h,l)=>h?i.aborted:l?i.exited:u?i.done:i.default,delimiter:u=>t.gray(u?e.ellipsis:e.pointerSmall),item:(u,h)=>t.gray(u?h?e.pointerSmall:"+":e.line)},uo}var lo,_d;function iv(){if(_d)return lo;_d=1;let t=Vo();return lo=function(e,r){let s=String(t(e)||"").split(/\r?\n/);return r?s.map(i=>Math.ceil(i.length/r)).reduce((i,n)=>i+n):s.length},lo}var co,Fd;function nv(){return Fd||(Fd=1,co=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return (t||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((n,o)=>(o.length+r.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${r}${o}`),n),[r]).join(`
169
- `)).join(`
170
- `)}),co}var ho,Ed;function ov(){return Ed||(Ed=1,ho=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let i=Math.min(s+r,e);return {startIndex:s,endIndex:i}}),ho}var fo,Ad;function Ze(){return Ad||(Ad=1,fo={action:tv(),clear:rv(),style:sv(),strip:Vo(),figures:pf(),lines:iv(),wrap:nv(),entriesToDisplay:ov()}),fo}var po,Od;function Ft(){if(Od)return po;Od=1;let t=hf__default.default,{action:e}=Ze(),r=qy__default.default,{beep:s,cursor:i}=qe(),n=He();class o extends r{constructor(u={}){super(),this.firstRender=true,this.in=u.stdin||process.stdin,this.out=u.stdout||process.stdout,this.onRender=(u.onRender||(()=>{})).bind(this);let h=t.createInterface({input:this.in,escapeCodeTimeout:50});t.emitKeypressEvents(this.in,h),this.in.isTTY&&this.in.setRawMode(true);let l=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,c=(d,f)=>{let m=e(f,l);m===false?this._&&this._(d,f):typeof this[m]=="function"?this[m](f):this.bell();};this.close=()=>{this.out.write(i.show),this.in.removeListener("keypress",c),this.in.isTTY&&this.in.setRawMode(false),h.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=true;},this.in.on("keypress",c);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(s);}render(){this.onRender(n),this.firstRender&&(this.firstRender=false);}}return po=o,po}var mo,Rd;function av(){if(Rd)return mo;Rd=1;let t=He(),e=Ft(),{erase:r,cursor:s}=qe(),{style:i,clear:n,lines:o,figures:a}=Ze();class u extends e{constructor(l={}){super(l),this.transform=i.render(l.style),this.scale=this.transform.scale,this.msg=l.message,this.initial=l.initial||"",this.validator=l.validate||(()=>true),this.value="",this.errorMsg=l.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=n("",this.out.columns),this.render();}set value(l){!l&&this.initial?(this.placeholder=true,this.rendered=t.gray(this.transform.render(this.initial))):(this.placeholder=false,this.rendered=this.transform.render(l)),this._value=l,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=true,this.error=false,this.red=false,this.fire(),this.render(),this.out.write(`
171
- `),this.close();}async validate(){let l=await this.validator(this.value);typeof l=="string"&&(this.errorMsg=l,l=false),this.error=!l;}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=true,this.fire(),this.render();return}this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
172
- `),this.close();}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(l){this.placeholder||(this.cursor=this.cursor+l,this.cursorOffset+=l);}_(l,c){let d=this.value.slice(0,this.cursor),f=this.value.slice(this.cursor);this.value=`${d}${l}${f}`,this.red=false,this.cursor=this.placeholder?0:d.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let l=this.value.slice(0,this.cursor-1),c=this.value.slice(this.cursor);this.value=`${l}${c}`,this.red=false,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let l=this.value.slice(0,this.cursor),c=this.value.slice(this.cursor+1);this.value=`${l}${c}`,this.red=false,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(s.down(o(this.outputError,this.out.columns)-1)+n(this.outputError,this.out.columns)),this.out.write(n(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(this.done),this.red?t.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
173
- `).reduce((l,c,d)=>l+`
174
- ${d?" ":a.pointerSmall} ${t.red().italic(c)}`,"")),this.out.write(r.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore+s.move(this.cursorOffset,0)));}}return mo=u,mo}var go,Sd;function uv(){if(Sd)return go;Sd=1;let t=He(),e=Ft(),{style:r,clear:s,figures:i,wrap:n,entriesToDisplay:o}=Ze(),{cursor:a}=qe();class u extends e{constructor(l={}){super(l),this.msg=l.message,this.hint=l.hint||"- Use arrow-keys. Return to submit.",this.warn=l.warn||"- This option is disabled",this.cursor=l.initial||0,this.choices=l.choices.map((c,d)=>(typeof c=="string"&&(c={title:c,value:d}),{title:c&&(c.title||c.value||c),value:c&&(c.value===void 0?d:c.value),description:c&&c.description,selected:c&&c.selected,disabled:c&&c.disabled})),this.optionsPerPage=l.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=s("",this.out.columns),this.render();}moveCursor(l){this.cursor=l,this.value=this.choices[l].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
175
- `),this.close();}submit(){this.selection.disabled?this.bell():(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
176
- `),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(l,c){if(l===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(a.hide):this.out.write(s(this.outputText,this.out.columns)),super.render();let{startIndex:l,endIndex:c}=o(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(false),this.done?this.selection.title:this.selection.disabled?t.yellow(this.warn):t.gray(this.hint)].join(" "),!this.done){this.outputText+=`
177
- `;for(let d=l;d<c;d++){let f,m,g="",D=this.choices[d];d===l&&l>0?m=i.arrowUp:d===c-1&&c<this.choices.length?m=i.arrowDown:m=" ",D.disabled?(f=this.cursor===d?t.gray().underline(D.title):t.strikethrough().gray(D.title),m=(this.cursor===d?t.bold().gray(i.pointer)+" ":" ")+m):(f=this.cursor===d?t.cyan().underline(D.title):D.title,m=(this.cursor===d?t.cyan(i.pointer)+" ":" ")+m,D.description&&this.cursor===d&&(g=` - ${D.description}`,(m.length+f.length+g.length>=this.out.columns||D.description.split(/\r?\n/).length>1)&&(g=`
178
- `+n(D.description,{margin:3,width:this.out.columns})))),this.outputText+=`${m} ${f}${t.gray(g)}
179
- `;}}this.out.write(this.outputText);}}return go=u,go}var Do,Td;function lv(){if(Td)return Do;Td=1;let t=He(),e=Ft(),{style:r,clear:s}=Ze(),{cursor:i,erase:n}=qe();class o extends e{constructor(u={}){super(u),this.msg=u.message,this.value=!!u.initial,this.active=u.active||"on",this.inactive=u.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
180
- `),this.close();}submit(){this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
181
- `),this.close();}deactivate(){if(this.value===false)return this.bell();this.value=false,this.render();}activate(){if(this.value===true)return this.bell();this.value=true,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(u,h){if(u===" ")this.value=!this.value;else if(u==="1")this.value=true;else if(u==="0")this.value=false;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(i.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(this.done),this.value?this.inactive:t.cyan().underline(this.inactive),t.gray("/"),this.value?t.cyan().underline(this.active):this.active].join(" "),this.out.write(n.line+i.to(0)+this.outputText));}}return Do=o,Do}var bo,kd;function ft(){if(kd)return bo;kd=1;class t{constructor({token:r,date:s,parts:i,locales:n}){this.token=r,this.date=s||new Date,this.parts=i||[this],this.locales=n||{};}up(){}down(){}next(){let r=this.parts.indexOf(this);return this.parts.find((s,i)=>i>r&&s instanceof t)}setTo(r){}prev(){let r=[].concat(this.parts).reverse(),s=r.indexOf(this);return r.find((i,n)=>n>s&&i instanceof t)}toString(){return String(this.date)}}return bo=t,bo}var yo,Pd;function cv(){if(Pd)return yo;Pd=1;let t=ft();class e extends t{constructor(s={}){super(s);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let s=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?s.toUpperCase():s}}return yo=e,yo}var vo,$d;function hv(){if($d)return vo;$d=1;let t=ft(),e=s=>(s=s%10,s===1?"st":s===2?"nd":s===3?"rd":"th");class r extends t{constructor(i={}){super(i);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(i){this.date.setDate(parseInt(i.substr(-2)));}toString(){let i=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(i).padStart(2,"0"):this.token==="Do"?i+e(i):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:i}}return vo=r,vo}var Co,Id;function dv(){if(Id)return Co;Id=1;let t=ft();class e extends t{constructor(s={}){super(s);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(s){this.date.setHours(parseInt(s.substr(-2)));}toString(){let s=this.date.getHours();return /h/.test(this.token)&&(s=s%12||12),this.token.length>1?String(s).padStart(2,"0"):s}}return Co=e,Co}var wo,Md;function fv(){if(Md)return wo;Md=1;let t=ft();class e extends t{constructor(s={}){super(s);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(s){this.date.setMilliseconds(parseInt(s.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return wo=e,wo}var xo,Bd;function pv(){if(Bd)return xo;Bd=1;let t=ft();class e extends t{constructor(s={}){super(s);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(s){this.date.setMinutes(parseInt(s.substr(-2)));}toString(){let s=this.date.getMinutes();return this.token.length>1?String(s).padStart(2,"0"):s}}return xo=e,xo}var _o,Nd;function mv(){if(Nd)return _o;Nd=1;let t=ft();class e extends t{constructor(s={}){super(s);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(s){s=parseInt(s.substr(-2))-1,this.date.setMonth(s<0?0:s);}toString(){let s=this.date.getMonth(),i=this.token.length;return i===2?String(s+1).padStart(2,"0"):i===3?this.locales.monthsShort[s]:i===4?this.locales.months[s]:String(s+1)}}return _o=e,_o}var Fo,Hd;function gv(){if(Hd)return Fo;Hd=1;let t=ft();class e extends t{constructor(s={}){super(s);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(s){this.date.setSeconds(parseInt(s.substr(-2)));}toString(){let s=this.date.getSeconds();return this.token.length>1?String(s).padStart(2,"0"):s}}return Fo=e,Fo}var Eo,qd;function Dv(){if(qd)return Eo;qd=1;let t=ft();class e extends t{constructor(s={}){super(s);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(s){this.date.setFullYear(s.substr(-4));}toString(){let s=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?s.substr(-2):s}}return Eo=e,Eo}var Ao,Ld;function bv(){return Ld||(Ld=1,Ao={DatePart:ft(),Meridiem:cv(),Day:hv(),Hours:dv(),Milliseconds:fv(),Minutes:pv(),Month:mv(),Seconds:gv(),Year:Dv()}),Ao}var Oo,jd;function yv(){if(jd)return Oo;jd=1;let t=He(),e=Ft(),{style:r,clear:s,figures:i}=Ze(),{erase:n,cursor:o}=qe(),{DatePart:a,Meridiem:u,Day:h,Hours:l,Milliseconds:c,Minutes:d,Month:f,Seconds:m,Year:g}=bv(),D=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,x={1:({token:C})=>C.replace(/\\(.)/g,"$1"),2:C=>new h(C),3:C=>new f(C),4:C=>new g(C),5:C=>new u(C),6:C=>new l(C),7:C=>new d(C),8:C=>new m(C),9:C=>new c(C)},b={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class v extends e{constructor(E={}){super(E),this.msg=E.message,this.cursor=0,this.typed="",this.locales=Object.assign(b,E.locales),this._date=E.initial||new Date,this.errorMsg=E.error||"Please Enter A Valid Value",this.validator=E.validate||(()=>true),this.mask=E.mask||"YYYY-MM-DD HH:mm:ss",this.clear=s("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(E){E&&this._date.setTime(E.getTime());}set mask(E){let R;for(this.parts=[];R=D.exec(E);){let A=R.shift(),T=R.findIndex(U=>U!=null);this.parts.push(T in x?x[T]({token:R[T]||A,date:this.date,parts:this.parts,locales:this.locales}):R[T]||A);}let P=this.parts.reduce((A,T)=>(typeof T=="string"&&typeof A[A.length-1]=="string"?A[A.length-1]+=T:A.push(T),A),[]);this.parts.splice(0),this.parts.push(...P),this.reset();}moveCursor(E){this.typed="",this.cursor=E,this.fire();}reset(){this.moveCursor(this.parts.findIndex(E=>E instanceof a)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
182
- `),this.close();}async validate(){let E=await this.validator(this.value);typeof E=="string"&&(this.errorMsg=E,E=false),this.error=!E;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
183
- `),this.close();}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let E=this.parts[this.cursor].prev();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render();}right(){let E=this.parts[this.cursor].next();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render();}next(){let E=this.parts[this.cursor].next();this.moveCursor(E?this.parts.indexOf(E):this.parts.findIndex(R=>R instanceof a)),this.render();}_(E){/\d/.test(E)&&(this.typed+=E,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(false),this.parts.reduce((E,R,P)=>E.concat(P===this.cursor&&!this.done?t.cyan().underline(R.toString()):R),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
184
- `).reduce((E,R,P)=>E+`
185
- ${P?" ":i.pointerSmall} ${t.red().italic(R)}`,"")),this.out.write(n.line+o.to(0)+this.outputText));}}return Oo=v,Oo}var Ro,Gd;function vv(){if(Gd)return Ro;Gd=1;let t=He(),e=Ft(),{cursor:r,erase:s}=qe(),{style:i,figures:n,clear:o,lines:a}=Ze(),u=/[0-9]/,h=d=>d!==void 0,l=(d,f)=>{let m=Math.pow(10,f);return Math.round(d*m)/m};class c extends e{constructor(f={}){super(f),this.transform=i.render(f.style),this.msg=f.message,this.initial=h(f.initial)?f.initial:"",this.float=!!f.float,this.round=f.round||2,this.inc=f.increment||1,this.min=h(f.min)?f.min:-1/0,this.max=h(f.max)?f.max:1/0,this.errorMsg=f.error||"Please Enter A Valid Value",this.validator=f.validate||(()=>true),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(f){!f&&f!==0?(this.placeholder=true,this.rendered=t.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${l(f,this.round)}`),this._value=l(f,this.round)),this.fire();}get value(){return this._value}parse(f){return this.float?parseFloat(f):parseInt(f)}valid(f){return f==="-"||f==="."&&this.float||u.test(f)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let f=this.value;this.value=f!==""?f:this.initial,this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
186
- `),this.close();}async validate(){let f=await this.validator(this.value);typeof f=="string"&&(this.errorMsg=f,f=false),this.error=!f;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let f=this.value;this.value=f!==""?f:this.initial,this.done=true,this.aborted=false,this.error=false,this.fire(),this.render(),this.out.write(`
187
- `),this.close();}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let f=this.value.toString();if(f.length===0)return this.bell();this.value=this.parse(f=f.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(f,m){if(!this.valid(f))return this.bell();let g=Date.now();if(g-this.lastHit>1e3&&(this.typed=""),this.typed+=f,this.lastHit=g,this.color="cyan",f===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(r.down(a(this.outputError,this.out.columns)-1)+o(this.outputError,this.out.columns)),this.out.write(o(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(this.done),!this.done||!this.done&&!this.placeholder?t[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
188
- `).reduce((f,m,g)=>f+`
189
- ${g?" ":n.pointerSmall} ${t.red().italic(m)}`,"")),this.out.write(s.line+r.to(0)+this.outputText+r.save+this.outputError+r.restore));}}return Ro=c,Ro}var So,Vd;function mf(){if(Vd)return So;Vd=1;let t=He(),{cursor:e}=qe(),r=Ft(),{clear:s,figures:i,style:n,wrap:o,entriesToDisplay:a}=Ze();class u extends r{constructor(l={}){super(l),this.msg=l.message,this.cursor=l.cursor||0,this.scrollIndex=l.cursor||0,this.hint=l.hint||"",this.warn=l.warn||"- This option is disabled -",this.minSelected=l.min,this.showMinError=false,this.maxChoices=l.max,this.instructions=l.instructions,this.optionsPerPage=l.optionsPerPage||10,this.value=l.choices.map((c,d)=>(typeof c=="string"&&(c={title:c,value:d}),{title:c&&(c.title||c.value||c),description:c&&c.description,value:c&&(c.value===void 0?d:c.value),selected:c&&c.selected,disabled:c&&c.disabled})),this.clear=s("",this.out.columns),l.overrideRender||this.render();}reset(){this.value.map(l=>!l.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(l=>l.selected)}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
190
- `),this.close();}submit(){let l=this.value.filter(c=>c.selected);this.minSelected&&l.length<this.minSelected?(this.showMinError=true,this.render()):(this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
191
- `),this.close());}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.value.length,this.render();}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render();}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.value[this.cursor].selected=false,this.render();}right(){if(this.value.filter(l=>l.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true,this.render();}handleSpaceToggle(){let l=this.value[this.cursor];if(l.selected)l.selected=false,this.render();else {if(l.disabled||this.value.filter(c=>c.selected).length>=this.maxChoices)return this.bell();l.selected=true,this.render();}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let l=!this.value[this.cursor].selected;this.value.filter(c=>!c.disabled).forEach(c=>c.selected=l),this.render();}_(l,c){if(l===" ")this.handleSpaceToggle();else if(l==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
192
- Instructions:
193
- ${i.arrowUp}/${i.arrowDown}: Highlight option
194
- ${i.arrowLeft}/${i.arrowRight}/[space]: Toggle selection
195
- `+(this.maxChoices===void 0?` a: Toggle all
196
- `:"")+" enter/return: Complete answer":""}renderOption(l,c,d,f){let m=(c.selected?t.green(i.radioOn):i.radioOff)+" "+f+" ",g,D;return c.disabled?g=l===d?t.gray().underline(c.title):t.strikethrough().gray(c.title):(g=l===d?t.cyan().underline(c.title):c.title,l===d&&c.description&&(D=` - ${c.description}`,(m.length+g.length+D.length>=this.out.columns||c.description.split(/\r?\n/).length>1)&&(D=`
197
- `+o(c.description,{margin:m.length,width:this.out.columns})))),m+g+t.gray(D||"")}paginateOptions(l){if(l.length===0)return t.red("No matches for this query.");let{startIndex:c,endIndex:d}=a(this.cursor,l.length,this.optionsPerPage),f,m=[];for(let g=c;g<d;g++)g===c&&c>0?f=i.arrowUp:g===d-1&&d<l.length?f=i.arrowDown:f=" ",m.push(this.renderOption(this.cursor,l[g],g,f));return `
198
- `+m.join(`
199
- `)}renderOptions(l){return this.done?"":this.paginateOptions(l)}renderDoneOrInstructions(){if(this.done)return this.value.filter(c=>c.selected).map(c=>c.title).join(", ");let l=[t.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&l.push(t.yellow(this.warn)),l.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(e.hide),super.render();let l=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(l+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),l+=this.renderOptions(this.value),this.out.write(this.clear+l),this.clear=s(l,this.out.columns);}}return So=u,So}var To,Ud;function Cv(){if(Ud)return To;Ud=1;let t=He(),e=Ft(),{erase:r,cursor:s}=qe(),{style:i,clear:n,figures:o,wrap:a,entriesToDisplay:u}=Ze(),h=(f,m)=>f[m]&&(f[m].value||f[m].title||f[m]),l=(f,m)=>f[m]&&(f[m].title||f[m].value||f[m]),c=(f,m)=>{let g=f.findIndex(D=>D.value===m||D.title===m);return g>-1?g:void 0};class d extends e{constructor(m={}){super(m),this.msg=m.message,this.suggest=m.suggest,this.choices=m.choices,this.initial=typeof m.initial=="number"?m.initial:c(m.choices,m.initial),this.select=this.initial||m.cursor||0,this.i18n={noMatches:m.noMatches||"no matches found"},this.fallback=m.fallback||this.initial,this.clearFirst=m.clearFirst||false,this.suggestions=[],this.input="",this.limit=m.limit||10,this.cursor=0,this.transform=i.render(m.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=n("",this.out.columns),this.complete(this.render),this.render();}set fallback(m){this._fb=Number.isSafeInteger(parseInt(m))?parseInt(m):m;}get fallback(){let m;return typeof this._fb=="number"?m=this.choices[this._fb]:typeof this._fb=="string"&&(m={title:this._fb}),m||this._fb||{title:this.i18n.noMatches}}moveSelect(m){this.select=m,this.suggestions.length>0?this.value=h(this.suggestions,m):this.value=this.fallback.value,this.fire();}async complete(m){let g=this.completing=this.suggest(this.input,this.choices),D=await g;if(this.completing!==g)return;this.suggestions=D.map((b,v,C)=>({title:l(C,v),value:h(C,v),description:b.description})),this.completing=false;let x=Math.max(D.length-1,0);this.moveSelect(Math.min(x,this.select)),m&&m();}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
200
- `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
201
- `),this.close();}submit(){this.done=true,this.aborted=this.exited=false,this.fire(),this.render(),this.out.write(`
202
- `),this.close();}_(m,g){let D=this.input.slice(0,this.cursor),x=this.input.slice(this.cursor);this.input=`${D}${m}${x}`,this.cursor=D.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let m=this.input.slice(0,this.cursor-1),g=this.input.slice(this.cursor);this.input=`${m}${g}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let m=this.input.slice(0,this.cursor),g=this.input.slice(this.cursor+1);this.input=`${m}${g}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(m,g,D,x){let b,v=D?o.arrowUp:x?o.arrowDown:" ",C=g?t.cyan().underline(m.title):m.title;return v=(g?t.cyan(o.pointer)+" ":" ")+v,m.description&&(b=` - ${m.description}`,(v.length+C.length+b.length>=this.out.columns||m.description.split(/\r?\n/).length>1)&&(b=`
203
- `+a(m.description,{margin:3,width:this.out.columns}))),v+" "+C+t.gray(b||"")}render(){if(this.closed)return;this.firstRender?this.out.write(s.hide):this.out.write(n(this.outputText,this.out.columns)),super.render();let{startIndex:m,endIndex:g}=u(this.select,this.choices.length,this.limit);if(this.outputText=[i.symbol(this.done,this.aborted,this.exited),t.bold(this.msg),i.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let D=this.suggestions.slice(m,g).map((x,b)=>this.renderOption(x,this.select===b+m,b===0&&m>0,b+m===g-1&&g<this.choices.length)).join(`
204
- `);this.outputText+=`
205
- `+(D||t.gray(this.fallback.title));}this.out.write(r.line+s.to(0)+this.outputText);}}return To=d,To}var ko,Wd;function wv(){if(Wd)return ko;Wd=1;let t=He(),{cursor:e}=qe(),r=mf(),{clear:s,style:i,figures:n}=Ze();class o extends r{constructor(u={}){u.overrideRender=true,super(u),this.inputValue="",this.clear=s("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=false,this.render();}right(){if(this.value.filter(u=>u.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let u=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(l=>this.inputValue?!!(typeof l.title=="string"&&l.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof l.value=="string"&&l.value.toLowerCase().includes(this.inputValue.toLowerCase())):true);let h=this.filteredOptions.findIndex(l=>l===u);this.cursor=h<0?0:h,this.render();}handleSpaceToggle(){let u=this.filteredOptions[this.cursor];if(u.selected)u.selected=false,this.render();else {if(u.disabled||this.value.filter(h=>h.selected).length>=this.maxChoices)return this.bell();u.selected=true,this.render();}}handleInputChange(u){this.inputValue=this.inputValue+u,this.updateFilteredOptions();}_(u,h){u===" "?this.handleSpaceToggle():this.handleInputChange(u);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
206
- Instructions:
207
- ${n.arrowUp}/${n.arrowDown}: Highlight option
208
- ${n.arrowLeft}/${n.arrowRight}/[space]: Toggle selection
209
- [a,b,c]/delete: Filter choices
210
- enter/return: Complete answer
211
- `:""}renderCurrentInput(){return `
212
- Filtered results for: ${this.inputValue?this.inputValue:t.gray("Enter something to filter")}
213
- `}renderOption(u,h,l,c){let d=(h.selected?t.green(n.radioOn):n.radioOff)+" "+c+" ",f;return h.disabled?f=u===l?t.gray().underline(h.title):t.strikethrough().gray(h.title):f=u===l?t.cyan().underline(h.title):h.title,d+f}renderDoneOrInstructions(){if(this.done)return this.value.filter(h=>h.selected).map(h=>h.title).join(", ");let u=[t.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&u.push(t.yellow(this.warn)),u.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(e.hide),super.render();let u=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(u+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),u+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+u),this.clear=s(u,this.out.columns);}}return ko=o,ko}var Po,Kd;function xv(){if(Kd)return Po;Kd=1;let t=He(),e=Ft(),{style:r,clear:s}=Ze(),{erase:i,cursor:n}=qe();class o extends e{constructor(u={}){super(u),this.msg=u.message,this.value=u.initial,this.initialValue=!!u.initial,this.yesMsg=u.yes||"yes",this.yesOption=u.yesOption||"(Y/n)",this.noMsg=u.no||"no",this.noOption=u.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.fire(),this.render(),this.out.write(`
214
- `),this.close();}submit(){this.value=this.value||false,this.done=true,this.aborted=false,this.fire(),this.render(),this.out.write(`
215
- `),this.close();}_(u,h){return u.toLowerCase()==="y"?(this.value=true,this.submit()):u.toLowerCase()==="n"?(this.value=false,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(n.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[r.symbol(this.done,this.aborted),t.bold(this.msg),r.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:t.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(i.line+n.to(0)+this.outputText));}}return Po=o,Po}var $o,Yd;function _v(){return Yd||(Yd=1,$o={TextPrompt:av(),SelectPrompt:uv(),TogglePrompt:lv(),DatePrompt:yv(),NumberPrompt:vv(),MultiselectPrompt:mf(),AutocompletePrompt:Cv(),AutocompleteMultiselectPrompt:wv(),ConfirmPrompt:xv()}),$o}var Jd;function Fv(){return Jd||(Jd=1,function(t){let e=t,r=_v(),s=o=>o;function i(o,a,u={}){return new Promise((h,l)=>{let c=new r[o](a),d=u.onAbort||s,f=u.onSubmit||s,m=u.onExit||s;c.on("state",a.onState||s),c.on("submit",g=>h(f(g))),c.on("exit",g=>h(m(g))),c.on("abort",g=>l(d(g)));})}e.text=o=>i("TextPrompt",o),e.password=o=>(o.style="password",e.text(o)),e.invisible=o=>(o.style="invisible",e.text(o)),e.number=o=>i("NumberPrompt",o),e.date=o=>i("DatePrompt",o),e.confirm=o=>i("ConfirmPrompt",o),e.list=o=>{let a=o.separator||",";return i("TextPrompt",o,{onSubmit:u=>u.split(a).map(h=>h.trim())})},e.toggle=o=>i("TogglePrompt",o),e.select=o=>i("SelectPrompt",o),e.multiselect=o=>{o.choices=[].concat(o.choices||[]);let a=u=>u.filter(h=>h.selected).map(h=>h.value);return i("MultiselectPrompt",o,{onAbort:a,onSubmit:a})},e.autocompleteMultiselect=o=>{o.choices=[].concat(o.choices||[]);let a=u=>u.filter(h=>h.selected).map(h=>h.value);return i("AutocompleteMultiselectPrompt",o,{onAbort:a,onSubmit:a})};let n=(o,a)=>Promise.resolve(a.filter(u=>u.title.slice(0,o.length).toLowerCase()===o.toLowerCase()));e.autocomplete=o=>(o.suggest=o.suggest||n,o.choices=[].concat(o.choices||[]),i("AutocompletePrompt",o));}(to)),to}var Io,zd;function Ev(){if(zd)return Io;zd=1;let t=Fv(),e=["suggest","format","onState","validate","onRender","type"],r=()=>{};async function s(a=[],{onSubmit:u=r,onCancel:h=r}={}){let l={},c=s._override||{};a=[].concat(a);let d,f,m,g,D,x,b=async(v,C,E=false)=>{if(!(!E&&v.validate&&v.validate(C)!==true))return v.format?await v.format(C,l):C};for(f of a)if({name:g,type:D}=f,typeof D=="function"&&(D=await D(d,{...l},f),f.type=D),!!D){for(let v in f){if(e.includes(v))continue;let C=f[v];f[v]=typeof C=="function"?await C(d,{...l},x):C;}if(x=f,typeof f.message!="string")throw new Error("prompt message is required");if({name:g,type:D}=f,t[D]===void 0)throw new Error(`prompt type (${D}) is not defined`);if(c[f.name]!==void 0&&(d=await b(f,c[f.name]),d!==void 0)){l[g]=d;continue}try{d=s._injected?i(s._injected,f.initial):await t[D](f),l[g]=d=await b(f,d,!0),m=await u(f,d,l);}catch{m=!await h(f,l);}if(m)return l}return l}function i(a,u){let h=a.shift();if(h instanceof Error)throw h;return h===void 0?u:h}function n(a){s._injected=(s._injected||[]).concat(a);}function o(a){s._override=Object.assign({},a);}return Io=Object.assign(s,{prompt:s,prompts:t,inject:n,override:o}),Io}var Mo,Xd;function Av(){return Xd||(Xd=1,Mo=Ev()),Mo}var Ov=Av(),Rv=Go(Ov);var bf=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],jo={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},yf={bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/v8/configuring-npm/install"};async function Mv(t={}){let{cwd:e,onUnknown:r}=t;for(let s of Bv(e)){for(let n of Object.keys(jo))if(await vf($t__default.default.join(s,n))){let o=jo[n],a=await Qd($t__default.default.join(s,"package.json"),r);return a||{name:o,agent:o}}let i=await Qd($t__default.default.join(s,"package.json"),r);if(i)return i}return null}function*Bv(t=Ve__default.default.cwd()){let e=$t__default.default.resolve(t),{root:r}=$t__default.default.parse(e);for(;e&&e!==r;)yield e,e=$t__default.default.dirname(e);}async function Qd(t,e){return !t||!await vf(t)?null:Nv(t,e)}function Nv(t,e){try{let r=JSON.parse(df__default.default.readFileSync(t,"utf8")),s;if(typeof r.packageManager=="string"){let[i,n]=r.packageManager.replace(/^\^/,"").split("@"),o=n;return i==="yarn"&&Number.parseInt(n)>1?(s="yarn@berry",o="berry",{name:i,agent:s,version:o}):i==="pnpm"&&Number.parseInt(n)<7?(s="pnpm@6",{name:i,agent:s,version:o}):bf.includes(i)?(s=i,{name:i,agent:s,version:o}):e?.(r.packageManager)??null}}catch{}return null}async function vf(t){try{if((await ff__default.default.stat(t)).isFile())return !0}catch{}return false}var K="\x1B[",kr="\x1B]",sr="\x07",Fs=";",Cf=process.env.TERM_PROGRAM==="Apple_Terminal",L={};L.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?K+(t+1)+"G":K+(e+1)+";"+(t+1)+"H"};L.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=K+-t+"D":t>0&&(r+=K+t+"C"),e<0?r+=K+-e+"A":e>0&&(r+=K+e+"B"),r};L.cursorUp=(t=1)=>K+t+"A";L.cursorDown=(t=1)=>K+t+"B";L.cursorForward=(t=1)=>K+t+"C";L.cursorBackward=(t=1)=>K+t+"D";L.cursorLeft=K+"G";L.cursorSavePosition=Cf?"\x1B7":K+"s";L.cursorRestorePosition=Cf?"\x1B8":K+"u";L.cursorGetPosition=K+"6n";L.cursorNextLine=K+"E";L.cursorPrevLine=K+"F";L.cursorHide=K+"?25l";L.cursorShow=K+"?25h";L.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=L.eraseLine+(r<t-1?L.cursorUp():"");return t&&(e+=L.cursorLeft),e};L.eraseEndLine=K+"K";L.eraseStartLine=K+"1K";L.eraseLine=K+"2K";L.eraseDown=K+"J";L.eraseUp=K+"1J";L.eraseScreen=K+"2J";L.scrollUp=K+"S";L.scrollDown=K+"T";L.clearScreen="\x1Bc";L.clearTerminal=process.platform==="win32"?`${L.eraseScreen}${K}0f`:`${L.eraseScreen}${K}3J${K}H`;L.beep=sr;L.link=(t,e)=>[kr,"8",Fs,Fs,e,sr,t,kr,"8",Fs,Fs,sr].join("");L.image=(t,e={})=>{let r=`${kr}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===false&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+sr};L.iTerm={setCwd:(t=process.cwd())=>`${kr}50;CurrentDir=${t}${sr}`,annotation:(t,e={})=>{let r=`${kr}1337;`,s=typeof e.x<"u",i=typeof e.y<"u";if((s||i)&&!(s&&i&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(s?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+sr}};var Bo,ef;function wf(){return ef||(ef=1,Bo=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}),Bo}var No,tf;function Hv(){if(tf)return No;tf=1;let t=zy__default.default,e=kf__default.default,r=wf(),{env:s}=process,i;r("no-color")||r("no-colors")||r("color=false")||r("color=never")?i=0:(r("color")||r("colors")||r("color=true")||r("color=always"))&&(i=1),"FORCE_COLOR"in s&&(s.FORCE_COLOR==="true"?i=1:s.FORCE_COLOR==="false"?i=0:i=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3));function n(u){return u===0?false:{level:u,hasBasic:true,has256:u>=2,has16m:u>=3}}function o(u,h){if(i===0)return 0;if(r("color=16m")||r("color=full")||r("color=truecolor"))return 3;if(r("color=256"))return 2;if(u&&!h&&i===void 0)return 0;let l=i||0;if(s.TERM==="dumb")return l;if(process.platform==="win32"){let c=t.release().split(".");return Number(c[0])>=10&&Number(c[2])>=10586?Number(c[2])>=14931?3:2:1}if("CI"in s)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(c=>c in s)||s.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in s)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if(s.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in s){let c=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case "iTerm.app":return c>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:l}function a(u){let h=o(u,u&&u.isTTY);return n(h)}return No={supportsColor:a,stdout:n(o(true,e.isatty(1))),stderr:n(o(true,e.isatty(2)))},No}var Ho,rf;function qv(){if(rf)return Ho;rf=1;let t=Hv(),e=wf();function r(i){if(/^\d{3,4}$/.test(i)){let o=/(\d{1,2})(\d{2})/.exec(i);return {major:0,minor:parseInt(o[1],10),patch:parseInt(o[2],10)}}let n=(i||"").split(".").map(o=>parseInt(o,10));return {major:n[0],minor:n[1],patch:n[2]}}function s(i){let{env:n}=process;if("FORCE_HYPERLINK"in n)return !(n.FORCE_HYPERLINK.length>0&&parseInt(n.FORCE_HYPERLINK,10)===0);if(e("no-hyperlink")||e("no-hyperlinks")||e("hyperlink=false")||e("hyperlink=never"))return false;if(e("hyperlink=true")||e("hyperlink=always"))return true;if(!t.supportsColor(i)||i&&!i.isTTY||process.platform==="win32")return false;if("NETLIFY"in n)return true;if("CI"in n||"TEAMCITY_VERSION"in n)return false;if("TERM_PROGRAM"in n){let o=r(n.TERM_PROGRAM_VERSION);switch(n.TERM_PROGRAM){case "iTerm.app":return o.major===3?o.minor>=1:o.major>3}}if("VTE_VERSION"in n){if(n.VTE_VERSION==="0.50.0")return false;let o=r(n.VTE_VERSION);return o.major>0||o.minor>=50}return false}return Ho={supportsHyperlink:s,stdout:s(process.stdout),stderr:s(process.stderr)},Ho}var Lv=qv(),Uo=Go(Lv);function Pr(t,e,{target:r="stdout",...s}={}){return Uo[r]?L.link(t,e):s.fallback===false?t:typeof s.fallback=="function"?s.fallback(t,e):`${t} (\u200B${e}\u200B)`}Pr.isSupported=Uo.stdout;Pr.stderr=(t,e,r={})=>Pr(t,e,{target:"stderr",...r});Pr.stderr.isSupported=Uo.stderr;var rr=module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href))),jv=Object.create,xf=Object.defineProperty,Gv=Object.getOwnPropertyDescriptor,Vv=Object.getOwnPropertyNames,Uv=Object.getPrototypeOf,Wv=Object.prototype.hasOwnProperty,Et=(t=>typeof rr<"u"?rr:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof rr<"u"?rr:e)[r]}):t)(function(t){if(typeof rr<"u")return rr.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Kv=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Vv(e))!Wv.call(t,i)&&i!==r&&xf(t,i,{get:()=>e[i],enumerable:!(s=Gv(e,i))||s.enumerable});return t},Yv=(t,e,r)=>(r=t!=null?jv(Uv(t)):{},Kv(xf(r,"default",{value:t,enumerable:true}),t)),Jv=Ee((t,e)=>{e.exports=n,n.sync=o;var r=Et("fs");function s(a,u){var h=u.pathExt!==void 0?u.pathExt:process.env.PATHEXT;if(!h||(h=h.split(";"),h.indexOf("")!==-1))return true;for(var l=0;l<h.length;l++){var c=h[l].toLowerCase();if(c&&a.substr(-c.length).toLowerCase()===c)return true}return false}function i(a,u,h){return !a.isSymbolicLink()&&!a.isFile()?false:s(u,h)}function n(a,u,h){r.stat(a,function(l,c){h(l,l?false:i(c,a,u));});}function o(a,u){return i(r.statSync(a),a,u)}}),zv=Ee((t,e)=>{e.exports=s,s.sync=i;var r=Et("fs");function s(a,u,h){r.stat(a,function(l,c){h(l,l?false:n(c,u));});}function i(a,u){return n(r.statSync(a),u)}function n(a,u){return a.isFile()&&o(a,u)}function o(a,u){var h=a.mode,l=a.uid,c=a.gid,d=u.uid!==void 0?u.uid:process.getuid&&process.getuid(),f=u.gid!==void 0?u.gid:process.getgid&&process.getgid(),m=parseInt("100",8),g=parseInt("010",8),D=parseInt("001",8),x=m|g,b=h&D||h&g&&c===f||h&m&&l===d||h&x&&d===0;return b}}),Xv=Ee((t,e)=>{Et("fs");var r;process.platform==="win32"||global.TESTING_WINDOWS?r=Jv():r=zv(),e.exports=s,s.sync=i;function s(n,o,a){if(typeof o=="function"&&(a=o,o={}),!a){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(u,h){s(n,o||{},function(l,c){l?h(l):u(c);});})}r(n,o||{},function(u,h){u&&(u.code==="EACCES"||o&&o.ignoreErrors)&&(u=null,h=false),a(u,h);});}function i(n,o){try{return r.sync(n,o||{})}catch(a){if(o&&o.ignoreErrors||a.code==="EACCES")return false;throw a}}}),Zv=Ee((t,e)=>{var r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",s=Et("path"),i=r?";":":",n=Xv(),o=l=>Object.assign(new Error(`not found: ${l}`),{code:"ENOENT"}),a=(l,c)=>{let d=c.colon||i,f=l.match(/\//)||r&&l.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(c.path||process.env.PATH||"").split(d)],m=r?c.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",g=r?m.split(d):[""];return r&&l.indexOf(".")!==-1&&g[0]!==""&&g.unshift(""),{pathEnv:f,pathExt:g,pathExtExe:m}},u=(l,c,d)=>{typeof c=="function"&&(d=c,c={}),c||(c={});let{pathEnv:f,pathExt:m,pathExtExe:g}=a(l,c),D=[],x=v=>new Promise((C,E)=>{if(v===f.length)return c.all&&D.length?C(D):E(o(l));let R=f[v],P=/^".*"$/.test(R)?R.slice(1,-1):R,A=s.join(P,l),T=!P&&/^\.[\\\/]/.test(l)?l.slice(0,2)+A:A;C(b(T,v,0));}),b=(v,C,E)=>new Promise((R,P)=>{if(E===m.length)return R(x(C+1));let A=m[E];n(v+A,{pathExt:g},(T,U)=>{if(!T&&U)if(c.all)D.push(v+A);else return R(v+A);return R(b(v,C,E+1))});});return d?x(0).then(v=>d(null,v),d):x(0)},h=(l,c)=>{c=c||{};let{pathEnv:d,pathExt:f,pathExtExe:m}=a(l,c),g=[];for(let D=0;D<d.length;D++){let x=d[D],b=/^".*"$/.test(x)?x.slice(1,-1):x,v=s.join(b,l),C=!b&&/^\.[\\\/]/.test(l)?l.slice(0,2)+v:v;for(let E=0;E<f.length;E++){let R=C+f[E];try{if(n.sync(R,{pathExt:m}))if(c.all)g.push(R);else return R}catch{}}}if(c.all&&g.length)return g;if(c.nothrow)return null;throw o(l)};e.exports=u,u.sync=h;}),Qv=Ee((t,e)=>{var r=(s={})=>{let i=s.env||process.env;return (s.platform||process.platform)!=="win32"?"PATH":Object.keys(i).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};e.exports=r,e.exports.default=r;}),eC=Ee((t,e)=>{var r=Et("path"),s=Zv(),i=Qv();function n(a,u){let h=a.options.env||process.env,l=process.cwd(),c=a.options.cwd!=null,d=c&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(a.options.cwd);}catch{}let f;try{f=s.sync(a.command,{path:h[i({env:h})],pathExt:u?r.delimiter:void 0});}catch{}finally{d&&process.chdir(l);}return f&&(f=r.resolve(c?a.options.cwd:"",f)),f}function o(a){return n(a)||n(a,true)}e.exports=o;}),tC=Ee((t,e)=>{var r=/([()\][%!^"`<>&|;, *?])/g;function s(n){return n=n.replace(r,"^$1"),n}function i(n,o){return n=`${n}`,n=n.replace(/(\\*)"/g,'$1$1\\"'),n=n.replace(/(\\*)$/,"$1$1"),n=`"${n}"`,n=n.replace(r,"^$1"),o&&(n=n.replace(r,"^$1")),n}e.exports.command=s,e.exports.argument=i;}),rC=Ee((t,e)=>{e.exports=/^#!(.*)/;}),sC=Ee((t,e)=>{var r=rC();e.exports=(s="")=>{let i=s.match(r);if(!i)return null;let[n,o]=i[0].replace(/#! ?/,"").split(" "),a=n.split("/").pop();return a==="env"?o:o?`${a} ${o}`:a};}),iC=Ee((t,e)=>{var r=Et("fs"),s=sC();function i(n){let o=Buffer.alloc(150),a;try{a=r.openSync(n,"r"),r.readSync(a,o,0,150,0),r.closeSync(a);}catch{}return s(o.toString())}e.exports=i;}),nC=Ee((t,e)=>{var r=Et("path"),s=eC(),i=tC(),n=iC(),o=process.platform==="win32",a=/\.(?:com|exe)$/i,u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function h(d){d.file=s(d);let f=d.file&&n(d.file);return f?(d.args.unshift(d.file),d.command=f,s(d)):d.file}function l(d){if(!o)return d;let f=h(d),m=!a.test(f);if(d.options.forceShell||m){let g=u.test(f);d.command=r.normalize(d.command),d.command=i.command(d.command),d.args=d.args.map(x=>i.argument(x,g));let D=[d.command].concat(d.args).join(" ");d.args=["/d","/s","/c",`"${D}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=true;}return d}function c(d,f,m){f&&!Array.isArray(f)&&(m=f,f=null),f=f?f.slice(0):[],m=Object.assign({},m);let g={command:d,args:f,options:m,file:void 0,original:{command:d,args:f}};return m.shell?g:l(g)}e.exports=c;}),oC=Ee((t,e)=>{var r=process.platform==="win32";function s(a,u){return Object.assign(new Error(`${u} ${a.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${u} ${a.command}`,path:a.command,spawnargs:a.args})}function i(a,u){if(!r)return;let h=a.emit;a.emit=function(l,c){if(l==="exit"){let d=n(c,u);if(d)return h.call(a,"error",d)}return h.apply(a,arguments)};}function n(a,u){return r&&a===1&&!u.file?s(u.original,"spawn"):null}function o(a,u){return r&&a===1&&!u.file?s(u.original,"spawnSync"):null}e.exports={hookChildProcess:i,verifyENOENT:n,verifyENOENTSync:o,notFoundError:s};}),aC=Ee((t,e)=>{var r=Et("child_process"),s=nC(),i=oC();function n(a,u,h){let l=s(a,u,h),c=r.spawn(l.command,l.args,l.options);return i.hookChildProcess(c,l),c}function o(a,u,h){let l=s(a,u,h),c=r.spawnSync(l.command,l.args,l.options);return c.error=c.error||i.verifyENOENTSync(c.status,l),c}e.exports=n,e.exports.spawn=n,e.exports.sync=o,e.exports._parse=s,e.exports._enoent=i;}),uC=/^path$/i,sf={key:"PATH",value:""};function lC(t){for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||!uC.test(e))continue;let r=t[e];return r?{key:e,value:r}:sf}return sf}function cC(t,e){let r=e.value.split($t.delimiter),s=t,i;do r.push($t.resolve(s,"node_modules",".bin")),i=s,s=$t.dirname(s);while(s!==i);return {key:e.key,value:r.join($t.delimiter)}}function hC(t,e){let r={...process.env,...e},s=cC(t,lC(r));return r[s.key]=s.value,r}var dC=t=>{let e=t.length,r=new stream.PassThrough,s=()=>{--e===0&&r.emit("end");};for(let i of t)i.pipe(r,{end:false}),i.on("end",s);return r},fC=Yv(aC()),nf=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(t,e){super(`Process exited with non-zero status (${t.exitCode})`),this.result=t,this.output=e;}},pC={timeout:void 0,persist:false},mC={windowsHide:true};function gC(t,e){return {command:$t.normalize(t),args:e??[]}}function DC(t){let e=new AbortController;for(let r of t){if(r.aborted)return e.abort(),r;let s=()=>{e.abort(r.reason);};r.addEventListener("abort",s,{signal:e.signal});}return e.signal}var bC=class{_process;_aborted=false;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(t,e,r){this._options={...pC,...r},this._command=t,this._args=e??[],this._processClosed=new Promise(s=>{this._resolveClose=s;});}kill(t){return this._process?.kill(t)===true}get aborted(){return this._aborted}get killed(){return this._process?.killed===true}pipe(t,e,r){return yC(t,e,{...r,stdin:this})}async*[Symbol.asyncIterator](){let t=this._process;if(!t)return;let e=[];this._streamErr&&e.push(this._streamErr),this._streamOut&&e.push(this._streamOut);let r=dC(e),s=hf__default.default.createInterface({input:r});for await(let i of s)yield i.toString();if(await this._processClosed,t.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new nf(this)}async _waitForOutput(){let t=this._process;if(!t)throw new Error("No process was started");let e="",r="";if(this._streamErr)for await(let i of this._streamErr)e+=i.toString();if(this._streamOut)for await(let i of this._streamOut)r+=i.toString();if(await this._processClosed,this._options?.stdin&&await this._options.stdin,t.removeAllListeners(),this._thrownError)throw this._thrownError;let s={stderr:e,stdout:r,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new nf(this,s);return s}then(t,e){return this._waitForOutput().then(t,e)}_streamOut;_streamErr;spawn(){let t=Ve.cwd(),e=this._options,r={...mC,...e.nodeOptions},s=[];this._resetState(),e.timeout!==void 0&&s.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&s.push(e.signal),e.persist===true&&(r.detached=true),s.length>0&&(r.signal=DC(s)),r.env=hC(t,r.env);let{command:i,args:n}=gC(this._command,this._args),o=(0, fC._parse)(i,n,r),a=child_process.spawn(o.command,o.args,o.options);if(a.stderr&&(this._streamErr=a.stderr),a.stdout&&(this._streamOut=a.stdout),this._process=a,a.once("error",this._onError),a.once("close",this._onClose),e.stdin!==void 0&&a.stdin&&e.stdin.process){let{stdout:u}=e.stdin.process;u&&u.pipe(a.stdin);}}_resetState(){this._aborted=false,this._processClosed=new Promise(t=>{this._resolveClose=t;}),this._thrownError=void 0;}_onError=t=>{if(t.name==="AbortError"&&(!(t.cause instanceof Error)||t.cause.name!=="TimeoutError")){this._aborted=true;return}this._thrownError=t;};_onClose=()=>{this._resolveClose&&this._resolveClose();}},_f=(t,e,r)=>{let s=new bC(t,e,r);return s.spawn(),s},yC=_f;var Ne={},kt={},of;function vC(){if(of)return kt;of=1,Object.defineProperty(kt,"__esModule",{value:true}),kt.sync=kt.isexe=void 0;let t=df__default.default,e=ff__default.default,r=async(o,a={})=>{let{ignoreErrors:u=false}=a;try{return i(await(0,e.stat)(o),a)}catch(h){let l=h;if(u||l.code==="EACCES")return false;throw l}};kt.isexe=r;let s=(o,a={})=>{let{ignoreErrors:u=false}=a;try{return i((0,t.statSync)(o),a)}catch(h){let l=h;if(u||l.code==="EACCES")return false;throw l}};kt.sync=s;let i=(o,a)=>o.isFile()&&n(o,a),n=(o,a)=>{let u=a.uid??process.getuid?.(),h=a.groups??process.getgroups?.()??[],l=a.gid??process.getgid?.()??h[0];if(u===void 0||l===void 0)throw new Error("cannot get uid or gid");let c=new Set([l,...h]),d=o.mode,f=o.uid,m=o.gid,g=parseInt("100",8),D=parseInt("010",8),x=parseInt("001",8),b=g|D;return !!(d&x||d&D&&c.has(m)||d&g&&f===u||d&b&&u===0)};return kt}var Pt={},af;function CC(){if(af)return Pt;af=1,Object.defineProperty(Pt,"__esModule",{value:true}),Pt.sync=Pt.isexe=void 0;let t=df__default.default,e=ff__default.default,r=async(o,a={})=>{let{ignoreErrors:u=false}=a;try{return n(await(0,e.stat)(o),o,a)}catch(h){let l=h;if(u||l.code==="EACCES")return false;throw l}};Pt.isexe=r;let s=(o,a={})=>{let{ignoreErrors:u=false}=a;try{return n((0,t.statSync)(o),o,a)}catch(h){let l=h;if(u||l.code==="EACCES")return false;throw l}};Pt.sync=s;let i=(o,a)=>{let{pathExt:u=process.env.PATHEXT||""}=a,h=u.split(";");if(h.indexOf("")!==-1)return true;for(let l=0;l<h.length;l++){let c=h[l].toLowerCase(),d=o.substring(o.length-c.length).toLowerCase();if(c&&d===c)return true}return false},n=(o,a,u)=>o.isFile()&&i(a,u);return Pt}var qo={},uf;function wC(){return uf||(uf=1,Object.defineProperty(qo,"__esModule",{value:true})),qo}var lf;function xC(){return lf||(lf=1,function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(h,l,c,d){d===void 0&&(d=c);var f=Object.getOwnPropertyDescriptor(l,c);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:true,get:function(){return l[c]}}),Object.defineProperty(h,d,f);}:function(h,l,c,d){d===void 0&&(d=c),h[d]=l[c];}),r=Ne&&Ne.__setModuleDefault||(Object.create?function(h,l){Object.defineProperty(h,"default",{enumerable:true,value:l});}:function(h,l){h.default=l;}),s=Ne&&Ne.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var c in h)c!=="default"&&Object.prototype.hasOwnProperty.call(h,c)&&e(l,h,c);return r(l,h),l},i=Ne&&Ne.__exportStar||function(h,l){for(var c in h)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&e(l,h,c);};Object.defineProperty(t,"__esModule",{value:true}),t.sync=t.isexe=t.posix=t.win32=void 0;let n=s(vC());t.posix=n;let o=s(CC());t.win32=o,i(wC(),t);let u=(process.env._ISEXE_TEST_PLATFORM_||process.platform)==="win32"?o:n;t.isexe=u.isexe,t.sync=u.sync;}(Ne)),Ne}var Lo,cf;function _C(){if(cf)return Lo;cf=1;let{isexe:t,sync:e}=xC(),{join:r,delimiter:s,sep:i,posix:n}=$t__default.default,o=process.platform==="win32",a=new RegExp(`[${n.sep}${i===n.sep?"":i}]`.replace(/(\\)/g,"\\$1")),u=new RegExp(`^\\.${a.source}`),h=m=>Object.assign(new Error(`not found: ${m}`),{code:"ENOENT"}),l=(m,{path:g=process.env.PATH,pathExt:D=process.env.PATHEXT,delimiter:x=s})=>{let b=m.match(a)?[""]:[...o?[process.cwd()]:[],...(g||"").split(x)];if(o){let v=D||[".EXE",".CMD",".BAT",".COM"].join(x),C=v.split(x).flatMap(E=>[E,E.toLowerCase()]);return m.includes(".")&&C[0]!==""&&C.unshift(""),{pathEnv:b,pathExt:C,pathExtExe:v}}return {pathEnv:b,pathExt:[""]}},c=(m,g)=>{let D=/^".*"$/.test(m)?m.slice(1,-1):m;return (!D&&u.test(g)?g.slice(0,2):"")+r(D,g)},d=async(m,g={})=>{let{pathEnv:D,pathExt:x,pathExtExe:b}=l(m,g),v=[];for(let C of D){let E=c(C,m);for(let R of x){let P=E+R;if(await t(P,{pathExt:b,ignoreErrors:true})){if(!g.all)return P;v.push(P);}}}if(g.all&&v.length)return v;if(g.nothrow)return null;throw h(m)},f=(m,g={})=>{let{pathEnv:D,pathExt:x,pathExtExe:b}=l(m,g),v=[];for(let C of D){let E=c(C,m);for(let R of x){let P=E+R;if(e(P,{pathExt:b,ignoreErrors:true})){if(!g.all)return P;v.push(P);}}}if(g.all&&v.length)return v;if(g.nothrow)return null;throw h(m)};return Lo=d,d.sync=f,Lo}var FC=_C(),EC=Go(FC);$t.join(zy__default.default.tmpdir(),"antfu-ni");function Ff(t){return EC.sync(t,{nothrow:true})!==null}async function Wo({autoInstall:t,programmatic:e,cwd:r}={}){let{name:s,agent:i,version:n}=await Mv({cwd:r,onUnknown:o=>{e||console.warn("[ni] Unknown packageManager:",o);}})||{};if(s&&!Ff(s)&&!e){if(!t){console.warn(`[ni] Detected ${s} but it doesn't seem to be installed.
216
- `),Ve__default.default.env.CI&&Ve__default.default.exit(1);let o=Pr(s,yf[s]),{tryInstall:a}=await Rv({name:"tryInstall",type:"confirm",message:`Would you like to globally install ${o}?`});a||Ve__default.default.exit(1);}await _f("npm",["i","-g",`${s}${n?`@${n}`:""}`],{nodeOptions:{stdio:"inherit",cwd:r},throwOnError:true});}return i}Ve__default.default.env.NI_CONFIG_FILE;var OC=Ve__default.default.platform==="win32"?Ve__default.default.env.USERPROFILE:Ve__default.default.env.HOME;$t__default.default.join(OC||"~/",".nirc");var TC=async t=>{let e=await Wo({cwd:t});return e&&["npm","yarn","pnpm","bun"].includes(e)?e:"npm"},Ef=t=>{let e=$t.join(t,"package.json");if(!df.existsSync(e))return "unknown";try{let r=JSON.parse(df.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return s.next?"next":s.vite?"vite":s.webpack?"webpack":"unknown"}catch{return "unknown"}},kC=t=>{let e=df.existsSync($t.join(t,"app")),r=df.existsSync($t.join(t,"src","app")),s=df.existsSync($t.join(t,"pages")),i=df.existsSync($t.join(t,"src","pages"));return e||r?"app":s||i?"pages":"unknown"},PC=t=>{if(df.existsSync($t.join(t,"pnpm-workspace.yaml"))||df.existsSync($t.join(t,"lerna.json")))return true;let e=$t.join(t,"package.json");if(df.existsSync(e))try{if(JSON.parse(df.readFileSync(e,"utf-8")).workspaces)return !0}catch{return false}return false},$C=t=>{let e=[],r=$t.join(t,"pnpm-workspace.yaml");if(df.existsSync(r)){let o=df.readFileSync(r,"utf-8").split(`
217
- `),a=false;for(let u of o){if(u.match(/^packages:\s*$/)){a=true;continue}if(a){if(u.match(/^[a-zA-Z]/)||u.trim()===""){u.match(/^[a-zA-Z]/)&&(a=false);continue}let h=u.match(/^\s*-\s*['"]?([^'"#\n]+?)['"]?\s*$/);h&&e.push(h[1].trim());}}}let s=$t.join(t,"lerna.json");if(df.existsSync(s))try{let n=JSON.parse(df.readFileSync(s,"utf-8"));Array.isArray(n.packages)&&e.push(...n.packages);}catch{}let i=$t.join(t,"package.json");if(df.existsSync(i))try{let n=JSON.parse(df.readFileSync(i,"utf-8"));Array.isArray(n.workspaces)?e.push(...n.workspaces):n.workspaces?.packages&&e.push(...n.workspaces.packages);}catch{}return [...new Set(e)]},IC=(t,e)=>{let r=[],s=e.replace(/\/\*$/,""),i=$t.join(t,s);if(!df.existsSync(i))return r;try{let n=df.readdirSync(i,{withFileTypes:!0});for(let o of n)if(o.isDirectory()){let a=$t.join(i,o.name,"package.json");df.existsSync(a)&&r.push($t.join(i,o.name));}}catch{return r}return r},MC=t=>{let e=$t.join(t,"package.json");if(!df.existsSync(e))return false;try{let r=JSON.parse(df.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return !!(s.react||s["react-dom"])}catch{return false}},Af=t=>{let e=$C(t),r=[];for(let s of e){let i=IC(t,s);for(let n of i){let o=Ef(n),a=MC(n);if(a||o!=="unknown"){let u=$t.join(n,"package.json"),h=$t.basename(n);try{h=JSON.parse(df.readFileSync(u,"utf-8")).name||h;}catch{}r.push({name:h,path:n,framework:o,hasReact:a});}}}return r},BC=t=>{if(!df.existsSync(t))return false;try{let e=df.readFileSync(t,"utf-8");return [/["'`][^"'`]*react-grab/,/react-grab[^"'`]*["'`]/,/<[^>]*react-grab/i,/import[^;]*react-grab/i,/require[^)]*react-grab/i,/from\s+[^;]*react-grab/i,/src[^>]*react-grab/i].some(s=>s.test(e))}catch{return false}},NC=t=>{let e=$t.join(t,"package.json");if(df.existsSync(e))try{let s=JSON.parse(df.readFileSync(e,"utf-8"));if({...s.dependencies,...s.devDependencies}["react-grab"])return !0}catch{}return [$t.join(t,"app","layout.tsx"),$t.join(t,"app","layout.jsx"),$t.join(t,"src","app","layout.tsx"),$t.join(t,"src","app","layout.jsx"),$t.join(t,"pages","_document.tsx"),$t.join(t,"pages","_document.jsx"),$t.join(t,"instrumentation-client.ts"),$t.join(t,"instrumentation-client.js"),$t.join(t,"src","instrumentation-client.ts"),$t.join(t,"src","instrumentation-client.js"),$t.join(t,"index.html"),$t.join(t,"public","index.html"),$t.join(t,"src","index.tsx"),$t.join(t,"src","index.ts"),$t.join(t,"src","main.tsx"),$t.join(t,"src","main.ts")].some(BC)},HC=["@react-grab/claude-code","@react-grab/cursor","@react-grab/opencode","@react-grab/codex","@react-grab/gemini","@react-grab/amp","@react-grab/ami","@react-grab/visual-edit"],qC=t=>{let e=$t.join(t,"package.json");if(!df.existsSync(e))return null;try{let r=JSON.parse(df.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return s["@remix-run/react"]||s.remix?"remix":s.astro?"astro":s["@sveltejs/kit"]?"sveltekit":s.gatsby?"gatsby":null}catch{return null}},LC=t=>{let e=$t.join(t,"package.json");if(!df.existsSync(e))return [];try{let r=JSON.parse(df.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return HC.filter(i=>!!s[i]).map(i=>i.replace("@react-grab/",""))}catch{return []}};var pt=async(t=process.cwd())=>{let e=Ef(t);return {packageManager:await TC(t),framework:e,nextRouterType:e==="next"?kC(t):"unknown",isMonorepo:PC(t),projectRoot:t,hasReactGrab:NC(t),installedAgents:LC(t),unsupportedFramework:qC(t)}};var jC="\x1B[31m",GC="\x1B[32m",Es="\x1B[90m",It="\x1B[0m",VC="\x1B[1m",UC=(t,e)=>{let r=t.split(`
218
- `),s=e.split(`
219
- `),i=[];Math.max(r.length,s.length);let o=0,a=0;for(;o<r.length||a<s.length;){let u=r[o],h=s[a];if(u===h)i.push({type:"unchanged",content:u,lineNumber:a+1}),o++,a++;else if(u===void 0)i.push({type:"added",content:h,lineNumber:a+1}),a++;else if(h===void 0)i.push({type:"removed",content:u}),o++;else {let l=s.indexOf(u,a),c=r.indexOf(h,o);if(l!==-1&&(c===-1||l-a<c-o))for(;a<l;)i.push({type:"added",content:s[a],lineNumber:a+1}),a++;else if(c!==-1)for(;o<c;)i.push({type:"removed",content:r[o]}),o++;else i.push({type:"removed",content:u}),i.push({type:"added",content:h,lineNumber:a+1}),o++,a++;}}return i},WC=(t,e=3)=>{let r=[],s=-1,i=false,n=t.map((o,a)=>o.type!=="unchanged"?a:-1).filter(o=>o!==-1);if(n.length===0)return `${Es}No changes${It}`;for(let o of n){let a=Math.max(0,o-e),u=Math.min(t.length-1,o+e);a>s+1&&s!==-1&&r.push(`${Es} ...${It}`);for(let h=Math.max(a,s+1);h<=u;h++){let l=t[h];l.type==="added"?(r.push(`${GC}+ ${l.content}${It}`),i=true):l.type==="removed"?(r.push(`${jC}- ${l.content}${It}`),i=true):r.push(`${Es} ${l.content}${It}`),s=h;}}return i?r.join(`
220
- `):`${Es}No changes${It}`},we=(t,e,r)=>{console.log(`
221
- ${VC}File: ${t}${It}`),console.log("\u2500".repeat(60));let s=UC(e,r);console.log(WC(s)),console.log("\u2500".repeat(60));};var ir=be(Rt()),$={error:ir.default.red,warn:ir.default.yellow,info:ir.default.cyan,success:ir.default.green,dim:ir.default.dim};var p={error(...t){console.log($.error(t.join(" ")));},warn(...t){console.log($.warn(t.join(" ")));},info(...t){console.log($.info(t.join(" ")));},success(...t){console.log($.success(t.join(" ")));},log(...t){console.log(t.join(" "));},break(){console.log("");}};var me=t=>{p.break(),p.error("Something went wrong. Please check the error below for more details."),p.error("If the problem persists, please open an issue on GitHub."),p.error(""),t instanceof Error&&p.error(t.message),p.break(),process.exit(1);};var KC={npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},YC={npm:"npm uninstall",yarn:"yarn remove",pnpm:"pnpm remove",bun:"bun remove"},nr=(t,e,r,s=true)=>{if(t.length===0)return;let o=`${KC[e]}${s?" -D":""} ${t.join(" ")}`;console.log(`Running: ${o}
222
- `),child_process.execSync(o,{cwd:r,stdio:"inherit"});},or=(t,e=true)=>{let r=[];return e&&r.push("react-grab"),t!=="none"&&r.push(`@react-grab/${t}`),r},Mt=(t,e,r)=>{if(t.length===0)return;let i=`${YC[e]} ${t.join(" ")}`;console.log(`Running: ${i}
223
- `),child_process.execSync(i,{cwd:r,stdio:"inherit"});},Bt=t=>[`@react-grab/${t}`];var Rf=(t=0)=>e=>`\x1B[${e+t}m`,Sf=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Tf=(t=0)=>(e,r,s)=>`\x1B[${38+t};2;${e};${r};${s}m`,X={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(X.modifier);var JC=Object.keys(X.color),zC=Object.keys(X.bgColor);[...JC,...zC];function XC(){let t=new Map;for(let[e,r]of Object.entries(X)){for(let[s,i]of Object.entries(r))X[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[s]=X[s],t.set(i[0],i[1]);Object.defineProperty(X,e,{value:r,enumerable:false});}return Object.defineProperty(X,"codes",{value:t,enumerable:false}),X.color.close="\x1B[39m",X.bgColor.close="\x1B[49m",X.color.ansi=Rf(),X.color.ansi256=Sf(),X.color.ansi16m=Tf(),X.bgColor.ansi=Rf(10),X.bgColor.ansi256=Sf(10),X.bgColor.ansi16m=Tf(10),Object.defineProperties(X,{rgbToAnsi256:{value(e,r,s){return e===r&&r===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)},enumerable:false},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return [0,0,0];let[s]=r;s.length===3&&(s=[...s].map(n=>n+n).join(""));let i=Number.parseInt(s,16);return [i>>16&255,i>>8&255,i&255]},enumerable:false},hexToAnsi256:{value:e=>X.rgbToAnsi256(...X.hexToRgb(e)),enumerable:false},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,s,i;if(e>=232)r=((e-232)*10+8)/255,s=r,i=r;else {e-=16;let a=e%36;r=Math.floor(e/36)/5,s=Math.floor(a/6)/5,i=a%6/5;}let n=Math.max(r,s,i)*2;if(n===0)return 30;let o=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(r));return n===2&&(o+=60),o},enumerable:false},rgbToAnsi:{value:(e,r,s)=>X.ansi256ToAnsi(X.rgbToAnsi256(e,r,s)),enumerable:false},hexToAnsi:{value:e=>X.ansi256ToAnsi(X.hexToAnsi256(e)),enumerable:false}}),X}var ZC=XC(),je=ZC;function ke(t,e=globalThis.Deno?globalThis.Deno.args:Ve__default.default.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:Z}=Ve__default.default,As;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?As=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(As=1);function ew(){if("FORCE_COLOR"in Z)return Z.FORCE_COLOR==="true"?1:Z.FORCE_COLOR==="false"?0:Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}function tw(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function rw(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=ew();s!==void 0&&(As=s);let i=r?As:s;if(i===0)return 0;if(r){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if("TF_BUILD"in Z&&"AGENT_NAME"in Z)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(Z.TERM==="dumb")return n;if(Ve__default.default.platform==="win32"){let o=zy__default.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Z)return ["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Z)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Z)||Z.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Z)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor"||Z.TERM==="xterm-kitty"||Z.TERM==="xterm-ghostty"||Z.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Z){let o=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case "iTerm.app":return o>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(Z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM)||"COLORTERM"in Z?1:n}function Pf(t,e={}){let r=rw(t,{streamIsTTY:t&&t.isTTY,...e});return tw(r)}var sw={stdout:Pf({isTTY:kf__default.default.isatty(1)}),stderr:Pf({isTTY:kf__default.default.isatty(2)})},$f=sw;function If(t,e,r){let s=t.indexOf(e);if(s===-1)return t;let i=e.length,n=0,o="";do o+=t.slice(n,s)+e+r,n=s+i,s=t.indexOf(e,n);while(s!==-1);return o+=t.slice(n),o}function Mf(t,e,r,s){let i=0,n="";do{let o=t[s-1]==="\r";n+=t.slice(i,o?s-1:s)+e+(o?`\r
224
- `:`
225
- `)+r,i=s+1,s=t.indexOf(`
226
- `,i);}while(s!==-1);return n+=t.slice(i),n}var{stdout:Bf,stderr:Nf}=$f,Yo=Symbol("GENERATOR"),ar=Symbol("STYLER"),$r=Symbol("IS_EMPTY"),Hf=["ansi","ansi","ansi256","ansi16m"],ur=Object.create(null),iw=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Bf?Bf.level:0;t.level=e.level===void 0?r:e.level;};var nw=t=>{let e=(...r)=>r.join(" ");return iw(e,t),Object.setPrototypeOf(e,Ir.prototype),e};function Ir(t){return nw(t)}Object.setPrototypeOf(Ir.prototype,Function.prototype);for(let[t,e]of Object.entries(je))ur[t]={get(){let r=Os(this,zo(e.open,e.close,this[ar]),this[$r]);return Object.defineProperty(this,t,{value:r}),r}};ur.visible={get(){let t=Os(this,this[ar],true);return Object.defineProperty(this,"visible",{value:t}),t}};var Jo=(t,e,r,...s)=>t==="rgb"?e==="ansi16m"?je[r].ansi16m(...s):e==="ansi256"?je[r].ansi256(je.rgbToAnsi256(...s)):je[r].ansi(je.rgbToAnsi(...s)):t==="hex"?Jo("rgb",e,r,...je.hexToRgb(...s)):je[r][t](...s),ow=["rgb","hex","ansi256"];for(let t of ow){ur[t]={get(){let{level:r}=this;return function(...s){let i=zo(Jo(t,Hf[r],"color",...s),je.color.close,this[ar]);return Os(this,i,this[$r])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);ur[e]={get(){let{level:r}=this;return function(...s){let i=zo(Jo(t,Hf[r],"bgColor",...s),je.bgColor.close,this[ar]);return Os(this,i,this[$r])}}};}var aw=Object.defineProperties(()=>{},{...ur,level:{enumerable:true,get(){return this[Yo].level},set(t){this[Yo].level=t;}}}),zo=(t,e,r)=>{let s,i;return r===void 0?(s=t,i=e):(s=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:i,parent:r}},Os=(t,e,r)=>{let s=(...i)=>uw(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,aw),s[Yo]=t,s[ar]=e,s[$r]=r,s},uw=(t,e)=>{if(t.level<=0||!e)return t[$r]?"":e;let r=t[ar];if(r===void 0)return e;let{openAll:s,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=If(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
227
- `);return n!==-1&&(e=Mf(e,i,s,n)),s+e+i};Object.defineProperties(Ir.prototype,ur);var lw=Ir();Ir({level:Nf?Nf.level:0});var Ge=lw;var cw=(t,e,r,s)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),n=Object.getOwnPropertyDescriptor(e,r);!hw(i,n)&&s||Object.defineProperty(t,r,n);},hw=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},dw=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r);},fw=(t,e)=>`/* Wrapped ${t}*/
228
- ${e}`,pw=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),mw=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),gw=(t,e,r)=>{let s=r===""?"":`with ${r.trim()}() `,i=fw.bind(null,s,e.toString());Object.defineProperty(i,"name",mw);let{writable:n,enumerable:o,configurable:a}=pw;Object.defineProperty(t,"toString",{value:i,writable:n,enumerable:o,configurable:a});};function Xo(t,e,{ignoreNonConfigurable:r=false}={}){let{name:s}=t;for(let i of Reflect.ownKeys(e))cw(t,e,i,r);return dw(t,e),gw(t,e,s),t}var Rs=new WeakMap,qf=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,s=0,i=t.displayName||t.name||"<anonymous>",n=function(...o){if(Rs.set(n,++s),s===1)r=t.apply(this,o),t=void 0;else if(e.throw===true)throw new Error(`Function \`${i}\` can only be called once`);return r};return Xo(n,t),Rs.set(n,s),n};qf.callCount=t=>{if(!Rs.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Rs.get(t)};var Lf=qf;var Nt=[];Nt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Nt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Nt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Ss=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Zo=Symbol.for("signal-exit emitter"),Qo=globalThis,Dw=Object.defineProperty.bind(Object),ea=class{emitted={afterExit:false,exit:false};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Qo[Zo])return Qo[Zo];Dw(Qo,Zo,{value:this,writable:false,enumerable:false,configurable:false});}on(e,r){this.listeners[e].push(r);}removeListener(e,r){let s=this.listeners[e],i=s.indexOf(r);i!==-1&&(i===0&&s.length===1?s.length=0:s.splice(i,1));}emit(e,r,s){if(this.emitted[e])return false;this.emitted[e]=true;let i=false;for(let n of this.listeners[e])i=n(r,s)===true||i;return e==="exit"&&(i=this.emit("afterExit",r,s)||i),i}},Ts=class{},bw=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),ta=class extends Ts{onExit(){return ()=>{}}load(){}unload(){}},ra=class extends Ts{#o=sa.platform==="win32"?"SIGINT":"SIGHUP";#r=new ea;#e;#i;#d;#t={};#n=false;constructor(e){super(),this.#e=e,this.#t={};for(let r of Nt)this.#t[r]=()=>{let s=this.#e.listeners(r),{count:i}=this.#r,n=e;if(typeof n.__signal_exit_emitter__=="object"&&typeof n.__signal_exit_emitter__.count=="number"&&(i+=n.__signal_exit_emitter__.count),s.length===i){this.unload();let o=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#o:r;o||e.kill(e.pid,a);}};this.#d=e.reallyExit,this.#i=e.emit;}onExit(e,r){if(!Ss(this.#e))return ()=>{};this.#n===false&&this.load();let s=r?.alwaysLast?"afterExit":"exit";return this.#r.on(s,e),()=>{this.#r.removeListener(s,e),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload();}}load(){if(!this.#n){this.#n=true,this.#r.count+=1;for(let e of Nt)try{let r=this.#t[e];r&&this.#e.on(e,r);}catch{}this.#e.emit=(e,...r)=>this.#f(e,...r),this.#e.reallyExit=e=>this.#s(e);}}unload(){this.#n&&(this.#n=false,Nt.forEach(e=>{let r=this.#t[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,r);}catch{}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#d,this.#r.count-=1);}#s(e){return Ss(this.#e)?(this.#e.exitCode=e||0,this.#r.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#f(e,...r){let s=this.#i;if(e==="exit"&&Ss(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=s.call(this.#e,e,...r);return this.#r.emit("exit",this.#e.exitCode,null),i}else return s.call(this.#e,e,...r)}},sa=globalThis.process,{onExit:jf}=bw(Ss(sa)?new ra(sa):new ta);var Gf=Ve__default.default.stderr.isTTY?Ve__default.default.stderr:Ve__default.default.stdout.isTTY?Ve__default.default.stdout:void 0,yw=Gf?Lf(()=>{jf(()=>{Gf.write("\x1B[?25h");},{alwaysLast:true});}):()=>{},Vf=yw;var Ps=false,lr={};lr.show=(t=Ve__default.default.stderr)=>{t.isTTY&&(Ps=false,t.write("\x1B[?25h"));};lr.hide=(t=Ve__default.default.stderr)=>{t.isTTY&&(Vf(),Ps=true,t.write("\x1B[?25l"));};lr.toggle=(t,e)=>{t!==void 0&&(Ps=t),Ps?lr.show(e):lr.hide(e);};var ia=lr;var Nr=be(na());function oa(){return Ve__default.default.platform!=="win32"?Ve__default.default.env.TERM!=="linux":!!Ve__default.default.env.CI||!!Ve__default.default.env.WT_SESSION||!!Ve__default.default.env.TERMINUS_SUBLIME||Ve__default.default.env.ConEmuTask==="{cmd::Cmder}"||Ve__default.default.env.TERM_PROGRAM==="Terminus-Sublime"||Ve__default.default.env.TERM_PROGRAM==="vscode"||Ve__default.default.env.TERM==="xterm-256color"||Ve__default.default.env.TERM==="alacritty"||Ve__default.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Cw={info:Ge.blue("\u2139"),success:Ge.green("\u2714"),warning:Ge.yellow("\u26A0"),error:Ge.red("\u2716")},ww={info:Ge.blue("i"),success:Ge.green("\u221A"),warning:Ge.yellow("\u203C"),error:Ge.red("\xD7")},xw=oa()?Cw:ww,Mr=xw;function aa({onlyFirst:t=false}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var _w=aa();function Br(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(_w,"")}function Jf(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function zf(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function Xf(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function Fw(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function Zf(t,{ambiguousAsWide:e=false}={}){return Fw(t),zf(t)||Xf(t)||e&&Jf(t)?2:1}var Qf=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;var Ew=new Intl.Segmenter,Aw=/^\p{Default_Ignorable_Code_Point}$/u;function ua(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=true,countAnsiEscapeCodes:s=false}=e;if(s||(t=Br(t)),t.length===0)return 0;let i=0,n={ambiguousAsWide:!r};for(let{segment:o}of Ew.segment(t)){let a=o.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!Aw.test(o)){if(Qf().test(o)){i+=2;continue}i+=Zf(a,n);}}return i}function la({stream:t=process.stdout}={}){return !!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function ca(){let{env:t}=Ve__default.default,{TERM:e,TERM_PROGRAM:r}=t;return Ve__default.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ow=3,ha=class{#o=0;start(){this.#o++,this.#o===1&&this.#r();}stop(){if(this.#o<=0)throw new Error("`stop` called more times than `start`");this.#o--,this.#o===0&&this.#e();}#r(){Ve__default.default.platform==="win32"||!Ve__default.default.stdin.isTTY||(Ve__default.default.stdin.setRawMode(true),Ve__default.default.stdin.on("data",this.#i),Ve__default.default.stdin.resume());}#e(){Ve__default.default.stdin.isTTY&&(Ve__default.default.stdin.off("data",this.#i),Ve__default.default.stdin.pause(),Ve__default.default.stdin.setRawMode(false));}#i(e){e[0]===Ow&&Ve__default.default.emit("SIGINT");}},Rw=new ha,da=Rw;be(na());var fa=class{#o=0;#r=false;#e=0;#i=-1;#d=0;#t;#n;#s;#f;#m;#l;#c;#h;#g;#a;#u;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:Ve__default.default.stderr,discardStdin:true,hideCursor:true,...e},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#m=this.#t.interval,this.#s=this.#t.stream,this.#l=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:la({stream:this.#s}),this.#c=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:false,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,Ve__default.default.env.NODE_ENV==="test"&&(this._stream=this.#s,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(r){this.#o=r;}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}));}get indent(){return this.#h}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#h=e,this.#p();}get interval(){return this.#m??this.#n.interval??100}get spinner(){return this.#n}set spinner(e){if(this.#i=-1,this.#m=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#n=e;}else if(!ca())this.#n=Nr.default.line;else if(e===void 0)this.#n=Nr.default.dots;else if(e!=="default"&&Nr.default[e])this.#n=Nr.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(e=""){this.#g=e,this.#p();}get prefixText(){return this.#a}set prefixText(e=""){this.#a=e,this.#p();}get suffixText(){return this.#u}set suffixText(e=""){this.#u=e,this.#p();}get isSpinning(){return this.#f!==void 0}#D(e=this.#a,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}#b(e=this.#u,r=" "){return typeof e=="string"&&e!==""?r+e:typeof e=="function"?r+e():""}#p(){let e=this.#s.columns??80,r=this.#D(this.#a,"-"),s=this.#b(this.#u,"-"),i=" ".repeat(this.#h)+r+"--"+this.#g+"--"+s;this.#e=0;for(let n of Br(i).split(`
229
- `))this.#e+=Math.max(1,Math.ceil(ua(n,{countAnsiEscapeCodes:true})/e));}get isEnabled(){return this.#l&&!this.#c}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#l=e;}get isSilent(){return this.#c}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=e;}frame(){let e=Date.now();(this.#i===-1||e-this.#d>=this.interval)&&(this.#i=++this.#i%this.#n.frames.length,this.#d=e);let{frames:r}=this.#n,s=r[this.#i];this.color&&(s=Ge[this.color](s));let i=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",n=typeof this.text=="string"?" "+this.text:"",o=typeof this.#u=="string"&&this.#u!==""?" "+this.#u:"";return i+s+n+o}clear(){if(!this.#l||!this.#s.isTTY)return this;this.#s.cursorTo(0);for(let e=0;e<this.#o;e++)e>0&&this.#s.moveCursor(0,-1),this.#s.clearLine(1);return (this.#h||this.lastIndent!==this.#h)&&this.#s.cursorTo(this.#h),this.lastIndent=this.#h,this.#o=0,this}render(){return this.#c?this:(this.clear(),this.#s.write(this.frame()),this.#o=this.#e,this)}start(e){return e&&(this.text=e),this.#c?this:this.#l?this.isSpinning?this:(this.#t.hideCursor&&ia.hide(this.#s),this.#t.discardStdin&&Ve__default.default.stdin.isTTY&&(this.#r=true,da.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#s.write(`- ${this.text}
230
- `),this)}stop(){return this.#l?(clearInterval(this.#f),this.#f=void 0,this.#i=0,this.clear(),this.#t.hideCursor&&ia.show(this.#s),this.#t.discardStdin&&Ve__default.default.stdin.isTTY&&this.#r&&(da.stop(),this.#r=false),this):this}succeed(e){return this.stopAndPersist({symbol:Mr.success,text:e})}fail(e){return this.stopAndPersist({symbol:Mr.error,text:e})}warn(e){return this.stopAndPersist({symbol:Mr.warning,text:e})}info(e){return this.stopAndPersist({symbol:Mr.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let r=e.prefixText??this.#a,s=this.#D(r," "),i=e.symbol??" ",n=e.text??this.text,a=typeof n=="string"?(i?" ":"")+n:"",u=e.suffixText??this.#u,h=this.#b(u," "),l=s+i+a+h+`
231
- `;return this.stop(),this.#s.write(l),this}};function pa(t){return new fa(t)}var M=(t,e)=>pa({text:t,isSilent:e?.silent});var Tw=`{process.env.NODE_ENV === "development" && (
232
- <Script
233
- src="//unpkg.com/react-grab/dist/index.global.js"
234
- crossOrigin="anonymous"
235
- strategy="beforeInteractive"
236
- />
237
- )}`,tp=t=>t==="none"?Tw:`{process.env.NODE_ENV === "development" && (
238
- <Script
239
- src="//unpkg.com/react-grab/dist/index.global.js"
240
- crossOrigin="anonymous"
241
- strategy="beforeInteractive"
242
- />
243
- )}
244
- {process.env.NODE_ENV === "development" && (
245
- <Script
246
- src="//unpkg.com/@react-grab/${t}/dist/client.global.js"
247
- strategy="lazyOnload"
248
- />
249
- )}`,kw=`{process.env.NODE_ENV === "development" && (
250
- <Script
251
- src="//unpkg.com/react-grab/dist/index.global.js"
252
- crossOrigin="anonymous"
253
- strategy="beforeInteractive"
254
- />
255
- )}`,rp=t=>t==="none"?kw:`{process.env.NODE_ENV === "development" && (
256
- <Script
257
- src="//unpkg.com/react-grab/dist/index.global.js"
258
- crossOrigin="anonymous"
259
- strategy="beforeInteractive"
260
- />
261
- )}
262
- {process.env.NODE_ENV === "development" && (
263
- <Script
264
- src="//unpkg.com/@react-grab/${t}/dist/client.global.js"
265
- strategy="lazyOnload"
266
- />
267
- )}`,Pw=`<script type="module">
268
- if (import.meta.env.DEV) {
269
- import("react-grab");
270
- }
271
- </script>`,sp=t=>t==="none"?Pw:`<script type="module">
272
- if (import.meta.env.DEV) {
273
- import("react-grab");
274
- import("@react-grab/${t}/client");
275
- }
276
- </script>`,$w=`if (process.env.NODE_ENV === "development") {
277
- import("react-grab");
278
- }`,ip=t=>t==="none"?$w:`if (process.env.NODE_ENV === "development") {
279
- import("react-grab");
280
- import("@react-grab/${t}/client");
281
- }`,Ms='import Script from "next/script";';var cr=t=>[/["'`][^"'`]*react-grab/,/react-grab[^"'`]*["'`]/,/<[^>]*react-grab/i,/import[^;]*react-grab/i,/require[^)]*react-grab/i,/from\s+[^;]*react-grab/i,/src[^>]*react-grab/i,/href[^>]*react-grab/i].some(r=>r.test(t)),op=t=>{let e=[$t.join(t,"app","layout.tsx"),$t.join(t,"app","layout.jsx"),$t.join(t,"src","app","layout.tsx"),$t.join(t,"src","app","layout.jsx")];for(let r of e)if(df.existsSync(r))return r;return null},Bw=t=>{let e=[$t.join(t,"instrumentation-client.ts"),$t.join(t,"instrumentation-client.js"),$t.join(t,"src","instrumentation-client.ts"),$t.join(t,"src","instrumentation-client.js")];for(let r of e)if(df.existsSync(r))return r;return null},ap=t=>{let e=Bw(t);if(!e)return false;let r=df.readFileSync(e,"utf-8");return cr(r)},up=t=>{let e=[$t.join(t,"pages","_document.tsx"),$t.join(t,"pages","_document.jsx"),$t.join(t,"src","pages","_document.tsx"),$t.join(t,"src","pages","_document.jsx")];for(let r of e)if(df.existsSync(r))return r;return null},lp=t=>{let e=[$t.join(t,"index.html"),$t.join(t,"public","index.html")];for(let r of e)if(df.existsSync(r))return r;return null},cp=t=>{let e=[$t.join(t,"src","index.tsx"),$t.join(t,"src","index.jsx"),$t.join(t,"src","index.ts"),$t.join(t,"src","index.js"),$t.join(t,"src","main.tsx"),$t.join(t,"src","main.jsx"),$t.join(t,"src","main.ts"),$t.join(t,"src","main.js")];for(let r of e)if(df.existsSync(r))return r;return null},hp=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`{process.env.NODE_ENV === "development" && (
282
- <Script
283
- src="//unpkg.com/${s}/dist/client.global.js"
284
- strategy="lazyOnload"
285
- />
286
- )}`,n=t.match(/\{process\.env\.NODE_ENV\s*===\s*["']development["']\s*&&\s*\(\s*<Script[^>]*react-grab[^>]*\/>\s*\)\}/is);if(n){let a=t.replace(n[0],`${n[0]}
287
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:a}}let o=t.match(/<Script[^>]*react-grab[^>]*\/>/i);if(o){let a=t.replace(o[0],`${o[0]}
288
- <Script src="//unpkg.com/${s}/dist/client.global.js" strategy="lazyOnload" />`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:a}}return {success:false,filePath:r,message:"Could not find React Grab script to add agent after"}},Nw=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`import("${s}/client");`,n=t.match(/import\s*\(\s*["']react-grab["']\s*\);?/);if(n){let o=n[0],a=o.endsWith(";"),u=t.replace(o,`${a?o.slice(0,-1):o};
289
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:u}}return {success:false,filePath:r,message:"Could not find React Grab import to add agent after"}},Hw=(t,e,r)=>{if(e==="none")return {success:true,filePath:r,message:"React Grab is already configured",noChanges:true};let s=`@react-grab/${e}`;if(t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is already configured`,noChanges:true};let i=`import("${s}/client");`,n=t.match(/import\s*\(\s*["']react-grab["']\s*\);?/);if(n){let o=n[0],a=o.endsWith(";"),u=t.replace(o,`${a?o.slice(0,-1):o};
290
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:u}}return {success:false,filePath:r,message:"Could not find React Grab import to add agent after"}},qw=(t,e,r)=>{let s=op(t);if(!s)return {success:false,filePath:"",message:"Could not find app/layout.tsx or app/layout.jsx"};let i=df.readFileSync(s,"utf-8"),n=i,o=cr(i),a=ap(t);if(o&&r)return hp(i,e,s);if(o||a)return {success:true,filePath:s,message:"React Grab is already installed"+(a?" in instrumentation-client":" in this file"),noChanges:true};if(!n.includes('import Script from "next/script"')){let l=n.match(/^import .+ from ['"].+['"];?\s*$/m);l?n=n.replace(l[0],`${l[0]}
291
- ${Ms}`):n=`${Ms}
292
-
293
- ${n}`;}let u=tp(e),h=n.match(/<head[^>]*>/);if(h)n=n.replace(h[0],`${h[0]}
294
- ${u}`);else {let l=n.match(/<html[^>]*>/);l&&(n=n.replace(l[0],`${l[0]}
295
- <head>
296
- ${u}
297
- </head>`));}return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Lw=(t,e,r)=>{let s=up(t);if(!s)return {success:false,filePath:"",message:`Could not find pages/_document.tsx or pages/_document.jsx.
298
-
299
- To set up React Grab with Pages Router, create pages/_document.tsx with:
300
-
301
- import { Html, Head, Main, NextScript } from "next/document";
302
- import Script from "next/script";
303
-
304
- export default function Document() {
305
- return (
306
- <Html>
307
- <Head>
308
- {process.env.NODE_ENV === "development" && (
309
- <Script src="//unpkg.com/react-grab/dist/index.global.js" strategy="beforeInteractive" />
310
- )}
311
- </Head>
312
- <body>
313
- <Main />
314
- <NextScript />
315
- </body>
316
- </Html>
317
- );
318
- }`};let i=df.readFileSync(s,"utf-8"),n=i,o=cr(i),a=ap(t);if(o&&r)return hp(i,e,s);if(o||a)return {success:true,filePath:s,message:"React Grab is already installed"+(a?" in instrumentation-client":" in this file"),noChanges:true};if(!n.includes('import Script from "next/script"')){let l=n.match(/^import .+ from ['"].+['"];?\s*$/m);l&&(n=n.replace(l[0],`${l[0]}
319
- ${Ms}`));}let u=rp(e),h=n.match(/<Head[^>]*>/);return h&&(n=n.replace(h[0],`${h[0]}
320
- ${u}`)),{success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},jw=(t,e,r)=>{let s=lp(t);if(!s)return {success:false,filePath:"",message:"Could not find index.html"};let i=df.readFileSync(s,"utf-8"),n=i,o=cr(i);if(o&&r)return Nw(i,e,s);if(o)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let a=sp(e),u=n.match(/<head[^>]*>/i);return u&&(n=n.replace(u[0],`${u[0]}
321
- ${a}`)),{success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Gw=(t,e,r)=>{let s=cp(t);if(!s)return {success:false,filePath:"",message:"Could not find entry file (src/index.tsx, src/main.tsx, etc.)"};let i=df.readFileSync(s,"utf-8"),n=cr(i);if(n&&r)return Hw(i,e,s);if(n)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let a=`${ip(e)}
322
-
323
- ${i}`;return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:a}},Hr=(t,e,r,s,i=false)=>{switch(e){case "next":return r==="app"?qw(t,s,i):Lw(t,s,i);case "vite":return jw(t,s,i);case "webpack":return Gw(t,s,i);default:return {success:false,filePath:"",message:`Unknown framework: ${e}. Please add React Grab manually.`}}},dp=t=>{try{return df.accessSync(t,df.constants.W_OK),!0}catch{return false}},Pe=t=>{if(t.success&&t.newContent&&t.filePath){if(!dp(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return df.writeFileSync(t.filePath,t.newContent),{success:!0}}catch(e){return {success:false,error:`Failed to write to ${t.filePath}: ${e instanceof Error?e.message:"Unknown error"}`}}}return {success:true}};var Vw=t=>{switch(t){case "bun":return "bunx";case "pnpm":return "pnpm dlx";case "yarn":return "npx";case "npm":default:return "npx"}},fp={"claude-code":"@react-grab/claude-code@latest",cursor:"@react-grab/cursor@latest",opencode:"@react-grab/opencode@latest",codex:"@react-grab/codex@latest",gemini:"@react-grab/gemini@latest",amp:"@react-grab/amp@latest"},Uw=(t,e)=>{let r=fp[t];return r?`${Vw(e)} ${r} &&`:null},ma=t=>{let e=fp[t];return e?[`npx ${e} &&`,`bunx ${e} &&`,`pnpm dlx ${e} &&`,`yarn dlx ${e} &&`]:[]},qr=(t,e,r,s="npm")=>{if(e==="none"||e==="visual-edit")return {success:true,filePath:"",message:e==="visual-edit"?"Visual Edit does not require package.json modification":"No agent selected, skipping package.json modification",noChanges:true};let i=$t.join(t,"package.json");if(!df.existsSync(i))return {success:false,filePath:"",message:"Could not find package.json"};let n=df.readFileSync(i,"utf-8"),o=Uw(e,s);if(!o)return {success:false,filePath:i,message:`Unknown agent: ${e}`};if(ma(e).some(h=>n.includes(h)))return {success:true,filePath:i,message:`Agent ${e} dev script is already configured`,noChanges:true};try{let h=JSON.parse(n),l="dev";if(!h.scripts?.dev){let f=Object.keys(h.scripts||{}).filter(m=>m.startsWith("dev"));if(f.length>0)l=f[0];else return {success:!0,filePath:i,message:"No dev script found in package.json",noChanges:!0,warning:`Could not inject agent into package.json (no dev script found).
324
- Run this command manually before starting your dev server:
325
- ${o} <your dev command>`}}let c=h.scripts[l];for(let f of r)if(ma(f).some(D=>c.includes(D)))return {success:!0,filePath:i,message:`Agent ${f} is already in ${l} script`,noChanges:!0};h.scripts[l]=`${o} ${c}`;let d=JSON.stringify(h,null,2)+`
326
- `;return {success:!0,filePath:i,message:`Add ${e} server to ${l} script`,originalContent:n,newContent:d}}catch{return {success:false,filePath:i,message:"Failed to parse package.json"}}},Ue=t=>{if(t.success&&t.newContent&&t.filePath){if(!dp(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return df.writeFileSync(t.filePath,t.newContent),{success:!0}}catch(e){return {success:false,error:`Failed to write to ${t.filePath}: ${e instanceof Error?e.message:"Unknown error"}`}}}return {success:true}},Ww=t=>{let e=[];if(t.activationKey){let r=[];t.activationKey.key&&r.push(`key: "${t.activationKey.key}"`),t.activationKey.metaKey&&r.push("metaKey: true"),t.activationKey.ctrlKey&&r.push("ctrlKey: true"),t.activationKey.shiftKey&&r.push("shiftKey: true"),t.activationKey.altKey&&r.push("altKey: true"),r.length>0&&e.push(`activationKey: { ${r.join(", ")} }`);}return t.activationMode&&e.push(`activationMode: "${t.activationMode}"`),t.keyHoldDuration!==void 0&&e.push(`keyHoldDuration: ${t.keyHoldDuration}`),t.allowActivationInsideInput!==void 0&&e.push(`allowActivationInsideInput: ${t.allowActivationInsideInput}`),t.maxContextLines!==void 0&&e.push(`maxContextLines: ${t.maxContextLines}`),`{ ${e.join(", ")} }`},pp=t=>{let e={};if(t.activationKey){let r={};t.activationKey.key&&(r.key=t.activationKey.key),t.activationKey.metaKey&&(r.metaKey=true),t.activationKey.ctrlKey&&(r.ctrlKey=true),t.activationKey.shiftKey&&(r.shiftKey=true),t.activationKey.altKey&&(r.altKey=true),Object.keys(r).length>0&&(e.activationKey=r);}return t.activationMode&&(e.activationMode=t.activationMode),t.keyHoldDuration!==void 0&&(e.keyHoldDuration=t.keyHoldDuration),t.allowActivationInsideInput!==void 0&&(e.allowActivationInsideInput=t.allowActivationInsideInput),t.maxContextLines!==void 0&&(e.maxContextLines=t.maxContextLines),JSON.stringify(e)},mp=(t,e,r)=>{switch(e){case "next":return r==="app"?op(t):up(t);case "vite":return lp(t);case "webpack":return cp(t);default:return null}},Kw=(t,e,r)=>{let s=t.match(/(<Script[^>]*react-grab[^>]*)(\/?>)/is);if(!s)return {success:false,filePath:r,message:"Could not find React Grab Script tag"};let i=s[0],n=s[1],o=s[2],a=i.match(/data-options=\{JSON\.stringify\([^)]+\)\}/),u=`data-options={JSON.stringify(
327
- ${Ww(e)}
328
- )}`,h;a?h=i.replace(a[0],u):h=`${n}
329
- ${u}
330
- ${o}`;let l=t.replace(i,h);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:l}},Yw=(t,e,r)=>{let s=t.match(/import\s*\(\s*["']react-grab["']\s*\)/);if(!s)return {success:false,filePath:r,message:"Could not find React Grab import"};let n=`import("react-grab").then((m) => m.init(${pp(e)}))`,o=t.replace(s[0],n);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:o}},Jw=(t,e,r)=>{let s=t.match(/import\s*\(\s*["']react-grab["']\s*\)/);if(!s)return {success:false,filePath:r,message:"Could not find React Grab import"};let n=`import("react-grab").then((m) => m.init(${pp(e)}))`,o=t.replace(s[0],n);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:o}},Bs=(t,e,r,s)=>{let i=mp(t,e,r);if(!i)return {success:false,filePath:"",message:"Could not find file containing React Grab configuration"};let n=df.readFileSync(i,"utf-8");if(!cr(n))return {success:false,filePath:i,message:"Could not find React Grab code in the file"};switch(e){case "next":return Kw(n,s,i);case "vite":return Yw(n,s,i);case "webpack":return Jw(n,s,i);default:return {success:false,filePath:i,message:`Unknown framework: ${e}`}}},Ns=t=>Pe(t),zw=(t,e,r)=>{let s=`@react-grab/${e}`;if(!t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is not configured in this file`,noChanges:true};let i=new RegExp(`\\s*\\{process\\.env\\.NODE_ENV === "development" && \\(\\s*<Script[^>]*${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}[^>]*\\/>\\s*\\)\\}`,"gs"),n=new RegExp(`\\s*<Script[^>]*${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}[^>]*\\/>`,"gi"),o=t.replace(i,"");return o===t&&(o=t.replace(n,"")),o===t?{success:false,filePath:r,message:`Could not find agent ${e} script to remove`}:{success:true,filePath:r,message:`Remove ${e} agent`,originalContent:t,newContent:o}},Xw=(t,e,r)=>{let s=`@react-grab/${e}`;if(!t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is not configured in this file`,noChanges:true};let i=new RegExp(`\\s*import\\s*\\(\\s*["']${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}/client["']\\s*\\);?`,"g"),n=t.replace(i,"");return n===t?{success:false,filePath:r,message:`Could not find agent ${e} import to remove`}:{success:true,filePath:r,message:`Remove ${e} agent`,originalContent:t,newContent:n}},Zw=(t,e,r)=>{let s=`@react-grab/${e}`;if(!t.includes(s))return {success:true,filePath:r,message:`Agent ${e} is not configured in this file`,noChanges:true};let i=new RegExp(`\\s*import\\s*\\(\\s*["']${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}/client["']\\s*\\);?`,"g"),n=t.replace(i,"");return n===t?{success:false,filePath:r,message:`Could not find agent ${e} import to remove`}:{success:true,filePath:r,message:`Remove ${e} agent`,originalContent:t,newContent:n}},qt=(t,e,r,s)=>{let i=mp(t,e,r);if(!i)return {success:true,filePath:"",message:"Could not find file containing React Grab configuration",noChanges:true};let n=df.readFileSync(i,"utf-8");switch(e){case "next":return zw(n,s,i);case "vite":return Xw(n,s,i);case "webpack":return Zw(n,s,i);default:return {success:false,filePath:i,message:`Unknown framework: ${e}`}}},Lt=(t,e)=>{let r=$t.join(t,"package.json");if(!df.existsSync(r))return {success:true,filePath:"",message:"Could not find package.json",noChanges:true};let s=df.readFileSync(r,"utf-8"),i=ma(e);if(i.length===0)return {success:true,filePath:r,message:`Unknown agent: ${e}`,noChanges:true};if(!i.some(o=>s.includes(o)))return {success:true,filePath:r,message:`Agent ${e} dev script is not configured`,noChanges:true};try{let o=JSON.parse(s);for(let u of Object.keys(o.scripts||{})){let h=o.scripts[u];if(typeof h=="string"){for(let l of i)h.includes(l)&&(h=h.replace(l+" ","").replace(l,""));o.scripts[u]=h;}}let a=JSON.stringify(o,null,2)+`
331
- `;return {success:!0,filePath:r,message:`Remove ${e} server from dev script`,originalContent:s,newContent:a}}catch{return {success:false,filePath:r,message:"Failed to parse package.json"}}};var Qw="0.0.97",Ae={"claude-code":"Claude Code",cursor:"Cursor",opencode:"OpenCode",codex:"Codex",gemini:"Gemini",amp:"Amp","visual-edit":"Visual Edit"},gp=new Te().name("add").description("add an agent integration").argument("[agent]","agent to add (claude-code, cursor, opencode, codex, gemini, amp, visual-edit)").option("-y, --yes","skip confirmation prompts",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async(t,e)=>{console.log(`${Hs.default.magenta("\u273F")} ${Hs.default.bold("React Grab")} ${Hs.default.gray(Qw)}`),console.log();try{let r=e.cwd,s=e.yes,i=M("Preflight checks.").start(),n=await pt(r);n.hasReactGrab||(i.fail("React Grab is not installed."),p.break(),p.error(`Run ${$.info("react-grab init")} first to install React Grab.`),p.break(),process.exit(1)),i.succeed();let o=["claude-code","cursor","opencode","codex","gemini","amp","visual-edit"],a=o.filter(D=>!n.installedAgents.includes(D));a.length===0&&(p.break(),p.success("All agent integrations are already installed."),p.break(),process.exit(0));let u,h=[];if(t){if(o.includes(t)||(p.break(),p.error(`Invalid agent: ${t}`),p.error("Available agents: claude-code, cursor, opencode, codex, gemini, amp, visual-edit"),p.break(),process.exit(1)),n.installedAgents.includes(t)&&(p.break(),p.warn(`${Ae[t]} is already installed.`),p.break(),process.exit(0)),u=t,n.installedAgents.length>0&&!s){let D=n.installedAgents.map(b=>Ae[b]||b).join(", ");p.break(),p.warn(`${D} is already installed.`);let{action:x}=await(0,Lr.default)({type:"select",name:"action",message:"How would you like to proceed?",choices:[{title:`Replace with ${Ae[u]}`,value:"replace"},{title:`Add ${Ae[u]} alongside existing`,value:"add"},{title:"Cancel",value:"cancel"}]});(!x||x==="cancel")&&(p.break(),p.log("Changes cancelled."),p.break(),process.exit(0)),x==="replace"&&(h=[...n.installedAgents]);}}else if(s)p.break(),p.error("Please specify an agent to add."),p.error("Available agents: "+a.join(", ")),p.break(),process.exit(1);else {if(p.break(),n.installedAgents.length>0){let x=n.installedAgents.map(b=>Ae[b]||b).join(", ");p.warn(`Currently installed: ${x}`),p.break();}let{agent:D}=await(0,Lr.default)({type:"select",name:"agent",message:`Which ${$.info("agent integration")} would you like to add?`,choices:a.map(x=>({title:Ae[x],value:x}))});if(D||(p.break(),process.exit(1)),u=D,n.installedAgents.length>0){let x=n.installedAgents.map(v=>Ae[v]||v).join(", "),{action:b}=await(0,Lr.default)({type:"select",name:"action",message:"How would you like to proceed?",choices:[{title:`Replace ${x} with ${Ae[u]}`,value:"replace"},{title:`Add ${Ae[u]} alongside existing`,value:"add"},{title:"Cancel",value:"cancel"}]});(!b||b==="cancel")&&(p.break(),p.log("Changes cancelled."),p.break(),process.exit(0)),b==="replace"&&(h=[...n.installedAgents]);}}if(h.length>0){for(let D of h){let x=qt(n.projectRoot,n.framework,n.nextRouterType,D),b=Lt(n.projectRoot,D),v=Bt(D);if(v.length>0){let C=M(`Removing ${v.join(", ")}.`).start();try{Mt(v,n.packageManager,n.projectRoot),C.succeed();}catch(E){C.fail(),me(E);}}if(x.success&&!x.noChanges&&x.newContent){let C=M(`Removing ${Ae[D]||D} from ${x.filePath}.`).start(),E=Pe(x);E.success||(C.fail(),p.break(),p.error(E.error||"Failed to write file."),p.break(),process.exit(1)),C.succeed();}if(b.success&&!b.noChanges&&b.newContent){let C=M(`Removing ${Ae[D]||D} from ${b.filePath}.`).start(),E=Ue(b);E.success||(C.fail(),p.break(),p.error(E.error||"Failed to write file."),p.break(),process.exit(1)),C.succeed();}}n.installedAgents=n.installedAgents.filter(D=>!h.includes(D));}M(`Adding ${Ae[u]}.`).start().succeed();let c=Hr(n.projectRoot,n.framework,n.nextRouterType,u,!0),d=qr(n.projectRoot,u,n.installedAgents,n.packageManager);c.success||(p.break(),p.error(c.message),p.break(),process.exit(1));let f=!c.noChanges&&c.originalContent&&c.newContent,m=d.success&&!d.noChanges&&d.originalContent&&d.newContent;if((f||m)&&(p.break(),f&&we(c.filePath,c.originalContent,c.newContent),m&&(f&&p.break(),we(d.filePath,d.originalContent,d.newContent)),!s&&h.length===0)){p.break();let{proceed:D}=await(0,Lr.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});D||(p.break(),p.log("Changes cancelled."),p.break(),process.exit(0));}let g=or(u,!1);if(g.length>0){let D=M(`Installing ${g.join(", ")}.`).start();try{nr(g,n.packageManager,n.projectRoot),D.succeed();}catch(x){D.fail(),me(x);}}if(f){let D=M(`Applying changes to ${c.filePath}.`).start(),x=Pe(c);x.success||(D.fail(),p.break(),p.error(x.error||"Failed to write file."),p.break(),process.exit(1)),D.succeed();}if(m){let D=M(`Applying changes to ${d.filePath}.`).start(),x=Ue(d);x.success||(D.fail(),p.break(),p.error(x.error||"Failed to write file."),p.break(),process.exit(1)),D.succeed();}p.break(),p.log(`${$.success("Success!")} ${Ae[u]} has been added.`),d.warning?p.warn(d.warning):p.log("Make sure to start the agent server before using it."),p.break();}catch(r){me(r);}});var Ls=be(Rt()),gt=be(tr());var ex="0.0.97",qs={metaKey:process.platform==="darwin"?"\u2318 Command":"\u229E Windows",ctrlKey:"Ctrl",shiftKey:"Shift",altKey:process.platform==="darwin"?"\u2325 Option":"Alt"},tx=t=>{if(!t)return "Default (Option/Alt)";let e=[];return t.metaKey&&e.push(process.platform==="darwin"?"\u2318":"Win"),t.ctrlKey&&e.push("Ctrl"),t.shiftKey&&e.push("Shift"),t.altKey&&e.push(process.platform==="darwin"?"\u2325":"Alt"),t.key&&e.push(t.key.toUpperCase()),e.length>0?e.join(" + "):"Default (Option/Alt)"},Dp=new Te().name("configure").alias("config").description("configure React Grab options").option("-y, --yes","skip confirmation prompts",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async t=>{console.log(`${Ls.default.magenta("\u273F")} ${Ls.default.bold("React Grab")} ${Ls.default.gray(ex)}`),console.log();try{let e=t.cwd,r=t.yes,s=M("Preflight checks.").start(),i=await pt(e);i.hasReactGrab||(s.fail("React Grab is not installed."),p.break(),p.error(`Run ${$.info("react-grab init")} first to install React Grab.`),p.break(),process.exit(1)),s.succeed(),r&&(p.break(),p.error("Configure command requires interactive mode."),p.error("Remove the --yes flag to use interactive prompts."),p.break(),process.exit(1)),p.break(),p.log(`Configure ${$.info("React Grab")} options:`),p.break();let n={},{wantActivationKey:o}=await(0,gt.default)({type:"confirm",name:"wantActivationKey",message:`Configure ${$.info("activation key")}?`,initial:!1});if(o===void 0&&(p.break(),process.exit(1)),o){let{key:d}=await(0,gt.default)({type:"text",name:"key",message:"Enter the activation key (e.g., g, k, space):",initial:""});d===void 0&&(p.break(),process.exit(1));let{modifiers:f}=await(0,gt.default)({type:"multiselect",name:"modifiers",message:"Select modifier keys (space to select, enter to confirm):",choices:[{title:qs.metaKey,value:"metaKey"},{title:qs.ctrlKey,value:"ctrlKey"},{title:qs.shiftKey,value:"shiftKey"},{title:qs.altKey,value:"altKey",selected:!0}],hint:"- Space to select, Enter to confirm"});f===void 0&&(p.break(),process.exit(1)),n.activationKey={...d&&{key:d.toLowerCase()},...f.includes("metaKey")&&{metaKey:!0},...f.includes("ctrlKey")&&{ctrlKey:!0},...f.includes("shiftKey")&&{shiftKey:!0},...f.includes("altKey")&&{altKey:!0}},p.log(` Activation key: ${$.info(tx(n.activationKey))}`);}let{activationMode:a}=await(0,gt.default)({type:"select",name:"activationMode",message:`Select ${$.info("activation mode")}:`,choices:[{title:"Toggle (press to activate/deactivate)",value:"toggle"},{title:"Hold (hold key to keep active)",value:"hold"}],initial:0});if(a===void 0&&(p.break(),process.exit(1)),n.activationMode=a,a==="hold"){let{keyHoldDuration:d}=await(0,gt.default)({type:"number",name:"keyHoldDuration",message:`Enter ${$.info("key hold duration")} in milliseconds:`,initial:150,min:0,max:2e3});d===void 0&&(p.break(),process.exit(1)),n.keyHoldDuration=d;}let{allowActivationInsideInput:u}=await(0,gt.default)({type:"confirm",name:"allowActivationInsideInput",message:`Allow activation ${$.info("inside input fields")}?`,initial:!0});u===void 0&&(p.break(),process.exit(1)),n.allowActivationInsideInput=u;let{maxContextLines:h}=await(0,gt.default)({type:"number",name:"maxContextLines",message:`Enter ${$.info("max context lines")} to include:`,initial:3,min:0,max:50});h===void 0&&(p.break(),process.exit(1)),n.maxContextLines=h;let l=Bs(i.projectRoot,i.framework,i.nextRouterType,n);if(l.success||(p.break(),p.error(l.message),p.break(),process.exit(1)),!l.noChanges&&l.originalContent&&l.newContent){p.break(),we(l.filePath,l.originalContent,l.newContent),p.break();let{proceed:d}=await(0,gt.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});d||(p.break(),p.log("Changes cancelled."),p.break(),process.exit(0));let f=M(`Applying changes to ${l.filePath}.`).start(),m=Ns(l);m.success||(f.fail(),p.break(),p.error(m.error||"Failed to write file."),p.break(),process.exit(1)),f.succeed();}else p.break(),p.log("No changes needed.");p.break(),p.log(`${$.success("Success!")} React Grab options have been configured.`),p.break();}catch(e){me(e);}});var Vs=be(Rt()),ce=be(tr());var yp="0.0.97",rx="https://react-grab.com/api/report-cli",js="https://github.com/aidenybai/react-grab",bp=async(t,e,r)=>{try{await fetch(rx,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:t,version:yp,config:e,error:r?{message:r.message,stack:r.stack}:void 0,timestamp:new Date().toISOString()})}).catch(()=>{});}catch{}},ga={next:"Next.js",vite:"Vite",webpack:"Webpack",unknown:"Unknown"},sx={npm:"npm",yarn:"Yarn",pnpm:"pnpm",bun:"Bun"},ix={remix:"Remix",astro:"Astro",sveltekit:"SvelteKit",gatsby:"Gatsby"},de={"claude-code":"Claude Code",cursor:"Cursor",opencode:"OpenCode",codex:"Codex",gemini:"Gemini",amp:"Amp",ami:"Ami","visual-edit":"Visual Edit"},Gs={metaKey:process.platform==="darwin"?"\u2318 Command":"\u229E Windows",ctrlKey:"Ctrl",shiftKey:"Shift",altKey:process.platform==="darwin"?"\u2325 Option":"Alt"},nx=t=>{if(!t)return "Default (Option/Alt)";let e=[];return t.metaKey&&e.push(process.platform==="darwin"?"\u2318":"Win"),t.ctrlKey&&e.push("Ctrl"),t.shiftKey&&e.push("Shift"),t.altKey&&e.push(process.platform==="darwin"?"\u2325":"Alt"),t.key&&e.push(t.key.toUpperCase()),e.length>0?e.join(" + "):"Default (Option/Alt)"},vp=new Te().name("init").description("initialize React Grab in your project").option("-y, --yes","skip confirmation prompts",false).option("-f, --force","force overwrite existing config",false).option("-a, --agent <agent>","agent integration (claude-code, cursor, opencode, codex, gemini, amp, visual-edit)").option("--skip-install","skip package installation",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async t=>{console.log(`${Vs.default.magenta("\u273F")} ${Vs.default.bold("React Grab")} ${Vs.default.gray(yp)}`),console.log();try{let e=t.cwd,r=t.yes,s=M("Preflight checks.").start(),i=await pt(e);if(i.hasReactGrab&&!t.force){s.succeed(),r&&(p.break(),p.warn("React Grab is already installed."),p.log(`Use ${$.info("--force")} to reconfigure, or remove ${$.info("--yes")} for interactive mode.`),p.break(),process.exit(0)),p.break(),p.success("React Grab is already installed."),p.break();let v=["claude-code","cursor","opencode","codex","gemini","amp","visual-edit"].filter(R=>!i.installedAgents.includes(R));if(i.installedAgents.length>0){let R=i.installedAgents.map(P=>de[P]||P).join(", ");p.log(`Currently installed agents: ${$.info(R)}`),p.break();}let C=!1;if(v.length>0){let{wantAddAgent:R}=await(0,ce.default)({type:"confirm",name:"wantAddAgent",message:`Would you like to add an ${$.info("agent integration")}?`,initial:!0});if(R===void 0&&(p.break(),process.exit(1)),R){let{agent:P}=await(0,ce.default)({type:"select",name:"agent",message:`Which ${$.info("agent integration")} would you like to add?`,choices:v.map(U=>({title:de[U],value:U}))});P===void 0&&(p.break(),process.exit(1));let A=P,T=[];if(i.installedAgents.length>0){let U=i.installedAgents.map(B=>de[B]||B).join(", "),{action:F}=await(0,ce.default)({type:"select",name:"action",message:"How would you like to proceed?",choices:[{title:`Replace ${U} with ${de[A]}`,value:"replace"},{title:`Add ${de[A]} alongside existing`,value:"add"},{title:"Cancel",value:"cancel"}]});if(!F||F==="cancel")p.break(),p.log("Agent addition cancelled.");else {if(F==="replace"&&(T=[...i.installedAgents]),T.length>0){for(let w of T){let G=qt(i.projectRoot,i.framework,i.nextRouterType,w),k=Lt(i.projectRoot,w),ne=Bt(w);if(ne.length>0){let ue=M(`Removing ${ne.join(", ")}.`).start();try{Mt(ne,i.packageManager,i.projectRoot),ue.succeed();}catch(oe){ue.fail(),me(oe);}}if(G.success&&!G.noChanges&&G.newContent){let ue=M(`Removing ${de[w]||w} from ${G.filePath}.`).start(),oe=Pe(G);oe.success||(ue.fail(),p.break(),p.error(oe.error||"Failed to write file."),p.break(),process.exit(1)),ue.succeed();}if(k.success&&!k.noChanges&&k.newContent){let ue=M(`Removing ${de[w]||w} from ${k.filePath}.`).start(),oe=Ue(k);oe.success||(ue.fail(),p.break(),p.error(oe.error||"Failed to write file."),p.break(),process.exit(1)),ue.succeed();}}i.installedAgents=i.installedAgents.filter(w=>!T.includes(w));}let B=Hr(i.projectRoot,i.framework,i.nextRouterType,A,!0),I=qr(i.projectRoot,A,i.installedAgents,i.packageManager);B.success||(p.break(),p.error(B.message),p.break(),process.exit(1));let ee=!B.noChanges&&B.originalContent&&B.newContent,_=I.success&&!I.noChanges&&I.originalContent&&I.newContent;if(ee||_)if(p.break(),ee&&we(B.filePath,B.originalContent,B.newContent),_&&(ee&&p.break(),we(I.filePath,I.originalContent,I.newContent)),T.length===0){p.break();let{proceed:w}=await(0,ce.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});if(!w)p.break(),p.log("Agent addition cancelled.");else {let G=or(A,!1);if(G.length>0){let k=M(`Installing ${G.join(", ")}.`).start();try{nr(G,i.packageManager,i.projectRoot),k.succeed();}catch(ne){k.fail(),me(ne);}}if(ee){let k=M(`Applying changes to ${B.filePath}.`).start(),ne=Pe(B);ne.success||(k.fail(),p.break(),p.error(ne.error||"Failed to write file."),p.break(),process.exit(1)),k.succeed();}if(_){let k=M(`Applying changes to ${I.filePath}.`).start(),ne=Ue(I);ne.success||(k.fail(),p.break(),p.error(ne.error||"Failed to write file."),p.break(),process.exit(1)),k.succeed();}C=!0,p.break(),p.success(`${de[A]} has been added.`);}}else {let w=or(A,!1);if(w.length>0){let G=M(`Installing ${w.join(", ")}.`).start();try{nr(w,i.packageManager,i.projectRoot),G.succeed();}catch(k){G.fail(),me(k);}}if(ee){let G=M(`Applying changes to ${B.filePath}.`).start(),k=Pe(B);k.success||(G.fail(),p.break(),p.error(k.error||"Failed to write file."),p.break(),process.exit(1)),G.succeed();}if(_){let G=M(`Applying changes to ${I.filePath}.`).start(),k=Ue(I);k.success||(G.fail(),p.break(),p.error(k.error||"Failed to write file."),p.break(),process.exit(1)),G.succeed();}C=!0,p.break(),p.success(`${de[A]} has been added.`);}}}}}else p.log("All agent integrations are already installed.");p.break();let{wantCustomizeOptions:E}=await(0,ce.default)({type:"confirm",name:"wantCustomizeOptions",message:`Would you like to customize ${$.info("options")}?`,initial:!1});if(E===void 0&&(p.break(),process.exit(1)),E){p.break(),p.log(`Configure ${$.info("React Grab")} options:`),p.break();let R={},{wantActivationKey:P}=await(0,ce.default)({type:"confirm",name:"wantActivationKey",message:`Configure ${$.info("activation key")}?`,initial:!1});if(P===void 0&&(p.break(),process.exit(1)),P){let{key:I}=await(0,ce.default)({type:"text",name:"key",message:"Enter the activation key (e.g., g, k, space):",initial:""});I===void 0&&(p.break(),process.exit(1));let{modifiers:ee}=await(0,ce.default)({type:"multiselect",name:"modifiers",message:"Select modifier keys (space to select, enter to confirm):",choices:[{title:Gs.metaKey,value:"metaKey"},{title:Gs.ctrlKey,value:"ctrlKey"},{title:Gs.shiftKey,value:"shiftKey"},{title:Gs.altKey,value:"altKey",selected:!0}],hint:"- Space to select, Enter to confirm"});ee===void 0&&(p.break(),process.exit(1)),R.activationKey={...I&&{key:I.toLowerCase()},...ee.includes("metaKey")&&{metaKey:!0},...ee.includes("ctrlKey")&&{ctrlKey:!0},...ee.includes("shiftKey")&&{shiftKey:!0},...ee.includes("altKey")&&{altKey:!0}},p.log(` Activation key: ${$.info(nx(R.activationKey))}`);}let{activationMode:A}=await(0,ce.default)({type:"select",name:"activationMode",message:`Select ${$.info("activation mode")}:`,choices:[{title:"Toggle (press to activate/deactivate)",value:"toggle"},{title:"Hold (hold key to keep active)",value:"hold"}],initial:0});if(A===void 0&&(p.break(),process.exit(1)),R.activationMode=A,A==="hold"){let{keyHoldDuration:I}=await(0,ce.default)({type:"number",name:"keyHoldDuration",message:`Enter ${$.info("key hold duration")} in milliseconds:`,initial:150,min:0,max:2e3});I===void 0&&(p.break(),process.exit(1)),R.keyHoldDuration=I;}let{allowActivationInsideInput:T}=await(0,ce.default)({type:"confirm",name:"allowActivationInsideInput",message:`Allow activation ${$.info("inside input fields")}?`,initial:!0});T===void 0&&(p.break(),process.exit(1)),R.allowActivationInsideInput=T;let{maxContextLines:U}=await(0,ce.default)({type:"number",name:"maxContextLines",message:`Enter ${$.info("max context lines")} to include:`,initial:3,min:0,max:50});U===void 0&&(p.break(),process.exit(1)),R.maxContextLines=U;let F=Bs(i.projectRoot,i.framework,i.nextRouterType,R);if(F.success||(p.break(),p.error(F.message),p.break(),process.exit(1)),!F.noChanges&&F.originalContent&&F.newContent){p.break(),we(F.filePath,F.originalContent,F.newContent),p.break();let{proceed:I}=await(0,ce.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});if(!I)p.break(),p.log("Options configuration cancelled.");else {let ee=M(`Applying changes to ${F.filePath}.`).start(),_=Ns(F);_.success||(ee.fail(),p.break(),p.error(_.error||"Failed to write file."),p.break(),process.exit(1)),ee.succeed(),p.break(),p.success("React Grab options have been configured.");}}else p.break(),p.log("No option changes needed.");}!C&&!E&&(p.break(),p.log("No changes made.")),p.break(),process.exit(0);}s.succeed();let n=M("Verifying framework.").start();if(i.unsupportedFramework){let b=ix[i.unsupportedFramework];n.fail(`Found ${$.info(b)}.`),p.break(),p.log(`${b} is not yet supported by automatic setup.`),p.log(`Visit ${$.info(js)} for manual setup.`),p.break(),process.exit(1);}if(i.framework==="unknown")if(i.isMonorepo&&!r){n.info("Verifying framework. Found monorepo.");let v=Af(i.projectRoot).filter(C=>C.hasReact||C.framework!=="unknown");if(v.length>0){p.break();let C=[...v].sort((A,T)=>A.framework==="unknown"&&T.framework!=="unknown"?1:A.framework!=="unknown"&&T.framework==="unknown"?-1:0),{selectedProject:E}=await(0,ce.default)({type:"select",name:"selectedProject",message:"Select a project to install React Grab:",choices:C.map(A=>{let T=A.framework!=="unknown"?` ${$.dim(`(${ga[A.framework]})`)}`:"";return {title:`${A.name}${T}`,value:A.path}})});E||(p.break(),process.exit(1)),process.chdir(E);let R=await pt(E);Object.assign(i,R),M("Verifying framework.").start().succeed(`Verifying framework. Found ${$.info(ga[R.framework])}.`);}else n.fail("Could not detect a supported framework."),p.break(),p.log(`Visit ${$.info(js)} for manual setup.`),p.break(),process.exit(1);}else n.fail("Could not detect a supported framework."),p.break(),p.log("React Grab supports Next.js, Vite, and Webpack projects."),p.log(`Visit ${$.info(js)} for manual setup.`),p.break(),process.exit(1);else n.succeed(`Verifying framework. Found ${$.info(ga[i.framework])}.`);i.framework==="next"&&M("Detecting router type.").start().succeed(`Detecting router type. Found ${$.info(i.nextRouterType==="app"?"App Router":"Pages Router")}.`),M("Detecting package manager.").start().succeed(`Detecting package manager. Found ${$.info(sx[i.packageManager])}.`);let a=i.framework,u=i.packageManager,h=i.nextRouterType,l=t.agent||"none",c=[];if(!r&&!t.agent){if(p.break(),t.force&&i.installedAgents.length>0){let v=i.installedAgents.map(C=>de[C]||C).join(", ");p.warn(`Currently installed: ${v}`),p.break();}let{agent:b}=await(0,ce.default)({type:"select",name:"agent",message:`Would you like to add an ${$.info("agent integration")}?`,choices:[{title:"None",value:"none"},{title:"Claude Code",value:"claude-code"},{title:"Cursor",value:"cursor"},{title:"OpenCode",value:"opencode"},{title:"Codex",value:"codex"},{title:"Gemini",value:"gemini"},{title:"Amp",value:"amp"},{title:"Visual Edit",value:"visual-edit"}]});if(b===void 0&&(p.break(),process.exit(1)),l=b,t.force&&i.installedAgents.length>0&&l!=="none"&&!i.installedAgents.includes(l)){let v=i.installedAgents.map(E=>de[E]||E).join(", "),{action:C}=await(0,ce.default)({type:"select",name:"action",message:"How would you like to proceed?",choices:[{title:`Replace ${v} with ${de[l]}`,value:"replace"},{title:`Add ${de[l]} alongside existing`,value:"add"},{title:"Cancel",value:"cancel"}]});(!C||C==="cancel")&&(p.break(),p.log("Changes cancelled."),p.break(),process.exit(0)),C==="replace"&&(c=[...i.installedAgents]);}}else if(t.agent&&t.force&&i.installedAgents.length>0&&!i.installedAgents.includes(t.agent)&&!r){let b=i.installedAgents.map(C=>de[C]||C).join(", ");p.break(),p.warn(`Currently installed: ${b}`);let{action:v}=await(0,ce.default)({type:"select",name:"action",message:"How would you like to proceed?",choices:[{title:`Replace ${b} with ${de[l]}`,value:"replace"},{title:`Add ${de[l]} alongside existing`,value:"add"},{title:"Cancel",value:"cancel"}]});(!v||v==="cancel")&&(p.break(),p.log("Changes cancelled."),p.break(),process.exit(0)),v==="replace"&&(c=[...i.installedAgents]);}let d=Hr(i.projectRoot,a,h,l,!1),f=qr(i.projectRoot,l,i.installedAgents,u);d.success||(p.break(),p.error(d.message),p.error(`Visit ${$.info(js)} for manual setup.`),p.break(),process.exit(1));let m=!d.noChanges&&d.originalContent&&d.newContent,g=f.success&&!f.noChanges&&f.originalContent&&f.newContent;if((m||g)&&(p.break(),m&&we(d.filePath,d.originalContent,d.newContent),g&&(m&&p.break(),we(f.filePath,f.originalContent,f.newContent)),p.break(),p.warn("Auto-detection may not be 100% accurate."),p.warn("Please verify the changes before committing."),!r)){p.break();let{proceed:b}=await(0,ce.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});b||(p.break(),p.log("Changes cancelled."),p.break(),process.exit(0));}if(c.length>0){for(let b of c){let v=qt(i.projectRoot,i.framework,i.nextRouterType,b),C=Lt(i.projectRoot,b),E=Bt(b);if(E.length>0&&!t.skipInstall){let R=M(`Removing ${E.join(", ")}.`).start();try{Mt(E,u,i.projectRoot),R.succeed();}catch(P){R.fail(),me(P);}}if(v.success&&!v.noChanges&&v.newContent){let R=M(`Removing ${de[b]||b} from ${v.filePath}.`).start(),P=Pe(v);P.success||(R.fail(),p.break(),p.error(P.error||"Failed to write file."),p.break(),process.exit(1)),R.succeed();}if(C.success&&!C.noChanges&&C.newContent){let R=M(`Removing ${de[b]||b} from ${C.filePath}.`).start(),P=Ue(C);P.success||(R.fail(),p.break(),p.error(P.error||"Failed to write file."),p.break(),process.exit(1)),R.succeed();}}i.installedAgents=i.installedAgents.filter(b=>!c.includes(b));}let D=!i.hasReactGrab,x=l!=="none"&&!i.installedAgents.includes(l);if(!t.skipInstall&&(D||x)){let b=or(l,D);if(b.length>0){let v=M(`Installing ${b.join(", ")}.`).start();try{nr(b,u,i.projectRoot),v.succeed();}catch(C){v.fail(),me(C);}}}if(m){let b=M(`Applying changes to ${d.filePath}.`).start(),v=Pe(d);v.success||(b.fail(),p.break(),p.error(v.error||"Failed to write file."),p.break(),process.exit(1)),b.succeed();}if(g){let b=M(`Applying changes to ${f.filePath}.`).start(),v=Ue(f);v.success||(b.fail(),p.break(),p.error(v.error||"Failed to write file."),p.break(),process.exit(1)),b.succeed();}p.break(),p.log(`${$.success("Success!")} React Grab has been installed.`),f.warning?(p.break(),p.warn(f.warning),p.break()):p.log("You may now start your development server."),p.break(),await bp("completed",{framework:a,packageManager:u,router:h,agent:l!=="none"?l:void 0,isMonorepo:i.isMonorepo});}catch(e){me(e),await bp("error",void 0,e);}});var Ws=be(Rt()),Da=be(tr());var ox="0.0.97",Us={"claude-code":"Claude Code",cursor:"Cursor",opencode:"OpenCode",codex:"Codex",gemini:"Gemini",amp:"Amp",ami:"Ami","visual-edit":"Visual Edit"},Cp=new Te().name("remove").description("remove an agent integration").argument("[agent]","agent to remove (claude-code, cursor, opencode, codex, gemini, amp, ami, visual-edit)").option("-y, --yes","skip confirmation prompts",false).option("-c, --cwd <cwd>","working directory (defaults to current directory)",process.cwd()).action(async(t,e)=>{console.log(`${Ws.default.magenta("\u273F")} ${Ws.default.bold("React Grab")} ${Ws.default.gray(ox)}`),console.log();try{let r=e.cwd,s=e.yes,i=M("Preflight checks.").start(),n=await pt(r);n.hasReactGrab||(i.fail("React Grab is not installed."),p.break(),p.error(`Run ${$.info("react-grab init")} first to install React Grab.`),p.break(),process.exit(1)),n.installedAgents.length===0&&(i.succeed(),p.break(),p.warn("No agent integrations are installed."),p.break(),process.exit(0)),i.succeed();let o;if(t)n.installedAgents.includes(t)||(p.break(),p.error(`Agent ${$.info(t)} is not installed.`),p.log(`Installed agents: ${n.installedAgents.map(f=>Us[f]||f).join(", ")}`),p.break(),process.exit(1)),o=t;else if(s)p.break(),p.error("Please specify an agent to remove."),p.error("Installed agents: "+n.installedAgents.join(", ")),p.break(),process.exit(1);else {p.break();let{agent:f}=await(0,Da.default)({type:"select",name:"agent",message:`Which ${$.info("agent integration")} would you like to remove?`,choices:n.installedAgents.map(m=>({title:Us[m]||m,value:m}))});f||(p.break(),process.exit(1)),o=f;}M(`Preparing to remove ${Us[o]||o}.`).start().succeed();let u=qt(n.projectRoot,n.framework,n.nextRouterType,o),h=Lt(n.projectRoot,o),l=u.success&&!u.noChanges&&u.originalContent&&u.newContent,c=h.success&&!h.noChanges&&h.originalContent&&h.newContent;if((l||c)&&(p.break(),l&&we(u.filePath,u.originalContent,u.newContent),c&&(l&&p.break(),we(h.filePath,h.originalContent,h.newContent)),!s)){p.break();let{proceed:f}=await(0,Da.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});f||(p.break(),p.log("Changes cancelled."),p.break(),process.exit(0));}let d=Bt(o);if(d.length>0){let f=M(`Removing ${d.join(", ")}.`).start();try{Mt(d,n.packageManager,n.projectRoot),f.succeed();}catch(m){f.fail(),me(m);}}if(l){let f=M(`Applying changes to ${u.filePath}.`).start(),m=Pe(u);m.success||(f.fail(),p.break(),p.error(m.error||"Failed to write file."),p.break(),process.exit(1)),f.succeed();}if(c){let f=M(`Applying changes to ${h.filePath}.`).start(),m=Ue(h);m.success||(f.fail(),p.break(),p.error(m.error||"Failed to write file."),p.break(),process.exit(1)),f.succeed();}p.break(),p.log(`${$.success("Success!")} ${Us[o]||o} has been removed.`),p.break();}catch(r){me(r);}});var Ci=be(Rt()),wi=be(sD()),xu=be(tr());var qE="0.0.97",iD=2e3,nD='<script src="https://unpkg.com/react-grab/dist/index.global.js"></script>',LE=t=>`<script src="https://unpkg.com/${t}/dist/client.global.js"></script>`,aD=async(t,e)=>new Promise(r=>{let s=http.createServer();s.listen(t,e,()=>{s.close(()=>r(t));}),s.on("error",()=>{r(aD(t+1,e));});}),jE=t=>t.startsWith("http://")||t.startsWith("https://")?t:`http://${t}`,GE=async t=>{try{return (await fetch(t,{method:"HEAD",redirect:"follow"})).url}catch{return t}},uD=new Te().name("start").alias("proxy").description("start a proxy server for a given URL").argument("[url]","target URL to proxy (e.g., localhost:3000)").option("-p, --port <port>","starting port for the proxy server",String(iD)).option("--host <hostname>","hostname to bind the proxy server to","localhost").option("--provider <package>","provider package to run via npx (e.g., @react-grab/cursor)").action(async(t,e)=>{console.log(`${Ci.default.magenta("\u273F")} ${Ci.default.bold("React Grab")} ${Ci.default.gray(qE)}`),console.log();let r=t,s=e.provider;if(!r){let{targetUrl:b}=await(0, xu.default)({type:"text",name:"targetUrl",message:"Enter the target URL to proxy:",initial:"localhost:3000"});if(b||(p.break(),process.exit(1)),r=b,!s){let{selectedProvider:v}=await(0, xu.default)({type:"select",name:"selectedProvider",message:`Select a ${$.info("provider")} to use:`,choices:[{title:"None",value:""},{title:"Claude Code",value:"@react-grab/claude-code"},{title:"Cursor",value:"@react-grab/cursor"},{title:"OpenCode",value:"@react-grab/opencode"},{title:"Codex",value:"@react-grab/codex"},{title:"Gemini",value:"@react-grab/gemini"},{title:"Amp",value:"@react-grab/amp"},{title:"Visual Edit",value:"@react-grab/visual-edit"}]});v===void 0&&(p.break(),process.exit(1)),s=v||void 0;}p.break();}let i=jE(r),n=await GE(i),o=parseInt(e.port,10),a=e.host||"localhost";(isNaN(o)||o<1||o>65535)&&(p.break(),p.error("Invalid port number. Please provide a port between 1 and 65535."),p.break(),process.exit(1));let u=await aD(o,a),h=s?nD+LE(s):nD,l=b=>{let v=b.indexOf("</head>");if(v!==-1)return b.slice(0,v)+h+b.slice(v);let C=b.indexOf("</body>");return C!==-1?b.slice(0,C)+h+b.slice(C):b+h},c=(0, wi.createProxyMiddleware)({target:n,changeOrigin:true,followRedirects:false,ws:true,selfHandleResponse:true,cookieDomainRewrite:{"*":""},autoRewrite:true,preserveHeaderKeyCase:true,xfwd:true,on:{error:(b,v,C)=>{"writeHead"in C&&!C.headersSent&&(C.writeHead(503,{"Content-Type":"text/plain"}),C.end(`Proxy error: Unable to connect to ${n}`));},proxyReq:b=>{b.removeHeader("accept-encoding");},proxyRes:(0, wi.responseInterceptor)(async(b,v,C,E)=>{if(E.removeHeader("content-security-policy"),E.removeHeader("content-security-policy-report-only"),!(v.headers["content-type"]||"").includes("text/html"))return b;let A=b.toString("utf-8");return l(A)})}}),d=http.createServer((b,v)=>{c(b,v,C=>{C&&(p.error(`Request error: ${C}`),v.writeHead(500),v.end("Internal Server Error"));});});d.on("upgrade",c.upgrade);let f=M("Starting.").start(),m=()=>{f.succeed(`Open in your browser: http://${a}:${u}`);let b=["npx react-grab@latest start",r];e.port!==String(iD)&&b.push(`--port=${e.port}`),a!=="localhost"&&b.push(`--host=${a}`),s&&b.push(`--provider=${s}`),p.break(),p.log($.dim(`$ ${b.join(" ")}`));},g=false,D=!s,x=()=>{g&&D&&m();};if(d.listen(u,a,()=>{g=true,x();}),s){let b=child_process.spawn("npx",[`${s}@latest`],{stdio:"ignore",shell:true,detached:false}),v=()=>{b.killed||b.kill();};process.on("exit",v),process.on("SIGINT",()=>{v(),process.exit(0);}),process.on("SIGTERM",()=>{v(),process.exit(0);}),b.on("error",C=>{f.fail(`Failed to start provider: ${C.message}`);}),b.on("spawn",()=>{D=true,x();}),b.on("close",C=>{C!==0&&C!==null&&p.error(`Provider exited with code ${C}`);});}d.on("error",b=>{p.break(),p.error(`Server error: ${b.message}`),p.break(),process.exit(1);});});process.noDeprecation=true;var VE="0.0.97",UE="https://www.react-grab.com/api/version";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));try{fetch(`${UE}?source=cli&t=${Date.now()}`).catch(()=>{});}catch{}var yr=new Te().name("react-grab").description("add React Grab to your project").version(VE,"-v, --version","display the version number");yr.addCommand(vp);yr.addCommand(gp);yr.addCommand(Cp);yr.addCommand(Dp);yr.addCommand(uD);yr.parse();
332
- /*! Bundled license information:
333
-
334
- http-proxy/lib/http-proxy/passes/web-outgoing.js:
335
- (*!
336
- * Array of passes.
337
- *
338
- * A `pass` is just a function that is executed on `req, res, options`
339
- * so that you can easily add new checks while still keeping the base
340
- * flexible.
341
- *)
342
-
343
- http-proxy/lib/http-proxy/passes/web-incoming.js:
344
- (*!
345
- * Array of passes.
346
- *
347
- * A `pass` is just a function that is executed on `req, res, options`
348
- * so that you can easily add new checks while still keeping the base
349
- * flexible.
350
- *)
351
-
352
- http-proxy/lib/http-proxy/passes/ws-incoming.js:
353
- (*!
354
- * Array of passes.
355
- *
356
- * A `pass` is just a function that is executed on `req, socket, options`
357
- * so that you can easily add new checks while still keeping the base
358
- * flexible.
359
- *)
360
-
361
- http-proxy/index.js:
362
- (*!
363
- * Caron dimonio, con occhi di bragia
364
- * loro accennando, tutte le raccoglie;
365
- * batte col remo qualunque s’adagia
366
- *
367
- * Charon the demon, with the eyes of glede,
368
- * Beckoning to them, collects them all together,
369
- * Beats with his oar whoever lags behind
370
- *
371
- * Dante - The Divine Comedy (Canto III)
372
- *)
373
-
374
- is-extglob/index.js:
375
- (*!
376
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
377
- *
378
- * Copyright (c) 2014-2016, Jon Schlinkert.
379
- * Licensed under the MIT License.
380
- *)
381
-
382
- is-glob/index.js:
383
- (*!
384
- * is-glob <https://github.com/jonschlinkert/is-glob>
385
- *
386
- * Copyright (c) 2014-2017, Jon Schlinkert.
387
- * Released under the MIT License.
388
- *)
389
-
390
- is-number/index.js:
391
- (*!
392
- * is-number <https://github.com/jonschlinkert/is-number>
393
- *
394
- * Copyright (c) 2014-present, Jon Schlinkert.
395
- * Released under the MIT License.
396
- *)
397
-
398
- to-regex-range/index.js:
399
- (*!
400
- * to-regex-range <https://github.com/micromatch/to-regex-range>
401
- *
402
- * Copyright (c) 2015-present, Jon Schlinkert.
403
- * Released under the MIT License.
404
- *)
405
-
406
- fill-range/index.js:
407
- (*!
408
- * fill-range <https://github.com/jonschlinkert/fill-range>
409
- *
410
- * Copyright (c) 2014-present, Jon Schlinkert.
411
- * Licensed under the MIT License.
412
- *)
413
-
414
- is-plain-object/dist/is-plain-object.js:
415
- (*!
416
- * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
417
- *
418
- * Copyright (c) 2014-2017, Jon Schlinkert.
419
- * Released under the MIT License.
420
- *)
421
- */
2
+ 'use strict';var child_process=require('child_process');var r=child_process.spawn("npx",["-y","@react-grab/cli",...process.argv.slice(2)],{stdio:"inherit",shell:true});r.on("close",s=>{process.exit(s??0);});