specto-cli 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +131 -0
  2. package/package.json +54 -0
package/dist/index.js ADDED
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire as m_}from"node:module";var v_=Object.create;var{getPrototypeOf:x_,defineProperty:e0,getOwnPropertyNames:h_}=Object;var D_=Object.prototype.hasOwnProperty;var R=(_,F,B)=>{B=_!=null?v_(x_(_)):{};let z=F||!_||!_.__esModule?e0(B,"default",{value:_,enumerable:!0}):B;for(let q of h_(_))if(!D_.call(z,q))e0(z,q,{get:()=>_[q],enumerable:!0});return z};var i=(_,F)=>()=>(F||_((F={exports:{}}).exports,F),F.exports);var g_=(_,F)=>{for(var B in F)e0(_,B,{get:F[B],enumerable:!0,configurable:!0,set:(z)=>F[B]=()=>z})};var X0=m_(import.meta.url);var Z0=i((u_)=>{class _1 extends Error{constructor(_,F,B){super(B);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=F,this.exitCode=_,this.nestedError=void 0}}class o1 extends _1{constructor(_){super(1,"commander.invalidArgument",_);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}u_.CommanderError=_1;u_.InvalidArgumentError=o1});var T0=i((n_)=>{var{InvalidArgumentError:d_}=Z0();class e1{constructor(_,F){switch(this.description=F||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,_[0]){case"<":this.required=!0,this._name=_.slice(1,-1);break;case"[":this.required=!1,this._name=_.slice(1,-1);break;default:this.required=!0,this._name=_;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue(_,F){if(F===this.defaultValue||!Array.isArray(F))return[_];return F.push(_),F}default(_,F){return this.defaultValue=_,this.defaultValueDescription=F,this}argParser(_){return this.parseArg=_,this}choices(_){return this.argChoices=_.slice(),this.parseArg=(F,B)=>{if(!this.argChoices.includes(F))throw new d_(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(F,B);return F},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function i_(_){let F=_.name()+(_.variadic===!0?"...":"");return _.required?"<"+F+">":"["+F+"]"}n_.Argument=e1;n_.humanReadableArgName=i_});var F1=i((t_)=>{var{humanReadableArgName:r_}=T0();class _2{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(_){this.helpWidth=this.helpWidth??_.helpWidth??80}visibleCommands(_){let F=_.commands.filter((z)=>!z._hidden),B=_._getHelpCommand();if(B&&!B._hidden)F.push(B);if(this.sortSubcommands)F.sort((z,q)=>{return z.name().localeCompare(q.name())});return F}compareOptions(_,F){let B=(z)=>{return z.short?z.short.replace(/^-/,""):z.long.replace(/^--/,"")};return B(_).localeCompare(B(F))}visibleOptions(_){let F=_.options.filter((z)=>!z.hidden),B=_._getHelpOption();if(B&&!B.hidden){let z=B.short&&_._findOption(B.short),q=B.long&&_._findOption(B.long);if(!z&&!q)F.push(B);else if(B.long&&!q)F.push(_.createOption(B.long,B.description));else if(B.short&&!z)F.push(_.createOption(B.short,B.description))}if(this.sortOptions)F.sort(this.compareOptions);return F}visibleGlobalOptions(_){if(!this.showGlobalOptions)return[];let F=[];for(let B=_.parent;B;B=B.parent){let z=B.options.filter((q)=>!q.hidden);F.push(...z)}if(this.sortOptions)F.sort(this.compareOptions);return F}visibleArguments(_){if(_._argsDescription)_.registeredArguments.forEach((F)=>{F.description=F.description||_._argsDescription[F.name()]||""});if(_.registeredArguments.find((F)=>F.description))return _.registeredArguments;return[]}subcommandTerm(_){let F=_.registeredArguments.map((B)=>r_(B)).join(" ");return _._name+(_._aliases[0]?"|"+_._aliases[0]:"")+(_.options.length?" [options]":"")+(F?" "+F:"")}optionTerm(_){return _.flags}argumentTerm(_){return _.name()}longestSubcommandTermLength(_,F){return F.visibleCommands(_).reduce((B,z)=>{return Math.max(B,this.displayWidth(F.styleSubcommandTerm(F.subcommandTerm(z))))},0)}longestOptionTermLength(_,F){return F.visibleOptions(_).reduce((B,z)=>{return Math.max(B,this.displayWidth(F.styleOptionTerm(F.optionTerm(z))))},0)}longestGlobalOptionTermLength(_,F){return F.visibleGlobalOptions(_).reduce((B,z)=>{return Math.max(B,this.displayWidth(F.styleOptionTerm(F.optionTerm(z))))},0)}longestArgumentTermLength(_,F){return F.visibleArguments(_).reduce((B,z)=>{return Math.max(B,this.displayWidth(F.styleArgumentTerm(F.argumentTerm(z))))},0)}commandUsage(_){let F=_._name;if(_._aliases[0])F=F+"|"+_._aliases[0];let B="";for(let z=_.parent;z;z=z.parent)B=z.name()+" "+B;return B+F+" "+_.usage()}commandDescription(_){return _.description()}subcommandDescription(_){return _.summary()||_.description()}optionDescription(_){let F=[];if(_.argChoices)F.push(`choices: ${_.argChoices.map((B)=>JSON.stringify(B)).join(", ")}`);if(_.defaultValue!==void 0){if(_.required||_.optional||_.isBoolean()&&typeof _.defaultValue==="boolean")F.push(`default: ${_.defaultValueDescription||JSON.stringify(_.defaultValue)}`)}if(_.presetArg!==void 0&&_.optional)F.push(`preset: ${JSON.stringify(_.presetArg)}`);if(_.envVar!==void 0)F.push(`env: ${_.envVar}`);if(F.length>0){let B=`(${F.join(", ")})`;if(_.description)return`${_.description} ${B}`;return B}return _.description}argumentDescription(_){let F=[];if(_.argChoices)F.push(`choices: ${_.argChoices.map((B)=>JSON.stringify(B)).join(", ")}`);if(_.defaultValue!==void 0)F.push(`default: ${_.defaultValueDescription||JSON.stringify(_.defaultValue)}`);if(F.length>0){let B=`(${F.join(", ")})`;if(_.description)return`${_.description} ${B}`;return B}return _.description}formatItemList(_,F,B){if(F.length===0)return[];return[B.styleTitle(_),...F,""]}groupItems(_,F,B){let z=new Map;return _.forEach((q)=>{let S=B(q);if(!z.has(S))z.set(S,[])}),F.forEach((q)=>{let S=B(q);if(!z.has(S))z.set(S,[]);z.get(S).push(q)}),z}formatHelp(_,F){let B=F.padWidth(_,F),z=F.helpWidth??80;function q(Q,Z){return F.formatItem(Q,B,Z,F)}let S=[`${F.styleTitle("Usage:")} ${F.styleUsage(F.commandUsage(_))}`,""],$=F.commandDescription(_);if($.length>0)S=S.concat([F.boxWrap(F.styleCommandDescription($),z),""]);let J=F.visibleArguments(_).map((Q)=>{return q(F.styleArgumentTerm(F.argumentTerm(Q)),F.styleArgumentDescription(F.argumentDescription(Q)))});if(S=S.concat(this.formatItemList("Arguments:",J,F)),this.groupItems(_.options,F.visibleOptions(_),(Q)=>Q.helpGroupHeading??"Options:").forEach((Q,Z)=>{let U=Q.map((E)=>{return q(F.styleOptionTerm(F.optionTerm(E)),F.styleOptionDescription(F.optionDescription(E)))});S=S.concat(this.formatItemList(Z,U,F))}),F.showGlobalOptions){let Q=F.visibleGlobalOptions(_).map((Z)=>{return q(F.styleOptionTerm(F.optionTerm(Z)),F.styleOptionDescription(F.optionDescription(Z)))});S=S.concat(this.formatItemList("Global Options:",Q,F))}return this.groupItems(_.commands,F.visibleCommands(_),(Q)=>Q.helpGroup()||"Commands:").forEach((Q,Z)=>{let U=Q.map((E)=>{return q(F.styleSubcommandTerm(F.subcommandTerm(E)),F.styleSubcommandDescription(F.subcommandDescription(E)))});S=S.concat(this.formatItemList(Z,U,F))}),S.join(`
3
+ `)}displayWidth(_){return F2(_).length}styleTitle(_){return _}styleUsage(_){return _.split(" ").map((F)=>{if(F==="[options]")return this.styleOptionText(F);if(F==="[command]")return this.styleSubcommandText(F);if(F[0]==="["||F[0]==="<")return this.styleArgumentText(F);return this.styleCommandText(F)}).join(" ")}styleCommandDescription(_){return this.styleDescriptionText(_)}styleOptionDescription(_){return this.styleDescriptionText(_)}styleSubcommandDescription(_){return this.styleDescriptionText(_)}styleArgumentDescription(_){return this.styleDescriptionText(_)}styleDescriptionText(_){return _}styleOptionTerm(_){return this.styleOptionText(_)}styleSubcommandTerm(_){return _.split(" ").map((F)=>{if(F==="[options]")return this.styleOptionText(F);if(F[0]==="["||F[0]==="<")return this.styleArgumentText(F);return this.styleSubcommandText(F)}).join(" ")}styleArgumentTerm(_){return this.styleArgumentText(_)}styleOptionText(_){return _}styleArgumentText(_){return _}styleSubcommandText(_){return _}styleCommandText(_){return _}padWidth(_,F){return Math.max(F.longestOptionTermLength(_,F),F.longestGlobalOptionTermLength(_,F),F.longestSubcommandTermLength(_,F),F.longestArgumentTermLength(_,F))}preformatted(_){return/\n[^\S\r\n]/.test(_)}formatItem(_,F,B,z){let S=" ".repeat(2);if(!B)return S+_;let $=_.padEnd(F+_.length-z.displayWidth(_)),J=2,b=(this.helpWidth??80)-F-J-2,Q;if(b<this.minWidthToWrap||z.preformatted(B))Q=B;else Q=z.boxWrap(B,b).replace(/\n/g,`
4
+ `+" ".repeat(F+J));return S+$+" ".repeat(J)+Q.replace(/\n/g,`
5
+ ${S}`)}boxWrap(_,F){if(F<this.minWidthToWrap)return _;let B=_.split(/\r\n|\n/),z=/[\s]*[^\s]+/g,q=[];return B.forEach((S)=>{let $=S.match(z);if($===null){q.push("");return}let J=[$.shift()],X=this.displayWidth(J[0]);$.forEach((b)=>{let Q=this.displayWidth(b);if(X+Q<=F){J.push(b),X+=Q;return}q.push(J.join(""));let Z=b.trimStart();J=[Z],X=this.displayWidth(Z)}),q.push(J.join(""))}),q.join(`
6
+ `)}}function F2(_){let F=/\x1b\[\d*(;\d*)*m/g;return _.replace(F,"")}t_.Help=_2;t_.stripColor=F2});var B1=i((F3)=>{var{InvalidArgumentError:e_}=Z0();class $2{constructor(_,F){this.flags=_,this.description=F||"",this.required=_.includes("<"),this.optional=_.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(_),this.mandatory=!1;let B=_3(_);if(this.short=B.shortFlag,this.long=B.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(_,F){return this.defaultValue=_,this.defaultValueDescription=F,this}preset(_){return this.presetArg=_,this}conflicts(_){return this.conflictsWith=this.conflictsWith.concat(_),this}implies(_){let F=_;if(typeof _==="string")F={[_]:!0};return this.implied=Object.assign(this.implied||{},F),this}env(_){return this.envVar=_,this}argParser(_){return this.parseArg=_,this}makeOptionMandatory(_=!0){return this.mandatory=!!_,this}hideHelp(_=!0){return this.hidden=!!_,this}_collectValue(_,F){if(F===this.defaultValue||!Array.isArray(F))return[_];return F.push(_),F}choices(_){return this.argChoices=_.slice(),this.parseArg=(F,B)=>{if(!this.argChoices.includes(F))throw new e_(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(F,B);return F},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return B2(this.name().replace(/^no-/,""));return B2(this.name())}helpGroup(_){return this.helpGroupHeading=_,this}is(_){return this.short===_||this.long===_}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class z2{constructor(_){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,_.forEach((F)=>{if(F.negate)this.negativeOptions.set(F.attributeName(),F);else this.positiveOptions.set(F.attributeName(),F)}),this.negativeOptions.forEach((F,B)=>{if(this.positiveOptions.has(B))this.dualOptions.add(B)})}valueFromOption(_,F){let B=F.attributeName();if(!this.dualOptions.has(B))return!0;let z=this.negativeOptions.get(B).presetArg,q=z!==void 0?z:!1;return F.negate===(q===_)}}function B2(_){return _.split("-").reduce((F,B)=>{return F+B[0].toUpperCase()+B.slice(1)})}function _3(_){let F,B,z=/^-[^-]$/,q=/^--[^-]/,S=_.split(/[ |,]+/).concat("guard");if(z.test(S[0]))F=S.shift();if(q.test(S[0]))B=S.shift();if(!F&&z.test(S[0]))F=S.shift();if(!F&&q.test(S[0]))F=B,B=S.shift();if(S[0].startsWith("-")){let $=S[0],J=`option creation failed due to '${$}' in option flags '${_}'`;if(/^-[^-][^-]/.test($))throw Error(`${J}
7
+ - a short flag is a single dash and a single character
8
+ - either use a single dash and a single character (for a short flag)
9
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(z.test($))throw Error(`${J}
10
+ - too many short flags`);if(q.test($))throw Error(`${J}
11
+ - too many long flags`);throw Error(`${J}
12
+ - unrecognised flag format`)}if(F===void 0&&B===void 0)throw Error(`option creation failed due to no flags found in '${_}'.`);return{shortFlag:F,longFlag:B}}F3.Option=$2;F3.DualOptions=z2});var q2=i((S3)=>{function z3(_,F){if(Math.abs(_.length-F.length)>3)return Math.max(_.length,F.length);let B=[];for(let z=0;z<=_.length;z++)B[z]=[z];for(let z=0;z<=F.length;z++)B[0][z]=z;for(let z=1;z<=F.length;z++)for(let q=1;q<=_.length;q++){let S=1;if(_[q-1]===F[z-1])S=0;else S=1;if(B[q][z]=Math.min(B[q-1][z]+1,B[q][z-1]+1,B[q-1][z-1]+S),q>1&&z>1&&_[q-1]===F[z-2]&&_[q-2]===F[z-1])B[q][z]=Math.min(B[q][z],B[q-2][z-2]+1)}return B[_.length][F.length]}function q3(_,F){if(!F||F.length===0)return"";F=Array.from(new Set(F));let B=_.startsWith("--");if(B)_=_.slice(2),F=F.map(($)=>$.slice(2));let z=[],q=3,S=0.4;if(F.forEach(($)=>{if($.length<=1)return;let J=z3(_,$),X=Math.max(_.length,$.length);if((X-J)/X>S){if(J<q)q=J,z=[$];else if(J===q)z.push($)}}),z.sort(($,J)=>$.localeCompare(J)),B)z=z.map(($)=>`--${$}`);if(z.length>1)return`
13
+ (Did you mean one of ${z.join(", ")}?)`;if(z.length===1)return`
14
+ (Did you mean ${z[0]}?)`;return""}S3.suggestSimilar=q3});var Q2=i((U3)=>{var b3=X0("node:events").EventEmitter,$1=X0("node:child_process"),n=X0("node:path"),V0=X0("node:fs"),w=X0("node:process"),{Argument:Q3,humanReadableArgName:X3}=T0(),{CommanderError:z1}=Z0(),{Help:Z3,stripColor:Y3}=F1(),{Option:S2,DualOptions:G3}=B1(),{suggestSimilar:J2}=q2();class S1 extends b3{constructor(_){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=_||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:(F)=>w.stdout.write(F),writeErr:(F)=>w.stderr.write(F),outputError:(F,B)=>B(F),getOutHelpWidth:()=>w.stdout.isTTY?w.stdout.columns:void 0,getErrHelpWidth:()=>w.stderr.isTTY?w.stderr.columns:void 0,getOutHasColors:()=>q1()??(w.stdout.isTTY&&w.stdout.hasColors?.()),getErrHasColors:()=>q1()??(w.stderr.isTTY&&w.stderr.hasColors?.()),stripColor:(F)=>Y3(F)},this._hidden=!1,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(_){return this._outputConfiguration=_._outputConfiguration,this._helpOption=_._helpOption,this._helpCommand=_._helpCommand,this._helpConfiguration=_._helpConfiguration,this._exitCallback=_._exitCallback,this._storeOptionsAsProperties=_._storeOptionsAsProperties,this._combineFlagAndOptionalValue=_._combineFlagAndOptionalValue,this._allowExcessArguments=_._allowExcessArguments,this._enablePositionalOptions=_._enablePositionalOptions,this._showHelpAfterError=_._showHelpAfterError,this._showSuggestionAfterError=_._showSuggestionAfterError,this}_getCommandAndAncestors(){let _=[];for(let F=this;F;F=F.parent)_.push(F);return _}command(_,F,B){let z=F,q=B;if(typeof z==="object"&&z!==null)q=z,z=null;q=q||{};let[,S,$]=_.match(/([^ ]+) *(.*)/),J=this.createCommand(S);if(z)J.description(z),J._executableHandler=!0;if(q.isDefault)this._defaultCommandName=J._name;if(J._hidden=!!(q.noHelp||q.hidden),J._executableFile=q.executableFile||null,$)J.arguments($);if(this._registerCommand(J),J.parent=this,J.copyInheritedSettings(this),z)return this;return J}createCommand(_){return new S1(_)}createHelp(){return Object.assign(new Z3,this.configureHelp())}configureHelp(_){if(_===void 0)return this._helpConfiguration;return this._helpConfiguration=_,this}configureOutput(_){if(_===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,..._},this}showHelpAfterError(_=!0){if(typeof _!=="string")_=!!_;return this._showHelpAfterError=_,this}showSuggestionAfterError(_=!0){return this._showSuggestionAfterError=!!_,this}addCommand(_,F){if(!_._name)throw Error(`Command passed to .addCommand() must have a name
15
+ - specify the name in Command constructor or using .name()`);if(F=F||{},F.isDefault)this._defaultCommandName=_._name;if(F.noHelp||F.hidden)_._hidden=!0;return this._registerCommand(_),_.parent=this,_._checkForBrokenPassThrough(),this}createArgument(_,F){return new Q3(_,F)}argument(_,F,B,z){let q=this.createArgument(_,F);if(typeof B==="function")q.default(z).argParser(B);else q.default(B);return this.addArgument(q),this}arguments(_){return _.trim().split(/ +/).forEach((F)=>{this.argument(F)}),this}addArgument(_){let F=this.registeredArguments.slice(-1)[0];if(F?.variadic)throw Error(`only the last argument can be variadic '${F.name()}'`);if(_.required&&_.defaultValue!==void 0&&_.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${_.name()}'`);return this.registeredArguments.push(_),this}helpCommand(_,F){if(typeof _==="boolean"){if(this._addImplicitHelpCommand=_,_&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let B=_??"help [command]",[,z,q]=B.match(/([^ ]+) *(.*)/),S=F??"display help for command",$=this.createCommand(z);if($.helpOption(!1),q)$.arguments(q);if(S)$.description(S);if(this._addImplicitHelpCommand=!0,this._helpCommand=$,_||F)this._initCommandGroup($);return this}addHelpCommand(_,F){if(typeof _!=="object")return this.helpCommand(_,F),this;return this._addImplicitHelpCommand=!0,this._helpCommand=_,this._initCommandGroup(_),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook(_,F){let B=["preSubcommand","preAction","postAction"];if(!B.includes(_))throw Error(`Unexpected value for event passed to hook : '${_}'.
16
+ Expecting one of '${B.join("', '")}'`);if(this._lifeCycleHooks[_])this._lifeCycleHooks[_].push(F);else this._lifeCycleHooks[_]=[F];return this}exitOverride(_){if(_)this._exitCallback=_;else this._exitCallback=(F)=>{if(F.code!=="commander.executeSubCommandAsync")throw F};return this}_exit(_,F,B){if(this._exitCallback)this._exitCallback(new z1(_,F,B));w.exit(_)}action(_){let F=(B)=>{let z=this.registeredArguments.length,q=B.slice(0,z);if(this._storeOptionsAsProperties)q[z]=this;else q[z]=this.opts();return q.push(this),_.apply(this,q)};return this._actionHandler=F,this}createOption(_,F){return new S2(_,F)}_callParseArg(_,F,B,z){try{return _.parseArg(F,B)}catch(q){if(q.code==="commander.invalidArgument"){let S=`${z} ${q.message}`;this.error(S,{exitCode:q.exitCode,code:q.code})}throw q}}_registerOption(_){let F=_.short&&this._findOption(_.short)||_.long&&this._findOption(_.long);if(F){let B=_.long&&this._findOption(_.long)?_.long:_.short;throw Error(`Cannot add option '${_.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${B}'
17
+ - already used by option '${F.flags}'`)}this._initOptionGroup(_),this.options.push(_)}_registerCommand(_){let F=(z)=>{return[z.name()].concat(z.aliases())},B=F(_).find((z)=>this._findCommand(z));if(B){let z=F(this._findCommand(B)).join("|"),q=F(_).join("|");throw Error(`cannot add command '${q}' as already have command '${z}'`)}this._initCommandGroup(_),this.commands.push(_)}addOption(_){this._registerOption(_);let F=_.name(),B=_.attributeName();if(_.negate){let q=_.long.replace(/^--no-/,"--");if(!this._findOption(q))this.setOptionValueWithSource(B,_.defaultValue===void 0?!0:_.defaultValue,"default")}else if(_.defaultValue!==void 0)this.setOptionValueWithSource(B,_.defaultValue,"default");let z=(q,S,$)=>{if(q==null&&_.presetArg!==void 0)q=_.presetArg;let J=this.getOptionValue(B);if(q!==null&&_.parseArg)q=this._callParseArg(_,q,J,S);else if(q!==null&&_.variadic)q=_._collectValue(q,J);if(q==null)if(_.negate)q=!1;else if(_.isBoolean()||_.optional)q=!0;else q="";this.setOptionValueWithSource(B,q,$)};if(this.on("option:"+F,(q)=>{let S=`error: option '${_.flags}' argument '${q}' is invalid.`;z(q,S,"cli")}),_.envVar)this.on("optionEnv:"+F,(q)=>{let S=`error: option '${_.flags}' value '${q}' from env '${_.envVar}' is invalid.`;z(q,S,"env")});return this}_optionEx(_,F,B,z,q){if(typeof F==="object"&&F instanceof S2)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let S=this.createOption(F,B);if(S.makeOptionMandatory(!!_.mandatory),typeof z==="function")S.default(q).argParser(z);else if(z instanceof RegExp){let $=z;z=(J,X)=>{let b=$.exec(J);return b?b[0]:X},S.default(q).argParser(z)}else S.default(z);return this.addOption(S)}option(_,F,B,z){return this._optionEx({},_,F,B,z)}requiredOption(_,F,B,z){return this._optionEx({mandatory:!0},_,F,B,z)}combineFlagAndOptionalValue(_=!0){return this._combineFlagAndOptionalValue=!!_,this}allowUnknownOption(_=!0){return this._allowUnknownOption=!!_,this}allowExcessArguments(_=!0){return this._allowExcessArguments=!!_,this}enablePositionalOptions(_=!0){return this._enablePositionalOptions=!!_,this}passThroughOptions(_=!0){return this._passThroughOptions=!!_,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(_=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!_,this}getOptionValue(_){if(this._storeOptionsAsProperties)return this[_];return this._optionValues[_]}setOptionValue(_,F){return this.setOptionValueWithSource(_,F,void 0)}setOptionValueWithSource(_,F,B){if(this._storeOptionsAsProperties)this[_]=F;else this._optionValues[_]=F;return this._optionValueSources[_]=B,this}getOptionValueSource(_){return this._optionValueSources[_]}getOptionValueSourceWithGlobals(_){let F;return this._getCommandAndAncestors().forEach((B)=>{if(B.getOptionValueSource(_)!==void 0)F=B.getOptionValueSource(_)}),F}_prepareUserArgs(_,F){if(_!==void 0&&!Array.isArray(_))throw Error("first parameter to parse must be array or undefined");if(F=F||{},_===void 0&&F.from===void 0){if(w.versions?.electron)F.from="electron";let z=w.execArgv??[];if(z.includes("-e")||z.includes("--eval")||z.includes("-p")||z.includes("--print"))F.from="eval"}if(_===void 0)_=w.argv;this.rawArgs=_.slice();let B;switch(F.from){case void 0:case"node":this._scriptPath=_[1],B=_.slice(2);break;case"electron":if(w.defaultApp)this._scriptPath=_[1],B=_.slice(2);else B=_.slice(1);break;case"user":B=_.slice(0);break;case"eval":B=_.slice(1);break;default:throw Error(`unexpected parse option { from: '${F.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",B}parse(_,F){this._prepareForParse();let B=this._prepareUserArgs(_,F);return this._parseCommand([],B),this}async parseAsync(_,F){this._prepareForParse();let B=this._prepareUserArgs(_,F);return await this._parseCommand([],B),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw 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(_,F,B){if(V0.existsSync(_))return;let z=F?`searched for local subcommand relative to directory '${F}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",q=`'${_}' does not exist
19
+ - if '${B}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
+ - ${z}`;throw Error(q)}_executeSubCommand(_,F){F=F.slice();let B=!1,z=[".js",".ts",".tsx",".mjs",".cjs"];function q(b,Q){let Z=n.resolve(b,Q);if(V0.existsSync(Z))return Z;if(z.includes(n.extname(Q)))return;let U=z.find((E)=>V0.existsSync(`${Z}${E}`));if(U)return`${Z}${U}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let S=_._executableFile||`${this._name}-${_._name}`,$=this._executableDir||"";if(this._scriptPath){let b;try{b=V0.realpathSync(this._scriptPath)}catch{b=this._scriptPath}$=n.resolve(n.dirname(b),$)}if($){let b=q($,S);if(!b&&!_._executableFile&&this._scriptPath){let Q=n.basename(this._scriptPath,n.extname(this._scriptPath));if(Q!==this._name)b=q($,`${Q}-${_._name}`)}S=b||S}B=z.includes(n.extname(S));let J;if(w.platform!=="win32")if(B)F.unshift(S),F=b2(w.execArgv).concat(F),J=$1.spawn(w.argv[0],F,{stdio:"inherit"});else J=$1.spawn(S,F,{stdio:"inherit"});else this._checkForMissingExecutable(S,$,_._name),F.unshift(S),F=b2(w.execArgv).concat(F),J=$1.spawn(w.execPath,F,{stdio:"inherit"});if(!J.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((Q)=>{w.on(Q,()=>{if(J.killed===!1&&J.exitCode===null)J.kill(Q)})});let X=this._exitCallback;J.on("close",(b)=>{if(b=b??1,!X)w.exit(b);else X(new z1(b,"commander.executeSubCommandAsync","(close)"))}),J.on("error",(b)=>{if(b.code==="ENOENT")this._checkForMissingExecutable(S,$,_._name);else if(b.code==="EACCES")throw Error(`'${S}' not executable`);if(!X)w.exit(1);else{let Q=new z1(1,"commander.executeSubCommandAsync","(error)");Q.nestedError=b,X(Q)}}),this.runningCommand=J}_dispatchSubcommand(_,F,B){let z=this._findCommand(_);if(!z)this.help({error:!0});z._prepareForParse();let q;return q=this._chainOrCallSubCommandHook(q,z,"preSubcommand"),q=this._chainOrCall(q,()=>{if(z._executableHandler)this._executeSubCommand(z,F.concat(B));else return z._parseCommand(F,B)}),q}_dispatchHelpCommand(_){if(!_)this.help();let F=this._findCommand(_);if(F&&!F._executableHandler)F.help();return this._dispatchSubcommand(_,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((_,F)=>{if(_.required&&this.args[F]==null)this.missingArgument(_.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let _=(B,z,q)=>{let S=z;if(z!==null&&B.parseArg){let $=`error: command-argument value '${z}' is invalid for argument '${B.name()}'.`;S=this._callParseArg(B,z,q,$)}return S};this._checkNumberOfArguments();let F=[];this.registeredArguments.forEach((B,z)=>{let q=B.defaultValue;if(B.variadic){if(z<this.args.length){if(q=this.args.slice(z),B.parseArg)q=q.reduce((S,$)=>{return _(B,$,S)},B.defaultValue)}else if(q===void 0)q=[]}else if(z<this.args.length){if(q=this.args[z],B.parseArg)q=_(B,q,B.defaultValue)}F[z]=q}),this.processedArgs=F}_chainOrCall(_,F){if(_?.then&&typeof _.then==="function")return _.then(()=>F());return F()}_chainOrCallHooks(_,F){let B=_,z=[];if(this._getCommandAndAncestors().reverse().filter((q)=>q._lifeCycleHooks[F]!==void 0).forEach((q)=>{q._lifeCycleHooks[F].forEach((S)=>{z.push({hookedCommand:q,callback:S})})}),F==="postAction")z.reverse();return z.forEach((q)=>{B=this._chainOrCall(B,()=>{return q.callback(q.hookedCommand,this)})}),B}_chainOrCallSubCommandHook(_,F,B){let z=_;if(this._lifeCycleHooks[B]!==void 0)this._lifeCycleHooks[B].forEach((q)=>{z=this._chainOrCall(z,()=>{return q(this,F)})});return z}_parseCommand(_,F){let B=this.parseOptions(F);if(this._parseOptionsEnv(),this._parseOptionsImplied(),_=_.concat(B.operands),F=B.unknown,this.args=_.concat(F),_&&this._findCommand(_[0]))return this._dispatchSubcommand(_[0],_.slice(1),F);if(this._getHelpCommand()&&_[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(_[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(F),this._dispatchSubcommand(this._defaultCommandName,_,F);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(B.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let z=()=>{if(B.unknown.length>0)this.unknownOption(B.unknown[0])},q=`command:${this.name()}`;if(this._actionHandler){z(),this._processArguments();let S;if(S=this._chainOrCallHooks(S,"preAction"),S=this._chainOrCall(S,()=>this._actionHandler(this.processedArgs)),this.parent)S=this._chainOrCall(S,()=>{this.parent.emit(q,_,F)});return S=this._chainOrCallHooks(S,"postAction"),S}if(this.parent?.listenerCount(q))z(),this._processArguments(),this.parent.emit(q,_,F);else if(_.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",_,F);if(this.listenerCount("command:*"))this.emit("command:*",_,F);else if(this.commands.length)this.unknownCommand();else z(),this._processArguments()}else if(this.commands.length)z(),this.help({error:!0});else z(),this._processArguments()}_findCommand(_){if(!_)return;return this.commands.find((F)=>F._name===_||F._aliases.includes(_))}_findOption(_){return this.options.find((F)=>F.is(_))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((_)=>{_.options.forEach((F)=>{if(F.mandatory&&_.getOptionValue(F.attributeName())===void 0)_.missingMandatoryOptionValue(F)})})}_checkForConflictingLocalOptions(){let _=this.options.filter((B)=>{let z=B.attributeName();if(this.getOptionValue(z)===void 0)return!1;return this.getOptionValueSource(z)!=="default"});_.filter((B)=>B.conflictsWith.length>0).forEach((B)=>{let z=_.find((q)=>B.conflictsWith.includes(q.attributeName()));if(z)this._conflictingOption(B,z)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((_)=>{_._checkForConflictingLocalOptions()})}parseOptions(_){let F=[],B=[],z=F;function q(b){return b.length>1&&b[0]==="-"}let S=(b)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(b))return!1;return!this._getCommandAndAncestors().some((Q)=>Q.options.map((Z)=>Z.short).some((Z)=>/^-\d$/.test(Z)))},$=null,J=null,X=0;while(X<_.length||J){let b=J??_[X++];if(J=null,b==="--"){if(z===B)z.push(b);z.push(..._.slice(X));break}if($&&(!q(b)||S(b))){this.emit(`option:${$.name()}`,b);continue}if($=null,q(b)){let Q=this._findOption(b);if(Q){if(Q.required){let Z=_[X++];if(Z===void 0)this.optionMissingArgument(Q);this.emit(`option:${Q.name()}`,Z)}else if(Q.optional){let Z=null;if(X<_.length&&(!q(_[X])||S(_[X])))Z=_[X++];this.emit(`option:${Q.name()}`,Z)}else this.emit(`option:${Q.name()}`);$=Q.variadic?Q:null;continue}}if(b.length>2&&b[0]==="-"&&b[1]!=="-"){let Q=this._findOption(`-${b[1]}`);if(Q){if(Q.required||Q.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${Q.name()}`,b.slice(2));else this.emit(`option:${Q.name()}`),J=`-${b.slice(2)}`;continue}}if(/^--[^=]+=/.test(b)){let Q=b.indexOf("="),Z=this._findOption(b.slice(0,Q));if(Z&&(Z.required||Z.optional)){this.emit(`option:${Z.name()}`,b.slice(Q+1));continue}}if(z===F&&q(b)&&!(this.commands.length===0&&S(b)))z=B;if((this._enablePositionalOptions||this._passThroughOptions)&&F.length===0&&B.length===0){if(this._findCommand(b)){F.push(b),B.push(..._.slice(X));break}else if(this._getHelpCommand()&&b===this._getHelpCommand().name()){F.push(b,..._.slice(X));break}else if(this._defaultCommandName){B.push(b,..._.slice(X));break}}if(this._passThroughOptions){z.push(b,..._.slice(X));break}z.push(b)}return{operands:F,unknown:B}}opts(){if(this._storeOptionsAsProperties){let _={},F=this.options.length;for(let B=0;B<F;B++){let z=this.options[B].attributeName();_[z]=z===this._versionOptionName?this._version:this[z]}return _}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((_,F)=>Object.assign(_,F.opts()),{})}error(_,F){if(this._outputConfiguration.outputError(`${_}
22
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
+ `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
24
+ `),this.outputHelp({error:!0});let B=F||{},z=B.exitCode||1,q=B.code||"commander.error";this._exit(z,q,_)}_parseOptionsEnv(){this.options.forEach((_)=>{if(_.envVar&&_.envVar in w.env){let F=_.attributeName();if(this.getOptionValue(F)===void 0||["default","config","env"].includes(this.getOptionValueSource(F)))if(_.required||_.optional)this.emit(`optionEnv:${_.name()}`,w.env[_.envVar]);else this.emit(`optionEnv:${_.name()}`)}})}_parseOptionsImplied(){let _=new G3(this.options),F=(B)=>{return this.getOptionValue(B)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(B))};this.options.filter((B)=>B.implied!==void 0&&F(B.attributeName())&&_.valueFromOption(this.getOptionValue(B.attributeName()),B)).forEach((B)=>{Object.keys(B.implied).filter((z)=>!F(z)).forEach((z)=>{this.setOptionValueWithSource(z,B.implied[z],"implied")})})}missingArgument(_){let F=`error: missing required argument '${_}'`;this.error(F,{code:"commander.missingArgument"})}optionMissingArgument(_){let F=`error: option '${_.flags}' argument missing`;this.error(F,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(_){let F=`error: required option '${_.flags}' not specified`;this.error(F,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(_,F){let B=(S)=>{let $=S.attributeName(),J=this.getOptionValue($),X=this.options.find((Q)=>Q.negate&&$===Q.attributeName()),b=this.options.find((Q)=>!Q.negate&&$===Q.attributeName());if(X&&(X.presetArg===void 0&&J===!1||X.presetArg!==void 0&&J===X.presetArg))return X;return b||S},z=(S)=>{let $=B(S),J=$.attributeName();if(this.getOptionValueSource(J)==="env")return`environment variable '${$.envVar}'`;return`option '${$.flags}'`},q=`error: ${z(_)} cannot be used with ${z(F)}`;this.error(q,{code:"commander.conflictingOption"})}unknownOption(_){if(this._allowUnknownOption)return;let F="";if(_.startsWith("--")&&this._showSuggestionAfterError){let z=[],q=this;do{let S=q.createHelp().visibleOptions(q).filter(($)=>$.long).map(($)=>$.long);z=z.concat(S),q=q.parent}while(q&&!q._enablePositionalOptions);F=J2(_,z)}let B=`error: unknown option '${_}'${F}`;this.error(B,{code:"commander.unknownOption"})}_excessArguments(_){if(this._allowExcessArguments)return;let F=this.registeredArguments.length,B=F===1?"":"s",q=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${F} argument${B} but got ${_.length}.`;this.error(q,{code:"commander.excessArguments"})}unknownCommand(){let _=this.args[0],F="";if(this._showSuggestionAfterError){let z=[];this.createHelp().visibleCommands(this).forEach((q)=>{if(z.push(q.name()),q.alias())z.push(q.alias())}),F=J2(_,z)}let B=`error: unknown command '${_}'${F}`;this.error(B,{code:"commander.unknownCommand"})}version(_,F,B){if(_===void 0)return this._version;this._version=_,F=F||"-V, --version",B=B||"output the version number";let z=this.createOption(F,B);return this._versionOptionName=z.attributeName(),this._registerOption(z),this.on("option:"+z.name(),()=>{this._outputConfiguration.writeOut(`${_}
25
+ `),this._exit(0,"commander.version",_)}),this}description(_,F){if(_===void 0&&F===void 0)return this._description;if(this._description=_,F)this._argsDescription=F;return this}summary(_){if(_===void 0)return this._summary;return this._summary=_,this}alias(_){if(_===void 0)return this._aliases[0];let F=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)F=this.commands[this.commands.length-1];if(_===F._name)throw Error("Command alias can't be the same as its name");let B=this.parent?._findCommand(_);if(B){let z=[B.name()].concat(B.aliases()).join("|");throw Error(`cannot add alias '${_}' to command '${this.name()}' as already have command '${z}'`)}return F._aliases.push(_),this}aliases(_){if(_===void 0)return this._aliases;return _.forEach((F)=>this.alias(F)),this}usage(_){if(_===void 0){if(this._usage)return this._usage;let F=this.registeredArguments.map((B)=>{return X3(B)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?F:[]).join(" ")}return this._usage=_,this}name(_){if(_===void 0)return this._name;return this._name=_,this}helpGroup(_){if(_===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=_,this}commandsGroup(_){if(_===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=_,this}optionsGroup(_){if(_===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=_,this}_initOptionGroup(_){if(this._defaultOptionGroup&&!_.helpGroupHeading)_.helpGroup(this._defaultOptionGroup)}_initCommandGroup(_){if(this._defaultCommandGroup&&!_.helpGroup())_.helpGroup(this._defaultCommandGroup)}nameFromFilename(_){return this._name=n.basename(_,n.extname(_)),this}executableDir(_){if(_===void 0)return this._executableDir;return this._executableDir=_,this}helpInformation(_){let F=this.createHelp(),B=this._getOutputContext(_);F.prepareContext({error:B.error,helpWidth:B.helpWidth,outputHasColors:B.hasColors});let z=F.formatHelp(this,F);if(B.hasColors)return z;return this._outputConfiguration.stripColor(z)}_getOutputContext(_){_=_||{};let F=!!_.error,B,z,q;if(F)B=($)=>this._outputConfiguration.writeErr($),z=this._outputConfiguration.getErrHasColors(),q=this._outputConfiguration.getErrHelpWidth();else B=($)=>this._outputConfiguration.writeOut($),z=this._outputConfiguration.getOutHasColors(),q=this._outputConfiguration.getOutHelpWidth();return{error:F,write:($)=>{if(!z)$=this._outputConfiguration.stripColor($);return B($)},hasColors:z,helpWidth:q}}outputHelp(_){let F;if(typeof _==="function")F=_,_=void 0;let B=this._getOutputContext(_),z={error:B.error,write:B.write,command:this};this._getCommandAndAncestors().reverse().forEach((S)=>S.emit("beforeAllHelp",z)),this.emit("beforeHelp",z);let q=this.helpInformation({error:B.error});if(F){if(q=F(q),typeof q!=="string"&&!Buffer.isBuffer(q))throw Error("outputHelp callback must return a string or a Buffer")}if(B.write(q),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",z),this._getCommandAndAncestors().forEach((S)=>S.emit("afterAllHelp",z))}helpOption(_,F){if(typeof _==="boolean"){if(_){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(_??"-h, --help",F??"display help for command"),_||F)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(_){return this._helpOption=_,this._initOptionGroup(_),this}help(_){this.outputHelp(_);let F=Number(w.exitCode??0);if(F===0&&_&&typeof _!=="function"&&_.error)F=1;this._exit(F,"commander.help","(outputHelp)")}addHelpText(_,F){let B=["beforeAll","before","after","afterAll"];if(!B.includes(_))throw Error(`Unexpected value for position to addHelpText.
26
+ Expecting one of '${B.join("', '")}'`);let z=`${_}Help`;return this.on(z,(q)=>{let S;if(typeof F==="function")S=F({error:q.error,command:q.command});else S=F;if(S)q.write(`${S}
27
+ `)}),this}_outputHelpIfRequested(_){let F=this._getHelpOption();if(F&&_.find((z)=>F.is(z)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function b2(_){return _.map((F)=>{if(!F.startsWith("--inspect"))return F;let B,z="127.0.0.1",q="9229",S;if((S=F.match(/^(--inspect(-brk)?)$/))!==null)B=S[1];else if((S=F.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=S[1],/^\d+$/.test(S[3]))q=S[3];else z=S[3];else if((S=F.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=S[1],z=S[3],q=S[4];if(B&&q!=="0")return`${B}=${z}:${parseInt(q)+1}`;return F})}function q1(){if(w.env.NO_COLOR||w.env.FORCE_COLOR==="0"||w.env.FORCE_COLOR==="false")return!1;if(w.env.FORCE_COLOR||w.env.CLICOLOR_FORCE!==void 0)return!0;return}U3.Command=S1;U3.useColor=q1});var G2=i((A3)=>{var{Argument:X2}=T0(),{Command:J1}=Q2(),{CommanderError:K3,InvalidArgumentError:Z2}=Z0(),{Help:M3}=F1(),{Option:Y2}=B1();A3.program=new J1;A3.createCommand=(_)=>new J1(_);A3.createOption=(_,F)=>new Y2(_,F);A3.createArgument=(_,F)=>new X2(_,F);A3.Command=J1;A3.Option=Y2;A3.Argument=X2;A3.Help=M3;A3.CommanderError=K3;A3.InvalidArgumentError=Z2;A3.InvalidOptionArgumentError=Z2});var L=i((g5,b1)=>{var N0=process||{},w2=N0.argv||[],L0=N0.env||{},P3=!(!!L0.NO_COLOR||w2.includes("--no-color"))&&(!!L0.FORCE_COLOR||w2.includes("--color")||N0.platform==="win32"||(N0.stdout||{}).isTTY&&L0.TERM!=="dumb"||!!L0.CI),y3=(_,F,B=_)=>(z)=>{let q=""+z,S=q.indexOf(F,_.length);return~S?_+O3(q,F,B,S)+F:_+q+F},O3=(_,F,B,z)=>{let q="",S=0;do q+=_.substring(S,z)+B,S=z+F.length,z=_.indexOf(F,S);while(~z);return q+_.substring(S)},E2=(_=P3)=>{let F=_?y3:()=>String;return{isColorSupported:_,reset:F("\x1B[0m","\x1B[0m"),bold:F("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:F("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:F("\x1B[3m","\x1B[23m"),underline:F("\x1B[4m","\x1B[24m"),inverse:F("\x1B[7m","\x1B[27m"),hidden:F("\x1B[8m","\x1B[28m"),strikethrough:F("\x1B[9m","\x1B[29m"),black:F("\x1B[30m","\x1B[39m"),red:F("\x1B[31m","\x1B[39m"),green:F("\x1B[32m","\x1B[39m"),yellow:F("\x1B[33m","\x1B[39m"),blue:F("\x1B[34m","\x1B[39m"),magenta:F("\x1B[35m","\x1B[39m"),cyan:F("\x1B[36m","\x1B[39m"),white:F("\x1B[37m","\x1B[39m"),gray:F("\x1B[90m","\x1B[39m"),bgBlack:F("\x1B[40m","\x1B[49m"),bgRed:F("\x1B[41m","\x1B[49m"),bgGreen:F("\x1B[42m","\x1B[49m"),bgYellow:F("\x1B[43m","\x1B[49m"),bgBlue:F("\x1B[44m","\x1B[49m"),bgMagenta:F("\x1B[45m","\x1B[49m"),bgCyan:F("\x1B[46m","\x1B[49m"),bgWhite:F("\x1B[47m","\x1B[49m"),blackBright:F("\x1B[90m","\x1B[39m"),redBright:F("\x1B[91m","\x1B[39m"),greenBright:F("\x1B[92m","\x1B[39m"),yellowBright:F("\x1B[93m","\x1B[39m"),blueBright:F("\x1B[94m","\x1B[39m"),magentaBright:F("\x1B[95m","\x1B[39m"),cyanBright:F("\x1B[96m","\x1B[39m"),whiteBright:F("\x1B[97m","\x1B[39m"),bgBlackBright:F("\x1B[100m","\x1B[49m"),bgRedBright:F("\x1B[101m","\x1B[49m"),bgGreenBright:F("\x1B[102m","\x1B[49m"),bgYellowBright:F("\x1B[103m","\x1B[49m"),bgBlueBright:F("\x1B[104m","\x1B[49m"),bgMagentaBright:F("\x1B[105m","\x1B[49m"),bgCyanBright:F("\x1B[106m","\x1B[49m"),bgWhiteBright:F("\x1B[107m","\x1B[49m")}};b1.exports=E2();b1.exports.createColors=E2});var P1=i((g8,U_)=>{var k1={to(_,F){if(!F)return`\x1B[${_+1}G`;return`\x1B[${F+1};${_+1}H`},move(_,F){let B="";if(_<0)B+=`\x1B[${-_}D`;else if(_>0)B+=`\x1B[${_}C`;if(F<0)B+=`\x1B[${-F}A`;else if(F>0)B+=`\x1B[${F}B`;return B},up:(_=1)=>`\x1B[${_}A`,down:(_=1)=>`\x1B[${_}B`,forward:(_=1)=>`\x1B[${_}C`,backward:(_=1)=>`\x1B[${_}D`,nextLine:(_=1)=>"\x1B[E".repeat(_),prevLine:(_=1)=>"\x1B[F".repeat(_),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},y6={up:(_=1)=>"\x1B[S".repeat(_),down:(_=1)=>"\x1B[T".repeat(_)},O6={screen:"\x1B[2J",up:(_=1)=>"\x1B[1J".repeat(_),down:(_=1)=>"\x1B[J".repeat(_),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(_){let F="";for(let B=0;B<_;B++)F+=this.line+(B<_-1?k1.up():"");if(_)F+=k1.left;return F}};U_.exports={cursor:k1,scroll:y6,erase:O6,beep:"\x07"}});var U2=R(G2(),1),{program:j5,createCommand:f5,createArgument:k5,createOption:P5,CommanderError:y5,InvalidArgumentError:O5,InvalidOptionArgumentError:C5,Command:r,Argument:v5,Option:x5,Help:h5}=U2.default;var l=R(L(),1);import{spawn as C3}from"node:child_process";async function K2(_,F){return new Promise((B,z)=>{let q=C3(_,F,{stdio:["ignore","pipe","pipe"]}),S="",$="";q.stdout.on("data",(J)=>{S+=J.toString()}),q.stderr.on("data",(J)=>{$+=J.toString()}),q.on("close",(J)=>{if(J===0)B(S.trim());else z(Error($||`Command failed with code ${J}`))}),q.on("error",(J)=>{z(J)})})}async function v3(){try{return await K2("gh",["auth","token"])||null}catch{return null}}async function M2(){try{return await K2("gh",["--version"]),!0}catch{return!1}}async function A2(){let _=process.env.GITHUB_TOKEN||process.env.GH_TOKEN;if(_)return{method:"token",token:_};let F=await v3();if(F)return{method:"gh-cli",token:F};return{method:"none",token:null}}async function H2(){let _=await A2();if(!_.token)throw new I0("No GitHub authentication found. Either:\n 1. Set GITHUB_TOKEN environment variable\n 2. Run `gh auth login` to authenticate with GitHub CLI");return _.token}async function Y0(){let _=await A2();if(!_.token)return{method:"none",valid:!1};try{let F=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${_.token}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"}});if(!F.ok)return{method:_.method,valid:!1};let B=await F.json(),z=F.headers.get("x-oauth-scopes"),q=z?z.split(", ").filter(Boolean):[];return{method:_.method,valid:!0,username:B.login,scopes:q}}catch{return{method:_.method,valid:!1}}}class I0 extends Error{constructor(_){super(_);this.name="AuthError"}}var x3="https://api.github.com";class G0 extends Error{status;statusText;body;constructor(_,F,B){super(`GitHub API error: ${_} ${F}${B?` - ${B}`:""}`);this.status=_,this.statusText=F,this.body=B,this.name="GitHubError"}}class j0 extends G0{resetAt;constructor(_,F){super(403,"Rate Limit Exceeded",F);this.resetAt=_,this.name="RateLimitError"}}async function B0(_,F={}){let B=await H2(),{method:z="GET",body:q,params:S}=F,$=new URL(`${x3}${_}`);if(S){for(let[X,b]of Object.entries(S))if(b!==void 0)$.searchParams.set(X,String(b))}let J=await fetch($.toString(),{method:z,headers:{Authorization:`Bearer ${B}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28",...q?{"Content-Type":"application/json"}:{}},body:q});if(!J.ok){let X=J.headers.get("x-ratelimit-reset");if(J.status===403&&X){let b=new Date(Number.parseInt(X)*1000);throw new j0(b,await J.text())}throw new G0(J.status,J.statusText,await J.text())}return J.json()}async function*W2(_,F={}){let{perPage:B=100,maxPages:z,params:q={}}=F,S=1;while(!0){if(z&&S>z)break;let $=await B0(_,{params:{...q,page:S,per_page:B}});if($.length===0)break;for(let J of $)yield J;if($.length<B)break;S++}}async function f0(_,F={}){let B=[];for await(let z of W2(_,F))B.push(z);return B}async function R2(_){return B0(`/orgs/${_}`)}async function k0(_,F){return f0(`/orgs/${_}/members`,F)}async function T2(_,F){return f0(`/orgs/${_}/repos`,{...F,params:{type:"all",sort:"pushed"}})}async function V2(_,F){return f0(`/orgs/${_}/teams`,F)}async function*L2(_,F={}){let{since:B,until:z,author:q,...S}=F;yield*W2(`/repos/${_}/commits`,{...S,params:{since:B,until:z,author:q}})}async function N2(_){return B0(`/orgs/${_}/hooks`)}async function I2(_){return B0(`/orgs/${_}/actions/permissions`)}async function Q1(_){return B0(`/orgs/${_}/actions/runners`)}async function X1(_){return B0(`/orgs/${_}/actions/secrets`)}async function j2(){return f0("/user/orgs")}function P0(){let F=new Date().getFullYear();return{since:`${F}-01-01T00:00:00Z`,until:`${F}-12-31T23:59:59Z`}}function f2(_){return(typeof _==="string"?new Date(_):_).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function k2(_,F){return`${f2(_)} → ${f2(F)}`}var v=R(L(),1);import g0 from"node:process";var P2=(_=0)=>(F)=>`\x1B[${F+_}m`,y2=(_=0)=>(F)=>`\x1B[${38+_};5;${F}m`,O2=(_=0)=>(F,B,z)=>`\x1B[${38+_};2;${F};${B};${z}m`,K={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]}},_9=Object.keys(K.modifier),h3=Object.keys(K.color),D3=Object.keys(K.bgColor),F9=[...h3,...D3];function g3(){let _=new Map;for(let[F,B]of Object.entries(K)){for(let[z,q]of Object.entries(B))K[z]={open:`\x1B[${q[0]}m`,close:`\x1B[${q[1]}m`},B[z]=K[z],_.set(q[0],q[1]);Object.defineProperty(K,F,{value:B,enumerable:!1})}return Object.defineProperty(K,"codes",{value:_,enumerable:!1}),K.color.close="\x1B[39m",K.bgColor.close="\x1B[49m",K.color.ansi=P2(),K.color.ansi256=y2(),K.color.ansi16m=O2(),K.bgColor.ansi=P2(10),K.bgColor.ansi256=y2(10),K.bgColor.ansi16m=O2(10),Object.defineProperties(K,{rgbToAnsi256:{value(F,B,z){if(F===B&&B===z){if(F<8)return 16;if(F>248)return 231;return Math.round((F-8)/247*24)+232}return 16+36*Math.round(F/255*5)+6*Math.round(B/255*5)+Math.round(z/255*5)},enumerable:!1},hexToRgb:{value(F){let B=/[a-f\d]{6}|[a-f\d]{3}/i.exec(F.toString(16));if(!B)return[0,0,0];let[z]=B;if(z.length===3)z=[...z].map((S)=>S+S).join("");let q=Number.parseInt(z,16);return[q>>16&255,q>>8&255,q&255]},enumerable:!1},hexToAnsi256:{value:(F)=>K.rgbToAnsi256(...K.hexToRgb(F)),enumerable:!1},ansi256ToAnsi:{value(F){if(F<8)return 30+F;if(F<16)return 90+(F-8);let B,z,q;if(F>=232)B=((F-232)*10+8)/255,z=B,q=B;else{F-=16;let J=F%36;B=Math.floor(F/36)/5,z=Math.floor(J/6)/5,q=J%6/5}let S=Math.max(B,z,q)*2;if(S===0)return 30;let $=30+(Math.round(q)<<2|Math.round(z)<<1|Math.round(B));if(S===2)$+=60;return $},enumerable:!1},rgbToAnsi:{value:(F,B,z)=>K.ansi256ToAnsi(K.rgbToAnsi256(F,B,z)),enumerable:!1},hexToAnsi:{value:(F)=>K.ansi256ToAnsi(K.hexToAnsi256(F)),enumerable:!1}}),K}var m3=g3(),P=m3;import Z1 from"node:process";import u3 from"node:os";import C2 from"node:tty";function f(_,F=globalThis.Deno?globalThis.Deno.args:Z1.argv){let B=_.startsWith("-")?"":_.length===1?"-":"--",z=F.indexOf(B+_),q=F.indexOf("--");return z!==-1&&(q===-1||z<q)}var{env:M}=Z1,y0;if(f("no-color")||f("no-colors")||f("color=false")||f("color=never"))y0=0;else if(f("color")||f("colors")||f("color=true")||f("color=always"))y0=1;function c3(){if("FORCE_COLOR"in M){if(M.FORCE_COLOR==="true")return 1;if(M.FORCE_COLOR==="false")return 0;return M.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(M.FORCE_COLOR,10),3)}}function l3(_){if(_===0)return!1;return{level:_,hasBasic:!0,has256:_>=2,has16m:_>=3}}function d3(_,{streamIsTTY:F,sniffFlags:B=!0}={}){let z=c3();if(z!==void 0)y0=z;let q=B?y0:z;if(q===0)return 0;if(B){if(f("color=16m")||f("color=full")||f("color=truecolor"))return 3;if(f("color=256"))return 2}if("TF_BUILD"in M&&"AGENT_NAME"in M)return 1;if(_&&!F&&q===void 0)return 0;let S=q||0;if(M.TERM==="dumb")return S;if(Z1.platform==="win32"){let $=u3.release().split(".");if(Number($[0])>=10&&Number($[2])>=10586)return Number($[2])>=14931?3:2;return 1}if("CI"in M){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(($)=>($ in M)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(($)=>($ in M))||M.CI_NAME==="codeship")return 1;return S}if("TEAMCITY_VERSION"in M)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(M.TEAMCITY_VERSION)?1:0;if(M.COLORTERM==="truecolor")return 3;if(M.TERM==="xterm-kitty")return 3;if(M.TERM==="xterm-ghostty")return 3;if(M.TERM==="wezterm")return 3;if("TERM_PROGRAM"in M){let $=Number.parseInt((M.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(M.TERM_PROGRAM){case"iTerm.app":return $>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(M.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(M.TERM))return 1;if("COLORTERM"in M)return 1;return S}function v2(_,F={}){let B=d3(_,{streamIsTTY:_&&_.isTTY,...F});return l3(B)}var i3={stdout:v2({isTTY:C2.isatty(1)}),stderr:v2({isTTY:C2.isatty(2)})},x2=i3;function h2(_,F,B){let z=_.indexOf(F);if(z===-1)return _;let q=F.length,S=0,$="";do $+=_.slice(S,z)+F+B,S=z+q,z=_.indexOf(F,S);while(z!==-1);return $+=_.slice(S),$}function D2(_,F,B,z){let q=0,S="";do{let $=_[z-1]==="\r";S+=_.slice(q,$?z-1:z)+F+($?`\r
28
+ `:`
29
+ `)+B,q=z+1,z=_.indexOf(`
30
+ `,q)}while(z!==-1);return S+=_.slice(q),S}var{stdout:g2,stderr:m2}=x2,Y1=Symbol("GENERATOR"),$0=Symbol("STYLER"),U0=Symbol("IS_EMPTY"),u2=["ansi","ansi","ansi256","ansi16m"],z0=Object.create(null),n3=(_,F={})=>{if(F.level&&!(Number.isInteger(F.level)&&F.level>=0&&F.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let B=g2?g2.level:0;_.level=F.level===void 0?B:F.level};var a3=(_)=>{let F=(...B)=>B.join(" ");return n3(F,_),Object.setPrototypeOf(F,w0.prototype),F};function w0(_){return a3(_)}Object.setPrototypeOf(w0.prototype,Function.prototype);for(let[_,F]of Object.entries(P))z0[_]={get(){let B=O0(this,U1(F.open,F.close,this[$0]),this[U0]);return Object.defineProperty(this,_,{value:B}),B}};z0.visible={get(){let _=O0(this,this[$0],!0);return Object.defineProperty(this,"visible",{value:_}),_}};var G1=(_,F,B,...z)=>{if(_==="rgb"){if(F==="ansi16m")return P[B].ansi16m(...z);if(F==="ansi256")return P[B].ansi256(P.rgbToAnsi256(...z));return P[B].ansi(P.rgbToAnsi(...z))}if(_==="hex")return G1("rgb",F,B,...P.hexToRgb(...z));return P[B][_](...z)},p3=["rgb","hex","ansi256"];for(let _ of p3){z0[_]={get(){let{level:B}=this;return function(...z){let q=U1(G1(_,u2[B],"color",...z),P.color.close,this[$0]);return O0(this,q,this[U0])}}};let F="bg"+_[0].toUpperCase()+_.slice(1);z0[F]={get(){let{level:B}=this;return function(...z){let q=U1(G1(_,u2[B],"bgColor",...z),P.bgColor.close,this[$0]);return O0(this,q,this[U0])}}}}var r3=Object.defineProperties(()=>{},{...z0,level:{enumerable:!0,get(){return this[Y1].level},set(_){this[Y1].level=_}}}),U1=(_,F,B)=>{let z,q;if(B===void 0)z=_,q=F;else z=B.openAll+_,q=F+B.closeAll;return{open:_,close:F,openAll:z,closeAll:q,parent:B}},O0=(_,F,B)=>{let z=(...q)=>t3(z,q.length===1?""+q[0]:q.join(" "));return Object.setPrototypeOf(z,r3),z[Y1]=_,z[$0]=F,z[U0]=B,z},t3=(_,F)=>{if(_.level<=0||!F)return _[U0]?"":F;let B=_[$0];if(B===void 0)return F;let{openAll:z,closeAll:q}=B;if(F.includes("\x1B"))while(B!==void 0)F=h2(F,B.close,B.open),B=B.parent;let S=F.indexOf(`
31
+ `);if(S!==-1)F=D2(F,q,z,S);return z+F+q};Object.defineProperties(w0.prototype,z0);var s3=w0(),Z9=w0({level:m2?m2.level:0});var c2=s3;import s2 from"node:process";import x0 from"node:process";var o3=(_,F,B,z)=>{if(B==="length"||B==="prototype")return;if(B==="arguments"||B==="caller")return;let q=Object.getOwnPropertyDescriptor(_,B),S=Object.getOwnPropertyDescriptor(F,B);if(!e3(q,S)&&z)return;Object.defineProperty(_,B,S)},e3=function(_,F){return _===void 0||_.configurable||_.writable===F.writable&&_.enumerable===F.enumerable&&_.configurable===F.configurable&&(_.writable||_.value===F.value)},_6=(_,F)=>{let B=Object.getPrototypeOf(F);if(B===Object.getPrototypeOf(_))return;Object.setPrototypeOf(_,B)},F6=(_,F)=>`/* Wrapped ${_}*/
32
+ ${F}`,B6=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),$6=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),z6=(_,F,B)=>{let z=B===""?"":`with ${B.trim()}() `,q=F6.bind(null,z,F.toString());Object.defineProperty(q,"name",$6);let{writable:S,enumerable:$,configurable:J}=B6;Object.defineProperty(_,"toString",{value:q,writable:S,enumerable:$,configurable:J})};function w1(_,F,{ignoreNonConfigurable:B=!1}={}){let{name:z}=_;for(let q of Reflect.ownKeys(F))o3(_,F,q,B);return _6(_,F),z6(_,F,z),_}var C0=new WeakMap,l2=(_,F={})=>{if(typeof _!=="function")throw TypeError("Expected a function");let B,z=0,q=_.displayName||_.name||"<anonymous>",S=function(...$){if(C0.set(S,++z),z===1)B=_.apply(this,$),_=void 0;else if(F.throw===!0)throw Error(`Function \`${q}\` can only be called once`);return B};return w1(S,_),C0.set(S,z),S};l2.callCount=(_)=>{if(!C0.has(_))throw Error(`The given function \`${_.name}\` is not wrapped by the \`onetime\` package`);return C0.get(_)};var d2=l2;var o=[];o.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")o.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")o.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var v0=(_)=>!!_&&typeof _==="object"&&typeof _.removeListener==="function"&&typeof _.emit==="function"&&typeof _.reallyExit==="function"&&typeof _.listeners==="function"&&typeof _.kill==="function"&&typeof _.pid==="number"&&typeof _.on==="function",E1=Symbol.for("signal-exit emitter"),K1=globalThis,q6=Object.defineProperty.bind(Object);class i2{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(K1[E1])return K1[E1];q6(K1,E1,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(_,F){this.listeners[_].push(F)}removeListener(_,F){let B=this.listeners[_],z=B.indexOf(F);if(z===-1)return;if(z===0&&B.length===1)B.length=0;else B.splice(z,1)}emit(_,F,B){if(this.emitted[_])return!1;this.emitted[_]=!0;let z=!1;for(let q of this.listeners[_])z=q(F,B)===!0||z;if(_==="exit")z=this.emit("afterExit",F,B)||z;return z}}class A1{}var S6=(_)=>{return{onExit(F,B){return _.onExit(F,B)},load(){return _.load()},unload(){return _.unload()}}};class n2 extends A1{onExit(){return()=>{}}load(){}unload(){}}class a2 extends A1{#q=M1.platform==="win32"?"SIGINT":"SIGHUP";#$=new i2;#_;#z;#G;#Z={};#F=!1;constructor(_){super();this.#_=_,this.#Z={};for(let F of o)this.#Z[F]=()=>{let B=this.#_.listeners(F),{count:z}=this.#$,q=_;if(typeof q.__signal_exit_emitter__==="object"&&typeof q.__signal_exit_emitter__.count==="number")z+=q.__signal_exit_emitter__.count;if(B.length===z){this.unload();let S=this.#$.emit("exit",null,F),$=F==="SIGHUP"?this.#q:F;if(!S)_.kill(_.pid,$)}};this.#G=_.reallyExit,this.#z=_.emit}onExit(_,F){if(!v0(this.#_))return()=>{};if(this.#F===!1)this.load();let B=F?.alwaysLast?"afterExit":"exit";return this.#$.on(B,_),()=>{if(this.#$.removeListener(B,_),this.#$.listeners.exit.length===0&&this.#$.listeners.afterExit.length===0)this.unload()}}load(){if(this.#F)return;this.#F=!0,this.#$.count+=1;for(let _ of o)try{let F=this.#Z[_];if(F)this.#_.on(_,F)}catch(F){}this.#_.emit=(_,...F)=>{return this.#B(_,...F)},this.#_.reallyExit=(_)=>{return this.#S(_)}}unload(){if(!this.#F)return;this.#F=!1,o.forEach((_)=>{let F=this.#Z[_];if(!F)throw Error("Listener not defined for signal: "+_);try{this.#_.removeListener(_,F)}catch(B){}}),this.#_.emit=this.#z,this.#_.reallyExit=this.#G,this.#$.count-=1}#S(_){if(!v0(this.#_))return 0;return this.#_.exitCode=_||0,this.#$.emit("exit",this.#_.exitCode,null),this.#G.call(this.#_,this.#_.exitCode)}#B(_,...F){let B=this.#z;if(_==="exit"&&v0(this.#_)){if(typeof F[0]==="number")this.#_.exitCode=F[0];let z=B.call(this.#_,_,...F);return this.#$.emit("exit",this.#_.exitCode,null),z}else return B.call(this.#_,_,...F)}}var M1=globalThis.process,{onExit:p2,load:M9,unload:A9}=S6(v0(M1)?new a2(M1):new n2);var r2=x0.stderr.isTTY?x0.stderr:x0.stdout.isTTY?x0.stdout:void 0,J6=r2?d2(()=>{p2(()=>{r2.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},t2=J6;var h0=!1,q0={};q0.show=(_=s2.stderr)=>{if(!_.isTTY)return;h0=!1,_.write("\x1B[?25h")};q0.hide=(_=s2.stderr)=>{if(!_.isTTY)return;t2(),h0=!0,_.write("\x1B[?25l")};q0.toggle=(_,F)=>{if(_!==void 0)h0=_;if(h0)q0.show(F);else q0.hide(F)};var H1=q0;var W1={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots14:{interval:80,frames:["⠉⠉","⠈⠙","⠀⠹","⠀⢸","⠀⣰","⢀⣠","⣀⣀","⣄⡀","⣆⠀","⡇⠀","⠏⠀","⠋⠁"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},dotsCircle:{interval:80,frames:["⢎ ","⠎⠁","⠊⠑","⠈⠱"," ⡱","⢀⡰","⢄⡠","⢆⡀"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","💗 "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},dwarfFortress:{interval:80,frames:[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","º> ~~~~~~~~~~~~~~~~~","(º> ~~~~~~~~~~~~~~~~","((º> ~~~~~~~~~~~~~~~","<((º> ~~~~~~~~~~~~~~","><((º> ~~~~~~~~~~~~~"," ><((º> ~~~~~~~~~~~~","~ ><((º> ~~~~~~~~~~~","~~ <>((º> ~~~~~~~~~~","~~~ ><((º> ~~~~~~~~~","~~~~ <>((º> ~~~~~~~~","~~~~~ ><((º> ~~~~~~~","~~~~~~ <>((º> ~~~~~~","~~~~~~~ ><((º> ~~~~~","~~~~~~~~ <>((º> ~~~~","~~~~~~~~~ ><((º> ~~~","~~~~~~~~~~ <>((º> ~~","~~~~~~~~~~~ ><((º> ~","~~~~~~~~~~~~ <>((º> ","~~~~~~~~~~~~~ ><((º>","~~~~~~~~~~~~~~ <>((º","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var E0=W1,k9=Object.keys(W1);var e={};g_(e,{warning:()=>G6,success:()=>Y6,info:()=>Z6,error:()=>U6});import Q6 from"node:tty";var X6=Q6?.WriteStream?.prototype?.hasColors?.()??!1,G=(_,F)=>{if(!X6)return(q)=>q;let B=`\x1B[${_}m`,z=`\x1B[${F}m`;return(q)=>{let S=q+"",$=S.indexOf(z);if($===-1)return B+S+z;let J=B,X=0,Q=(F===22?z:"")+B;while($!==-1)J+=S.slice(X,$)+Q,X=$+z.length,$=S.indexOf(z,X);return J+=S.slice(X)+z,J}},O9=G(0,0),C9=G(1,22),v9=G(2,22),x9=G(3,23),h9=G(4,24),D9=G(53,55),g9=G(7,27),m9=G(8,28),u9=G(9,29),c9=G(30,39),o2=G(31,39),e2=G(32,39),__=G(33,39),F_=G(34,39),l9=G(35,39),d9=G(36,39),i9=G(37,39),n9=G(90,39),a9=G(40,49),p9=G(41,49),r9=G(42,49),t9=G(43,49),s9=G(44,49),o9=G(45,49),e9=G(46,49),_4=G(47,49),F4=G(100,49),B4=G(91,39),$4=G(92,39),z4=G(93,39),q4=G(94,39),S4=G(95,39),J4=G(96,39),b4=G(97,39),Q4=G(101,49),X4=G(102,49),Z4=G(103,49),Y4=G(104,49),G4=G(105,49),U4=G(106,49),w4=G(107,49);import B_ from"node:process";function K0(){let{env:_}=B_,{TERM:F,TERM_PROGRAM:B}=_;if(B_.platform!=="win32")return F!=="linux";return Boolean(_.WT_SESSION)||Boolean(_.TERMINUS_SUBLIME)||_.ConEmuTask==="{cmd::Cmder}"||B==="Terminus-Sublime"||B==="vscode"||F==="xterm-256color"||F==="alacritty"||F==="rxvt-unicode"||F==="rxvt-unicode-256color"||_.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var D0=K0(),Z6=F_(D0?"ℹ":"i"),Y6=e2(D0?"✔":"√"),G6=__(D0?"⚠":"‼"),U6=o2(D0?"✖":"×");function R1({onlyFirst:_=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",_?void 0:"g")}var w6=R1();function M0(_){if(typeof _!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof _}\``);return _.replace(w6,"")}function $_(_){return _===161||_===164||_===167||_===168||_===170||_===173||_===174||_>=176&&_<=180||_>=182&&_<=186||_>=188&&_<=191||_===198||_===208||_===215||_===216||_>=222&&_<=225||_===230||_>=232&&_<=234||_===236||_===237||_===240||_===242||_===243||_>=247&&_<=250||_===252||_===254||_===257||_===273||_===275||_===283||_===294||_===295||_===299||_>=305&&_<=307||_===312||_>=319&&_<=322||_===324||_>=328&&_<=331||_===333||_===338||_===339||_===358||_===359||_===363||_===462||_===464||_===466||_===468||_===470||_===472||_===474||_===476||_===593||_===609||_===708||_===711||_>=713&&_<=715||_===717||_===720||_>=728&&_<=731||_===733||_===735||_>=768&&_<=879||_>=913&&_<=929||_>=931&&_<=937||_>=945&&_<=961||_>=963&&_<=969||_===1025||_>=1040&&_<=1103||_===1105||_===8208||_>=8211&&_<=8214||_===8216||_===8217||_===8220||_===8221||_>=8224&&_<=8226||_>=8228&&_<=8231||_===8240||_===8242||_===8243||_===8245||_===8251||_===8254||_===8308||_===8319||_>=8321&&_<=8324||_===8364||_===8451||_===8453||_===8457||_===8467||_===8470||_===8481||_===8482||_===8486||_===8491||_===8531||_===8532||_>=8539&&_<=8542||_>=8544&&_<=8555||_>=8560&&_<=8569||_===8585||_>=8592&&_<=8601||_===8632||_===8633||_===8658||_===8660||_===8679||_===8704||_===8706||_===8707||_===8711||_===8712||_===8715||_===8719||_===8721||_===8725||_===8730||_>=8733&&_<=8736||_===8739||_===8741||_>=8743&&_<=8748||_===8750||_>=8756&&_<=8759||_===8764||_===8765||_===8776||_===8780||_===8786||_===8800||_===8801||_>=8804&&_<=8807||_===8810||_===8811||_===8814||_===8815||_===8834||_===8835||_===8838||_===8839||_===8853||_===8857||_===8869||_===8895||_===8978||_>=9312&&_<=9449||_>=9451&&_<=9547||_>=9552&&_<=9587||_>=9600&&_<=9615||_>=9618&&_<=9621||_===9632||_===9633||_>=9635&&_<=9641||_===9650||_===9651||_===9654||_===9655||_===9660||_===9661||_===9664||_===9665||_>=9670&&_<=9672||_===9675||_>=9678&&_<=9681||_>=9698&&_<=9701||_===9711||_===9733||_===9734||_===9737||_===9742||_===9743||_===9756||_===9758||_===9792||_===9794||_===9824||_===9825||_>=9827&&_<=9829||_>=9831&&_<=9834||_===9836||_===9837||_===9839||_===9886||_===9887||_===9919||_>=9926&&_<=9933||_>=9935&&_<=9939||_>=9941&&_<=9953||_===9955||_===9960||_===9961||_>=9963&&_<=9969||_===9972||_>=9974&&_<=9977||_===9979||_===9980||_===9982||_===9983||_===10045||_>=10102&&_<=10111||_>=11094&&_<=11097||_>=12872&&_<=12879||_>=57344&&_<=63743||_>=65024&&_<=65039||_===65533||_>=127232&&_<=127242||_>=127248&&_<=127277||_>=127280&&_<=127337||_>=127344&&_<=127373||_===127375||_===127376||_>=127387&&_<=127404||_>=917760&&_<=917999||_>=983040&&_<=1048573||_>=1048576&&_<=1114109}function z_(_){return _===12288||_>=65281&&_<=65376||_>=65504&&_<=65510}function q_(_){return _>=4352&&_<=4447||_===8986||_===8987||_===9001||_===9002||_>=9193&&_<=9196||_===9200||_===9203||_===9725||_===9726||_===9748||_===9749||_>=9776&&_<=9783||_>=9800&&_<=9811||_===9855||_>=9866&&_<=9871||_===9875||_===9889||_===9898||_===9899||_===9917||_===9918||_===9924||_===9925||_===9934||_===9940||_===9962||_===9970||_===9971||_===9973||_===9978||_===9981||_===9989||_===9994||_===9995||_===10024||_===10060||_===10062||_>=10067&&_<=10069||_===10071||_>=10133&&_<=10135||_===10160||_===10175||_===11035||_===11036||_===11088||_===11093||_>=11904&&_<=11929||_>=11931&&_<=12019||_>=12032&&_<=12245||_>=12272&&_<=12287||_>=12289&&_<=12350||_>=12353&&_<=12438||_>=12441&&_<=12543||_>=12549&&_<=12591||_>=12593&&_<=12686||_>=12688&&_<=12773||_>=12783&&_<=12830||_>=12832&&_<=12871||_>=12880&&_<=42124||_>=42128&&_<=42182||_>=43360&&_<=43388||_>=44032&&_<=55203||_>=63744&&_<=64255||_>=65040&&_<=65049||_>=65072&&_<=65106||_>=65108&&_<=65126||_>=65128&&_<=65131||_>=94176&&_<=94180||_>=94192&&_<=94198||_>=94208&&_<=101589||_>=101631&&_<=101662||_>=101760&&_<=101874||_>=110576&&_<=110579||_>=110581&&_<=110587||_===110589||_===110590||_>=110592&&_<=110882||_===110898||_>=110928&&_<=110930||_===110933||_>=110948&&_<=110951||_>=110960&&_<=111355||_>=119552&&_<=119638||_>=119648&&_<=119670||_===126980||_===127183||_===127374||_>=127377&&_<=127386||_>=127488&&_<=127490||_>=127504&&_<=127547||_>=127552&&_<=127560||_===127568||_===127569||_>=127584&&_<=127589||_>=127744&&_<=127776||_>=127789&&_<=127797||_>=127799&&_<=127868||_>=127870&&_<=127891||_>=127904&&_<=127946||_>=127951&&_<=127955||_>=127968&&_<=127984||_===127988||_>=127992&&_<=128062||_===128064||_>=128066&&_<=128252||_>=128255&&_<=128317||_>=128331&&_<=128334||_>=128336&&_<=128359||_===128378||_===128405||_===128406||_===128420||_>=128507&&_<=128591||_>=128640&&_<=128709||_===128716||_>=128720&&_<=128722||_>=128725&&_<=128728||_>=128732&&_<=128735||_===128747||_===128748||_>=128756&&_<=128764||_>=128992&&_<=129003||_===129008||_>=129292&&_<=129338||_>=129340&&_<=129349||_>=129351&&_<=129535||_>=129648&&_<=129660||_>=129664&&_<=129674||_>=129678&&_<=129734||_===129736||_>=129741&&_<=129756||_>=129759&&_<=129770||_>=129775&&_<=129784||_>=131072&&_<=196605||_>=196608&&_<=262141}function E6(_){if(!Number.isSafeInteger(_))throw TypeError(`Expected a code point, got \`${typeof _}\`.`)}function T1(_,{ambiguousAsWide:F=!1}={}){if(E6(_),z_(_)||q_(_)||F&&$_(_))return 2;return 1}var K6=new Intl.Segmenter,M6=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Mark}|\p{Surrogate})+$/v,A6=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,H6=/^\p{RGI_Emoji}$/v;function W6(_){return _.replace(A6,"")}function R6(_){return M6.test(_)}function T6(_,F){let B=0;if(_.length>1){for(let z of _.slice(1))if(z>="＀"&&z<="￯")B+=T1(z.codePointAt(0),F)}return B}function V1(_,F={}){if(typeof _!=="string"||_.length===0)return 0;let{ambiguousIsNarrow:B=!0,countAnsiEscapeCodes:z=!1}=F,q=_;if(!z)q=M0(q);if(q.length===0)return 0;let S=0,$={ambiguousAsWide:!B};for(let{segment:J}of K6.segment(q)){if(R6(J))continue;if(H6.test(J)){S+=2;continue}let X=W6(J).codePointAt(0);S+=T1(X,$),S+=T6(J,$)}return S}function L1({stream:_=process.stdout}={}){return Boolean(_&&_.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import D from"node:process";var V6=3;class S_{#q=0;start(){if(this.#q++,this.#q===1)this.#$()}stop(){if(this.#q<=0)throw Error("`stop` called more times than `start`");if(this.#q--,this.#q===0)this.#_()}#$(){if(D.platform==="win32"||!D.stdin.isTTY)return;D.stdin.setRawMode(!0),D.stdin.on("data",this.#z),D.stdin.resume()}#_(){if(!D.stdin.isTTY)return;D.stdin.off("data",this.#z),D.stdin.pause(),D.stdin.setRawMode(!1)}#z(_){if(_[0]===V6)D.emit("SIGINT")}}var L6=new S_,N1=L6;class J_{#q=0;#$=!1;#_=0;#z=-1;#G=0;#Z=0;#F;#S;#B;#U;#K;#J;#Y;#b;#w;#Q;#X;color;constructor(_){if(typeof _==="string")_={text:_};if(this.#F={color:"cyan",stream:g0.stderr,discardStdin:!0,hideCursor:!0,..._},this.color=this.#F.color,this.spinner=this.#F.spinner,this.#K=this.#F.interval,this.#B=this.#F.stream,this.#J=typeof this.#F.isEnabled==="boolean"?this.#F.isEnabled:L1({stream:this.#B}),this.#Y=typeof this.#F.isSilent==="boolean"?this.#F.isSilent:!1,this.text=this.#F.text,this.prefixText=this.#F.prefixText,this.suffixText=this.#F.suffixText,this.indent=this.#F.indent,g0.env.NODE_ENV==="test")this._stream=this.#B,this._isEnabled=this.#J,Object.defineProperty(this,"_linesToClear",{get(){return this.#q},set(F){this.#q=F}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#z}}),Object.defineProperty(this,"_lineCount",{get(){return this.#_}})}get indent(){return this.#b}set indent(_=0){if(!(_>=0&&Number.isInteger(_)))throw Error("The `indent` option must be an integer from 0 and up");this.#b=_,this.#E()}get interval(){return this.#K??this.#S.interval??100}get spinner(){return this.#S}set spinner(_){if(this.#z=-1,this.#K=void 0,typeof _==="object"){if(!Array.isArray(_.frames)||_.frames.length===0||_.frames.some((F)=>typeof F!=="string"))throw Error("The given spinner must have a non-empty `frames` array of strings");if(_.interval!==void 0&&!(Number.isInteger(_.interval)&&_.interval>0))throw Error("`spinner.interval` must be a positive integer if provided");this.#S=_}else if(!K0())this.#S=E0.line;else if(_===void 0)this.#S=E0.dots;else if(_!=="default"&&E0[_])this.#S=E0[_];else throw Error(`There is no built-in spinner named '${_}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#w}set text(_=""){this.#w=_,this.#E()}get prefixText(){return this.#Q}set prefixText(_=""){this.#Q=_,this.#E()}get suffixText(){return this.#X}set suffixText(_=""){this.#X=_,this.#E()}get isSpinning(){return this.#U!==void 0}#W(_,F,B=!1){let z=typeof _==="function"?_():_;if(typeof z==="string"&&z!=="")return B?F+z:z+F;return""}#M(_=this.#Q,F=" "){return this.#W(_,F,!1)}#A(_=this.#X,F=" "){return this.#W(_,F,!0)}#H(_,F){let B=0;for(let z of M0(_).split(`
33
+ `))B+=Math.max(1,Math.ceil(V1(z)/F));return B}#E(){let _=this.#B.columns??80,F=typeof this.#Q==="function"?"":this.#Q,B=typeof this.#X==="function"?"":this.#X,z=typeof F==="string"&&F!==""?F+" ":"",q=typeof B==="string"&&B!==""?" "+B:"",S="-",$=" ".repeat(this.#b)+z+"-"+(typeof this.#w==="string"?" "+this.#w:"")+q;this.#_=this.#H($,_)}get isEnabled(){return this.#J&&!this.#Y}set isEnabled(_){if(typeof _!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this.#J=_}get isSilent(){return this.#Y}set isSilent(_){if(typeof _!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this.#Y=_}frame(){let _=Date.now();if(this.#z===-1||_-this.#G>=this.interval)this.#z=++this.#z%this.#S.frames.length,this.#G=_;let{frames:F}=this.#S,B=F[this.#z];if(this.color)B=c2[this.color](B);let z=this.#M(this.#Q," "),q=typeof this.text==="string"?" "+this.text:"",S=this.#A(this.#X," ");return z+B+q+S}clear(){if(!this.#J||!this.#B.isTTY)return this;this.#B.cursorTo(0);for(let _=0;_<this.#q;_++){if(_>0)this.#B.moveCursor(0,-1);this.#B.clearLine(1)}if(this.#b||this.#Z!==this.#b)this.#B.cursorTo(this.#b);return this.#Z=this.#b,this.#q=0,this}render(){if(!this.#J||this.#Y)return this;this.clear();let _=this.frame(),F=this.#B.columns??80,B=this.#H(_,F),z=this.#B.rows;if(z&&z>1&&B>z){let q=_.split(`
34
+ `),S=z-1;_=[...q.slice(0,S),"... (content truncated to fit terminal)"].join(`
35
+ `)}return this.#B.write(_),this.#q=this.#H(_,F),this}start(_){if(_)this.text=_;if(this.#Y)return this;if(!this.#J){let F=" ".repeat(this.#b)+this.#M(this.#Q," ")+(this.text?`- ${this.text}`:"")+this.#A(this.#X," ");if(F.trim()!=="")this.#B.write(F+`
36
+ `);return this}if(this.isSpinning)return this;if(this.#F.hideCursor)H1.hide(this.#B);if(this.#F.discardStdin&&g0.stdin.isTTY)this.#$=!0,N1.start();return this.render(),this.#U=setInterval(this.render.bind(this),this.interval),this}stop(){if(clearInterval(this.#U),this.#U=void 0,this.#z=0,this.#J){if(this.clear(),this.#F.hideCursor)H1.show(this.#B)}if(this.#F.discardStdin&&g0.stdin.isTTY&&this.#$)N1.stop(),this.#$=!1;return this}succeed(_){return this.stopAndPersist({symbol:e.success,text:_})}fail(_){return this.stopAndPersist({symbol:e.error,text:_})}warn(_){return this.stopAndPersist({symbol:e.warning,text:_})}info(_){return this.stopAndPersist({symbol:e.info,text:_})}stopAndPersist(_={}){if(this.#Y)return this;let F=_.prefixText??this.#Q,B=this.#M(F," "),z=_.symbol??" ",q=_.text??this.text,$=typeof q==="string"?(z?" ":"")+q:"",J=_.suffixText??this.#X,X=this.#A(J," "),b=B+z+$+X+`
37
+ `;return this.stop(),this.#B.write(b),this}}function I1(_){return new J_(_)}var A0=R(L(),1),m0=null;function N6(_){if(m0)m0.stop();return m0=I1({text:_,color:"cyan"}),m0}function b_(_){return N6(_).start()}async function N(_,F,B){let z=b_(_);try{let q=await F();return z.succeed(B?.successText??A0.default.green("Done")),q}catch(q){throw z.fail(B?.failText??A0.default.red("Failed")),q}}function Q_(_,F){let B=b_(`${F} (0/${_})`);return{update:(z,q)=>{let S=Math.round(z/_*100),$=q?` - ${A0.default.dim(q)}`:"";B.text=`${F} (${z}/${_}) ${A0.default.dim(`${S}%`)}${$}`},succeed:(z)=>{B.succeed(z??`${F} (${_}/${_})`)},fail:(z)=>{B.fail(z)}}}var k=R(L(),1);function j1(_,F){let B=typeof F.key==="function"?F.key(_):_[F.key];return String(B??"")}function X_(_,F,B="left"){let z=Z_(_),q=Math.max(0,F-z.length);if(B==="right")return" ".repeat(q)+_;if(B==="center"){let S=Math.floor(q/2),$=q-S;return" ".repeat(S)+_+" ".repeat($)}return _+" ".repeat(q)}function Z_(_){return _.replace(/\x1b\[[0-9;]*m/g,"")}function I6(_){let{columns:F,rows:B,format:z="table",title:q}=_;if(z==="json")return JSON.stringify(B,null,2);if(z==="csv"){let b=F.map((Z)=>Z.header).join(","),Q=B.map((Z)=>F.map((U)=>`"${j1(Z,U)}"`).join(","));return[b,...Q].join(`
38
+ `)}let S=F.map((b)=>{let Q=b.header.length,Z=Math.max(...B.map((U)=>Z_(j1(U,b)).length),0);return b.width??Math.max(Q,Z)}),$=[];if(q)$.push(""),$.push(k.default.bold(q)),$.push("");let J=F.map((b,Q)=>k.default.bold(k.default.cyan(X_(b.header,S[Q]??b.header.length,b.align)))).join(" ");$.push(J);let X=S.map((b)=>k.default.dim("─".repeat(b))).join(" ");$.push(X);for(let b of B){let Q=F.map((Z,U)=>{let E=j1(b,Z),d=Z.color?Z.color(E):E;return X_(d,S[U]??E.length,Z.align)});$.push(Q.join(" "))}return $.push(""),$.join(`
39
+ `)}function y(_){console.log(I6(_))}function O(_){let F=Math.max(..._.map((B)=>B.key.length));for(let{key:B,value:z}of _){let q=B.padEnd(F),S=z===null?k.default.dim("N/A"):String(z);console.log(`${k.default.cyan(q)} ${S}`)}}function C(_,F){if(console.log(""),console.log(k.default.bold(k.default.underline(_))),F)console.log(F)}function Y_(_){console.log(k.default.green(`✓ ${_}`))}function G_(_){console.log(k.default.red(`✗ ${_}`))}function S0(_){console.log(k.default.yellow(`⚠ ${_}`))}var j6=10;async function f6(_,F,B){let z=[];for(let q=0;q<_.length;q+=B){let S=_.slice(q,q+B),$=await Promise.all(S.map(F));z.push(...$)}return z}async function k6(_){let{org:F,since:B,until:z,membersOnly:q,includeBots:S}=_,$=null;if(q){let U=await N("Fetching organization members...",()=>k0(F),{successText:"Members fetched"});$=new Set(U.map((E)=>E.login))}let J=await N("Fetching repositories...",()=>T2(F),{successText:"Repositories fetched"});console.log(v.default.dim(`Found ${J.length} repositories
40
+ `));let X=new Map,b=Q_(J.length,"Processing repositories"),Q=0;return await f6(J,async(U)=>{try{let E=[];for await(let d of L2(U.full_name,{since:B,until:z})){let Q0=d.author?.login;if(!Q0)continue;if(!S&&d.author?.type==="Bot")continue;if($&&!$.has(Q0))continue;E.push({author:Q0})}for(let d of E){let Q0=X.get(d.author)??0;X.set(d.author,Q0+1)}}catch{}Q++,b.update(Q,U.name)},j6),b.succeed(`Processed ${J.length} repositories`),Array.from(X.entries()).map(([U,E])=>({author:U,count:E})).sort((U,E)=>E.count-U.count)}async function u0(_){let{org:F,since:B,until:z,output:q,top:S}=_;console.log(""),console.log(v.default.bold(`Commit Statistics for ${v.default.cyan(F)}`)),console.log(v.default.dim(k2(B,z))),console.log("");let $=await k6(_);if($.length===0){console.log(v.default.yellow("No commits found in the specified date range"));return}let J=S?$.slice(0,S):$,X=$.reduce((b,Q)=>b+Q.count,0);if(y({columns:[{key:"count",header:"Commits",align:"right",color:(b)=>v.default.yellow(String(b))},{key:"author",header:"Author",color:(b)=>v.default.cyan(String(b))},{key:(b)=>{return`${(b.count/X*100).toFixed(1)}%`},header:"Share",align:"right",color:(b)=>v.default.dim(String(b))}],rows:J,format:q}),console.log(v.default.dim(`Total: ${X} commits from ${$.length} contributors`)),S&&$.length>S)console.log(v.default.dim(`Showing top ${S} of ${$.length} contributors`))}var g=R(L(),1);function P6(_){if(_ instanceof I0)return`${g.default.red("Authentication Error")}
41
+
42
+ ${_.message}`;if(_ instanceof j0){let F=_.resetAt.toLocaleTimeString();return`${g.default.red("Rate Limit Exceeded")}
43
+
44
+ GitHub API rate limit reached. Resets at ${g.default.yellow(F)}`}if(_ instanceof G0){if(_.status===404)return`${g.default.red("Not Found")}
45
+
46
+ The requested resource was not found. Check that the organization name is correct and you have access to it.`;if(_.status===403)return`${g.default.red("Access Denied")}
47
+
48
+ You don't have permission to access this resource. Some features require admin access.`;if(_.status===401)return`${g.default.red("Unauthorized")}
49
+
50
+ Your authentication token is invalid or expired. Try re-authenticating.`;return`${g.default.red("GitHub API Error")}
51
+
52
+ ${_.message}`}if(_ instanceof Error)return`${g.default.red("Error")}
53
+
54
+ ${_.message}`;return`${g.default.red("Unknown Error")}
55
+
56
+ ${String(_)}`}function f1(_){console.error(P6(_)),process.exit(1)}function m(_){return async(...F)=>{try{await _(...F)}catch(B){f1(B)}}}var H0=new r("stats").description("Statistics and metrics commands");H0.command("commits").description("Show commit statistics per member").argument("[org]","Organization name").option("-s, --since <date>","Start date (ISO format or YYYY-MM-DD)").option("-u, --until <date>","End date (ISO format or YYYY-MM-DD)").option("--no-members-only","Include commits from non-members").option("--include-bots","Include commits from bot accounts").option("-o, --output <format>","Output format (table, json, csv)","table").option("-t, --top <n>","Show only top N contributors",Number.parseInt).action(m(async(_,F)=>{if(!_)console.error("Organization name is required. Usage: pondus stats commits <org>"),process.exit(1);let B=P0(),z=F.since?F.since.includes("T")?F.since:`${F.since}T00:00:00Z`:B.since,q=F.until?F.until.includes("T")?F.until:`${F.until}T23:59:59Z`:B.until;await u0({org:_,since:z,until:q,membersOnly:F.membersOnly,includeBots:F.includeBots??!1,output:F.output,top:F.top})}));H0.action(()=>{H0.commands.find((_)=>_.name()==="commits")?.help()});var c0=R(L(),1);async function l0(_){let{org:F,output:B}=_,z=await N("Fetching organization info...",()=>R2(F),{successText:"Organization info fetched"});if(B==="json"){console.log(JSON.stringify(z,null,2));return}if(console.log(""),console.log(c0.default.bold(c0.default.cyan(z.name??z.login))),z.description)console.log(c0.default.dim(z.description));if(console.log(""),C("General"),O([{key:"Login",value:z.login},{key:"Name",value:z.name},{key:"Company",value:z.company},{key:"Location",value:z.location},{key:"Website",value:z.blog},{key:"Email",value:z.email},{key:"Twitter",value:z.twitter_username?`@${z.twitter_username}`:null}]),C("Repositories"),O([{key:"Public repos",value:z.public_repos},{key:"Private repos",value:z.total_private_repos??"N/A"},{key:"Total",value:z.public_repos+(z.total_private_repos??0)}]),z.plan)C("Plan"),O([{key:"Plan name",value:z.plan.name},{key:"Seats",value:z.plan.seats??"Unlimited"},{key:"Filled seats",value:z.plan.filled_seats??"N/A"},{key:"Private repos",value:z.plan.private_repos}]);C("Settings"),O([{key:"Default repo permission",value:z.default_repository_permission??"N/A"},{key:"Members can create repos",value:z.members_can_create_repositories??"N/A"},{key:"2FA required",value:z.two_factor_requirement_enabled??"N/A"},{key:"Web commit signoff",value:z.web_commit_signoff_required??"N/A"}]),C("Security Features (New Repos)"),O([{key:"Advanced Security",value:z.advanced_security_enabled_for_new_repositories??"N/A"},{key:"Dependabot alerts",value:z.dependabot_alerts_enabled_for_new_repositories??"N/A"},{key:"Dependabot updates",value:z.dependabot_security_updates_enabled_for_new_repositories??"N/A"},{key:"Dependency graph",value:z.dependency_graph_enabled_for_new_repositories??"N/A"},{key:"Secret scanning",value:z.secret_scanning_enabled_for_new_repositories??"N/A"},{key:"Push protection",value:z.secret_scanning_push_protection_enabled_for_new_repositories??"N/A"}]),C("Links"),O([{key:"GitHub URL",value:z.html_url},{key:"Created",value:new Date(z.created_at).toLocaleDateString()}]),console.log("")}var a=R(L(),1);async function d0(_){let{org:F,output:B,role:z}=_,q=await N("Fetching members...",()=>k0(F),{successText:"Members fetched"});if(q.length===0){console.log(a.default.yellow("No members found"));return}console.log(""),console.log(a.default.bold(`Members of ${a.default.cyan(F)}`)),console.log(a.default.dim(`${q.length} members total`));let S=q.map(($)=>({login:$.login,type:$.type,profile:$.html_url}));y({columns:[{key:"login",header:"Username",color:($)=>a.default.cyan(String($))},{key:"type",header:"Type",color:($)=>$==="User"?a.default.green(String($)):a.default.yellow(String($))},{key:"profile",header:"Profile URL",color:($)=>a.default.dim(String($))}],rows:S,format:B})}var u=R(L(),1);async function i0(_){let{org:F,output:B}=_,z=await N("Fetching teams...",()=>V2(F),{successText:"Teams fetched"});if(z.length===0){console.log(u.default.yellow("No teams found"));return}console.log(""),console.log(u.default.bold(`Teams in ${u.default.cyan(F)}`)),console.log(u.default.dim(`${z.length} teams total`));let q=z.map((S)=>({name:S.name,slug:S.slug,privacy:S.privacy,members:S.members_count,repos:S.repos_count,parent:S.parent?.name??"-"}));y({columns:[{key:"name",header:"Name",color:(S)=>u.default.cyan(String(S))},{key:"slug",header:"Slug",color:(S)=>u.default.dim(String(S))},{key:"privacy",header:"Privacy",color:(S)=>S==="secret"?u.default.yellow(String(S)):u.default.green(String(S))},{key:"members",header:"Members",align:"right"},{key:"repos",header:"Repos",align:"right"},{key:"parent",header:"Parent",color:(S)=>S==="-"?u.default.dim(String(S)):String(S)}],rows:q,format:B})}var c=R(L(),1);async function n0(_){let{org:F,output:B}=_,z=await N("Fetching webhooks...",()=>N2(F),{successText:"Webhooks fetched"});if(z.length===0){console.log(c.default.yellow("No organization webhooks found"));return}console.log(""),console.log(c.default.bold(`Webhooks in ${c.default.cyan(F)}`)),console.log(c.default.dim(`${z.length} webhooks total`));let q=z.map((S)=>({id:S.id,name:S.name,active:S.active?"Yes":"No",url:S.config.url??"N/A",events:S.events.slice(0,3).join(", ")+(S.events.length>3?"...":"")}));y({columns:[{key:"id",header:"ID",align:"right"},{key:"name",header:"Name",color:(S)=>c.default.cyan(String(S))},{key:"active",header:"Active",color:(S)=>S==="Yes"?c.default.green(String(S)):c.default.red(String(S))},{key:"url",header:"URL",color:(S)=>c.default.dim(String(S))},{key:"events",header:"Events",color:(S)=>c.default.dim(String(S))}],rows:q,format:B})}var T=R(L(),1);async function a0(_){let{org:F,runners:B,secrets:z,output:q}=_;try{let S=await N("Fetching Actions settings...",()=>I2(F));if(q==="json"){let $={settings:S};if(B)try{$.runners=await Q1(F)}catch{$.runners={error:"No access"}}if(z)try{$.secrets=await X1(F)}catch{$.secrets={error:"No access"}}console.log(JSON.stringify($,null,2));return}console.log(""),console.log(T.default.bold(`GitHub Actions Settings for ${T.default.cyan(F)}`)),C("Permissions"),O([{key:"Enabled repositories",value:S.enabled_repositories},{key:"Allowed actions",value:S.allowed_actions??"N/A"}])}catch{S0("Could not fetch Actions settings (admin access required)")}if(B)try{let S=await N("Fetching self-hosted runners...",()=>Q1(F));if(S.runners.length===0)console.log(T.default.dim(`
57
+ No self-hosted runners configured`));else{C("Self-Hosted Runners"),console.log(T.default.dim(`${S.total_count} runners total`));let $=S.runners.map((J)=>({id:J.id,name:J.name,os:J.os,status:J.status,busy:J.busy?"Yes":"No",labels:J.labels.map((X)=>X.name).join(", ")}));y({columns:[{key:"name",header:"Name",color:(J)=>T.default.cyan(String(J))},{key:"os",header:"OS"},{key:"status",header:"Status",color:(J)=>J==="online"?T.default.green(String(J)):T.default.yellow(String(J))},{key:"busy",header:"Busy",color:(J)=>J==="Yes"?T.default.yellow(String(J)):T.default.dim(String(J))},{key:"labels",header:"Labels",color:(J)=>T.default.dim(String(J))}],rows:$,format:q})}}catch{S0("Could not fetch runners (admin access required)")}if(z)try{let S=await N("Fetching organization secrets...",()=>X1(F));if(S.secrets.length===0)console.log(T.default.dim(`
58
+ No organization secrets configured`));else{C("Organization Secrets"),console.log(T.default.dim(`${S.total_count} secrets total (names only)`));let $=S.secrets.map((J)=>({name:J.name,visibility:J.visibility,updated:new Date(J.updated_at).toLocaleDateString()}));y({columns:[{key:"name",header:"Name",color:(J)=>T.default.cyan(String(J))},{key:"visibility",header:"Visibility",color:(J)=>J==="all"?T.default.yellow(String(J)):J==="private"?T.default.green(String(J)):T.default.blue(String(J))},{key:"updated",header:"Updated",color:(J)=>T.default.dim(String(J))}],rows:$,format:q})}}catch{S0("Could not fetch secrets (admin access required)")}console.log("")}var p=new r("org").description("Organization settings and info commands");p.command("info").description("Show organization information and settings").argument("[org]","Organization name").option("-o, --output <format>","Output format (table, json)","table").action(m(async(_,F)=>{if(!_)console.error("Organization name is required. Usage: pondus org info <org>"),process.exit(1);await l0({org:_,output:F.output})}));p.command("members").description("List organization members").argument("[org]","Organization name").option("-r, --role <role>","Filter by role (admin, member, all)","all").option("-o, --output <format>","Output format (table, json, csv)","table").action(m(async(_,F)=>{if(!_)console.error("Organization name is required. Usage: pondus org members <org>"),process.exit(1);await d0({org:_,role:F.role,output:F.output})}));p.command("teams").description("List organization teams").argument("[org]","Organization name").option("-o, --output <format>","Output format (table, json, csv)","table").action(m(async(_,F)=>{if(!_)console.error("Organization name is required. Usage: pondus org teams <org>"),process.exit(1);await i0({org:_,output:F.output})}));p.command("webhooks").description("List organization webhooks").argument("[org]","Organization name").option("-o, --output <format>","Output format (table, json, csv)","table").action(m(async(_,F)=>{if(!_)console.error("Organization name is required. Usage: pondus org webhooks <org>"),process.exit(1);await n0({org:_,output:F.output})}));p.command("actions").description("Show GitHub Actions settings").argument("[org]","Organization name").option("--runners","Show self-hosted runners").option("--secrets","Show organization secrets (names only)").option("-o, --output <format>","Output format (table, json)","table").action(m(async(_,F)=>{if(!_)console.error("Organization name is required. Usage: pondus org actions <org>"),process.exit(1);await a0({org:_,runners:F.runners??!1,secrets:F.secrets??!1,output:F.output})}));p.action(()=>{p.help()});var _0=R(L(),1);var W0=new r("config").description("CLI configuration and status");W0.command("auth").description("Show authentication status").action(m(async()=>{console.log(""),console.log(_0.default.bold("Authentication Status")),console.log("");let _=await M2(),F=await Y0();if(O([{key:"GitHub CLI",value:_?"Installed":"Not found"},{key:"Auth method",value:F.method==="none"?"None":F.method},{key:"Status",value:F.valid?"Valid":"Invalid"}]),F.valid&&F.username){if(console.log(""),Y_(`Authenticated as ${_0.default.cyan(F.username)}`),F.scopes&&F.scopes.length>0)console.log(_0.default.dim(`Scopes: ${F.scopes.join(", ")}`))}else if(F.method==="none")console.log(""),S0("Not authenticated"),console.log(""),console.log("To authenticate, either:"),console.log(` 1. Run ${_0.default.cyan("gh auth login")} (recommended)`),console.log(` 2. Set ${_0.default.cyan("GITHUB_TOKEN")} environment variable`);else console.log(""),G_("Authentication token is invalid or expired"),console.log(""),console.log("Try re-authenticating:"),console.log(` ${_0.default.cyan("gh auth login")}`);console.log("")}));W0.action(()=>{W0.help()});import{stripVTControlCharacters as m1}from"node:util";var j=R(P1(),1);import{stdin as C6,stdout as v6}from"node:process";var T_=R(L(),1);import w_ from"node:readline";import{Writable as x6}from"node:stream";function h6({onlyFirst:_=!1}={}){let F=["[\\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(F,_?void 0:"g")}var D6=h6();function V_(_){if(typeof _!="string")throw TypeError(`Expected a \`string\`, got \`${typeof _}\``);return _.replace(D6,"")}function L_(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}var N_={exports:{}};(function(_){var F={};_.exports=F,F.eastAsianWidth=function(z){var q=z.charCodeAt(0),S=z.length==2?z.charCodeAt(1):0,$=q;return 55296<=q&&q<=56319&&56320<=S&&S<=57343&&(q&=1023,S&=1023,$=q<<10|S,$+=65536),$==12288||65281<=$&&$<=65376||65504<=$&&$<=65510?"F":$==8361||65377<=$&&$<=65470||65474<=$&&$<=65479||65482<=$&&$<=65487||65490<=$&&$<=65495||65498<=$&&$<=65500||65512<=$&&$<=65518?"H":4352<=$&&$<=4447||4515<=$&&$<=4519||4602<=$&&$<=4607||9001<=$&&$<=9002||11904<=$&&$<=11929||11931<=$&&$<=12019||12032<=$&&$<=12245||12272<=$&&$<=12283||12289<=$&&$<=12350||12353<=$&&$<=12438||12441<=$&&$<=12543||12549<=$&&$<=12589||12593<=$&&$<=12686||12688<=$&&$<=12730||12736<=$&&$<=12771||12784<=$&&$<=12830||12832<=$&&$<=12871||12880<=$&&$<=13054||13056<=$&&$<=19903||19968<=$&&$<=42124||42128<=$&&$<=42182||43360<=$&&$<=43388||44032<=$&&$<=55203||55216<=$&&$<=55238||55243<=$&&$<=55291||63744<=$&&$<=64255||65040<=$&&$<=65049||65072<=$&&$<=65106||65108<=$&&$<=65126||65128<=$&&$<=65131||110592<=$&&$<=110593||127488<=$&&$<=127490||127504<=$&&$<=127546||127552<=$&&$<=127560||127568<=$&&$<=127569||131072<=$&&$<=194367||177984<=$&&$<=196605||196608<=$&&$<=262141?"W":32<=$&&$<=126||162<=$&&$<=163||165<=$&&$<=166||$==172||$==175||10214<=$&&$<=10221||10629<=$&&$<=10630?"Na":$==161||$==164||167<=$&&$<=168||$==170||173<=$&&$<=174||176<=$&&$<=180||182<=$&&$<=186||188<=$&&$<=191||$==198||$==208||215<=$&&$<=216||222<=$&&$<=225||$==230||232<=$&&$<=234||236<=$&&$<=237||$==240||242<=$&&$<=243||247<=$&&$<=250||$==252||$==254||$==257||$==273||$==275||$==283||294<=$&&$<=295||$==299||305<=$&&$<=307||$==312||319<=$&&$<=322||$==324||328<=$&&$<=331||$==333||338<=$&&$<=339||358<=$&&$<=359||$==363||$==462||$==464||$==466||$==468||$==470||$==472||$==474||$==476||$==593||$==609||$==708||$==711||713<=$&&$<=715||$==717||$==720||728<=$&&$<=731||$==733||$==735||768<=$&&$<=879||913<=$&&$<=929||931<=$&&$<=937||945<=$&&$<=961||963<=$&&$<=969||$==1025||1040<=$&&$<=1103||$==1105||$==8208||8211<=$&&$<=8214||8216<=$&&$<=8217||8220<=$&&$<=8221||8224<=$&&$<=8226||8228<=$&&$<=8231||$==8240||8242<=$&&$<=8243||$==8245||$==8251||$==8254||$==8308||$==8319||8321<=$&&$<=8324||$==8364||$==8451||$==8453||$==8457||$==8467||$==8470||8481<=$&&$<=8482||$==8486||$==8491||8531<=$&&$<=8532||8539<=$&&$<=8542||8544<=$&&$<=8555||8560<=$&&$<=8569||$==8585||8592<=$&&$<=8601||8632<=$&&$<=8633||$==8658||$==8660||$==8679||$==8704||8706<=$&&$<=8707||8711<=$&&$<=8712||$==8715||$==8719||$==8721||$==8725||$==8730||8733<=$&&$<=8736||$==8739||$==8741||8743<=$&&$<=8748||$==8750||8756<=$&&$<=8759||8764<=$&&$<=8765||$==8776||$==8780||$==8786||8800<=$&&$<=8801||8804<=$&&$<=8807||8810<=$&&$<=8811||8814<=$&&$<=8815||8834<=$&&$<=8835||8838<=$&&$<=8839||$==8853||$==8857||$==8869||$==8895||$==8978||9312<=$&&$<=9449||9451<=$&&$<=9547||9552<=$&&$<=9587||9600<=$&&$<=9615||9618<=$&&$<=9621||9632<=$&&$<=9633||9635<=$&&$<=9641||9650<=$&&$<=9651||9654<=$&&$<=9655||9660<=$&&$<=9661||9664<=$&&$<=9665||9670<=$&&$<=9672||$==9675||9678<=$&&$<=9681||9698<=$&&$<=9701||$==9711||9733<=$&&$<=9734||$==9737||9742<=$&&$<=9743||9748<=$&&$<=9749||$==9756||$==9758||$==9792||$==9794||9824<=$&&$<=9825||9827<=$&&$<=9829||9831<=$&&$<=9834||9836<=$&&$<=9837||$==9839||9886<=$&&$<=9887||9918<=$&&$<=9919||9924<=$&&$<=9933||9935<=$&&$<=9953||$==9955||9960<=$&&$<=9983||$==10045||$==10071||10102<=$&&$<=10111||11093<=$&&$<=11097||12872<=$&&$<=12879||57344<=$&&$<=63743||65024<=$&&$<=65039||$==65533||127232<=$&&$<=127242||127248<=$&&$<=127277||127280<=$&&$<=127337||127344<=$&&$<=127386||917760<=$&&$<=917999||983040<=$&&$<=1048573||1048576<=$&&$<=1114109?"A":"N"},F.characterLength=function(z){var q=this.eastAsianWidth(z);return q=="F"||q=="W"||q=="A"?2:1};function B(z){return z.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}F.length=function(z){for(var q=B(z),S=0,$=0;$<q.length;$++)S=S+this.characterLength(q[$]);return S},F.slice=function(z,q,S){textLen=F.length(z),q=q||0,S=S||1,q<0&&(q=textLen+q),S<0&&(S=textLen+S);for(var $="",J=0,X=B(z),b=0;b<X.length;b++){var Q=X[b],Z=F.length(Q);if(J>=q-(Z==2?1:0))if(J+Z<=S)$+=Q;else break;J+=Z}return $}})(N_);var g6=N_.exports,m6=L_(g6),u6=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},c6=L_(u6);function R0(_,F={}){if(typeof _!="string"||_.length===0||(F={ambiguousIsNarrow:!0,...F},_=V_(_),_.length===0))return 0;_=_.replace(c6()," ");let B=F.ambiguousIsNarrow?1:2,z=0;for(let q of _){let S=q.codePointAt(0);if(S<=31||S>=127&&S<=159||S>=768&&S<=879)continue;switch(m6.eastAsianWidth(q)){case"F":case"W":z+=2;break;case"A":z+=B;break;default:z+=1}}return z}var y1=10,E_=(_=0)=>(F)=>`\x1B[${F+_}m`,K_=(_=0)=>(F)=>`\x1B[${38+_};5;${F}m`,M_=(_=0)=>(F,B,z)=>`\x1B[${38+_};2;${F};${B};${z}m`,A={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(A.modifier);var l6=Object.keys(A.color),d6=Object.keys(A.bgColor);[...l6,...d6];function i6(){let _=new Map;for(let[F,B]of Object.entries(A)){for(let[z,q]of Object.entries(B))A[z]={open:`\x1B[${q[0]}m`,close:`\x1B[${q[1]}m`},B[z]=A[z],_.set(q[0],q[1]);Object.defineProperty(A,F,{value:B,enumerable:!1})}return Object.defineProperty(A,"codes",{value:_,enumerable:!1}),A.color.close="\x1B[39m",A.bgColor.close="\x1B[49m",A.color.ansi=E_(),A.color.ansi256=K_(),A.color.ansi16m=M_(),A.bgColor.ansi=E_(y1),A.bgColor.ansi256=K_(y1),A.bgColor.ansi16m=M_(y1),Object.defineProperties(A,{rgbToAnsi256:{value:(F,B,z)=>F===B&&B===z?F<8?16:F>248?231:Math.round((F-8)/247*24)+232:16+36*Math.round(F/255*5)+6*Math.round(B/255*5)+Math.round(z/255*5),enumerable:!1},hexToRgb:{value:(F)=>{let B=/[a-f\d]{6}|[a-f\d]{3}/i.exec(F.toString(16));if(!B)return[0,0,0];let[z]=B;z.length===3&&(z=[...z].map((S)=>S+S).join(""));let q=Number.parseInt(z,16);return[q>>16&255,q>>8&255,q&255]},enumerable:!1},hexToAnsi256:{value:(F)=>A.rgbToAnsi256(...A.hexToRgb(F)),enumerable:!1},ansi256ToAnsi:{value:(F)=>{if(F<8)return 30+F;if(F<16)return 90+(F-8);let B,z,q;if(F>=232)B=((F-232)*10+8)/255,z=B,q=B;else{F-=16;let J=F%36;B=Math.floor(F/36)/5,z=Math.floor(J/6)/5,q=J%6/5}let S=Math.max(B,z,q)*2;if(S===0)return 30;let $=30+(Math.round(q)<<2|Math.round(z)<<1|Math.round(B));return S===2&&($+=60),$},enumerable:!1},rgbToAnsi:{value:(F,B,z)=>A.ansi256ToAnsi(A.rgbToAnsi256(F,B,z)),enumerable:!1},hexToAnsi:{value:(F)=>A.ansi256ToAnsi(A.hexToAnsi256(F)),enumerable:!1}}),A}var n6=i6(),t0=new Set(["\x1B","›"]),a6=39,v1="\x07",I_="[",p6="]",j_="m",x1=`${p6}8;;`,A_=(_)=>`${t0.values().next().value}${I_}${_}${j_}`,H_=(_)=>`${t0.values().next().value}${x1}${_}${v1}`,r6=(_)=>_.split(" ").map((F)=>R0(F)),O1=(_,F,B)=>{let z=[...F],q=!1,S=!1,$=R0(V_(_[_.length-1]));for(let[J,X]of z.entries()){let b=R0(X);if($+b<=B?_[_.length-1]+=X:(_.push(X),$=0),t0.has(X)&&(q=!0,S=z.slice(J+1).join("").startsWith(x1)),q){S?X===v1&&(q=!1,S=!1):X===j_&&(q=!1);continue}$+=b,$===B&&J<z.length-1&&(_.push(""),$=0)}!$&&_[_.length-1].length>0&&_.length>1&&(_[_.length-2]+=_.pop())},t6=(_)=>{let F=_.split(" "),B=F.length;for(;B>0&&!(R0(F[B-1])>0);)B--;return B===F.length?_:F.slice(0,B).join(" ")+F.slice(B).join("")},s6=(_,F,B={})=>{if(B.trim!==!1&&_.trim()==="")return"";let z="",q,S,$=r6(_),J=[""];for(let[b,Q]of _.split(" ").entries()){B.trim!==!1&&(J[J.length-1]=J[J.length-1].trimStart());let Z=R0(J[J.length-1]);if(b!==0&&(Z>=F&&(B.wordWrap===!1||B.trim===!1)&&(J.push(""),Z=0),(Z>0||B.trim===!1)&&(J[J.length-1]+=" ",Z++)),B.hard&&$[b]>F){let U=F-Z,E=1+Math.floor(($[b]-U-1)/F);Math.floor(($[b]-1)/F)<E&&J.push(""),O1(J,Q,F);continue}if(Z+$[b]>F&&Z>0&&$[b]>0){if(B.wordWrap===!1&&Z<F){O1(J,Q,F);continue}J.push("")}if(Z+$[b]>F&&B.wordWrap===!1){O1(J,Q,F);continue}J[J.length-1]+=Q}B.trim!==!1&&(J=J.map((b)=>t6(b)));let X=[...J.join(`
59
+ `)];for(let[b,Q]of X.entries()){if(z+=Q,t0.has(Q)){let{groups:U}=new RegExp(`(?:\\${I_}(?<code>\\d+)m|\\${x1}(?<uri>.*)${v1})`).exec(X.slice(b).join(""))||{groups:{}};if(U.code!==void 0){let E=Number.parseFloat(U.code);q=E===a6?void 0:E}else U.uri!==void 0&&(S=U.uri.length===0?void 0:U.uri)}let Z=n6.codes.get(Number(q));X[b+1]===`
60
+ `?(S&&(z+=H_("")),q&&Z&&(z+=A_(Z))):Q===`
61
+ `&&(q&&Z&&(z+=A_(q)),S&&(z+=H_(S)))}return z};function W_(_,F,B){return String(_).normalize().replace(/\r\n/g,`
62
+ `).split(`
63
+ `).map((z)=>s6(z,F,B)).join(`
64
+ `)}var o6=["up","down","left","right","space","enter","cancel"],r0={actions:new Set(o6),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};function f_(_,F){if(typeof _=="string")return r0.aliases.get(_)===F;for(let B of _)if(B!==void 0&&f_(B,F))return!0;return!1}function e6(_,F){if(_===F)return;let B=_.split(`
65
+ `),z=F.split(`
66
+ `),q=[];for(let S=0;S<Math.max(B.length,z.length);S++)B[S]!==z[S]&&q.push(S);return q}var l8=globalThis.process.platform.startsWith("win"),C1=Symbol("clack:cancel");function V(_){return _===C1}function p0(_,F){let B=_;B.isTTY&&B.setRawMode(F)}var _5=Object.defineProperty,F5=(_,F,B)=>(F in _)?_5(_,F,{enumerable:!0,configurable:!0,writable:!0,value:B}):_[F]=B,I=(_,F,B)=>(F5(_,typeof F!="symbol"?F+"":F,B),B);class s0{constructor(_,F=!0){I(this,"input"),I(this,"output"),I(this,"_abortSignal"),I(this,"rl"),I(this,"opts"),I(this,"_render"),I(this,"_track",!1),I(this,"_prevFrame",""),I(this,"_subscribers",new Map),I(this,"_cursor",0),I(this,"state","initial"),I(this,"error",""),I(this,"value");let{input:B=C6,output:z=v6,render:q,signal:S,...$}=_;this.opts=$,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=q.bind(this),this._track=F,this._abortSignal=S,this.input=B,this.output=z}unsubscribe(){this._subscribers.clear()}setSubscriber(_,F){let B=this._subscribers.get(_)??[];B.push(F),this._subscribers.set(_,B)}on(_,F){this.setSubscriber(_,{cb:F})}once(_,F){this.setSubscriber(_,{cb:F,once:!0})}emit(_,...F){let B=this._subscribers.get(_)??[],z=[];for(let q of B)q.cb(...F),q.once&&z.push(()=>B.splice(B.indexOf(q),1));for(let q of z)q()}prompt(){return new Promise((_,F)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),_(C1);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let B=new x6;B._write=(z,q,S)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),S()},this.input.pipe(B),this.rl=w_.createInterface({input:this.input,output:B,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),w_.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),p0(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(j.cursor.show),this.output.off("resize",this.render),p0(this.input,!1),_(this.value)}),this.once("cancel",()=>{this.output.write(j.cursor.show),this.output.off("resize",this.render),p0(this.input,!1),_(C1)})})}onKeypress(_,F){if(this.state==="error"&&(this.state="active"),F?.name&&(!this._track&&r0.aliases.has(F.name)&&this.emit("cursor",r0.aliases.get(F.name)),r0.actions.has(F.name)&&this.emit("cursor",F.name)),_&&(_.toLowerCase()==="y"||_.toLowerCase()==="n")&&this.emit("confirm",_.toLowerCase()==="y"),_==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),_&&this.emit("key",_.toLowerCase()),F?.name==="return"){if(this.opts.validate){let B=this.opts.validate(this.value);B&&(this.error=B instanceof Error?B.message:B,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}f_([_,F?.name,F?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
67
+ `),p0(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let _=W_(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
68
+ `).length-1;this.output.write(j.cursor.move(-999,_*-1))}render(){let _=W_(this._render(this)??"",process.stdout.columns,{hard:!0});if(_!==this._prevFrame){if(this.state==="initial")this.output.write(j.cursor.hide);else{let F=e6(this._prevFrame,_);if(this.restoreCursor(),F&&F?.length===1){let B=F[0];this.output.write(j.cursor.move(0,B)),this.output.write(j.erase.lines(1));let z=_.split(`
69
+ `);this.output.write(z[B]),this._prevFrame=_,this.output.write(j.cursor.move(0,z.length-B-1));return}if(F&&F?.length>1){let B=F[0];this.output.write(j.cursor.move(0,B)),this.output.write(j.erase.down());let z=_.split(`
70
+ `).slice(B);this.output.write(z.join(`
71
+ `)),this._prevFrame=_;return}this.output.write(j.erase.down())}this.output.write(_),this.state==="initial"&&(this.state="active"),this._prevFrame=_}}}class h1 extends s0{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(_){super(_,!1),this.value=!!_.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(F)=>{this.output.write(j.cursor.move(0,-1)),this.value=F,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var B5;B5=new WeakMap;var $5=Object.defineProperty,z5=(_,F,B)=>(F in _)?$5(_,F,{enumerable:!0,configurable:!0,writable:!0,value:B}):_[F]=B,R_=(_,F,B)=>(z5(_,typeof F!="symbol"?F+"":F,B),B);class D1 extends s0{constructor(_){super(_,!1),R_(this,"options"),R_(this,"cursor",0),this.options=_.options,this.cursor=this.options.findIndex(({value:F})=>F===_.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(F)=>{switch(F){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}class g1 extends s0{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}█`;let _=this.value.slice(0,this.cursor),[F,...B]=this.value.slice(this.cursor);return`${_}${T_.default.inverse(F)}${B.join("")}`}get cursor(){return this._cursor}constructor(_){super(_),this.on("finalize",()=>{this.value||(this.value=_.defaultValue)})}}var Y=R(L(),1),P_=R(P1(),1);import x from"node:process";function q5(){return x.platform!=="win32"?x.env.TERM!=="linux":!!x.env.CI||!!x.env.WT_SESSION||!!x.env.TERMINUS_SUBLIME||x.env.ConEmuTask==="{cmd::Cmder}"||x.env.TERM_PROGRAM==="Terminus-Sublime"||x.env.TERM_PROGRAM==="vscode"||x.env.TERM==="xterm-256color"||x.env.TERM==="alacritty"||x.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var S5=q5(),W=(_,F)=>S5?_:F,J5=W("◆","*"),b5=W("■","x"),Q5=W("▲","x"),y_=W("◇","o"),X5=W("┌","T"),H=W("│","|"),J0=W("└","—"),u1=W("●",">"),c1=W("○"," "),_F=W("◻","[•]"),FF=W("◼","[+]"),BF=W("◻","[ ]"),$F=W("▪","•"),k_=W("─","-"),Z5=W("╮","+"),Y5=W("├","+"),G5=W("╯","+"),zF=W("●","•"),qF=W("◆","*"),SF=W("▲","!"),JF=W("■","x"),l1=(_)=>{switch(_){case"initial":case"active":return Y.default.cyan(J5);case"cancel":return Y.default.red(b5);case"error":return Y.default.yellow(Q5);case"submit":return Y.default.green(y_)}},U5=(_)=>{let{cursor:F,options:B,style:z}=_,q=_.maxItems??Number.POSITIVE_INFINITY,S=Math.max(process.stdout.rows-4,0),$=Math.min(S,Math.max(q,5)),J=0;F>=J+$-3?J=Math.max(Math.min(F-$+3,B.length-$),0):F<J+2&&(J=Math.max(F-2,0));let X=$<B.length&&J>0,b=$<B.length&&J+$<B.length;return B.slice(J,J+$).map((Q,Z,U)=>{let E=Z===0&&X,d=Z===U.length-1&&b;return E||d?Y.default.dim("..."):z(Q,Z+J===F)})},o0=(_)=>new g1({validate:_.validate,placeholder:_.placeholder,defaultValue:_.defaultValue,initialValue:_.initialValue,render(){let F=`${Y.default.gray(H)}
72
+ ${l1(this.state)} ${_.message}
73
+ `,B=_.placeholder?Y.default.inverse(_.placeholder[0])+Y.default.dim(_.placeholder.slice(1)):Y.default.inverse(Y.default.hidden("_")),z=this.value?this.valueWithCursor:B;switch(this.state){case"error":return`${F.trim()}
74
+ ${Y.default.yellow(H)} ${z}
75
+ ${Y.default.yellow(J0)} ${Y.default.yellow(this.error)}
76
+ `;case"submit":return`${F}${Y.default.gray(H)} ${Y.default.dim(this.value||_.placeholder)}`;case"cancel":return`${F}${Y.default.gray(H)} ${Y.default.strikethrough(Y.default.dim(this.value??""))}${this.value?.trim()?`
77
+ ${Y.default.gray(H)}`:""}`;default:return`${F}${Y.default.cyan(H)} ${z}
78
+ ${Y.default.cyan(J0)}
79
+ `}}}).prompt();var F0=(_)=>{let F=_.active??"Yes",B=_.inactive??"No";return new h1({active:F,inactive:B,initialValue:_.initialValue??!0,render(){let z=`${Y.default.gray(H)}
80
+ ${l1(this.state)} ${_.message}
81
+ `,q=this.value?F:B;switch(this.state){case"submit":return`${z}${Y.default.gray(H)} ${Y.default.dim(q)}`;case"cancel":return`${z}${Y.default.gray(H)} ${Y.default.strikethrough(Y.default.dim(q))}
82
+ ${Y.default.gray(H)}`;default:return`${z}${Y.default.cyan(H)} ${this.value?`${Y.default.green(u1)} ${F}`:`${Y.default.dim(c1)} ${Y.default.dim(F)}`} ${Y.default.dim("/")} ${this.value?`${Y.default.dim(c1)} ${Y.default.dim(B)}`:`${Y.default.green(u1)} ${B}`}
83
+ ${Y.default.cyan(J0)}
84
+ `}}}).prompt()},t=(_)=>{let F=(B,z)=>{let q=B.label??String(B.value);switch(z){case"selected":return`${Y.default.dim(q)}`;case"active":return`${Y.default.green(u1)} ${q} ${B.hint?Y.default.dim(`(${B.hint})`):""}`;case"cancelled":return`${Y.default.strikethrough(Y.default.dim(q))}`;default:return`${Y.default.dim(c1)} ${Y.default.dim(q)}`}};return new D1({options:_.options,initialValue:_.initialValue,render(){let B=`${Y.default.gray(H)}
85
+ ${l1(this.state)} ${_.message}
86
+ `;switch(this.state){case"submit":return`${B}${Y.default.gray(H)} ${F(this.options[this.cursor],"selected")}`;case"cancel":return`${B}${Y.default.gray(H)} ${F(this.options[this.cursor],"cancelled")}
87
+ ${Y.default.gray(H)}`;default:return`${B}${Y.default.cyan(H)} ${U5({cursor:this.cursor,options:this.options,maxItems:_.maxItems,style:(z,q)=>F(z,q?"active":"inactive")}).join(`
88
+ ${Y.default.cyan(H)} `)}
89
+ ${Y.default.cyan(J0)}
90
+ `}}}).prompt()};var d1=(_="",F="")=>{let B=`
91
+ ${_}
92
+ `.split(`
93
+ `),z=m1(F).length,q=Math.max(B.reduce(($,J)=>{let X=m1(J);return X.length>$?X.length:$},0),z)+2,S=B.map(($)=>`${Y.default.gray(H)} ${Y.default.dim($)}${" ".repeat(q-m1($).length)}${Y.default.gray(H)}`).join(`
94
+ `);process.stdout.write(`${Y.default.gray(H)}
95
+ ${Y.default.green(y_)} ${Y.default.reset(F)} ${Y.default.gray(k_.repeat(Math.max(q-z-1,1))+Z5)}
96
+ ${S}
97
+ ${Y.default.gray(Y5+k_.repeat(q+2)+G5)}
98
+ `)},s=(_="")=>{process.stdout.write(`${Y.default.gray(J0)} ${Y.default.red(_)}
99
+
100
+ `)},i1=(_="")=>{process.stdout.write(`${Y.default.gray(X5)} ${_}
101
+ `)},n1=(_="")=>{process.stdout.write(`${Y.default.gray(H)}
102
+ ${Y.default.gray(J0)} ${_}
103
+
104
+ `)};var bF=`${Y.default.gray(H)} `;var h=R(L(),1);var a1=R(L(),1);async function p1(_){if(_){let z=await F0({message:`Use organization ${a1.default.cyan(_)}?`,initialValue:!0});if(V(z))s("Operation cancelled"),process.exit(0);if(z)return _}let F=[];try{F=(await j2()).map((q)=>({value:q.login,label:q.login}))}catch{}if(F.length>0){let z=await t({message:"Select an organization",options:[...F,{value:"__other__",label:a1.default.dim("Enter manually...")}]});if(V(z))s("Operation cancelled"),process.exit(0);if(z!=="__other__")return z}let B=await o0({message:"Enter organization name",placeholder:"my-organization",validate:(z)=>{if(!z.trim())return"Organization name is required";if(!/^[a-zA-Z0-9-]+$/.test(z))return"Invalid organization name";return}});if(V(B))s("Operation cancelled"),process.exit(0);return B}async function C_(){let _=P0(),F=await t({message:"Select date range",options:[{value:"year",label:`This year (${new Date().getFullYear()})`},{value:"quarter",label:"This quarter"},{value:"month",label:"This month"},{value:"last30",label:"Last 30 days"},{value:"last90",label:"Last 90 days"},{value:"custom",label:"Custom range"}]});if(V(F))s("Operation cancelled"),process.exit(0);let B=new Date;switch(F){case"year":return _;case"quarter":{let q=Math.floor(B.getMonth()/3)*3;return{since:new Date(B.getFullYear(),q,1).toISOString(),until:new Date(B.getFullYear(),q+3,0,23,59,59).toISOString()}}case"month":return{since:new Date(B.getFullYear(),B.getMonth(),1).toISOString(),until:new Date(B.getFullYear(),B.getMonth()+1,0,23,59,59).toISOString()};case"last30":return{since:new Date(B.getTime()-2592000000).toISOString(),until:B.toISOString()};case"last90":return{since:new Date(B.getTime()-7776000000).toISOString(),until:B.toISOString()};case"custom":{let z=await o0({message:"Start date (YYYY-MM-DD)",placeholder:_.since.split("T")[0],validate:(S)=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(S))return"Use YYYY-MM-DD format";return}});if(V(z))s("Operation cancelled"),process.exit(0);let q=await o0({message:"End date (YYYY-MM-DD)",placeholder:_.until.split("T")[0],validate:(S)=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(S))return"Use YYYY-MM-DD format";return}});if(V(q))s("Operation cancelled"),process.exit(0);return{since:`${z}T00:00:00Z`,until:`${q}T23:59:59Z`}}default:return _}}async function r1(){let _=await t({message:"Output format",options:[{value:"table",label:"Table (formatted)"},{value:"json",label:"JSON"},{value:"csv",label:"CSV"}]});if(V(_))s("Operation cancelled"),process.exit(0);return _}async function t1(){try{i1(h.default.bgCyan(h.default.black(" specto ")));let _=await Y0();if(!_.valid)d1(`Not authenticated. Run ${h.default.cyan("specto config auth")} for details.
105
+ Or authenticate with ${h.default.cyan("gh auth login")}`,"Authentication"),process.exit(1);console.log(h.default.dim(`Authenticated as ${_.username}
106
+ `));while(!0){let F=await t({message:"What would you like to do?",options:[{value:"stats",label:"\uD83D\uDCCA Statistics - Commit metrics and activity"},{value:"org",label:"\uD83C\uDFE2 Organization - Settings and info"},{value:"config",label:"⚙️ Config - Authentication status"},{value:"exit",label:"\uD83D\uDC4B Exit"}]});if(V(F)||F==="exit")n1("Goodbye!"),process.exit(0);await w5(F)}}catch(_){f1(_)}}async function w5(_){switch(_){case"stats":await E5();break;case"org":await K5();break;case"config":await M5();break}}async function E5(){let _=await t({message:"Select statistics type",options:[{value:"commits",label:"Commit statistics - Commits per member"}]});if(V(_))return;let F=await p1(),{since:B,until:z}=await C_(),q=await r1(),S=await F0({message:"Only include organization members?",initialValue:!0});if(V(S))return;await u0({org:F,since:B,until:z,membersOnly:S,includeBots:!1,output:q}),await s1()}async function K5(){let _=await t({message:"Select organization info type",options:[{value:"info",label:"Organization info - General settings"},{value:"members",label:"Members - List all members"},{value:"teams",label:"Teams - List all teams"},{value:"webhooks",label:"Webhooks - Organization webhooks"},{value:"actions",label:"Actions - GitHub Actions settings"}]});if(V(_))return;let F=await p1(),B=await r1();switch(_){case"info":await l0({org:F,output:B});break;case"members":await d0({org:F,output:B});break;case"teams":await i0({org:F,output:B});break;case"webhooks":await n0({org:F,output:B});break;case"actions":{let z=await F0({message:"Show self-hosted runners?",initialValue:!1}),q=await F0({message:"Show organization secrets?",initialValue:!1});if(V(z)||V(q))return;await a0({org:F,runners:z,secrets:q,output:B});break}}await s1()}async function M5(){let _=await Y0();if(console.log(""),console.log(h.default.bold("Authentication Status")),console.log(""),console.log(` Method: ${_.method}`),console.log(` Valid: ${_.valid?h.default.green("Yes"):h.default.red("No")}`),_.username)console.log(` User: ${h.default.cyan(_.username)}`);if(_.scopes&&_.scopes.length>0)console.log(` Scopes: ${h.default.dim(_.scopes.join(", "))}`);console.log(""),await s1()}async function s1(){await F0({message:"Press Enter to continue...",initialValue:!0})}var b0=new r;b0.name("specto").description("GitHub organization metrics and settings CLI").version("1.0.0").addHelpText("after",`
107
+ ${l.default.bold("Examples:")}
108
+ ${l.default.dim("# Show commit statistics for an organization")}
109
+ $ specto stats commits myorg
110
+
111
+ ${l.default.dim("# Show commits for a specific date range")}
112
+ $ specto stats commits myorg --since 2025-01-01 --until 2025-06-30
113
+
114
+ ${l.default.dim("# Show organization info")}
115
+ $ specto org info myorg
116
+
117
+ ${l.default.dim("# List organization members")}
118
+ $ specto org members myorg
119
+
120
+ ${l.default.dim("# List organization teams")}
121
+ $ specto org teams myorg
122
+
123
+ ${l.default.dim("# Show Actions settings with runners and secrets")}
124
+ $ specto org actions myorg --runners --secrets
125
+
126
+ ${l.default.dim("# Check authentication status")}
127
+ $ specto config auth
128
+
129
+ ${l.default.dim("# Run in interactive mode")}
130
+ $ specto
131
+ `);b0.addCommand(H0);b0.addCommand(p);b0.addCommand(W0);b0.command("interactive").description("Run in interactive mode").action(async()=>{await t1()});if(process.argv.length===2)t1();else b0.parse();
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "specto-cli",
3
+ "version": "1.1.0",
4
+ "description": "GitHub organization metrics CLI",
5
+ "type": "module",
6
+ "bin": {
7
+ "specto": "dist/index.js"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/darkroomengineering/specto.git"
12
+ },
13
+ "homepage": "https://specto.darkroom.engineering",
14
+ "bugs": {
15
+ "url": "https://github.com/darkroomengineering/specto/issues"
16
+ },
17
+ "scripts": {
18
+ "dev": "bun run src/index.ts",
19
+ "build": "bun build src/index.ts --outdir dist --target node --minify",
20
+ "test": "bun test",
21
+ "test:watch": "bun test --watch",
22
+ "typecheck": "tsc --noEmit",
23
+ "lint": "biome check .",
24
+ "lint:fix": "biome check --write .",
25
+ "clean": "rm -rf dist"
26
+ },
27
+ "dependencies": {
28
+ "@clack/prompts": "^0.11.0",
29
+ "@specto/core": "workspace:*",
30
+ "commander": "^14.0.2",
31
+ "ora": "^9.0.0",
32
+ "picocolors": "^1.1.1"
33
+ },
34
+ "devDependencies": {
35
+ "@types/bun": "^1.3.6",
36
+ "@types/node": "^25.0.8",
37
+ "bun-types": "^1.3.6"
38
+ },
39
+ "keywords": [
40
+ "github",
41
+ "organization",
42
+ "metrics",
43
+ "cli",
44
+ "darkroom"
45
+ ],
46
+ "author": "Darkroom Engineering <hi@darkroom.engineering>",
47
+ "license": "MIT",
48
+ "engines": {
49
+ "node": ">=20.0.0"
50
+ },
51
+ "files": [
52
+ "dist"
53
+ ]
54
+ }