react-grab 0.0.90 → 0.0.92

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,208 +1,208 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';var child_process=require('child_process'),Zd=require('fs'),Ft=require('path'),ke=require('process'),Xd=require('readline'),Ey=require('events'),module$1=require('module'),stream=require('stream'),My=require('os'),bf=require('tty'),Qd=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 Zd__default=/*#__PURE__*/_interopDefault(Zd);var Ft__default=/*#__PURE__*/_interopDefault(Ft);var ke__default=/*#__PURE__*/_interopDefault(ke);var Xd__default=/*#__PURE__*/_interopDefault(Xd);var Ey__default=/*#__PURE__*/_interopDefault(Ey);var My__default=/*#__PURE__*/_interopDefault(My);var bf__default=/*#__PURE__*/_interopDefault(bf);var Qd__default=/*#__PURE__*/_interopDefault(Qd);var Xg=Object.create;var ha=Object.defineProperty;var Zg=Object.getOwnPropertyDescriptor;var Qg=Object.getOwnPropertyNames;var eD=Object.getPrototypeOf,tD=Object.prototype.hasOwnProperty;var $=(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 D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var rD=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qg(e))!tD.call(t,i)&&i!==r&&ha(t,i,{get:()=>e[i],enumerable:!(s=Zg(e,i))||s.enumerable});return t};var be=(t,e,r)=>(r=t!=null?Xg(eD(t)):{},rD(ha(r,"default",{value:t,enumerable:true}),t));var or=D(pi=>{var Vr=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;}},fi=class extends Vr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};pi.CommanderError=Vr;pi.InvalidArgumentError=fi;});var Ur=D(gi=>{var{InvalidArgumentError:sD}=or(),mi=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 sD(`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 iD(t){let e=t.name()+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}gi.Argument=mi;gi.humanReadableArgName=iD;});var yi=D(bi=>{var{humanReadableArgName:nD}=Ur(),Di=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=>nD(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))}`,""],u=r.commandDescription(e);u.length>0&&(o=o.concat([r.boxWrap(r.styleCommandDescription(u),i),""]));let a=r.visibleArguments(e).map(c=>n(r.styleArgumentTerm(r.argumentTerm(c)),r.styleArgumentDescription(r.argumentDescription(c))));if(o=o.concat(this.formatItemList("Arguments:",a,r)),this.groupItems(e.options,r.visibleOptions(e),c=>c.helpGroupHeading??"Options:").forEach((c,d)=>{let f=c.map(p=>n(r.styleOptionTerm(r.optionTerm(p)),r.styleOptionDescription(r.optionDescription(p))));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(p=>n(r.styleSubcommandTerm(r.subcommandTerm(p)),r.styleSubcommandDescription(r.subcommandDescription(p))));o=o.concat(this.formatItemList(d,f,r));}),o.join(`
3
- `)}displayWidth(e){return da(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 u=e.padEnd(r+e.length-i.displayWidth(e)),a=2,l=(this.helpWidth??80)-r-a-2,c;return l<this.minWidthToWrap||i.preformatted(s)?c=s:c=i.boxWrap(s,l).replace(/\n/g,`
4
- `+" ".repeat(r+a)),o+u+" ".repeat(a)+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 u=o.match(i);if(u===null){n.push("");return}let a=[u.shift()],h=this.displayWidth(a[0]);u.forEach(l=>{let c=this.displayWidth(l);if(h+c<=r){a.push(l),h+=c;return}n.push(a.join(""));let d=l.trimStart();a=[d],h=this.displayWidth(d);}),n.push(a.join(""));}),n.join(`
6
- `)}};function da(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}bi.Help=Di;bi.stripColor=da;});var _i=D(xi=>{var{InvalidArgumentError:oD}=or(),vi=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=uD(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 oD(`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?fa(this.name().replace(/^no-/,"")):fa(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}},Ci=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 fa(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function uD(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],u=`option creation failed due to '${o}' in option flags '${t}'`;throw /^-[^-][^-]/.test(o)?new Error(`${u}
2
+ 'use strict';var child_process=require('child_process'),hf=require('fs'),kt=require('path'),Ve=require('process'),cf=require('readline'),Hy=require('events'),module$1=require('module'),stream=require('stream'),Jy=require('os'),Tf=require('tty'),df=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 hf__default=/*#__PURE__*/_interopDefault(hf);var kt__default=/*#__PURE__*/_interopDefault(kt);var Ve__default=/*#__PURE__*/_interopDefault(Ve);var cf__default=/*#__PURE__*/_interopDefault(cf);var Hy__default=/*#__PURE__*/_interopDefault(Hy);var Jy__default=/*#__PURE__*/_interopDefault(Jy);var Tf__default=/*#__PURE__*/_interopDefault(Tf);var df__default=/*#__PURE__*/_interopDefault(df);var cD=Object.create;var xu=Object.defineProperty;var hD=Object.getOwnPropertyDescriptor;var dD=Object.getOwnPropertyNames;var fD=Object.getPrototypeOf,pD=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 mD=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of dD(e))!pD.call(t,i)&&i!==r&&xu(t,i,{get:()=>e[i],enumerable:!(s=hD(e,i))||s.enumerable});return t};var be=(t,e,r)=>(r=t!=null?cD(fD(t)):{},mD(xu(r,"default",{value:t,enumerable:true}),t));var yr=y(Fi=>{var ss=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 ss{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};Fi.CommanderError=ss;Fi.InvalidArgumentError=_i;});var is=y(Ai=>{var{InvalidArgumentError:gD}=yr(),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 gD(`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 DD(t){let e=t.name()+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ai.Argument=Ei;Ai.humanReadableArgName=DD;});var Si=y(Ri=>{var{humanReadableArgName:bD}=is(),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=>bD(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 _u(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 _u(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Ri.Help=Oi;Ri.stripColor=_u;});var $i=y(ki=>{var{InvalidArgumentError:yD}=yr(),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=vD(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 yD(`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?Fu(this.name().replace(/^no-/,"")):Fu(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}},Pi=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 Fu(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function vD(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
7
  - a short flag is a single dash and a single character
8
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(`${u}
10
- - too many short flags`):i.test(o)?new Error(`${u}
11
- - too many long flags`):new Error(`${u}
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}}xi.Option=vi;xi.DualOptions=Ci;});var ma=D(pa=>{function aD(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 lD(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 u=aD(t,o),a=Math.max(t.length,o.length);(a-u)/a>n&&(u<i?(i=u,s=[o]):u===i&&s.push(o));}),s.sort((o,u)=>o.localeCompare(u)),r&&(s=s.map(o=>`--${o}`)),s.length>1?`
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}}ki.Option=Ti;ki.DualOptions=Pi;});var Au=y(Eu=>{function CD(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 wD(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=CD(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
13
  (Did you mean one of ${s.join(", ")}?)`:s.length===1?`
14
- (Did you mean ${s[0]}?)`:""}pa.suggestSimilar=lD;});var ya=D(Oi=>{var cD=$("events").EventEmitter,wi=$("child_process"),Xe=$("path"),Wr=$("fs"),q=$("process"),{Argument:hD,humanReadableArgName:dD}=Ur(),{CommanderError:Fi}=or(),{Help:fD,stripColor:pD}=yi(),{Option:ga,DualOptions:mD}=_i(),{suggestSimilar:Da}=ma(),Ei=class t extends cD{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=>q.stdout.write(r),writeErr:r=>q.stderr.write(r),outputError:(r,s)=>s(r),getOutHelpWidth:()=>q.stdout.isTTY?q.stdout.columns:void 0,getErrHelpWidth:()=>q.stderr.isTTY?q.stderr.columns:void 0,getOutHasColors:()=>Ai()??(q.stdout.isTTY&&q.stdout.hasColors?.()),getErrHasColors:()=>Ai()??(q.stderr.isTTY&&q.stderr.hasColors?.()),stripColor:r=>pD(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,u]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=true),n.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(n.noHelp||n.hidden),a._executableFile=n.executableFile||null,u&&a.arguments(u),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new t(e)}createHelp(){return Object.assign(new fD,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 hD(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",u=this.createCommand(i);return u.helpOption(false),n&&u.arguments(n),o&&u.description(o),this._addImplicitHelpCommand=true,this._helpCommand=u,(e||r)&&this._initCommandGroup(u),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 Fi(e,r,s)),q.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 ga(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,u)=>{n==null&&e.presetArg!==void 0&&(n=e.presetArg);let a=this.getOptionValue(s);n!==null&&e.parseArg?n=this._callParseArg(e,n,a,o):n!==null&&e.variadic&&(n=e._collectValue(n,a)),n==null&&(e.negate?n=false:e.isBoolean()||e.optional?n=true:n=""),this.setOptionValueWithSource(s,n,u);};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 ga)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 u=i;i=(a,h)=>{let l=u.exec(a);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){q.versions?.electron&&(r.from="electron");let i=q.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval");}e===void 0&&(e=q.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":q.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(Wr.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
14
+ (Did you mean ${s[0]}?)`:""}Eu.suggestSimilar=wD;});var Tu=y(Hi=>{var xD=N("events").EventEmitter,Ii=N("child_process"),nt=N("path"),ns=N("fs"),V=N("process"),{Argument:_D,humanReadableArgName:FD}=is(),{CommanderError:Mi}=yr(),{Help:ED,stripColor:AD}=Si(),{Option:Ou,DualOptions:OD}=$i(),{suggestSimilar:Ru}=Au(),Bi=class t extends xD{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=>AD(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 ED,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 _D(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 Ou(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 Ou)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(ns.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
19
  - if '${s}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
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=Xe.resolve(l,c);if(Wr.existsSync(d))return d;if(i.includes(Xe.extname(c)))return;let f=i.find(p=>Wr.existsSync(`${d}${p}`));if(f)return `${d}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,u=this._executableDir||"";if(this._scriptPath){let l;try{l=Wr.realpathSync(this._scriptPath);}catch{l=this._scriptPath;}u=Xe.resolve(Xe.dirname(l),u);}if(u){let l=n(u,o);if(!l&&!e._executableFile&&this._scriptPath){let c=Xe.basename(this._scriptPath,Xe.extname(this._scriptPath));c!==this._name&&(l=n(u,`${c}-${e._name}`));}o=l||o;}s=i.includes(Xe.extname(o));let a;q.platform!=="win32"?s?(r.unshift(o),r=ba(q.execArgv).concat(r),a=wi.spawn(q.argv[0],r,{stdio:"inherit"})):a=wi.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,u,e._name),r.unshift(o),r=ba(q.execArgv).concat(r),a=wi.spawn(q.execPath,r,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{q.on(c,()=>{a.killed===false&&a.exitCode===null&&a.kill(c);});});let h=this._exitCallback;a.on("close",l=>{l=l??1,h?h(new Fi(l,"commander.executeSubCommandAsync","(close)")):q.exit(l);}),a.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(o,u,e._name);else if(l.code==="EACCES")throw new Error(`'${o}' not executable`);if(!h)q.exit(1);else {let c=new Fi(1,"commander.executeSubCommandAsync","(error)");c.nestedError=l,h(c);}}),this.runningCommand=a;}_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 u=`error: command-argument value '${i}' is invalid for argument '${s.name()}'.`;o=this._callParseArg(s,i,n,u);}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,u)=>e(s,u,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,u=null,a=null,h=0;for(;h<e.length||a;){let l=a??e[h++];if(a=null,l==="--"){i===s&&i.push(l),i.push(...e.slice(h));break}if(u&&(!n(l)||o(l))){this.emit(`option:${u.name()}`,l);continue}if(u=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()}`);u=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()}`),a=`-${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}
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(ns.existsSync(d))return d;if(i.includes(nt.extname(c)))return;let f=i.find(m=>ns.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=ns.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=Su(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=Su(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
22
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
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 q.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()}`,q.env[e.envVar]):this.emit(`optionEnv:${e.name()}`));}});}_parseOptionsImplied(){let e=new mD(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 u=o.attributeName(),a=this.getOptionValue(u),h=this.options.find(c=>c.negate&&u===c.attributeName()),l=this.options.find(c=>!c.negate&&u===c.attributeName());return h&&(h.presetArg===void 0&&a===false||h.presetArg!==void 0&&a===h.presetArg)?h:l||o},i=o=>{let u=s(o),a=u.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${u.envVar}'`:`option '${u.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(u=>u.long).map(u=>u.long);i=i.concat(o),n=n.parent;}while(n&&!n._enablePositionalOptions);r=Da(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=Da(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=>dD(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=Xe.basename(e,Xe.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=u=>this._outputConfiguration.writeErr(u),i=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(s=u=>this._outputConfiguration.writeOut(u),i=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:r,write:u=>(i||(u=this._outputConfiguration.stripColor(u)),s(u)),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(q.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.
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 OD(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=Ru(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=Ru(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=>FD(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
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 ba(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 Ai(){if(q.env.NO_COLOR||q.env.FORCE_COLOR==="0"||q.env.FORCE_COLOR==="false")return false;if(q.env.FORCE_COLOR||q.env.CLICOLOR_FORCE!==void 0)return true}Oi.Command=Ei;Oi.useColor=Ai;});var _a=D(xe=>{var{Argument:va}=Ur(),{Command:Ri}=ya(),{CommanderError:gD,InvalidArgumentError:Ca}=or(),{Help:DD}=yi(),{Option:xa}=_i();xe.program=new Ri;xe.createCommand=t=>new Ri(t);xe.createOption=(t,e)=>new xa(t,e);xe.createArgument=(t,e)=>new va(t,e);xe.Command=Ri;xe.Option=xa;xe.Argument=va;xe.Help=DD;xe.CommanderError=gD;xe.InvalidArgumentError=Ca;xe.InvalidOptionArgumentError=Ca;});var Nt=D((KE,Si)=>{var Yr=process||{},Fa=Yr.argv||[],Kr=Yr.env||{},bD=!(Kr.NO_COLOR||Fa.includes("--no-color"))&&(!!Kr.FORCE_COLOR||Fa.includes("--color")||Yr.platform==="win32"||(Yr.stdout||{}).isTTY&&Kr.TERM!=="dumb"||!!Kr.CI),yD=(t,e,r=t)=>s=>{let i=""+s,n=i.indexOf(e,t.length);return ~n?t+vD(i,e,r,n)+e:t+i+e},vD=(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)},Ea=(t=bD)=>{let e=t?yD:()=>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")}};Si.exports=Ea();Si.exports.createColors=Ea;});var X=D((YE,Oa)=>{var{FORCE_COLOR:CD,NODE_DISABLE_COLORS:xD,TERM:_D}=process.env,L={enabled:!xD&&_D!=="dumb"&&CD!=="0",reset:G(0,0),bold:G(1,22),dim:G(2,22),italic:G(3,23),underline:G(4,24),inverse:G(7,27),hidden:G(8,28),strikethrough:G(9,29),black:G(30,39),red:G(31,39),green:G(32,39),yellow:G(33,39),blue:G(34,39),magenta:G(35,39),cyan:G(36,39),white:G(37,39),gray:G(90,39),grey:G(90,39),bgBlack:G(40,49),bgRed:G(41,49),bgGreen:G(42,49),bgYellow:G(43,49),bgBlue:G(44,49),bgMagenta:G(45,49),bgCyan:G(46,49),bgWhite:G(47,49)};function Aa(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 wD(t,e){let r={has:t,keys:e};return r.reset=L.reset.bind(r),r.bold=L.bold.bind(r),r.dim=L.dim.bind(r),r.italic=L.italic.bind(r),r.underline=L.underline.bind(r),r.inverse=L.inverse.bind(r),r.hidden=L.hidden.bind(r),r.strikethrough=L.strikethrough.bind(r),r.black=L.black.bind(r),r.red=L.red.bind(r),r.green=L.green.bind(r),r.yellow=L.yellow.bind(r),r.blue=L.blue.bind(r),r.magenta=L.magenta.bind(r),r.cyan=L.cyan.bind(r),r.white=L.white.bind(r),r.gray=L.gray.bind(r),r.grey=L.grey.bind(r),r.bgBlack=L.bgBlack.bind(r),r.bgRed=L.bgRed.bind(r),r.bgGreen=L.bgGreen.bind(r),r.bgYellow=L.bgYellow.bind(r),r.bgBlue=L.bgBlue.bind(r),r.bgMagenta=L.bgMagenta.bind(r),r.bgCyan=L.bgCyan.bind(r),r.bgWhite=L.bgWhite.bind(r),r}function G(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:L.enabled?Aa(this.keys,s+""):s+""):s===void 0?wD([t],[r]):L.enabled?Aa([r],s+""):s+""}}Oa.exports=L;});var Sa=D((JE,Ra)=>{Ra.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 Jr=D((zE,Ta)=>{Ta.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 Q=D((XE,Pa)=>{var Ti="\x1B",Z=`${Ti}[`,FD="\x07",Pi={to(t,e){return e?`${Z}${e+1};${t+1}H`:`${Z}${t+1}G`},move(t,e){let r="";return t<0?r+=`${Z}${-t}D`:t>0&&(r+=`${Z}${t}C`),e<0?r+=`${Z}${-e}A`:e>0&&(r+=`${Z}${e}B`),r},up:(t=1)=>`${Z}${t}A`,down:(t=1)=>`${Z}${t}B`,forward:(t=1)=>`${Z}${t}C`,backward:(t=1)=>`${Z}${t}D`,nextLine:(t=1)=>`${Z}E`.repeat(t),prevLine:(t=1)=>`${Z}F`.repeat(t),left:`${Z}G`,hide:`${Z}?25l`,show:`${Z}?25h`,save:`${Ti}7`,restore:`${Ti}8`},ED={up:(t=1)=>`${Z}S`.repeat(t),down:(t=1)=>`${Z}T`.repeat(t)},AD={screen:`${Z}2J`,up:(t=1)=>`${Z}1J`.repeat(t),down:(t=1)=>`${Z}J`.repeat(t),line:`${Z}2K`,lineEnd:`${Z}K`,lineStart:`${Z}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?Pi.up():"");return t&&(e+=Pi.left),e}};Pa.exports={cursor:Pi,scroll:ED,erase:AD,beep:FD};});var Ba=D((ZE,Ma)=>{function OD(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=RD(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,u;return {s:function(){r=r.call(t);},n:function(){var h=r.next();return n=h.done,h},e:function(h){o=true,u=h;},f:function(){try{!n&&r.return!=null&&r.return();}finally{if(o)throw u}}}}function RD(t,e){if(t){if(typeof t=="string")return $a(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 $a(t,e)}}function $a(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 SD=Jr(),Ia=Q(),ka=Ia.erase,TD=Ia.cursor,PD=t=>[...SD(t)].length;Ma.exports=function(t,e){if(!e)return ka.line+TD.to(0);let r=0,s=t.split(/\r?\n/);var i=OD(s),n;try{for(i.s();!(n=i.n()).done;){let o=n.value;r+=1+Math.floor(Math.max(PD(o)-1,0)/e);}}catch(o){i.e(o);}finally{i.f();}return ka.lines(r)};});var $i=D((QE,Ha)=>{var ur={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},$D={arrowUp:ur.arrowUp,arrowDown:ur.arrowDown,arrowLeft:ur.arrowLeft,arrowRight:ur.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},kD=process.platform==="win32"?$D:ur;Ha.exports=kD;});var qa=D((e1,Na)=>{var qt=X(),Ct=$i(),ki=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}`}}),ID=t=>ki[t]||ki.default,ar=Object.freeze({aborted:qt.red(Ct.cross),done:qt.green(Ct.tick),exited:qt.yellow(Ct.cross),default:qt.cyan("?")}),MD=(t,e,r)=>e?ar.aborted:r?ar.exited:t?ar.done:ar.default,BD=t=>qt.gray(t?Ct.ellipsis:Ct.pointerSmall),HD=(t,e)=>qt.gray(t?e?Ct.pointerSmall:"+":Ct.line);Na.exports={styles:ki,render:ID,symbols:ar,symbol:MD,delimiter:BD,item:HD};});var ja=D((t1,La)=>{var ND=Jr();La.exports=function(t,e){let r=String(ND(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var Va=D((r1,Ga)=>{Ga.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(`
27
+ `);}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"));}};function Su(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 Iu=y(Se=>{var{Argument:Pu}=is(),{Command:qi}=Tu(),{CommanderError:RD,InvalidArgumentError:ku}=yr(),{Help:SD}=Si(),{Option:$u}=$i();Se.program=new qi;Se.createCommand=t=>new qi(t);Se.createOption=(t,e)=>new $u(t,e);Se.createArgument=(t,e)=>new Pu(t,e);Se.Command=qi;Se.Option=$u;Se.Argument=Pu;Se.Help=SD;Se.CommanderError=RD;Se.InvalidArgumentError=ku;Se.InvalidOptionArgumentError=ku;});var Ot=y((d1,Li)=>{var as=process||{},Bu=as.argv||[],os=as.env||{},TD=!(os.NO_COLOR||Bu.includes("--no-color"))&&(!!os.FORCE_COLOR||Bu.includes("--color")||as.platform==="win32"||(as.stdout||{}).isTTY&&os.TERM!=="dumb"||!!os.CI),PD=(t,e,r=t)=>s=>{let i=""+s,n=i.indexOf(e,t.length);return ~n?t+kD(i,e,r,n)+e:t+i+e},kD=(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)},Nu=(t=TD)=>{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=Nu();Li.exports.createColors=Nu;});var re=y((f1,qu)=>{var{FORCE_COLOR:$D,NODE_DISABLE_COLORS:ID,TERM:MD}=process.env,W={enabled:!ID&&MD!=="dumb"&&$D!=="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 Hu(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 BD(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?Hu(this.keys,s+""):s+""):s===void 0?BD([t],[r]):W.enabled?Hu([r],s+""):s+""}}qu.exports=W;});var ju=y((p1,Lu)=>{Lu.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 us=y((m1,Gu)=>{Gu.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((g1,Vu)=>{var ji="\x1B",se=`${ji}[`,ND="\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`},HD={up:(t=1)=>`${se}S`.repeat(t),down:(t=1)=>`${se}T`.repeat(t)},qD={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}};Vu.exports={cursor:Gi,scroll:HD,erase:qD,beep:ND};});var Ju=y((D1,Yu)=>{function LD(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=jD(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 jD(t,e){if(t){if(typeof t=="string")return Uu(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 Uu(t,e)}}function Uu(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 GD=us(),Ku=ie(),Wu=Ku.erase,VD=Ku.cursor,UD=t=>[...GD(t)].length;Yu.exports=function(t,e){if(!e)return Wu.line+VD.to(0);let r=0,s=t.split(/\r?\n/);var i=LD(s),n;try{for(i.s();!(n=i.n()).done;){let o=n.value;r+=1+Math.floor(Math.max(UD(o)-1,0)/e);}}catch(o){i.e(o);}finally{i.f();}return Wu.lines(r)};});var Vi=y((b1,zu)=>{var vr={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},WD={arrowUp:vr.arrowUp,arrowDown:vr.arrowDown,arrowLeft:vr.arrowLeft,arrowRight:vr.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},KD=process.platform==="win32"?WD:vr;zu.exports=KD;});var Zu=y((y1,Xu)=>{var zt=re(),Rt=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}`}}),YD=t=>Ui[t]||Ui.default,Cr=Object.freeze({aborted:zt.red(Rt.cross),done:zt.green(Rt.tick),exited:zt.yellow(Rt.cross),default:zt.cyan("?")}),JD=(t,e,r)=>e?Cr.aborted:r?Cr.exited:t?Cr.done:Cr.default,zD=t=>zt.gray(t?Rt.ellipsis:Rt.pointerSmall),XD=(t,e)=>zt.gray(t?e?Rt.pointerSmall:"+":Rt.line);Xu.exports={styles:Ui,render:YD,symbols:Cr,symbol:JD,delimiter:zD,item:XD};});var el=y((v1,Qu)=>{var ZD=us();Qu.exports=function(t,e){let r=String(ZD(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var rl=y((C1,tl)=>{tl.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
29
  `)).join(`
30
- `)};});var Wa=D((s1,Ua)=>{Ua.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 Ee=D((i1,Ka)=>{Ka.exports={action:Sa(),clear:Ba(),style:qa(),strip:Jr(),figures:$i(),lines:ja(),wrap:Va(),entriesToDisplay:Wa()};});var Ze=D((n1,za)=>{var Ya=$("readline"),qD=Ee(),LD=qD.action,jD=$("events"),Ja=Q(),GD=Ja.beep,VD=Ja.cursor,UD=X(),Ii=class extends jD{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=Ya.createInterface({input:this.in,escapeCodeTimeout:50});Ya.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(true);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let u=LD(o,s);u===false?this._&&this._(n,o):typeof this[u]=="function"?this[u](o):this.bell();};this.close=()=>{this.out.write(VD.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(GD);}render(){this.onRender(UD),this.firstRender&&(this.firstRender=false);}};za.exports=Ii;});var tl=D((o1,el)=>{function Xa(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function Za(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Xa(n,s,i,o,u,"next",a);}function u(a){Xa(n,s,i,o,u,"throw",a);}o(void 0);})}}var zr=X(),WD=Ze(),Qa=Q(),KD=Qa.erase,lr=Qa.cursor,Xr=Ee(),Mi=Xr.style,Bi=Xr.clear,YD=Xr.lines,JD=Xr.figures,Hi=class extends WD{constructor(e={}){super(e),this.transform=Mi.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=Bi("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=true,this.rendered=zr.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 Za(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Za(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(lr.down(YD(this.outputError,this.out.columns)-1)+Bi(this.outputError,this.out.columns)),this.out.write(Bi(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Mi.symbol(this.done,this.aborted),zr.bold(this.msg),Mi.delimiter(this.done),this.red?zr.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
30
+ `)};});var il=y((w1,sl)=>{sl.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((x1,nl)=>{nl.exports={action:ju(),clear:Ju(),style:Zu(),strip:us(),figures:Vi(),lines:el(),wrap:rl(),entriesToDisplay:il()};});var ot=y((_1,ul)=>{var ol=N("readline"),QD=Me(),e0=QD.action,t0=N("events"),al=ie(),r0=al.beep,s0=al.cursor,i0=re(),Wi=class extends t0{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=ol.createInterface({input:this.in,escapeCodeTimeout:50});ol.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=e0(o,s);a===false?this._&&this._(n,o):typeof this[a]=="function"?this[a](o):this.bell();};this.close=()=>{this.out.write(s0.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(r0);}render(){this.onRender(i0),this.firstRender&&(this.firstRender=false);}};ul.exports=Wi;});var fl=y((F1,dl)=>{function ll(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 cl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){ll(n,s,i,o,a,"next",u);}function a(u){ll(n,s,i,o,a,"throw",u);}o(void 0);})}}var ls=re(),n0=ot(),hl=ie(),o0=hl.erase,wr=hl.cursor,cs=Me(),Ki=cs.style,Yi=cs.clear,a0=cs.lines,u0=cs.figures,Ji=class extends n0{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=ls.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 cl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return cl(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(wr.down(a0(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),ls.bold(this.msg),Ki.delimiter(this.done),this.red?ls.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
33
33
  `).reduce((e,r,s)=>e+`
34
- ${s?" ":JD.pointerSmall} ${zr.red().italic(r)}`,"")),this.out.write(KD.line+lr.to(0)+this.outputText+lr.save+this.outputError+lr.restore+lr.move(this.cursorOffset,0)));}};el.exports=Hi;});var nl=D((u1,il)=>{var Qe=X(),zD=Ze(),cr=Ee(),rl=cr.style,sl=cr.clear,Zr=cr.figures,XD=cr.wrap,ZD=cr.entriesToDisplay,QD=Q(),e0=QD.cursor,Ni=class extends zD{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=sl("",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(`
34
+ ${s?" ":u0.pointerSmall} ${ls.red().italic(r)}`,"")),this.out.write(o0.line+wr.to(0)+this.outputText+wr.save+this.outputError+wr.restore+wr.move(this.cursorOffset,0)));}};dl.exports=Ji;});var Dl=y((E1,gl)=>{var at=re(),l0=ot(),xr=Me(),pl=xr.style,ml=xr.clear,hs=xr.figures,c0=xr.wrap,h0=xr.entriesToDisplay,d0=ie(),f0=d0.cursor,zi=class extends l0{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=ml("",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
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(e0.hide):this.out.write(sl(this.outputText,this.out.columns)),super.render();let e=ZD(this.cursor,this.choices.length,this.optionsPerPage),r=e.startIndex,s=e.endIndex;if(this.outputText=[rl.symbol(this.done,this.aborted),Qe.bold(this.msg),rl.delimiter(false),this.done?this.selection.title:this.selection.disabled?Qe.yellow(this.warn):Qe.gray(this.hint)].join(" "),!this.done){this.outputText+=`
37
- `;for(let i=r;i<s;i++){let n,o,u="",a=this.choices[i];i===r&&r>0?o=Zr.arrowUp:i===s-1&&s<this.choices.length?o=Zr.arrowDown:o=" ",a.disabled?(n=this.cursor===i?Qe.gray().underline(a.title):Qe.strikethrough().gray(a.title),o=(this.cursor===i?Qe.bold().gray(Zr.pointer)+" ":" ")+o):(n=this.cursor===i?Qe.cyan().underline(a.title):a.title,o=(this.cursor===i?Qe.cyan(Zr.pointer)+" ":" ")+o,a.description&&this.cursor===i&&(u=` - ${a.description}`,(o.length+n.length+u.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(u=`
38
- `+XD(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${n}${Qe.gray(u)}
39
- `;}}this.out.write(this.outputText);}};il.exports=Ni;});var hl=D((a1,cl)=>{var Qr=X(),t0=Ze(),al=Ee(),ol=al.style,r0=al.clear,ll=Q(),ul=ll.cursor,s0=ll.erase,qi=class extends t0{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(`
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(f0.hide):this.out.write(ml(this.outputText,this.out.columns)),super.render();let e=h0(this.cursor,this.choices.length,this.optionsPerPage),r=e.startIndex,s=e.endIndex;if(this.outputText=[pl.symbol(this.done,this.aborted),at.bold(this.msg),pl.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=hs.arrowUp:i===s-1&&s<this.choices.length?o=hs.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(hs.pointer)+" ":" ")+o):(n=this.cursor===i?at.cyan().underline(u.title):u.title,o=(this.cursor===i?at.cyan(hs.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
+ `+c0(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${n}${at.gray(a)}
39
+ `;}}this.out.write(this.outputText);}};gl.exports=zi;});var xl=y((A1,wl)=>{var ds=re(),p0=ot(),vl=Me(),bl=vl.style,m0=vl.clear,Cl=ie(),yl=Cl.cursor,g0=Cl.erase,Xi=class extends p0{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
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(ul.hide):this.out.write(r0(this.outputText,this.out.columns)),super.render(),this.outputText=[ol.symbol(this.done,this.aborted),Qr.bold(this.msg),ol.delimiter(this.done),this.value?this.inactive:Qr.cyan().underline(this.inactive),Qr.gray("/"),this.value?Qr.cyan().underline(this.active):this.active].join(" "),this.out.write(s0.line+ul.to(0)+this.outputText));}};cl.exports=qi;});var He=D((l1,dl)=>{var Li=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)}};dl.exports=Li;});var pl=D((c1,fl)=>{var i0=He(),ji=class extends i0{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}};fl.exports=ji;});var gl=D((h1,ml)=>{var n0=He(),o0=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),Gi=class extends n0{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+o0(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};ml.exports=Gi;});var bl=D((d1,Dl)=>{var u0=He(),Vi=class extends u0{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}};Dl.exports=Vi;});var vl=D((f1,yl)=>{var a0=He(),Ui=class extends a0{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)}};yl.exports=Ui;});var xl=D((p1,Cl)=>{var l0=He(),Wi=class extends l0{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}};Cl.exports=Wi;});var wl=D((m1,_l)=>{var c0=He(),Ki=class extends c0{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)}};_l.exports=Ki;});var El=D((g1,Fl)=>{var h0=He(),Yi=class extends h0{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}};Fl.exports=Yi;});var Ol=D((D1,Al)=>{var d0=He(),Ji=class extends d0{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}};Al.exports=Ji;});var Sl=D((b1,Rl)=>{Rl.exports={DatePart:He(),Meridiem:pl(),Day:gl(),Hours:bl(),Milliseconds:vl(),Minutes:xl(),Month:wl(),Seconds:El(),Year:Ol()};});var ql=D((y1,Nl)=>{function Tl(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function Pl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Tl(n,s,i,o,u,"next",a);}function u(a){Tl(n,s,i,o,u,"throw",a);}o(void 0);})}}var zi=X(),f0=Ze(),Zi=Ee(),$l=Zi.style,kl=Zi.clear,p0=Zi.figures,Hl=Q(),m0=Hl.erase,Il=Hl.cursor,et=Sl(),Ml=et.DatePart,g0=et.Meridiem,D0=et.Day,b0=et.Hours,y0=et.Milliseconds,v0=et.Minutes,C0=et.Month,x0=et.Seconds,_0=et.Year,w0=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,Bl={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new D0(t),3:t=>new C0(t),4:t=>new _0(t),5:t=>new g0(t),6:t=>new b0(t),7:t=>new v0(t),8:t=>new x0(t),9:t=>new y0(t)},F0={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(",")},Xi=class extends f0{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(F0,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=w0.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in Bl?Bl[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 Ml)),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 Pl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Pl(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 Ml)),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(Il.hide):this.out.write(kl(this.outputText,this.out.columns)),super.render(),this.outputText=[$l.symbol(this.done,this.aborted),zi.bold(this.msg),$l.delimiter(false),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?zi.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
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(yl.hide):this.out.write(m0(this.outputText,this.out.columns)),super.render(),this.outputText=[bl.symbol(this.done,this.aborted),ds.bold(this.msg),bl.delimiter(this.done),this.value?this.inactive:ds.cyan().underline(this.inactive),ds.gray("/"),this.value?ds.cyan().underline(this.active):this.active].join(" "),this.out.write(g0.line+yl.to(0)+this.outputText));}};wl.exports=Xi;});var We=y((O1,_l)=>{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)}};_l.exports=Zi;});var El=y((R1,Fl)=>{var D0=We(),Qi=class extends D0{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}};Fl.exports=Qi;});var Ol=y((S1,Al)=>{var b0=We(),y0=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),en=class extends b0{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+y0(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};Al.exports=en;});var Sl=y((T1,Rl)=>{var v0=We(),tn=class extends v0{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}};Rl.exports=tn;});var Pl=y((P1,Tl)=>{var C0=We(),rn=class extends C0{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)}};Tl.exports=rn;});var $l=y((k1,kl)=>{var w0=We(),sn=class extends w0{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}};kl.exports=sn;});var Ml=y(($1,Il)=>{var x0=We(),nn=class extends x0{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)}};Il.exports=nn;});var Nl=y((I1,Bl)=>{var _0=We(),on=class extends _0{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}};Bl.exports=on;});var ql=y((M1,Hl)=>{var F0=We(),an=class extends F0{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}};Hl.exports=an;});var jl=y((B1,Ll)=>{Ll.exports={DatePart:We(),Meridiem:El(),Day:Ol(),Hours:Sl(),Milliseconds:Pl(),Minutes:$l(),Month:Ml(),Seconds:Nl(),Year:ql()};});var Zl=y((N1,Xl)=>{function Gl(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 Vl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){Gl(n,s,i,o,a,"next",u);}function a(u){Gl(n,s,i,o,a,"throw",u);}o(void 0);})}}var un=re(),E0=ot(),cn=Me(),Ul=cn.style,Wl=cn.clear,A0=cn.figures,zl=ie(),O0=zl.erase,Kl=zl.cursor,ut=jl(),Yl=ut.DatePart,R0=ut.Meridiem,S0=ut.Day,T0=ut.Hours,P0=ut.Milliseconds,k0=ut.Minutes,$0=ut.Month,I0=ut.Seconds,M0=ut.Year,B0=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,Jl={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new S0(t),3:t=>new $0(t),4:t=>new M0(t),5:t=>new R0(t),6:t=>new T0(t),7:t=>new k0(t),8:t=>new I0(t),9:t=>new P0(t)},N0={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 E0{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(N0,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=Wl("",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=B0.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in Jl?Jl[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 Yl)),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 Vl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return Vl(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 Yl)),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(Kl.hide):this.out.write(Wl(this.outputText,this.out.columns)),super.render(),this.outputText=[Ul.symbol(this.done,this.aborted),un.bold(this.msg),Ul.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
44
  `).reduce((e,r,s)=>e+`
45
- ${s?" ":p0.pointerSmall} ${zi.red().italic(r)}`,"")),this.out.write(m0.line+Il.to(0)+this.outputText));}};Nl.exports=Xi;});var Kl=D((v1,Wl)=>{function Ll(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function jl(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Ll(n,s,i,o,u,"next",a);}function u(a){Ll(n,s,i,o,u,"throw",a);}o(void 0);})}}var es=X(),E0=Ze(),Ul=Q(),ts=Ul.cursor,A0=Ul.erase,rs=Ee(),Qi=rs.style,O0=rs.figures,Gl=rs.clear,R0=rs.lines,S0=/[0-9]/,en=t=>t!==void 0,Vl=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},tn=class extends E0{constructor(e={}){super(e),this.transform=Qi.render(e.style),this.msg=e.message,this.initial=en(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=en(e.min)?e.min:-1/0,this.max=en(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=es.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${Vl(e,this.round)}`),this._value=Vl(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||S0.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 jl(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return jl(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(ts.down(R0(this.outputError,this.out.columns)-1)+Gl(this.outputError,this.out.columns)),this.out.write(Gl(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Qi.symbol(this.done,this.aborted),es.bold(this.msg),Qi.delimiter(this.done),!this.done||!this.done&&!this.placeholder?es[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
45
+ ${s?" ":A0.pointerSmall} ${un.red().italic(r)}`,"")),this.out.write(O0.line+Kl.to(0)+this.outputText));}};Xl.exports=ln;});var nc=y((H1,ic)=>{function Ql(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 ec(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){Ql(n,s,i,o,a,"next",u);}function a(u){Ql(n,s,i,o,a,"throw",u);}o(void 0);})}}var fs=re(),H0=ot(),sc=ie(),ps=sc.cursor,q0=sc.erase,ms=Me(),hn=ms.style,L0=ms.figures,tc=ms.clear,j0=ms.lines,G0=/[0-9]/,dn=t=>t!==void 0,rc=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},fn=class extends H0{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=fs.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${rc(e,this.round)}`),this._value=rc(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||G0.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 ec(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=false),e.error=!r;})()}submit(){var e=this;return ec(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(ps.down(j0(this.outputError,this.out.columns)-1)+tc(this.outputError,this.out.columns)),this.out.write(tc(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[hn.symbol(this.done,this.aborted),fs.bold(this.msg),hn.delimiter(this.done),!this.done||!this.done&&!this.placeholder?fs[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
48
48
  `).reduce((e,r,s)=>e+`
49
- ${s?" ":O0.pointerSmall} ${es.red().italic(r)}`,"")),this.out.write(A0.line+ts.to(0)+this.outputText+ts.save+this.outputError+ts.restore));}};Wl.exports=tn;});var sn=D((C1,zl)=>{var Ne=X(),T0=Q(),P0=T0.cursor,$0=Ze(),hr=Ee(),Yl=hr.clear,ht=hr.figures,Jl=hr.style,k0=hr.wrap,I0=hr.entriesToDisplay,rn=class extends $0{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=Yl("",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(`
49
+ ${s?" ":L0.pointerSmall} ${fs.red().italic(r)}`,"")),this.out.write(q0.line+ps.to(0)+this.outputText+ps.save+this.outputError+ps.restore));}};ic.exports=fn;});var mn=y((q1,uc)=>{var Ke=re(),V0=ie(),U0=V0.cursor,W0=ot(),_r=Me(),oc=_r.clear,vt=_r.figures,ac=_r.style,K0=_r.wrap,Y0=_r.entriesToDisplay,pn=class extends W0{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=oc("",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
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
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
52
  Instructions:
53
- ${ht.arrowUp}/${ht.arrowDown}: Highlight option
54
- ${ht.arrowLeft}/${ht.arrowRight}/[space]: Toggle selection
53
+ ${vt.arrowUp}/${vt.arrowDown}: Highlight option
54
+ ${vt.arrowLeft}/${vt.arrowRight}/[space]: Toggle selection
55
55
  `+(this.maxChoices===void 0?` a: Toggle all
56
- `:"")+" enter/return: Complete answer":""}renderOption(e,r,s,i){let n=(r.selected?Ne.green(ht.radioOn):ht.radioOff)+" "+i+" ",o,u;return r.disabled?o=e===s?Ne.gray().underline(r.title):Ne.strikethrough().gray(r.title):(o=e===s?Ne.cyan().underline(r.title):r.title,e===s&&r.description&&(u=` - ${r.description}`,(n.length+o.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(u=`
57
- `+k0(r.description,{margin:n.length,width:this.out.columns})))),n+o+Ne.gray(u||"")}paginateOptions(e){if(e.length===0)return Ne.red("No matches for this query.");let r=I0(this.cursor,e.length,this.optionsPerPage),s=r.startIndex,i=r.endIndex,n,o=[];for(let u=s;u<i;u++)u===s&&s>0?n=ht.arrowUp:u===i-1&&i<e.length?n=ht.arrowDown:n=" ",o.push(this.renderOption(this.cursor,e[u],u,n));return `
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
+ `+K0(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=Y0(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
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=[Ne.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(Ne.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(P0.hide),super.render();let e=[Jl.symbol(this.done,this.aborted),Ne.bold(this.msg),Jl.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Ne.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=Yl(e,this.out.columns);}};zl.exports=rn;});var sc=D((x1,rc)=>{function Xl(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function M0(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){Xl(n,s,i,o,u,"next",a);}function u(a){Xl(n,s,i,o,u,"throw",a);}o(void 0);})}}var dr=X(),B0=Ze(),tc=Q(),H0=tc.erase,Zl=tc.cursor,fr=Ee(),nn=fr.style,Ql=fr.clear,on=fr.figures,N0=fr.wrap,q0=fr.entriesToDisplay,ec=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),L0=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),j0=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},un=class extends B0{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:j0(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=nn.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ql("",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=ec(this.suggestions,e):this.value=this.fallback.value,this.fire();}complete(e){var r=this;return M0(function*(){let s=r.completing=r.suggest(r.input,r.choices),i=yield s;if(r.completing!==s)return;r.suggestions=i.map((o,u,a)=>({title:L0(a,u),value:ec(a,u),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(`
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(U0.hide),super.render();let e=[ac.symbol(this.done,this.aborted),Ke.bold(this.msg),ac.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=oc(e,this.out.columns);}};uc.exports=pn;});var mc=y((L1,pc)=>{function lc(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 J0(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){lc(n,s,i,o,a,"next",u);}function a(u){lc(n,s,i,o,a,"throw",u);}o(void 0);})}}var Fr=re(),z0=ot(),fc=ie(),X0=fc.erase,cc=fc.cursor,Er=Me(),gn=Er.style,hc=Er.clear,Dn=Er.figures,Z0=Er.wrap,Q0=Er.entriesToDisplay,dc=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),eb=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),tb=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},bn=class extends z0{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:tb(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=hc("",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=dc(this.suggestions,e):this.value=this.fallback.value,this.fire();}complete(e){var r=this;return J0(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:eb(u,a),value:dc(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
60
  `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
61
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?on.arrowUp:i?on.arrowDown:" ",u=r?dr.cyan().underline(e.title):e.title;return o=(r?dr.cyan(on.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+u.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
63
- `+N0(e.description,{margin:3,width:this.out.columns}))),o+" "+u+dr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Zl.hide):this.out.write(Ql(this.outputText,this.out.columns)),super.render();let e=q0(this.select,this.choices.length,this.limit),r=e.startIndex,s=e.endIndex;if(this.outputText=[nn.symbol(this.done,this.aborted,this.exited),dr.bold(this.msg),nn.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(`
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?Fr.cyan().underline(e.title):e.title;return o=(r?Fr.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
+ `+Z0(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Fr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(cc.hide):this.out.write(hc(this.outputText,this.out.columns)),super.render();let e=Q0(this.select,this.choices.length,this.limit),r=e.startIndex,s=e.endIndex;if(this.outputText=[gn.symbol(this.done,this.aborted,this.exited),Fr.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
64
  `);this.outputText+=`
65
- `+(i||dr.gray(this.fallback.title));}this.out.write(H0.line+Zl.to(0)+this.outputText);}};rc.exports=un;});var uc=D((_1,oc)=>{var tt=X(),G0=Q(),V0=G0.cursor,U0=sn(),ln=Ee(),ic=ln.clear,nc=ln.style,Lt=ln.figures,an=class extends U0{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=ic("",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:`
65
+ `+(i||Fr.gray(this.fallback.title));}this.out.write(X0.line+cc.to(0)+this.outputText);}};pc.exports=bn;});var yc=y((j1,bc)=>{var lt=re(),rb=ie(),sb=rb.cursor,ib=mn(),vn=Me(),gc=vn.clear,Dc=vn.style,Xt=vn.figures,yn=class extends ib{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=gc("",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
66
  Instructions:
67
- ${Lt.arrowUp}/${Lt.arrowDown}: Highlight option
68
- ${Lt.arrowLeft}/${Lt.arrowRight}/[space]: Toggle selection
67
+ ${Xt.arrowUp}/${Xt.arrowDown}: Highlight option
68
+ ${Xt.arrowLeft}/${Xt.arrowRight}/[space]: Toggle selection
69
69
  [a,b,c]/delete: Filter choices
70
70
  enter/return: Complete answer
71
71
  `:""}renderCurrentInput(){return `
72
- Filtered results for: ${this.inputValue?this.inputValue:tt.gray("Enter something to filter")}
73
- `}renderOption(e,r,s){let i;return r.disabled?i=e===s?tt.gray().underline(r.title):tt.strikethrough().gray(r.title):i=e===s?tt.cyan().underline(r.title):r.title,(r.selected?tt.green(Lt.radioOn):Lt.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[tt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(tt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(V0.hide),super.render();let e=[nc.symbol(this.done,this.aborted),tt.bold(this.msg),nc.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=tt.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=ic(e,this.out.columns);}};oc.exports=an;});var pc=D((w1,fc)=>{var ac=X(),W0=Ze(),hc=Ee(),lc=hc.style,K0=hc.clear,dc=Q(),Y0=dc.erase,cc=dc.cursor,cn=class extends W0{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(`
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(Xt.radioOn):Xt.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(sb.hide),super.render();let e=[Dc.symbol(this.done,this.aborted),lt.bold(this.msg),Dc.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=gc(e,this.out.columns);}};bc.exports=yn;});var Ec=y((G1,Fc)=>{var vc=re(),nb=ot(),xc=Me(),Cc=xc.style,ob=xc.clear,_c=ie(),ab=_c.erase,wc=_c.cursor,Cn=class extends nb{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
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(cc.hide):this.out.write(K0(this.outputText,this.out.columns)),super.render(),this.outputText=[lc.symbol(this.done,this.aborted),ac.bold(this.msg),lc.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:ac.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Y0.line+cc.to(0)+this.outputText));}};fc.exports=cn;});var gc=D((F1,mc)=>{mc.exports={TextPrompt:tl(),SelectPrompt:nl(),TogglePrompt:hl(),DatePrompt:ql(),NumberPrompt:Kl(),MultiselectPrompt:sn(),AutocompletePrompt:sc(),AutocompleteMultiselectPrompt:uc(),ConfirmPrompt:pc()};});var bc=D(Dc=>{var de=Dc,J0=gc(),ss=t=>t;function qe(t,e,r={}){return new Promise((s,i)=>{let n=new J0[t](e),o=r.onAbort||ss,u=r.onSubmit||ss,a=r.onExit||ss;n.on("state",e.onState||ss),n.on("submit",h=>s(u(h))),n.on("exit",h=>s(a(h))),n.on("abort",h=>i(o(h)));})}de.text=t=>qe("TextPrompt",t);de.password=t=>(t.style="password",de.text(t));de.invisible=t=>(t.style="invisible",de.text(t));de.number=t=>qe("NumberPrompt",t);de.date=t=>qe("DatePrompt",t);de.confirm=t=>qe("ConfirmPrompt",t);de.list=t=>{let e=t.separator||",";return qe("TextPrompt",t,{onSubmit:r=>r.split(e).map(s=>s.trim())})};de.toggle=t=>qe("TogglePrompt",t);de.select=t=>qe("SelectPrompt",t);de.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return qe("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};de.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return qe("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var z0=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));de.autocomplete=t=>(t.suggest=t.suggest||z0,t.choices=[].concat(t.choices||[]),qe("AutocompletePrompt",t));});var Ec=D((A1,Fc)=>{function yc(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 vc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yc(Object(r),true).forEach(function(s){X0(t,s,r[s]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yc(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s));});}return t}function X0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function Z0(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Q0(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,u;return {s:function(){r=r.call(t);},n:function(){var h=r.next();return n=h.done,h},e:function(h){o=true,u=h;},f:function(){try{!n&&r.return!=null&&r.return();}finally{if(o)throw u}}}}function Q0(t,e){if(t){if(typeof t=="string")return Cc(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 Cc(t,e)}}function Cc(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 xc(t,e,r,s,i,n,o){try{var u=t[n](o),a=u.value;}catch(h){r(h);return}u.done?e(a):Promise.resolve(a).then(s,i);}function _c(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(a){xc(n,s,i,o,u,"next",a);}function u(a){xc(n,s,i,o,u,"throw",a);}o(void 0);})}}var hn=bc(),eb=["suggest","format","onState","validate","onRender","type"],wc=()=>{};function dt(){return dn.apply(this,arguments)}function dn(){return dn=_c(function*(t=[],{onSubmit:e=wc,onCancel:r=wc}={}){let s={},i=dt._override||{};t=[].concat(t);let n,o,u,a,h,l,c=function(){var g=_c(function*(y,v,_=false){if(!(!_&&y.validate&&y.validate(v)!==true))return y.format?yield y.format(v,s):v});return function(v,_){return g.apply(this,arguments)}}();var d=Z0(t),f;try{for(d.s();!(f=d.n()).done;){o=f.value;var p=o;if(a=p.name,h=p.type,typeof h=="function"&&(h=yield h(n,vc({},s),o),o.type=h),!!h){for(let g in o){if(eb.includes(g))continue;let y=o[g];o[g]=typeof y=="function"?yield y(n,vc({},s),l):y;}if(l=o,typeof o.message!="string")throw new Error("prompt message is required");var m=o;if(a=m.name,h=m.type,hn[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[a]=n;continue}try{n=dt._injected?tb(dt._injected,o.initial):yield hn[h](o),s[a]=n=yield c(o,n,!0),u=yield e(o,n,s);}catch{u=!(yield r(o,s));}if(u)return s}}}catch(g){d.e(g);}finally{d.f();}return s}),dn.apply(this,arguments)}function tb(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function rb(t){dt._injected=(dt._injected||[]).concat(t);}function sb(t){dt._override=Object.assign({},t);}Fc.exports=Object.assign(dt,{prompt:dt,prompts:hn,inject:rb,override:sb});});var Oc=D((O1,Ac)=>{Ac.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 is=D((R1,Rc)=>{Rc.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 Pc=D((S1,Tc)=>{var ib=is(),{erase:Sc,cursor:nb}=Q(),ob=t=>[...ib(t)].length;Tc.exports=function(t,e){if(!e)return Sc.line+nb.to(0);let r=0,s=t.split(/\r?\n/);for(let i of s)r+=1+Math.floor(Math.max(ob(i)-1,0)/e);return Sc.lines(r)};});var fn=D((T1,$c)=>{var pr={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},ub={arrowUp:pr.arrowUp,arrowDown:pr.arrowDown,arrowLeft:pr.arrowLeft,arrowRight:pr.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},ab=process.platform==="win32"?ub:pr;$c.exports=ab;});var Ic=D((P1,kc)=>{var jt=X(),xt=fn(),pn=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}`}}),lb=t=>pn[t]||pn.default,mr=Object.freeze({aborted:jt.red(xt.cross),done:jt.green(xt.tick),exited:jt.yellow(xt.cross),default:jt.cyan("?")}),cb=(t,e,r)=>e?mr.aborted:r?mr.exited:t?mr.done:mr.default,hb=t=>jt.gray(t?xt.ellipsis:xt.pointerSmall),db=(t,e)=>jt.gray(t?e?xt.pointerSmall:"+":xt.line);kc.exports={styles:pn,render:lb,symbols:mr,symbol:cb,delimiter:hb,item:db};});var Bc=D(($1,Mc)=>{var fb=is();Mc.exports=function(t,e){let r=String(fb(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var Nc=D((k1,Hc)=>{Hc.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(`
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(wc.hide):this.out.write(ob(this.outputText,this.out.columns)),super.render(),this.outputText=[Cc.symbol(this.done,this.aborted),vc.bold(this.msg),Cc.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:vc.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(ab.line+wc.to(0)+this.outputText));}};Fc.exports=Cn;});var Oc=y((V1,Ac)=>{Ac.exports={TextPrompt:fl(),SelectPrompt:Dl(),TogglePrompt:xl(),DatePrompt:Zl(),NumberPrompt:nc(),MultiselectPrompt:mn(),AutocompletePrompt:mc(),AutocompleteMultiselectPrompt:yc(),ConfirmPrompt:Ec()};});var Sc=y(Rc=>{var ve=Rc,ub=Oc(),gs=t=>t;function Ye(t,e,r={}){return new Promise((s,i)=>{let n=new ub[t](e),o=r.onAbort||gs,a=r.onSubmit||gs,u=r.onExit||gs;n.on("state",e.onState||gs),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 lb=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));ve.autocomplete=t=>(t.suggest=t.suggest||lb,t.choices=[].concat(t.choices||[]),Ye("AutocompletePrompt",t));});var Nc=y((W1,Bc)=>{function Tc(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?Tc(Object(r),true).forEach(function(s){cb(t,s,r[s]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tc(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s));});}return t}function cb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function hb(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=db(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 db(t,e){if(t){if(typeof t=="string")return kc(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 kc(t,e)}}function kc(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 $c(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 Ic(t){return function(){var e=this,r=arguments;return new Promise(function(s,i){var n=t.apply(e,r);function o(u){$c(n,s,i,o,a,"next",u);}function a(u){$c(n,s,i,o,a,"throw",u);}o(void 0);})}}var wn=Sc(),fb=["suggest","format","onState","validate","onRender","type"],Mc=()=>{};function Ct(){return xn.apply(this,arguments)}function xn(){return xn=Ic(function*(t=[],{onSubmit:e=Mc,onCancel:r=Mc}={}){let s={},i=Ct._override||{};t=[].concat(t);let n,o,a,u,h,l,c=function(){var D=Ic(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=hb(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(fb.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?pb(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 pb(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function mb(t){Ct._injected=(Ct._injected||[]).concat(t);}function gb(t){Ct._override=Object.assign({},t);}Bc.exports=Object.assign(Ct,{prompt:Ct,prompts:wn,inject:mb,override:gb});});var qc=y((K1,Hc)=>{Hc.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 Ds=y((Y1,Lc)=>{Lc.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 Vc=y((J1,Gc)=>{var Db=Ds(),{erase:jc,cursor:bb}=ie(),yb=t=>[...Db(t)].length;Gc.exports=function(t,e){if(!e)return jc.line+bb.to(0);let r=0,s=t.split(/\r?\n/);for(let i of s)r+=1+Math.floor(Math.max(yb(i)-1,0)/e);return jc.lines(r)};});var _n=y((z1,Uc)=>{var Ar={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},vb={arrowUp:Ar.arrowUp,arrowDown:Ar.arrowDown,arrowLeft:Ar.arrowLeft,arrowRight:Ar.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Cb=process.platform==="win32"?vb:Ar;Uc.exports=Cb;});var Kc=y((X1,Wc)=>{var Zt=re(),St=_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}`}}),wb=t=>Fn[t]||Fn.default,Or=Object.freeze({aborted:Zt.red(St.cross),done:Zt.green(St.tick),exited:Zt.yellow(St.cross),default:Zt.cyan("?")}),xb=(t,e,r)=>e?Or.aborted:r?Or.exited:t?Or.done:Or.default,_b=t=>Zt.gray(t?St.ellipsis:St.pointerSmall),Fb=(t,e)=>Zt.gray(t?e?St.pointerSmall:"+":St.line);Wc.exports={styles:Fn,render:wb,symbols:Or,symbol:xb,delimiter:_b,item:Fb};});var Jc=y((Z1,Yc)=>{var Eb=Ds();Yc.exports=function(t,e){let r=String(Eb(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,i)=>s+i):r.length};});var Xc=y((Q1,zc)=>{zc.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
77
  `)).join(`
78
- `)};});var Lc=D((I1,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 Ae=D((M1,jc)=>{jc.exports={action:Oc(),clear:Pc(),style:Ic(),strip:is(),figures:fn(),lines:Bc(),wrap:Nc(),entriesToDisplay:Lc()};});var rt=D((B1,Vc)=>{var Gc=$("readline"),{action:pb}=Ae(),mb=$("events"),{beep:gb,cursor:Db}=Q(),bb=X(),mn=class extends mb{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=Gc.createInterface({input:this.in,escapeCodeTimeout:50});Gc.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(true);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,i=(n,o)=>{let u=pb(o,s);u===false?this._&&this._(n,o):typeof this[u]=="function"?this[u](o):this.bell();};this.close=()=>{this.out.write(Db.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(gb);}render(){this.onRender(bb),this.firstRender&&(this.firstRender=false);}};Vc.exports=mn;});var Wc=D((H1,Uc)=>{var ns=X(),yb=rt(),{erase:vb,cursor:gr}=Q(),{style:gn,clear:Dn,lines:Cb,figures:xb}=Ae(),bn=class extends yb{constructor(e={}){super(e),this.transform=gn.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=Dn("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=true,this.rendered=ns.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(`
78
+ `)};});var Qc=y((eA,Zc)=>{Zc.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((tA,eh)=>{eh.exports={action:qc(),clear:Vc(),style:Kc(),strip:Ds(),figures:_n(),lines:Jc(),wrap:Xc(),entriesToDisplay:Qc()};});var ct=y((rA,rh)=>{var th=N("readline"),{action:Ab}=Be(),Ob=N("events"),{beep:Rb,cursor:Sb}=ie(),Tb=re(),En=class extends Ob{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=th.createInterface({input:this.in,escapeCodeTimeout:50});th.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=Ab(o,s);a===false?this._&&this._(n,o):typeof this[a]=="function"?this[a](o):this.bell();};this.close=()=>{this.out.write(Sb.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(Rb);}render(){this.onRender(Tb),this.firstRender&&(this.firstRender=false);}};rh.exports=En;});var ih=y((sA,sh)=>{var bs=re(),Pb=ct(),{erase:kb,cursor:Rr}=ie(),{style:An,clear:On,lines:$b,figures:Ib}=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=bs.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
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(gr.down(Cb(this.outputError,this.out.columns)-1)+Dn(this.outputError,this.out.columns)),this.out.write(Dn(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[gn.symbol(this.done,this.aborted),ns.bold(this.msg),gn.delimiter(this.done),this.red?ns.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
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(Rr.down($b(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),bs.bold(this.msg),An.delimiter(this.done),this.red?bs.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
81
81
  `).reduce((e,r,s)=>e+`
82
- ${s?" ":xb.pointerSmall} ${ns.red().italic(r)}`,"")),this.out.write(vb.line+gr.to(0)+this.outputText+gr.save+this.outputError+gr.restore+gr.move(this.cursorOffset,0)));}};Uc.exports=bn;});var zc=D((N1,Jc)=>{var st=X(),_b=rt(),{style:Kc,clear:Yc,figures:os,wrap:wb,entriesToDisplay:Fb}=Ae(),{cursor:Eb}=Q(),yn=class extends _b{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=Yc("",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(`
82
+ ${s?" ":Ib.pointerSmall} ${bs.red().italic(r)}`,"")),this.out.write(kb.line+Rr.to(0)+this.outputText+Rr.save+this.outputError+Rr.restore+Rr.move(this.cursorOffset,0)));}};sh.exports=Rn;});var uh=y((iA,ah)=>{var ht=re(),Mb=ct(),{style:nh,clear:oh,figures:ys,wrap:Bb,entriesToDisplay:Nb}=Be(),{cursor:Hb}=ie(),Sn=class extends Mb{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=oh("",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
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(Eb.hide):this.out.write(Yc(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=Fb(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Kc.symbol(this.done,this.aborted),st.bold(this.msg),Kc.delimiter(false),this.done?this.selection.title:this.selection.disabled?st.yellow(this.warn):st.gray(this.hint)].join(" "),!this.done){this.outputText+=`
85
- `;for(let s=e;s<r;s++){let i,n,o="",u=this.choices[s];s===e&&e>0?n=os.arrowUp:s===r-1&&r<this.choices.length?n=os.arrowDown:n=" ",u.disabled?(i=this.cursor===s?st.gray().underline(u.title):st.strikethrough().gray(u.title),n=(this.cursor===s?st.bold().gray(os.pointer)+" ":" ")+n):(i=this.cursor===s?st.cyan().underline(u.title):u.title,n=(this.cursor===s?st.cyan(os.pointer)+" ":" ")+n,u.description&&this.cursor===s&&(o=` - ${u.description}`,(n.length+i.length+o.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(o=`
86
- `+wb(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${i}${st.gray(o)}
87
- `;}}this.out.write(this.outputText);}};Jc.exports=yn;});var eh=D((q1,Qc)=>{var us=X(),Ab=rt(),{style:Xc,clear:Ob}=Ae(),{cursor:Zc,erase:Rb}=Q(),vn=class extends Ab{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(`
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(Hb.hide):this.out.write(oh(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=Nb(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[nh.symbol(this.done,this.aborted),ht.bold(this.msg),nh.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=ys.arrowUp:s===r-1&&r<this.choices.length?n=ys.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(ys.pointer)+" ":" ")+n):(i=this.cursor===s?ht.cyan().underline(a.title):a.title,n=(this.cursor===s?ht.cyan(ys.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
+ `+Bb(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${i}${ht.gray(o)}
87
+ `;}}this.out.write(this.outputText);}};ah.exports=Sn;});var dh=y((nA,hh)=>{var vs=re(),qb=ct(),{style:lh,clear:Lb}=Be(),{cursor:ch,erase:jb}=ie(),Tn=class extends qb{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
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(Zc.hide):this.out.write(Ob(this.outputText,this.out.columns)),super.render(),this.outputText=[Xc.symbol(this.done,this.aborted),us.bold(this.msg),Xc.delimiter(this.done),this.value?this.inactive:us.cyan().underline(this.inactive),us.gray("/"),this.value?us.cyan().underline(this.active):this.active].join(" "),this.out.write(Rb.line+Zc.to(0)+this.outputText));}};Qc.exports=vn;});var Le=D((L1,th)=>{var Cn=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)}};th.exports=Cn;});var sh=D((j1,rh)=>{var Sb=Le(),xn=class extends Sb{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}};rh.exports=xn;});var nh=D((G1,ih)=>{var Tb=Le(),Pb=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),_n=class extends Tb{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+Pb(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};ih.exports=_n;});var uh=D((V1,oh)=>{var $b=Le(),wn=class extends $b{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}};oh.exports=wn;});var lh=D((U1,ah)=>{var kb=Le(),Fn=class extends kb{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)}};ah.exports=Fn;});var hh=D((W1,ch)=>{var Ib=Le(),En=class extends Ib{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}};ch.exports=En;});var fh=D((K1,dh)=>{var Mb=Le(),An=class extends Mb{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)}};dh.exports=An;});var mh=D((Y1,ph)=>{var Bb=Le(),On=class extends Bb{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}};ph.exports=On;});var Dh=D((J1,gh)=>{var Hb=Le(),Rn=class extends Hb{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}};gh.exports=Rn;});var yh=D((z1,bh)=>{bh.exports={DatePart:Le(),Meridiem:sh(),Day:nh(),Hours:uh(),Milliseconds:lh(),Minutes:hh(),Month:fh(),Seconds:mh(),Year:Dh()};});var Eh=D((X1,Fh)=>{var Sn=X(),Nb=rt(),{style:vh,clear:Ch,figures:qb}=Ae(),{erase:Lb,cursor:xh}=Q(),{DatePart:_h,Meridiem:jb,Day:Gb,Hours:Vb,Milliseconds:Ub,Minutes:Wb,Month:Kb,Seconds:Yb,Year:Jb}=yh(),zb=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,wh={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new Gb(t),3:t=>new Kb(t),4:t=>new Jb(t),5:t=>new jb(t),6:t=>new Vb(t),7:t=>new Wb(t),8:t=>new Yb(t),9:t=>new Ub(t)},Xb={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(",")},Tn=class extends Nb{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(Xb,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=Ch("",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=zb.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in wh?wh[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 _h)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=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(ch.hide):this.out.write(Lb(this.outputText,this.out.columns)),super.render(),this.outputText=[lh.symbol(this.done,this.aborted),vs.bold(this.msg),lh.delimiter(this.done),this.value?this.inactive:vs.cyan().underline(this.inactive),vs.gray("/"),this.value?vs.cyan().underline(this.active):this.active].join(" "),this.out.write(jb.line+ch.to(0)+this.outputText));}};hh.exports=Tn;});var Je=y((oA,fh)=>{var Pn=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)}};fh.exports=Pn;});var mh=y((aA,ph)=>{var Gb=Je(),kn=class extends Gb{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}};ph.exports=kn;});var Dh=y((uA,gh)=>{var Vb=Je(),Ub=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),$n=class extends Vb{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+Ub(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};gh.exports=$n;});var yh=y((lA,bh)=>{var Wb=Je(),In=class extends Wb{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}};bh.exports=In;});var Ch=y((cA,vh)=>{var Kb=Je(),Mn=class extends Kb{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)}};vh.exports=Mn;});var xh=y((hA,wh)=>{var Yb=Je(),Bn=class extends Yb{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}};wh.exports=Bn;});var Fh=y((dA,_h)=>{var Jb=Je(),Nn=class extends Jb{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)}};_h.exports=Nn;});var Ah=y((fA,Eh)=>{var zb=Je(),Hn=class extends zb{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}};Eh.exports=Hn;});var Rh=y((pA,Oh)=>{var Xb=Je(),qn=class extends Xb{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}};Oh.exports=qn;});var Th=y((mA,Sh)=>{Sh.exports={DatePart:Je(),Meridiem:mh(),Day:Dh(),Hours:yh(),Milliseconds:Ch(),Minutes:xh(),Month:Fh(),Seconds:Ah(),Year:Rh()};});var Nh=y((gA,Bh)=>{var Ln=re(),Zb=ct(),{style:Ph,clear:kh,figures:Qb}=Be(),{erase:ey,cursor:$h}=ie(),{DatePart:Ih,Meridiem:ty,Day:ry,Hours:sy,Milliseconds:iy,Minutes:ny,Month:oy,Seconds:ay,Year:uy}=Th(),ly=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,Mh={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new ry(t),3:t=>new oy(t),4:t=>new uy(t),5:t=>new ty(t),6:t=>new sy(t),7:t=>new ny(t),8:t=>new ay(t),9:t=>new iy(t)},cy={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 Zb{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(cy,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=kh("",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=ly.exec(e);){let i=r.shift(),n=r.findIndex(o=>o!=null);this.parts.push(n in Mh?Mh[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 Ih)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=false,this.fire(),this.render(),this.out.write(`
90
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 _h)),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(xh.hide):this.out.write(Ch(this.outputText,this.out.columns)),super.render(),this.outputText=[vh.symbol(this.done,this.aborted),Sn.bold(this.msg),vh.delimiter(false),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?Sn.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
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 Ih)),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($h.hide):this.out.write(kh(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
92
  `).reduce((e,r,s)=>e+`
93
- ${s?" ":qb.pointerSmall} ${Sn.red().italic(r)}`,"")),this.out.write(Lb.line+xh.to(0)+this.outputText));}};Fh.exports=Tn;});var Sh=D((Z1,Rh)=>{var as=X(),Zb=rt(),{cursor:ls,erase:Qb}=Q(),{style:Pn,figures:ey,clear:Ah,lines:ty}=Ae(),ry=/[0-9]/,$n=t=>t!==void 0,Oh=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},kn=class extends Zb{constructor(e={}){super(e),this.transform=Pn.render(e.style),this.msg=e.message,this.initial=$n(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=$n(e.min)?e.min:-1/0,this.max=$n(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=as.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${Oh(e,this.round)}`),this._value=Oh(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||ry.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(`
93
+ ${s?" ":Qb.pointerSmall} ${Ln.red().italic(r)}`,"")),this.out.write(ey.line+$h.to(0)+this.outputText));}};Bh.exports=jn;});var jh=y((DA,Lh)=>{var Cs=re(),hy=ct(),{cursor:ws,erase:dy}=ie(),{style:Gn,figures:fy,clear:Hh,lines:py}=Be(),my=/[0-9]/,Vn=t=>t!==void 0,qh=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},Un=class extends hy{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=Cs.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=false,this.rendered=this.transform.render(`${qh(e,this.round)}`),this._value=qh(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||my.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
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(ls.down(ty(this.outputError,this.out.columns)-1)+Ah(this.outputError,this.out.columns)),this.out.write(Ah(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Pn.symbol(this.done,this.aborted),as.bold(this.msg),Pn.delimiter(this.done),!this.done||!this.done&&!this.placeholder?as[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
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(ws.down(py(this.outputError,this.out.columns)-1)+Hh(this.outputError,this.out.columns)),this.out.write(Hh(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Gn.symbol(this.done,this.aborted),Cs.bold(this.msg),Gn.delimiter(this.done),!this.done||!this.done&&!this.placeholder?Cs[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
96
96
  `).reduce((e,r,s)=>e+`
97
- ${s?" ":ey.pointerSmall} ${as.red().italic(r)}`,"")),this.out.write(Qb.line+ls.to(0)+this.outputText+ls.save+this.outputError+ls.restore));}};Rh.exports=kn;});var Mn=D((Q1,$h)=>{var je=X(),{cursor:sy}=Q(),iy=rt(),{clear:Th,figures:ft,style:Ph,wrap:ny,entriesToDisplay:oy}=Ae(),In=class extends iy{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=Th("",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(`
97
+ ${s?" ":fy.pointerSmall} ${Cs.red().italic(r)}`,"")),this.out.write(dy.line+ws.to(0)+this.outputText+ws.save+this.outputError+ws.restore));}};Lh.exports=Un;});var Kn=y((bA,Uh)=>{var ze=re(),{cursor:gy}=ie(),Dy=ct(),{clear:Gh,figures:wt,style:Vh,wrap:by,entriesToDisplay:yy}=Be(),Wn=class extends Dy{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=Gh("",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
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
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
100
  Instructions:
101
- ${ft.arrowUp}/${ft.arrowDown}: Highlight option
102
- ${ft.arrowLeft}/${ft.arrowRight}/[space]: Toggle selection
101
+ ${wt.arrowUp}/${wt.arrowDown}: Highlight option
102
+ ${wt.arrowLeft}/${wt.arrowRight}/[space]: Toggle selection
103
103
  `+(this.maxChoices===void 0?` a: Toggle all
104
- `:"")+" enter/return: Complete answer":""}renderOption(e,r,s,i){let n=(r.selected?je.green(ft.radioOn):ft.radioOff)+" "+i+" ",o,u;return r.disabled?o=e===s?je.gray().underline(r.title):je.strikethrough().gray(r.title):(o=e===s?je.cyan().underline(r.title):r.title,e===s&&r.description&&(u=` - ${r.description}`,(n.length+o.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(u=`
105
- `+ny(r.description,{margin:n.length,width:this.out.columns})))),n+o+je.gray(u||"")}paginateOptions(e){if(e.length===0)return je.red("No matches for this query.");let{startIndex:r,endIndex:s}=oy(this.cursor,e.length,this.optionsPerPage),i,n=[];for(let o=r;o<s;o++)o===r&&r>0?i=ft.arrowUp:o===s-1&&s<e.length?i=ft.arrowDown:i=" ",n.push(this.renderOption(this.cursor,e[o],o,i));return `
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
+ `+by(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}=yy(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
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=[je.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(je.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(sy.hide),super.render();let e=[Ph.symbol(this.done,this.aborted),je.bold(this.msg),Ph.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=je.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=Th(e,this.out.columns);}};$h.exports=In;});var Hh=D((e2,Bh)=>{var Dr=X(),uy=rt(),{erase:ay,cursor:kh}=Q(),{style:Bn,clear:Ih,figures:Hn,wrap:ly,entriesToDisplay:cy}=Ae(),Mh=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),hy=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),dy=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},Nn=class extends uy{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:dy(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=Bn.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ih("",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=Mh(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,u)=>({title:hy(u,o),value:Mh(u,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(`
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(gy.hide),super.render();let e=[Vh.symbol(this.done,this.aborted),ze.bold(this.msg),Vh.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=Gh(e,this.out.columns);}};Uh.exports=Wn;});var zh=y((yA,Jh)=>{var Sr=re(),vy=ct(),{erase:Cy,cursor:Wh}=ie(),{style:Yn,clear:Kh,figures:Jn,wrap:wy,entriesToDisplay:xy}=Be(),Yh=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),_y=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),Fy=(t,e)=>{let r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0},zn=class extends vy{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Fy(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=Kh("",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=Yh(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:_y(a,o),value:Yh(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
108
  `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
109
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?Hn.arrowUp:i?Hn.arrowDown:" ",u=r?Dr.cyan().underline(e.title):e.title;return o=(r?Dr.cyan(Hn.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+u.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
111
- `+ly(e.description,{margin:3,width:this.out.columns}))),o+" "+u+Dr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(kh.hide):this.out.write(Ih(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=cy(this.select,this.choices.length,this.limit);if(this.outputText=[Bn.symbol(this.done,this.aborted,this.exited),Dr.bold(this.msg),Bn.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(`
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?Sr.cyan().underline(e.title):e.title;return o=(r?Sr.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
+ `+wy(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Sr.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Wh.hide):this.out.write(Kh(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=xy(this.select,this.choices.length,this.limit);if(this.outputText=[Yn.symbol(this.done,this.aborted,this.exited),Sr.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
112
  `);this.outputText+=`
113
- `+(s||Dr.gray(this.fallback.title));}this.out.write(ay.line+kh.to(0)+this.outputText);}};Bh.exports=Nn;});var jh=D((t2,Lh)=>{var it=X(),{cursor:fy}=Q(),py=Mn(),{clear:Nh,style:qh,figures:Gt}=Ae(),qn=class extends py{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=Nh("",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:`
113
+ `+(s||Sr.gray(this.fallback.title));}this.out.write(Cy.line+Wh.to(0)+this.outputText);}};Jh.exports=zn;});var ed=y((vA,Qh)=>{var dt=re(),{cursor:Ey}=ie(),Ay=Kn(),{clear:Xh,style:Zh,figures:Qt}=Be(),Xn=class extends Ay{constructor(e={}){e.overrideRender=true,super(e),this.inputValue="",this.clear=Xh("",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
114
  Instructions:
115
- ${Gt.arrowUp}/${Gt.arrowDown}: Highlight option
116
- ${Gt.arrowLeft}/${Gt.arrowRight}/[space]: Toggle selection
115
+ ${Qt.arrowUp}/${Qt.arrowDown}: Highlight option
116
+ ${Qt.arrowLeft}/${Qt.arrowRight}/[space]: Toggle selection
117
117
  [a,b,c]/delete: Filter choices
118
118
  enter/return: Complete answer
119
119
  `:""}renderCurrentInput(){return `
120
- Filtered results for: ${this.inputValue?this.inputValue:it.gray("Enter something to filter")}
121
- `}renderOption(e,r,s){let i;return r.disabled?i=e===s?it.gray().underline(r.title):it.strikethrough().gray(r.title):i=e===s?it.cyan().underline(r.title):r.title,(r.selected?it.green(Gt.radioOn):Gt.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[it.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(it.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(fy.hide),super.render();let e=[qh.symbol(this.done,this.aborted),it.bold(this.msg),qh.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=it.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=Nh(e,this.out.columns);}};Lh.exports=qn;});var Kh=D((r2,Wh)=>{var Gh=X(),my=rt(),{style:Vh,clear:gy}=Ae(),{erase:Dy,cursor:Uh}=Q(),Ln=class extends my{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(`
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(Qt.radioOn):Qt.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(Ey.hide),super.render();let e=[Zh.symbol(this.done,this.aborted),dt.bold(this.msg),Zh.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=Xh(e,this.out.columns);}};Qh.exports=Xn;});var nd=y((CA,id)=>{var td=re(),Oy=ct(),{style:rd,clear:Ry}=Be(),{erase:Sy,cursor:sd}=ie(),Zn=class extends Oy{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
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(Uh.hide):this.out.write(gy(this.outputText,this.out.columns)),super.render(),this.outputText=[Vh.symbol(this.done,this.aborted),Gh.bold(this.msg),Vh.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Gh.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Dy.line+Uh.to(0)+this.outputText));}};Wh.exports=Ln;});var Jh=D((s2,Yh)=>{Yh.exports={TextPrompt:Wc(),SelectPrompt:zc(),TogglePrompt:eh(),DatePrompt:Eh(),NumberPrompt:Sh(),MultiselectPrompt:Mn(),AutocompletePrompt:Hh(),AutocompleteMultiselectPrompt:jh(),ConfirmPrompt:Kh()};});var Xh=D(zh=>{var fe=zh,by=Jh(),cs=t=>t;function Ge(t,e,r={}){return new Promise((s,i)=>{let n=new by[t](e),o=r.onAbort||cs,u=r.onSubmit||cs,a=r.onExit||cs;n.on("state",e.onState||cs),n.on("submit",h=>s(u(h))),n.on("exit",h=>s(a(h))),n.on("abort",h=>i(o(h)));})}fe.text=t=>Ge("TextPrompt",t);fe.password=t=>(t.style="password",fe.text(t));fe.invisible=t=>(t.style="invisible",fe.text(t));fe.number=t=>Ge("NumberPrompt",t);fe.date=t=>Ge("DatePrompt",t);fe.confirm=t=>Ge("ConfirmPrompt",t);fe.list=t=>{let e=t.separator||",";return Ge("TextPrompt",t,{onSubmit:r=>r.split(e).map(s=>s.trim())})};fe.toggle=t=>Ge("TogglePrompt",t);fe.select=t=>Ge("SelectPrompt",t);fe.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Ge("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};fe.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(s=>s.selected).map(s=>s.value);return Ge("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var yy=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));fe.autocomplete=t=>(t.suggest=t.suggest||yy,t.choices=[].concat(t.choices||[]),Ge("AutocompletePrompt",t));});var ed=D((n2,Qh)=>{var jn=Xh(),vy=["suggest","format","onState","validate","onRender","type"],Zh=()=>{};async function pt(t=[],{onSubmit:e=Zh,onCancel:r=Zh}={}){let s={},i=pt._override||{};t=[].concat(t);let n,o,u,a,h,l,c=async(d,f,p=false)=>{if(!(!p&&d.validate&&d.validate(f)!==true))return d.format?await d.format(f,s):f};for(o of t)if({name:a,type:h}=o,typeof h=="function"&&(h=await h(n,{...s},o),o.type=h),!!h){for(let d in o){if(vy.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:a,type:h}=o,jn[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[a]=n;continue}try{n=pt._injected?Cy(pt._injected,o.initial):await jn[h](o),s[a]=n=await c(o,n,!0),u=await e(o,n,s);}catch{u=!await r(o,s);}if(u)return s}return s}function Cy(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function xy(t){pt._injected=(pt._injected||[]).concat(t);}function _y(t){pt._override=Object.assign({},t);}Qh.exports=Object.assign(pt,{prompt:pt,prompts:jn,inject:xy,override:_y});});var br=D((o2,td)=>{function wy(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}td.exports=wy("8.6.0")?Ec():ed();});var Pf=D((XA,ox)=>{ox.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 Yo=D((ZA,kf)=>{var xs=Object.assign({},Pf()),$f=Object.keys(xs);Object.defineProperty(xs,"random",{get(){let t=Math.floor(Math.random()*$f.length),e=$f[t];return xs[e]}});kf.exports=xs;});var lp=D((fR,ou)=>{var Lx=Object.prototype.hasOwnProperty,he="~";function Ar(){}Object.create&&(Ar.prototype=Object.create(null),new Ar().__proto__||(he=false));function jx(t,e,r){this.fn=t,this.context=e,this.once=r||false;}function ap(t,e,r,s,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var n=new jx(r,s||t,i),o=he?he+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 Is(t,e){--t._eventsCount===0?t._events=new Ar:delete t._events[e];}function ae(){this._events=new Ar,this._eventsCount=0;}ae.prototype.eventNames=function(){var e=[],r,s;if(this._eventsCount===0)return e;for(s in r=this._events)Lx.call(r,s)&&e.push(he?s.slice(1):s);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};ae.prototype.listeners=function(e){var r=he?he+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};ae.prototype.listenerCount=function(e){var r=he?he+e:e,s=this._events[r];return s?s.fn?1:s.length:0};ae.prototype.emit=function(e,r,s,i,n,o){var u=he?he+e:e;if(!this._events[u])return false;var a=this._events[u],h=arguments.length,l,c;if(a.fn){switch(a.once&&this.removeListener(e,a.fn,void 0,true),h){case 1:return a.fn.call(a.context),true;case 2:return a.fn.call(a.context,r),true;case 3:return a.fn.call(a.context,r,s),true;case 4:return a.fn.call(a.context,r,s,i),true;case 5:return a.fn.call(a.context,r,s,i,n),true;case 6:return a.fn.call(a.context,r,s,i,n,o),true}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];a.fn.apply(a.context,l);}else {var d=a.length,f;for(c=0;c<d;c++)switch(a[c].once&&this.removeListener(e,a[c].fn,void 0,true),h){case 1:a[c].fn.call(a[c].context);break;case 2:a[c].fn.call(a[c].context,r);break;case 3:a[c].fn.call(a[c].context,r,s);break;case 4:a[c].fn.call(a[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];a[c].fn.apply(a[c].context,l);}}return true};ae.prototype.on=function(e,r,s){return ap(this,e,r,s,false)};ae.prototype.once=function(e,r,s){return ap(this,e,r,s,true)};ae.prototype.removeListener=function(e,r,s,i){var n=he?he+e:e;if(!this._events[n])return this;if(!r)return Is(this,n),this;var o=this._events[n];if(o.fn)o.fn===r&&(!i||o.once)&&(!s||o.context===s)&&Is(this,n);else {for(var u=0,a=[],h=o.length;u<h;u++)(o[u].fn!==r||i&&!o[u].once||s&&o[u].context!==s)&&a.push(o[u]);a.length?this._events[n]=a.length===1?a[0]:a:Is(this,n);}return this};ae.prototype.removeAllListeners=function(e){var r;return e?(r=he?he+e:e,this._events[r]&&Is(this,r)):(this._events=new Ar,this._eventsCount=0),this};ae.prototype.off=ae.prototype.removeListener;ae.prototype.addListener=ae.prototype.on;ae.prefixed=he;ae.EventEmitter=ae;typeof ou<"u"&&(ou.exports=ae);});var hp=D((pR,cp)=>{cp.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 Ms=D(fp=>{var ut=fp,Gx=$("url"),dp=$("util")._extend,Vx=hp(),Ux=/(^|,)\s*upgrade\s*($|,)/i,uu=/^https|wss/;ut.isSSL=uu;ut.setupOutgoing=function(t,e,r,s){t.port=e[s||"target"].port||(uu.test(e[s||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(u){t[u]=e[s||"target"][u];}),t.method=e.method||r.method,t.headers=dp({},r.headers),e.headers&&dp(t.headers,e.headers),e.auth&&(t.auth=e.auth),e.ca&&(t.ca=e.ca),uu.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"||!Ux.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:Gx.parse(r.url).path||"";return o=e.ignorePath?"":o,t.path=ut.urlJoin(n,o),e.changeOrigin&&(t.headers.host=Vx(t.port,e[s||"target"].protocol)&&!Wx(t.host)?t.host+":"+t.port:t.host),t};ut.setupSocket=function(t){return t.setTimeout(0),t.setNoDelay(true),t.setKeepAlive(true,0),t};ut.getPort=function(t){var e=t.headers.host?t.headers.host.match(/:(\d+)/):"";return e?e[1]:ut.hasEncryptedConnection(t)?"443":"80"};ut.hasEncryptedConnection=function(t){return !!(t.connection.encrypted||t.connection.pair)};ut.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("?")};ut.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 u;if(o in r)u=r[o];else if("*"in r)u=r["*"];else return i;return u?n+u:""})};function Wx(t){return !!~t.indexOf(":")}});var Dp=D((gR,gp)=>{var pp=$("url"),mp=Ms(),Kx=/^201|30(1|2|7|8)$/;gp.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&&Kx.test(s.statusCode)){var n=pp.parse(i.target),o=pp.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,u=i.preserveHeaderKeyCase,a,h=function(d,f){f!=null&&(n&&d.toLowerCase()==="set-cookie"&&(f=mp.rewriteCookieProperty(f,n,"domain")),o&&d.toLowerCase()==="set-cookie"&&(f=mp.rewriteCookieProperty(f,o,"path")),r.setHeader(String(d).trim(),f));};if(typeof n=="string"&&(n={"*":n}),typeof o=="string"&&(o={"*":o}),u&&s.rawHeaders!=null){a={};for(var l=0;l<s.rawHeaders.length;l+=2){var c=s.rawHeaders[l];a[c.toLowerCase()]=c;}}Object.keys(s.headers).forEach(function(d){var f=s.headers[d];u&&a&&(d=a[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 yp=D((DR,bp)=>{var Zt=1e3,Qt=Zt*60,er=Qt*60,St=er*24,Yx=St*7,Jx=St*365.25;bp.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return zx(t);if(r==="number"&&isFinite(t))return e.long?Zx(t):Xx(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function zx(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*Jx;case "weeks":case "week":case "w":return r*Yx;case "days":case "day":case "d":return r*St;case "hours":case "hour":case "hrs":case "hr":case "h":return r*er;case "minutes":case "minute":case "mins":case "min":case "m":return r*Qt;case "seconds":case "second":case "secs":case "sec":case "s":return r*Zt;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return r;default:return}}}}function Xx(t){var e=Math.abs(t);return e>=St?Math.round(t/St)+"d":e>=er?Math.round(t/er)+"h":e>=Qt?Math.round(t/Qt)+"m":e>=Zt?Math.round(t/Zt)+"s":t+"ms"}function Zx(t){var e=Math.abs(t);return e>=St?Bs(t,e,St,"day"):e>=er?Bs(t,e,er,"hour"):e>=Qt?Bs(t,e,Qt,"minute"):e>=Zt?Bs(t,e,Zt,"second"):t+" ms"}function Bs(t,e,r,s){var i=e>=r*1.5;return Math.round(t/r)+" "+s+(i?"s":"")}});var au=D((bR,vp)=>{function Qx(t){r.debug=r,r.default=r,r.coerce=a,r.disable=o,r.enable=i,r.enabled=u,r.humanize=yp(),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,p;function m(...g){if(!m.enabled)return;let y=m,v=Number(new Date),_=v-(c||v);y.diff=_,y.prev=c,y.curr=v,c=v,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let F=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(S,T)=>{if(S==="%%")return "%";F++;let O=r.formatters[T];if(typeof O=="function"){let P=g[F];S=O.call(y,P),g.splice(F,1),F--;}return S}),r.formatArgs.call(y,g),(y.log||r.log).apply(y,g);}return m.namespace=l,m.useColors=r.useColors(),m.color=r.selectColor(l),m.extend=s,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:true,configurable:false,get:()=>d!==null?d:(f!==r.namespaces&&(f=r.namespaces,p=r.enabled(l)),p),set:g=>{d=g;}}),typeof r.init=="function"&&r.init(m),m}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,p=-1,m=0;for(;d<l.length;)if(f<c.length&&(c[f]===l[d]||c[f]==="*"))c[f]==="*"?(p=f,m=d,f++):(d++,f++);else if(p!==-1)f=p+1,m++,d=m;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 u(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 a(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}vp.exports=Qx;});var Cp=D((pe,Hs)=>{pe.formatArgs=t_;pe.save=r_;pe.load=s_;pe.useColors=e_;pe.storage=i_();pe.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`."));}})();pe.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 e_(){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 t_(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Hs.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);}pe.log=console.debug||console.log||(()=>{});function r_(t){try{t?pe.storage.setItem("debug",t):pe.storage.removeItem("debug");}catch{}}function s_(){let t;try{t=pe.storage.getItem("debug")||pe.storage.getItem("DEBUG");}catch{}return !t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function i_(){try{return localStorage}catch{}}Hs.exports=au()(pe);var{formatters:n_}=Hs.exports;n_.j=function(t){try{return JSON.stringify(t)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});var _p=D((yR,xp)=>{xp.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 Ep=D((vR,Fp)=>{var o_=$("os"),wp=$("tty"),we=_p(),{env:oe}=process,Ns;we("no-color")||we("no-colors")||we("color=false")||we("color=never")?Ns=0:(we("color")||we("colors")||we("color=true")||we("color=always"))&&(Ns=1);function u_(){if("FORCE_COLOR"in oe)return oe.FORCE_COLOR==="true"?1:oe.FORCE_COLOR==="false"?0:oe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(oe.FORCE_COLOR,10),3)}function a_(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function l_(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=u_();s!==void 0&&(Ns=s);let i=r?Ns:s;if(i===0)return 0;if(r){if(we("color=16m")||we("color=full")||we("color=truecolor"))return 3;if(we("color=256"))return 2}if(t&&!e&&i===void 0)return 0;let n=i||0;if(oe.TERM==="dumb")return n;if(process.platform==="win32"){let o=o_.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in oe)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in oe)||oe.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in oe)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(oe.TEAMCITY_VERSION)?1:0;if(oe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in oe){let o=Number.parseInt((oe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(oe.TERM_PROGRAM){case "iTerm.app":return o>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(oe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(oe.TERM)||"COLORTERM"in oe?1:n}function lu(t,e={}){let r=l_(t,{streamIsTTY:t&&t.isTTY,...e});return a_(r)}Fp.exports={supportsColor:lu,stdout:lu({isTTY:wp.isatty(1)}),stderr:lu({isTTY:wp.isatty(2)})};});var Op=D((ue,Ls)=>{var c_=$("tty"),qs=$("util");ue.init=D_;ue.log=p_;ue.formatArgs=d_;ue.save=m_;ue.load=g_;ue.useColors=h_;ue.destroy=qs.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ue.colors=[6,2,3,4,5,1];try{let t=Ep();t&&(t.stderr||t).level>=2&&(ue.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{}ue.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 h_(){return "colors"in ue.inspectOpts?!!ue.inspectOpts.colors:c_.isatty(process.stderr.fd)}function d_(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(`
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(sd.hide):this.out.write(Ry(this.outputText,this.out.columns)),super.render(),this.outputText=[rd.symbol(this.done,this.aborted),td.bold(this.msg),rd.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:td.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Sy.line+sd.to(0)+this.outputText));}};id.exports=Zn;});var ad=y((wA,od)=>{od.exports={TextPrompt:ih(),SelectPrompt:uh(),TogglePrompt:dh(),DatePrompt:Nh(),NumberPrompt:jh(),MultiselectPrompt:Kn(),AutocompletePrompt:zh(),AutocompleteMultiselectPrompt:ed(),ConfirmPrompt:nd()};});var ld=y(ud=>{var Ce=ud,Ty=ad(),xs=t=>t;function Xe(t,e,r={}){return new Promise((s,i)=>{let n=new Ty[t](e),o=r.onAbort||xs,a=r.onSubmit||xs,u=r.onExit||xs;n.on("state",e.onState||xs),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 dd=y((_A,hd)=>{var Qn=ld(),ky=["suggest","format","onState","validate","onRender","type"],cd=()=>{};async function xt(t=[],{onSubmit:e=cd,onCancel:r=cd}={}){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(ky.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?$y(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 $y(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function Iy(t){xt._injected=(xt._injected||[]).concat(t);}function My(t){xt._override=Object.assign({},t);}hd.exports=Object.assign(xt,{prompt:xt,prompts:Qn,inject:Iy,override:My});});var er=y((FA,fd)=>{function By(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}fd.exports=By("8.6.0")?Nc():dd();});var Uf=y((gO,yw)=>{yw.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((DO,Kf)=>{var ks=Object.assign({},Uf()),Wf=Object.keys(ks);Object.defineProperty(ks,"random",{get(){let t=Math.floor(Math.random()*Wf.length),e=Wf[t];return ks[e]}});Kf.exports=ks;});var wp=y((jR,ba)=>{var ox=Object.prototype.hasOwnProperty,ye="~";function Lr(){}Object.create&&(Lr.prototype=Object.create(null),new Lr().__proto__||(ye=false));function ax(t,e,r){this.fn=t,this.context=e,this.once=r||false;}function Cp(t,e,r,s,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var n=new ax(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 Ws(t,e){--t._eventsCount===0?t._events=new Lr:delete t._events[e];}function ge(){this._events=new Lr,this._eventsCount=0;}ge.prototype.eventNames=function(){var e=[],r,s;if(this._eventsCount===0)return e;for(s in r=this._events)ox.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 Cp(this,e,r,s,false)};ge.prototype.once=function(e,r,s){return Cp(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 Ws(this,n),this;var o=this._events[n];if(o.fn)o.fn===r&&(!i||o.once)&&(!s||o.context===s)&&Ws(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:Ws(this,n);}return this};ge.prototype.removeAllListeners=function(e){var r;return e?(r=ye?ye+e:e,this._events[r]&&Ws(this,r)):(this._events=new Lr,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 _p=y((GR,xp)=>{xp.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 Ks=y(Ep=>{var Dt=Ep,ux=N("url"),Fp=N("util")._extend,lx=_p(),cx=/(^|,)\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=Fp({},r.headers),e.headers&&Fp(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"||!cx.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:ux.parse(r.url).path||"";return o=e.ignorePath?"":o,t.path=Dt.urlJoin(n,o),e.changeOrigin&&(t.headers.host=lx(t.port,e[s||"target"].protocol)&&!hx(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 hx(t){return !!~t.indexOf(":")}});var Sp=y((UR,Rp)=>{var Ap=N("url"),Op=Ks(),dx=/^201|30(1|2|7|8)$/;Rp.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&&dx.test(s.statusCode)){var n=Ap.parse(i.target),o=Ap.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=Op.rewriteCookieProperty(f,n,"domain")),o&&d.toLowerCase()==="set-cookie"&&(f=Op.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((WR,Tp)=>{var cr=1e3,hr=cr*60,dr=hr*60,Lt=dr*24,fx=Lt*7,px=Lt*365.25;Tp.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return mx(t);if(r==="number"&&isFinite(t))return e.long?Dx(t):gx(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function mx(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*px;case "weeks":case "week":case "w":return r*fx;case "days":case "day":case "d":return r*Lt;case "hours":case "hour":case "hrs":case "hr":case "h":return r*dr;case "minutes":case "minute":case "mins":case "min":case "m":return r*hr;case "seconds":case "second":case "secs":case "sec":case "s":return r*cr;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return r;default:return}}}}function gx(t){var e=Math.abs(t);return e>=Lt?Math.round(t/Lt)+"d":e>=dr?Math.round(t/dr)+"h":e>=hr?Math.round(t/hr)+"m":e>=cr?Math.round(t/cr)+"s":t+"ms"}function Dx(t){var e=Math.abs(t);return e>=Lt?Ys(t,e,Lt,"day"):e>=dr?Ys(t,e,dr,"hour"):e>=hr?Ys(t,e,hr,"minute"):e>=cr?Ys(t,e,cr,"second"):t+" ms"}function Ys(t,e,r,s){var i=e>=r*1.5;return Math.round(t/r)+" "+s+(i?"s":"")}});var va=y((KR,kp)=>{function bx(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,k)=>{if(R==="%%")return "%";C++;let A=r.formatters[k];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}kp.exports=bx;});var $p=y((xe,Js)=>{xe.formatArgs=vx;xe.save=Cx;xe.load=wx;xe.useColors=yx;xe.storage=xx();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 yx(){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 vx(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Js.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 Cx(t){try{t?xe.storage.setItem("debug",t):xe.storage.removeItem("debug");}catch{}}function wx(){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 xx(){try{return localStorage}catch{}}Js.exports=va()(xe);var{formatters:_x}=Js.exports;_x.j=function(t){try{return JSON.stringify(t)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});var Mp=y((YR,Ip)=>{Ip.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 Hp=y((JR,Np)=>{var Fx=N("os"),Bp=N("tty"),$e=Mp(),{env:fe}=process,zs;$e("no-color")||$e("no-colors")||$e("color=false")||$e("color=never")?zs=0:($e("color")||$e("colors")||$e("color=true")||$e("color=always"))&&(zs=1);function Ex(){if("FORCE_COLOR"in fe)return fe.FORCE_COLOR==="true"?1:fe.FORCE_COLOR==="false"?0:fe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(fe.FORCE_COLOR,10),3)}function Ax(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function Ox(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=Ex();s!==void 0&&(zs=s);let i=r?zs:s;if(i===0)return 0;if(r){if($e("color=16m")||$e("color=full")||$e("color=truecolor"))return 3;if($e("color=256"))return 2}if(t&&!e&&i===void 0)return 0;let n=i||0;if(fe.TERM==="dumb")return n;if(process.platform==="win32"){let o=Fx.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in fe)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in fe)||fe.CI_NAME==="codeship"?1:n;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 o=Number.parseInt((fe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(fe.TERM_PROGRAM){case "iTerm.app":return o>=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:n}function Ca(t,e={}){let r=Ox(t,{streamIsTTY:t&&t.isTTY,...e});return Ax(r)}Np.exports={supportsColor:Ca,stdout:Ca({isTTY:Bp.isatty(1)}),stderr:Ca({isTTY:Bp.isatty(2)})};});var Lp=y((pe,Zs)=>{var Rx=N("tty"),Xs=N("util");pe.init=Mx;pe.log=kx;pe.formatArgs=Tx;pe.save=$x;pe.load=Ix;pe.useColors=Sx;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=Hp();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 Sx(){return "colors"in pe.inspectOpts?!!pe.inspectOpts.colors:Rx.isatty(process.stderr.fd)}function Tx(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
124
  `).join(`
125
- `+n),t.push(i+"m+"+Ls.exports.humanize(this.diff)+"\x1B[0m");}else t[0]=f_()+e+" "+t[0];}function f_(){return ue.inspectOpts.hideDate?"":new Date().toISOString()+" "}function p_(...t){return process.stderr.write(qs.formatWithOptions(ue.inspectOpts,...t)+`
126
- `)}function m_(t){t?process.env.DEBUG=t:delete process.env.DEBUG;}function g_(){return process.env.DEBUG}function D_(t){t.inspectOpts={};let e=Object.keys(ue.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=ue.inspectOpts[e[r]];}Ls.exports=au()(ue);var{formatters:Ap}=Ls.exports;Ap.o=function(t){return this.inspectOpts.colors=this.useColors,qs.inspect(t,this.inspectOpts).split(`
127
- `).map(e=>e.trim()).join(" ")};Ap.O=function(t){return this.inspectOpts.colors=this.useColors,qs.inspect(t,this.inspectOpts)};});var hu=D((CR,cu)=>{typeof process>"u"||process.type==="renderer"||process.browser===true||process.__nwjs?cu.exports=Cp():cu.exports=Op();});var Sp=D((xR,Rp)=>{var Or;Rp.exports=function(){if(!Or){try{Or=hu()("follow-redirects");}catch{}typeof Or!="function"&&(Or=function(){});}Or.apply(null,arguments);};});var Ip=D((_R,_u)=>{var Sr=$("url"),Rr=Sr.URL,b_=$("http"),y_=$("https"),gu=$("stream").Writable,Du=$("assert"),Tp=Sp();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",s=Pt(Error.captureStackTrace);!e&&(r||!s)&&console.warn("The follow-redirects package should be excluded from browser builds.");})();var bu=false;try{Du(new Rr(""));}catch(t){bu=t.code==="ERR_INVALID_URL";}var v_=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],yu=["abort","aborted","connect","error","socket","timeout"],vu=Object.create(null);yu.forEach(function(t){vu[t]=function(e,r,s){this._redirectable.emit(t,e,r,s);};});var fu=Tr("ERR_INVALID_URL","Invalid URL",TypeError),pu=Tr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),C_=Tr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",pu),x_=Tr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),__=Tr("ERR_STREAM_WRITE_AFTER_END","write after end"),w_=gu.prototype.destroy||$p;function me(t,e){gu.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 pu?i:new pu({cause:i}));}},this._performRequest();}me.prototype=Object.create(gu.prototype);me.prototype.abort=function(){xu(this._currentRequest),this._currentRequest.abort(),this.emit("abort");};me.prototype.destroy=function(t){return xu(this._currentRequest,t),w_.call(this,t),this};me.prototype.write=function(t,e,r){if(this._ending)throw new __;if(!Tt(t)&&!A_(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Pt(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 x_),this.abort());};me.prototype.end=function(t,e,r){if(Pt(t)?(r=t,t=e=null):Pt(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;}};me.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e);};me.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t);};me.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){me.prototype[t]=function(e,r){return this._currentRequest[t](e,r)};});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(me.prototype,t,{get:function(){return this._currentRequest[t]}});});me.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));}};me.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 yu)s.on(i,vu[i]);if(this._currentUrl=/^\//.test(this._options.path)?Sr.format(this._options):this._options.path,this._isRedirect){var n=0,o=this,u=this._requestBodyBuffers;(function a(h){if(s===o._currentRequest)if(h)o.emit("error",h);else if(n<u.length){var l=u[n++];s.finished||s.write(l.data,l.encoding,a);}else o._ended&&s.end();})();}};me.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(xu(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new C_;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=[],du(/^content-/i,this._options.headers));var o=du(/^host$/i,this._options.headers),u=Cu(this._currentUrl),a=o||u.host,h=/^\w+:/.test(r)?this._currentUrl:Sr.format(Object.assign(u,{host:a})),l=F_(r,h);if(Tp("redirecting to",l.href),this._isRedirect=true,mu(l,this._options),(l.protocol!==u.protocol&&l.protocol!=="https:"||l.host!==a&&!E_(l.host,a))&&du(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Pt(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 Pp(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 u(h,l,c){return O_(h)?h=mu(h):Tt(h)?h=mu(Cu(h)):(c=l,l=kp(h),h={protocol:i}),Pt(l)&&(c=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},h,l),l.nativeProtocols=r,!Tt(l.host)&&!Tt(l.hostname)&&(l.hostname="::1"),Du.equal(l.protocol,i,"protocol mismatch"),Tp("options",l),new me(l,c)}function a(h,l,c){var d=o.request(h,l,c);return d.end(),d}Object.defineProperties(o,{request:{value:u,configurable:true,enumerable:true,writable:true},get:{value:a,configurable:true,enumerable:true,writable:true}});}),e}function $p(){}function Cu(t){var e;if(bu)e=new Rr(t);else if(e=kp(Sr.parse(t)),!Tt(e.protocol))throw new fu({input:t});return e}function F_(t,e){return bu?new Rr(t,e):Cu(Sr.resolve(e,t))}function kp(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new fu({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new fu({input:t.href||t});return t}function mu(t,e){var r=e||{};for(var s of v_)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 du(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 Tr(t,e,r){function s(i){Pt(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 xu(t,e){for(var r of yu)t.removeListener(r,vu[r]);t.on("error",$p),t.destroy(e);}function E_(t,e){Du(Tt(t)&&Tt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Tt(t){return typeof t=="string"||t instanceof String}function Pt(t){return typeof t=="function"}function A_(t){return typeof t=="object"&&"length"in t}function O_(t){return Rr&&t instanceof Rr}_u.exports=Pp({http:b_,https:y_});_u.exports.wrap=Pp;});var Bp=D((wR,Mp)=>{var R_=$("http"),S_=$("https"),Pr=Dp(),js=Ms(),T_=Ip();Pr=Object.keys(Pr).map(function(t){return Pr[t]});var P_={http:R_,https:S_};Mp.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||js.hasEncryptedConnection(e),n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:js.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 u=s.followRedirects?T_:P_,a=u.http,h=u.https;if(s.forward){var l=(s.forward.protocol==="https:"?h:a).request(js.setupOutgoing(s.ssl||{},s,e,"forward")),c=p(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:a).request(js.setupOutgoing(s.ssl||{},s,e));d.on("socket",function(m){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=p(d,s.target);e.on("error",f),d.on("error",f);function p(m,g){return function(v){if(e.socket.destroyed&&v.code==="ECONNRESET")return n.emit("econnreset",v,e,r,g),m.abort();o?o(v,e,r,g):n.emit("error",v,e,r,g);}}(s.buffer||e).pipe(d),d.on("response",function(m){if(n&&n.emit("proxyRes",m,e,r),!r.headersSent&&!s.selfHandleResponse)for(var g=0;g<Pr.length&&!Pr[g](e,r,m,s);g++);r.finished?n&&n.emit("end",e,r,m):(m.on("end",function(){n&&n.emit("end",e,r,m);}),s.selfHandleResponse||m.pipe(r));});}};});var Np=D((FR,Hp)=>{var $_=$("http"),k_=$("https"),tr=Ms();Hp.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:tr.getPort(e),proto:tr.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 u=function(l,c){return Object.keys(c).reduce(function(d,f){var p=c[f];if(!Array.isArray(p))return d.push(f+": "+p),d;for(var m=0;m<p.length;m++)d.push(f+": "+p[m]);return d},[l]).join(`\r
125
+ `+n),t.push(i+"m+"+Zs.exports.humanize(this.diff)+"\x1B[0m");}else t[0]=Px()+e+" "+t[0];}function Px(){return pe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function kx(...t){return process.stderr.write(Xs.formatWithOptions(pe.inspectOpts,...t)+`
126
+ `)}function $x(t){t?process.env.DEBUG=t:delete process.env.DEBUG;}function Ix(){return process.env.DEBUG}function Mx(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:qp}=Zs.exports;qp.o=function(t){return this.inspectOpts.colors=this.useColors,Xs.inspect(t,this.inspectOpts).split(`
127
+ `).map(e=>e.trim()).join(" ")};qp.O=function(t){return this.inspectOpts.colors=this.useColors,Xs.inspect(t,this.inspectOpts)};});var xa=y((zR,wa)=>{typeof process>"u"||process.type==="renderer"||process.browser===true||process.__nwjs?wa.exports=$p():wa.exports=Lp();});var Gp=y((XR,jp)=>{var jr;jp.exports=function(){if(!jr){try{jr=xa()("follow-redirects");}catch{}typeof jr!="function"&&(jr=function(){});}jr.apply(null,arguments);};});var Yp=y((ZR,Ia)=>{var Vr=N("url"),Gr=Vr.URL,Bx=N("http"),Nx=N("https"),Oa=N("stream").Writable,Ra=N("assert"),Vp=Gp();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",s=Gt(Error.captureStackTrace);!e&&(r||!s)&&console.warn("The follow-redirects package should be excluded from browser builds.");})();var Sa=false;try{Ra(new Gr(""));}catch(t){Sa=t.code==="ERR_INVALID_URL";}var Hx=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Ta=["abort","aborted","connect","error","socket","timeout"],Pa=Object.create(null);Ta.forEach(function(t){Pa[t]=function(e,r,s){this._redirectable.emit(t,e,r,s);};});var Fa=Ur("ERR_INVALID_URL","Invalid URL",TypeError),Ea=Ur("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),qx=Ur("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Ea),Lx=Ur("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),jx=Ur("ERR_STREAM_WRITE_AFTER_END","write after end"),Gx=Oa.prototype.destroy||Wp;function _e(t,e){Oa.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 Ea?i:new Ea({cause:i}));}},this._performRequest();}_e.prototype=Object.create(Oa.prototype);_e.prototype.abort=function(){$a(this._currentRequest),this._currentRequest.abort(),this.emit("abort");};_e.prototype.destroy=function(t){return $a(this._currentRequest,t),Gx.call(this,t),this};_e.prototype.write=function(t,e,r){if(this._ending)throw new jx;if(!jt(t)&&!Wx(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Gt(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 Lx),this.abort());};_e.prototype.end=function(t,e,r){if(Gt(t)?(r=t,t=e=null):Gt(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 Ta)s.on(i,Pa[i]);if(this._currentUrl=/^\//.test(this._options.path)?Vr.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($a(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new qx;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=[],_a(/^content-/i,this._options.headers));var o=_a(/^host$/i,this._options.headers),a=ka(this._currentUrl),u=o||a.host,h=/^\w+:/.test(r)?this._currentUrl:Vr.format(Object.assign(a,{host:u})),l=Vx(r,h);if(Vp("redirecting to",l.href),this._isRedirect=true,Aa(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!Ux(l.host,u))&&_a(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Gt(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 Up(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 Kx(h)?h=Aa(h):jt(h)?h=Aa(ka(h)):(c=l,l=Kp(h),h={protocol:i}),Gt(l)&&(c=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},h,l),l.nativeProtocols=r,!jt(l.host)&&!jt(l.hostname)&&(l.hostname="::1"),Ra.equal(l.protocol,i,"protocol mismatch"),Vp("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 Wp(){}function ka(t){var e;if(Sa)e=new Gr(t);else if(e=Kp(Vr.parse(t)),!jt(e.protocol))throw new Fa({input:t});return e}function Vx(t,e){return Sa?new Gr(t,e):ka(Vr.resolve(e,t))}function Kp(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Fa({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Fa({input:t.href||t});return t}function Aa(t,e){var r=e||{};for(var s of Hx)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 _a(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 Ur(t,e,r){function s(i){Gt(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 $a(t,e){for(var r of Ta)t.removeListener(r,Pa[r]);t.on("error",Wp),t.destroy(e);}function Ux(t,e){Ra(jt(t)&&jt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function jt(t){return typeof t=="string"||t instanceof String}function Gt(t){return typeof t=="function"}function Wx(t){return typeof t=="object"&&"length"in t}function Kx(t){return Gr&&t instanceof Gr}Ia.exports=Up({http:Bx,https:Nx});Ia.exports.wrap=Up;});var zp=y((QR,Jp)=>{var Yx=N("http"),Jx=N("https"),Wr=Sp(),Qs=Ks(),zx=Yp();Wr=Object.keys(Wr).map(function(t){return Wr[t]});var Xx={http:Yx,https:Jx};Jp.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?zx:Xx,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<Wr.length&&!Wr[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 Zp=y((eS,Xp)=>{var Zx=N("http"),Qx=N("https"),fr=Ks();Xp.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:fr.getPort(e),proto:fr.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
128
  `)+`\r
129
129
  \r
130
- `};tr.setupSocket(r),i&&i.length&&r.unshift(i);var a=(tr.isSSL.test(s.target.protocol)?k_:$_).request(tr.setupOutgoing(s.ssl||{},s,e));return n&&n.emit("proxyReqWs",a,e,r,s,i),a.on("error",h),a.on("response",function(l){l.upgrade||(r.write(u("HTTP/"+l.httpVersion+" "+l.statusCode+" "+l.statusMessage,l.headers)),l.pipe(r));}),a.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();}),tr.setupSocket(c),d&&d.length&&c.unshift(d),r.write(u("HTTP/1.1 101 Switching Protocols",l.headers)),c.pipe(r).pipe(c),n.emit("open",c),n.emit("proxySocket",c);}),a.end();function h(l){o?o(l,e,r):n.emit("error",l,e,r),r.end();}}};});var Wp=D((ER,Up)=>{var Gp=Up.exports,qp=$("util")._extend,I_=$("url").parse,Vp=lp(),M_=$("http"),B_=$("https"),Lp=Bp(),jp=Np();Gp.Server=$t;function wu(t){return function(e){return function(r,s){var i=t==="ws"?this.wsPasses:this.webPasses,n=[].slice.call(arguments),o=n.length-1,u,a;typeof n[o]=="function"&&(a=n[o],o--);var h=e;if(!(n[o]instanceof Buffer)&&n[o]!==s&&(h=qp({},e),qp(h,n[o]),o--),n[o]instanceof Buffer&&(u=n[o]),["target","forward"].forEach(function(c){typeof h[c]=="string"&&(h[c]=I_(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,u,this,a);l++);}}}Gp.createRightProxy=wu;function $t(t){Vp.call(this),t=t||{},t.prependPath=t.prependPath!==false,this.web=this.proxyRequest=wu("web")(t),this.ws=this.proxyWebsocketRequest=wu("ws")(t),this.options=t,this.webPasses=Object.keys(Lp).map(function(e){return Lp[e]}),this.wsPasses=Object.keys(jp).map(function(e){return jp[e]}),this.on("error",this.onError,this);}$("util").inherits($t,Vp);$t.prototype.onError=function(t){if(this.listeners("error").length===1)throw t};$t.prototype.listen=function(t,e){var r=this,s=function(i,n){r.web(i,n);};return this._server=this.options.ssl?B_.createServer(this.options.ssl,s):M_.createServer(s),this.options.ws&&this._server.on("upgrade",function(i,n,o){r.ws(i,n,o);}),this._server.listen(t,e),this};$t.prototype.close=function(t){var e=this;this._server&&this._server.close(r);function r(){e._server=null,t&&t.apply(null,arguments);}};$t.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);};$t.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 Yp=D((AR,Kp)=>{var $r=Wp().Server;function Fu(t){return new $r(t)}$r.createProxyServer=Fu;$r.createServer=Fu;$r.createProxy=Fu;Kp.exports=$r;});var zp=D((OR,Jp)=>{Jp.exports=Yp();});var Vs=D(Gs=>{Object.defineProperty(Gs,"__esModule",{value:true});Gs.ERRORS=void 0;var Xp;(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";})(Xp||(Gs.ERRORS=Xp={}));});var Zp=D(Eu=>{Object.defineProperty(Eu,"__esModule",{value:true});Eu.verifyConfig=N_;var H_=Vs();function N_(t){if(!t.target&&!t.router)throw new Error(H_.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING)}});var at=D(Us=>{Object.defineProperty(Us,"__esModule",{value:true});Us.Debug=void 0;var q_=hu();Us.Debug=q_("http-proxy-middleware");});var Qp=D(Ws=>{Object.defineProperty(Ws,"__esModule",{value:true});Ws.debugProxyErrorsPlugin=void 0;var L_=at(),kt=L_.Debug.extend("debug-proxy-errors-plugin"),j_=t=>{t.on("error",(e,r,s,i)=>{kt(`http-proxy error event:
131
- %O`,e);}),t.on("proxyReq",(e,r,s)=>{s.on("error",i=>{kt(`Socket error in proxyReq event:
132
- %O`,i);});}),t.on("proxyRes",(e,r,s)=>{s.on("close",()=>{s.writableEnded||(kt("Destroying proxyRes in proxyRes close event"),e.destroy());});}),t.on("proxyReqWs",(e,r,s)=>{s.on("error",i=>{kt(`Socket error in proxyReqWs event:
133
- %O`,i);});}),t.on("open",e=>{e.on("error",r=>{kt(`Socket error in open event:
134
- %O`,r);});}),t.on("close",(e,r,s)=>{r.on("error",i=>{kt(`Socket error in close event:
135
- %O`,i);});}),t.on("econnreset",(e,r,s,i)=>{kt(`http-proxy econnreset event:
136
- %O`,e);});};Ws.debugProxyErrorsPlugin=j_;});var em=D(Au=>{Object.defineProperty(Au,"__esModule",{value:true});Au.getStatusCode=G_;function G_(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 tm=D(Ks=>{Object.defineProperty(Ks,"__esModule",{value:true});Ks.errorResponsePlugin=void 0;var V_=em();function U_(t){return t&&typeof t.writeHead=="function"}function W_(t){return t&&typeof t.write=="function"&&!("writeHead"in t)}var K_=(t,e)=>{t.on("error",(r,s,i,n)=>{if(!s&&!i)throw r;if(U_(i)){if(!i.headersSent){let u=(0, V_.getStatusCode)(r.code);i.writeHead(u);}let o=s.headers&&s.headers.host;i.end(`Error occurred while trying to proxy: ${o}${s.url}`);}else W_(i)&&i.destroy();});};Ks.errorResponsePlugin=K_;});var Ys=D(Ou=>{Object.defineProperty(Ou,"__esModule",{value:true});Ou.getLogger=J_;var Y_={info:()=>{},warn:()=>{},error:()=>{}};function J_(t){return t.logger||Y_}});var rm=D(Ru=>{Object.defineProperty(Ru,"__esModule",{value:true});Ru.getPort=z_;function z_(t){return Object.keys(t||{})?.[0]?.split(":")[1]}});var im=D(Js=>{Object.defineProperty(Js,"__esModule",{value:true});Js.loggerPlugin=void 0;var sm=$("url"),X_=Ys(),Z_=rm(),Q_=(t,e)=>{let r=(0, X_.getLogger)(e);t.on("error",(s,i,n,o)=>{let a=`${i?.headers?.host}${i?.url}`,h=`${o?.href}`;r.error("[HPM] Error occurred while proxying request %s to %s [%s] (%s)",a,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}`,u;try{let l=(0,Z_.getPort)(s.req?.agent?.sockets),c={protocol:s.req.protocol,host:s.req.host,pathname:s.req.path};u=new sm.URL(`${c.protocol}//${c.host}${c.pathname}`),l&&(u.port=l);}catch{u=new sm.URL(e.target),u.pathname=s.req.path;}let a=u.toString(),h=`[HPM] ${i.method} ${o} -> ${a} [${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());});};Js.loggerPlugin=Q_;});var zs=D(Su=>{Object.defineProperty(Su,"__esModule",{value:true});Su.getFunctionName=ew;function ew(t){return t.name||"[anonymous Function]"}});var nm=D(Xs=>{Object.defineProperty(Xs,"__esModule",{value:true});Xs.proxyEventsPlugin=void 0;var tw=at(),rw=zs(),sw=tw.Debug.extend("proxy-events-plugin"),iw=(t,e)=>{Object.entries(e.on||{}).forEach(([r,s])=>{sw(`register event handler: "${r}" -> "${(0, rw.getFunctionName)(s)}"`),t.on(r,s);});};Xs.proxyEventsPlugin=iw;});var Tu=D(We=>{var nw=We&&We.__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];}),Zs=We&&We.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&nw(e,t,r);};Object.defineProperty(We,"__esModule",{value:true});Zs(Qp(),We);Zs(tm(),We);Zs(im(),We);Zs(nm(),We);});var om=D(Pu=>{Object.defineProperty(Pu,"__esModule",{value:true});Pu.getPlugins=ow;var Qs=Tu();function ow(t){let e=t.on?.error?[]:[Qs.errorResponsePlugin],r=t.ejectPlugins?[]:[Qs.debugProxyErrorsPlugin,Qs.proxyEventsPlugin,Qs.loggerPlugin,...e],s=t.plugins??[];return [...r,...s]}});var am=D((jR,um)=>{um.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 hm=D((GR,cm)=>{var uw=am(),lm={"{":"}","(":")","[":"]"},aw=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 u=t[e+1];e+=2;var a=lm[u];if(a){var h=t.indexOf(a,e);h!==-1&&(e=h+1);}if(t[e]==="!")return true}else e++;}return false},lw=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=lm[r];if(s){var i=t.indexOf(s,e);i!==-1&&(e=i+1);}if(t[e]==="!")return true}else e++;}return false};cm.exports=function(e,r){if(typeof e!="string"||e==="")return false;if(uw(e))return true;var s=aw;return r&&r.strict===false&&(s=lw),s(e)};});var ei=D(Fe=>{Fe.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):false;Fe.find=(t,e)=>t.nodes.find(r=>r.type===e);Fe.exceedsLimit=(t,e,r=1,s)=>s===false||!Fe.isInteger(t)||!Fe.isInteger(e)?false:(Number(e)-Number(t))/Number(r)>=s;Fe.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);};Fe.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?false:(t.invalid=true,true);Fe.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;Fe.isOpenOrClose=t=>t.type==="open"||t.type==="close"?true:t.open===true||t.close===true;Fe.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Fe.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 ti=D((UR,fm)=>{var dm=ei();fm.exports=(t,e={})=>{let r=(s,i={})=>{let n=e.escapeInvalid&&dm.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,u="";if(s.value)return (n||o)&&dm.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let a of s.nodes)u+=r(a);return u};return r(t)};});var mm=D((WR,pm)=>{pm.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):false};});var wm=D((KR,_m)=>{var gm=mm(),It=(t,e,r)=>{if(gm(t)===false)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(gm(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),u=String(s.wrap),a=t+":"+e+"="+i+n+o+u;if(It.cache.hasOwnProperty(a))return It.cache[a].result;let h=Math.min(t,e),l=Math.max(t,e);if(Math.abs(h-l)===1){let m=t+"|"+e;return s.capture?`(${m})`:s.wrap===false?m:`(?:${m})`}let c=xm(t)||xm(e),d={min:t,max:e,a:h,b:l},f=[],p=[];if(c&&(d.isPadded=c,d.maxLen=String(d.max).length),h<0){let m=l<0?Math.abs(l):1;p=Dm(m,Math.abs(h),d,s),h=d.a=0;}return l>=0&&(f=Dm(h,l,d,s)),d.negatives=p,d.positives=f,d.result=cw(p,f),s.capture===true?d.result=`(${d.result})`:s.wrap!==false&&f.length+p.length>1&&(d.result=`(?:${d.result})`),It.cache[a]=d,d.result};function cw(t,e,r){let s=$u(t,e,"-",false)||[],i=$u(e,t,"",false)||[],n=$u(t,e,"-?",true)||[];return s.concat(n).concat(i).join("|")}function hw(t,e){let r=1,s=1,i=ym(t,r),n=new Set([e]);for(;t<=i&&i<=e;)n.add(i),r+=1,i=ym(t,r);for(i=vm(e+1,s)-1;t<i&&i<=e;)n.add(i),s+=1,i=vm(e+1,s)-1;return n=[...n],n.sort(pw),n}function dw(t,e,r){if(t===e)return {pattern:t,count:[],digits:0};let s=fw(t,e),i=s.length,n="",o=0;for(let u=0;u<i;u++){let[a,h]=s[u];a===h?n+=a:a!=="0"||h!=="9"?n+=mw(a,h):o++;}return o&&(n+=r.shorthand===true?"\\d":"[0-9]"),{pattern:n,count:[o],digits:i}}function Dm(t,e,r,s){let i=hw(t,e),n=[],o=t,u;for(let a=0;a<i.length;a++){let h=i[a],l=dw(String(o),String(h),s),c="";if(!r.isPadded&&u&&u.pattern===l.pattern){u.count.length>1&&u.count.pop(),u.count.push(l.count[0]),u.string=u.pattern+Cm(u.count),o=h+1;continue}r.isPadded&&(c=gw(h,r,s)),l.string=c+l.pattern+Cm(l.count),n.push(l),o=h+1,u=l;}return n}function $u(t,e,r,s,i){let n=[];for(let o of t){let{string:u}=o;!s&&!bm(e,"string",u)&&n.push(r+u),s&&bm(e,"string",u)&&n.push(r+u);}return n}function fw(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function pw(t,e){return t>e?1:e>t?-1:0}function bm(t,e,r){return t.some(s=>s[e]===r)}function ym(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function vm(t,e){return t-t%Math.pow(10,e)}function Cm(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function mw(t,e,r){return `[${t}${e-t===1?"":"-"}${e}]`}function xm(t){return /^-?(0+)\d/.test(t)}function gw(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}}`}}It.cache={};It.clearCache=()=>It.cache={};_m.exports=It;});var Mu=D((YR,Tm)=>{var Dw=$("util"),Em=wm(),Fm=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),bw=t=>e=>t===true?Number(e):String(e),ku=t=>typeof t=="number"||typeof t=="string"&&t!=="",kr=t=>Number.isInteger(+t),Iu=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return false;for(;e[++r]==="0";);return r>0},yw=(t,e,r)=>typeof t=="string"||typeof e=="string"?true:r.stringify===true,vw=(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},si=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},Cw=(t,e,r)=>{t.negatives.sort((u,a)=>u<a?-1:u>a?1:0),t.positives.sort((u,a)=>u<a?-1:u>a?1:0);let s=e.capture?"":"?:",i="",n="",o;return t.positives.length&&(i=t.positives.map(u=>si(String(u),r)).join("|")),t.negatives.length&&(n=`-(${s}${t.negatives.map(u=>si(String(u),r)).join("|")})`),i&&n?o=`${i}|${n}`:o=i||n,e.wrap?`(${s}${o})`:o},Am=(t,e,r,s)=>{if(r)return Em(t,e,{wrap:false,...s});let i=String.fromCharCode(t);if(t===e)return i;let n=String.fromCharCode(e);return `[${i}-${n}]`},Om=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===true,i=r.capture?"":"?:";return s?`(${i}${t.join("|")})`:t.join("|")}return Em(t,e,r)},Rm=(...t)=>new RangeError("Invalid range arguments: "+Dw.inspect(...t)),Sm=(t,e,r)=>{if(r.strictRanges===true)throw Rm([t,e]);return []},xw=(t,e)=>{if(e.strictRanges===true)throw new TypeError(`Expected step "${t}" to be a number`);return []},_w=(t,e,r=1,s={})=>{let i=Number(t),n=Number(e);if(!Number.isInteger(i)||!Number.isInteger(n)){if(s.strictRanges===true)throw Rm([t,e]);return []}i===0&&(i=0),n===0&&(n=0);let o=i>n,u=String(t),a=String(e),h=String(r);r=Math.max(Math.abs(r),1);let l=Iu(u)||Iu(a)||Iu(h),c=l?Math.max(u.length,a.length,h.length):0,d=l===false&&yw(t,e,s)===false,f=s.transform||bw(d);if(s.toRegex&&r===1)return Am(si(t,c),si(e,c),true,s);let p={negatives:[],positives:[]},m=v=>p[v<0?"negatives":"positives"].push(Math.abs(v)),g=[],y=0;for(;o?i>=n:i<=n;)s.toRegex===true&&r>1?m(i):g.push(vw(f(i,y),c,d)),i=o?i-r:i+r,y++;return s.toRegex===true?r>1?Cw(p,s,c):Om(g,null,{wrap:false,...s}):g},ww=(t,e,r=1,s={})=>{if(!kr(t)&&t.length>1||!kr(e)&&e.length>1)return Sm(t,e,s);let i=s.transform||(d=>String.fromCharCode(d)),n=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),u=n>o,a=Math.min(n,o),h=Math.max(n,o);if(s.toRegex&&r===1)return Am(a,h,false,s);let l=[],c=0;for(;u?n>=o:n<=o;)l.push(i(n,c)),n=u?n-r:n+r,c++;return s.toRegex===true?Om(l,null,{wrap:false,options:s}):l},ri=(t,e,r,s={})=>{if(e==null&&ku(t))return [t];if(!ku(t)||!ku(e))return Sm(t,e,s);if(typeof r=="function")return ri(t,e,1,{transform:r});if(Fm(r))return ri(t,e,0,r);let i={...s};return i.capture===true&&(i.wrap=true),r=r||i.step||1,kr(r)?kr(t)&&kr(e)?_w(t,e,r,i):ww(t,e,Math.max(Math.abs(r),1),i):r!=null&&!Fm(r)?xw(r,i):ri(t,e,1,r)};Tm.exports=ri;});var km=D((JR,$m)=>{var Fw=Mu(),Pm=ei(),Ew=(t,e={})=>{let r=(s,i={})=>{let n=Pm.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,u=n===true||o===true,a=e.escapeInvalid===true?"\\":"",h="";if(s.isOpen===true)return a+s.value;if(s.isClose===true)return console.log("node.isClose",a,s.value),a+s.value;if(s.type==="open")return u?a+s.value:"(";if(s.type==="close")return u?a+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":u?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let l=Pm.reduce(s.nodes),c=Fw(...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)};$m.exports=Ew;});var Bm=D((zR,Mm)=>{var Aw=Mu(),Im=ti(),rr=ei(),Mt=(t="",e="",r=false)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?rr.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let n of i)s.push(Mt(n,e,r));else for(let n of e)r===true&&typeof n=="string"&&(n=`{${n}}`),s.push(Array.isArray(n)?Mt(i,n,r):i+n);return rr.flatten(s)},Ow=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(i,n={})=>{i.queue=[];let o=n,u=n.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,u=o.queue;if(i.invalid||i.dollar){u.push(Mt(u.pop(),Im(i,e)));return}if(i.type==="brace"&&i.invalid!==true&&i.nodes.length===2){u.push(Mt(u.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let c=rr.reduce(i.nodes);if(rr.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=Aw(...c,e);d.length===0&&(d=Im(i,e)),u.push(Mt(u.pop(),d)),i.nodes=[];return}let a=rr.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"){u.push(Mt(u.pop(),h,a));continue}if(d.value&&d.type!=="open"){h.push(Mt(h.pop(),d.value));continue}d.nodes&&s(d,i);}return h};return rr.flatten(s(t))};Mm.exports=Ow;});var Nm=D((XR,Hm)=>{Hm.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 Vm=D((ZR,Gm)=>{var Rw=ti(),{MAX_LENGTH:qm,CHAR_BACKSLASH:Bu,CHAR_BACKTICK:Sw,CHAR_COMMA:Tw,CHAR_DOT:Pw,CHAR_LEFT_PARENTHESES:$w,CHAR_RIGHT_PARENTHESES:kw,CHAR_LEFT_CURLY_BRACE:Iw,CHAR_RIGHT_CURLY_BRACE:Mw,CHAR_LEFT_SQUARE_BRACKET:Lm,CHAR_RIGHT_SQUARE_BRACKET:jm,CHAR_DOUBLE_QUOTE:Bw,CHAR_SINGLE_QUOTE:Hw,CHAR_NO_BREAK_SPACE:Nw,CHAR_ZERO_WIDTH_NOBREAK_SPACE:qw}=Nm(),Lw=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(qm,r.maxLength):qm;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,u=i,a=0,h=t.length,l=0,c=0,d,f=()=>t[l++],p=m=>{if(m.type==="text"&&u.type==="dot"&&(u.type="text"),u&&u.type==="text"&&m.type==="text"){u.value+=m.value;return}return o.nodes.push(m),m.parent=o,m.prev=u,u=m,m};for(p({type:"bos"});l<h;)if(o=n[n.length-1],d=f(),!(d===qw||d===Nw)){if(d===Bu){p({type:"text",value:(e.keepEscaping?d:"")+f()});continue}if(d===jm){p({type:"text",value:"\\"+d});continue}if(d===Lm){a++;let m;for(;l<h&&(m=f());){if(d+=m,m===Lm){a++;continue}if(m===Bu){d+=f();continue}if(m===jm&&(a--,a===0))break}p({type:"text",value:d});continue}if(d===$w){o=p({type:"paren",nodes:[]}),n.push(o),p({type:"text",value:d});continue}if(d===kw){if(o.type!=="paren"){p({type:"text",value:d});continue}o=n.pop(),p({type:"text",value:d}),o=n[n.length-1];continue}if(d===Bw||d===Hw||d===Sw){let m=d,g;for(e.keepQuotes!==true&&(d="");l<h&&(g=f());){if(g===Bu){d+=g+f();continue}if(g===m){e.keepQuotes===true&&(d+=g);break}d+=g;}p({type:"text",value:d});continue}if(d===Iw){c++;let g={type:"brace",open:true,close:false,dollar:u.value&&u.value.slice(-1)==="$"||o.dollar===true,depth:c,commas:0,ranges:0,nodes:[]};o=p(g),n.push(o),p({type:"open",value:d});continue}if(d===Mw){if(o.type!=="brace"){p({type:"text",value:d});continue}let m="close";o=n.pop(),o.close=true,p({type:m,value:d}),c--,o=n[n.length-1];continue}if(d===Tw&&c>0){if(o.ranges>0){o.ranges=0;let m=o.nodes.shift();o.nodes=[m,{type:"text",value:Rw(o)}];}p({type:"comma",value:d}),o.commas++;continue}if(d===Pw&&c>0&&o.commas===0){let m=o.nodes;if(c===0||m.length===0){p({type:"text",value:d});continue}if(u.type==="dot"){if(o.range=[],u.value+=d,u.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=true,o.ranges=0,u.type="text";continue}o.ranges++,o.args=[];continue}if(u.type==="range"){m.pop();let g=m[m.length-1];g.value+=u.value+d,u=g,o.ranges--;continue}p({type:"dot",value:d});continue}p({type:"text",value:d});}do if(o=n.pop(),o.type!=="root"){o.nodes.forEach(y=>{y.nodes||(y.type==="open"&&(y.isOpen=true),y.type==="close"&&(y.isClose=true),y.nodes||(y.type="text"),y.invalid=true);});let m=n[n.length-1],g=m.nodes.indexOf(o);m.nodes.splice(g,1,...o.nodes);}while(n.length>0);return p({type:"eos"}),i};Gm.exports=Lw;});var Km=D((QR,Wm)=>{var Um=ti(),jw=km(),Gw=Bm(),Vw=Vm(),ve=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let i=ve.create(s,e);Array.isArray(i)?r.push(...i):r.push(i);}else r=[].concat(ve.create(t,e));return e&&e.expand===true&&e.nodupes===true&&(r=[...new Set(r)]),r};ve.parse=(t,e={})=>Vw(t,e);ve.stringify=(t,e={})=>Um(typeof t=="string"?ve.parse(t,e):t,e);ve.compile=(t,e={})=>(typeof t=="string"&&(t=ve.parse(t,e)),jw(t,e));ve.expand=(t,e={})=>{typeof t=="string"&&(t=ve.parse(t,e));let r=Gw(t,e);return e.noempty===true&&(r=r.filter(Boolean)),e.nodupes===true&&(r=[...new Set(r)]),r};ve.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==true?ve.compile(t,e):ve.expand(t,e);Wm.exports=ve;});var Ir=D((eS,Zm)=>{var Uw=$("path"),Ke="\\\\/",Ym=`[^${Ke}]`,lt="\\.",Ww="\\+",Kw="\\?",ii="\\/",Yw="(?=.)",Jm="[^/]",Hu=`(?:${ii}|$)`,zm=`(?:^|${ii})`,Nu=`${lt}{1,2}${Hu}`,Jw=`(?!${lt})`,zw=`(?!${zm}${Nu})`,Xw=`(?!${lt}{0,1}${Hu})`,Zw=`(?!${Nu})`,Qw=`[^.${ii}]`,eF=`${Jm}*?`,Xm={DOT_LITERAL:lt,PLUS_LITERAL:Ww,QMARK_LITERAL:Kw,SLASH_LITERAL:ii,ONE_CHAR:Yw,QMARK:Jm,END_ANCHOR:Hu,DOTS_SLASH:Nu,NO_DOT:Jw,NO_DOTS:zw,NO_DOT_SLASH:Xw,NO_DOTS_SLASH:Zw,QMARK_NO_DOT:Qw,STAR:eF,START_ANCHOR:zm},tF={...Xm,SLASH_LITERAL:`[${Ke}]`,QMARK:Ym,STAR:`${Ym}*?`,DOTS_SLASH:`${lt}{1,2}(?:[${Ke}]|$)`,NO_DOT:`(?!${lt})`,NO_DOTS:`(?!(?:^|[${Ke}])${lt}{1,2}(?:[${Ke}]|$))`,NO_DOT_SLASH:`(?!${lt}{0,1}(?:[${Ke}]|$))`,NO_DOTS_SLASH:`(?!${lt}{1,2}(?:[${Ke}]|$))`,QMARK_NO_DOT:`[^.${Ke}]`,START_ANCHOR:`(?:^|[${Ke}])`,END_ANCHOR:`(?:[${Ke}]|$)`},rF={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"};Zm.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:rF,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:Uw.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?tF:Xm}};});var Mr=D(ge=>{var sF=$("path"),iF=process.platform==="win32",{REGEX_BACKSLASH:nF,REGEX_REMOVE_BACKSLASH:oF,REGEX_SPECIAL_CHARS:uF,REGEX_SPECIAL_CHARS_GLOBAL:aF}=Ir();ge.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ge.hasRegexChars=t=>uF.test(t);ge.isRegexChar=t=>t.length===1&&ge.hasRegexChars(t);ge.escapeRegex=t=>t.replace(aF,"\\$1");ge.toPosixSlashes=t=>t.replace(nF,"/");ge.removeBackslashes=t=>t.replace(oF,e=>e==="\\"?"":e);ge.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ge.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:iF===true||sF.sep==="\\";ge.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?ge.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};ge.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ge.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===true&&(n=`(?:^(?!${n}).*$)`),n};});var og=D((rS,ng)=>{var Qm=Mr(),{CHAR_ASTERISK:qu,CHAR_AT:lF,CHAR_BACKWARD_SLASH:Br,CHAR_COMMA:cF,CHAR_DOT:Lu,CHAR_EXCLAMATION_MARK:ju,CHAR_FORWARD_SLASH:ig,CHAR_LEFT_CURLY_BRACE:Gu,CHAR_LEFT_PARENTHESES:Vu,CHAR_LEFT_SQUARE_BRACKET:hF,CHAR_PLUS:dF,CHAR_QUESTION_MARK:eg,CHAR_RIGHT_CURLY_BRACE:fF,CHAR_RIGHT_PARENTHESES:tg,CHAR_RIGHT_SQUARE_BRACKET:pF}=Ir(),rg=t=>t===ig||t===Br,sg=t=>{t.isPrefix!==true&&(t.depth=t.isGlobstar?1/0:1);},mF=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===true||r.scanToEnd===true,n=[],o=[],u=[],a=t,h=-1,l=0,c=0,d=false,f=false,p=false,m=false,g=false,y=false,v=false,_=false,F=false,E=false,S=0,T,O,P={value:"",depth:0,isGlob:false},te=()=>h>=s,w=()=>a.charCodeAt(h+1),K=()=>(T=O,a.charCodeAt(++h));for(;h<s;){O=K();let le;if(O===Br){v=P.backslashes=true,O=K(),O===Gu&&(y=true);continue}if(y===true||O===Gu){for(S++;te()!==true&&(O=K());){if(O===Br){v=P.backslashes=true,K();continue}if(O===Gu){S++;continue}if(y!==true&&O===Lu&&(O=K())===Lu){if(d=P.isBrace=true,p=P.isGlob=true,E=true,i===true)continue;break}if(y!==true&&O===cF){if(d=P.isBrace=true,p=P.isGlob=true,E=true,i===true)continue;break}if(O===fF&&(S--,S===0)){y=false,d=P.isBrace=true,E=true;break}}if(i===true)continue;break}if(O===ig){if(n.push(h),o.push(P),P={value:"",depth:0,isGlob:false},E===true)continue;if(T===Lu&&h===l+1){l+=2;continue}c=h+1;continue}if(r.noext!==true&&(O===dF||O===lF||O===qu||O===eg||O===ju)===true&&w()===Vu){if(p=P.isGlob=true,m=P.isExtglob=true,E=true,O===ju&&h===l&&(F=true),i===true){for(;te()!==true&&(O=K());){if(O===Br){v=P.backslashes=true,O=K();continue}if(O===tg){p=P.isGlob=true,E=true;break}}continue}break}if(O===qu){if(T===qu&&(g=P.isGlobstar=true),p=P.isGlob=true,E=true,i===true)continue;break}if(O===eg){if(p=P.isGlob=true,E=true,i===true)continue;break}if(O===hF){for(;te()!==true&&(le=K());){if(le===Br){v=P.backslashes=true,K();continue}if(le===pF){f=P.isBracket=true,p=P.isGlob=true,E=true;break}}if(i===true)continue;break}if(r.nonegate!==true&&O===ju&&h===l){_=P.negated=true,l++;continue}if(r.noparen!==true&&O===Vu){if(p=P.isGlob=true,i===true){for(;te()!==true&&(O=K());){if(O===Vu){v=P.backslashes=true,O=K();continue}if(O===tg){E=true;break}}continue}break}if(p===true){if(E=true,i===true)continue;break}}r.noext===true&&(m=false,p=false);let V=a,ct="",C="";l>0&&(ct=a.slice(0,l),a=a.slice(l),c-=l),V&&p===true&&c>0?(V=a.slice(0,c),C=a.slice(c)):p===true?(V="",C=a):V=a,V&&V!==""&&V!=="/"&&V!==a&&rg(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),r.unescape===true&&(C&&(C=Qm.removeBackslashes(C)),V&&v===true&&(V=Qm.removeBackslashes(V)));let x={prefix:ct,input:t,start:l,base:V,glob:C,isBrace:d,isBracket:f,isGlob:p,isExtglob:m,isGlobstar:g,negated:_,negatedExtglob:F};if(r.tokens===true&&(x.maxDepth=0,rg(O)||o.push(P),x.tokens=o),r.parts===true||r.tokens===true){let le;for(let N=0;N<n.length;N++){let Ie=le?le+1:l,Me=n[N],De=t.slice(Ie,Me);r.tokens&&(N===0&&l!==0?(o[N].isPrefix=true,o[N].value=ct):o[N].value=De,sg(o[N]),x.maxDepth+=o[N].depth),(N!==0||De!=="")&&u.push(De),le=Me;}if(le&&le+1<t.length){let N=t.slice(le+1);u.push(N),r.tokens&&(o[o.length-1].value=N,sg(o[o.length-1]),x.maxDepth+=o[o.length-1].depth);}x.slashes=n,x.parts=u;}return x};ng.exports=mF;});var lg=D((sS,ag)=>{var ni=Ir(),Ce=Mr(),{MAX_LENGTH:oi,POSIX_REGEX_SOURCE:gF,REGEX_NON_SPECIAL_CHARS:DF,REGEX_SPECIAL_CHARS_BACKREF:bF,REPLACEMENTS:ug}=ni,yF=(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=>Ce.escapeRegex(i)).join("..")}return r},sr=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Uu=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=ug[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(oi,r.maxLength):oi,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],u=r.capture?"":"?:",a=Ce.isWindows(e),h=ni.globChars(a),l=ni.extglobChars(h),{DOT_LITERAL:c,PLUS_LITERAL:d,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:g,NO_DOT_SLASH:y,NO_DOTS_SLASH:v,QMARK:_,QMARK_NO_DOT:F,STAR:E,START_ANCHOR:S}=h,T=R=>`(${u}(?:(?!${S}${R.dot?m:c}).)*?)`,O=r.dot?"":g,P=r.dot?_:F,te=r.bash===true?T(r):E;r.capture&&(te=`(${te})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let w={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=Ce.removePrefix(t,w),i=t.length;let K=[],V=[],ct=[],C=n,x,le=()=>w.index===i-1,N=w.peek=(R=1)=>t[w.index+R],Ie=w.advance=()=>t[++w.index]||"",Me=()=>t.slice(w.index+1),De=(R="",U=0)=>{w.consumed+=R,w.index+=U;},qr=R=>{w.output+=R.output!=null?R.output:R.value,De(R.value);},Jg=()=>{let R=1;for(;N()==="!"&&(N(2)!=="("||N(3)==="?");)Ie(),w.start++,R++;return R%2===0?false:(w.negated=true,w.start++,true)},Lr=R=>{w[R]++,ct.push(R);},vt=R=>{w[R]--,ct.pop();},M=R=>{if(C.type==="globstar"){let U=w.braces>0&&(R.type==="comma"||R.type==="brace"),A=R.extglob===true||K.length&&(R.type==="pipe"||R.type==="paren");R.type!=="slash"&&R.type!=="paren"&&!U&&!A&&(w.output=w.output.slice(0,-C.output.length),C.type="star",C.value="*",C.output=te,w.output+=C.output);}if(K.length&&R.type!=="paren"&&(K[K.length-1].inner+=R.value),(R.value||R.output)&&qr(R),C&&C.type==="text"&&R.type==="text"){C.value+=R.value,C.output=(C.output||"")+R.value;return}R.prev=C,o.push(R),C=R;},jr=(R,U)=>{let A={...l[U],conditions:1,inner:""};A.prev=C,A.parens=w.parens,A.output=w.output;let k=(r.capture?"(":"")+A.open;Lr("parens"),M({type:R,value:U,output:w.output?"":p}),M({type:"paren",extglob:true,value:Ie(),output:k}),K.push(A);},zg=R=>{let U=R.close+(r.capture?")":""),A;if(R.type==="negate"){let k=te;if(R.inner&&R.inner.length>1&&R.inner.includes("/")&&(k=T(r)),(k!==te||le()||/^\)+$/.test(Me()))&&(U=R.close=`)$))${k}`),R.inner.includes("*")&&(A=Me())&&/^\.[^\\/.]+$/.test(A)){let z=Uu(A,{...e,fastpaths:false}).output;U=R.close=`)${z})${k})`;}R.prev.type==="bos"&&(w.negatedExtglob=true);}M({type:"paren",extglob:true,value:x,output:U}),vt("parens");};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let R=false,U=t.replace(bF,(A,k,z,ce,ie,di)=>ce==="\\"?(R=true,A):ce==="?"?k?k+ce+(ie?_.repeat(ie.length):""):di===0?P+(ie?_.repeat(ie.length):""):_.repeat(z.length):ce==="."?c.repeat(z.length):ce==="*"?k?k+ce+(ie?te:""):te:k?A:`\\${A}`);return R===true&&(r.unescape===true?U=U.replace(/\\/g,""):U=U.replace(/\\+/g,A=>A.length%2===0?"\\\\":A?"\\":"")),U===t&&r.contains===true?(w.output=t,w):(w.output=Ce.wrapOutput(U,w,e),w)}for(;!le();){if(x=Ie(),x==="\0")continue;if(x==="\\"){let A=N();if(A==="/"&&r.bash!==true||A==="."||A===";")continue;if(!A){x+="\\",M({type:"text",value:x});continue}let k=/^\\+/.exec(Me()),z=0;if(k&&k[0].length>2&&(z=k[0].length,w.index+=z,z%2!==0&&(x+="\\")),r.unescape===true?x=Ie():x+=Ie(),w.brackets===0){M({type:"text",value:x});continue}}if(w.brackets>0&&(x!=="]"||C.value==="["||C.value==="[^")){if(r.posix!==false&&x===":"){let A=C.value.slice(1);if(A.includes("[")&&(C.posix=true,A.includes(":"))){let k=C.value.lastIndexOf("["),z=C.value.slice(0,k),ce=C.value.slice(k+2),ie=gF[ce];if(ie){C.value=z+ie,w.backtrack=true,Ie(),!n.output&&o.indexOf(C)===1&&(n.output=p);continue}}}(x==="["&&N()!==":"||x==="-"&&N()==="]")&&(x=`\\${x}`),x==="]"&&(C.value==="["||C.value==="[^")&&(x=`\\${x}`),r.posix===true&&x==="!"&&C.value==="["&&(x="^"),C.value+=x,qr({value:x});continue}if(w.quotes===1&&x!=='"'){x=Ce.escapeRegex(x),C.value+=x,qr({value:x});continue}if(x==='"'){w.quotes=w.quotes===1?0:1,r.keepQuotes===true&&M({type:"text",value:x});continue}if(x==="("){Lr("parens"),M({type:"paren",value:x});continue}if(x===")"){if(w.parens===0&&r.strictBrackets===true)throw new SyntaxError(sr("opening","("));let A=K[K.length-1];if(A&&w.parens===A.parens+1){zg(K.pop());continue}M({type:"paren",value:x,output:w.parens?")":"\\)"}),vt("parens");continue}if(x==="["){if(r.nobracket===true||!Me().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true)throw new SyntaxError(sr("closing","]"));x=`\\${x}`;}else Lr("brackets");M({type:"bracket",value:x});continue}if(x==="]"){if(r.nobracket===true||C&&C.type==="bracket"&&C.value.length===1){M({type:"text",value:x,output:`\\${x}`});continue}if(w.brackets===0){if(r.strictBrackets===true)throw new SyntaxError(sr("opening","["));M({type:"text",value:x,output:`\\${x}`});continue}vt("brackets");let A=C.value.slice(1);if(C.posix!==true&&A[0]==="^"&&!A.includes("/")&&(x=`/${x}`),C.value+=x,qr({value:x}),r.literalBrackets===false||Ce.hasRegexChars(A))continue;let k=Ce.escapeRegex(C.value);if(w.output=w.output.slice(0,-C.value.length),r.literalBrackets===true){w.output+=k,C.value=k;continue}C.value=`(${u}${k}|${C.value})`,w.output+=C.value;continue}if(x==="{"&&r.nobrace!==true){Lr("braces");let A={type:"brace",value:x,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};V.push(A),M(A);continue}if(x==="}"){let A=V[V.length-1];if(r.nobrace===true||!A){M({type:"text",value:x,output:x});continue}let k=")";if(A.dots===true){let z=o.slice(),ce=[];for(let ie=z.length-1;ie>=0&&(o.pop(),z[ie].type!=="brace");ie--)z[ie].type!=="dots"&&ce.unshift(z[ie].value);k=yF(ce,r),w.backtrack=true;}if(A.comma!==true&&A.dots!==true){let z=w.output.slice(0,A.outputIndex),ce=w.tokens.slice(A.tokensIndex);A.value=A.output="\\{",x=k="\\}",w.output=z;for(let ie of ce)w.output+=ie.output||ie.value;}M({type:"brace",value:x,output:k}),vt("braces"),V.pop();continue}if(x==="|"){K.length>0&&K[K.length-1].conditions++,M({type:"text",value:x});continue}if(x===","){let A=x,k=V[V.length-1];k&&ct[ct.length-1]==="braces"&&(k.comma=true,A="|"),M({type:"comma",value:x,output:A});continue}if(x==="/"){if(C.type==="dot"&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",o.pop(),C=n;continue}M({type:"slash",value:x,output:f});continue}if(x==="."){if(w.braces>0&&C.type==="dot"){C.value==="."&&(C.output=c);let A=V[V.length-1];C.type="dots",C.output+=x,C.value+=x,A.dots=true;continue}if(w.braces+w.parens===0&&C.type!=="bos"&&C.type!=="slash"){M({type:"text",value:x,output:c});continue}M({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(C&&C.value==="(")&&r.noextglob!==true&&N()==="("&&N(2)!=="?"){jr("qmark",x);continue}if(C&&C.type==="paren"){let k=N(),z=x;if(k==="<"&&!Ce.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(C.value==="("&&!/[!=<:]/.test(k)||k==="<"&&!/<([!=]|\w+>)/.test(Me()))&&(z=`\\${x}`),M({type:"text",value:x,output:z});continue}if(r.dot!==true&&(C.type==="slash"||C.type==="bos")){M({type:"qmark",value:x,output:F});continue}M({type:"qmark",value:x,output:_});continue}if(x==="!"){if(r.noextglob!==true&&N()==="("&&(N(2)!=="?"||!/[!=<:]/.test(N(3)))){jr("negate",x);continue}if(r.nonegate!==true&&w.index===0){Jg();continue}}if(x==="+"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){jr("plus",x);continue}if(C&&C.value==="("||r.regex===false){M({type:"plus",value:x,output:d});continue}if(C&&(C.type==="bracket"||C.type==="paren"||C.type==="brace")||w.parens>0){M({type:"plus",value:x});continue}M({type:"plus",value:d});continue}if(x==="@"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){M({type:"at",extglob:true,value:x,output:""});continue}M({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let A=DF.exec(Me());A&&(x+=A[0],w.index+=A[0].length),M({type:"text",value:x});continue}if(C&&(C.type==="globstar"||C.star===true)){C.type="star",C.star=true,C.value+=x,C.output=te,w.backtrack=true,w.globstar=true,De(x);continue}let R=Me();if(r.noextglob!==true&&/^\([^?]/.test(R)){jr("star",x);continue}if(C.type==="star"){if(r.noglobstar===true){De(x);continue}let A=C.prev,k=A.prev,z=A.type==="slash"||A.type==="bos",ce=k&&(k.type==="star"||k.type==="globstar");if(r.bash===true&&(!z||R[0]&&R[0]!=="/")){M({type:"star",value:x,output:""});continue}let ie=w.braces>0&&(A.type==="comma"||A.type==="brace"),di=K.length&&(A.type==="pipe"||A.type==="paren");if(!z&&A.type!=="paren"&&!ie&&!di){M({type:"star",value:x,output:""});continue}for(;R.slice(0,3)==="/**";){let Gr=t[w.index+4];if(Gr&&Gr!=="/")break;R=R.slice(3),De("/**",3);}if(A.type==="bos"&&le()){C.type="globstar",C.value+=x,C.output=T(r),w.output=C.output,w.globstar=true,De(x);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&!ce&&le()){w.output=w.output.slice(0,-(A.output+C.output).length),A.output=`(?:${A.output}`,C.type="globstar",C.output=T(r)+(r.strictSlashes?")":"|$)"),C.value+=x,w.globstar=true,w.output+=A.output+C.output,De(x);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&R[0]==="/"){let Gr=R[1]!==void 0?"|$":"";w.output=w.output.slice(0,-(A.output+C.output).length),A.output=`(?:${A.output}`,C.type="globstar",C.output=`${T(r)}${f}|${f}${Gr})`,C.value+=x,w.output+=A.output+C.output,w.globstar=true,De(x+Ie()),M({type:"slash",value:"/",output:""});continue}if(A.type==="bos"&&R[0]==="/"){C.type="globstar",C.value+=x,C.output=`(?:^|${f}|${T(r)}${f})`,w.output=C.output,w.globstar=true,De(x+Ie()),M({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-C.output.length),C.type="globstar",C.output=T(r),C.value+=x,w.output+=C.output,w.globstar=true,De(x);continue}let U={type:"star",value:x,output:te};if(r.bash===true){U.output=".*?",(C.type==="bos"||C.type==="slash")&&(U.output=O+U.output),M(U);continue}if(C&&(C.type==="bracket"||C.type==="paren")&&r.regex===true){U.output=x,M(U);continue}(w.index===w.start||C.type==="slash"||C.type==="dot")&&(C.type==="dot"?(w.output+=y,C.output+=y):r.dot===true?(w.output+=v,C.output+=v):(w.output+=O,C.output+=O),N()!=="*"&&(w.output+=p,C.output+=p)),M(U);}for(;w.brackets>0;){if(r.strictBrackets===true)throw new SyntaxError(sr("closing","]"));w.output=Ce.escapeLast(w.output,"["),vt("brackets");}for(;w.parens>0;){if(r.strictBrackets===true)throw new SyntaxError(sr("closing",")"));w.output=Ce.escapeLast(w.output,"("),vt("parens");}for(;w.braces>0;){if(r.strictBrackets===true)throw new SyntaxError(sr("closing","}"));w.output=Ce.escapeLast(w.output,"{"),vt("braces");}if(r.strictSlashes!==true&&(C.type==="star"||C.type==="bracket")&&M({type:"maybe_slash",value:"",output:`${f}?`}),w.backtrack===true){w.output="";for(let R of w.tokens)w.output+=R.output!=null?R.output:R.value,R.suffix&&(w.output+=R.suffix);}return w};Uu.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(oi,r.maxLength):oi,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=ug[t]||t;let n=Ce.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:u,ONE_CHAR:a,DOTS_SLASH:h,NO_DOT:l,NO_DOTS:c,NO_DOTS_SLASH:d,STAR:f,START_ANCHOR:p}=ni.globChars(n),m=r.dot?c:l,g=r.dot?d:l,y=r.capture?"":"?:",v={negated:false,prefix:""},_=r.bash===true?".*?":f;r.capture&&(_=`(${_})`);let F=O=>O.noglobstar===true?_:`(${y}(?:(?!${p}${O.dot?h:o}).)*?)`,E=O=>{switch(O){case "*":return `${m}${a}${_}`;case ".*":return `${o}${a}${_}`;case "*.*":return `${m}${_}${o}${a}${_}`;case "*/*":return `${m}${_}${u}${a}${g}${_}`;case "**":return m+F(r);case "**/*":return `(?:${m}${F(r)}${u})?${g}${a}${_}`;case "**/*.*":return `(?:${m}${F(r)}${u})?${g}${_}${o}${a}${_}`;case "**/.*":return `(?:${m}${F(r)}${u})?${o}${a}${_}`;default:{let P=/^(.*?)\.(\w+)$/.exec(O);if(!P)return;let te=E(P[1]);return te?te+o+P[2]:void 0}}},S=Ce.removePrefix(t,v),T=E(S);return T&&r.strictSlashes!==true&&(T+=`${u}?`),T};ag.exports=Uu;});var hg=D((iS,cg)=>{var vF=$("path"),CF=og(),Wu=lg(),Ku=Mr(),xF=Ir(),_F=t=>t&&typeof t=="object"&&!Array.isArray(t),re=(t,e,r=false)=>{if(Array.isArray(t)){let l=t.map(d=>re(d,e,r));return d=>{for(let f of l){let p=f(d);if(p)return p}return false}}let s=_F(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=Ku.isWindows(e),o=s?re.compileRe(t,e):re.makeRe(t,e,false,true),u=o.state;delete o.state;let a=()=>false;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};a=re(i.ignore,l,r);}let h=(l,c=false)=>{let{isMatch:d,match:f,output:p}=re.test(l,o,e,{glob:t,posix:n}),m={glob:t,state:u,regex:o,posix:n,input:l,output:p,match:f,isMatch:d};return typeof i.onResult=="function"&&i.onResult(m),d===false?(m.isMatch=false,c?m:false):a(l)?(typeof i.onIgnore=="function"&&i.onIgnore(m),m.isMatch=false,c?m:false):(typeof i.onMatch=="function"&&i.onMatch(m),c?m:true)};return r&&(h.state=u),h};re.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?Ku.toPosixSlashes:null),u=t===s,a=u&&o?o(t):t;return u===false&&(a=o?o(t):t,u=a===s),(u===false||n.capture===true)&&(n.matchBase===true||n.basename===true?u=re.matchBase(t,e,r,i):u=e.exec(a)),{isMatch:!!u,match:u,output:a}};re.matchBase=(t,e,r,s=Ku.isWindows(r))=>(e instanceof RegExp?e:re.makeRe(e,r)).test(vF.basename(t));re.isMatch=(t,e,r)=>re(e,r)(t);re.parse=(t,e)=>Array.isArray(t)?t.map(r=>re.parse(r,e)):Wu(t,{...e,fastpaths:false});re.scan=(t,e)=>CF(t,e);re.compileRe=(t,e,r=false,s=false)=>{if(r===true)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",u=`${n}(?:${t.output})${o}`;t&&t.negated===true&&(u=`^(?!${u}).*$`);let a=re.toRegex(u,e);return s===true&&(a.state=t),a};re.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=Wu.fastpaths(t,e)),i.output||(i=Wu(t,e)),re.compileRe(i,e,r,s)};re.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 /$^/}};re.constants=xF;cg.exports=re;});var fg=D((nS,dg)=>{dg.exports=hg();});var yg=D((oS,bg)=>{var mg=$("util"),gg=Km(),Ye=fg(),Yu=Mr(),pg=t=>t===""||t==="./",Dg=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},W=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,i=new Set,n=new Set,o=0,u=l=>{n.add(l.output),r&&r.onResult&&r.onResult(l);};for(let l=0;l<e.length;l++){let c=Ye(String(e[l]),{...r,onResult:u},true),d=c.state.negated||c.state.negatedExtglob;d&&o++;for(let f of t){let p=c(f,true);(d?!p.isMatch:p.isMatch)&&(d?s.add(p.output):(s.delete(p.output),i.add(p.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};W.match=W;W.matcher=(t,e)=>Ye(t,e);W.isMatch=(t,e,r)=>Ye(e,r)(t);W.any=W.isMatch;W.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,i=[],n=u=>{r.onResult&&r.onResult(u),i.push(u.output);},o=new Set(W(t,e,{...r,onResult:n}));for(let u of i)o.has(u)||s.add(u);return [...s]};W.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${mg.inspect(t)}"`);if(Array.isArray(e))return e.some(s=>W.contains(t,s,r));if(typeof e=="string"){if(pg(t)||pg(e))return false;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return true}return W.isMatch(t,e,{...r,contains:true})};W.matchKeys=(t,e,r)=>{if(!Yu.isObject(t))throw new TypeError("Expected the first argument to be an object");let s=W(Object.keys(t),e,r),i={};for(let n of s)i[n]=t[n];return i};W.some=(t,e,r)=>{let s=[].concat(t);for(let i of [].concat(e)){let n=Ye(String(i),r);if(s.some(o=>n(o)))return true}return false};W.every=(t,e,r)=>{let s=[].concat(t);for(let i of [].concat(e)){let n=Ye(String(i),r);if(!s.every(o=>n(o)))return false}return true};W.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${mg.inspect(t)}"`);return [].concat(e).every(s=>Ye(s,r)(t))};W.capture=(t,e,r)=>{let s=Yu.isWindows(r),n=Ye.makeRe(String(t),{...r,capture:true}).exec(s?Yu.toPosixSlashes(e):e);if(n)return n.slice(1).map(o=>o===void 0?"":o)};W.makeRe=(...t)=>Ye.makeRe(...t);W.scan=(...t)=>Ye.scan(...t);W.parse=(t,e)=>{let r=[];for(let s of [].concat(t||[]))for(let i of gg(String(s),e))r.push(Ye.parse(i,e));return r};W.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===true||!Dg(t)?[t]:gg(t,e)};W.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return W.braces(t,{...e,expand:true})};W.hasBraces=Dg;bg.exports=W;});var Eg=D(zu=>{Object.defineProperty(zu,"__esModule",{value:true});zu.matchPathFilter=EF;var _g=hm(),wF=yg(),FF=$("url"),vg=Vs();function EF(t="/",e,r){if(Cg(t))return wg(t,e);if(xg(t))return Fg(t,e);if(Array.isArray(t)){if(t.every(Cg))return OF(t,e);if(t.every(xg))return AF(t,e);throw new Error(vg.ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY)}if(typeof t=="function"){let s=Ju(e);return t(s,r)}throw new Error(vg.ERRORS.ERR_CONTEXT_MATCHER_GENERIC)}function wg(t,e){return Ju(e)?.indexOf(t)===0}function Fg(t,e){let r=Ju(e),s=wF([r],t);return s&&s.length>0}function AF(t,e){return Fg(t,e)}function OF(t,e){let r=false;for(let s of t)if(wg(s,e)){r=true;break}return r}function Ju(t){return t&&FF.parse(t).pathname}function Cg(t){return typeof t=="string"&&!_g(t)}function xg(t){return _g(t)}});var Zu=D(Xu=>{Object.defineProperty(Xu,"__esModule",{value:true});function Ag(t){return Object.prototype.toString.call(t)==="[object Object]"}function RF(t){var e,r;return Ag(t)===false?false:(e=t.constructor,e===void 0?true:(r=e.prototype,!(Ag(r)===false||r.hasOwnProperty("isPrototypeOf")===false)))}Xu.isPlainObject=RF;});var Sg=D(Qu=>{Object.defineProperty(Qu,"__esModule",{value:true});Qu.createPathRewriter=PF;var Og=Zu(),SF=Vs(),TF=at(),Rg=TF.Debug.extend("path-rewriter");function PF(t){let e;if(!$F(t))return;if(typeof t=="function")return t;return e=kF(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),Rg('rewriting path from "%s" to "%s"',s,i);break}return i}}function $F(t){if(typeof t=="function")return true;if((0, Og.isPlainObject)(t))return Object.keys(t).length!==0;if(t==null)return false;throw new Error(SF.ERRORS.ERR_PATH_REWRITER_CONFIG)}function kF(t){let e=[];if((0, Og.isPlainObject)(t))for(let[r,s]of Object.entries(t))e.push({regex:new RegExp(r),value:s}),Rg('rewrite rule created: "%s" ~> "%s"',r,s);return e}});var Pg=D(ea=>{Object.defineProperty(ea,"__esModule",{value:true});ea.getTarget=BF;var IF=Zu(),MF=at(),Tg=MF.Debug.extend("router");async function BF(t,e){let r,s=e.router;return (0, IF.isPlainObject)(s)?r=HF(t,s):typeof s=="function"&&(r=await s(t)),r}function HF(t,e){let r,s=t.headers.host,i=t.url,n=s+i;for(let[o,u]of Object.entries(e))if(NF(o)){if(n.indexOf(o)>-1){r=u,Tg('match: "%s" -> "%s"',o,r);break}}else if(o===s){r=u,Tg('match: "%s" -> "%s"',s,r);break}return r}function NF(t){return t.indexOf("/")>-1}});var $g=D(ui=>{Object.defineProperty(ui,"__esModule",{value:true});ui.HttpProxyMiddleware=void 0;var qF=zp(),LF=Zp(),jF=om(),GF=Eg(),VF=Sg(),UF=Pg(),Je=at(),WF=zs(),KF=Ys(),ta=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,Je.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, Je.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, Je.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,Je.Debug)("server upgrade event received. Proxying WebSocket");}}catch(n){this.proxy.emit("error",n,r,s);}},this.shouldProxy=(r,s)=>{try{return (0,GF.matchPathFilter)(r,s.url,s)}catch(i){return (0, Je.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 UF.getTarget(r,s),i&&((0, Je.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, Je.Debug)("pathRewrite new path: %s",r.url),r.url=i):(0, Je.Debug)("pathRewrite: no rewritten path found: %s",r.url);}},(0, LF.verifyConfig)(e),this.proxyOptions=e,this.logger=(0, KF.getLogger)(e),(0, Je.Debug)("create proxy server"),this.proxy=qF.createProxyServer({}),this.registerPlugins(this.proxy,this.proxyOptions),this.pathRewriter=VF.createPathRewriter(this.proxyOptions.pathRewrite),this.middleware.upgrade=(r,s,i)=>{this.wsInternalSubscribed||this.handleUpgrade(r,s,i);};}registerPlugins(e,r){(0, jF.getPlugins)(r).forEach(i=>{(0, Je.Debug)(`register plugin: "${(0, WF.getFunctionName)(i)}"`),i(e,r);});}};ui.HttpProxyMiddleware=ta;});var sa=D(ra=>{Object.defineProperty(ra,"__esModule",{value:true});ra.createProxyMiddleware=JF;var YF=$g();function JF(t){let{middleware:e}=new YF.HttpProxyMiddleware(t);return e}});var kg=D(na=>{Object.defineProperty(na,"__esModule",{value:true});na.responseInterceptor=ZF;var ia=$("zlib"),zF=at(),XF=zs(),ir=zF.Debug.extend("response-interceptor");function ZF(t){return async function(r,s,i){ir("intercept proxy response");let n=r,o=Buffer.from("","utf8"),u=QF(r,r.headers["content-encoding"]);u.on("data",a=>o=Buffer.concat([o,a])),u.on("end",async()=>{eE(r,i),ir("call interceptor function: %s",(0, XF.getFunctionName)(t));let a=Buffer.from(await t(o,n,s,i));ir("set content-length: %s",Buffer.byteLength(a,"utf8")),i.setHeader("content-length",Buffer.byteLength(a,"utf8")),ir("write intercepted response"),i.write(a),i.end();}),u.on("error",a=>{i.end(`Error fetching proxied request: ${a.message}`);});}}function QF(t,e){let r=t,s;switch(e){case "gzip":s=ia.createGunzip();break;case "br":s=ia.createBrotliDecompress();break;case "deflate":s=ia.createInflate();break;}return s&&(ir("decompress proxy response with 'content-encoding': %s",e),r.pipe(s),r=s),r}function eE(t,e){if(ir("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 Ig=D(oa=>{Object.defineProperty(oa,"__esModule",{value:true});oa.fixRequestBody=rE;var tE=$("querystring");function rE(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(tE.stringify(r)):s.includes("multipart/form-data")&&i(sE(s,r));}function sE(t,e){let r=t.replace(/^.*boundary=(.*)$/,"$1"),s="";for(let[i,n]of Object.entries(e))s+=`--${r}\r
130
+ `};fr.setupSocket(r),i&&i.length&&r.unshift(i);var u=(fr.isSSL.test(s.target.protocol)?Qx:Zx).request(fr.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();}),fr.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 nm=y((tS,im)=>{var rm=im.exports,Qp=N("util")._extend,e_=N("url").parse,sm=wp(),t_=N("http"),r_=N("https"),em=zp(),tm=Zp();rm.Server=Vt;function Ma(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=Qp({},e),Qp(h,n[o]),o--),n[o]instanceof Buffer&&(a=n[o]),["target","forward"].forEach(function(c){typeof h[c]=="string"&&(h[c]=e_(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++);}}}rm.createRightProxy=Ma;function Vt(t){sm.call(this),t=t||{},t.prependPath=t.prependPath!==false,this.web=this.proxyRequest=Ma("web")(t),this.ws=this.proxyWebsocketRequest=Ma("ws")(t),this.options=t,this.webPasses=Object.keys(em).map(function(e){return em[e]}),this.wsPasses=Object.keys(tm).map(function(e){return tm[e]}),this.on("error",this.onError,this);}N("util").inherits(Vt,sm);Vt.prototype.onError=function(t){if(this.listeners("error").length===1)throw t};Vt.prototype.listen=function(t,e){var r=this,s=function(i,n){r.web(i,n);};return this._server=this.options.ssl?r_.createServer(this.options.ssl,s):t_.createServer(s),this.options.ws&&this._server.on("upgrade",function(i,n,o){r.ws(i,n,o);}),this._server.listen(t,e),this};Vt.prototype.close=function(t){var e=this;this._server&&this._server.close(r);function r(){e._server=null,t&&t.apply(null,arguments);}};Vt.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);};Vt.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 am=y((rS,om)=>{var Kr=nm().Server;function Ba(t){return new Kr(t)}Kr.createProxyServer=Ba;Kr.createServer=Ba;Kr.createProxy=Ba;om.exports=Kr;});var lm=y((sS,um)=>{um.exports=am();});var ti=y(ei=>{Object.defineProperty(ei,"__esModule",{value:true});ei.ERRORS=void 0;var cm;(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";})(cm||(ei.ERRORS=cm={}));});var hm=y(Na=>{Object.defineProperty(Na,"__esModule",{value:true});Na.verifyConfig=i_;var s_=ti();function i_(t){if(!t.target&&!t.router)throw new Error(s_.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING)}});var bt=y(ri=>{Object.defineProperty(ri,"__esModule",{value:true});ri.Debug=void 0;var n_=xa();ri.Debug=n_("http-proxy-middleware");});var dm=y(si=>{Object.defineProperty(si,"__esModule",{value:true});si.debugProxyErrorsPlugin=void 0;var o_=bt(),Ut=o_.Debug.extend("debug-proxy-errors-plugin"),a_=t=>{t.on("error",(e,r,s,i)=>{Ut(`http-proxy error event:
131
+ %O`,e);}),t.on("proxyReq",(e,r,s)=>{s.on("error",i=>{Ut(`Socket error in proxyReq event:
132
+ %O`,i);});}),t.on("proxyRes",(e,r,s)=>{s.on("close",()=>{s.writableEnded||(Ut("Destroying proxyRes in proxyRes close event"),e.destroy());});}),t.on("proxyReqWs",(e,r,s)=>{s.on("error",i=>{Ut(`Socket error in proxyReqWs event:
133
+ %O`,i);});}),t.on("open",e=>{e.on("error",r=>{Ut(`Socket error in open event:
134
+ %O`,r);});}),t.on("close",(e,r,s)=>{r.on("error",i=>{Ut(`Socket error in close event:
135
+ %O`,i);});}),t.on("econnreset",(e,r,s,i)=>{Ut(`http-proxy econnreset event:
136
+ %O`,e);});};si.debugProxyErrorsPlugin=a_;});var fm=y(Ha=>{Object.defineProperty(Ha,"__esModule",{value:true});Ha.getStatusCode=u_;function u_(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 pm=y(ii=>{Object.defineProperty(ii,"__esModule",{value:true});ii.errorResponsePlugin=void 0;var l_=fm();function c_(t){return t&&typeof t.writeHead=="function"}function h_(t){return t&&typeof t.write=="function"&&!("writeHead"in t)}var d_=(t,e)=>{t.on("error",(r,s,i,n)=>{if(!s&&!i)throw r;if(c_(i)){if(!i.headersSent){let a=(0, l_.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 h_(i)&&i.destroy();});};ii.errorResponsePlugin=d_;});var ni=y(qa=>{Object.defineProperty(qa,"__esModule",{value:true});qa.getLogger=p_;var f_={info:()=>{},warn:()=>{},error:()=>{}};function p_(t){return t.logger||f_}});var mm=y(La=>{Object.defineProperty(La,"__esModule",{value:true});La.getPort=m_;function m_(t){return Object.keys(t||{})?.[0]?.split(":")[1]}});var Dm=y(oi=>{Object.defineProperty(oi,"__esModule",{value:true});oi.loggerPlugin=void 0;var gm=N("url"),g_=ni(),D_=mm(),b_=(t,e)=>{let r=(0, g_.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,D_.getPort)(s.req?.agent?.sockets),c={protocol:s.req.protocol,host:s.req.host,pathname:s.req.path};a=new gm.URL(`${c.protocol}//${c.host}${c.pathname}`),l&&(a.port=l);}catch{a=new gm.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=b_;});var ai=y(ja=>{Object.defineProperty(ja,"__esModule",{value:true});ja.getFunctionName=y_;function y_(t){return t.name||"[anonymous Function]"}});var bm=y(ui=>{Object.defineProperty(ui,"__esModule",{value:true});ui.proxyEventsPlugin=void 0;var v_=bt(),C_=ai(),w_=v_.Debug.extend("proxy-events-plugin"),x_=(t,e)=>{Object.entries(e.on||{}).forEach(([r,s])=>{w_(`register event handler: "${r}" -> "${(0, C_.getFunctionName)(s)}"`),t.on(r,s);});};ui.proxyEventsPlugin=x_;});var Ga=y(et=>{var __=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)&&__(e,t,r);};Object.defineProperty(et,"__esModule",{value:true});li(dm(),et);li(pm(),et);li(Dm(),et);li(bm(),et);});var ym=y(Va=>{Object.defineProperty(Va,"__esModule",{value:true});Va.getPlugins=F_;var ci=Ga();function F_(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 Cm=y((DS,vm)=>{vm.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 _m=y((bS,xm)=>{var E_=Cm(),wm={"{":"}","(":")","[":"]"},A_=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=wm[a];if(u){var h=t.indexOf(u,e);h!==-1&&(e=h+1);}if(t[e]==="!")return true}else e++;}return false},O_=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=wm[r];if(s){var i=t.indexOf(s,e);i!==-1&&(e=i+1);}if(t[e]==="!")return true}else e++;}return false};xm.exports=function(e,r){if(typeof e!="string"||e==="")return false;if(E_(e))return true;var s=A_;return r&&r.strict===false&&(s=O_),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((vS,Em)=>{var Fm=hi();Em.exports=(t,e={})=>{let r=(s,i={})=>{let n=e.escapeInvalid&&Fm.isInvalidBrace(i),o=s.invalid===true&&e.escapeInvalid===true,a="";if(s.value)return (n||o)&&Fm.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 Om=y((CS,Am)=>{Am.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):false};});var Bm=y((wS,Mm)=>{var Rm=Om(),Wt=(t,e,r)=>{if(Rm(t)===false)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Rm(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(Wt.cache.hasOwnProperty(u))return Wt.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=Im(t)||Im(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=Sm(g,Math.abs(h),d,s),h=d.a=0;}return l>=0&&(f=Sm(h,l,d,s)),d.negatives=m,d.positives=f,d.result=R_(m,f),s.capture===true?d.result=`(${d.result})`:s.wrap!==false&&f.length+m.length>1&&(d.result=`(?:${d.result})`),Wt.cache[u]=d,d.result};function R_(t,e,r){let s=Ua(t,e,"-",false)||[],i=Ua(e,t,"",false)||[],n=Ua(t,e,"-?",true)||[];return s.concat(n).concat(i).join("|")}function S_(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=km(e+1,s)-1;t<i&&i<=e;)n.add(i),s+=1,i=km(e+1,s)-1;return n=[...n],n.sort(k_),n}function T_(t,e,r){if(t===e)return {pattern:t,count:[],digits:0};let s=P_(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+=$_(u,h):o++;}return o&&(n+=r.shorthand===true?"\\d":"[0-9]"),{pattern:n,count:[o],digits:i}}function Sm(t,e,r,s){let i=S_(t,e),n=[],o=t,a;for(let u=0;u<i.length;u++){let h=i[u],l=T_(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+$m(a.count),o=h+1;continue}r.isPadded&&(c=I_(h,r,s)),l.string=c+l.pattern+$m(l.count),n.push(l),o=h+1,a=l;}return n}function Ua(t,e,r,s,i){let n=[];for(let o of t){let{string:a}=o;!s&&!Tm(e,"string",a)&&n.push(r+a),s&&Tm(e,"string",a)&&n.push(r+a);}return n}function P_(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 Tm(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 km(t,e){return t-t%Math.pow(10,e)}function $m(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function $_(t,e,r){return `[${t}${e-t===1?"":"-"}${e}]`}function Im(t){return /^-?(0+)\d/.test(t)}function I_(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}}`}}Wt.cache={};Wt.clearCache=()=>Wt.cache={};Mm.exports=Wt;});var Ya=y((xS,Vm)=>{var M_=N("util"),Hm=Bm(),Nm=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),B_=t=>e=>t===true?Number(e):String(e),Wa=t=>typeof t=="number"||typeof t=="string"&&t!=="",Yr=t=>Number.isInteger(+t),Ka=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return false;for(;e[++r]==="0";);return r>0},N_=(t,e,r)=>typeof t=="string"||typeof e=="string"?true:r.stringify===true,H_=(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},q_=(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},qm=(t,e,r,s)=>{if(r)return Hm(t,e,{wrap:false,...s});let i=String.fromCharCode(t);if(t===e)return i;let n=String.fromCharCode(e);return `[${i}-${n}]`},Lm=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===true,i=r.capture?"":"?:";return s?`(${i}${t.join("|")})`:t.join("|")}return Hm(t,e,r)},jm=(...t)=>new RangeError("Invalid range arguments: "+M_.inspect(...t)),Gm=(t,e,r)=>{if(r.strictRanges===true)throw jm([t,e]);return []},L_=(t,e)=>{if(e.strictRanges===true)throw new TypeError(`Expected step "${t}" to be a number`);return []},j_=(t,e,r=1,s={})=>{let i=Number(t),n=Number(e);if(!Number.isInteger(i)||!Number.isInteger(n)){if(s.strictRanges===true)throw jm([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=Ka(a)||Ka(u)||Ka(h),c=l?Math.max(a.length,u.length,h.length):0,d=l===false&&N_(t,e,s)===false,f=s.transform||B_(d);if(s.toRegex&&r===1)return qm(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(H_(f(i,x),c,d)),i=o?i-r:i+r,x++;return s.toRegex===true?r>1?q_(m,s,c):Lm(D,null,{wrap:false,...s}):D},G_=(t,e,r=1,s={})=>{if(!Yr(t)&&t.length>1||!Yr(e)&&e.length>1)return Gm(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 qm(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?Lm(l,null,{wrap:false,options:s}):l},fi=(t,e,r,s={})=>{if(e==null&&Wa(t))return [t];if(!Wa(t)||!Wa(e))return Gm(t,e,s);if(typeof r=="function")return fi(t,e,1,{transform:r});if(Nm(r))return fi(t,e,0,r);let i={...s};return i.capture===true&&(i.wrap=true),r=r||i.step||1,Yr(r)?Yr(t)&&Yr(e)?j_(t,e,r,i):G_(t,e,Math.max(Math.abs(r),1),i):r!=null&&!Nm(r)?L_(r,i):fi(t,e,1,r)};Vm.exports=fi;});var Km=y((_S,Wm)=>{var V_=Ya(),Um=hi(),U_=(t,e={})=>{let r=(s,i={})=>{let n=Um.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=Um.reduce(s.nodes),c=V_(...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)};Wm.exports=U_;});var zm=y((FS,Jm)=>{var W_=Ya(),Ym=di(),pr=hi(),Kt=(t="",e="",r=false)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?pr.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let n of i)s.push(Kt(n,e,r));else for(let n of e)r===true&&typeof n=="string"&&(n=`{${n}}`),s.push(Array.isArray(n)?Kt(i,n,r):i+n);return pr.flatten(s)},K_=(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(Kt(a.pop(),Ym(i,e)));return}if(i.type==="brace"&&i.invalid!==true&&i.nodes.length===2){a.push(Kt(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let c=pr.reduce(i.nodes);if(pr.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=W_(...c,e);d.length===0&&(d=Ym(i,e)),a.push(Kt(a.pop(),d)),i.nodes=[];return}let u=pr.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(Kt(a.pop(),h,u));continue}if(d.value&&d.type!=="open"){h.push(Kt(h.pop(),d.value));continue}d.nodes&&s(d,i);}return h};return pr.flatten(s(t))};Jm.exports=K_;});var Zm=y((ES,Xm)=>{Xm.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 sg=y((AS,rg)=>{var Y_=di(),{MAX_LENGTH:Qm,CHAR_BACKSLASH:Ja,CHAR_BACKTICK:J_,CHAR_COMMA:z_,CHAR_DOT:X_,CHAR_LEFT_PARENTHESES:Z_,CHAR_RIGHT_PARENTHESES:Q_,CHAR_LEFT_CURLY_BRACE:eF,CHAR_RIGHT_CURLY_BRACE:tF,CHAR_LEFT_SQUARE_BRACKET:eg,CHAR_RIGHT_SQUARE_BRACKET:tg,CHAR_DOUBLE_QUOTE:rF,CHAR_SINGLE_QUOTE:sF,CHAR_NO_BREAK_SPACE:iF,CHAR_ZERO_WIDTH_NOBREAK_SPACE:nF}=Zm(),oF=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(Qm,r.maxLength):Qm;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===nF||d===iF)){if(d===Ja){m({type:"text",value:(e.keepEscaping?d:"")+f()});continue}if(d===tg){m({type:"text",value:"\\"+d});continue}if(d===eg){u++;let g;for(;l<h&&(g=f());){if(d+=g,g===eg){u++;continue}if(g===Ja){d+=f();continue}if(g===tg&&(u--,u===0))break}m({type:"text",value:d});continue}if(d===Z_){o=m({type:"paren",nodes:[]}),n.push(o),m({type:"text",value:d});continue}if(d===Q_){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===rF||d===sF||d===J_){let g=d,D;for(e.keepQuotes!==true&&(d="");l<h&&(D=f());){if(D===Ja){d+=D+f();continue}if(D===g){e.keepQuotes===true&&(d+=D);break}d+=D;}m({type:"text",value:d});continue}if(d===eF){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===tF){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===z_&&c>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:Y_(o)}];}m({type:"comma",value:d}),o.commas++;continue}if(d===X_&&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};rg.exports=oF;});var og=y((OS,ng)=>{var ig=di(),aF=Km(),uF=zm(),lF=sg(),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={})=>lF(t,e);Oe.stringify=(t,e={})=>ig(typeof t=="string"?Oe.parse(t,e):t,e);Oe.compile=(t,e={})=>(typeof t=="string"&&(t=Oe.parse(t,e)),aF(t,e));Oe.expand=(t,e={})=>{typeof t=="string"&&(t=Oe.parse(t,e));let r=uF(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);ng.exports=Oe;});var Jr=y((RS,hg)=>{var cF=N("path"),tt="\\\\/",ag=`[^${tt}]`,yt="\\.",hF="\\+",dF="\\?",mi="\\/",fF="(?=.)",ug="[^/]",za=`(?:${mi}|$)`,lg=`(?:^|${mi})`,Xa=`${yt}{1,2}${za}`,pF=`(?!${yt})`,mF=`(?!${lg}${Xa})`,gF=`(?!${yt}{0,1}${za})`,DF=`(?!${Xa})`,bF=`[^.${mi}]`,yF=`${ug}*?`,cg={DOT_LITERAL:yt,PLUS_LITERAL:hF,QMARK_LITERAL:dF,SLASH_LITERAL:mi,ONE_CHAR:fF,QMARK:ug,END_ANCHOR:za,DOTS_SLASH:Xa,NO_DOT:pF,NO_DOTS:mF,NO_DOT_SLASH:gF,NO_DOTS_SLASH:DF,QMARK_NO_DOT:bF,STAR:yF,START_ANCHOR:lg},vF={...cg,SLASH_LITERAL:`[${tt}]`,QMARK:ag,STAR:`${ag}*?`,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}]|$)`},CF={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"};hg.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:CF,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:cF.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?vF:cg}};});var zr=y(Fe=>{var wF=N("path"),xF=process.platform==="win32",{REGEX_BACKSLASH:_F,REGEX_REMOVE_BACKSLASH:FF,REGEX_SPECIAL_CHARS:EF,REGEX_SPECIAL_CHARS_GLOBAL:AF}=Jr();Fe.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Fe.hasRegexChars=t=>EF.test(t);Fe.isRegexChar=t=>t.length===1&&Fe.hasRegexChars(t);Fe.escapeRegex=t=>t.replace(AF,"\\$1");Fe.toPosixSlashes=t=>t.replace(_F,"/");Fe.removeBackslashes=t=>t.replace(FF,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:xF===true||wF.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 yg=y((TS,bg)=>{var dg=zr(),{CHAR_ASTERISK:Za,CHAR_AT:OF,CHAR_BACKWARD_SLASH:Xr,CHAR_COMMA:RF,CHAR_DOT:Qa,CHAR_EXCLAMATION_MARK:eu,CHAR_FORWARD_SLASH:Dg,CHAR_LEFT_CURLY_BRACE:tu,CHAR_LEFT_PARENTHESES:ru,CHAR_LEFT_SQUARE_BRACKET:SF,CHAR_PLUS:TF,CHAR_QUESTION_MARK:fg,CHAR_RIGHT_CURLY_BRACE:PF,CHAR_RIGHT_PARENTHESES:pg,CHAR_RIGHT_SQUARE_BRACKET:kF}=Jr(),mg=t=>t===Dg||t===Xr,gg=t=>{t.isPrefix!==true&&(t.depth=t.isGlobstar?1/0:1);},$F=(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,k,A,T={value:"",depth:0,isGlob:false},U=()=>h>=s,F=()=>u.charCodeAt(h+1),B=()=>(k=A,u.charCodeAt(++h));for(;h<s;){A=B();let G;if(A===Xr){b=T.backslashes=true,A=B(),A===tu&&(x=true);continue}if(x===true||A===tu){for(R++;U()!==true&&(A=B());){if(A===Xr){b=T.backslashes=true,B();continue}if(A===tu){R++;continue}if(x!==true&&A===Qa&&(A=B())===Qa){if(d=T.isBrace=true,m=T.isGlob=true,E=true,i===true)continue;break}if(x!==true&&A===RF){if(d=T.isBrace=true,m=T.isGlob=true,E=true,i===true)continue;break}if(A===PF&&(R--,R===0)){x=false,d=T.isBrace=true,E=true;break}}if(i===true)continue;break}if(A===Dg){if(n.push(h),o.push(T),T={value:"",depth:0,isGlob:false},E===true)continue;if(k===Qa&&h===l+1){l+=2;continue}c=h+1;continue}if(r.noext!==true&&(A===TF||A===OF||A===Za||A===fg||A===eu)===true&&F()===ru){if(m=T.isGlob=true,g=T.isExtglob=true,E=true,A===eu&&h===l&&(C=true),i===true){for(;U()!==true&&(A=B());){if(A===Xr){b=T.backslashes=true,A=B();continue}if(A===pg){m=T.isGlob=true,E=true;break}}continue}break}if(A===Za){if(k===Za&&(D=T.isGlobstar=true),m=T.isGlob=true,E=true,i===true)continue;break}if(A===fg){if(m=T.isGlob=true,E=true,i===true)continue;break}if(A===SF){for(;U()!==true&&(G=B());){if(G===Xr){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===eu&&h===l){v=T.negated=true,l++;continue}if(r.noparen!==true&&A===ru){if(m=T.isGlob=true,i===true){for(;U()!==true&&(A=B());){if(A===ru){b=T.backslashes=true,A=B();continue}if(A===pg){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&&mg(I.charCodeAt(I.length-1))&&(I=I.slice(0,-1)),r.unescape===true&&(_&&(_=dg.removeBackslashes(_)),I&&b===true&&(I=dg.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,mg(A)||o.push(T),w.tokens=o),r.parts===true||r.tokens===true){let G;for(let P=0;P<n.length;P++){let ne=G?G+1:l,ue=n[P],oe=t.slice(ne,ue);r.tokens&&(P===0&&l!==0?(o[P].isPrefix=true,o[P].value=ee):o[P].value=oe,gg(o[P]),w.maxDepth+=o[P].depth),(P!==0||oe!=="")&&a.push(oe),G=ue;}if(G&&G+1<t.length){let P=t.slice(G+1);a.push(P),r.tokens&&(o[o.length-1].value=P,gg(o[o.length-1]),w.maxDepth+=o[o.length-1].depth);}w.slashes=n,w.parts=a;}return w};bg.exports=$F;});var wg=y((PS,Cg)=>{var gi=Jr(),Re=zr(),{MAX_LENGTH:Di,POSIX_REGEX_SOURCE:IF,REGEX_NON_SPECIAL_CHARS:MF,REGEX_SPECIAL_CHARS_BACKREF:BF,REPLACEMENTS:vg}=gi,NF=(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},mr=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,su=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=vg[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,k=S=>`(${a}(?:(?!${R}${S.dot?g:c}).)*?)`,A=r.dot?"":D,T=r.dot?v:C,U=r.bash===true?k(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,P=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;},Qr=S=>{F.output+=S.output!=null?S.output:S.value,oe(S.value);},uD=()=>{let S=1;for(;P()==="!"&&(P(2)!=="("||P(3)==="?");)ne(),F.start++,S++;return S%2===0?false:(F.negated=true,F.start++,true)},es=S=>{F[S]++,ee.push(S);},At=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)&&Qr(S),_&&_.type==="text"&&S.type==="text"){_.value+=S.value,_.output=(_.output||"")+S.value;return}S.prev=_,o.push(S),_=S;},ts=(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;es("parens"),q({type:S,value:J,output:F.output?"":m}),q({type:"paren",extglob:true,value:ne(),output:H}),B.push(O);},lD=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=k(r)),(H!==U||G()||/^\)+$/.test(ue()))&&(J=S.close=`)$))${H}`),S.inner.includes("*")&&(O=ue())&&/^\.[^\\/.]+$/.test(O)){let te=su(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}),At("parens");};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let S=false,J=t.replace(BF,(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=P();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=IF[De];if(le){_.value=te+le,F.backtrack=true,ne(),!n.output&&o.indexOf(_)===1&&(n.output=m);continue}}}(w==="["&&P()!==":"||w==="-"&&P()==="]")&&(w=`\\${w}`),w==="]"&&(_.value==="["||_.value==="[^")&&(w=`\\${w}`),r.posix===true&&w==="!"&&_.value==="["&&(w="^"),_.value+=w,Qr({value:w});continue}if(F.quotes===1&&w!=='"'){w=Re.escapeRegex(w),_.value+=w,Qr({value:w});continue}if(w==='"'){F.quotes=F.quotes===1?0:1,r.keepQuotes===true&&q({type:"text",value:w});continue}if(w==="("){es("parens"),q({type:"paren",value:w});continue}if(w===")"){if(F.parens===0&&r.strictBrackets===true)throw new SyntaxError(mr("opening","("));let O=B[B.length-1];if(O&&F.parens===O.parens+1){lD(B.pop());continue}q({type:"paren",value:w,output:F.parens?")":"\\)"}),At("parens");continue}if(w==="["){if(r.nobracket===true||!ue().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true)throw new SyntaxError(mr("closing","]"));w=`\\${w}`;}else es("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(mr("opening","["));q({type:"text",value:w,output:`\\${w}`});continue}At("brackets");let O=_.value.slice(1);if(_.posix!==true&&O[0]==="^"&&!O.includes("/")&&(w=`/${w}`),_.value+=w,Qr({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){es("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=NF(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}),At("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&&P()==="("&&P(2)!=="?"){ts("qmark",w);continue}if(_&&_.type==="paren"){let H=P(),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&&P()==="("&&(P(2)!=="?"||!/[!=<:]/.test(P(3)))){ts("negate",w);continue}if(r.nonegate!==true&&F.index===0){uD();continue}}if(w==="+"){if(r.noextglob!==true&&P()==="("&&P(2)!=="?"){ts("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&&P()==="("&&P(2)!=="?"){q({type:"at",extglob:true,value:w,output:""});continue}q({type:"text",value:w});continue}if(w!=="*"){(w==="$"||w==="^")&&(w=`\\${w}`);let O=MF.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)){ts("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 rs=t[F.index+4];if(rs&&rs!=="/")break;S=S.slice(3),oe("/**",3);}if(O.type==="bos"&&G()){_.type="globstar",_.value+=w,_.output=k(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=k(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 rs=S[1]!==void 0?"|$":"";F.output=F.output.slice(0,-(O.output+_.output).length),O.output=`(?:${O.output}`,_.type="globstar",_.output=`${k(r)}${f}|${f}${rs})`,_.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}|${k(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=k(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),P()!=="*"&&(F.output+=m,_.output+=m)),q(J);}for(;F.brackets>0;){if(r.strictBrackets===true)throw new SyntaxError(mr("closing","]"));F.output=Re.escapeLast(F.output,"["),At("brackets");}for(;F.parens>0;){if(r.strictBrackets===true)throw new SyntaxError(mr("closing",")"));F.output=Re.escapeLast(F.output,"("),At("parens");}for(;F.braces>0;){if(r.strictBrackets===true)throw new SyntaxError(mr("closing","}"));F.output=Re.escapeLast(F.output,"{"),At("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};su.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=vg[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),k=E(R);return k&&r.strictSlashes!==true&&(k+=`${a}?`),k};Cg.exports=su;});var _g=y((kS,xg)=>{var HF=N("path"),qF=yg(),iu=wg(),nu=zr(),LF=Jr(),jF=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=jF(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=nu.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?nu.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=nu.isWindows(r))=>(e instanceof RegExp?e:ae.makeRe(e,r)).test(HF.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)):iu(t,{...e,fastpaths:false});ae.scan=(t,e)=>qF(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=iu.fastpaths(t,e)),i.output||(i=iu(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=LF;xg.exports=ae;});var Eg=y(($S,Fg)=>{Fg.exports=_g();});var Pg=y((IS,Tg)=>{var Og=N("util"),Rg=og(),rt=Eg(),ou=zr(),Ag=t=>t===""||t==="./",Sg=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: "${Og.inspect(t)}"`);if(Array.isArray(e))return e.some(s=>z.contains(t,s,r));if(typeof e=="string"){if(Ag(t)||Ag(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(!ou.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: "${Og.inspect(t)}"`);return [].concat(e).every(s=>rt(s,r)(t))};z.capture=(t,e,r)=>{let s=ou.isWindows(r),n=rt.makeRe(String(t),{...r,capture:true}).exec(s?ou.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 Rg(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||!Sg(t)?[t]:Rg(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=Sg;Tg.exports=z;});var Hg=y(uu=>{Object.defineProperty(uu,"__esModule",{value:true});uu.matchPathFilter=UF;var Mg=_m(),GF=Pg(),VF=N("url"),kg=ti();function UF(t="/",e,r){if($g(t))return Bg(t,e);if(Ig(t))return Ng(t,e);if(Array.isArray(t)){if(t.every($g))return KF(t,e);if(t.every(Ig))return WF(t,e);throw new Error(kg.ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY)}if(typeof t=="function"){let s=au(e);return t(s,r)}throw new Error(kg.ERRORS.ERR_CONTEXT_MATCHER_GENERIC)}function Bg(t,e){return au(e)?.indexOf(t)===0}function Ng(t,e){let r=au(e),s=GF([r],t);return s&&s.length>0}function WF(t,e){return Ng(t,e)}function KF(t,e){let r=false;for(let s of t)if(Bg(s,e)){r=true;break}return r}function au(t){return t&&VF.parse(t).pathname}function $g(t){return typeof t=="string"&&!Mg(t)}function Ig(t){return Mg(t)}});var cu=y(lu=>{Object.defineProperty(lu,"__esModule",{value:true});function qg(t){return Object.prototype.toString.call(t)==="[object Object]"}function YF(t){var e,r;return qg(t)===false?false:(e=t.constructor,e===void 0?true:(r=e.prototype,!(qg(r)===false||r.hasOwnProperty("isPrototypeOf")===false)))}lu.isPlainObject=YF;});var Gg=y(hu=>{Object.defineProperty(hu,"__esModule",{value:true});hu.createPathRewriter=XF;var Lg=cu(),JF=ti(),zF=bt(),jg=zF.Debug.extend("path-rewriter");function XF(t){let e;if(!ZF(t))return;if(typeof t=="function")return t;return e=QF(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),jg('rewriting path from "%s" to "%s"',s,i);break}return i}}function ZF(t){if(typeof t=="function")return true;if((0, Lg.isPlainObject)(t))return Object.keys(t).length!==0;if(t==null)return false;throw new Error(JF.ERRORS.ERR_PATH_REWRITER_CONFIG)}function QF(t){let e=[];if((0, Lg.isPlainObject)(t))for(let[r,s]of Object.entries(t))e.push({regex:new RegExp(r),value:s}),jg('rewrite rule created: "%s" ~> "%s"',r,s);return e}});var Ug=y(du=>{Object.defineProperty(du,"__esModule",{value:true});du.getTarget=rE;var eE=cu(),tE=bt(),Vg=tE.Debug.extend("router");async function rE(t,e){let r,s=e.router;return (0, eE.isPlainObject)(s)?r=sE(t,s):typeof s=="function"&&(r=await s(t)),r}function sE(t,e){let r,s=t.headers.host,i=t.url,n=s+i;for(let[o,a]of Object.entries(e))if(iE(o)){if(n.indexOf(o)>-1){r=a,Vg('match: "%s" -> "%s"',o,r);break}}else if(o===s){r=a,Vg('match: "%s" -> "%s"',s,r);break}return r}function iE(t){return t.indexOf("/")>-1}});var Wg=y(bi=>{Object.defineProperty(bi,"__esModule",{value:true});bi.HttpProxyMiddleware=void 0;var nE=lm(),oE=hm(),aE=ym(),uE=Hg(),lE=Gg(),cE=Ug(),st=bt(),hE=ai(),dE=ni(),fu=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,uE.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 cE.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, oE.verifyConfig)(e),this.proxyOptions=e,this.logger=(0, dE.getLogger)(e),(0, st.Debug)("create proxy server"),this.proxy=nE.createProxyServer({}),this.registerPlugins(this.proxy,this.proxyOptions),this.pathRewriter=lE.createPathRewriter(this.proxyOptions.pathRewrite),this.middleware.upgrade=(r,s,i)=>{this.wsInternalSubscribed||this.handleUpgrade(r,s,i);};}registerPlugins(e,r){(0, aE.getPlugins)(r).forEach(i=>{(0, st.Debug)(`register plugin: "${(0, hE.getFunctionName)(i)}"`),i(e,r);});}};bi.HttpProxyMiddleware=fu;});var mu=y(pu=>{Object.defineProperty(pu,"__esModule",{value:true});pu.createProxyMiddleware=pE;var fE=Wg();function pE(t){let{middleware:e}=new fE.HttpProxyMiddleware(t);return e}});var Kg=y(Du=>{Object.defineProperty(Du,"__esModule",{value:true});Du.responseInterceptor=DE;var gu=N("zlib"),mE=bt(),gE=ai(),gr=mE.Debug.extend("response-interceptor");function DE(t){return async function(r,s,i){gr("intercept proxy response");let n=r,o=Buffer.from("","utf8"),a=bE(r,r.headers["content-encoding"]);a.on("data",u=>o=Buffer.concat([o,u])),a.on("end",async()=>{yE(r,i),gr("call interceptor function: %s",(0, gE.getFunctionName)(t));let u=Buffer.from(await t(o,n,s,i));gr("set content-length: %s",Buffer.byteLength(u,"utf8")),i.setHeader("content-length",Buffer.byteLength(u,"utf8")),gr("write intercepted response"),i.write(u),i.end();}),a.on("error",u=>{i.end(`Error fetching proxied request: ${u.message}`);});}}function bE(t,e){let r=t,s;switch(e){case "gzip":s=gu.createGunzip();break;case "br":s=gu.createBrotliDecompress();break;case "deflate":s=gu.createInflate();break;}return s&&(gr("decompress proxy response with 'content-encoding': %s",e),r.pipe(s),r=s),r}function yE(t,e){if(gr("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 Yg=y(bu=>{Object.defineProperty(bu,"__esModule",{value:true});bu.fixRequestBody=CE;var vE=N("querystring");function CE(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(vE.stringify(r)):s.includes("multipart/form-data")&&i(wE(s,r));}function wE(t,e){let r=t.replace(/^.*boundary=(.*)$/,"$1"),s="";for(let[i,n]of Object.entries(e))s+=`--${r}\r
138
138
  Content-Disposition: form-data; name="${i}"\r
139
139
  \r
140
140
  ${n}\r
141
- `;return s}});var Mg=D(nr=>{Object.defineProperty(nr,"__esModule",{value:true});nr.fixRequestBody=nr.responseInterceptor=void 0;var iE=kg();Object.defineProperty(nr,"responseInterceptor",{enumerable:true,get:function(){return iE.responseInterceptor}});var nE=Ig();Object.defineProperty(nr,"fixRequestBody",{enumerable:true,get:function(){return nE.fixRequestBody}});});var Bg=D(Bt=>{var oE=Bt&&Bt.__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];}),uE=Bt&&Bt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&oE(e,t,r);};Object.defineProperty(Bt,"__esModule",{value:true});uE(Mg(),Bt);});var Hg=D(aa=>{Object.defineProperty(aa,"__esModule",{value:true});aa.legacyOptionsAdapter=dE;var aE=$("url"),lE=at(),cE=Ys(),Hr=lE.Debug.extend("legacy-options-adapter"),hE={onError:"error",onProxyReq:"proxyReq",onProxyRes:"proxyRes",onProxyReqWs:"proxyReqWs",onOpen:"open",onClose:"close"};function dE(t,e){let r={},s;if(typeof t=="string"&&aE.parse(t).host)throw new Error(`Shorthand syntax is removed from legacyCreateProxyMiddleware().
141
+ `;return s}});var Jg=y(Dr=>{Object.defineProperty(Dr,"__esModule",{value:true});Dr.fixRequestBody=Dr.responseInterceptor=void 0;var xE=Kg();Object.defineProperty(Dr,"responseInterceptor",{enumerable:true,get:function(){return xE.responseInterceptor}});var _E=Yg();Object.defineProperty(Dr,"fixRequestBody",{enumerable:true,get:function(){return _E.fixRequestBody}});});var zg=y(Yt=>{var FE=Yt&&Yt.__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];}),EE=Yt&&Yt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&FE(e,t,r);};Object.defineProperty(Yt,"__esModule",{value:true});EE(Jg(),Yt);});var Xg=y(vu=>{Object.defineProperty(vu,"__esModule",{value:true});vu.legacyOptionsAdapter=TE;var AE=N("url"),OE=bt(),RE=ni(),Zr=OE.Debug.extend("legacy-options-adapter"),SE={onError:"error",onProxyReq:"proxyReq",onProxyRes:"proxyRes",onProxyReqWs:"proxyReqWs",onOpen:"open",onClose:"close"};function TE(t,e){let r={},s;if(typeof t=="string"&&AE.parse(t).host)throw new Error(`Shorthand syntax is removed from legacyCreateProxyMiddleware().
142
142
  Please use "legacyCreateProxyMiddleware({ target: 'http://www.example.org' })" instead.
143
143
 
144
144
  More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-shorthand-usage
145
- `);t&&e?(Hr("map legacy context/filter to options.pathFilter"),r={...e,pathFilter:t},s=ua(r),s.warn(`[http-proxy-middleware] Legacy "context" argument is deprecated. Migrate your "context" to "options.pathFilter":
145
+ `);t&&e?(Zr("map legacy context/filter to options.pathFilter"),r={...e,pathFilter:t},s=yu(r),s.warn(`[http-proxy-middleware] Legacy "context" argument is deprecated. Migrate your "context" to "options.pathFilter":
146
146
 
147
147
  const options = {
148
148
  pathFilter: '${t}',
149
149
  }
150
150
 
151
151
  More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-context-argument
152
- `)):t&&!e?(r={...t},s=ua(r)):s=ua({}),Object.entries(hE).forEach(([o,u])=>{r[o]&&(r.on={...r.on},r.on[u]=r[o],Hr('map legacy event "%s" to "on.%s"',o,u),s.warn(`[http-proxy-middleware] Legacy "${o}" is deprecated. Migrate to "options.on.${u}":
152
+ `)):t&&!e?(r={...t},s=yu(r)):s=yu({}),Object.entries(SE).forEach(([o,a])=>{r[o]&&(r.on={...r.on},r.on[a]=r[o],Zr('map legacy event "%s" to "on.%s"',o,a),s.warn(`[http-proxy-middleware] Legacy "${o}" is deprecated. Migrate to "options.on.${a}":
153
153
 
154
154
  const options = {
155
155
  on: {
156
- ${u}: () => {},
156
+ ${a}: () => {},
157
157
  },
158
158
  }
159
159
 
160
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 Hr("legacy logLevel",n),Hr("legacy logProvider: %O",i),typeof n=="string"&&n!=="silent"&&(Hr('map "logProvider" to "logger"'),s.warn(`[http-proxy-middleware] Legacy "logLevel" and "logProvider" are deprecated. Migrate to "options.logger":
161
+ `));});let i=r.logProvider&&r.logProvider(),n=r.logLevel;return Zr("legacy logLevel",n),Zr("legacy logProvider: %O",i),typeof n=="string"&&n!=="silent"&&(Zr('map "logProvider" to "logger"'),s.warn(`[http-proxy-middleware] Legacy "logLevel" and "logProvider" are deprecated. Migrate to "options.logger":
162
162
 
163
163
  const options = {
164
164
  logger: console,
165
165
  }
166
166
 
167
167
  More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-logprovider-and-loglevel-options
168
- `)),r}function ua(t){let e=t.logProvider&&t.logProvider();return e&&(t.logger=e),(0, cE.getLogger)(t)}});var qg=D(la=>{Object.defineProperty(la,"__esModule",{value:true});la.legacyCreateProxyMiddleware=gE;var fE=sa(),pE=at(),mE=Hg(),Ng=pE.Debug.extend("legacy-create-proxy-middleware");function gE(t,e){Ng("init");let r=(0, mE.legacyOptionsAdapter)(t,e),s=(0, fE.createProxyMiddleware)(r);return Ng("add marker for patching req.url (old behavior)"),s.__LEGACY_HTTP_PROXY_MIDDLEWARE__=true,s}});var Lg=D(ai=>{Object.defineProperty(ai,"__esModule",{value:true});ai.legacyCreateProxyMiddleware=void 0;var DE=qg();Object.defineProperty(ai,"legacyCreateProxyMiddleware",{enumerable:true,get:function(){return DE.legacyCreateProxyMiddleware}});});var jg=D(Ht=>{var bE=Ht&&Ht.__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];}),yE=Ht&&Ht.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bE(e,t,r);};Object.defineProperty(Ht,"__esModule",{value:true});yE(Lg(),Ht);});var Gg=D(ze=>{var vE=ze&&ze.__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=ze&&ze.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&vE(e,t,r);};Object.defineProperty(ze,"__esModule",{value:true});li(sa(),ze);li(Bg(),ze);li(Tu(),ze);li(jg(),ze);});var wa=be(_a()),{program:ME,createCommand:BE,createArgument:HE,createOption:NE,CommanderError:qE,InvalidArgumentError:LE,InvalidOptionArgumentError:jE,Command:Be,Argument:GE,Option:VE,Help:UE}=wa.default;var Rs=be(Nt()),iu=be(br());function Po(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vn={},Un,id;function Re(){if(id)return Un;id=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:a(0,0),bold:a(1,22),dim:a(2,22),italic:a(3,23),underline:a(4,24),inverse:a(7,27),hidden:a(8,28),strikethrough:a(9,29),black:a(30,39),red:a(31,39),green:a(32,39),yellow:a(33,39),blue:a(34,39),magenta:a(35,39),cyan:a(36,39),white:a(37,39),gray:a(90,39),grey:a(90,39),bgBlack:a(40,49),bgRed:a(41,49),bgGreen:a(42,49),bgYellow:a(43,49),bgBlue:a(44,49),bgMagenta:a(45,49),bgCyan:a(46,49),bgWhite:a(47,49)};function o(h,l){let c=0,d,f="",p="";for(;c<h.length;c++)d=h[c],f+=d.open,p+=d.close,~l.indexOf(d.close)&&(l=l.replace(d.rgx,d.close+d.open));return f+l+p}function u(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 a(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?u([h],[c]):n.enabled?o([c],d+""):d+""}}return Un=n,Un}var Wn,nd;function Ly(){return nd||(nd=1,Wn=(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}}),Wn}var Kn,od;function $o(){return od||(od=1,Kn=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}),Kn}var Yn,ud;function Se(){if(ud)return Yn;ud=1;let t="\x1B",e=`${t}[`,r="\x07",s={to(o,u){return u?`${e}${u+1};${o+1}H`:`${e}${o+1}G`},move(o,u){let a="";return o<0?a+=`${e}${-o}D`:o>0&&(a+=`${e}${o}C`),u<0?a+=`${e}${-u}A`:u>0&&(a+=`${e}${u}B`),a},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 u="";for(let a=0;a<o;a++)u+=this.line+(a<o-1?s.up():"");return o&&(u+=s.left),u}};return Yn={cursor:s,scroll:i,erase:n,beep:r},Yn}var Jn,ad;function jy(){if(ad)return Jn;ad=1;let t=$o(),{erase:e,cursor:r}=Se(),s=i=>[...t(i)].length;return Jn=function(i,n){if(!n)return e.line+r.to(0);let o=0,u=i.split(/\r?\n/);for(let a of u)o+=1+Math.floor(Math.max(s(a)-1,0)/n);return e.lines(o)},Jn}var zn,ld;function ef(){if(ld)return zn;ld=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 zn=process.platform==="win32"?e:t,zn}var Xn,cd;function Gy(){if(cd)return Xn;cd=1;let t=Re(),e=ef(),r=Object.freeze({password:{scale:1,render:a=>"*".repeat(a.length)},emoji:{scale:2,render:a=>"\u{1F603}".repeat(a.length)},invisible:{scale:0,render:a=>""},default:{scale:1,render:a=>`${a}`}}),s=a=>r[a]||r.default,i=Object.freeze({aborted:t.red(e.cross),done:t.green(e.tick),exited:t.yellow(e.cross),default:t.cyan("?")});return Xn={styles:r,render:s,symbols:i,symbol:(a,h,l)=>h?i.aborted:l?i.exited:a?i.done:i.default,delimiter:a=>t.gray(a?e.ellipsis:e.pointerSmall),item:(a,h)=>t.gray(a?h?e.pointerSmall:"+":e.line)},Xn}var Zn,hd;function Vy(){if(hd)return Zn;hd=1;let t=$o();return Zn=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},Zn}var Qn,dd;function Uy(){return dd||(dd=1,Qn=(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(`
168
+ `)),r}function yu(t){let e=t.logProvider&&t.logProvider();return e&&(t.logger=e),(0, RE.getLogger)(t)}});var Qg=y(Cu=>{Object.defineProperty(Cu,"__esModule",{value:true});Cu.legacyCreateProxyMiddleware=IE;var PE=mu(),kE=bt(),$E=Xg(),Zg=kE.Debug.extend("legacy-create-proxy-middleware");function IE(t,e){Zg("init");let r=(0, $E.legacyOptionsAdapter)(t,e),s=(0, PE.createProxyMiddleware)(r);return Zg("add marker for patching req.url (old behavior)"),s.__LEGACY_HTTP_PROXY_MIDDLEWARE__=true,s}});var eD=y(yi=>{Object.defineProperty(yi,"__esModule",{value:true});yi.legacyCreateProxyMiddleware=void 0;var ME=Qg();Object.defineProperty(yi,"legacyCreateProxyMiddleware",{enumerable:true,get:function(){return ME.legacyCreateProxyMiddleware}});});var tD=y(Jt=>{var BE=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];}),NE=Jt&&Jt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&BE(e,t,r);};Object.defineProperty(Jt,"__esModule",{value:true});NE(eD(),Jt);});var rD=y(it=>{var HE=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)&&HE(e,t,r);};Object.defineProperty(it,"__esModule",{value:true});vi(mu(),it);vi(zg(),it);vi(Ga(),it);vi(tD(),it);});var Mu=be(Iu()),{program:t1,createCommand:r1,createArgument:s1,createOption:i1,CommanderError:n1,InvalidArgumentError:o1,InvalidOptionArgumentError:a1,Command:Te,Argument:u1,Option:l1,Help:c1}=Mu.default;var Ns=be(Ot()),qr=be(er());function Go(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var to={},ro,gd;function He(){if(gd)return ro;gd=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,Dd;function ev(){return Dd||(Dd=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,bd;function Vo(){return bd||(bd=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,yd;function qe(){if(yd)return no;yd=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,vd;function tv(){if(vd)return oo;vd=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,Cd;function ff(){if(Cd)return ao;Cd=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,wd;function rv(){if(wd)return uo;wd=1;let t=He(),e=ff(),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,xd;function sv(){if(xd)return lo;xd=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,_d;function iv(){return _d||(_d=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
169
  `)).join(`
170
- `)}),Qn}var eo,fd;function Wy(){return fd||(fd=1,eo=(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}}),eo}var to,pd;function Ve(){return pd||(pd=1,to={action:Ly(),clear:jy(),style:Gy(),strip:$o(),figures:ef(),lines:Vy(),wrap:Uy(),entriesToDisplay:Wy()}),to}var ro,md;function gt(){if(md)return ro;md=1;let t=Xd__default.default,{action:e}=Ve(),r=Ey__default.default,{beep:s,cursor:i}=Se(),n=Re();class o extends r{constructor(a={}){super(),this.firstRender=true,this.in=a.stdin||process.stdin,this.out=a.stdout||process.stdout,this.onRender=(a.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 p=e(f,l);p===false?this._&&this._(d,f):typeof this[p]=="function"?this[p](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 ro=o,ro}var so,gd;function Ky(){if(gd)return so;gd=1;let t=Re(),e=gt(),{erase:r,cursor:s}=Se(),{style:i,clear:n,lines:o,figures:u}=Ve();class a 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(`
170
+ `)}),co}var ho,Fd;function nv(){return Fd||(Fd=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,Ed;function Ze(){return Ed||(Ed=1,fo={action:ev(),clear:tv(),style:rv(),strip:Vo(),figures:ff(),lines:sv(),wrap:iv(),entriesToDisplay:nv()}),fo}var po,Ad;function Ft(){if(Ad)return po;Ad=1;let t=cf__default.default,{action:e}=Ze(),r=Hy__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,Od;function ov(){if(Od)return mo;Od=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
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
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
173
  `).reduce((l,c,d)=>l+`
174
- ${d?" ":u.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 so=a,so}var io,Dd;function Yy(){if(Dd)return io;Dd=1;let t=Re(),e=gt(),{style:r,clear:s,figures:i,wrap:n,entriesToDisplay:o}=Ve(),{cursor:u}=Se();class a 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(`
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,Rd;function av(){if(Rd)return go;Rd=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
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(u.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,p,m="",g=this.choices[d];d===l&&l>0?p=i.arrowUp:d===c-1&&c<this.choices.length?p=i.arrowDown:p=" ",g.disabled?(f=this.cursor===d?t.gray().underline(g.title):t.strikethrough().gray(g.title),p=(this.cursor===d?t.bold().gray(i.pointer)+" ":" ")+p):(f=this.cursor===d?t.cyan().underline(g.title):g.title,p=(this.cursor===d?t.cyan(i.pointer)+" ":" ")+p,g.description&&this.cursor===d&&(m=` - ${g.description}`,(p.length+f.length+m.length>=this.out.columns||g.description.split(/\r?\n/).length>1)&&(m=`
178
- `+n(g.description,{margin:3,width:this.out.columns})))),this.outputText+=`${p} ${f}${t.gray(m)}
179
- `;}}this.out.write(this.outputText);}}return io=a,io}var no,bd;function Jy(){if(bd)return no;bd=1;let t=Re(),e=gt(),{style:r,clear:s}=Ve(),{cursor:i,erase:n}=Se();class o extends e{constructor(a={}){super(a),this.msg=a.message,this.value=!!a.initial,this.active=a.active||"on",this.inactive=a.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(`
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,Sd;function uv(){if(Sd)return Do;Sd=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
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();}_(a,h){if(a===" ")this.value=!this.value;else if(a==="1")this.value=true;else if(a==="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 no=o,no}var oo,yd;function nt(){if(yd)return oo;yd=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 oo=t,oo}var uo,vd;function zy(){if(vd)return uo;vd=1;let t=nt();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 uo=e,uo}var ao,Cd;function Xy(){if(Cd)return ao;Cd=1;let t=nt(),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 ao=r,ao}var lo,xd;function Zy(){if(xd)return lo;xd=1;let t=nt();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 lo=e,lo}var co,_d;function Qy(){if(_d)return co;_d=1;let t=nt();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 co=e,co}var ho,wd;function ev(){if(wd)return ho;wd=1;let t=nt();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 ho=e,ho}var fo,Fd;function tv(){if(Fd)return fo;Fd=1;let t=nt();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 fo=e,fo}var po,Ed;function rv(){if(Ed)return po;Ed=1;let t=nt();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 po=e,po}var mo,Ad;function sv(){if(Ad)return mo;Ad=1;let t=nt();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 mo=e,mo}var go,Od;function iv(){return Od||(Od=1,go={DatePart:nt(),Meridiem:zy(),Day:Xy(),Hours:Zy(),Milliseconds:Qy(),Minutes:ev(),Month:tv(),Seconds:rv(),Year:sv()}),go}var Do,Rd;function nv(){if(Rd)return Do;Rd=1;let t=Re(),e=gt(),{style:r,clear:s,figures:i}=Ve(),{erase:n,cursor:o}=Se(),{DatePart:u,Meridiem:a,Day:h,Hours:l,Milliseconds:c,Minutes:d,Month:f,Seconds:p,Year:m}=iv(),g=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,y={1:({token:F})=>F.replace(/\\(.)/g,"$1"),2:F=>new h(F),3:F=>new f(F),4:F=>new m(F),5:F=>new a(F),6:F=>new l(F),7:F=>new d(F),8:F=>new p(F),9:F=>new c(F)},v={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 _ extends e{constructor(E={}){super(E),this.msg=E.message,this.cursor=0,this.typed="",this.locales=Object.assign(v,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 S;for(this.parts=[];S=g.exec(E);){let O=S.shift(),P=S.findIndex(te=>te!=null);this.parts.push(P in y?y[P]({token:S[P]||O,date:this.date,parts:this.parts,locales:this.locales}):S[P]||O);}let T=this.parts.reduce((O,P)=>(typeof P=="string"&&typeof O[O.length-1]=="string"?O[O.length-1]+=P:O.push(P),O),[]);this.parts.splice(0),this.parts.push(...T),this.reset();}moveCursor(E){this.typed="",this.cursor=E,this.fire();}reset(){this.moveCursor(this.parts.findIndex(E=>E instanceof u)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=true,this.error=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,Td;function ft(){if(Td)return bo;Td=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 lv(){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,kd;function cv(){if(kd)return vo;kd=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,$d;function hv(){if($d)return Co;$d=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,Id;function dv(){if(Id)return wo;Id=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,Md;function fv(){if(Md)return xo;Md=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,Bd;function pv(){if(Bd)return _o;Bd=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,Nd;function mv(){if(Nd)return Fo;Nd=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,Hd;function gv(){if(Hd)return Eo;Hd=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,qd;function Dv(){return qd||(qd=1,Ao={DatePart:ft(),Meridiem:lv(),Day:cv(),Hours:hv(),Milliseconds:dv(),Minutes:fv(),Month:pv(),Seconds:mv(),Year:gv()}),Ao}var Oo,Ld;function bv(){if(Ld)return Oo;Ld=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}=Dv(),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 k=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(...k),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
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(S=>S instanceof u)),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,S,T)=>E.concat(T===this.cursor&&!this.done?t.cyan().underline(S.toString()):S),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
184
- `).reduce((E,S,T)=>E+`
185
- ${T?" ":i.pointerSmall} ${t.red().italic(S)}`,"")),this.out.write(n.line+o.to(0)+this.outputText));}}return Do=_,Do}var bo,Sd;function ov(){if(Sd)return bo;Sd=1;let t=Re(),e=gt(),{cursor:r,erase:s}=Se(),{style:i,figures:n,clear:o,lines:u}=Ve(),a=/[0-9]/,h=d=>d!==void 0,l=(d,f)=>{let p=Math.pow(10,f);return Math.round(d*p)/p};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||a.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(`
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,k)=>E.concat(k===this.cursor&&!this.done?t.cyan().underline(R.toString()):R),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
184
+ `).reduce((E,R,k)=>E+`
185
+ ${k?" ":i.pointerSmall} ${t.red().italic(R)}`,"")),this.out.write(n.line+o.to(0)+this.outputText));}}return Oo=v,Oo}var Ro,jd;function yv(){if(jd)return Ro;jd=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
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,p){if(!this.valid(f))return this.bell();let m=Date.now();if(m-this.lastHit>1e3&&(this.typed=""),this.typed+=f,this.lastHit=m,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(u(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,p,m)=>f+`
189
- ${m?" ":n.pointerSmall} ${t.red().italic(p)}`,"")),this.out.write(s.line+r.to(0)+this.outputText+r.save+this.outputError+r.restore));}}return bo=c,bo}var yo,Td;function tf(){if(Td)return yo;Td=1;let t=Re(),{cursor:e}=Se(),r=gt(),{clear:s,figures:i,style:n,wrap:o,entriesToDisplay:u}=Ve();class a 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(`
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,Gd;function pf(){if(Gd)return So;Gd=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
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
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
192
  Instructions:
193
193
  ${i.arrowUp}/${i.arrowDown}: Highlight option
194
194
  ${i.arrowLeft}/${i.arrowRight}/[space]: Toggle selection
195
195
  `+(this.maxChoices===void 0?` a: Toggle all
196
- `:"")+" enter/return: Complete answer":""}renderOption(l,c,d,f){let p=(c.selected?t.green(i.radioOn):i.radioOff)+" "+f+" ",m,g;return c.disabled?m=l===d?t.gray().underline(c.title):t.strikethrough().gray(c.title):(m=l===d?t.cyan().underline(c.title):c.title,l===d&&c.description&&(g=` - ${c.description}`,(p.length+m.length+g.length>=this.out.columns||c.description.split(/\r?\n/).length>1)&&(g=`
197
- `+o(c.description,{margin:p.length,width:this.out.columns})))),p+m+t.gray(g||"")}paginateOptions(l){if(l.length===0)return t.red("No matches for this query.");let{startIndex:c,endIndex:d}=u(this.cursor,l.length,this.optionsPerPage),f,p=[];for(let m=c;m<d;m++)m===c&&c>0?f=i.arrowUp:m===d-1&&d<l.length?f=i.arrowDown:f=" ",p.push(this.renderOption(this.cursor,l[m],m,f));return `
198
- `+p.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 yo=a,yo}var vo,Pd;function uv(){if(Pd)return vo;Pd=1;let t=Re(),e=gt(),{erase:r,cursor:s}=Se(),{style:i,clear:n,figures:o,wrap:u,entriesToDisplay:a}=Ve(),h=(f,p)=>f[p]&&(f[p].value||f[p].title||f[p]),l=(f,p)=>f[p]&&(f[p].title||f[p].value||f[p]),c=(f,p)=>{let m=f.findIndex(g=>g.value===p||g.title===p);return m>-1?m:void 0};class d extends e{constructor(p={}){super(p),this.msg=p.message,this.suggest=p.suggest,this.choices=p.choices,this.initial=typeof p.initial=="number"?p.initial:c(p.choices,p.initial),this.select=this.initial||p.cursor||0,this.i18n={noMatches:p.noMatches||"no matches found"},this.fallback=p.fallback||this.initial,this.clearFirst=p.clearFirst||false,this.suggestions=[],this.input="",this.limit=p.limit||10,this.cursor=0,this.transform=i.render(p.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(p){this._fb=Number.isSafeInteger(parseInt(p))?parseInt(p):p;}get fallback(){let p;return typeof this._fb=="number"?p=this.choices[this._fb]:typeof this._fb=="string"&&(p={title:this._fb}),p||this._fb||{title:this.i18n.noMatches}}moveSelect(p){this.select=p,this.suggestions.length>0?this.value=h(this.suggestions,p):this.value=this.fallback.value,this.fire();}async complete(p){let m=this.completing=this.suggest(this.input,this.choices),g=await m;if(this.completing!==m)return;this.suggestions=g.map((v,_,F)=>({title:l(F,_),value:h(F,_),description:v.description})),this.completing=false;let y=Math.max(g.length-1,0);this.moveSelect(Math.min(y,this.select)),p&&p();}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(`
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,Vd;function vv(){if(Vd)return To;Vd=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
200
  `),this.close());}abort(){this.done=this.aborted=true,this.exited=false,this.fire(),this.render(),this.out.write(`
201
201
  `),this.close();}submit(){this.done=true,this.aborted=this.exited=false,this.fire(),this.render(),this.out.write(`
202
- `),this.close();}_(p,m){let g=this.input.slice(0,this.cursor),y=this.input.slice(this.cursor);this.input=`${g}${p}${y}`,this.cursor=g.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let p=this.input.slice(0,this.cursor-1),m=this.input.slice(this.cursor);this.input=`${p}${m}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let p=this.input.slice(0,this.cursor),m=this.input.slice(this.cursor+1);this.input=`${p}${m}`,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(p,m,g,y){let v,_=g?o.arrowUp:y?o.arrowDown:" ",F=m?t.cyan().underline(p.title):p.title;return _=(m?t.cyan(o.pointer)+" ":" ")+_,p.description&&(v=` - ${p.description}`,(_.length+F.length+v.length>=this.out.columns||p.description.split(/\r?\n/).length>1)&&(v=`
203
- `+u(p.description,{margin:3,width:this.out.columns}))),_+" "+F+t.gray(v||"")}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:p,endIndex:m}=a(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 g=this.suggestions.slice(p,m).map((y,v)=>this.renderOption(y,this.select===v+p,v===0&&p>0,v+p===m-1&&m<this.choices.length)).join(`
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
204
  `);this.outputText+=`
205
- `+(g||t.gray(this.fallback.title));}this.out.write(r.line+s.to(0)+this.outputText);}}return vo=d,vo}var Co,$d;function av(){if($d)return Co;$d=1;let t=Re(),{cursor:e}=Se(),r=tf(),{clear:s,style:i,figures:n}=Ve();class o extends r{constructor(a={}){a.overrideRender=true,super(a),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(a=>a.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 a=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===a);this.cursor=h<0?0:h,this.render();}handleSpaceToggle(){let a=this.filteredOptions[this.cursor];if(a.selected)a.selected=false,this.render();else {if(a.disabled||this.value.filter(h=>h.selected).length>=this.maxChoices)return this.bell();a.selected=true,this.render();}}handleInputChange(a){this.inputValue=this.inputValue+a,this.updateFilteredOptions();}_(a,h){a===" "?this.handleSpaceToggle():this.handleInputChange(a);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
205
+ `+(D||t.gray(this.fallback.title));}this.out.write(r.line+s.to(0)+this.outputText);}}return To=d,To}var Po,Ud;function Cv(){if(Ud)return Po;Ud=1;let t=He(),{cursor:e}=qe(),r=pf(),{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
206
  Instructions:
207
207
  ${n.arrowUp}/${n.arrowDown}: Highlight option
208
208
  ${n.arrowLeft}/${n.arrowRight}/[space]: Toggle selection
@@ -210,30 +210,31 @@ Instructions:
210
210
  enter/return: Complete answer
211
211
  `:""}renderCurrentInput(){return `
212
212
  Filtered results for: ${this.inputValue?this.inputValue:t.gray("Enter something to filter")}
213
- `}renderOption(a,h,l,c){let d=(h.selected?t.green(n.radioOn):n.radioOff)+" "+c+" ",f;return h.disabled?f=a===l?t.gray().underline(h.title):t.strikethrough().gray(h.title):f=a===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 a=[t.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&a.push(t.yellow(this.warn)),a.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(e.hide),super.render();let a=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(false),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(a+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=false),a+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+a),this.clear=s(a,this.out.columns);}}return Co=o,Co}var xo,kd;function lv(){if(kd)return xo;kd=1;let t=Re(),e=gt(),{style:r,clear:s}=Ve(),{erase:i,cursor:n}=Se();class o extends e{constructor(a={}){super(a),this.msg=a.message,this.value=a.initial,this.initialValue=!!a.initial,this.yesMsg=a.yes||"yes",this.yesOption=a.yesOption||"(Y/n)",this.noMsg=a.no||"no",this.noOption=a.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(`
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 Po=o,Po}var ko,Wd;function wv(){if(Wd)return ko;Wd=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
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();}_(a,h){return a.toLowerCase()==="y"?(this.value=true,this.submit()):a.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 xo=o,xo}var _o,Id;function cv(){return Id||(Id=1,_o={TextPrompt:Ky(),SelectPrompt:Yy(),TogglePrompt:Jy(),DatePrompt:nv(),NumberPrompt:ov(),MultiselectPrompt:tf(),AutocompletePrompt:uv(),AutocompleteMultiselectPrompt:av(),ConfirmPrompt:lv()}),_o}var Md;function hv(){return Md||(Md=1,function(t){let e=t,r=cv(),s=o=>o;function i(o,u,a={}){return new Promise((h,l)=>{let c=new r[o](u),d=a.onAbort||s,f=a.onSubmit||s,p=a.onExit||s;c.on("state",u.onState||s),c.on("submit",m=>h(f(m))),c.on("exit",m=>h(p(m))),c.on("abort",m=>l(d(m)));})}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 u=o.separator||",";return i("TextPrompt",o,{onSubmit:a=>a.split(u).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 u=a=>a.filter(h=>h.selected).map(h=>h.value);return i("MultiselectPrompt",o,{onAbort:u,onSubmit:u})},e.autocompleteMultiselect=o=>{o.choices=[].concat(o.choices||[]);let u=a=>a.filter(h=>h.selected).map(h=>h.value);return i("AutocompleteMultiselectPrompt",o,{onAbort:u,onSubmit:u})};let n=(o,u)=>Promise.resolve(u.filter(a=>a.title.slice(0,o.length).toLowerCase()===o.toLowerCase()));e.autocomplete=o=>(o.suggest=o.suggest||n,o.choices=[].concat(o.choices||[]),i("AutocompletePrompt",o));}(Vn)),Vn}var wo,Bd;function dv(){if(Bd)return wo;Bd=1;let t=hv(),e=["suggest","format","onState","validate","onRender","type"],r=()=>{};async function s(u=[],{onSubmit:a=r,onCancel:h=r}={}){let l={},c=s._override||{};u=[].concat(u);let d,f,p,m,g,y,v=async(_,F,E=false)=>{if(!(!E&&_.validate&&_.validate(F)!==true))return _.format?await _.format(F,l):F};for(f of u)if({name:m,type:g}=f,typeof g=="function"&&(g=await g(d,{...l},f),f.type=g),!!g){for(let _ in f){if(e.includes(_))continue;let F=f[_];f[_]=typeof F=="function"?await F(d,{...l},y):F;}if(y=f,typeof f.message!="string")throw new Error("prompt message is required");if({name:m,type:g}=f,t[g]===void 0)throw new Error(`prompt type (${g}) is not defined`);if(c[f.name]!==void 0&&(d=await v(f,c[f.name]),d!==void 0)){l[m]=d;continue}try{d=s._injected?i(s._injected,f.initial):await t[g](f),l[m]=d=await v(f,d,!0),p=await a(f,d,l);}catch{p=!await h(f,l);}if(p)return l}return l}function i(u,a){let h=u.shift();if(h instanceof Error)throw h;return h===void 0?a:h}function n(u){s._injected=(s._injected||[]).concat(u);}function o(u){s._override=Object.assign({},u);}return wo=Object.assign(s,{prompt:s,prompts:t,inject:n,override:o}),wo}var Fo,Hd;function fv(){return Hd||(Hd=1,Fo=dv()),Fo}var pv=fv(),mv=Po(pv);var nf=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],To={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},of={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 xv(t={}){let{cwd:e,onUnknown:r}=t;for(let s of _v(e)){for(let n of Object.keys(To))if(await uf(Ft__default.default.join(s,n))){let o=To[n],u=await qd(Ft__default.default.join(s,"package.json"),r);return u||{name:o,agent:o}}let i=await qd(Ft__default.default.join(s,"package.json"),r);if(i)return i}return null}function*_v(t=ke__default.default.cwd()){let e=Ft__default.default.resolve(t),{root:r}=Ft__default.default.parse(e);for(;e&&e!==r;)yield e,e=Ft__default.default.dirname(e);}async function qd(t,e){return !t||!await uf(t)?null:wv(t,e)}function wv(t,e){try{let r=JSON.parse(Zd__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}):nf.includes(i)?(s=i,{name:i,agent:s,version:o}):e?.(r.packageManager)??null}}catch{}return null}async function uf(t){try{if((await Qd__default.default.stat(t)).isFile())return !0}catch{}return false}var j="\x1B[",yr="\x1B]",Ut="\x07",hs=";",af=process.env.TERM_PROGRAM==="Apple_Terminal",B={};B.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?j+(t+1)+"G":j+(e+1)+";"+(t+1)+"H"};B.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=j+-t+"D":t>0&&(r+=j+t+"C"),e<0?r+=j+-e+"A":e>0&&(r+=j+e+"B"),r};B.cursorUp=(t=1)=>j+t+"A";B.cursorDown=(t=1)=>j+t+"B";B.cursorForward=(t=1)=>j+t+"C";B.cursorBackward=(t=1)=>j+t+"D";B.cursorLeft=j+"G";B.cursorSavePosition=af?"\x1B7":j+"s";B.cursorRestorePosition=af?"\x1B8":j+"u";B.cursorGetPosition=j+"6n";B.cursorNextLine=j+"E";B.cursorPrevLine=j+"F";B.cursorHide=j+"?25l";B.cursorShow=j+"?25h";B.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=B.eraseLine+(r<t-1?B.cursorUp():"");return t&&(e+=B.cursorLeft),e};B.eraseEndLine=j+"K";B.eraseStartLine=j+"1K";B.eraseLine=j+"2K";B.eraseDown=j+"J";B.eraseUp=j+"1J";B.eraseScreen=j+"2J";B.scrollUp=j+"S";B.scrollDown=j+"T";B.clearScreen="\x1Bc";B.clearTerminal=process.platform==="win32"?`${B.eraseScreen}${j}0f`:`${B.eraseScreen}${j}3J${j}H`;B.beep=Ut;B.link=(t,e)=>[yr,"8",hs,hs,e,Ut,t,yr,"8",hs,hs,Ut].join("");B.image=(t,e={})=>{let r=`${yr}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")+Ut};B.iTerm={setCwd:(t=process.cwd())=>`${yr}50;CurrentDir=${t}${Ut}`,annotation:(t,e={})=>{let r=`${yr}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+Ut}};var Eo,Ld;function lf(){return Ld||(Ld=1,Eo=(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)}),Eo}var Ao,jd;function Fv(){if(jd)return Ao;jd=1;let t=My__default.default,e=bf__default.default,r=lf(),{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(a){return a===0?false:{level:a,hasBasic:true,has256:a>=2,has16m:a>=3}}function o(a,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(a&&!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 u(a){let h=o(a,a&&a.isTTY);return n(h)}return Ao={supportsColor:u,stdout:n(o(true,e.isatty(1))),stderr:n(o(true,e.isatty(2)))},Ao}var Oo,Gd;function Ev(){if(Gd)return Oo;Gd=1;let t=Fv(),e=lf();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 Oo={supportsHyperlink:s,stdout:s(process.stdout),stderr:s(process.stderr)},Oo}var Av=Ev(),ko=Po(Av);function vr(t,e,{target:r="stdout",...s}={}){return ko[r]?B.link(t,e):s.fallback===false?t:typeof s.fallback=="function"?s.fallback(t,e):`${t} (\u200B${e}\u200B)`}vr.isSupported=ko.stdout;vr.stderr=(t,e,r={})=>vr(t,e,{target:"stderr",...r});vr.stderr.isSupported=ko.stderr;var Vt=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))),Ov=Object.create,cf=Object.defineProperty,Rv=Object.getOwnPropertyDescriptor,Sv=Object.getOwnPropertyNames,Tv=Object.getPrototypeOf,Pv=Object.prototype.hasOwnProperty,Dt=(t=>typeof Vt<"u"?Vt:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof Vt<"u"?Vt:e)[r]}):t)(function(t){if(typeof Vt<"u")return Vt.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),ye=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$v=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Sv(e))!Pv.call(t,i)&&i!==r&&cf(t,i,{get:()=>e[i],enumerable:!(s=Rv(e,i))||s.enumerable});return t},kv=(t,e,r)=>(r=t!=null?Ov(Tv(t)):{},$v(cf(r,"default",{value:t,enumerable:true}),t)),Iv=ye((t,e)=>{e.exports=n,n.sync=o;var r=Dt("fs");function s(u,a){var h=a.pathExt!==void 0?a.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&&u.substr(-c.length).toLowerCase()===c)return true}return false}function i(u,a,h){return !u.isSymbolicLink()&&!u.isFile()?false:s(a,h)}function n(u,a,h){r.stat(u,function(l,c){h(l,l?false:i(c,u,a));});}function o(u,a){return i(r.statSync(u),u,a)}}),Mv=ye((t,e)=>{e.exports=s,s.sync=i;var r=Dt("fs");function s(u,a,h){r.stat(u,function(l,c){h(l,l?false:n(c,a));});}function i(u,a){return n(r.statSync(u),a)}function n(u,a){return u.isFile()&&o(u,a)}function o(u,a){var h=u.mode,l=u.uid,c=u.gid,d=a.uid!==void 0?a.uid:process.getuid&&process.getuid(),f=a.gid!==void 0?a.gid:process.getgid&&process.getgid(),p=parseInt("100",8),m=parseInt("010",8),g=parseInt("001",8),y=p|m,v=h&g||h&m&&c===f||h&p&&l===d||h&y&&d===0;return v}}),Bv=ye((t,e)=>{Dt("fs");var r;process.platform==="win32"||global.TESTING_WINDOWS?r=Iv():r=Mv(),e.exports=s,s.sync=i;function s(n,o,u){if(typeof o=="function"&&(u=o,o={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(a,h){s(n,o||{},function(l,c){l?h(l):a(c);});})}r(n,o||{},function(a,h){a&&(a.code==="EACCES"||o&&o.ignoreErrors)&&(a=null,h=false),u(a,h);});}function i(n,o){try{return r.sync(n,o||{})}catch(u){if(o&&o.ignoreErrors||u.code==="EACCES")return false;throw u}}}),Hv=ye((t,e)=>{var r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",s=Dt("path"),i=r?";":":",n=Bv(),o=l=>Object.assign(new Error(`not found: ${l}`),{code:"ENOENT"}),u=(l,c)=>{let d=c.colon||i,f=l.match(/\//)||r&&l.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(c.path||process.env.PATH||"").split(d)],p=r?c.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",m=r?p.split(d):[""];return r&&l.indexOf(".")!==-1&&m[0]!==""&&m.unshift(""),{pathEnv:f,pathExt:m,pathExtExe:p}},a=(l,c,d)=>{typeof c=="function"&&(d=c,c={}),c||(c={});let{pathEnv:f,pathExt:p,pathExtExe:m}=u(l,c),g=[],y=_=>new Promise((F,E)=>{if(_===f.length)return c.all&&g.length?F(g):E(o(l));let S=f[_],T=/^".*"$/.test(S)?S.slice(1,-1):S,O=s.join(T,l),P=!T&&/^\.[\\\/]/.test(l)?l.slice(0,2)+O:O;F(v(P,_,0));}),v=(_,F,E)=>new Promise((S,T)=>{if(E===p.length)return S(y(F+1));let O=p[E];n(_+O,{pathExt:m},(P,te)=>{if(!P&&te)if(c.all)g.push(_+O);else return S(_+O);return S(v(_,F,E+1))});});return d?y(0).then(_=>d(null,_),d):y(0)},h=(l,c)=>{c=c||{};let{pathEnv:d,pathExt:f,pathExtExe:p}=u(l,c),m=[];for(let g=0;g<d.length;g++){let y=d[g],v=/^".*"$/.test(y)?y.slice(1,-1):y,_=s.join(v,l),F=!v&&/^\.[\\\/]/.test(l)?l.slice(0,2)+_:_;for(let E=0;E<f.length;E++){let S=F+f[E];try{if(n.sync(S,{pathExt:p}))if(c.all)m.push(S);else return S}catch{}}}if(c.all&&m.length)return m;if(c.nothrow)return null;throw o(l)};e.exports=a,a.sync=h;}),Nv=ye((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;}),qv=ye((t,e)=>{var r=Dt("path"),s=Hv(),i=Nv();function n(u,a){let h=u.options.env||process.env,l=process.cwd(),c=u.options.cwd!=null,d=c&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(u.options.cwd);}catch{}let f;try{f=s.sync(u.command,{path:h[i({env:h})],pathExt:a?r.delimiter:void 0});}catch{}finally{d&&process.chdir(l);}return f&&(f=r.resolve(c?u.options.cwd:"",f)),f}function o(u){return n(u)||n(u,true)}e.exports=o;}),Lv=ye((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;}),jv=ye((t,e)=>{e.exports=/^#!(.*)/;}),Gv=ye((t,e)=>{var r=jv();e.exports=(s="")=>{let i=s.match(r);if(!i)return null;let[n,o]=i[0].replace(/#! ?/,"").split(" "),u=n.split("/").pop();return u==="env"?o:o?`${u} ${o}`:u};}),Vv=ye((t,e)=>{var r=Dt("fs"),s=Gv();function i(n){let o=Buffer.alloc(150),u;try{u=r.openSync(n,"r"),r.readSync(u,o,0,150,0),r.closeSync(u);}catch{}return s(o.toString())}e.exports=i;}),Uv=ye((t,e)=>{var r=Dt("path"),s=qv(),i=Lv(),n=Vv(),o=process.platform==="win32",u=/\.(?:com|exe)$/i,a=/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),p=!u.test(f);if(d.options.forceShell||p){let m=a.test(f);d.command=r.normalize(d.command),d.command=i.command(d.command),d.args=d.args.map(y=>i.argument(y,m));let g=[d.command].concat(d.args).join(" ");d.args=["/d","/s","/c",`"${g}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=true;}return d}function c(d,f,p){f&&!Array.isArray(f)&&(p=f,f=null),f=f?f.slice(0):[],p=Object.assign({},p);let m={command:d,args:f,options:p,file:void 0,original:{command:d,args:f}};return p.shell?m:l(m)}e.exports=c;}),Wv=ye((t,e)=>{var r=process.platform==="win32";function s(u,a){return Object.assign(new Error(`${a} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${a} ${u.command}`,path:u.command,spawnargs:u.args})}function i(u,a){if(!r)return;let h=u.emit;u.emit=function(l,c){if(l==="exit"){let d=n(c,a);if(d)return h.call(u,"error",d)}return h.apply(u,arguments)};}function n(u,a){return r&&u===1&&!a.file?s(a.original,"spawn"):null}function o(u,a){return r&&u===1&&!a.file?s(a.original,"spawnSync"):null}e.exports={hookChildProcess:i,verifyENOENT:n,verifyENOENTSync:o,notFoundError:s};}),Kv=ye((t,e)=>{var r=Dt("child_process"),s=Uv(),i=Wv();function n(u,a,h){let l=s(u,a,h),c=r.spawn(l.command,l.args,l.options);return i.hookChildProcess(c,l),c}function o(u,a,h){let l=s(u,a,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;}),Yv=/^path$/i,Vd={key:"PATH",value:""};function Jv(t){for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||!Yv.test(e))continue;let r=t[e];return r?{key:e,value:r}:Vd}return Vd}function zv(t,e){let r=e.value.split(Ft.delimiter),s=t,i;do r.push(Ft.resolve(s,"node_modules",".bin")),i=s,s=Ft.dirname(s);while(s!==i);return {key:e.key,value:r.join(Ft.delimiter)}}function Xv(t,e){let r={...process.env,...e},s=zv(t,Jv(r));return r[s.key]=s.value,r}var Zv=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},Qv=kv(Kv()),Ud=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;}},eC={timeout:void 0,persist:false},tC={windowsHide:true};function rC(t,e){return {command:Ft.normalize(t),args:e??[]}}function sC(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 iC=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={...eC,...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 nC(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=Zv(e),s=Xd__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 Ud(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 Ud(this,s);return s}then(t,e){return this._waitForOutput().then(t,e)}_streamOut;_streamErr;spawn(){let t=ke.cwd(),e=this._options,r={...tC,...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=sC(s)),r.env=Xv(t,r.env);let{command:i,args:n}=rC(this._command,this._args),o=(0, Qv._parse)(i,n,r),u=child_process.spawn(o.command,o.args,o.options);if(u.stderr&&(this._streamErr=u.stderr),u.stdout&&(this._streamOut=u.stdout),this._process=u,u.once("error",this._onError),u.once("close",this._onClose),e.stdin!==void 0&&u.stdin&&e.stdin.process){let{stdout:a}=e.stdin.process;a&&a.pipe(u.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();}},hf=(t,e,r)=>{let s=new iC(t,e,r);return s.spawn(),s},nC=hf;var Oe={},_t={},Wd;function oC(){if(Wd)return _t;Wd=1,Object.defineProperty(_t,"__esModule",{value:true}),_t.sync=_t.isexe=void 0;let t=Zd__default.default,e=Qd__default.default,r=async(o,u={})=>{let{ignoreErrors:a=false}=u;try{return i(await(0,e.stat)(o),u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};_t.isexe=r;let s=(o,u={})=>{let{ignoreErrors:a=false}=u;try{return i((0,t.statSync)(o),u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};_t.sync=s;let i=(o,u)=>o.isFile()&&n(o,u),n=(o,u)=>{let a=u.uid??process.getuid?.(),h=u.groups??process.getgroups?.()??[],l=u.gid??process.getgid?.()??h[0];if(a===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,p=o.gid,m=parseInt("100",8),g=parseInt("010",8),y=parseInt("001",8),v=m|g;return !!(d&y||d&g&&c.has(p)||d&m&&f===a||d&v&&a===0)};return _t}var wt={},Kd;function uC(){if(Kd)return wt;Kd=1,Object.defineProperty(wt,"__esModule",{value:true}),wt.sync=wt.isexe=void 0;let t=Zd__default.default,e=Qd__default.default,r=async(o,u={})=>{let{ignoreErrors:a=false}=u;try{return n(await(0,e.stat)(o),o,u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};wt.isexe=r;let s=(o,u={})=>{let{ignoreErrors:a=false}=u;try{return n((0,t.statSync)(o),o,u)}catch(h){let l=h;if(a||l.code==="EACCES")return false;throw l}};wt.sync=s;let i=(o,u)=>{let{pathExt:a=process.env.PATHEXT||""}=u,h=a.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,u,a)=>o.isFile()&&i(u,a);return wt}var Ro={},Yd;function aC(){return Yd||(Yd=1,Object.defineProperty(Ro,"__esModule",{value:true})),Ro}var Jd;function lC(){return Jd||(Jd=1,function(t){var e=Oe&&Oe.__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=Oe&&Oe.__setModuleDefault||(Object.create?function(h,l){Object.defineProperty(h,"default",{enumerable:true,value:l});}:function(h,l){h.default=l;}),s=Oe&&Oe.__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=Oe&&Oe.__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(oC());t.posix=n;let o=s(uC());t.win32=o,i(aC(),t);let a=(process.env._ISEXE_TEST_PLATFORM_||process.platform)==="win32"?o:n;t.isexe=a.isexe,t.sync=a.sync;}(Oe)),Oe}var So,zd;function cC(){if(zd)return So;zd=1;let{isexe:t,sync:e}=lC(),{join:r,delimiter:s,sep:i,posix:n}=Ft__default.default,o=process.platform==="win32",u=new RegExp(`[${n.sep}${i===n.sep?"":i}]`.replace(/(\\)/g,"\\$1")),a=new RegExp(`^\\.${u.source}`),h=p=>Object.assign(new Error(`not found: ${p}`),{code:"ENOENT"}),l=(p,{path:m=process.env.PATH,pathExt:g=process.env.PATHEXT,delimiter:y=s})=>{let v=p.match(u)?[""]:[...o?[process.cwd()]:[],...(m||"").split(y)];if(o){let _=g||[".EXE",".CMD",".BAT",".COM"].join(y),F=_.split(y).flatMap(E=>[E,E.toLowerCase()]);return p.includes(".")&&F[0]!==""&&F.unshift(""),{pathEnv:v,pathExt:F,pathExtExe:_}}return {pathEnv:v,pathExt:[""]}},c=(p,m)=>{let g=/^".*"$/.test(p)?p.slice(1,-1):p;return (!g&&a.test(m)?m.slice(0,2):"")+r(g,m)},d=async(p,m={})=>{let{pathEnv:g,pathExt:y,pathExtExe:v}=l(p,m),_=[];for(let F of g){let E=c(F,p);for(let S of y){let T=E+S;if(await t(T,{pathExt:v,ignoreErrors:true})){if(!m.all)return T;_.push(T);}}}if(m.all&&_.length)return _;if(m.nothrow)return null;throw h(p)},f=(p,m={})=>{let{pathEnv:g,pathExt:y,pathExtExe:v}=l(p,m),_=[];for(let F of g){let E=c(F,p);for(let S of y){let T=E+S;if(e(T,{pathExt:v,ignoreErrors:true})){if(!m.all)return T;_.push(T);}}}if(m.all&&_.length)return _;if(m.nothrow)return null;throw h(p)};return So=d,d.sync=f,So}var hC=cC(),dC=Po(hC);Ft.join(My__default.default.tmpdir(),"antfu-ni");function df(t){return dC.sync(t,{nothrow:true})!==null}async function Io({autoInstall:t,programmatic:e,cwd:r}={}){let{name:s,agent:i,version:n}=await xv({cwd:r,onUnknown:o=>{e||console.warn("[ni] Unknown packageManager:",o);}})||{};if(s&&!df(s)&&!e){if(!t){console.warn(`[ni] Detected ${s} but it doesn't seem to be installed.
216
- `),ke__default.default.env.CI&&ke__default.default.exit(1);let o=vr(s,of[s]),{tryInstall:u}=await mv({name:"tryInstall",type:"confirm",message:`Would you like to globally install ${o}?`});u||ke__default.default.exit(1);}await hf("npm",["i","-g",`${s}${n?`@${n}`:""}`],{nodeOptions:{stdio:"inherit",cwd:r},throwOnError:true});}return i}ke__default.default.env.NI_CONFIG_FILE;var pC=ke__default.default.platform==="win32"?ke__default.default.env.USERPROFILE:ke__default.default.env.HOME;Ft__default.default.join(pC||"~/",".nirc");var DC=async t=>{let e=await Io({cwd:t});return e&&["npm","yarn","pnpm","bun"].includes(e)?e:"npm"},ff=t=>{let e=Ft.join(t,"package.json");if(!Zd.existsSync(e))return "unknown";try{let r=JSON.parse(Zd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return s.next?"next":s.vite?"vite":s.webpack?"webpack":"unknown"}catch{return "unknown"}},bC=t=>{let e=Zd.existsSync(Ft.join(t,"app")),r=Zd.existsSync(Ft.join(t,"src","app")),s=Zd.existsSync(Ft.join(t,"pages")),i=Zd.existsSync(Ft.join(t,"src","pages"));return e||r?"app":s||i?"pages":"unknown"},yC=t=>{if(Zd.existsSync(Ft.join(t,"pnpm-workspace.yaml"))||Zd.existsSync(Ft.join(t,"lerna.json")))return true;let e=Ft.join(t,"package.json");if(Zd.existsSync(e))try{if(JSON.parse(Zd.readFileSync(e,"utf-8")).workspaces)return !0}catch{return false}return false},vC=t=>{let e=[],r=Ft.join(t,"pnpm-workspace.yaml");if(Zd.existsSync(r)){let o=Zd.readFileSync(r,"utf-8").split(`
217
- `),u=false;for(let a of o){if(a.match(/^packages:\s*$/)){u=true;continue}if(u){if(a.match(/^[a-zA-Z]/)||a.trim()===""){a.match(/^[a-zA-Z]/)&&(u=false);continue}let h=a.match(/^\s*-\s*['"]?([^'"#\n]+?)['"]?\s*$/);h&&e.push(h[1].trim());}}}let s=Ft.join(t,"lerna.json");if(Zd.existsSync(s))try{let n=JSON.parse(Zd.readFileSync(s,"utf-8"));Array.isArray(n.packages)&&e.push(...n.packages);}catch{}let i=Ft.join(t,"package.json");if(Zd.existsSync(i))try{let n=JSON.parse(Zd.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)]},CC=(t,e)=>{let r=[],s=e.replace(/\/\*$/,""),i=Ft.join(t,s);if(!Zd.existsSync(i))return r;try{let n=Zd.readdirSync(i,{withFileTypes:!0});for(let o of n)if(o.isDirectory()){let u=Ft.join(i,o.name,"package.json");Zd.existsSync(u)&&r.push(Ft.join(i,o.name));}}catch{return r}return r},xC=t=>{let e=Ft.join(t,"package.json");if(!Zd.existsSync(e))return false;try{let r=JSON.parse(Zd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return !!(s.react||s["react-dom"])}catch{return false}},pf=t=>{let e=vC(t),r=[];for(let s of e){let i=CC(t,s);for(let n of i){let o=ff(n),u=xC(n);if(u||o!=="unknown"){let a=Ft.join(n,"package.json"),h=Ft.basename(n);try{h=JSON.parse(Zd.readFileSync(a,"utf-8")).name||h;}catch{}r.push({name:h,path:n,framework:o,hasReact:u});}}}return r},_C=t=>{if(!Zd.existsSync(t))return false;try{let e=Zd.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}},wC=t=>{let e=Ft.join(t,"package.json");if(Zd.existsSync(e))try{let s=JSON.parse(Zd.readFileSync(e,"utf-8"));if({...s.dependencies,...s.devDependencies}["react-grab"])return !0}catch{}return [Ft.join(t,"app","layout.tsx"),Ft.join(t,"app","layout.jsx"),Ft.join(t,"src","app","layout.tsx"),Ft.join(t,"src","app","layout.jsx"),Ft.join(t,"pages","_document.tsx"),Ft.join(t,"pages","_document.jsx"),Ft.join(t,"instrumentation-client.ts"),Ft.join(t,"instrumentation-client.js"),Ft.join(t,"src","instrumentation-client.ts"),Ft.join(t,"src","instrumentation-client.js"),Ft.join(t,"index.html"),Ft.join(t,"public","index.html"),Ft.join(t,"src","index.tsx"),Ft.join(t,"src","index.ts"),Ft.join(t,"src","main.tsx"),Ft.join(t,"src","main.ts")].some(_C)},FC=["@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"],EC=t=>{let e=Ft.join(t,"package.json");if(!Zd.existsSync(e))return null;try{let r=JSON.parse(Zd.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}},AC=t=>{let e=Ft.join(t,"package.json");if(!Zd.existsSync(e))return [];try{let r=JSON.parse(Zd.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return FC.filter(i=>!!s[i]).map(i=>i.replace("@react-grab/",""))}catch{return []}};var Et=async(t=process.cwd())=>{let e=ff(t);return {packageManager:await DC(t),framework:e,nextRouterType:e==="next"?bC(t):"unknown",isMonorepo:yC(t),projectRoot:t,hasReactGrab:wC(t),installedAgents:AC(t),unsupportedFramework:EC(t)}};var OC="\x1B[31m",RC="\x1B[32m",ds="\x1B[90m",At="\x1B[0m",SC="\x1B[1m",TC=(t,e)=>{let r=t.split(`
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 ko=o,ko}var $o,Kd;function xv(){return Kd||(Kd=1,$o={TextPrompt:ov(),SelectPrompt:av(),TogglePrompt:uv(),DatePrompt:bv(),NumberPrompt:yv(),MultiselectPrompt:pf(),AutocompletePrompt:vv(),AutocompleteMultiselectPrompt:Cv(),ConfirmPrompt:wv()}),$o}var Yd;function _v(){return Yd||(Yd=1,function(t){let e=t,r=xv(),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,Jd;function Fv(){if(Jd)return Io;Jd=1;let t=_v(),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,zd;function Ev(){return zd||(zd=1,Mo=Fv()),Mo}var Av=Ev(),Ov=Go(Av);var Df=["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"},bf={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 Iv(t={}){let{cwd:e,onUnknown:r}=t;for(let s of Mv(e)){for(let n of Object.keys(jo))if(await yf(kt__default.default.join(s,n))){let o=jo[n],a=await Zd(kt__default.default.join(s,"package.json"),r);return a||{name:o,agent:o}}let i=await Zd(kt__default.default.join(s,"package.json"),r);if(i)return i}return null}function*Mv(t=Ve__default.default.cwd()){let e=kt__default.default.resolve(t),{root:r}=kt__default.default.parse(e);for(;e&&e!==r;)yield e,e=kt__default.default.dirname(e);}async function Zd(t,e){return !t||!await yf(t)?null:Bv(t,e)}function Bv(t,e){try{let r=JSON.parse(hf__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}):Df.includes(i)?(s=i,{name:i,agent:s,version:o}):e?.(r.packageManager)??null}}catch{}return null}async function yf(t){try{if((await df__default.default.stat(t)).isFile())return !0}catch{}return false}var K="\x1B[",Tr="\x1B]",rr="\x07",_s=";",vf=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=vf?"\x1B7":K+"s";L.cursorRestorePosition=vf?"\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=rr;L.link=(t,e)=>[Tr,"8",_s,_s,e,rr,t,Tr,"8",_s,_s,rr].join("");L.image=(t,e={})=>{let r=`${Tr}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")+rr};L.iTerm={setCwd:(t=process.cwd())=>`${Tr}50;CurrentDir=${t}${rr}`,annotation:(t,e={})=>{let r=`${Tr}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+rr}};var Bo,Qd;function Cf(){return Qd||(Qd=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,ef;function Nv(){if(ef)return No;ef=1;let t=Jy__default.default,e=Tf__default.default,r=Cf(),{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,tf;function Hv(){if(tf)return Ho;tf=1;let t=Nv(),e=Cf();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 qv=Hv(),Uo=Go(qv);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 tr=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))),Lv=Object.create,wf=Object.defineProperty,jv=Object.getOwnPropertyDescriptor,Gv=Object.getOwnPropertyNames,Vv=Object.getPrototypeOf,Uv=Object.prototype.hasOwnProperty,Et=(t=>typeof tr<"u"?tr:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof tr<"u"?tr:e)[r]}):t)(function(t){if(typeof tr<"u")return tr.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Wv=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Gv(e))!Uv.call(t,i)&&i!==r&&wf(t,i,{get:()=>e[i],enumerable:!(s=jv(e,i))||s.enumerable});return t},Kv=(t,e,r)=>(r=t!=null?Lv(Vv(t)):{},Wv(wf(r,"default",{value:t,enumerable:true}),t)),Yv=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)}}),Jv=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}}),zv=Ee((t,e)=>{Et("fs");var r;process.platform==="win32"||global.TESTING_WINDOWS?r=Yv():r=Jv(),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}}}),Xv=Ee((t,e)=>{var r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",s=Et("path"),i=r?";":":",n=zv(),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],k=/^".*"$/.test(R)?R.slice(1,-1):R,A=s.join(k,l),T=!k&&/^\.[\\\/]/.test(l)?l.slice(0,2)+A:A;C(b(T,v,0));}),b=(v,C,E)=>new Promise((R,k)=>{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;}),Zv=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;}),Qv=Ee((t,e)=>{var r=Et("path"),s=Xv(),i=Zv();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;}),eC=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;}),tC=Ee((t,e)=>{e.exports=/^#!(.*)/;}),rC=Ee((t,e)=>{var r=tC();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};}),sC=Ee((t,e)=>{var r=Et("fs"),s=rC();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;}),iC=Ee((t,e)=>{var r=Et("path"),s=Qv(),i=eC(),n=sC(),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;}),nC=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};}),oC=Ee((t,e)=>{var r=Et("child_process"),s=iC(),i=nC();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;}),aC=/^path$/i,rf={key:"PATH",value:""};function uC(t){for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||!aC.test(e))continue;let r=t[e];return r?{key:e,value:r}:rf}return rf}function lC(t,e){let r=e.value.split(kt.delimiter),s=t,i;do r.push(kt.resolve(s,"node_modules",".bin")),i=s,s=kt.dirname(s);while(s!==i);return {key:e.key,value:r.join(kt.delimiter)}}function cC(t,e){let r={...process.env,...e},s=lC(t,uC(r));return r[s.key]=s.value,r}var hC=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},dC=Kv(oC()),sf=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;}},fC={timeout:void 0,persist:false},pC={windowsHide:true};function mC(t,e){return {command:kt.normalize(t),args:e??[]}}function gC(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 DC=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={...fC,...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 bC(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=hC(e),s=cf__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 sf(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 sf(this,s);return s}then(t,e){return this._waitForOutput().then(t,e)}_streamOut;_streamErr;spawn(){let t=Ve.cwd(),e=this._options,r={...pC,...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=gC(s)),r.env=cC(t,r.env);let{command:i,args:n}=mC(this._command,this._args),o=(0, dC._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();}},xf=(t,e,r)=>{let s=new DC(t,e,r);return s.spawn(),s},bC=xf;var Ne={},Tt={},nf;function yC(){if(nf)return Tt;nf=1,Object.defineProperty(Tt,"__esModule",{value:true}),Tt.sync=Tt.isexe=void 0;let t=hf__default.default,e=df__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}};Tt.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}};Tt.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 Tt}var Pt={},of;function vC(){if(of)return Pt;of=1,Object.defineProperty(Pt,"__esModule",{value:true}),Pt.sync=Pt.isexe=void 0;let t=hf__default.default,e=df__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={},af;function CC(){return af||(af=1,Object.defineProperty(qo,"__esModule",{value:true})),qo}var uf;function wC(){return uf||(uf=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(yC());t.posix=n;let o=s(vC());t.win32=o,i(CC(),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,lf;function xC(){if(lf)return Lo;lf=1;let{isexe:t,sync:e}=wC(),{join:r,delimiter:s,sep:i,posix:n}=kt__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 k=E+R;if(await t(k,{pathExt:b,ignoreErrors:true})){if(!g.all)return k;v.push(k);}}}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 k=E+R;if(e(k,{pathExt:b,ignoreErrors:true})){if(!g.all)return k;v.push(k);}}}if(g.all&&v.length)return v;if(g.nothrow)return null;throw h(m)};return Lo=d,d.sync=f,Lo}var _C=xC(),FC=Go(_C);kt.join(Jy__default.default.tmpdir(),"antfu-ni");function _f(t){return FC.sync(t,{nothrow:true})!==null}async function Wo({autoInstall:t,programmatic:e,cwd:r}={}){let{name:s,agent:i,version:n}=await Iv({cwd:r,onUnknown:o=>{e||console.warn("[ni] Unknown packageManager:",o);}})||{};if(s&&!_f(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,bf[s]),{tryInstall:a}=await Ov({name:"tryInstall",type:"confirm",message:`Would you like to globally install ${o}?`});a||Ve__default.default.exit(1);}await xf("npm",["i","-g",`${s}${n?`@${n}`:""}`],{nodeOptions:{stdio:"inherit",cwd:r},throwOnError:true});}return i}Ve__default.default.env.NI_CONFIG_FILE;var AC=Ve__default.default.platform==="win32"?Ve__default.default.env.USERPROFILE:Ve__default.default.env.HOME;kt__default.default.join(AC||"~/",".nirc");var SC=async t=>{let e=await Wo({cwd:t});return e&&["npm","yarn","pnpm","bun"].includes(e)?e:"npm"},Ff=t=>{let e=kt.join(t,"package.json");if(!hf.existsSync(e))return "unknown";try{let r=JSON.parse(hf.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return s.next?"next":s.vite?"vite":s.webpack?"webpack":"unknown"}catch{return "unknown"}},TC=t=>{let e=hf.existsSync(kt.join(t,"app")),r=hf.existsSync(kt.join(t,"src","app")),s=hf.existsSync(kt.join(t,"pages")),i=hf.existsSync(kt.join(t,"src","pages"));return e||r?"app":s||i?"pages":"unknown"},PC=t=>{if(hf.existsSync(kt.join(t,"pnpm-workspace.yaml"))||hf.existsSync(kt.join(t,"lerna.json")))return true;let e=kt.join(t,"package.json");if(hf.existsSync(e))try{if(JSON.parse(hf.readFileSync(e,"utf-8")).workspaces)return !0}catch{return false}return false},kC=t=>{let e=[],r=kt.join(t,"pnpm-workspace.yaml");if(hf.existsSync(r)){let o=hf.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=kt.join(t,"lerna.json");if(hf.existsSync(s))try{let n=JSON.parse(hf.readFileSync(s,"utf-8"));Array.isArray(n.packages)&&e.push(...n.packages);}catch{}let i=kt.join(t,"package.json");if(hf.existsSync(i))try{let n=JSON.parse(hf.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)]},$C=(t,e)=>{let r=[],s=e.replace(/\/\*$/,""),i=kt.join(t,s);if(!hf.existsSync(i))return r;try{let n=hf.readdirSync(i,{withFileTypes:!0});for(let o of n)if(o.isDirectory()){let a=kt.join(i,o.name,"package.json");hf.existsSync(a)&&r.push(kt.join(i,o.name));}}catch{return r}return r},IC=t=>{let e=kt.join(t,"package.json");if(!hf.existsSync(e))return false;try{let r=JSON.parse(hf.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return !!(s.react||s["react-dom"])}catch{return false}},Ef=t=>{let e=kC(t),r=[];for(let s of e){let i=$C(t,s);for(let n of i){let o=Ff(n),a=IC(n);if(a||o!=="unknown"){let u=kt.join(n,"package.json"),h=kt.basename(n);try{h=JSON.parse(hf.readFileSync(u,"utf-8")).name||h;}catch{}r.push({name:h,path:n,framework:o,hasReact:a});}}}return r},MC=t=>{if(!hf.existsSync(t))return false;try{let e=hf.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}},BC=t=>{let e=kt.join(t,"package.json");if(hf.existsSync(e))try{let s=JSON.parse(hf.readFileSync(e,"utf-8"));if({...s.dependencies,...s.devDependencies}["react-grab"])return !0}catch{}return [kt.join(t,"app","layout.tsx"),kt.join(t,"app","layout.jsx"),kt.join(t,"src","app","layout.tsx"),kt.join(t,"src","app","layout.jsx"),kt.join(t,"pages","_document.tsx"),kt.join(t,"pages","_document.jsx"),kt.join(t,"instrumentation-client.ts"),kt.join(t,"instrumentation-client.js"),kt.join(t,"src","instrumentation-client.ts"),kt.join(t,"src","instrumentation-client.js"),kt.join(t,"index.html"),kt.join(t,"public","index.html"),kt.join(t,"src","index.tsx"),kt.join(t,"src","index.ts"),kt.join(t,"src","main.tsx"),kt.join(t,"src","main.ts")].some(MC)},NC=["@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"],HC=t=>{let e=kt.join(t,"package.json");if(!hf.existsSync(e))return null;try{let r=JSON.parse(hf.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}},qC=t=>{let e=kt.join(t,"package.json");if(!hf.existsSync(e))return [];try{let r=JSON.parse(hf.readFileSync(e,"utf-8")),s={...r.dependencies,...r.devDependencies};return NC.filter(i=>!!s[i]).map(i=>i.replace("@react-grab/",""))}catch{return []}};var pt=async(t=process.cwd())=>{let e=Ff(t);return {packageManager:await SC(t),framework:e,nextRouterType:e==="next"?TC(t):"unknown",isMonorepo:PC(t),projectRoot:t,hasReactGrab:BC(t),installedAgents:qC(t),unsupportedFramework:HC(t)}};var LC="\x1B[31m",jC="\x1B[32m",Fs="\x1B[90m",$t="\x1B[0m",GC="\x1B[1m",VC=(t,e)=>{let r=t.split(`
218
218
  `),s=e.split(`
219
- `),i=[];Math.max(r.length,s.length);let o=0,u=0;for(;o<r.length||u<s.length;){let a=r[o],h=s[u];if(a===h)i.push({type:"unchanged",content:a,lineNumber:u+1}),o++,u++;else if(a===void 0)i.push({type:"added",content:h,lineNumber:u+1}),u++;else if(h===void 0)i.push({type:"removed",content:a}),o++;else {let l=s.indexOf(a,u),c=r.indexOf(h,o);if(l!==-1&&(c===-1||l-u<c-o))for(;u<l;)i.push({type:"added",content:s[u],lineNumber:u+1}),u++;else if(c!==-1)for(;o<c;)i.push({type:"removed",content:r[o]}),o++;else i.push({type:"removed",content:a}),i.push({type:"added",content:h,lineNumber:u+1}),o++,u++;}}return i},PC=(t,e=3)=>{let r=[],s=-1,i=false,n=t.map((o,u)=>o.type!=="unchanged"?u:-1).filter(o=>o!==-1);if(n.length===0)return `${ds}No changes${At}`;for(let o of n){let u=Math.max(0,o-e),a=Math.min(t.length-1,o+e);u>s+1&&s!==-1&&r.push(`${ds} ...${At}`);for(let h=Math.max(u,s+1);h<=a;h++){let l=t[h];l.type==="added"?(r.push(`${RC}+ ${l.content}${At}`),i=true):l.type==="removed"?(r.push(`${OC}- ${l.content}${At}`),i=true):r.push(`${ds} ${l.content}${At}`),s=h;}}return i?r.join(`
220
- `):`${ds}No changes${At}`},bt=(t,e,r)=>{console.log(`
221
- ${SC}File: ${t}${At}`),console.log("\u2500".repeat(60));let s=TC(e,r);console.log(PC(s)),console.log("\u2500".repeat(60));};var Wt=be(Nt()),I={error:Wt.default.red,warn:Wt.default.yellow,info:Wt.default.cyan,success:Wt.default.green,dim:Wt.default.dim};var b={error(...t){console.log(I.error(t.join(" ")));},warn(...t){console.log(I.warn(t.join(" ")));},info(...t){console.log(I.info(t.join(" ")));},success(...t){console.log(I.success(t.join(" ")));},log(...t){console.log(t.join(" "));},break(){console.log("");}};var yt=t=>{b.break(),b.error("Something went wrong. Please check the error below for more details."),b.error("If the problem persists, please open an issue on GitHub."),b.error(""),t instanceof Error&&b.error(t.message),b.break(),process.exit(1);};var kC={npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},fs=(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"});},ps=(t,e=true)=>{let r=[];return e&&r.push("react-grab"),t!=="none"&&r.push(`@react-grab/${t}`),r};var mf=(t=0)=>e=>`\x1B[${e+t}m`,gf=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Df=(t=0)=>(e,r,s)=>`\x1B[${38+t};2;${e};${r};${s}m`,Y={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(Y.modifier);var IC=Object.keys(Y.color),MC=Object.keys(Y.bgColor);[...IC,...MC];function BC(){let t=new Map;for(let[e,r]of Object.entries(Y)){for(let[s,i]of Object.entries(r))Y[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[s]=Y[s],t.set(i[0],i[1]);Object.defineProperty(Y,e,{value:r,enumerable:false});}return Object.defineProperty(Y,"codes",{value:t,enumerable:false}),Y.color.close="\x1B[39m",Y.bgColor.close="\x1B[49m",Y.color.ansi=mf(),Y.color.ansi256=gf(),Y.color.ansi16m=Df(),Y.bgColor.ansi=mf(10),Y.bgColor.ansi256=gf(10),Y.bgColor.ansi16m=Df(10),Object.defineProperties(Y,{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=>Y.rgbToAnsi256(...Y.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 u=e%36;r=Math.floor(e/36)/5,s=Math.floor(u/6)/5,i=u%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)=>Y.ansi256ToAnsi(Y.rgbToAnsi256(e,r,s)),enumerable:false},hexToAnsi:{value:e=>Y.ansi256ToAnsi(Y.hexToAnsi256(e)),enumerable:false}}),Y}var HC=BC(),Pe=HC;function _e(t,e=globalThis.Deno?globalThis.Deno.args:ke__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:J}=ke__default.default,ms;_e("no-color")||_e("no-colors")||_e("color=false")||_e("color=never")?ms=0:(_e("color")||_e("colors")||_e("color=true")||_e("color=always"))&&(ms=1);function qC(){if("FORCE_COLOR"in J)return J.FORCE_COLOR==="true"?1:J.FORCE_COLOR==="false"?0:J.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(J.FORCE_COLOR,10),3)}function LC(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function jC(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=qC();s!==void 0&&(ms=s);let i=r?ms:s;if(i===0)return 0;if(r){if(_e("color=16m")||_e("color=full")||_e("color=truecolor"))return 3;if(_e("color=256"))return 2}if("TF_BUILD"in J&&"AGENT_NAME"in J)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(J.TERM==="dumb")return n;if(ke__default.default.platform==="win32"){let o=My__default.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in J)return ["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in J)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in J)||J.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in J)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor"||J.TERM==="xterm-kitty"||J.TERM==="xterm-ghostty"||J.TERM==="wezterm")return 3;if("TERM_PROGRAM"in J){let o=Number.parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case "iTerm.app":return o>=3?3:2;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:n}function yf(t,e={}){let r=jC(t,{streamIsTTY:t&&t.isTTY,...e});return LC(r)}var GC={stdout:yf({isTTY:bf__default.default.isatty(1)}),stderr:yf({isTTY:bf__default.default.isatty(2)})},vf=GC;function Cf(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 xf(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
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},UC=(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 `${Fs}No changes${$t}`;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(`${Fs} ...${$t}`);for(let h=Math.max(a,s+1);h<=u;h++){let l=t[h];l.type==="added"?(r.push(`${jC}+ ${l.content}${$t}`),i=true):l.type==="removed"?(r.push(`${LC}- ${l.content}${$t}`),i=true):r.push(`${Fs} ${l.content}${$t}`),s=h;}}return i?r.join(`
220
+ `):`${Fs}No changes${$t}`},we=(t,e,r)=>{console.log(`
221
+ ${GC}File: ${t}${$t}`),console.log("\u2500".repeat(60));let s=VC(e,r);console.log(UC(s)),console.log("\u2500".repeat(60));};var sr=be(Ot()),$={error:sr.default.red,warn:sr.default.yellow,info:sr.default.cyan,success:sr.default.green,dim:sr.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 WC={npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},KC={npm:"npm uninstall",yarn:"yarn remove",pnpm:"pnpm remove",bun:"bun remove"},ir=(t,e,r,s=true)=>{if(t.length===0)return;let o=`${WC[e]}${s?" -D":""} ${t.join(" ")}`;console.log(`Running: ${o}
222
+ `),child_process.execSync(o,{cwd:r,stdio:"inherit"});},nr=(t,e=true)=>{let r=[];return e&&r.push("react-grab"),t!=="none"&&r.push(`@react-grab/${t}`),r},It=(t,e,r)=>{if(t.length===0)return;let i=`${KC[e]} ${t.join(" ")}`;console.log(`Running: ${i}
223
+ `),child_process.execSync(i,{cwd:r,stdio:"inherit"});},Mt=t=>[`@react-grab/${t}`];var Of=(t=0)=>e=>`\x1B[${e+t}m`,Rf=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Sf=(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 YC=Object.keys(X.color),JC=Object.keys(X.bgColor);[...YC,...JC];function zC(){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=Of(),X.color.ansi256=Rf(),X.color.ansi16m=Sf(),X.bgColor.ansi=Of(10),X.bgColor.ansi256=Rf(10),X.bgColor.ansi16m=Sf(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 XC=zC(),je=XC;function Pe(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,Es;Pe("no-color")||Pe("no-colors")||Pe("color=false")||Pe("color=never")?Es=0:(Pe("color")||Pe("colors")||Pe("color=true")||Pe("color=always"))&&(Es=1);function QC(){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 ew(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function tw(t,{streamIsTTY:e,sniffFlags:r=true}={}){let s=QC();s!==void 0&&(Es=s);let i=r?Es:s;if(i===0)return 0;if(r){if(Pe("color=16m")||Pe("color=full")||Pe("color=truecolor"))return 3;if(Pe("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=Jy__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=tw(t,{streamIsTTY:t&&t.isTTY,...e});return ew(r)}var rw={stdout:Pf({isTTY:Tf__default.default.isatty(1)}),stderr:Pf({isTTY:Tf__default.default.isatty(2)})},kf=rw;function $f(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 If(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
223
224
  `:`
224
225
  `)+r,i=s+1,s=t.indexOf(`
225
- `,i);}while(s!==-1);return n+=t.slice(i),n}var{stdout:_f,stderr:wf}=vf,Bo=Symbol("GENERATOR"),Kt=Symbol("STYLER"),Cr=Symbol("IS_EMPTY"),Ff=["ansi","ansi","ansi256","ansi16m"],Yt=Object.create(null),VC=(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=_f?_f.level:0;t.level=e.level===void 0?r:e.level;};var UC=t=>{let e=(...r)=>r.join(" ");return VC(e,t),Object.setPrototypeOf(e,xr.prototype),e};function xr(t){return UC(t)}Object.setPrototypeOf(xr.prototype,Function.prototype);for(let[t,e]of Object.entries(Pe))Yt[t]={get(){let r=gs(this,No(e.open,e.close,this[Kt]),this[Cr]);return Object.defineProperty(this,t,{value:r}),r}};Yt.visible={get(){let t=gs(this,this[Kt],true);return Object.defineProperty(this,"visible",{value:t}),t}};var Ho=(t,e,r,...s)=>t==="rgb"?e==="ansi16m"?Pe[r].ansi16m(...s):e==="ansi256"?Pe[r].ansi256(Pe.rgbToAnsi256(...s)):Pe[r].ansi(Pe.rgbToAnsi(...s)):t==="hex"?Ho("rgb",e,r,...Pe.hexToRgb(...s)):Pe[r][t](...s),WC=["rgb","hex","ansi256"];for(let t of WC){Yt[t]={get(){let{level:r}=this;return function(...s){let i=No(Ho(t,Ff[r],"color",...s),Pe.color.close,this[Kt]);return gs(this,i,this[Cr])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Yt[e]={get(){let{level:r}=this;return function(...s){let i=No(Ho(t,Ff[r],"bgColor",...s),Pe.bgColor.close,this[Kt]);return gs(this,i,this[Cr])}}};}var KC=Object.defineProperties(()=>{},{...Yt,level:{enumerable:true,get(){return this[Bo].level},set(t){this[Bo].level=t;}}}),No=(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}},gs=(t,e,r)=>{let s=(...i)=>YC(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,KC),s[Bo]=t,s[Kt]=e,s[Cr]=r,s},YC=(t,e)=>{if(t.level<=0||!e)return t[Cr]?"":e;let r=t[Kt];if(r===void 0)return e;let{openAll:s,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=Cf(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
226
- `);return n!==-1&&(e=xf(e,i,s,n)),s+e+i};Object.defineProperties(xr.prototype,Yt);var JC=xr();xr({level:wf?wf.level:0});var $e=JC;var zC=(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);!XC(i,n)&&s||Object.defineProperty(t,r,n);},XC=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)},ZC=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r);},QC=(t,e)=>`/* Wrapped ${t}*/
227
- ${e}`,ex=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),tx=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),rx=(t,e,r)=>{let s=r===""?"":`with ${r.trim()}() `,i=QC.bind(null,s,e.toString());Object.defineProperty(i,"name",tx);let{writable:n,enumerable:o,configurable:u}=ex;Object.defineProperty(t,"toString",{value:i,writable:n,enumerable:o,configurable:u});};function qo(t,e,{ignoreNonConfigurable:r=false}={}){let{name:s}=t;for(let i of Reflect.ownKeys(e))zC(t,e,i,r);return ZC(t,e),rx(t,e,s),t}var Ds=new WeakMap,Ef=(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(Ds.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 qo(n,t),Ds.set(n,s),n};Ef.callCount=t=>{if(!Ds.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Ds.get(t)};var Af=Ef;var Ot=[];Ot.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ot.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ot.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var bs=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",Lo=Symbol.for("signal-exit emitter"),jo=globalThis,sx=Object.defineProperty.bind(Object),Go=class{emitted={afterExit:false,exit:false};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(jo[Lo])return jo[Lo];sx(jo,Lo,{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}},ys=class{},ix=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),Vo=class extends ys{onExit(){return ()=>{}}load(){}unload(){}},Uo=class extends ys{#o=Wo.platform==="win32"?"SIGINT":"SIGHUP";#r=new Go;#e;#i;#d;#t={};#n=false;constructor(e){super(),this.#e=e,this.#t={};for(let r of Ot)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),u=r==="SIGHUP"?this.#o:r;o||e.kill(e.pid,u);}};this.#d=e.reallyExit,this.#i=e.emit;}onExit(e,r){if(!bs(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 Ot)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,Ot.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 bs(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"&&bs(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)}},Wo=globalThis.process,{onExit:Of}=ix(bs(Wo)?new Uo(Wo):new Vo);var Rf=ke__default.default.stderr.isTTY?ke__default.default.stderr:ke__default.default.stdout.isTTY?ke__default.default.stdout:void 0,nx=Rf?Af(()=>{Of(()=>{Rf.write("\x1B[?25h");},{alwaysLast:true});}):()=>{},Sf=nx;var Cs=false,Jt={};Jt.show=(t=ke__default.default.stderr)=>{t.isTTY&&(Cs=false,t.write("\x1B[?25h"));};Jt.hide=(t=ke__default.default.stderr)=>{t.isTTY&&(Sf(),Cs=true,t.write("\x1B[?25l"));};Jt.toggle=(t,e)=>{t!==void 0&&(Cs=t),Cs?Jt.show(e):Jt.hide(e);};var Ko=Jt;var Fr=be(Yo());function Jo(){return ke__default.default.platform!=="win32"?ke__default.default.env.TERM!=="linux":!!ke__default.default.env.CI||!!ke__default.default.env.WT_SESSION||!!ke__default.default.env.TERMINUS_SUBLIME||ke__default.default.env.ConEmuTask==="{cmd::Cmder}"||ke__default.default.env.TERM_PROGRAM==="Terminus-Sublime"||ke__default.default.env.TERM_PROGRAM==="vscode"||ke__default.default.env.TERM==="xterm-256color"||ke__default.default.env.TERM==="alacritty"||ke__default.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ux={info:$e.blue("\u2139"),success:$e.green("\u2714"),warning:$e.yellow("\u26A0"),error:$e.red("\u2716")},ax={info:$e.blue("i"),success:$e.green("\u221A"),warning:$e.yellow("\u203C"),error:$e.red("\xD7")},lx=Jo()?ux:ax,_r=lx;function zo({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 cx=zo();function wr(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(cx,"")}function If(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 Mf(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function Bf(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 hx(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function Hf(t,{ambiguousAsWide:e=false}={}){return hx(t),Mf(t)||Bf(t)||e&&If(t)?2:1}var Nf=()=>/[#*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 dx=new Intl.Segmenter,fx=/^\p{Default_Ignorable_Code_Point}$/u;function Xo(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=true,countAnsiEscapeCodes:s=false}=e;if(s||(t=wr(t)),t.length===0)return 0;let i=0,n={ambiguousAsWide:!r};for(let{segment:o}of dx.segment(t)){let u=o.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!fx.test(o)){if(Nf().test(o)){i+=2;continue}i+=Hf(u,n);}}return i}function Zo({stream:t=process.stdout}={}){return !!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function Qo(){let{env:t}=ke__default.default,{TERM:e,TERM_PROGRAM:r}=t;return ke__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 px=3,eu=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(){ke__default.default.platform==="win32"||!ke__default.default.stdin.isTTY||(ke__default.default.stdin.setRawMode(true),ke__default.default.stdin.on("data",this.#i),ke__default.default.stdin.resume());}#e(){ke__default.default.stdin.isTTY&&(ke__default.default.stdin.off("data",this.#i),ke__default.default.stdin.pause(),ke__default.default.stdin.setRawMode(false));}#i(e){e[0]===px&&ke__default.default.emit("SIGINT");}},mx=new eu,tu=mx;be(Yo());var ru=class{#o=0;#r=false;#e=0;#i=-1;#d=0;#t;#n;#s;#f;#m;#l;#c;#h;#g;#u;#a;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:ke__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:Zo({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,ke__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(!Qo())this.#n=Fr.default.line;else if(e===void 0)this.#n=Fr.default.dots;else if(e!=="default"&&Fr.default[e])this.#n=Fr.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.#u}set prefixText(e=""){this.#u=e,this.#p();}get suffixText(){return this.#a}set suffixText(e=""){this.#a=e,this.#p();}get isSpinning(){return this.#f!==void 0}#D(e=this.#u,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}#b(e=this.#a,r=" "){return typeof e=="string"&&e!==""?r+e:typeof e=="function"?r+e():""}#p(){let e=this.#s.columns??80,r=this.#D(this.#u,"-"),s=this.#b(this.#a,"-"),i=" ".repeat(this.#h)+r+"--"+this.#g+"--"+s;this.#e=0;for(let n of wr(i).split(`
228
- `))this.#e+=Math.max(1,Math.ceil(Xo(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=$e[this.color](s));let i=typeof this.#u=="string"&&this.#u!==""?this.#u+" ":"",n=typeof this.text=="string"?" "+this.text:"",o=typeof this.#a=="string"&&this.#a!==""?" "+this.#a:"";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&&Ko.hide(this.#s),this.#t.discardStdin&&ke__default.default.stdin.isTTY&&(this.#r=true,tu.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#s.write(`- ${this.text}
229
- `),this)}stop(){return this.#l?(clearInterval(this.#f),this.#f=void 0,this.#i=0,this.clear(),this.#t.hideCursor&&Ko.show(this.#s),this.#t.discardStdin&&ke__default.default.stdin.isTTY&&this.#r&&(tu.stop(),this.#r=false),this):this}succeed(e){return this.stopAndPersist({symbol:_r.success,text:e})}fail(e){return this.stopAndPersist({symbol:_r.error,text:e})}warn(e){return this.stopAndPersist({symbol:_r.warning,text:e})}info(e){return this.stopAndPersist({symbol:_r.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let r=e.prefixText??this.#u,s=this.#D(r," "),i=e.symbol??" ",n=e.text??this.text,u=typeof n=="string"?(i?" ":"")+n:"",a=e.suffixText??this.#a,h=this.#b(a," "),l=s+i+u+h+`
230
- `;return this.stop(),this.#s.write(l),this}};function su(t){return new ru(t)}var se=(t,e)=>su({text:t,isSilent:e?.silent,stream:process.stdout});var Dx=`{process.env.NODE_ENV === "development" && (
226
+ `,i);}while(s!==-1);return n+=t.slice(i),n}var{stdout:Mf,stderr:Bf}=kf,Yo=Symbol("GENERATOR"),or=Symbol("STYLER"),kr=Symbol("IS_EMPTY"),Nf=["ansi","ansi","ansi256","ansi16m"],ar=Object.create(null),sw=(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=Mf?Mf.level:0;t.level=e.level===void 0?r:e.level;};var iw=t=>{let e=(...r)=>r.join(" ");return sw(e,t),Object.setPrototypeOf(e,$r.prototype),e};function $r(t){return iw(t)}Object.setPrototypeOf($r.prototype,Function.prototype);for(let[t,e]of Object.entries(je))ar[t]={get(){let r=As(this,zo(e.open,e.close,this[or]),this[kr]);return Object.defineProperty(this,t,{value:r}),r}};ar.visible={get(){let t=As(this,this[or],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),nw=["rgb","hex","ansi256"];for(let t of nw){ar[t]={get(){let{level:r}=this;return function(...s){let i=zo(Jo(t,Nf[r],"color",...s),je.color.close,this[or]);return As(this,i,this[kr])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);ar[e]={get(){let{level:r}=this;return function(...s){let i=zo(Jo(t,Nf[r],"bgColor",...s),je.bgColor.close,this[or]);return As(this,i,this[kr])}}};}var ow=Object.defineProperties(()=>{},{...ar,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}},As=(t,e,r)=>{let s=(...i)=>aw(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,ow),s[Yo]=t,s[or]=e,s[kr]=r,s},aw=(t,e)=>{if(t.level<=0||!e)return t[kr]?"":e;let r=t[or];if(r===void 0)return e;let{openAll:s,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=$f(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
227
+ `);return n!==-1&&(e=If(e,i,s,n)),s+e+i};Object.defineProperties($r.prototype,ar);var uw=$r();$r({level:Bf?Bf.level:0});var Ge=uw;var lw=(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);!cw(i,n)&&s||Object.defineProperty(t,r,n);},cw=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)},hw=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r);},dw=(t,e)=>`/* Wrapped ${t}*/
228
+ ${e}`,fw=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),pw=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),mw=(t,e,r)=>{let s=r===""?"":`with ${r.trim()}() `,i=dw.bind(null,s,e.toString());Object.defineProperty(i,"name",pw);let{writable:n,enumerable:o,configurable:a}=fw;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))lw(t,e,i,r);return hw(t,e),mw(t,e,s),t}var Os=new WeakMap,Hf=(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(Os.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),Os.set(n,s),n};Hf.callCount=t=>{if(!Os.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Os.get(t)};var qf=Hf;var Bt=[];Bt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Bt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Bt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Rs=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,gw=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];gw(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}},Ss=class{},Dw=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),ta=class extends Ss{onExit(){return ()=>{}}load(){}unload(){}},ra=class extends Ss{#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 Bt)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(!Rs(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 Bt)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,Bt.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 Rs(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"&&Rs(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:Lf}=Dw(Rs(sa)?new ra(sa):new ta);var jf=Ve__default.default.stderr.isTTY?Ve__default.default.stderr:Ve__default.default.stdout.isTTY?Ve__default.default.stdout:void 0,bw=jf?qf(()=>{Lf(()=>{jf.write("\x1B[?25h");},{alwaysLast:true});}):()=>{},Gf=bw;var Ps=false,ur={};ur.show=(t=Ve__default.default.stderr)=>{t.isTTY&&(Ps=false,t.write("\x1B[?25h"));};ur.hide=(t=Ve__default.default.stderr)=>{t.isTTY&&(Gf(),Ps=true,t.write("\x1B[?25l"));};ur.toggle=(t,e)=>{t!==void 0&&(Ps=t),Ps?ur.show(e):ur.hide(e);};var ia=ur;var Br=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 vw={info:Ge.blue("\u2139"),success:Ge.green("\u2714"),warning:Ge.yellow("\u26A0"),error:Ge.red("\u2716")},Cw={info:Ge.blue("i"),success:Ge.green("\u221A"),warning:Ge.yellow("\u203C"),error:Ge.red("\xD7")},ww=oa()?vw:Cw,Ir=ww;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 xw=aa();function Mr(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(xw,"")}function Yf(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 Jf(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function zf(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 _w(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function Xf(t,{ambiguousAsWide:e=false}={}){return _w(t),Jf(t)||zf(t)||e&&Yf(t)?2:1}var Zf=()=>/[#*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 Fw=new Intl.Segmenter,Ew=/^\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=Mr(t)),t.length===0)return 0;let i=0,n={ambiguousAsWide:!r};for(let{segment:o}of Fw.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)&&!Ew.test(o)){if(Zf().test(o)){i+=2;continue}i+=Xf(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 Aw=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]===Aw&&Ve__default.default.emit("SIGINT");}},Ow=new ha,da=Ow;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=Br.default.line;else if(e===void 0)this.#n=Br.default.dots;else if(e!=="default"&&Br.default[e])this.#n=Br.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 Mr(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:Ir.success,text:e})}fail(e){return this.stopAndPersist({symbol:Ir.error,text:e})}warn(e){return this.stopAndPersist({symbol:Ir.warning,text:e})}info(e){return this.stopAndPersist({symbol:Ir.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,stream:process.stdout});var Sw=`{process.env.NODE_ENV === "development" && (
231
232
  <Script
232
233
  src="//unpkg.com/react-grab/dist/index.global.js"
233
234
  crossOrigin="anonymous"
234
235
  strategy="beforeInteractive"
235
236
  />
236
- )}`,Lf=t=>t==="none"?Dx:`{process.env.NODE_ENV === "development" && (
237
+ )}`,ep=t=>t==="none"?Sw:`{process.env.NODE_ENV === "development" && (
237
238
  <Script
238
239
  src="//unpkg.com/react-grab/dist/index.global.js"
239
240
  crossOrigin="anonymous"
@@ -245,13 +246,13 @@ ${e}`,ex=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),tx=Objec
245
246
  src="//unpkg.com/@react-grab/${t}/dist/client.global.js"
246
247
  strategy="lazyOnload"
247
248
  />
248
- )}`,bx=`{process.env.NODE_ENV === "development" && (
249
+ )}`,Tw=`{process.env.NODE_ENV === "development" && (
249
250
  <Script
250
251
  src="//unpkg.com/react-grab/dist/index.global.js"
251
252
  crossOrigin="anonymous"
252
253
  strategy="beforeInteractive"
253
254
  />
254
- )}`,jf=t=>t==="none"?bx:`{process.env.NODE_ENV === "development" && (
255
+ )}`,tp=t=>t==="none"?Tw:`{process.env.NODE_ENV === "development" && (
255
256
  <Script
256
257
  src="//unpkg.com/react-grab/dist/index.global.js"
257
258
  crossOrigin="anonymous"
@@ -263,34 +264,36 @@ ${e}`,ex=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),tx=Objec
263
264
  src="//unpkg.com/@react-grab/${t}/dist/client.global.js"
264
265
  strategy="lazyOnload"
265
266
  />
266
- )}`,yx=`<script type="module">
267
+ )}`,Pw=`<script type="module">
267
268
  if (import.meta.env.DEV) {
268
269
  import("react-grab");
269
270
  }
270
- </script>`,Gf=t=>t==="none"?yx:`<script type="module">
271
+ </script>`,rp=t=>t==="none"?Pw:`<script type="module">
271
272
  if (import.meta.env.DEV) {
272
273
  import("react-grab");
273
274
  import("@react-grab/${t}/client");
274
275
  }
275
- </script>`,vx=`if (process.env.NODE_ENV === "development") {
276
+ </script>`,kw=`if (process.env.NODE_ENV === "development") {
276
277
  import("react-grab");
277
- }`,Vf=t=>t==="none"?vx:`if (process.env.NODE_ENV === "development") {
278
+ }`,sp=t=>t==="none"?kw:`if (process.env.NODE_ENV === "development") {
278
279
  import("react-grab");
279
280
  import("@react-grab/${t}/client");
280
- }`,ws='import Script from "next/script";';var Xt=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)),Kf=t=>{let e=[Ft.join(t,"app","layout.tsx"),Ft.join(t,"app","layout.jsx"),Ft.join(t,"src","app","layout.tsx"),Ft.join(t,"src","app","layout.jsx")];for(let r of e)if(Zd.existsSync(r))return r;return null},_x=t=>{let e=[Ft.join(t,"instrumentation-client.ts"),Ft.join(t,"instrumentation-client.js"),Ft.join(t,"src","instrumentation-client.ts"),Ft.join(t,"src","instrumentation-client.js")];for(let r of e)if(Zd.existsSync(r))return r;return null},Yf=t=>{let e=_x(t);if(!e)return false;let r=Zd.readFileSync(e,"utf-8");return Xt(r)},Jf=t=>{let e=[Ft.join(t,"pages","_document.tsx"),Ft.join(t,"pages","_document.jsx"),Ft.join(t,"src","pages","_document.tsx"),Ft.join(t,"src","pages","_document.jsx")];for(let r of e)if(Zd.existsSync(r))return r;return null},zf=t=>{let e=[Ft.join(t,"index.html"),Ft.join(t,"public","index.html")];for(let r of e)if(Zd.existsSync(r))return r;return null},Xf=t=>{let e=[Ft.join(t,"src","index.tsx"),Ft.join(t,"src","index.jsx"),Ft.join(t,"src","index.ts"),Ft.join(t,"src","index.js"),Ft.join(t,"src","main.tsx"),Ft.join(t,"src","main.jsx"),Ft.join(t,"src","main.ts"),Ft.join(t,"src","main.js")];for(let r of e)if(Zd.existsSync(r))return r;return null},Zf=(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=`<Script
281
- src="//unpkg.com/${s}/dist/client.global.js"
282
- strategy="lazyOnload"
283
- />`,n=t.match(/<(?:Script|script|NextScript)[^>]*react-grab[^>]*\/?>/is);if(n){let o=t.replace(n[0],`${n[0]}
284
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:o}}return {success:false,filePath:r,message:"Could not find React Grab script to add agent after"}},wx=(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],u=o.endsWith(";"),a=t.replace(o,`${u?o.slice(0,-1):o};
285
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:a}}return {success:false,filePath:r,message:"Could not find React Grab import to add agent after"}},Fx=(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],u=o.endsWith(";"),a=t.replace(o,`${u?o.slice(0,-1):o};
286
- ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:a}}return {success:false,filePath:r,message:"Could not find React Grab import to add agent after"}},Ex=(t,e,r)=>{let s=Kf(t);if(!s)return {success:false,filePath:"",message:"Could not find app/layout.tsx or app/layout.jsx"};let i=Zd.readFileSync(s,"utf-8"),n=i,o=Xt(i),u=Yf(t);if(o&&r)return Zf(i,e,s);if(o||u)return {success:true,filePath:s,message:"React Grab is already installed"+(u?" 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]}
287
- ${ws}`):n=`${ws}
281
+ }`,Is='import Script from "next/script";';var lr=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)),np=t=>{let e=[kt.join(t,"app","layout.tsx"),kt.join(t,"app","layout.jsx"),kt.join(t,"src","app","layout.tsx"),kt.join(t,"src","app","layout.jsx")];for(let r of e)if(hf.existsSync(r))return r;return null},Mw=t=>{let e=[kt.join(t,"instrumentation-client.ts"),kt.join(t,"instrumentation-client.js"),kt.join(t,"src","instrumentation-client.ts"),kt.join(t,"src","instrumentation-client.js")];for(let r of e)if(hf.existsSync(r))return r;return null},op=t=>{let e=Mw(t);if(!e)return false;let r=hf.readFileSync(e,"utf-8");return lr(r)},ap=t=>{let e=[kt.join(t,"pages","_document.tsx"),kt.join(t,"pages","_document.jsx"),kt.join(t,"src","pages","_document.tsx"),kt.join(t,"src","pages","_document.jsx")];for(let r of e)if(hf.existsSync(r))return r;return null},up=t=>{let e=[kt.join(t,"index.html"),kt.join(t,"public","index.html")];for(let r of e)if(hf.existsSync(r))return r;return null},lp=t=>{let e=[kt.join(t,"src","index.tsx"),kt.join(t,"src","index.jsx"),kt.join(t,"src","index.ts"),kt.join(t,"src","index.js"),kt.join(t,"src","main.tsx"),kt.join(t,"src","main.jsx"),kt.join(t,"src","main.ts"),kt.join(t,"src","main.js")];for(let r of e)if(hf.existsSync(r))return r;return null},cp=(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 o=t.replace(n[0],`${n[0]}
287
+ ${i}`);return {success:true,filePath:r,message:`Add ${e} agent`,originalContent:t,newContent:o}}return {success:false,filePath:r,message:"Could not find React Grab script to add agent after"}},Bw=(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};
288
+ ${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"}},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)=>{let s=np(t);if(!s)return {success:false,filePath:"",message:"Could not find app/layout.tsx or app/layout.jsx"};let i=hf.readFileSync(s,"utf-8"),n=i,o=lr(i),a=op(t);if(o&&r)return cp(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]}
290
+ ${Is}`):n=`${Is}
288
291
 
289
- ${n}`;}let a=Lf(e),h=n.match(/<head[^>]*>/);if(h)n=n.replace(h[0],`${h[0]}
290
- ${a}`);else {let l=n.match(/<html[^>]*>/);l&&(n=n.replace(l[0],`${l[0]}
292
+ ${n}`;}let u=ep(e),h=n.match(/<head[^>]*>/);if(h)n=n.replace(h[0],`${h[0]}
293
+ ${u}`);else {let l=n.match(/<html[^>]*>/);l&&(n=n.replace(l[0],`${l[0]}
291
294
  <head>
292
- ${a}
293
- </head>`));}return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Ax=(t,e,r)=>{let s=Jf(t);if(!s)return {success:false,filePath:"",message:`Could not find pages/_document.tsx or pages/_document.jsx.
295
+ ${u}
296
+ </head>`));}return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},qw=(t,e,r)=>{let s=ap(t);if(!s)return {success:false,filePath:"",message:`Could not find pages/_document.tsx or pages/_document.jsx.
294
297
 
295
298
  To set up React Grab with Pages Router, create pages/_document.tsx with:
296
299
 
@@ -311,17 +314,20 @@ To set up React Grab with Pages Router, create pages/_document.tsx with:
311
314
  </body>
312
315
  </Html>
313
316
  );
314
- }`};let i=Zd.readFileSync(s,"utf-8"),n=i,o=Xt(i),u=Yf(t);if(o&&r)return Zf(i,e,s);if(o||u)return {success:true,filePath:s,message:"React Grab is already installed"+(u?" 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]}
315
- ${ws}`));}let a=jf(e),h=n.match(/<Head[^>]*>/);return h&&(n=n.replace(h[0],`${h[0]}
316
- ${a}`)),{success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Ox=(t,e,r)=>{let s=zf(t);if(!s)return {success:false,filePath:"",message:"Could not find index.html"};let i=Zd.readFileSync(s,"utf-8"),n=i,o=Xt(i);if(o&&r)return wx(i,e,s);if(o)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let u=Gf(e),a=n.match(/<head[^>]*>/i);return a&&(n=n.replace(a[0],`${a[0]}
317
- ${u}`)),{success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:n}},Rx=(t,e,r)=>{let s=Xf(t);if(!s)return {success:false,filePath:"",message:"Could not find entry file (src/index.tsx, src/main.tsx, etc.)"};let i=Zd.readFileSync(s,"utf-8"),n=Xt(i);if(n&&r)return Fx(i,e,s);if(n)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let u=`${Vf(e)}
317
+ }`};let i=hf.readFileSync(s,"utf-8"),n=i,o=lr(i),a=op(t);if(o&&r)return cp(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]}
318
+ ${Is}`));}let u=tp(e),h=n.match(/<Head[^>]*>/);return h&&(n=n.replace(h[0],`${h[0]}
319
+ ${u}`)),{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 index.html"};let i=hf.readFileSync(s,"utf-8"),n=i,o=lr(i);if(o&&r)return Bw(i,e,s);if(o)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let a=rp(e),u=n.match(/<head[^>]*>/i);return u&&(n=n.replace(u[0],`${u[0]}
320
+ ${a}`)),{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 entry file (src/index.tsx, src/main.tsx, etc.)"};let i=hf.readFileSync(s,"utf-8"),n=lr(i);if(n&&r)return Nw(i,e,s);if(n)return {success:true,filePath:s,message:"React Grab is already installed in this file",noChanges:true};let a=`${sp(e)}
318
321
 
319
- ${i}`;return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:u}},Fs=(t,e,r,s,i=false)=>{switch(e){case "next":return r==="app"?Ex(t,s,i):Ax(t,s,i);case "vite":return Ox(t,s,i);case "webpack":return Rx(t,s,i);default:return {success:false,filePath:"",message:`Unknown framework: ${e}. Please add React Grab manually.`}}},Qf=t=>{try{return Zd.accessSync(t,Zd.constants.W_OK),!0}catch{return false}},Er=t=>{if(t.success&&t.newContent&&t.filePath){if(!Qf(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return Zd.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 Uf={"claude-code":"npx @react-grab/claude-code@latest &&",cursor:"npx @react-grab/cursor@latest &&",opencode:"npx @react-grab/opencode@latest &&",codex:"npx @react-grab/codex@latest &&",gemini:"npx @react-grab/gemini@latest &&",amp:"npx @react-grab/amp@latest &&"},Es=(t,e,r)=>{if(e==="none"||e==="ami"||e==="visual-edit")return {success:true,filePath:"",message:e==="ami"||e==="visual-edit"?`${e==="ami"?"Ami":"Visual Edit"} does not require package.json modification`:"No agent selected, skipping package.json modification",noChanges:true};let s=Ft.join(t,"package.json");if(!Zd.existsSync(s))return {success:false,filePath:"",message:"Could not find package.json"};let i=Zd.readFileSync(s,"utf-8"),n=Uf[e];if(!n)return {success:false,filePath:s,message:`Unknown agent: ${e}`};if(i.includes(n))return {success:true,filePath:s,message:`Agent ${e} dev script is already configured`,noChanges:true};try{let o=JSON.parse(i),u="dev";if(!o.scripts?.dev){let l=Object.keys(o.scripts||{}).filter(c=>c.startsWith("dev"));if(l.length>0)u=l[0];else return {success:!0,filePath:s,message:"No dev script found in package.json",noChanges:!0,warning:`No dev script found. Run: ${n} <your dev command>`}}let a=o.scripts[u];for(let l of r){let c=Uf[l];if(c&&a.includes(c))return {success:!0,filePath:s,message:`Agent ${l} is already in ${u} script`,noChanges:!0}}o.scripts[u]=`${n} ${a}`;let h=JSON.stringify(o,null,2)+`
320
- `;return {success:!0,filePath:s,message:`Add ${e} server to ${u} script`,originalContent:i,newContent:h}}catch{return {success:false,filePath:s,message:"Failed to parse package.json"}}},As=t=>{if(t.success&&t.newContent&&t.filePath){if(!Qf(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return Zd.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}},Sx=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(", ")} }`},ep=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)},Tx=(t,e,r)=>{switch(e){case "next":return r==="app"?Kf(t):Jf(t);case "vite":return zf(t);case "webpack":return Xf(t);default:return null}},Px=(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],u=i.match(/data-options=\{JSON\.stringify\([^)]+\)\}/),a=`data-options={JSON.stringify(
321
- ${Sx(e)}
322
- )}`,h;u?h=i.replace(u[0],a):h=`${n}
323
- ${a}
324
- ${o}`;let l=t.replace(i,h);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:l}},$x=(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(${ep(e)}))`,o=t.replace(s[0],n);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:o}},kx=(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(${ep(e)}))`,o=t.replace(s[0],n);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:o}},tp=(t,e,r,s)=>{let i=Tx(t,e,r);if(!i)return {success:false,filePath:"",message:"Could not find file containing React Grab configuration"};let n=Zd.readFileSync(i,"utf-8");if(!Xt(n))return {success:false,filePath:i,message:"Could not find React Grab code in the file"};switch(e){case "next":return Px(n,s,i);case "vite":return $x(n,s,i);case "webpack":return kx(n,s,i);default:return {success:false,filePath:i,message:`Unknown framework: ${e}`}}},rp=t=>Er(t);var Ix="0.0.90",Os={"claude-code":"Claude Code",cursor:"Cursor",opencode:"OpenCode",codex:"Codex",gemini:"Gemini",amp:"Amp","visual-edit":"Visual Edit"},sp=new Be().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(`${Rs.default.magenta("\u273F")} ${Rs.default.bold("React Grab")} ${Rs.default.gray(Ix)}`),console.log();try{let r=e.cwd,s=e.yes,i=se("Preflight checks.").start(),n=await Et(r);n.hasReactGrab||(i.fail("React Grab is not installed."),b.break(),b.error(`Run ${I.info("react-grab init")} first to install React Grab.`),b.break(),process.exit(1)),i.succeed();let o=["claude-code","cursor","opencode","codex","gemini","amp","visual-edit"].filter(p=>!n.installedAgents.includes(p));o.length===0&&(b.break(),b.success("All agent integrations are already installed."),b.break(),process.exit(0));let u;if(t)["claude-code","cursor","opencode","codex","gemini","amp","visual-edit"].includes(t)||(b.break(),b.error(`Invalid agent: ${t}`),b.error("Available agents: claude-code, cursor, opencode, codex, gemini, amp, visual-edit"),b.break(),process.exit(1)),n.installedAgents.includes(t)&&(b.break(),b.warn(`${Os[t]} is already installed.`),b.break(),process.exit(0)),u=t;else if(s)b.break(),b.error("Please specify an agent to add."),b.error("Available agents: "+o.join(", ")),b.break(),process.exit(1);else {b.break();let{agent:p}=await(0,iu.default)({type:"select",name:"agent",message:`Which ${I.info("agent integration")} would you like to add?`,choices:o.map(m=>({title:Os[m],value:m}))});p||(b.break(),process.exit(1)),u=p;}se(`Adding ${Os[u]}.`).start().succeed();let h=Fs(n.projectRoot,n.framework,n.nextRouterType,u,!0),l=Es(n.projectRoot,u,n.installedAgents);h.success||(b.break(),b.error(h.message),b.break(),process.exit(1));let c=!h.noChanges&&h.originalContent&&h.newContent,d=l.success&&!l.noChanges&&l.originalContent&&l.newContent;if((c||d)&&(b.break(),c&&bt(h.filePath,h.originalContent,h.newContent),d&&(c&&b.break(),bt(l.filePath,l.originalContent,l.newContent)),!s)){b.break();let{proceed:p}=await(0,iu.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});p||(b.break(),b.log("Changes cancelled."),b.break(),process.exit(0));}let f=ps(u,!1);if(f.length>0){let p=se(`Installing ${f.join(", ")}.`).start();try{fs(f,n.packageManager,n.projectRoot),p.succeed();}catch(m){p.fail(),yt(m);}}if(c){let p=se(`Applying changes to ${h.filePath}.`).start(),m=Er(h);m.success||(p.fail(),b.break(),b.error(m.error||"Failed to write file."),b.break(),process.exit(1)),p.succeed();}if(d){let p=se(`Applying changes to ${l.filePath}.`).start(),m=As(l);m.success||(p.fail(),b.break(),b.error(m.error||"Failed to write file."),b.break(),process.exit(1)),p.succeed();}b.break(),b.log(`${I.success("Success!")} ${Os[u]} has been added.`),l.warning?b.warn(l.warning):b.log("Make sure to start the agent server before using it."),b.break();}catch(r){yt(r);}});var Ts=be(Nt()),ot=be(br());var Mx="0.0.90",Ss={metaKey:process.platform==="darwin"?"\u2318 Command":"\u229E Windows",ctrlKey:"Ctrl",shiftKey:"Shift",altKey:process.platform==="darwin"?"\u2325 Option":"Alt"},Bx=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)"},ip=new Be().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(`${Ts.default.magenta("\u273F")} ${Ts.default.bold("React Grab")} ${Ts.default.gray(Mx)}`),console.log();try{let e=t.cwd,r=t.yes,s=se("Preflight checks.").start(),i=await Et(e);i.hasReactGrab||(s.fail("React Grab is not installed."),b.break(),b.error(`Run ${I.info("react-grab init")} first to install React Grab.`),b.break(),process.exit(1)),s.succeed(),r&&(b.break(),b.error("Configure command requires interactive mode."),b.error("Remove the --yes flag to use interactive prompts."),b.break(),process.exit(1)),b.break(),b.log(`Configure ${I.info("React Grab")} options:`),b.break();let n={},{wantActivationKey:o}=await(0,ot.default)({type:"confirm",name:"wantActivationKey",message:`Configure ${I.info("activation key")}?`,initial:!1});if(o===void 0&&(b.break(),process.exit(1)),o){let{key:d}=await(0,ot.default)({type:"text",name:"key",message:"Enter the activation key (e.g., g, k, space):",initial:""});d===void 0&&(b.break(),process.exit(1));let{modifiers:f}=await(0,ot.default)({type:"multiselect",name:"modifiers",message:"Select modifier keys (space to select, enter to confirm):",choices:[{title:Ss.metaKey,value:"metaKey"},{title:Ss.ctrlKey,value:"ctrlKey"},{title:Ss.shiftKey,value:"shiftKey"},{title:Ss.altKey,value:"altKey",selected:!0}],hint:"- Space to select, Enter to confirm"});f===void 0&&(b.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}},b.log(` Activation key: ${I.info(Bx(n.activationKey))}`);}let{activationMode:u}=await(0,ot.default)({type:"select",name:"activationMode",message:`Select ${I.info("activation mode")}:`,choices:[{title:"Toggle (press to activate/deactivate)",value:"toggle"},{title:"Hold (hold key to keep active)",value:"hold"}],initial:0});if(u===void 0&&(b.break(),process.exit(1)),n.activationMode=u,u==="hold"){let{keyHoldDuration:d}=await(0,ot.default)({type:"number",name:"keyHoldDuration",message:`Enter ${I.info("key hold duration")} in milliseconds:`,initial:150,min:0,max:2e3});d===void 0&&(b.break(),process.exit(1)),n.keyHoldDuration=d;}let{allowActivationInsideInput:a}=await(0,ot.default)({type:"confirm",name:"allowActivationInsideInput",message:`Allow activation ${I.info("inside input fields")}?`,initial:!0});a===void 0&&(b.break(),process.exit(1)),n.allowActivationInsideInput=a;let{maxContextLines:h}=await(0,ot.default)({type:"number",name:"maxContextLines",message:`Enter ${I.info("max context lines")} to include:`,initial:3,min:0,max:50});h===void 0&&(b.break(),process.exit(1)),n.maxContextLines=h;let l=tp(i.projectRoot,i.framework,i.nextRouterType,n);if(l.success||(b.break(),b.error(l.message),b.break(),process.exit(1)),!l.noChanges&&l.originalContent&&l.newContent){b.break(),bt(l.filePath,l.originalContent,l.newContent),b.break();let{proceed:d}=await(0,ot.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});d||(b.break(),b.log("Changes cancelled."),b.break(),process.exit(0));let f=se(`Applying changes to ${l.filePath}.`).start(),p=rp(l);p.success||(f.fail(),b.break(),b.error(p.error||"Failed to write file."),b.break(),process.exit(1)),f.succeed();}else b.break(),b.log("No changes needed.");b.break(),b.log(`${I.success("Success!")} React Grab options have been configured.`),b.break();}catch(e){yt(e);}});var $s=be(Nt()),ks=be(br());var op="0.0.90",Hx="https://react-grab.com/api/report-cli",Ps="https://github.com/aidenybai/react-grab",np=async(t,e,r)=>{try{await fetch(Hx,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:t,version:op,config:e,error:r?{message:r.message,stack:r.stack}:void 0,timestamp:new Date().toISOString()})}).catch(()=>{});}catch{}},nu={next:"Next.js",vite:"Vite",webpack:"Webpack",unknown:"Unknown"},Nx={npm:"npm",yarn:"Yarn",pnpm:"pnpm",bun:"Bun"},qx={remix:"Remix",astro:"Astro",sveltekit:"SvelteKit",gatsby:"Gatsby"},up=new Be().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(`${$s.default.magenta("\u273F")} ${$s.default.bold("React Grab")} ${$s.default.gray(op)}`),console.log();try{let e=t.cwd,r=t.yes,s=se("Preflight checks.").start(),i=await Et(e);i.hasReactGrab&&!t.force&&(s.succeed(),b.break(),b.warn("React Grab is already installed."),b.log(`Use ${I.info("--force")} to reconfigure, or ${I.info("npx grab@latest add")} to add an agent.`),b.break(),process.exit(0)),s.succeed();let n=se("Verifying framework.").start();if(i.unsupportedFramework){let y=qx[i.unsupportedFramework];n.fail(`Found ${I.info(y)}.`),b.break(),b.log(`${y} is not yet supported by automatic setup.`),b.log(`Visit ${I.info(Ps)} for manual setup.`),b.break(),process.exit(1);}if(i.framework==="unknown")if(i.isMonorepo&&!r){n.info("Verifying framework. Found monorepo.");let v=pf(i.projectRoot).filter(_=>_.hasReact||_.framework!=="unknown");if(v.length>0){b.break();let _=[...v].sort((T,O)=>T.framework==="unknown"&&O.framework!=="unknown"?1:T.framework!=="unknown"&&O.framework==="unknown"?-1:0),{selectedProject:F}=await(0,ks.default)({type:"select",name:"selectedProject",message:"Select a project to install React Grab:",choices:_.map(T=>{let O=T.framework!=="unknown"?` ${I.dim(`(${nu[T.framework]})`)}`:"";return {title:`${T.name}${O}`,value:T.path}})});F||(b.break(),process.exit(1)),process.chdir(F);let E=await Et(F);Object.assign(i,E),se("Verifying framework.").start().succeed(`Verifying framework. Found ${I.info(nu[E.framework])}.`);}else n.fail("Could not detect a supported framework."),b.break(),b.log(`Visit ${I.info(Ps)} for manual setup.`),b.break(),process.exit(1);}else n.fail("Could not detect a supported framework."),b.break(),b.log("React Grab supports Next.js, Vite, and Webpack projects."),b.log(`Visit ${I.info(Ps)} for manual setup.`),b.break(),process.exit(1);else n.succeed(`Verifying framework. Found ${I.info(nu[i.framework])}.`);i.framework==="next"&&se("Detecting router type.").start().succeed(`Detecting router type. Found ${I.info(i.nextRouterType==="app"?"App Router":"Pages Router")}.`),se("Detecting package manager.").start().succeed(`Detecting package manager. Found ${I.info(Nx[i.packageManager])}.`);let u=i.framework,a=i.packageManager,h=i.nextRouterType,l=t.agent||"none";if(!r&&!t.agent){b.break();let{agent:y}=await(0,ks.default)({type:"select",name:"agent",message:`Would you like to add an ${I.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"}]});y===void 0&&(b.break(),process.exit(1)),l=y;}let c=Fs(i.projectRoot,u,h,l,!1),d=Es(i.projectRoot,l,i.installedAgents);c.success||(b.break(),b.error(c.message),b.error(`Visit ${I.info(Ps)} for manual setup.`),b.break(),process.exit(1));let f=!c.noChanges&&c.originalContent&&c.newContent,p=d.success&&!d.noChanges&&d.originalContent&&d.newContent;if((f||p)&&(b.break(),f&&bt(c.filePath,c.originalContent,c.newContent),p&&(f&&b.break(),bt(d.filePath,d.originalContent,d.newContent)),b.break(),b.warn("Auto-detection may not be 100% accurate."),b.warn("Please verify the changes before committing."),!r)){b.break();let{proceed:y}=await(0,ks.default)({type:"confirm",name:"proceed",message:"Apply these changes?",initial:!0});y||(b.break(),b.log("Changes cancelled."),b.break(),process.exit(0));}let m=!i.hasReactGrab,g=l!=="none"&&!i.installedAgents.includes(l);if(!t.skipInstall&&(m||g)){let y=ps(l,m);if(y.length>0){let v=se(`Installing ${y.join(", ")}.`).start();try{fs(y,a,i.projectRoot),v.succeed();}catch(_){v.fail(),yt(_);}}}if(f){let y=se(`Applying changes to ${c.filePath}.`).start(),v=Er(c);v.success||(y.fail(),b.break(),b.error(v.error||"Failed to write file."),b.break(),process.exit(1)),y.succeed();}if(p){let y=se(`Applying changes to ${d.filePath}.`).start(),v=As(d);v.success||(y.fail(),b.break(),b.error(v.error||"Failed to write file."),b.break(),process.exit(1)),y.succeed();}b.break(),b.log(`${I.success("Success!")} React Grab has been installed.`),d.warning?b.warn(d.warning):b.log("You may now start your development server."),b.break(),await np("completed",{framework:u,packageManager:a,router:h,agent:l!=="none"?l:void 0,isMonorepo:i.isMonorepo});}catch(e){yt(e),await np("error",void 0,e);}});var ci=be(Nt()),hi=be(Gg()),ca=be(br());var xE="0.0.90",Vg=2e3,Ug='<script src="https://unpkg.com/react-grab/dist/index.global.js"></script>',_E=t=>`<script src="https://unpkg.com/${t}/dist/client.global.js"></script>`,Kg=async(t,e)=>new Promise(r=>{let s=http.createServer();s.listen(t,e,()=>{s.close(()=>r(t));}),s.on("error",()=>{r(Kg(t+1,e));});}),wE=t=>t.startsWith("http://")||t.startsWith("https://")?t:`http://${t}`,FE=async t=>{try{return (await fetch(t,{method:"HEAD",redirect:"follow"})).url}catch{return t}},Yg=new Be().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(Vg)).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(xE)}`),console.log();let r=t,s=e.provider;if(!r){let{targetUrl:v}=await(0, ca.default)({type:"text",name:"targetUrl",message:"Enter the target URL to proxy:",initial:"localhost:3000"});if(v||(b.break(),process.exit(1)),r=v,!s){let{selectedProvider:_}=await(0, ca.default)({type:"select",name:"selectedProvider",message:`Select a ${I.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"}]});_===void 0&&(b.break(),process.exit(1)),s=_||void 0;}b.break();}let i=wE(r),n=await FE(i),o=parseInt(e.port,10),u=e.host||"localhost";(isNaN(o)||o<1||o>65535)&&(b.break(),b.error("Invalid port number. Please provide a port between 1 and 65535."),b.break(),process.exit(1));let a=await Kg(o,u),h=s?Ug+_E(s):Ug,l=v=>{let _=v.indexOf("</head>");if(_!==-1)return v.slice(0,_)+h+v.slice(_);let F=v.indexOf("</body>");return F!==-1?v.slice(0,F)+h+v.slice(F):v+h},c=(0, hi.createProxyMiddleware)({target:n,changeOrigin:true,followRedirects:false,ws:true,selfHandleResponse:true,cookieDomainRewrite:{"*":""},autoRewrite:true,preserveHeaderKeyCase:true,xfwd:true,on:{error:(v,_,F)=>{"writeHead"in F&&!F.headersSent&&(F.writeHead(503,{"Content-Type":"text/plain"}),F.end(`Proxy error: Unable to connect to ${n}`));},proxyReq:v=>{v.removeHeader("accept-encoding");},proxyRes:(0, hi.responseInterceptor)(async(v,_,F,E)=>{if(E.removeHeader("content-security-policy"),E.removeHeader("content-security-policy-report-only"),!(_.headers["content-type"]||"").includes("text/html"))return v;let O=v.toString("utf-8");return l(O)})}}),d=http.createServer((v,_)=>{c(v,_,F=>{F&&(b.error(`Request error: ${F}`),_.writeHead(500),_.end("Internal Server Error"));});});d.on("upgrade",c.upgrade);let f=se("Starting.").start(),p=()=>{f.succeed(`Open in your browser: http://${u}:${a}`);let v=["npx react-grab@latest start",r];e.port!==String(Vg)&&v.push(`--port=${e.port}`),u!=="localhost"&&v.push(`--host=${u}`),s&&v.push(`--provider=${s}`),b.break(),b.log(I.dim(`$ ${v.join(" ")}`));},m=false,g=!s,y=()=>{m&&g&&p();};if(d.listen(a,u,()=>{m=true,y();}),s){let v=child_process.spawn("npx",[`${s}@latest`],{stdio:"ignore",shell:true,detached:false}),_=()=>{v.killed||v.kill();};process.on("exit",_),process.on("SIGINT",()=>{_(),process.exit(0);}),process.on("SIGTERM",()=>{_(),process.exit(0);}),v.on("error",F=>{f.fail(`Failed to start provider: ${F.message}`);}),v.on("spawn",()=>{g=true,y();}),v.on("close",F=>{F!==0&&F!==null&&b.error(`Provider exited with code ${F}`);});}d.on("error",v=>{b.break(),b.error(`Server error: ${v.message}`),b.break(),process.exit(1);});});process.noDeprecation=true;var EE="0.0.90",AE="https://www.react-grab.com/api/version";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));try{fetch(`${AE}?source=cli&t=${Date.now()}`).catch(()=>{});}catch{}var Nr=new Be().name("react-grab").description("add React Grab to your project").version(EE,"-v, --version","display the version number");Nr.addCommand(up);Nr.addCommand(sp);Nr.addCommand(ip);Nr.addCommand(Yg);Nr.parse();
322
+ ${i}`;return {success:true,filePath:s,message:"Add React Grab"+(e!=="none"?` with ${e} agent`:""),originalContent:i,newContent:a}},Nr=(t,e,r,s,i=false)=>{switch(e){case "next":return r==="app"?Hw(t,s,i):qw(t,s,i);case "vite":return Lw(t,s,i);case "webpack":return jw(t,s,i);default:return {success:false,filePath:"",message:`Unknown framework: ${e}. Please add React Grab manually.`}}},hp=t=>{try{return hf.accessSync(t,hf.constants.W_OK),!0}catch{return false}},ke=t=>{if(t.success&&t.newContent&&t.filePath){if(!hp(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return hf.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 Gw=t=>{switch(t){case "bun":return "bunx";case "pnpm":return "pnpm dlx";case "yarn":return "npx";case "npm":default:return "npx"}},dp={"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"},Vw=(t,e)=>{let r=dp[t];return r?`${Gw(e)} ${r} &&`:null},ma=t=>{let e=dp[t];return e?[`npx ${e} &&`,`bunx ${e} &&`,`pnpm dlx ${e} &&`,`yarn dlx ${e} &&`]:[]},Hr=(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=kt.join(t,"package.json");if(!hf.existsSync(i))return {success:false,filePath:"",message:"Could not find package.json"};let n=hf.readFileSync(i,"utf-8"),o=Vw(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).
323
+ Run this command manually before starting your dev server:
324
+ ${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)+`
325
+ `;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(!hp(t.filePath))return {success:false,error:`Cannot write to ${t.filePath}. Check file permissions.`};try{return hf.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}},Uw=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(", ")} }`},fp=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)},pp=(t,e,r)=>{switch(e){case "next":return r==="app"?np(t):ap(t);case "vite":return up(t);case "webpack":return lp(t);default:return null}},Ww=(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(
326
+ ${Uw(e)}
327
+ )}`,h;a?h=i.replace(a[0],u):h=`${n}
328
+ ${u}
329
+ ${o}`;let l=t.replace(i,h);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:l}},Kw=(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(${fp(e)}))`,o=t.replace(s[0],n);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:o}},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(${fp(e)}))`,o=t.replace(s[0],n);return {success:true,filePath:r,message:"Update React Grab options",originalContent:t,newContent:o}},Ms=(t,e,r,s)=>{let i=pp(t,e,r);if(!i)return {success:false,filePath:"",message:"Could not find file containing React Grab configuration"};let n=hf.readFileSync(i,"utf-8");if(!lr(n))return {success:false,filePath:i,message:"Could not find React Grab code in the file"};switch(e){case "next":return Ww(n,s,i);case "vite":return Kw(n,s,i);case "webpack":return Yw(n,s,i);default:return {success:false,filePath:i,message:`Unknown framework: ${e}`}}},Bs=t=>ke(t),Jw=(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}},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}},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}},Ht=(t,e,r,s)=>{let i=pp(t,e,r);if(!i)return {success:true,filePath:"",message:"Could not find file containing React Grab configuration",noChanges:true};let n=hf.readFileSync(i,"utf-8");switch(e){case "next":return Jw(n,s,i);case "vite":return zw(n,s,i);case "webpack":return Xw(n,s,i);default:return {success:false,filePath:i,message:`Unknown framework: ${e}`}}},qt=(t,e)=>{let r=kt.join(t,"package.json");if(!hf.existsSync(r))return {success:true,filePath:"",message:"Could not find package.json",noChanges:true};let s=hf.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)+`
330
+ `;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 Zw="0.0.92",Ae={"claude-code":"Claude Code",cursor:"Cursor",opencode:"OpenCode",codex:"Codex",gemini:"Gemini",amp:"Amp","visual-edit":"Visual Edit"},mp=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(`${Ns.default.magenta("\u273F")} ${Ns.default.bold("React Grab")} ${Ns.default.gray(Zw)}`),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,qr.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,qr.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,qr.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=Ht(n.projectRoot,n.framework,n.nextRouterType,D),b=qt(n.projectRoot,D),v=Mt(D);if(v.length>0){let C=M(`Removing ${v.join(", ")}.`).start();try{It(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=ke(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=Nr(n.projectRoot,n.framework,n.nextRouterType,u,!0),d=Hr(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,qr.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=nr(u,!1);if(g.length>0){let D=M(`Installing ${g.join(", ")}.`).start();try{ir(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=ke(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 qs=be(Ot()),gt=be(er());var Qw="0.0.92",Hs={metaKey:process.platform==="darwin"?"\u2318 Command":"\u229E Windows",ctrlKey:"Ctrl",shiftKey:"Shift",altKey:process.platform==="darwin"?"\u2325 Option":"Alt"},ex=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)"},gp=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(`${qs.default.magenta("\u273F")} ${qs.default.bold("React Grab")} ${qs.default.gray(Qw)}`),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:Hs.metaKey,value:"metaKey"},{title:Hs.ctrlKey,value:"ctrlKey"},{title:Hs.shiftKey,value:"shiftKey"},{title:Hs.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(ex(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=Ms(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=Bs(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 Gs=be(Ot()),ce=be(er());var bp="0.0.92",tx="https://react-grab.com/api/report-cli",Ls="https://github.com/aidenybai/react-grab",Dp=async(t,e,r)=>{try{await fetch(tx,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:t,version:bp,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"},rx={npm:"npm",yarn:"Yarn",pnpm:"pnpm",bun:"Bun"},sx={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"},js={metaKey:process.platform==="darwin"?"\u2318 Command":"\u229E Windows",ctrlKey:"Ctrl",shiftKey:"Shift",altKey:process.platform==="darwin"?"\u2325 Option":"Alt"},ix=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)"},yp=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(`${Gs.default.magenta("\u273F")} ${Gs.default.bold("React Grab")} ${Gs.default.gray(bp)}`),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(k=>de[k]||k).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:k}=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}))});k===void 0&&(p.break(),process.exit(1));let A=k,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=Ht(i.projectRoot,i.framework,i.nextRouterType,w),P=qt(i.projectRoot,w),ne=Mt(w);if(ne.length>0){let ue=M(`Removing ${ne.join(", ")}.`).start();try{It(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=ke(G);oe.success||(ue.fail(),p.break(),p.error(oe.error||"Failed to write file."),p.break(),process.exit(1)),ue.succeed();}if(P.success&&!P.noChanges&&P.newContent){let ue=M(`Removing ${de[w]||w} from ${P.filePath}.`).start(),oe=Ue(P);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=Nr(i.projectRoot,i.framework,i.nextRouterType,A,!0),I=Hr(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=nr(A,!1);if(G.length>0){let P=M(`Installing ${G.join(", ")}.`).start();try{ir(G,i.packageManager,i.projectRoot),P.succeed();}catch(ne){P.fail(),me(ne);}}if(ee){let P=M(`Applying changes to ${B.filePath}.`).start(),ne=ke(B);ne.success||(P.fail(),p.break(),p.error(ne.error||"Failed to write file."),p.break(),process.exit(1)),P.succeed();}if(_){let P=M(`Applying changes to ${I.filePath}.`).start(),ne=Ue(I);ne.success||(P.fail(),p.break(),p.error(ne.error||"Failed to write file."),p.break(),process.exit(1)),P.succeed();}C=!0,p.break(),p.success(`${de[A]} has been added.`);}}else {let w=nr(A,!1);if(w.length>0){let G=M(`Installing ${w.join(", ")}.`).start();try{ir(w,i.packageManager,i.projectRoot),G.succeed();}catch(P){G.fail(),me(P);}}if(ee){let G=M(`Applying changes to ${B.filePath}.`).start(),P=ke(B);P.success||(G.fail(),p.break(),p.error(P.error||"Failed to write file."),p.break(),process.exit(1)),G.succeed();}if(_){let G=M(`Applying changes to ${I.filePath}.`).start(),P=Ue(I);P.success||(G.fail(),p.break(),p.error(P.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:k}=await(0,ce.default)({type:"confirm",name:"wantActivationKey",message:`Configure ${$.info("activation key")}?`,initial:!1});if(k===void 0&&(p.break(),process.exit(1)),k){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:js.metaKey,value:"metaKey"},{title:js.ctrlKey,value:"ctrlKey"},{title:js.shiftKey,value:"shiftKey"},{title:js.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(ix(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=Ms(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(),_=Bs(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=sx[i.unsupportedFramework];n.fail(`Found ${$.info(b)}.`),p.break(),p.log(`${b} is not yet supported by automatic setup.`),p.log(`Visit ${$.info(Ls)} for manual setup.`),p.break(),process.exit(1);}if(i.framework==="unknown")if(i.isMonorepo&&!r){n.info("Verifying framework. Found monorepo.");let v=Ef(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(Ls)} 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(Ls)} 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(rx[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=Nr(i.projectRoot,a,h,l,!1),f=Hr(i.projectRoot,l,i.installedAgents,u);d.success||(p.break(),p.error(d.message),p.error(`Visit ${$.info(Ls)} 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=Ht(i.projectRoot,i.framework,i.nextRouterType,b),C=qt(i.projectRoot,b),E=Mt(b);if(E.length>0&&!t.skipInstall){let R=M(`Removing ${E.join(", ")}.`).start();try{It(E,u,i.projectRoot),R.succeed();}catch(k){R.fail(),me(k);}}if(v.success&&!v.noChanges&&v.newContent){let R=M(`Removing ${de[b]||b} from ${v.filePath}.`).start(),k=ke(v);k.success||(R.fail(),p.break(),p.error(k.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(),k=Ue(C);k.success||(R.fail(),p.break(),p.error(k.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=nr(l,D);if(b.length>0){let v=M(`Installing ${b.join(", ")}.`).start();try{ir(b,u,i.projectRoot),v.succeed();}catch(C){v.fail(),me(C);}}}if(m){let b=M(`Applying changes to ${d.filePath}.`).start(),v=ke(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 Dp("completed",{framework:a,packageManager:u,router:h,agent:l!=="none"?l:void 0,isMonorepo:i.isMonorepo});}catch(e){me(e),await Dp("error",void 0,e);}});var Us=be(Ot()),Da=be(er());var nx="0.0.92",Vs={"claude-code":"Claude Code",cursor:"Cursor",opencode:"OpenCode",codex:"Codex",gemini:"Gemini",amp:"Amp",ami:"Ami","visual-edit":"Visual Edit"},vp=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(`${Us.default.magenta("\u273F")} ${Us.default.bold("React Grab")} ${Us.default.gray(nx)}`),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=>Vs[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:Vs[m]||m,value:m}))});f||(p.break(),process.exit(1)),o=f;}M(`Preparing to remove ${Vs[o]||o}.`).start().succeed();let u=Ht(n.projectRoot,n.framework,n.nextRouterType,o),h=qt(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=Mt(o);if(d.length>0){let f=M(`Removing ${d.join(", ")}.`).start();try{It(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=ke(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!")} ${Vs[o]||o} has been removed.`),p.break();}catch(r){me(r);}});var Ci=be(Ot()),wi=be(rD()),wu=be(er());var LE="0.0.92",sD=2e3,iD='<script src="https://unpkg.com/react-grab/dist/index.global.js"></script>',jE=t=>`<script src="https://unpkg.com/${t}/dist/client.global.js"></script>`,oD=async(t,e)=>new Promise(r=>{let s=http.createServer();s.listen(t,e,()=>{s.close(()=>r(t));}),s.on("error",()=>{r(oD(t+1,e));});}),GE=t=>t.startsWith("http://")||t.startsWith("https://")?t:`http://${t}`,VE=async t=>{try{return (await fetch(t,{method:"HEAD",redirect:"follow"})).url}catch{return t}},aD=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(sD)).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(LE)}`),console.log();let r=t,s=e.provider;if(!r){let{targetUrl:b}=await(0, wu.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, wu.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=GE(r),n=await VE(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 oD(o,a),h=s?iD+jE(s):iD,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(sD)&&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 UE="0.0.92",WE="https://www.react-grab.com/api/version";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));try{fetch(`${WE}?source=cli&t=${Date.now()}`).catch(()=>{});}catch{}var br=new Te().name("react-grab").description("add React Grab to your project").version(UE,"-v, --version","display the version number");br.addCommand(yp);br.addCommand(mp);br.addCommand(vp);br.addCommand(gp);br.addCommand(aD);br.parse();
325
331
  /*! Bundled license information:
326
332
 
327
333
  http-proxy/lib/http-proxy/passes/web-outgoing.js: