clerc 0.39.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +15 -2
- package/dist/index.js +19 -19
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -391,6 +391,7 @@ declare class Clerc<C extends Commands = {}, GF extends GlobalFlagOptions = {}>
|
|
|
391
391
|
i18n: I18N;
|
|
392
392
|
private constructor();
|
|
393
393
|
get _name(): string;
|
|
394
|
+
get _scriptName(): string;
|
|
394
395
|
get _description(): string;
|
|
395
396
|
get _version(): string;
|
|
396
397
|
get _inspectors(): Inspector[];
|
|
@@ -421,6 +422,18 @@ declare class Clerc<C extends Commands = {}, GF extends GlobalFlagOptions = {}>
|
|
|
421
422
|
* ```
|
|
422
423
|
*/
|
|
423
424
|
name(name: string): this;
|
|
425
|
+
/**
|
|
426
|
+
* Set the script name of the cli
|
|
427
|
+
*
|
|
428
|
+
* @param scriptName
|
|
429
|
+
* @returns
|
|
430
|
+
* @example
|
|
431
|
+
* ```ts
|
|
432
|
+
* Clerc.create()
|
|
433
|
+
* .scriptName("test")
|
|
434
|
+
* ```
|
|
435
|
+
*/
|
|
436
|
+
scriptName(scriptName: string): this;
|
|
424
437
|
/**
|
|
425
438
|
* Set the description of the cli
|
|
426
439
|
*
|
|
@@ -623,7 +636,7 @@ declare class CommandNameConflictError extends Error {
|
|
|
623
636
|
n2: string;
|
|
624
637
|
constructor(n1: string, n2: string, t: TranslateFn);
|
|
625
638
|
}
|
|
626
|
-
declare class
|
|
639
|
+
declare class ScriptNameNotSetError extends Error {
|
|
627
640
|
constructor(t: TranslateFn);
|
|
628
641
|
}
|
|
629
642
|
declare class DescriptionNotSetError extends Error {
|
|
@@ -751,4 +764,4 @@ interface VersionPluginOptions {
|
|
|
751
764
|
}
|
|
752
765
|
declare const versionPlugin: ({ command, flag, }?: VersionPluginOptions) => Plugin<Clerc<{}, {}>, Clerc<{}, {}>>;
|
|
753
766
|
|
|
754
|
-
export { Clerc, Command, CommandAlias, CommandCustomProperties, CommandExistsError, CommandNameConflictError, CommandOptions, CommandType, CommandWithHandler, Commands, CompletionsPluginOptions, DescriptionNotSetError, FallbackType, Flag, FlagOptions, Flags, GlobalFlagOption, GlobalFlagOptions, Handler, HandlerContext, HandlerInCommand, HelpPluginOptions, I18N, Inspector, InspectorContext, InspectorFn, InspectorObject, InvalidCommandNameError, LocaleNotCalledFirstError, Locales, MakeEventMap,
|
|
767
|
+
export { Clerc, Command, CommandAlias, CommandCustomProperties, CommandExistsError, CommandNameConflictError, CommandOptions, CommandType, CommandWithHandler, Commands, CompletionsPluginOptions, DescriptionNotSetError, FallbackType, Flag, FlagOptions, Flags, GlobalFlagOption, GlobalFlagOptions, Handler, HandlerContext, HandlerInCommand, HelpPluginOptions, I18N, Inspector, InspectorContext, InspectorFn, InspectorObject, InvalidCommandNameError, LocaleNotCalledFirstError, Locales, MakeEventMap, NoCommandGivenError, NoSuchCommandError, ParseOptions, Plugin, Root, RootType, ScriptNameNotSetError, TranslateFn, VersionNotSetError, completionsPlugin, compose, defineCommand, defineHandler, defineInspector, definePlugin, detectLocale, formatCommandName, friendlyErrorPlugin, helpPlugin, isValidName, notFoundPlugin, resolveArgv, resolveCommand, resolveFlattenCommands, strictFlagsPlugin, stripFlags, versionPlugin, withBrackets };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{format as Wu}from"node:util";import WD from"tty";import Pu from"node:tty";const Hu=D=>Array.isArray(D)?D:[D],PD=D=>D.replace(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),HD=(D,e)=>e.length!==D.length?!1:D.every((t,n)=>t===e[n]),UD=(D,e)=>e.length>D.length?!1:HD(D.slice(0,e.length),e);function Eu(D){return D!==null&&typeof D=="object"}function hu(D,e,t=".",n){if(!Eu(e))return hu(D,{},t,n);const s=Object.assign({},e);for(const r in D){if(r==="__proto__"||r==="constructor")continue;const u=D[r];u!=null&&(n&&n(s,r,u,t)||(Array.isArray(u)&&Array.isArray(s[r])?s[r]=[...u,...s[r]]:Eu(u)&&Eu(s[r])?s[r]=hu(u,s[r],(t?`${t}.`:"")+r.toString(),n):s[r]=u))}return s}function zD(D){return(...e)=>e.reduce((t,n)=>hu(t,n,"",D),{})}const qD=zD();class YD{constructor(){this.listenerMap={},this.wildcardListeners=new Set}on(e,t){return e==="*"?(this.wildcardListeners.add(t),this):(this.listenerMap[e]||(this.listenerMap[e]=new Set),this.listenerMap[e].add(t),this)}emit(e,...t){return this.listenerMap[e]&&(this.wildcardListeners.forEach(n=>n.apply(null,[e,...t])),this.listenerMap[e].forEach(n=>n(...t))),this}off(e,t){var n,s;return e===void 0?(this.listenerMap={},this.wildcardListeners.clear(),this):e==="*"?(t?this.wildcardListeners.delete(t):this.wildcardListeners.clear(),this):(t?(n=this.listenerMap[e])==null||n.delete(t):(s=this.listenerMap[e])==null||s.clear(),this)}}const GD="known-flag",ZD="unknown-flag",VD="argument",{stringify:q}=JSON,JD=/\B([A-Z])/g,KD=D=>D.replace(JD,"-$1").toLowerCase(),{hasOwnProperty:QD}=Object.prototype,Y=(D,e)=>QD.call(D,e),XD=D=>Array.isArray(D),Uu=D=>typeof D=="function"?[D,!1]:XD(D)?[D[0],!0]:Uu(D.type),ue=(D,e)=>D===Boolean?e!=="false":e,De=(D,e)=>typeof e=="boolean"?e:D===Number&&e===""?Number.NaN:D(e),ee=/[\s.:=]/,te=D=>{const e=`Flag name ${q(D)}`;if(D.length===0)throw new Error(`${e} cannot be empty`);if(D.length===1)throw new Error(`${e} must be longer than a character`);const t=D.match(ee);if(t)throw new Error(`${e} cannot contain ${q(t==null?void 0:t[0])}`)},ne=D=>{const e={},t=(n,s)=>{if(Y(e,n))throw new Error(`Duplicate flags named ${q(n)}`);e[n]=s};for(const n in D){if(!Y(D,n))continue;te(n);const s=D[n],r=[[],...Uu(s),s];t(n,r);const u=KD(n);if(n!==u&&t(u,r),"alias"in s&&typeof s.alias=="string"){const{alias:o}=s,F=`Flag alias ${q(o)} for flag ${q(n)}`;if(o.length===0)throw new Error(`${F} cannot be empty`);if(o.length>1)throw new Error(`${F} must be a single character`);t(o,r)}}return e},re=(D,e)=>{const t={};for(const n in D){if(!Y(D,n))continue;const[s,,r,u]=e[n];if(s.length===0&&"default"in u){let{default:o}=u;typeof o=="function"&&(o=o()),t[n]=o}else t[n]=r?s:s.pop()}return t},ru="--",se=/[.:=]/,oe=/^-{1,2}\w/,Fe=D=>{if(!oe.test(D))return;const e=!D.startsWith(ru);let t=D.slice(e?1:2),n;const s=t.match(se);if(s){const{index:r}=s;n=t.slice(r+1),t=t.slice(0,r)}return[t,n,e]},ae=(D,{onFlag:e,onArgument:t})=>{let n;const s=(r,u)=>{if(typeof n!="function")return!0;n(r,u),n=void 0};for(let r=0;r<D.length;r+=1){const u=D[r];if(u===ru){s();const F=D.slice(r+1);t==null||t(F,[r],!0);break}const o=Fe(u);if(o){if(s(),!e)continue;const[F,i,C]=o;if(C)for(let a=0;a<F.length;a+=1){s();const l=a===F.length-1;n=e(F[a],l?i:void 0,[r,a+1,l])}else n=e(F,i,[r])}else s(u,[r])&&(t==null||t([u],[r]))}s()},ie=(D,e)=>{for(const[t,n,s]of e.reverse()){if(n){const r=D[t];let u=r.slice(0,n);if(s||(u+=r.slice(n+1)),u!=="-"){D[t]=u;continue}}D.splice(t,1)}},zu=(D,e=process.argv.slice(2),{ignore:t}={})=>{const n=[],s=ne(D),r={},u=[];return u[ru]=[],ae(e,{onFlag(o,F,i){const C=Y(s,o);if(!(t!=null&&t(C?GD:ZD,o,F))){if(C){const[a,l]=s[o],c=ue(l,F),E=(m,p)=>{n.push(i),p&&n.push(p),a.push(De(l,m||""))};return c===void 0?E:E(c)}Y(r,o)||(r[o]=[]),r[o].push(F===void 0?!0:F),n.push(i)}},onArgument(o,F,i){t!=null&&t(VD,e[F[0]])||(u.push(...o),i?(u[ru]=o,e.splice(F[0])):n.push(F))}}),ie(e,n),{flags:re(D,s),unknownFlags:r,_:u}},G=JSON.stringify;class qu extends Error{constructor(e,t){super(t("core.commandExists",G(e))),this.commandName=e}}class su extends Error{constructor(e,t){super(t("core.noSuchCommand",G(e))),this.commandName=e}}class ou extends Error{constructor(e){super(e("core.noCommandGiven"))}}class Yu extends Error{constructor(e,t,n){super(n("core.commandNameConflict",G(e),G(t))),this.n1=e,this.n2=t}}class Gu extends Error{constructor(e){super(e("core.nameNotSet"))}}class Zu extends Error{constructor(e){super(e("core.descriptionNotSet"))}}class Vu extends Error{constructor(e){super(e("core.versionNotSet"))}}class Ju extends Error{constructor(e,t){super(t("core.badNameFormat",G(e))),this.commandName=e}}class mu extends Error{constructor(e){super(e("core.localeMustBeCalledFirst"))}}const Ce={en:{"core.commandExists":'Command "%s" exists.',"core.noSuchCommand":"No such command: %s.","core.noCommandGiven":"No command given.","core.commandNameConflict":"Command name %s conflicts with %s. Maybe caused by alias.","core.nameNotSet":"Name not set.","core.descriptionNotSet":"Description not set.","core.versionNotSet":"Version not set.","core.badNameFormat":"Bad name format: %s.","core.localeMustBeCalledFirst":"locale() or fallbackLocale() must be called at first.","core.cliParseMustBeCalled":"cli.parse() must be called.","core.spreadParameterMustBeLast":"Invalid Parameter: Spread parameter %s must be last.","core.requiredParameterCannotComeAfterOptionalParameter":"Invalid Parameter: Required parameter %s cannot come after optional parameter %s.","core.parameterMustBeWrappedInBrackets":"Invalid Parameter: Parameter %s must be wrapped in <> (required parameter) or [] (optional parameter).","core.parameterIsUsedMoreThanOnce":"Invalid Parameter: Parameter %s is used more than once.","core.missingRequiredParameter":"Missing required parameter %s."},"zh-CN":{"core.commandExists":'\u547D\u4EE4 "%s" \u5DF2\u5B58\u5728\u3002',"core.noSuchCommand":"\u627E\u4E0D\u5230\u547D\u4EE4: %s\u3002","core.noCommandGiven":"\u6CA1\u6709\u8F93\u5165\u547D\u4EE4\u3002","core.commandNameConflict":"\u547D\u4EE4\u540D\u79F0 %s \u548C %s \u51B2\u7A81\u3002 \u53EF\u80FD\u662F\u7531\u4E8E\u522B\u540D\u5BFC\u81F4\u7684\u3002","core.nameNotSet":"\u672A\u8BBE\u7F6ECLI\u540D\u79F0\u3002","core.descriptionNotSet":"\u672A\u8BBE\u7F6ECLI\u63CF\u8FF0\u3002","core.versionNotSet":"\u672A\u8BBE\u7F6ECLI\u7248\u672C\u3002","core.badNameFormat":"\u9519\u8BEF\u7684\u547D\u4EE4\u540D\u5B57\u683C\u5F0F: %s\u3002","core.localeMustBeCalledFirst":"locale() \u6216 fallbackLocale() \u5FC5\u987B\u5728\u6700\u5F00\u59CB\u8C03\u7528\u3002","core.cliParseMustBeCalled":"cli.parse() \u5FC5\u987B\u88AB\u8C03\u7528\u3002","core.spreadParameterMustBeLast":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u5C55\u5F00\u53C2\u6570 %s \u5FC5\u987B\u5728\u6700\u540E\u3002","core.requiredParameterCannotComeAfterOptionalParameter":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u5FC5\u586B\u53C2\u6570 %s \u4E0D\u80FD\u5728\u53EF\u9009\u53C2\u6570 %s \u4E4B\u540E\u3002","core.parameterMustBeWrappedInBrackets":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u53C2\u6570 %s \u5FC5\u987B\u88AB <> (\u5FC5\u586B\u53C2\u6570) \u6216 [] (\u53EF\u9009\u53C2\u6570) \u5305\u88F9\u3002","core.parameterIsUsedMoreThanOnce":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u53C2\u6570 %s \u88AB\u4F7F\u7528\u4E86\u591A\u6B21\u3002","core.missingRequiredParameter":"\u7F3A\u5C11\u5FC5\u586B\u53C2\u6570 %s\u3002"}},{stringify:P}=JSON;function pu(D,e){const t=[];let n,s;for(const r of D){if(s)throw new Error(e("core.spreadParameterMustBeLast",P(s)));const u=r[0],o=r[r.length-1];let F;if(u==="<"&&o===">"&&(F=!0,n))throw new Error(e("core.requiredParameterMustBeBeforeOptional",P(r),P(n)));if(u==="["&&o==="]"&&(F=!1,n=r),F===void 0)throw new Error(e("core.parameterMustBeWrappedInBrackets",P(r)));let i=r.slice(1,-1);const C=i.slice(-3)==="...";C&&(s=r,i=i.slice(0,-3)),t.push({name:i,required:F,spread:C})}return t}function du(D,e,t,n){for(let s=0;s<e.length;s+=1){const{name:r,required:u,spread:o}=e[s],F=PD(r);if(F in D)throw new Error(n("core.parameterIsUsedMoreThanOnce",P(r)));const i=o?t.slice(s):t[s];if(o&&(s=e.length),u&&(!i||o&&i.length===0))throw new Error(n("core.missingRequiredParameter",P(r)));D[F]=i}}const Ku=typeof Deno!="undefined",le=typeof process!="undefined"&&!Ku,ce=process.versions.electron&&!process.defaultApp;function Qu(D,e,t,n){if(t.alias){const s=Hu(t.alias);for(const r of s){if(r in e)throw new Yu(e[r].name,t.name,n);D.set(typeof r=="symbol"?r:r.split(" "),{...t,__isAlias:!0})}}}function Bu(D,e){const t=new Map;D[B]&&(t.set(B,D[B]),Qu(t,D,D[B],e));for(const n of Object.values(D))Qu(t,D,n,e),t.set(n.name.split(" "),n);return t}function Xu(D,e,t){var n;const s=Bu(D,t);for(const[r,u]of s.entries()){const o=zu((n=u==null?void 0:u.flags)!=null?n:{},[...e]),{_:F}=o;if(r!==B&&UD(F,r))return[u,r]}return s.has(B)?[s.get(B),B]:[void 0,void 0]}const fu=()=>le?process.argv.slice(ce?1:2):Ku?Deno.args:[];function uD(D){const e={pre:[],normal:[],post:[]};for(const n of D){const s=typeof n=="object"?n:{fn:n},{enforce:r,fn:u}=s;r==="post"||r==="pre"?e[r].push(u):e.normal.push(u)}const t=[...e.pre,...e.normal,...e.post];return n=>{return s(0);function s(r){const u=t[r];return u(n,s.bind(null,r+1))}}}const Ee=/\s\s+/,DD=D=>D===B?!0:!(D.startsWith(" ")||D.endsWith(" "))&&!Ee.test(D),eD=(D,e)=>e?`[${D}]`:`<${D}>`,he="<Root>",H=D=>Array.isArray(D)?D.join(" "):typeof D=="string"?D:he,tD=()=>process.env.CLERC_LOCALE?process.env.CLERC_LOCALE:Intl.DateTimeFormat().resolvedOptions().locale,nD=D=>D.filter(e=>!e.startsWith("-"));var Au=(D,e,t)=>{if(!e.has(D))throw TypeError("Cannot "+t)},h=(D,e,t)=>(Au(D,e,"read from private field"),t?t.call(D):e.get(D)),A=(D,e,t)=>{if(e.has(D))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(D):e.set(D,t)},w=(D,e,t,n)=>(Au(D,e,"write to private field"),n?n.call(D,t):e.set(D,t),t),g=(D,e,t)=>(Au(D,e,"access private method"),t),O,N,T,Z,V,Fu,J,U,K,Q,X,uu,Du,L,gu,rD,$u,sD,wu,oD,b,_,yu,FD,Su,aD,vu,iD,au,bu,xu,CD;const B=Symbol.for("Clerc.Root"),lD=class{constructor(D,e,t){A(this,gu),A(this,$u),A(this,wu),A(this,b),A(this,yu),A(this,Su),A(this,vu),A(this,au),A(this,xu),A(this,O,""),A(this,N,""),A(this,T,""),A(this,Z,[]),A(this,V,{}),A(this,Fu,new YD),A(this,J,{}),A(this,U,new Set),A(this,K,void 0),A(this,Q,[]),A(this,X,!1),A(this,uu,"en"),A(this,Du,"en"),A(this,L,{}),this.i18n={add:n=>{w(this,L,qD(h(this,L),n))},t:(n,...s)=>{const r=h(this,L)[h(this,Du)]||h(this,L)[h(this,uu)],u=h(this,L)[h(this,uu)];return r[n]?Wu(r[n],...s):u[n]?Wu(u[n],...s):void 0}},w(this,O,D!=null?D:h(this,O)),w(this,N,e!=null?e:h(this,N)),w(this,T,t!=null?t:h(this,T)),w(this,Du,tD()),g(this,wu,oD).call(this)}get _name(){return h(this,O)}get _description(){return h(this,N)}get _version(){return h(this,T)}get _inspectors(){return h(this,Z)}get _commands(){return h(this,V)}get _flags(){return h(this,J)}static create(D,e,t){return new lD(D,e,t)}name(D){return g(this,b,_).call(this),w(this,O,D),this}description(D){return g(this,b,_).call(this),w(this,N,D),this}version(D){return g(this,b,_).call(this),w(this,T,D),this}locale(D){if(h(this,X))throw new mu(this.i18n.t);return w(this,Du,D),this}fallbackLocale(D){if(h(this,X))throw new mu(this.i18n.t);return w(this,uu,D),this}errorHandler(D){return h(this,Q).push(D),this}command(D,e,t={}){return g(this,au,bu).call(this,()=>g(this,yu,FD).call(this,D,e,t)),this}flag(D,e,t){return h(this,J)[D]={description:e,...t},this}on(D,e){return h(this,Fu).on(D,e),this}use(D){return g(this,b,_).call(this),D.setup(this)}inspector(D){return g(this,b,_).call(this),h(this,Z).push(D),this}parse(D=fu()){g(this,b,_).call(this);const{argv:e,run:t}=Array.isArray(D)?{argv:D,run:!0}:{argv:fu(),...D};return w(this,K,[...e]),g(this,Su,aD).call(this),t&&this.runMatchedCommand(),this}runMatchedCommand(){return g(this,au,bu).call(this,()=>g(this,xu,CD).call(this)),process.title=h(this,O),this}};let me=lD;O=new WeakMap,N=new WeakMap,T=new WeakMap,Z=new WeakMap,V=new WeakMap,Fu=new WeakMap,J=new WeakMap,U=new WeakMap,K=new WeakMap,Q=new WeakMap,X=new WeakMap,uu=new WeakMap,Du=new WeakMap,L=new WeakMap,gu=new WeakSet,rD=function(){return h(this,U).has(B)},$u=new WeakSet,sD=function(){return Object.prototype.hasOwnProperty.call(this._commands,B)},wu=new WeakSet,oD=function(){this.i18n.add(Ce)},b=new WeakSet,_=function(){w(this,X,!0)},yu=new WeakSet,FD=function(D,e,t={}){g(this,b,_).call(this);const{t:n}=this.i18n,s=(C=>!(typeof C=="string"||C===B))(D),r=s?D.name:D;if(!DD(r))throw new Ju(r,n);const{handler:u=void 0,...o}=s?D:{name:r,description:e,...t},F=[o.name],i=o.alias?Hu(o.alias):[];o.alias&&F.push(...i);for(const C of F)if(h(this,U).has(C))throw new qu(H(C),n);return h(this,V)[r]=o,h(this,U).add(o.name),i.forEach(C=>h(this,U).add(C)),s&&u&&this.on(D.name,u),this},Su=new WeakSet,aD=function(){const{t:D}=this.i18n;if(!h(this,O))throw new Gu(D);if(!h(this,N))throw new Zu(D);if(!h(this,T))throw new Vu(D)},vu=new WeakSet,iD=function(D){var e;const t=h(this,K),{t:n}=this.i18n,[s,r]=D(),u=!!s,o={...h(this,J),...s==null?void 0:s.flags},F=zu(o,[...t]),{_:i,flags:C,unknownFlags:a}=F;let l=!u||s.name===B?i:i.slice(s.name.split(" ").length),c=(e=s==null?void 0:s.parameters)!=null?e:[];const E=c.indexOf("--"),m=c.slice(E+1)||[],p=Object.create(null);if(E>-1&&m.length>0){c=c.slice(0,E);const d=i["--"];l=l.slice(0,-d.length||void 0),du(p,pu(c,n),l,n),du(p,pu(m,n),d,n)}else du(p,pu(c,n),l,n);const y={...C,...a};return{name:s==null?void 0:s.name,called:Array.isArray(r)?r.join(" "):r,resolved:u,hasRootOrAlias:h(this,gu,rD),hasRoot:h(this,$u,sD),raw:{...F,parameters:l,mergedFlags:y},parameters:p,flags:C,unknownFlags:a,cli:this}},au=new WeakSet,bu=function(D){try{D()}catch(e){if(h(this,Q).length>0)h(this,Q).forEach(t=>t(e));else throw e}},xu=new WeakSet,CD=function(){g(this,b,_).call(this);const{t:D}=this.i18n,e=h(this,K);if(!e)throw new Error(D("core.cliParseMustBeCalled"));const t=()=>Xu(h(this,V),e,D),n=()=>g(this,vu,iD).call(this,t),s={enforce:"post",fn:u=>{const[o]=t(),F=nD(e).join(" ");if(!o)throw F?new su(F,D):new ou(D);h(this,Fu).emit(o.name,u)}},r=[...h(this,Z),s];uD(r)(n())};const I=D=>D,pe=(D,e,t)=>t,de=(D,e)=>e,Be=(D,e)=>({...D,handler:e}),fe=D=>`
|
|
1
|
+
import{format as Pu}from"node:util";import PD from"tty";import Hu from"node:tty";const Uu=D=>Array.isArray(D)?D:[D],HD=D=>D.replace(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),UD=(D,e)=>e.length!==D.length?!1:D.every((t,n)=>t===e[n]),zD=(D,e)=>e.length>D.length?!1:UD(D.slice(0,e.length),e);function hu(D){return D!==null&&typeof D=="object"}function mu(D,e,t=".",n){if(!hu(e))return mu(D,{},t,n);const s=Object.assign({},e);for(const r in D){if(r==="__proto__"||r==="constructor")continue;const u=D[r];u!=null&&(n&&n(s,r,u,t)||(Array.isArray(u)&&Array.isArray(s[r])?s[r]=[...u,...s[r]]:hu(u)&&hu(s[r])?s[r]=mu(u,s[r],(t?`${t}.`:"")+r.toString(),n):s[r]=u))}return s}function qD(D){return(...e)=>e.reduce((t,n)=>mu(t,n,"",D),{})}const YD=qD();class GD{constructor(){this.listenerMap={},this.wildcardListeners=new Set}on(e,t){return e==="*"?(this.wildcardListeners.add(t),this):(this.listenerMap[e]||(this.listenerMap[e]=new Set),this.listenerMap[e].add(t),this)}emit(e,...t){return this.listenerMap[e]&&(this.wildcardListeners.forEach(n=>n.apply(null,[e,...t])),this.listenerMap[e].forEach(n=>n(...t))),this}off(e,t){var n,s;return e===void 0?(this.listenerMap={},this.wildcardListeners.clear(),this):e==="*"?(t?this.wildcardListeners.delete(t):this.wildcardListeners.clear(),this):(t?(n=this.listenerMap[e])==null||n.delete(t):(s=this.listenerMap[e])==null||s.clear(),this)}}const ZD="known-flag",VD="unknown-flag",JD="argument",{stringify:q}=JSON,KD=/\B([A-Z])/g,QD=D=>D.replace(KD,"-$1").toLowerCase(),{hasOwnProperty:XD}=Object.prototype,Y=(D,e)=>XD.call(D,e),ue=D=>Array.isArray(D),zu=D=>typeof D=="function"?[D,!1]:ue(D)?[D[0],!0]:zu(D.type),De=(D,e)=>D===Boolean?e!=="false":e,ee=(D,e)=>typeof e=="boolean"?e:D===Number&&e===""?Number.NaN:D(e),te=/[\s.:=]/,ne=D=>{const e=`Flag name ${q(D)}`;if(D.length===0)throw new Error(`${e} cannot be empty`);if(D.length===1)throw new Error(`${e} must be longer than a character`);const t=D.match(te);if(t)throw new Error(`${e} cannot contain ${q(t==null?void 0:t[0])}`)},re=D=>{const e={},t=(n,s)=>{if(Y(e,n))throw new Error(`Duplicate flags named ${q(n)}`);e[n]=s};for(const n in D){if(!Y(D,n))continue;ne(n);const s=D[n],r=[[],...zu(s),s];t(n,r);const u=QD(n);if(n!==u&&t(u,r),"alias"in s&&typeof s.alias=="string"){const{alias:o}=s,a=`Flag alias ${q(o)} for flag ${q(n)}`;if(o.length===0)throw new Error(`${a} cannot be empty`);if(o.length>1)throw new Error(`${a} must be a single character`);t(o,r)}}return e},se=(D,e)=>{const t={};for(const n in D){if(!Y(D,n))continue;const[s,,r,u]=e[n];if(s.length===0&&"default"in u){let{default:o}=u;typeof o=="function"&&(o=o()),t[n]=o}else t[n]=r?s:s.pop()}return t},ru="--",oe=/[.:=]/,ae=/^-{1,2}\w/,Fe=D=>{if(!ae.test(D))return;const e=!D.startsWith(ru);let t=D.slice(e?1:2),n;const s=t.match(oe);if(s){const{index:r}=s;n=t.slice(r+1),t=t.slice(0,r)}return[t,n,e]},ie=(D,{onFlag:e,onArgument:t})=>{let n;const s=(r,u)=>{if(typeof n!="function")return!0;n(r,u),n=void 0};for(let r=0;r<D.length;r+=1){const u=D[r];if(u===ru){s();const a=D.slice(r+1);t==null||t(a,[r],!0);break}const o=Fe(u);if(o){if(s(),!e)continue;const[a,i,C]=o;if(C)for(let F=0;F<a.length;F+=1){s();const l=F===a.length-1;n=e(a[F],l?i:void 0,[r,F+1,l])}else n=e(a,i,[r])}else s(u,[r])&&(t==null||t([u],[r]))}s()},Ce=(D,e)=>{for(const[t,n,s]of e.reverse()){if(n){const r=D[t];let u=r.slice(0,n);if(s||(u+=r.slice(n+1)),u!=="-"){D[t]=u;continue}}D.splice(t,1)}},qu=(D,e=process.argv.slice(2),{ignore:t}={})=>{const n=[],s=re(D),r={},u=[];return u[ru]=[],ie(e,{onFlag(o,a,i){const C=Y(s,o);if(!(t!=null&&t(C?ZD:VD,o,a))){if(C){const[F,l]=s[o],c=De(l,a),E=(m,p)=>{n.push(i),p&&n.push(p),F.push(ee(l,m||""))};return c===void 0?E:E(c)}Y(r,o)||(r[o]=[]),r[o].push(a===void 0?!0:a),n.push(i)}},onArgument(o,a,i){t!=null&&t(JD,e[a[0]])||(u.push(...o),i?(u[ru]=o,e.splice(a[0])):n.push(a))}}),Ce(e,n),{flags:se(D,s),unknownFlags:r,_:u}},G=JSON.stringify;class Yu extends Error{constructor(e,t){super(t("core.commandExists",G(e))),this.commandName=e}}class su extends Error{constructor(e,t){super(t("core.noSuchCommand",G(e))),this.commandName=e}}class ou extends Error{constructor(e){super(e("core.noCommandGiven"))}}class Gu extends Error{constructor(e,t,n){super(n("core.commandNameConflict",G(e),G(t))),this.n1=e,this.n2=t}}class Zu extends Error{constructor(e){super(e("core.scriptNameNotSet"))}}class Vu extends Error{constructor(e){super(e("core.descriptionNotSet"))}}class Ju extends Error{constructor(e){super(e("core.versionNotSet"))}}class Ku extends Error{constructor(e,t){super(t("core.badNameFormat",G(e))),this.commandName=e}}class pu extends Error{constructor(e){super(e("core.localeMustBeCalledFirst"))}}const le={en:{"core.commandExists":'Command "%s" exists.',"core.noSuchCommand":"No such command: %s.","core.noCommandGiven":"No command given.","core.commandNameConflict":"Command name %s conflicts with %s. Maybe caused by alias.","core.scriptNameNotSet":"Name not set.","core.descriptionNotSet":"Description not set.","core.versionNotSet":"Version not set.","core.badNameFormat":"Bad name format: %s.","core.localeMustBeCalledFirst":"locale() or fallbackLocale() must be called at first.","core.cliParseMustBeCalled":"cli.parse() must be called.","core.spreadParameterMustBeLast":"Invalid Parameter: Spread parameter %s must be last.","core.requiredParameterCannotComeAfterOptionalParameter":"Invalid Parameter: Required parameter %s cannot come after optional parameter %s.","core.parameterMustBeWrappedInBrackets":"Invalid Parameter: Parameter %s must be wrapped in <> (required parameter) or [] (optional parameter).","core.parameterIsUsedMoreThanOnce":"Invalid Parameter: Parameter %s is used more than once.","core.missingRequiredParameter":"Missing required parameter %s."},"zh-CN":{"core.commandExists":'\u547D\u4EE4 "%s" \u5DF2\u5B58\u5728\u3002',"core.noSuchCommand":"\u627E\u4E0D\u5230\u547D\u4EE4: %s\u3002","core.noCommandGiven":"\u6CA1\u6709\u8F93\u5165\u547D\u4EE4\u3002","core.commandNameConflict":"\u547D\u4EE4\u540D\u79F0 %s \u548C %s \u51B2\u7A81\u3002 \u53EF\u80FD\u662F\u7531\u4E8E\u522B\u540D\u5BFC\u81F4\u7684\u3002","core.scriptNameNotSet":"\u672A\u8BBE\u7F6E CLI Script \u540D\u79F0\u3002","core.descriptionNotSet":"\u672A\u8BBE\u7F6E CLI \u63CF\u8FF0\u3002","core.versionNotSet":"\u672A\u8BBE\u7F6E CLI \u7248\u672C\u3002","core.badNameFormat":"\u9519\u8BEF\u7684\u547D\u4EE4\u540D\u5B57\u683C\u5F0F: %s\u3002","core.localeMustBeCalledFirst":"locale() \u6216 fallbackLocale() \u5FC5\u987B\u5728\u6700\u5F00\u59CB\u8C03\u7528\u3002","core.cliParseMustBeCalled":"cli.parse() \u5FC5\u987B\u88AB\u8C03\u7528\u3002","core.spreadParameterMustBeLast":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u5C55\u5F00\u53C2\u6570 %s \u5FC5\u987B\u5728\u6700\u540E\u3002","core.requiredParameterCannotComeAfterOptionalParameter":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u5FC5\u586B\u53C2\u6570 %s \u4E0D\u80FD\u5728\u53EF\u9009\u53C2\u6570 %s \u4E4B\u540E\u3002","core.parameterMustBeWrappedInBrackets":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u53C2\u6570 %s \u5FC5\u987B\u88AB <> (\u5FC5\u586B\u53C2\u6570) \u6216 [] (\u53EF\u9009\u53C2\u6570) \u5305\u88F9\u3002","core.parameterIsUsedMoreThanOnce":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u53C2\u6570 %s \u88AB\u4F7F\u7528\u4E86\u591A\u6B21\u3002","core.missingRequiredParameter":"\u7F3A\u5C11\u5FC5\u586B\u53C2\u6570 %s\u3002"}},{stringify:P}=JSON;function du(D,e){const t=[];let n,s;for(const r of D){if(s)throw new Error(e("core.spreadParameterMustBeLast",P(s)));const u=r[0],o=r[r.length-1];let a;if(u==="<"&&o===">"&&(a=!0,n))throw new Error(e("core.requiredParameterMustBeBeforeOptional",P(r),P(n)));if(u==="["&&o==="]"&&(a=!1,n=r),a===void 0)throw new Error(e("core.parameterMustBeWrappedInBrackets",P(r)));let i=r.slice(1,-1);const C=i.slice(-3)==="...";C&&(s=r,i=i.slice(0,-3)),t.push({name:i,required:a,spread:C})}return t}function Bu(D,e,t,n){for(let s=0;s<e.length;s+=1){const{name:r,required:u,spread:o}=e[s],a=HD(r);if(a in D)throw new Error(n("core.parameterIsUsedMoreThanOnce",P(r)));const i=o?t.slice(s):t[s];if(o&&(s=e.length),u&&(!i||o&&i.length===0))throw new Error(n("core.missingRequiredParameter",P(r)));D[a]=i}}const Qu=typeof Deno!="undefined",ce=typeof process!="undefined"&&!Qu,Ee=process.versions.electron&&!process.defaultApp;function Xu(D,e,t,n){if(t.alias){const s=Uu(t.alias);for(const r of s){if(r in e)throw new Gu(e[r].name,t.name,n);D.set(typeof r=="symbol"?r:r.split(" "),{...t,__isAlias:!0})}}}function fu(D,e){const t=new Map;D[B]&&(t.set(B,D[B]),Xu(t,D,D[B],e));for(const n of Object.values(D))Xu(t,D,n,e),t.set(n.name.split(" "),n);return t}function uD(D,e,t){var n;const s=fu(D,t);for(const[r,u]of s.entries()){const o=qu((n=u==null?void 0:u.flags)!=null?n:Object.create(null),[...e]),{_:a}=o;if(r!==B&&zD(a,r))return[u,r]}return s.has(B)?[s.get(B),B]:[void 0,void 0]}const Au=()=>ce?process.argv.slice(Ee?1:2):Qu?Deno.args:[];function DD(D){const e={pre:[],normal:[],post:[]};for(const n of D){const s=typeof n=="object"?n:{fn:n},{enforce:r,fn:u}=s;r==="post"||r==="pre"?e[r].push(u):e.normal.push(u)}const t=[...e.pre,...e.normal,...e.post];return n=>{return s(0);function s(r){const u=t[r];return u(n,s.bind(null,r+1))}}}const he=/\s\s+/,eD=D=>D===B?!0:!(D.startsWith(" ")||D.endsWith(" "))&&!he.test(D),tD=(D,e)=>e?`[${D}]`:`<${D}>`,me="<Root>",H=D=>Array.isArray(D)?D.join(" "):typeof D=="string"?D:me,nD=()=>process.env.CLERC_LOCALE?process.env.CLERC_LOCALE:Intl.DateTimeFormat().resolvedOptions().locale,rD=D=>D.filter(e=>!e.startsWith("-"));var gu=(D,e,t)=>{if(!e.has(D))throw TypeError("Cannot "+t)},h=(D,e,t)=>(gu(D,e,"read from private field"),t?t.call(D):e.get(D)),f=(D,e,t)=>{if(e.has(D))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(D):e.set(D,t)},$=(D,e,t,n)=>(gu(D,e,"write to private field"),n?n.call(D,t):e.set(D,t),t),g=(D,e,t)=>(gu(D,e,"access private method"),t),au,_,M,T,Z,V,Fu,J,U,K,Q,X,uu,Du,L,$u,sD,wu,oD,yu,aD,S,x,Su,FD,vu,iD,bu,CD,iu,xu,Nu,lD;const B=Symbol.for("Clerc.Root"),cD=class{constructor(D,e,t){f(this,$u),f(this,wu),f(this,yu),f(this,S),f(this,Su),f(this,vu),f(this,bu),f(this,iu),f(this,Nu),f(this,au,""),f(this,_,""),f(this,M,""),f(this,T,""),f(this,Z,[]),f(this,V,Object.create(null)),f(this,Fu,new GD),f(this,J,Object.create(null)),f(this,U,new Set),f(this,K,void 0),f(this,Q,[]),f(this,X,!1),f(this,uu,"en"),f(this,Du,"en"),f(this,L,Object.create(null)),this.i18n={add:n=>{$(this,L,YD(h(this,L),n))},t:(n,...s)=>{const r=h(this,L)[h(this,Du)]||h(this,L)[h(this,uu)],u=h(this,L)[h(this,uu)];return r[n]?Pu(r[n],...s):u[n]?Pu(u[n],...s):void 0}},$(this,_,D!=null?D:h(this,_)),$(this,M,e!=null?e:h(this,M)),$(this,T,t!=null?t:h(this,T)),$(this,Du,nD()),g(this,yu,aD).call(this)}get _name(){return h(this,au)||h(this,_)}get _scriptName(){return h(this,_)}get _description(){return h(this,M)}get _version(){return h(this,T)}get _inspectors(){return h(this,Z)}get _commands(){return h(this,V)}get _flags(){return h(this,J)}static create(D,e,t){return new cD(D,e,t)}name(D){return g(this,S,x).call(this),$(this,au,D),this}scriptName(D){return g(this,S,x).call(this),$(this,_,D),this}description(D){return g(this,S,x).call(this),$(this,M,D),this}version(D){return g(this,S,x).call(this),$(this,T,D),this}locale(D){if(h(this,X))throw new pu(this.i18n.t);return $(this,Du,D),this}fallbackLocale(D){if(h(this,X))throw new pu(this.i18n.t);return $(this,uu,D),this}errorHandler(D){return h(this,Q).push(D),this}command(D,e,t={}){return g(this,iu,xu).call(this,()=>g(this,Su,FD).call(this,D,e,t)),this}flag(D,e,t){return h(this,J)[D]={description:e,...t},this}on(D,e){return h(this,Fu).on(D,e),this}use(D){return g(this,S,x).call(this),D.setup(this)}inspector(D){return g(this,S,x).call(this),h(this,Z).push(D),this}parse(D=Au()){g(this,S,x).call(this);const{argv:e,run:t}=Array.isArray(D)?{argv:D,run:!0}:{argv:Au(),...D};return $(this,K,[...e]),g(this,vu,iD).call(this),t&&this.runMatchedCommand(),this}runMatchedCommand(){return g(this,iu,xu).call(this,()=>g(this,Nu,lD).call(this)),process.title=h(this,_),this}};let pe=cD;au=new WeakMap,_=new WeakMap,M=new WeakMap,T=new WeakMap,Z=new WeakMap,V=new WeakMap,Fu=new WeakMap,J=new WeakMap,U=new WeakMap,K=new WeakMap,Q=new WeakMap,X=new WeakMap,uu=new WeakMap,Du=new WeakMap,L=new WeakMap,$u=new WeakSet,sD=function(){return h(this,U).has(B)},wu=new WeakSet,oD=function(){return Object.prototype.hasOwnProperty.call(this._commands,B)},yu=new WeakSet,aD=function(){this.i18n.add(le)},S=new WeakSet,x=function(){$(this,X,!0)},Su=new WeakSet,FD=function(D,e,t={}){g(this,S,x).call(this);const{t:n}=this.i18n,s=(C=>!(typeof C=="string"||C===B))(D),r=s?D.name:D;if(!eD(r))throw new Ku(r,n);const{handler:u=void 0,...o}=s?D:{name:r,description:e,...t},a=[o.name],i=o.alias?Uu(o.alias):[];o.alias&&a.push(...i);for(const C of a)if(h(this,U).has(C))throw new Yu(H(C),n);return h(this,V)[r]=o,h(this,U).add(o.name),i.forEach(C=>h(this,U).add(C)),s&&u&&this.on(D.name,u),this},vu=new WeakSet,iD=function(){const{t:D}=this.i18n;if(!h(this,_))throw new Zu(D);if(!h(this,M))throw new Vu(D);if(!h(this,T))throw new Ju(D)},bu=new WeakSet,CD=function(D){var e;const t=h(this,K),{t:n}=this.i18n,[s,r]=D(),u=!!s,o={...h(this,J),...s==null?void 0:s.flags},a=qu(o,[...t]),{_:i,flags:C,unknownFlags:F}=a;let l=!u||s.name===B?i:i.slice(s.name.split(" ").length),c=(e=s==null?void 0:s.parameters)!=null?e:[];const E=c.indexOf("--"),m=c.slice(E+1)||[],p=Object.create(null);if(E>-1&&m.length>0){c=c.slice(0,E);const d=i["--"];l=l.slice(0,-d.length||void 0),Bu(p,du(c,n),l,n),Bu(p,du(m,n),d,n)}else Bu(p,du(c,n),l,n);const y={...C,...F};return{name:s==null?void 0:s.name,called:Array.isArray(r)?r.join(" "):r,resolved:u,hasRootOrAlias:h(this,$u,sD),hasRoot:h(this,wu,oD),raw:{...a,parameters:l,mergedFlags:y},parameters:p,flags:C,unknownFlags:F,cli:this}},iu=new WeakSet,xu=function(D){try{D()}catch(e){if(h(this,Q).length>0)h(this,Q).forEach(t=>t(e));else throw e}},Nu=new WeakSet,lD=function(){g(this,S,x).call(this);const{t:D}=this.i18n,e=h(this,K);if(!e)throw new Error(D("core.cliParseMustBeCalled"));const t=()=>uD(h(this,V),e,D),n=()=>g(this,bu,CD).call(this,t),s={enforce:"post",fn:u=>{const[o]=t(),a=rD(e).join(" ");if(!o)throw a?new su(a,D):new ou(D);h(this,Fu).emit(o.name,u)}},r=[...h(this,Z),s];DD(r)(n())};const I=D=>D,de=(D,e,t)=>t,Be=(D,e)=>e,fe=(D,e)=>({...D,handler:e}),Ae=D=>`
|
|
2
2
|
${D})
|
|
3
3
|
cmd+="__${D}"
|
|
4
|
-
;;`,
|
|
4
|
+
;;`,ge=D=>{const{cli:e}=D,{_scriptName:t,_commands:n}=e;return`_${t}() {
|
|
5
5
|
local i cur prev opts cmds
|
|
6
6
|
COMPREPLY=()
|
|
7
7
|
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
@@ -15,7 +15,7 @@ import{format as Wu}from"node:util";import WD from"tty";import Pu from"node:tty"
|
|
|
15
15
|
"$1")
|
|
16
16
|
cmd="${t}"
|
|
17
17
|
;;
|
|
18
|
-
${Object.keys(n).map(
|
|
18
|
+
${Object.keys(n).map(Ae).join("")}
|
|
19
19
|
*)
|
|
20
20
|
;;
|
|
21
21
|
esac
|
|
@@ -23,9 +23,9 @@ ${Object.keys(n).map(fe).join("")}
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
complete -F _${t} -o bashdefault -o default ${t}
|
|
26
|
-
`},
|
|
26
|
+
`},ED=D=>D.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`),hD=D=>D.length<=1?`-${D}`:`--${ED(D)}`,mD="(No Description)",$e=D=>`[CompletionResult]::new('${D.name}', '${D.name}', [CompletionResultType]::ParameterValue, '${D.description}')`,we=D=>{var e;return Object.entries((e=D.flags)!=null?e:{}).map(([t,n])=>{const s=[`[CompletionResult]::new('${hD(t)}', '${ED(t)}', [CompletionResultType]::ParameterName, '${D.flags[t].description||mD}')`];return n!=null&&n.alias&&s.push(`[CompletionResult]::new('${hD(n.alias)}', '${n.alias}', [CompletionResultType]::ParameterName, '${D.flags[t].description||mD}')`),s.join(`
|
|
27
27
|
`)}).join(`
|
|
28
|
-
`)},
|
|
28
|
+
`)},ye=D=>{const{cli:e}=D,{_scriptName:t,_commands:n}=e;return`using namespace System.Management.Automation
|
|
29
29
|
using namespace System.Management.Automation.Language
|
|
30
30
|
|
|
31
31
|
Register-ArgumentCompleter -Native -CommandName '${t}' -ScriptBlock {
|
|
@@ -47,12 +47,12 @@ Register-ArgumentCompleter -Native -CommandName '${t}' -ScriptBlock {
|
|
|
47
47
|
|
|
48
48
|
$completions = @(switch ($command) {
|
|
49
49
|
'${t}' {
|
|
50
|
-
${Object.entries(n).map(([s,r])
|
|
50
|
+
${Object.entries(n).map(([s,r])=>$e(r)).join(`
|
|
51
51
|
`)}
|
|
52
52
|
break
|
|
53
53
|
}
|
|
54
54
|
${Object.entries(n).map(([s,r])=>`'${t};${s.split(" ").join(";")}' {
|
|
55
|
-
${
|
|
55
|
+
${we(r)}
|
|
56
56
|
break
|
|
57
57
|
}`).join(`
|
|
58
58
|
`)}
|
|
@@ -60,17 +60,17 @@ Register-ArgumentCompleter -Native -CommandName '${t}' -ScriptBlock {
|
|
|
60
60
|
|
|
61
61
|
$completions.Where{ $_.CompletionText -like "$wordToComplete*" } |
|
|
62
62
|
Sort-Object -Property ListItemText
|
|
63
|
-
}`},
|
|
64
|
-
`).splice(1).map(e=>e.trim().replace("file://",""))}function
|
|
63
|
+
}`},pD={bash:ge,pwsh:ye},Se=(D={})=>I({setup:e=>{const{command:t=!0}=D;return t&&(e=e.command("completions","Print shell completions to stdout",{flags:{shell:{description:"Shell type",type:String,default:""}},parameters:["[shell]"]}).on("completions",n=>{var s;if(!e._scriptName)throw new Error("CLI name is not defined!");const r=String((s=n.parameters.shell)!=null?s:n.flags.shell);if(!r)throw new Error("Missing shell name");if(r in pD)process.stdout.write(pD[r](n));else throw new Error(`No such shell: ${r}`)})),e}});function ve(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var _u={exports:{}};let be=PD,xe=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||be.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),A=(D,e,t=D)=>n=>{let s=""+n,r=s.indexOf(e,D.length);return~r?D+dD(s,e,t,r)+e:D+s+e},dD=(D,e,t,n)=>{let s=D.substring(0,n)+t,r=D.substring(n+e.length),u=r.indexOf(e);return~u?s+dD(r,e,t,u):s+r},BD=(D=xe)=>({isColorSupported:D,reset:D?e=>`\x1B[0m${e}\x1B[0m`:String,bold:D?A("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?A("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?A("\x1B[3m","\x1B[23m"):String,underline:D?A("\x1B[4m","\x1B[24m"):String,inverse:D?A("\x1B[7m","\x1B[27m"):String,hidden:D?A("\x1B[8m","\x1B[28m"):String,strikethrough:D?A("\x1B[9m","\x1B[29m"):String,black:D?A("\x1B[30m","\x1B[39m"):String,red:D?A("\x1B[31m","\x1B[39m"):String,green:D?A("\x1B[32m","\x1B[39m"):String,yellow:D?A("\x1B[33m","\x1B[39m"):String,blue:D?A("\x1B[34m","\x1B[39m"):String,magenta:D?A("\x1B[35m","\x1B[39m"):String,cyan:D?A("\x1B[36m","\x1B[39m"):String,white:D?A("\x1B[37m","\x1B[39m"):String,gray:D?A("\x1B[90m","\x1B[39m"):String,bgBlack:D?A("\x1B[40m","\x1B[49m"):String,bgRed:D?A("\x1B[41m","\x1B[49m"):String,bgGreen:D?A("\x1B[42m","\x1B[49m"):String,bgYellow:D?A("\x1B[43m","\x1B[49m"):String,bgBlue:D?A("\x1B[44m","\x1B[49m"):String,bgMagenta:D?A("\x1B[45m","\x1B[49m"):String,bgCyan:D?A("\x1B[46m","\x1B[49m"):String,bgWhite:D?A("\x1B[47m","\x1B[49m"):String});_u.exports=BD(),_u.exports.createColors=BD;var Ne=_u.exports,k=ve(Ne);function _e(D){return D.split(`
|
|
64
|
+
`).splice(1).map(e=>e.trim().replace("file://",""))}function Oe(D){return`
|
|
65
65
|
${_e(D).map(e=>` ${e.replace(/^at ([\s\S]+) \((.+)\)/,(t,n,s)=>k.gray(`at ${n} (${k.cyan(s)})`))}`).join(`
|
|
66
|
-
`)}`}const
|
|
67
|
-
`:""}}`)}}eu("log","gray"),eu("info","blue",{target:console.info}),eu("warn","yellow",{target:console.warn}),eu("success","green");const Le=eu("error","red",{target:console.error}),Ie=()=>I({setup:D=>D.errorHandler(e=>{Le(e.message),process.exit(1)})}),BD=D=>Array.isArray(D)?D:[D],ke=D=>D.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`),fD=D=>D.length<=1?`-${D}`:`--${ke(D)}`,Re=(D,e)=>e.length!==D.length?!1:D.every((t,n)=>t===e[n]);function je(D,e,t){if(e===B)return[D[B],B];const n=BD(e),s=Bu(D,t);let r,u;return s.forEach((o,F)=>{F===B||u===B||Re(n,F)&&(r=o,u=F)}),[r,u]}const We=Pu.WriteStream.prototype.hasColors(),R=(D,e)=>We?t=>"\x1B["+D+"m"+t+"\x1B["+e+"m":t=>t,AD=R(1,22),Pe=R(31,39),He=R(32,39),gD=R(33,39),Ue=R(34,39),$D=R(35,39),ze=R(36,39),qe={en:{"help.name":"Name:","help.version":"Version:","help.subcommand":"Subcommand:","help.commands":"Commands:","help.globalFlags":"Global Flags:","help.flags":"Flags:","help.description":"Description:","help.usage":"Usage:","help.examples":"Examples:","help.notes":"Notes:","help.noDescription":"(No description)","help.notes.1":"If no command is specified, show help for the CLI.","help.notes.2":"If a command is specified, show help for the command.","help.notes.3":"-h is an alias for --help.","help.examples.1":"Show help","help.examples.2":"Show help for a specific command","help.commandDescription":"Show help","help.default":"Default: %s"},"zh-CN":{"help.name":"\u540D\u79F0:","help.version":"\u7248\u672C:","help.subcommand":"\u5B50\u547D\u4EE4:","help.commands":"\u547D\u4EE4:","help.globalFlags":"\u5168\u5C40\u6807\u5FD7:","help.flags":"\u6807\u5FD7:","help.description":"\u63CF\u8FF0:","help.usage":"\u4F7F\u7528:","help.examples":"\u793A\u4F8B:","help.notes":"\u5907\u6CE8:","help.noDescription":"(\u65E0\u63CF\u8FF0)","help.notes.1":"\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u5C55\u793A\u54EA\u4E2A\u547D\u4EE4\u7684\u5E2E\u52A9\u4FE1\u606F\uFF0C\u9ED8\u8BA4\u5C55\u793ACLI\u7684\u3002","help.notes.2":"\u5982\u679C\u6307\u5B9A\u4E86\u5219\u5C55\u793A\u8BE5\u547D\u4EE4\u5E2E\u52A9\u4FE1\u606F\u3002","help.notes.3":"-h \u662F --help \u7684\u4E00\u4E2A\u522B\u540D\u3002","help.examples.1":"\u5C55\u793A CLI \u7684\u5E2E\u52A9\u4FE1\u606F","help.examples.2":"\u5C55\u793A\u6307\u5B9A\u547D\u4EE4\u7684\u5E2E\u52A9\u4FE1\u606F","help.commandDescription":"\u5C55\u793A\u5E2E\u52A9\u4FE1\u606F","help.default":"\u9ED8\u8BA4\u503C: %s"}};function Ye({onlyFirst:D=!1}={}){const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,D?void 0:"g")}function Ge(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(Ye(),"")}function Mu(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var Ou={exports:{}};Ou.exports,function(D){var e={};D.exports=e,e.eastAsianWidth=function(n){var s=n.charCodeAt(0),r=n.length==2?n.charCodeAt(1):0,u=s;return 55296<=s&&s<=56319&&56320<=r&&r<=57343&&(s&=1023,r&=1023,u=s<<10|r,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},e.characterLength=function(n){var s=this.eastAsianWidth(n);return s=="F"||s=="W"||s=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var s=t(n),r=0,u=0;u<s.length;u++)r=r+this.characterLength(s[u]);return r},e.slice=function(n,s,r){textLen=e.length(n),s=s||0,r=r||1,s<0&&(s=textLen+s),r<0&&(r=textLen+r);for(var u="",o=0,F=t(n),i=0;i<F.length;i++){var C=F[i],a=e.length(C);if(o>=s-(a==2?1:0))if(o+a<=r)u+=C;else break;o+=a}return u}}(Ou);var Ze=Ou.exports,Ve=Mu(Ze),Je=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\uDF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DE92]|\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-\u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D96\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},Ke=Mu(Je);function Qe(D,e={}){if(typeof D!="string"||D.length===0||(e={ambiguousIsNarrow:!0,...e},D=Ge(D),D.length===0))return 0;D=D.replace(Ke()," ");const t=e.ambiguousIsNarrow?1:2;let n=0;for(const s of D){const r=s.codePointAt(0);if(!(r<=31||r>=127&&r<=159||r>=768&&r<=879))switch(Ve.eastAsianWidth(s)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}var Xe=function(D,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,n=e.align||[],s=e.stringLength||function(F){return String(F).length},r=yD(D,function(F,i){return SD(i,function(C,a){var l=wD(C);(!F[a]||l>F[a])&&(F[a]=l)}),F},[]),u=iu(D,function(F){return iu(F,function(i,C){var a=String(i);if(n[C]==="."){var l=wD(a),c=r[C]+(/\./.test(a)?1:2)-(s(a)-l);return a+Array(c).join(" ")}else return a})}),o=yD(u,function(F,i){return SD(i,function(C,a){var l=s(C);(!F[a]||l>F[a])&&(F[a]=l)}),F},[]);return iu(u,function(F){return iu(F,function(i,C){var a=o[C]-s(i)||0,l=Array(Math.max(a+1,1)).join(" ");return n[C]==="r"||n[C]==="."?l+i:n[C]==="c"?Array(Math.ceil(a/2+1)).join(" ")+i+Array(Math.floor(a/2+1)).join(" "):i+l}).join(t).replace(/\s+$/,"")}).join(`
|
|
68
|
-
`)};function
|
|
69
|
-
`),
|
|
70
|
-
`);e.push(
|
|
71
|
-
`)},_D={renderFlagName:D=>D,renderSections:D=>D,renderType:(D,e)=>
|
|
72
|
-
`),
|
|
66
|
+
`)}`}const Me=/\r?\n/g;function Te(D){return D.map(e=>typeof(e==null?void 0:e.stack)=="string"?[e.message,Oe(e.stack)]:typeof e=="string"?e.split(Me):e).flat()}function Le(D,e){const t=D.toUpperCase(),n=k[e];return k.bold(k.inverse(n(` ${t} `)))}function eu(D,e,{target:t=console.log,textColor:n,newline:s=!0}={}){const r=k[e],u=n?k[n]:r;return(...o)=>{const a=Te(o),i=Le(D,e);for(const C of a)t(`${i} ${u(C)}${s?`
|
|
67
|
+
`:""}}`)}}eu("log","gray"),eu("info","blue",{target:console.info}),eu("warn","yellow",{target:console.warn}),eu("success","green");const Ie=eu("error","red",{target:console.error}),ke=()=>I({setup:D=>D.errorHandler(e=>{Ie(e.message),process.exit(1)})}),fD=D=>Array.isArray(D)?D:[D],je=D=>D.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`),AD=D=>D.length<=1?`-${D}`:`--${je(D)}`,Re=(D,e)=>e.length!==D.length?!1:D.every((t,n)=>t===e[n]);function We(D,e,t){if(e===B)return[D[B],B];const n=fD(e),s=fu(D,t);let r,u;return s.forEach((o,a)=>{a===B||u===B||Re(n,a)&&(r=o,u=a)}),[r,u]}const Pe=Hu.WriteStream.prototype.hasColors(),j=(D,e)=>Pe?t=>"\x1B["+D+"m"+t+"\x1B["+e+"m":t=>t,gD=j(1,22),He=j(31,39),Ue=j(32,39),$D=j(33,39),ze=j(34,39),wD=j(35,39),qe=j(36,39),Ye={en:{"help.name":"Name:","help.version":"Version:","help.subcommand":"Subcommand:","help.commands":"Commands:","help.globalFlags":"Global Flags:","help.flags":"Flags:","help.description":"Description:","help.usage":"Usage:","help.examples":"Examples:","help.notes":"Notes:","help.noDescription":"(No description)","help.notes.1":"If no command is specified, show help for the CLI.","help.notes.2":"If a command is specified, show help for the command.","help.notes.3":"-h is an alias for --help.","help.examples.1":"Show help","help.examples.2":"Show help for a specific command","help.commandDescription":"Show help","help.default":"Default: %s"},"zh-CN":{"help.name":"\u540D\u79F0:","help.version":"\u7248\u672C:","help.subcommand":"\u5B50\u547D\u4EE4:","help.commands":"\u547D\u4EE4:","help.globalFlags":"\u5168\u5C40\u6807\u5FD7:","help.flags":"\u6807\u5FD7:","help.description":"\u63CF\u8FF0:","help.usage":"\u4F7F\u7528:","help.examples":"\u793A\u4F8B:","help.notes":"\u5907\u6CE8:","help.noDescription":"(\u65E0\u63CF\u8FF0)","help.notes.1":"\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u5C55\u793A\u54EA\u4E2A\u547D\u4EE4\u7684\u5E2E\u52A9\u4FE1\u606F\uFF0C\u9ED8\u8BA4\u5C55\u793ACLI\u7684\u3002","help.notes.2":"\u5982\u679C\u6307\u5B9A\u4E86\u5219\u5C55\u793A\u8BE5\u547D\u4EE4\u5E2E\u52A9\u4FE1\u606F\u3002","help.notes.3":"-h \u662F --help \u7684\u4E00\u4E2A\u522B\u540D\u3002","help.examples.1":"\u5C55\u793A CLI \u7684\u5E2E\u52A9\u4FE1\u606F","help.examples.2":"\u5C55\u793A\u6307\u5B9A\u547D\u4EE4\u7684\u5E2E\u52A9\u4FE1\u606F","help.commandDescription":"\u5C55\u793A\u5E2E\u52A9\u4FE1\u606F","help.default":"\u9ED8\u8BA4\u503C: %s"}};function Ge({onlyFirst:D=!1}={}){const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,D?void 0:"g")}function Ze(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(Ge(),"")}function Ou(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var Mu={exports:{}};Mu.exports,function(D){var e={};D.exports=e,e.eastAsianWidth=function(n){var s=n.charCodeAt(0),r=n.length==2?n.charCodeAt(1):0,u=s;return 55296<=s&&s<=56319&&56320<=r&&r<=57343&&(s&=1023,r&=1023,u=s<<10|r,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},e.characterLength=function(n){var s=this.eastAsianWidth(n);return s=="F"||s=="W"||s=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var s=t(n),r=0,u=0;u<s.length;u++)r=r+this.characterLength(s[u]);return r},e.slice=function(n,s,r){textLen=e.length(n),s=s||0,r=r||1,s<0&&(s=textLen+s),r<0&&(r=textLen+r);for(var u="",o=0,a=t(n),i=0;i<a.length;i++){var C=a[i],F=e.length(C);if(o>=s-(F==2?1:0))if(o+F<=r)u+=C;else break;o+=F}return u}}(Mu);var Ve=Mu.exports,Je=Ou(Ve),Ke=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\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B3\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\uD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3\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},Qe=Ou(Ke);function Xe(D,e={}){if(typeof D!="string"||D.length===0||(e={ambiguousIsNarrow:!0,...e},D=Ze(D),D.length===0))return 0;D=D.replace(Qe()," ");const t=e.ambiguousIsNarrow?1:2;let n=0;for(const s of D){const r=s.codePointAt(0);if(!(r<=31||r>=127&&r<=159||r>=768&&r<=879))switch(Je.eastAsianWidth(s)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}var ut=function(D,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,n=e.align||[],s=e.stringLength||function(a){return String(a).length},r=SD(D,function(a,i){return vD(i,function(C,F){var l=yD(C);(!a[F]||l>a[F])&&(a[F]=l)}),a},[]),u=Cu(D,function(a){return Cu(a,function(i,C){var F=String(i);if(n[C]==="."){var l=yD(F),c=r[C]+(/\./.test(F)?1:2)-(s(F)-l);return F+Array(c).join(" ")}else return F})}),o=SD(u,function(a,i){return vD(i,function(C,F){var l=s(C);(!a[F]||l>a[F])&&(a[F]=l)}),a},[]);return Cu(u,function(a){return Cu(a,function(i,C){var F=o[C]-s(i)||0,l=Array(Math.max(F+1,1)).join(" ");return n[C]==="r"||n[C]==="."?l+i:n[C]==="c"?Array(Math.ceil(F/2+1)).join(" ")+i+Array(Math.floor(F/2+1)).join(" "):i+l}).join(t).replace(/\s+$/,"")}).join(`
|
|
68
|
+
`)};function yD(D){var e=/\.[^.]*$/.exec(D);return e?e.index+1:D.length}function SD(D,e,t){if(D.reduce)return D.reduce(e,t);for(var n=0,s=arguments.length>=3?t:D[n++];n<D.length;n++)e(s,D[n],n);return s}function vD(D,e){if(D.forEach)return D.forEach(e);for(var t=0;t<D.length;t++)e.call(D,D[t],t)}function Cu(D,e){if(D.map)return D.map(e);for(var t=[],n=0;n<D.length;n++)t.push(e.call(D,D[n],n));return t}var Dt=Ou(ut);const Tu=D=>Dt(D,{stringLength:Xe}),tu=D=>Tu(D).split(`
|
|
69
|
+
`),bD=new Map([[Boolean,void 0],[String,"string"],[Number,"number"]]),et=(D,e=!1)=>{const t=bD.has(D)?bD.get(D):"value";return t?e?`[${t}]`:`<${t}>`:""},tt=(D,e)=>D===B?-1:e===B?1:D.length-e.length,Lu=$D("-"),xD=D=>{process.stdout.write(D)},Iu=(D,e,t)=>{var n;const{t:s}=e.i18n,r=[{title:s("help.name"),body:He(e._name)},{title:s("help.version"),body:$D(e._version)}];t&&r.push({title:s("help.subcommand"),body:Ue(`${e._scriptName} ${H(t.name)}`)}),D.push({type:"inline",items:r}),D.push({title:s("help.description"),body:[(n=t==null?void 0:t.description)!=null?n:e._description]})},ND=(D,e,t)=>{const n=e.map(([s,r])=>[s,Lu,r]);D.push({title:t("help.examples"),body:tu(n)})},ku=(D,e,t)=>Object.entries(D).map(([n,s])=>{const r=s.default!==void 0;let u=[AD(n)];s.alias&&u.push(AD(s.alias)),u=u.map(t.renderFlagName);const o=[ze(u.join(", ")),t.renderType(s.type,r)];return o.push(Lu,s.description||e("help.noDescription")),r&&o.push(`(${e("help.default",t.renderDefault(s.default))})`),o}),R=D=>{const e=[];for(const t of D){if(t.type==="block"||!t.type){const n=" ",s=t.body.map(u=>n+u);s.unshift("");const r=s.join(`
|
|
70
|
+
`);e.push(Tu([[gD(`${t.title}`)],[r]]).toString())}else if(t.type==="inline"){const n=t.items.map(r=>[gD(`${r.title}`),r.body]),s=Tu(n);e.push(s.toString())}e.push("")}return e.join(`
|
|
71
|
+
`)},_D={renderFlagName:D=>D,renderSections:D=>D,renderType:(D,e)=>et(D,e),renderDefault:D=>JSON.stringify(D)},lu=(D,e,t,n,s)=>{const{cli:r}=e,{t:u}=r.i18n;let o=[];const a=Object.assign(Object.create(null),_D,s);Iu(o,r),o.push({title:u("help.usage"),body:[wD(`$ ${r._scriptName} ${tD("command",e.hasRootOrAlias)} [flags]`)]});const i=[...e.hasRoot?[r._commands[B]]:[],...Object.values(r._commands)].map(F=>{var l;const c=[typeof F.name=="symbol"?"":F.name,...fD((l=F.alias)!=null?l:[])].sort(tt).map(E=>E===""||typeof E=="symbol"?`${r._scriptName}`:`${r._scriptName} ${E}`).join(", ");return[qe(c),Lu,F.description]});i.length&&o.push({title:u("help.commands"),body:tu(i)});const C=ku(r._flags,u,a);return C.length&&o.push({title:u("help.globalFlags"),body:tu(C)}),t&&o.push({title:u("help.notes"),body:t}),n&&ND(o,n,u),o=a.renderSections(o),D(o)},ju=(D,e,t)=>{var n,s,r,u,o,a;const{cli:i}=e,{t:C}=i.i18n,[F]=We(i._commands,t,C);if(!F)throw new su(H(t),C);const l=Object.assign(Object.create(null),_D,(n=F.help)==null?void 0:n.renderers);let c=[];t===B?Iu(c,i):Iu(c,i,{...F,name:H(t)});const E=(r=(s=F.parameters)==null?void 0:s.join(" "))!=null?r:void 0,m=t===B?"":` ${H(t)}`,p=E?` ${E}`:"",y=F.flags?" [flags]":"";c.push({title:C("help.usage"),body:[wD(`$ ${i._scriptName}${m}${p}${y}`)]});const d=ku(i._flags,C,l);return d.length&&c.push({title:C("help.globalFlags"),body:tu(d)}),F.flags&&c.push({title:C("help.flags"),body:tu(ku(F.flags,C,l))}),(u=F==null?void 0:F.help)!=null&&u.notes&&c.push({title:C("help.notes"),body:F.help.notes}),(o=F==null?void 0:F.help)!=null&&o.examples&&ND(c,(a=F==null?void 0:F.help)==null?void 0:a.examples,C),c=l.renderSections(c),D(c)},nt=({command:D=!0,flag:e=!0,showHelpWhenNoCommand:t=!0,notes:n,examples:s,banner:r,renderers:u}={})=>I({setup:o=>{const{add:a,t:i}=o.i18n;a(Ye);const C=F=>{r&&xD(`${r}
|
|
72
|
+
`),xD(F)};return D&&(o=o.command("help",i("help.commandDescription"),{parameters:["[command...]"],help:{notes:[i("help.notes.1"),i("help.notes.2"),i("help.notes.3")],examples:[[`$ ${o._scriptName} help`,i("help.examples.1")],[`$ ${o._scriptName} help <command>`,i("help.examples.2")],[`$ ${o._scriptName} <command> --help`,i("help.examples.2")]]}}).on("help",F=>{F.parameters.command.length?C(ju(R,F,F.parameters.command)):C(lu(R,F,n,s,u))})),e&&(o=o.flag("help",i("help.commandDescription"),{alias:"h",type:Boolean,default:!1})),o.inspector((F,l)=>{const c=F.flags.help;if(!F.hasRootOrAlias&&!F.raw._.length&&t&&!c){let E=`${i("core.noCommandGiven")}
|
|
73
73
|
|
|
74
|
-
`;E+=
|
|
75
|
-
`,C(E),process.exit(1)}else c?
|
|
76
|
-
`),process.exit(2)}}})}}),
|
|
74
|
+
`;E+=lu(R,F,n,s,u),E+=`
|
|
75
|
+
`,C(E),process.exit(1)}else c?F.raw._.length?F.called!==B&&F.name===B?C(lu(R,F,n,s,u)):C(ju(R,F,F.raw._)):F.hasRootOrAlias?C(ju(R,F,B)):C(lu(R,F,n,s,u)):l()}),o}}),rt={en:{"utils.and":"%s and %s"},"zh-CN":{"utils.and":"%s \u548C %s"}},st=(D,{add:e,t})=>(e(rt),D.length<=1?D[0]:t("utils.and",D.slice(0,-1).join(", "),D[D.length-1])),O=new Uint32Array(65536),ot=(D,e)=>{const t=D.length,n=e.length,s=1<<t-1;let r=-1,u=0,o=t,a=t;for(;a--;)O[D.charCodeAt(a)]|=1<<a;for(a=0;a<n;a++){let i=O[e.charCodeAt(a)];const C=i|u;i|=(i&r)+r^r,u|=~(i|r),r&=i,u&s&&o++,r&s&&o--,u=u<<1|1,r=r<<1|~(C|u),u&=C}for(a=t;a--;)O[D.charCodeAt(a)]=0;return o},at=(D,e)=>{const t=e.length,n=D.length,s=[],r=[],u=Math.ceil(t/32),o=Math.ceil(n/32);for(let E=0;E<u;E++)r[E]=-1,s[E]=0;let a=0;for(;a<o-1;a++){let E=0,m=-1;const p=a*32,y=Math.min(32,n)+p;for(let d=p;d<y;d++)O[D.charCodeAt(d)]|=1<<d;for(let d=0;d<t;d++){const W=O[e.charCodeAt(d)],N=r[d/32|0]>>>d&1,b=s[d/32|0]>>>d&1,Ru=W|E,Wu=((W|b)&m)+m^m|W|b;let z=E|~(Wu|m),nu=m&Wu;z>>>31^N&&(r[d/32|0]^=1<<d),nu>>>31^b&&(s[d/32|0]^=1<<d),z=z<<1|N,nu=nu<<1|b,m=nu|~(Ru|z),E=z&Ru}for(let d=p;d<y;d++)O[D.charCodeAt(d)]=0}let i=0,C=-1;const F=a*32,l=Math.min(32,n-F)+F;for(let E=F;E<l;E++)O[D.charCodeAt(E)]|=1<<E;let c=n;for(let E=0;E<t;E++){const m=O[e.charCodeAt(E)],p=r[E/32|0]>>>E&1,y=s[E/32|0]>>>E&1,d=m|i,W=((m|y)&C)+C^C|m|y;let N=i|~(W|C),b=C&W;c+=N>>>n-1&1,c-=b>>>n-1&1,N>>>31^p&&(r[E/32|0]^=1<<E),b>>>31^y&&(s[E/32|0]^=1<<E),N=N<<1|p,b=b<<1|y,C=b|~(d|N),i=N&d}for(let E=F;E<l;E++)O[D.charCodeAt(E)]=0;return c},OD=(D,e)=>{if(D.length<e.length){const t=e;e=D,D=t}return e.length===0?D.length:D.length<=32?ot(D,e):at(D,e)};var cu=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ft(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var it=1/0,Ct="[object Symbol]",lt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ct="\\u0300-\\u036f\\ufe20-\\ufe23",Et="\\u20d0-\\u20f0",ht="["+ct+Et+"]",mt=RegExp(ht,"g"),pt={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},dt=typeof cu=="object"&&cu&&cu.Object===Object&&cu,Bt=typeof self=="object"&&self&&self.Object===Object&&self,ft=dt||Bt||Function("return this")();function At(D){return function(e){return D==null?void 0:D[e]}}var gt=At(pt),$t=Object.prototype,wt=$t.toString,MD=ft.Symbol,TD=MD?MD.prototype:void 0,LD=TD?TD.toString:void 0;function yt(D){if(typeof D=="string")return D;if(vt(D))return LD?LD.call(D):"";var e=D+"";return e=="0"&&1/D==-it?"-0":e}function St(D){return!!D&&typeof D=="object"}function vt(D){return typeof D=="symbol"||St(D)&&wt.call(D)==Ct}function bt(D){return D==null?"":yt(D)}function xt(D){return D=bt(D),D&&D.replace(lt,gt).replace(mt,"")}var Nt=xt,_t=Ft(Nt);let w,v;(function(D){D.ALL_CLOSEST_MATCHES="all-closest-matches",D.ALL_MATCHES="all-matches",D.ALL_SORTED_MATCHES="all-sorted-matches",D.FIRST_CLOSEST_MATCH="first-closest-match",D.FIRST_MATCH="first-match"})(w||(w={})),function(D){D.EDIT_DISTANCE="edit-distance",D.SIMILARITY="similarity"}(v||(v={}));const ID=new Error("unknown returnType"),Eu=new Error("unknown thresholdType"),kD=(D,e)=>{let t=D;return e.trimSpaces&&(t=t.trim().replace(/\s+/g," ")),e.deburr&&(t=_t(t)),e.caseSensitive||(t=t.toLowerCase()),t},jD=(D,e)=>{const{matchPath:t}=e,n=((s,r)=>{const u=r.length>0?r.reduce((o,a)=>o==null?void 0:o[a],s):s;return typeof u!="string"?"":u})(D,t);return kD(n,e)};function Ot(D,e,t){const n=(l=>{const c={caseSensitive:!1,deburr:!0,matchPath:[],returnType:w.FIRST_CLOSEST_MATCH,thresholdType:v.SIMILARITY,trimSpaces:!0,...l};switch(c.thresholdType){case v.EDIT_DISTANCE:return{threshold:20,...c};case v.SIMILARITY:return{threshold:.4,...c};default:throw Eu}})(t),{returnType:s,threshold:r,thresholdType:u}=n,o=kD(D,n);let a,i;switch(u){case v.EDIT_DISTANCE:a=l=>l<=r,i=l=>OD(o,jD(l,n));break;case v.SIMILARITY:a=l=>l>=r,i=l=>((c,E)=>{if(!c||!E)return 0;if(c===E)return 1;const m=OD(c,E),p=Math.max(c.length,E.length);return(p-m)/p})(o,jD(l,n));break;default:throw Eu}const C=[],F=e.length;switch(s){case w.ALL_CLOSEST_MATCHES:case w.FIRST_CLOSEST_MATCH:{const l=[];let c;switch(u){case v.EDIT_DISTANCE:c=1/0;for(let m=0;m<F;m+=1){const p=i(e[m]);c>p&&(c=p),l.push(p)}break;case v.SIMILARITY:c=0;for(let m=0;m<F;m+=1){const p=i(e[m]);c<p&&(c=p),l.push(p)}break;default:throw Eu}const E=l.length;for(let m=0;m<E;m+=1){const p=l[m];a(p)&&p===c&&C.push(m)}break}case w.ALL_MATCHES:for(let l=0;l<F;l+=1)a(i(e[l]))&&C.push(l);break;case w.ALL_SORTED_MATCHES:{const l=[];for(let c=0;c<F;c+=1){const E=i(e[c]);a(E)&&l.push({score:E,index:c})}switch(u){case v.EDIT_DISTANCE:l.sort((c,E)=>c.score-E.score);break;case v.SIMILARITY:l.sort((c,E)=>E.score-c.score);break;default:throw Eu}for(const c of l)C.push(c.index);break}case w.FIRST_MATCH:for(let l=0;l<F;l+=1)if(a(i(e[l]))){C.push(l);break}break;default:throw ID}return((l,c,E)=>{switch(E){case w.ALL_CLOSEST_MATCHES:case w.ALL_MATCHES:case w.ALL_SORTED_MATCHES:return c.map(m=>l[m]);case w.FIRST_CLOSEST_MATCH:case w.FIRST_MATCH:return c.length?l[c[0]]:null;default:throw ID}})(e,C,s)}const Mt=Hu.WriteStream.prototype.hasColors(),RD=(D,e)=>Mt?t=>"\x1B["+D+"m"+t+"\x1B["+e+"m":t=>t,Tt=RD(1,22),Lt=RD(9,29),It={en:{"notFound.possibleCommands":"Possible commands: %s.","notFound.commandNotFound":'Command "%s" not found.',"notFound.didyoumean":'Did you mean "%s"?',"notFound.commandNotRegisteredNote":"NOTE: You haven't register any command yet."},"zh-CN":{"notFound.possibleCommands":"\u53EF\u80FD\u7684\u547D\u4EE4: %s\u3002","notFound.commandNotFound":'\u672A\u627E\u5230\u547D\u4EE4 "%s"\u3002',"notFound.didyoumean":'\u4F60\u662F\u4E0D\u662F\u6307 "%s"\uFF1F',"notFound.commandNotRegisteredNote":"\u63D0\u793A: \u4F60\u8FD8\u6CA1\u6709\u6CE8\u518C\u4EFB\u4F55\u547D\u4EE4\u3002"}},kt=()=>I({setup:D=>{const{t:e,add:t}=D.i18n;return t(It),D.inspector({enforce:"pre",fn:(n,s)=>{const r=Object.keys(D._commands),u=!!r.length;try{s()}catch(o){if(!(o instanceof su||o instanceof ou))throw o;if(n.raw._.length===0||o instanceof ou){console.error(e("core.noCommandGiven")),u&&console.error(e("notFound.possibleCommands",st(r,D.i18n)));return}const a=o.commandName,i=Ot(a,r);console.error(e("notFound.commandNotFound",Lt(a))),u&&i?console.error(e("notFound.didyoumean",Tt(i))):u||console.error(e("notFound.commandNotRegisteredNote")),process.stderr.write(`
|
|
76
|
+
`),process.exit(2)}}})}}),jt={en:{"utils.and":"%s and %s"},"zh-CN":{"utils.and":"%s \u548C %s"}},WD=(D,{add:e,t})=>(e(jt),D.length<=1?D[0]:t("utils.and",D.slice(0,-1).join(", "),D[D.length-1])),Rt={en:{"strictFlags.unexpectedSingle":"Unexpected flag: %s.","strictFlags.unexpectedMore":"Unexpected flags: %s.","strictFlags.and":"%s and %s"},"zh-CN":{"strictFlags.unexpectedSingle":"\u9884\u671F\u4E4B\u5916\u7684\u6807\u5FD7: %s\u3002","strictFlags.unexpectedMore":"\u9884\u671F\u4E4B\u5916\u7684\u6807\u5FD7: %s\u3002","strictFlags.and":"%s \u548C %s"}},Wt=()=>I({setup:D=>{const{add:e,t}=D.i18n;return e(Rt),D.inspector((n,s)=>{const r=Object.keys(n.unknownFlags);if(!n.resolved||r.length===0)s();else throw r.length>1?new Error(t("strictFlags.unexpectedMore",WD(r,D.i18n))):new Error(t("strictFlags.unexpectedSingle",WD(r,D.i18n)))})}}),Pt=D=>D.length===0?"":D.startsWith("v")?D:`v${D}`,Ht={en:{"version.description":"Show CLI version","version.notes.1":'The version string begins with a "v".'},"zh-CN":{"version.description":"\u5C55\u793A CLI \u7248\u672C","version.notes.1":'\u7248\u672C\u53F7\u5F00\u5934\u5E26\u6709 "v"\u3002'}},Ut=({command:D=!0,flag:e=!0}={})=>I({setup:t=>{const{add:n,t:s}=t.i18n;n(Ht);const r=Pt(t._version);return D&&(t=t.command("version",s("version.description"),{help:{notes:[s("version.notes.1")]}}).on("version",()=>{process.stdout.write(r)})),e&&(t=t.flag("version",s("version.description"),{alias:"V",type:Boolean,default:!1}),t.inspector({enforce:"pre",fn:(u,o)=>{u.flags.version?process.stdout.write(r):o()}})),t}});export{pe as Clerc,Yu as CommandExistsError,Gu as CommandNameConflictError,Vu as DescriptionNotSetError,Ku as InvalidCommandNameError,pu as LocaleNotCalledFirstError,ou as NoCommandGivenError,su as NoSuchCommandError,B as Root,Zu as ScriptNameNotSetError,Ju as VersionNotSetError,Se as completionsPlugin,DD as compose,fe as defineCommand,de as defineHandler,Be as defineInspector,I as definePlugin,nD as detectLocale,H as formatCommandName,ke as friendlyErrorPlugin,nt as helpPlugin,eD as isValidName,kt as notFoundPlugin,Au as resolveArgv,uD as resolveCommand,fu as resolveFlattenCommands,Wt as strictFlagsPlugin,rD as stripFlags,Ut as versionPlugin,tD as withBrackets};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clerc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve)",
|
|
5
5
|
"description": "Clerc: The full-featured cli library.",
|
|
6
6
|
"keywords": [
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@clerc/
|
|
51
|
-
"@clerc/plugin-
|
|
52
|
-
"@clerc/plugin-
|
|
53
|
-
"@clerc/plugin-
|
|
54
|
-
"@clerc/
|
|
55
|
-
"@clerc/plugin-strict-flags": "0.
|
|
56
|
-
"@clerc/plugin-version": "0.
|
|
50
|
+
"@clerc/plugin-completions": "0.40.0",
|
|
51
|
+
"@clerc/plugin-friendly-error": "0.40.0",
|
|
52
|
+
"@clerc/plugin-not-found": "0.40.0",
|
|
53
|
+
"@clerc/plugin-help": "0.40.0",
|
|
54
|
+
"@clerc/core": "0.40.0",
|
|
55
|
+
"@clerc/plugin-strict-flags": "0.40.0",
|
|
56
|
+
"@clerc/plugin-version": "0.40.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "pkgroll --minify",
|