@ckreidl/lucide-shopify-snippets 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/dist/cli.js +124 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @ckreidl/lucide-shopify-snippets
|
|
2
|
+
|
|
3
|
+
Add [Lucide](https://lucide.dev) icon snippets to your Shopify theme.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @ckreidl/lucide-shopify-snippets add menu chevron-down arrow-right
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This creates Liquid snippets in your `snippets` directory:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
snippets/
|
|
15
|
+
icon-menu.liquid
|
|
16
|
+
icon-chevron-down.liquid
|
|
17
|
+
icon-arrow-right.liquid
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use them in your theme:
|
|
21
|
+
|
|
22
|
+
```liquid
|
|
23
|
+
{% render 'icon-menu' %}
|
|
24
|
+
{% render 'icon-menu', size: 32 %}
|
|
25
|
+
{% render 'icon-menu', class: 'text-primary' %}
|
|
26
|
+
{% render 'icon-menu', stroke_width: 1.5 %}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Options
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx @ckreidl/lucide-shopify-snippets add <icons...> [options]
|
|
33
|
+
|
|
34
|
+
Options:
|
|
35
|
+
-d, --dir <path> Snippets directory (default: "snippets")
|
|
36
|
+
-p, --prefix <prefix> Prefix for snippet filenames (default: "icon-")
|
|
37
|
+
-f, --force Overwrite existing snippets
|
|
38
|
+
```
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire as pu}from"node:module";var gu=Object.create;var{getPrototypeOf:cu,defineProperty:FD,getOwnPropertyNames:mu}=Object;var du=Object.prototype.hasOwnProperty;var lu=(D,u,C)=>{C=D!=null?gu(cu(D)):{};let E=u||!D||!D.__esModule?FD(C,"default",{value:D,enumerable:!0}):C;for(let B of mu(D))if(!du.call(E,B))FD(E,B,{get:()=>D[B],enumerable:!0});return E};var b=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var xu=(D,u)=>{for(var C in u)FD(D,C,{get:u[C],enumerable:!0,configurable:!0,set:(E)=>u[C]=()=>E})};var iu=(D,u)=>()=>(D&&(u=D(D=0)),u);var v=pu(import.meta.url);var y=b((su)=>{class CD extends Error{constructor(D,u,C){super(C);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=u,this.exitCode=D,this.nestedError=void 0}}class LD extends CD{constructor(D){super(1,"commander.invalidArgument",D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}su.CommanderError=CD;su.InvalidArgumentError=LD});var d=b((au)=>{var{InvalidArgumentError:ru}=y();class KD{constructor(D,u){switch(this.description=u||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,D[0]){case"<":this.required=!0,this._name=D.slice(1,-1);break;case"[":this.required=!1,this._name=D.slice(1,-1);break;default:this.required=!0,this._name=D;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue(D,u){if(u===this.defaultValue||!Array.isArray(u))return[D];return u.push(D),u}default(D,u){return this.defaultValue=D,this.defaultValueDescription=u,this}argParser(D){return this.parseArg=D,this}choices(D){return this.argChoices=D.slice(),this.parseArg=(u,C)=>{if(!this.argChoices.includes(u))throw new ru(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(u,C);return u},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function ou(D){let u=D.name()+(D.variadic===!0?"...":"");return D.required?"<"+u+">":"["+u+"]"}au.Argument=KD;au.humanReadableArgName=ou});var ED=b((F2)=>{var{humanReadableArgName:u2}=d();class ND{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(D){this.helpWidth=this.helpWidth??D.helpWidth??80}visibleCommands(D){let u=D.commands.filter((E)=>!E._hidden),C=D._getHelpCommand();if(C&&!C._hidden)u.push(C);if(this.sortSubcommands)u.sort((E,B)=>{return E.name().localeCompare(B.name())});return u}compareOptions(D,u){let C=(E)=>{return E.short?E.short.replace(/^-/,""):E.long.replace(/^--/,"")};return C(D).localeCompare(C(u))}visibleOptions(D){let u=D.options.filter((E)=>!E.hidden),C=D._getHelpOption();if(C&&!C.hidden){let E=C.short&&D._findOption(C.short),B=C.long&&D._findOption(C.long);if(!E&&!B)u.push(C);else if(C.long&&!B)u.push(D.createOption(C.long,C.description));else if(C.short&&!E)u.push(D.createOption(C.short,C.description))}if(this.sortOptions)u.sort(this.compareOptions);return u}visibleGlobalOptions(D){if(!this.showGlobalOptions)return[];let u=[];for(let C=D.parent;C;C=C.parent){let E=C.options.filter((B)=>!B.hidden);u.push(...E)}if(this.sortOptions)u.sort(this.compareOptions);return u}visibleArguments(D){if(D._argsDescription)D.registeredArguments.forEach((u)=>{u.description=u.description||D._argsDescription[u.name()]||""});if(D.registeredArguments.find((u)=>u.description))return D.registeredArguments;return[]}subcommandTerm(D){let u=D.registeredArguments.map((C)=>u2(C)).join(" ");return D._name+(D._aliases[0]?"|"+D._aliases[0]:"")+(D.options.length?" [options]":"")+(u?" "+u:"")}optionTerm(D){return D.flags}argumentTerm(D){return D.name()}longestSubcommandTermLength(D,u){return u.visibleCommands(D).reduce((C,E)=>{return Math.max(C,this.displayWidth(u.styleSubcommandTerm(u.subcommandTerm(E))))},0)}longestOptionTermLength(D,u){return u.visibleOptions(D).reduce((C,E)=>{return Math.max(C,this.displayWidth(u.styleOptionTerm(u.optionTerm(E))))},0)}longestGlobalOptionTermLength(D,u){return u.visibleGlobalOptions(D).reduce((C,E)=>{return Math.max(C,this.displayWidth(u.styleOptionTerm(u.optionTerm(E))))},0)}longestArgumentTermLength(D,u){return u.visibleArguments(D).reduce((C,E)=>{return Math.max(C,this.displayWidth(u.styleArgumentTerm(u.argumentTerm(E))))},0)}commandUsage(D){let u=D._name;if(D._aliases[0])u=u+"|"+D._aliases[0];let C="";for(let E=D.parent;E;E=E.parent)C=E.name()+" "+C;return C+u+" "+D.usage()}commandDescription(D){return D.description()}subcommandDescription(D){return D.summary()||D.description()}optionDescription(D){let u=[];if(D.argChoices)u.push(`choices: ${D.argChoices.map((C)=>JSON.stringify(C)).join(", ")}`);if(D.defaultValue!==void 0){if(D.required||D.optional||D.isBoolean()&&typeof D.defaultValue==="boolean")u.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`)}if(D.presetArg!==void 0&&D.optional)u.push(`preset: ${JSON.stringify(D.presetArg)}`);if(D.envVar!==void 0)u.push(`env: ${D.envVar}`);if(u.length>0){let C=`(${u.join(", ")})`;if(D.description)return`${D.description} ${C}`;return C}return D.description}argumentDescription(D){let u=[];if(D.argChoices)u.push(`choices: ${D.argChoices.map((C)=>JSON.stringify(C)).join(", ")}`);if(D.defaultValue!==void 0)u.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`);if(u.length>0){let C=`(${u.join(", ")})`;if(D.description)return`${D.description} ${C}`;return C}return D.description}formatItemList(D,u,C){if(u.length===0)return[];return[C.styleTitle(D),...u,""]}groupItems(D,u,C){let E=new Map;return D.forEach((B)=>{let $=C(B);if(!E.has($))E.set($,[])}),u.forEach((B)=>{let $=C(B);if(!E.has($))E.set($,[]);E.get($).push(B)}),E}formatHelp(D,u){let C=u.padWidth(D,u),E=u.helpWidth??80;function B(M,J){return u.formatItem(M,C,J,u)}let $=[`${u.styleTitle("Usage:")} ${u.styleUsage(u.commandUsage(D))}`,""],F=u.commandDescription(D);if(F.length>0)$=$.concat([u.boxWrap(u.styleCommandDescription(F),E),""]);let A=u.visibleArguments(D).map((M)=>{return B(u.styleArgumentTerm(u.argumentTerm(M)),u.styleArgumentDescription(u.argumentDescription(M)))});if($=$.concat(this.formatItemList("Arguments:",A,u)),this.groupItems(D.options,u.visibleOptions(D),(M)=>M.helpGroupHeading??"Options:").forEach((M,J)=>{let T=M.map((G)=>{return B(u.styleOptionTerm(u.optionTerm(G)),u.styleOptionDescription(u.optionDescription(G)))});$=$.concat(this.formatItemList(J,T,u))}),u.showGlobalOptions){let M=u.visibleGlobalOptions(D).map((J)=>{return B(u.styleOptionTerm(u.optionTerm(J)),u.styleOptionDescription(u.optionDescription(J)))});$=$.concat(this.formatItemList("Global Options:",M,u))}return this.groupItems(D.commands,u.visibleCommands(D),(M)=>M.helpGroup()||"Commands:").forEach((M,J)=>{let T=M.map((G)=>{return B(u.styleSubcommandTerm(u.subcommandTerm(G)),u.styleSubcommandDescription(u.subcommandDescription(G)))});$=$.concat(this.formatItemList(J,T,u))}),$.join(`
|
|
3
|
+
`)}displayWidth(D){return fD(D).length}styleTitle(D){return D}styleUsage(D){return D.split(" ").map((u)=>{if(u==="[options]")return this.styleOptionText(u);if(u==="[command]")return this.styleSubcommandText(u);if(u[0]==="["||u[0]==="<")return this.styleArgumentText(u);return this.styleCommandText(u)}).join(" ")}styleCommandDescription(D){return this.styleDescriptionText(D)}styleOptionDescription(D){return this.styleDescriptionText(D)}styleSubcommandDescription(D){return this.styleDescriptionText(D)}styleArgumentDescription(D){return this.styleDescriptionText(D)}styleDescriptionText(D){return D}styleOptionTerm(D){return this.styleOptionText(D)}styleSubcommandTerm(D){return D.split(" ").map((u)=>{if(u==="[options]")return this.styleOptionText(u);if(u[0]==="["||u[0]==="<")return this.styleArgumentText(u);return this.styleSubcommandText(u)}).join(" ")}styleArgumentTerm(D){return this.styleArgumentText(D)}styleOptionText(D){return D}styleArgumentText(D){return D}styleSubcommandText(D){return D}styleCommandText(D){return D}padWidth(D,u){return Math.max(u.longestOptionTermLength(D,u),u.longestGlobalOptionTermLength(D,u),u.longestSubcommandTermLength(D,u),u.longestArgumentTermLength(D,u))}preformatted(D){return/\n[^\S\r\n]/.test(D)}formatItem(D,u,C,E){let $=" ".repeat(2);if(!C)return $+D;let F=D.padEnd(u+D.length-E.displayWidth(D)),A=2,_=(this.helpWidth??80)-u-A-2,M;if(_<this.minWidthToWrap||E.preformatted(C))M=C;else M=E.boxWrap(C,_).replace(/\n/g,`
|
|
4
|
+
`+" ".repeat(u+A));return $+F+" ".repeat(A)+M.replace(/\n/g,`
|
|
5
|
+
${$}`)}boxWrap(D,u){if(u<this.minWidthToWrap)return D;let C=D.split(/\r\n|\n/),E=/[\s]*[^\s]+/g,B=[];return C.forEach(($)=>{let F=$.match(E);if(F===null){B.push("");return}let A=[F.shift()],h=this.displayWidth(A[0]);F.forEach((_)=>{let M=this.displayWidth(_);if(h+M<=u){A.push(_),h+=M;return}B.push(A.join(""));let J=_.trimStart();A=[J],h=this.displayWidth(J)}),B.push(A.join(""))}),B.join(`
|
|
6
|
+
`)}}function fD(D){let u=/\x1b\[\d*(;\d*)*m/g;return D.replace(u,"")}F2.Help=ND;F2.stripColor=fD});var BD=b((A2)=>{var{InvalidArgumentError:B2}=y();class bD{constructor(D,u){this.flags=D,this.description=u||"",this.required=D.includes("<"),this.optional=D.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(D),this.mandatory=!1;let C=$2(D);if(this.short=C.shortFlag,this.long=C.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(D,u){return this.defaultValue=D,this.defaultValueDescription=u,this}preset(D){return this.presetArg=D,this}conflicts(D){return this.conflictsWith=this.conflictsWith.concat(D),this}implies(D){let u=D;if(typeof D==="string")u={[D]:!0};return this.implied=Object.assign(this.implied||{},u),this}env(D){return this.envVar=D,this}argParser(D){return this.parseArg=D,this}makeOptionMandatory(D=!0){return this.mandatory=!!D,this}hideHelp(D=!0){return this.hidden=!!D,this}_collectValue(D,u){if(u===this.defaultValue||!Array.isArray(u))return[D];return u.push(D),u}choices(D){return this.argChoices=D.slice(),this.parseArg=(u,C)=>{if(!this.argChoices.includes(u))throw new B2(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(u,C);return u},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return PD(this.name().replace(/^no-/,""));return PD(this.name())}helpGroup(D){return this.helpGroupHeading=D,this}is(D){return this.short===D||this.long===D}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class jD{constructor(D){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,D.forEach((u)=>{if(u.negate)this.negativeOptions.set(u.attributeName(),u);else this.positiveOptions.set(u.attributeName(),u)}),this.negativeOptions.forEach((u,C)=>{if(this.positiveOptions.has(C))this.dualOptions.add(C)})}valueFromOption(D,u){let C=u.attributeName();if(!this.dualOptions.has(C))return!0;let E=this.negativeOptions.get(C).presetArg,B=E!==void 0?E:!1;return u.negate===(B===D)}}function PD(D){return D.split("-").reduce((u,C)=>{return u+C[0].toUpperCase()+C.slice(1)})}function $2(D){let u,C,E=/^-[^-]$/,B=/^--[^-]/,$=D.split(/[ |,]+/).concat("guard");if(E.test($[0]))u=$.shift();if(B.test($[0]))C=$.shift();if(!u&&E.test($[0]))u=$.shift();if(!u&&B.test($[0]))u=C,C=$.shift();if($[0].startsWith("-")){let F=$[0],A=`option creation failed due to '${F}' in option flags '${D}'`;if(/^-[^-][^-]/.test(F))throw Error(`${A}
|
|
7
|
+
- a short flag is a single dash and a single character
|
|
8
|
+
- either use a single dash and a single character (for a short flag)
|
|
9
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(E.test(F))throw Error(`${A}
|
|
10
|
+
- too many short flags`);if(B.test(F))throw Error(`${A}
|
|
11
|
+
- too many long flags`);throw Error(`${A}
|
|
12
|
+
- unrecognised flag format`)}if(u===void 0&&C===void 0)throw Error(`option creation failed due to no flags found in '${D}'.`);return{shortFlag:u,longFlag:C}}A2.Option=bD;A2.DualOptions=jD});var OD=b((J2)=>{function M2(D,u){if(Math.abs(D.length-u.length)>3)return Math.max(D.length,u.length);let C=[];for(let E=0;E<=D.length;E++)C[E]=[E];for(let E=0;E<=u.length;E++)C[0][E]=E;for(let E=1;E<=u.length;E++)for(let B=1;B<=D.length;B++){let $=1;if(D[B-1]===u[E-1])$=0;else $=1;if(C[B][E]=Math.min(C[B-1][E]+1,C[B][E-1]+1,C[B-1][E-1]+$),B>1&&E>1&&D[B-1]===u[E-2]&&D[B-2]===u[E-1])C[B][E]=Math.min(C[B][E],C[B-2][E-2]+1)}return C[D.length][u.length]}function Z2(D,u){if(!u||u.length===0)return"";u=Array.from(new Set(u));let C=D.startsWith("--");if(C)D=D.slice(2),u=u.map((F)=>F.slice(2));let E=[],B=3,$=0.4;if(u.forEach((F)=>{if(F.length<=1)return;let A=M2(D,F),h=Math.max(D.length,F.length);if((h-A)/h>$){if(A<B)B=A,E=[F];else if(A===B)E.push(F)}}),E.sort((F,A)=>F.localeCompare(A)),C)E=E.map((F)=>`--${F}`);if(E.length>1)return`
|
|
13
|
+
(Did you mean one of ${E.join(", ")}?)`;if(E.length===1)return`
|
|
14
|
+
(Did you mean ${E[0]}?)`;return""}J2.suggestSimilar=Z2});var gD=b((z2)=>{var T2=v("node:events").EventEmitter,$D=v("node:child_process"),I=v("node:path"),l=v("node:fs"),Q=v("node:process"),{Argument:Q2,humanReadableArgName:G2}=d(),{CommanderError:AD}=y(),{Help:X2,stripColor:H2}=ED(),{Option:kD,DualOptions:W2}=BD(),{suggestSimilar:vD}=OD();class _D extends T2{constructor(D){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=D||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:(u)=>Q.stdout.write(u),writeErr:(u)=>Q.stderr.write(u),outputError:(u,C)=>C(u),getOutHelpWidth:()=>Q.stdout.isTTY?Q.stdout.columns:void 0,getErrHelpWidth:()=>Q.stderr.isTTY?Q.stderr.columns:void 0,getOutHasColors:()=>hD()??(Q.stdout.isTTY&&Q.stdout.hasColors?.()),getErrHasColors:()=>hD()??(Q.stderr.isTTY&&Q.stderr.hasColors?.()),stripColor:(u)=>H2(u)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(D){return this._outputConfiguration=D._outputConfiguration,this._helpOption=D._helpOption,this._helpCommand=D._helpCommand,this._helpConfiguration=D._helpConfiguration,this._exitCallback=D._exitCallback,this._storeOptionsAsProperties=D._storeOptionsAsProperties,this._combineFlagAndOptionalValue=D._combineFlagAndOptionalValue,this._allowExcessArguments=D._allowExcessArguments,this._enablePositionalOptions=D._enablePositionalOptions,this._showHelpAfterError=D._showHelpAfterError,this._showSuggestionAfterError=D._showSuggestionAfterError,this}_getCommandAndAncestors(){let D=[];for(let u=this;u;u=u.parent)D.push(u);return D}command(D,u,C){let E=u,B=C;if(typeof E==="object"&&E!==null)B=E,E=null;B=B||{};let[,$,F]=D.match(/([^ ]+) *(.*)/),A=this.createCommand($);if(E)A.description(E),A._executableHandler=!0;if(B.isDefault)this._defaultCommandName=A._name;if(A._hidden=!!(B.noHelp||B.hidden),A._executableFile=B.executableFile||null,F)A.arguments(F);if(this._registerCommand(A),A.parent=this,A.copyInheritedSettings(this),E)return this;return A}createCommand(D){return new _D(D)}createHelp(){return Object.assign(new X2,this.configureHelp())}configureHelp(D){if(D===void 0)return this._helpConfiguration;return this._helpConfiguration=D,this}configureOutput(D){if(D===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,...D},this}showHelpAfterError(D=!0){if(typeof D!=="string")D=!!D;return this._showHelpAfterError=D,this}showSuggestionAfterError(D=!0){return this._showSuggestionAfterError=!!D,this}addCommand(D,u){if(!D._name)throw Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);if(u=u||{},u.isDefault)this._defaultCommandName=D._name;if(u.noHelp||u.hidden)D._hidden=!0;return this._registerCommand(D),D.parent=this,D._checkForBrokenPassThrough(),this}createArgument(D,u){return new Q2(D,u)}argument(D,u,C,E){let B=this.createArgument(D,u);if(typeof C==="function")B.default(E).argParser(C);else B.default(C);return this.addArgument(B),this}arguments(D){return D.trim().split(/ +/).forEach((u)=>{this.argument(u)}),this}addArgument(D){let u=this.registeredArguments.slice(-1)[0];if(u?.variadic)throw Error(`only the last argument can be variadic '${u.name()}'`);if(D.required&&D.defaultValue!==void 0&&D.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${D.name()}'`);return this.registeredArguments.push(D),this}helpCommand(D,u){if(typeof D==="boolean"){if(this._addImplicitHelpCommand=D,D&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let C=D??"help [command]",[,E,B]=C.match(/([^ ]+) *(.*)/),$=u??"display help for command",F=this.createCommand(E);if(F.helpOption(!1),B)F.arguments(B);if($)F.description($);if(this._addImplicitHelpCommand=!0,this._helpCommand=F,D||u)this._initCommandGroup(F);return this}addHelpCommand(D,u){if(typeof D!=="object")return this.helpCommand(D,u),this;return this._addImplicitHelpCommand=!0,this._helpCommand=D,this._initCommandGroup(D),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook(D,u){let C=["preSubcommand","preAction","postAction"];if(!C.includes(D))throw Error(`Unexpected value for event passed to hook : '${D}'.
|
|
16
|
+
Expecting one of '${C.join("', '")}'`);if(this._lifeCycleHooks[D])this._lifeCycleHooks[D].push(u);else this._lifeCycleHooks[D]=[u];return this}exitOverride(D){if(D)this._exitCallback=D;else this._exitCallback=(u)=>{if(u.code!=="commander.executeSubCommandAsync")throw u};return this}_exit(D,u,C){if(this._exitCallback)this._exitCallback(new AD(D,u,C));Q.exit(D)}action(D){let u=(C)=>{let E=this.registeredArguments.length,B=C.slice(0,E);if(this._storeOptionsAsProperties)B[E]=this;else B[E]=this.opts();return B.push(this),D.apply(this,B)};return this._actionHandler=u,this}createOption(D,u){return new kD(D,u)}_callParseArg(D,u,C,E){try{return D.parseArg(u,C)}catch(B){if(B.code==="commander.invalidArgument"){let $=`${E} ${B.message}`;this.error($,{exitCode:B.exitCode,code:B.code})}throw B}}_registerOption(D){let u=D.short&&this._findOption(D.short)||D.long&&this._findOption(D.long);if(u){let C=D.long&&this._findOption(D.long)?D.long:D.short;throw Error(`Cannot add option '${D.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${C}'
|
|
17
|
+
- already used by option '${u.flags}'`)}this._initOptionGroup(D),this.options.push(D)}_registerCommand(D){let u=(E)=>{return[E.name()].concat(E.aliases())},C=u(D).find((E)=>this._findCommand(E));if(C){let E=u(this._findCommand(C)).join("|"),B=u(D).join("|");throw Error(`cannot add command '${B}' as already have command '${E}'`)}this._initCommandGroup(D),this.commands.push(D)}addOption(D){this._registerOption(D);let u=D.name(),C=D.attributeName();if(D.negate){let B=D.long.replace(/^--no-/,"--");if(!this._findOption(B))this.setOptionValueWithSource(C,D.defaultValue===void 0?!0:D.defaultValue,"default")}else if(D.defaultValue!==void 0)this.setOptionValueWithSource(C,D.defaultValue,"default");let E=(B,$,F)=>{if(B==null&&D.presetArg!==void 0)B=D.presetArg;let A=this.getOptionValue(C);if(B!==null&&D.parseArg)B=this._callParseArg(D,B,A,$);else if(B!==null&&D.variadic)B=D._collectValue(B,A);if(B==null)if(D.negate)B=!1;else if(D.isBoolean()||D.optional)B=!0;else B="";this.setOptionValueWithSource(C,B,F)};if(this.on("option:"+u,(B)=>{let $=`error: option '${D.flags}' argument '${B}' is invalid.`;E(B,$,"cli")}),D.envVar)this.on("optionEnv:"+u,(B)=>{let $=`error: option '${D.flags}' value '${B}' from env '${D.envVar}' is invalid.`;E(B,$,"env")});return this}_optionEx(D,u,C,E,B){if(typeof u==="object"&&u instanceof kD)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let $=this.createOption(u,C);if($.makeOptionMandatory(!!D.mandatory),typeof E==="function")$.default(B).argParser(E);else if(E instanceof RegExp){let F=E;E=(A,h)=>{let _=F.exec(A);return _?_[0]:h},$.default(B).argParser(E)}else $.default(E);return this.addOption($)}option(D,u,C,E){return this._optionEx({},D,u,C,E)}requiredOption(D,u,C,E){return this._optionEx({mandatory:!0},D,u,C,E)}combineFlagAndOptionalValue(D=!0){return this._combineFlagAndOptionalValue=!!D,this}allowUnknownOption(D=!0){return this._allowUnknownOption=!!D,this}allowExcessArguments(D=!0){return this._allowExcessArguments=!!D,this}enablePositionalOptions(D=!0){return this._enablePositionalOptions=!!D,this}passThroughOptions(D=!0){return this._passThroughOptions=!!D,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(D=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!D,this}getOptionValue(D){if(this._storeOptionsAsProperties)return this[D];return this._optionValues[D]}setOptionValue(D,u){return this.setOptionValueWithSource(D,u,void 0)}setOptionValueWithSource(D,u,C){if(this._storeOptionsAsProperties)this[D]=u;else this._optionValues[D]=u;return this._optionValueSources[D]=C,this}getOptionValueSource(D){return this._optionValueSources[D]}getOptionValueSourceWithGlobals(D){let u;return this._getCommandAndAncestors().forEach((C)=>{if(C.getOptionValueSource(D)!==void 0)u=C.getOptionValueSource(D)}),u}_prepareUserArgs(D,u){if(D!==void 0&&!Array.isArray(D))throw Error("first parameter to parse must be array or undefined");if(u=u||{},D===void 0&&u.from===void 0){if(Q.versions?.electron)u.from="electron";let E=Q.execArgv??[];if(E.includes("-e")||E.includes("--eval")||E.includes("-p")||E.includes("--print"))u.from="eval"}if(D===void 0)D=Q.argv;this.rawArgs=D.slice();let C;switch(u.from){case void 0:case"node":this._scriptPath=D[1],C=D.slice(2);break;case"electron":if(Q.defaultApp)this._scriptPath=D[1],C=D.slice(2);else C=D.slice(1);break;case"user":C=D.slice(0);break;case"eval":C=D.slice(1);break;default:throw Error(`unexpected parse option { from: '${u.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",C}parse(D,u){this._prepareForParse();let C=this._prepareUserArgs(D,u);return this._parseCommand([],C),this}async parseAsync(D,u){this._prepareForParse();let C=this._prepareUserArgs(D,u);return await this._parseCommand([],C),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
18
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(D,u,C){if(l.existsSync(D))return;let E=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",B=`'${D}' does not exist
|
|
19
|
+
- if '${C}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
+
- ${E}`;throw Error(B)}_executeSubCommand(D,u){u=u.slice();let C=!1,E=[".js",".ts",".tsx",".mjs",".cjs"];function B(_,M){let J=I.resolve(_,M);if(l.existsSync(J))return J;if(E.includes(I.extname(M)))return;let T=E.find((G)=>l.existsSync(`${J}${G}`));if(T)return`${J}${T}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let $=D._executableFile||`${this._name}-${D._name}`,F=this._executableDir||"";if(this._scriptPath){let _;try{_=l.realpathSync(this._scriptPath)}catch{_=this._scriptPath}F=I.resolve(I.dirname(_),F)}if(F){let _=B(F,$);if(!_&&!D._executableFile&&this._scriptPath){let M=I.basename(this._scriptPath,I.extname(this._scriptPath));if(M!==this._name)_=B(F,`${M}-${D._name}`)}$=_||$}C=E.includes(I.extname($));let A;if(Q.platform!=="win32")if(C)u.unshift($),u=yD(Q.execArgv).concat(u),A=$D.spawn(Q.argv[0],u,{stdio:"inherit"});else A=$D.spawn($,u,{stdio:"inherit"});else this._checkForMissingExecutable($,F,D._name),u.unshift($),u=yD(Q.execArgv).concat(u),A=$D.spawn(Q.execPath,u,{stdio:"inherit"});if(!A.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((M)=>{Q.on(M,()=>{if(A.killed===!1&&A.exitCode===null)A.kill(M)})});let h=this._exitCallback;A.on("close",(_)=>{if(_=_??1,!h)Q.exit(_);else h(new AD(_,"commander.executeSubCommandAsync","(close)"))}),A.on("error",(_)=>{if(_.code==="ENOENT")this._checkForMissingExecutable($,F,D._name);else if(_.code==="EACCES")throw Error(`'${$}' not executable`);if(!h)Q.exit(1);else{let M=new AD(1,"commander.executeSubCommandAsync","(error)");M.nestedError=_,h(M)}}),this.runningCommand=A}_dispatchSubcommand(D,u,C){let E=this._findCommand(D);if(!E)this.help({error:!0});E._prepareForParse();let B;return B=this._chainOrCallSubCommandHook(B,E,"preSubcommand"),B=this._chainOrCall(B,()=>{if(E._executableHandler)this._executeSubCommand(E,u.concat(C));else return E._parseCommand(u,C)}),B}_dispatchHelpCommand(D){if(!D)this.help();let u=this._findCommand(D);if(u&&!u._executableHandler)u.help();return this._dispatchSubcommand(D,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((D,u)=>{if(D.required&&this.args[u]==null)this.missingArgument(D.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let D=(C,E,B)=>{let $=E;if(E!==null&&C.parseArg){let F=`error: command-argument value '${E}' is invalid for argument '${C.name()}'.`;$=this._callParseArg(C,E,B,F)}return $};this._checkNumberOfArguments();let u=[];this.registeredArguments.forEach((C,E)=>{let B=C.defaultValue;if(C.variadic){if(E<this.args.length){if(B=this.args.slice(E),C.parseArg)B=B.reduce(($,F)=>{return D(C,F,$)},C.defaultValue)}else if(B===void 0)B=[]}else if(E<this.args.length){if(B=this.args[E],C.parseArg)B=D(C,B,C.defaultValue)}u[E]=B}),this.processedArgs=u}_chainOrCall(D,u){if(D?.then&&typeof D.then==="function")return D.then(()=>u());return u()}_chainOrCallHooks(D,u){let C=D,E=[];if(this._getCommandAndAncestors().reverse().filter((B)=>B._lifeCycleHooks[u]!==void 0).forEach((B)=>{B._lifeCycleHooks[u].forEach(($)=>{E.push({hookedCommand:B,callback:$})})}),u==="postAction")E.reverse();return E.forEach((B)=>{C=this._chainOrCall(C,()=>{return B.callback(B.hookedCommand,this)})}),C}_chainOrCallSubCommandHook(D,u,C){let E=D;if(this._lifeCycleHooks[C]!==void 0)this._lifeCycleHooks[C].forEach((B)=>{E=this._chainOrCall(E,()=>{return B(this,u)})});return E}_parseCommand(D,u){let C=this.parseOptions(u);if(this._parseOptionsEnv(),this._parseOptionsImplied(),D=D.concat(C.operands),u=C.unknown,this.args=D.concat(u),D&&this._findCommand(D[0]))return this._dispatchSubcommand(D[0],D.slice(1),u);if(this._getHelpCommand()&&D[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(D[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(u),this._dispatchSubcommand(this._defaultCommandName,D,u);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(C.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let E=()=>{if(C.unknown.length>0)this.unknownOption(C.unknown[0])},B=`command:${this.name()}`;if(this._actionHandler){E(),this._processArguments();let $;if($=this._chainOrCallHooks($,"preAction"),$=this._chainOrCall($,()=>this._actionHandler(this.processedArgs)),this.parent)$=this._chainOrCall($,()=>{this.parent.emit(B,D,u)});return $=this._chainOrCallHooks($,"postAction"),$}if(this.parent?.listenerCount(B))E(),this._processArguments(),this.parent.emit(B,D,u);else if(D.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",D,u);if(this.listenerCount("command:*"))this.emit("command:*",D,u);else if(this.commands.length)this.unknownCommand();else E(),this._processArguments()}else if(this.commands.length)E(),this.help({error:!0});else E(),this._processArguments()}_findCommand(D){if(!D)return;return this.commands.find((u)=>u._name===D||u._aliases.includes(D))}_findOption(D){return this.options.find((u)=>u.is(D))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((D)=>{D.options.forEach((u)=>{if(u.mandatory&&D.getOptionValue(u.attributeName())===void 0)D.missingMandatoryOptionValue(u)})})}_checkForConflictingLocalOptions(){let D=this.options.filter((C)=>{let E=C.attributeName();if(this.getOptionValue(E)===void 0)return!1;return this.getOptionValueSource(E)!=="default"});D.filter((C)=>C.conflictsWith.length>0).forEach((C)=>{let E=D.find((B)=>C.conflictsWith.includes(B.attributeName()));if(E)this._conflictingOption(C,E)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((D)=>{D._checkForConflictingLocalOptions()})}parseOptions(D){let u=[],C=[],E=u;function B(_){return _.length>1&&_[0]==="-"}let $=(_)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(_))return!1;return!this._getCommandAndAncestors().some((M)=>M.options.map((J)=>J.short).some((J)=>/^-\d$/.test(J)))},F=null,A=null,h=0;while(h<D.length||A){let _=A??D[h++];if(A=null,_==="--"){if(E===C)E.push(_);E.push(...D.slice(h));break}if(F&&(!B(_)||$(_))){this.emit(`option:${F.name()}`,_);continue}if(F=null,B(_)){let M=this._findOption(_);if(M){if(M.required){let J=D[h++];if(J===void 0)this.optionMissingArgument(M);this.emit(`option:${M.name()}`,J)}else if(M.optional){let J=null;if(h<D.length&&(!B(D[h])||$(D[h])))J=D[h++];this.emit(`option:${M.name()}`,J)}else this.emit(`option:${M.name()}`);F=M.variadic?M:null;continue}}if(_.length>2&&_[0]==="-"&&_[1]!=="-"){let M=this._findOption(`-${_[1]}`);if(M){if(M.required||M.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${M.name()}`,_.slice(2));else this.emit(`option:${M.name()}`),A=`-${_.slice(2)}`;continue}}if(/^--[^=]+=/.test(_)){let M=_.indexOf("="),J=this._findOption(_.slice(0,M));if(J&&(J.required||J.optional)){this.emit(`option:${J.name()}`,_.slice(M+1));continue}}if(E===u&&B(_)&&!(this.commands.length===0&&$(_)))E=C;if((this._enablePositionalOptions||this._passThroughOptions)&&u.length===0&&C.length===0){if(this._findCommand(_)){u.push(_),C.push(...D.slice(h));break}else if(this._getHelpCommand()&&_===this._getHelpCommand().name()){u.push(_,...D.slice(h));break}else if(this._defaultCommandName){C.push(_,...D.slice(h));break}}if(this._passThroughOptions){E.push(_,...D.slice(h));break}E.push(_)}return{operands:u,unknown:C}}opts(){if(this._storeOptionsAsProperties){let D={},u=this.options.length;for(let C=0;C<u;C++){let E=this.options[C].attributeName();D[E]=E===this._versionOptionName?this._version:this[E]}return D}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((D,u)=>Object.assign(D,u.opts()),{})}error(D,u){if(this._outputConfiguration.outputError(`${D}
|
|
22
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
|
+
`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
|
|
24
|
+
`),this.outputHelp({error:!0});let C=u||{},E=C.exitCode||1,B=C.code||"commander.error";this._exit(E,B,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in Q.env){let u=D.attributeName();if(this.getOptionValue(u)===void 0||["default","config","env"].includes(this.getOptionValueSource(u)))if(D.required||D.optional)this.emit(`optionEnv:${D.name()}`,Q.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new W2(this.options),u=(C)=>{return this.getOptionValue(C)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(C))};this.options.filter((C)=>C.implied!==void 0&&u(C.attributeName())&&D.valueFromOption(this.getOptionValue(C.attributeName()),C)).forEach((C)=>{Object.keys(C.implied).filter((E)=>!u(E)).forEach((E)=>{this.setOptionValueWithSource(E,C.implied[E],"implied")})})}missingArgument(D){let u=`error: missing required argument '${D}'`;this.error(u,{code:"commander.missingArgument"})}optionMissingArgument(D){let u=`error: option '${D.flags}' argument missing`;this.error(u,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(D){let u=`error: required option '${D.flags}' not specified`;this.error(u,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(D,u){let C=($)=>{let F=$.attributeName(),A=this.getOptionValue(F),h=this.options.find((M)=>M.negate&&F===M.attributeName()),_=this.options.find((M)=>!M.negate&&F===M.attributeName());if(h&&(h.presetArg===void 0&&A===!1||h.presetArg!==void 0&&A===h.presetArg))return h;return _||$},E=($)=>{let F=C($),A=F.attributeName();if(this.getOptionValueSource(A)==="env")return`environment variable '${F.envVar}'`;return`option '${F.flags}'`},B=`error: ${E(D)} cannot be used with ${E(u)}`;this.error(B,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let u="";if(D.startsWith("--")&&this._showSuggestionAfterError){let E=[],B=this;do{let $=B.createHelp().visibleOptions(B).filter((F)=>F.long).map((F)=>F.long);E=E.concat($),B=B.parent}while(B&&!B._enablePositionalOptions);u=vD(D,E)}let C=`error: unknown option '${D}'${u}`;this.error(C,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let u=this.registeredArguments.length,C=u===1?"":"s",B=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${u} argument${C} but got ${D.length}.`;this.error(B,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],u="";if(this._showSuggestionAfterError){let E=[];this.createHelp().visibleCommands(this).forEach((B)=>{if(E.push(B.name()),B.alias())E.push(B.alias())}),u=vD(D,E)}let C=`error: unknown command '${D}'${u}`;this.error(C,{code:"commander.unknownCommand"})}version(D,u,C){if(D===void 0)return this._version;this._version=D,u=u||"-V, --version",C=C||"output the version number";let E=this.createOption(u,C);return this._versionOptionName=E.attributeName(),this._registerOption(E),this.on("option:"+E.name(),()=>{this._outputConfiguration.writeOut(`${D}
|
|
25
|
+
`),this._exit(0,"commander.version",D)}),this}description(D,u){if(D===void 0&&u===void 0)return this._description;if(this._description=D,u)this._argsDescription=u;return this}summary(D){if(D===void 0)return this._summary;return this._summary=D,this}alias(D){if(D===void 0)return this._aliases[0];let u=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)u=this.commands[this.commands.length-1];if(D===u._name)throw Error("Command alias can't be the same as its name");let C=this.parent?._findCommand(D);if(C){let E=[C.name()].concat(C.aliases()).join("|");throw Error(`cannot add alias '${D}' to command '${this.name()}' as already have command '${E}'`)}return u._aliases.push(D),this}aliases(D){if(D===void 0)return this._aliases;return D.forEach((u)=>this.alias(u)),this}usage(D){if(D===void 0){if(this._usage)return this._usage;let u=this.registeredArguments.map((C)=>{return G2(C)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?u:[]).join(" ")}return this._usage=D,this}name(D){if(D===void 0)return this._name;return this._name=D,this}helpGroup(D){if(D===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=D,this}commandsGroup(D){if(D===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=D,this}optionsGroup(D){if(D===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=D,this}_initOptionGroup(D){if(this._defaultOptionGroup&&!D.helpGroupHeading)D.helpGroup(this._defaultOptionGroup)}_initCommandGroup(D){if(this._defaultCommandGroup&&!D.helpGroup())D.helpGroup(this._defaultCommandGroup)}nameFromFilename(D){return this._name=I.basename(D,I.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let u=this.createHelp(),C=this._getOutputContext(D);u.prepareContext({error:C.error,helpWidth:C.helpWidth,outputHasColors:C.hasColors});let E=u.formatHelp(this,u);if(C.hasColors)return E;return this._outputConfiguration.stripColor(E)}_getOutputContext(D){D=D||{};let u=!!D.error,C,E,B;if(u)C=(F)=>this._outputConfiguration.writeErr(F),E=this._outputConfiguration.getErrHasColors(),B=this._outputConfiguration.getErrHelpWidth();else C=(F)=>this._outputConfiguration.writeOut(F),E=this._outputConfiguration.getOutHasColors(),B=this._outputConfiguration.getOutHelpWidth();return{error:u,write:(F)=>{if(!E)F=this._outputConfiguration.stripColor(F);return C(F)},hasColors:E,helpWidth:B}}outputHelp(D){let u;if(typeof D==="function")u=D,D=void 0;let C=this._getOutputContext(D),E={error:C.error,write:C.write,command:this};this._getCommandAndAncestors().reverse().forEach(($)=>$.emit("beforeAllHelp",E)),this.emit("beforeHelp",E);let B=this.helpInformation({error:C.error});if(u){if(B=u(B),typeof B!=="string"&&!Buffer.isBuffer(B))throw Error("outputHelp callback must return a string or a Buffer")}if(C.write(B),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",E),this._getCommandAndAncestors().forEach(($)=>$.emit("afterAllHelp",E))}helpOption(D,u){if(typeof D==="boolean"){if(D){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(D??"-h, --help",u??"display help for command"),D||u)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(D){return this._helpOption=D,this._initOptionGroup(D),this}help(D){this.outputHelp(D);let u=Number(Q.exitCode??0);if(u===0&&D&&typeof D!=="function"&&D.error)u=1;this._exit(u,"commander.help","(outputHelp)")}addHelpText(D,u){let C=["beforeAll","before","after","afterAll"];if(!C.includes(D))throw Error(`Unexpected value for position to addHelpText.
|
|
26
|
+
Expecting one of '${C.join("', '")}'`);let E=`${D}Help`;return this.on(E,(B)=>{let $;if(typeof u==="function")$=u({error:B.error,command:B.command});else $=u;if($)B.write(`${$}
|
|
27
|
+
`)}),this}_outputHelpIfRequested(D){let u=this._getHelpOption();if(u&&D.find((E)=>u.is(E)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function yD(D){return D.map((u)=>{if(!u.startsWith("--inspect"))return u;let C,E="127.0.0.1",B="9229",$;if(($=u.match(/^(--inspect(-brk)?)$/))!==null)C=$[1];else if(($=u.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(C=$[1],/^\d+$/.test($[3]))B=$[3];else E=$[3];else if(($=u.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)C=$[1],E=$[3],B=$[4];if(C&&B!=="0")return`${C}=${E}:${parseInt(B)+1}`;return u})}function hD(){if(Q.env.NO_COLOR||Q.env.FORCE_COLOR==="0"||Q.env.FORCE_COLOR==="false")return!1;if(Q.env.FORCE_COLOR||Q.env.CLICOLOR_FORCE!==void 0)return!0;return}z2.Command=_D;z2.useColor=hD});var lD=b((w2)=>{var{Argument:cD}=d(),{Command:MD}=gD(),{CommanderError:q2,InvalidArgumentError:mD}=y(),{Help:R2}=ED(),{Option:dD}=BD();w2.program=new MD;w2.createCommand=(D)=>new MD(D);w2.createOption=(D,u)=>new dD(D,u);w2.createArgument=(D,u)=>new cD(D,u);w2.Command=MD;w2.Option=dD;w2.Argument=cD;w2.Help=R2;w2.CommanderError=q2;w2.InvalidArgumentError=mD;w2.InvalidOptionArgumentError=mD});var wu={};xu(wu,{prompt:()=>Ru,kCancel:()=>qu});import q,{stdin as F0,stdout as C0}from"node:process";import uu from"node:readline";import{WriteStream as E0}from"node:tty";function B0(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function $0(){if(Fu)return HD;Fu=1;let D="\x1B",u=`${D}[`,C="\x07",E={to(F,A){if(!A)return`${u}${F+1}G`;return`${u}${A+1};${F+1}H`},move(F,A){let h="";if(F<0)h+=`${u}${-F}D`;else if(F>0)h+=`${u}${F}C`;if(A<0)h+=`${u}${-A}A`;else if(A>0)h+=`${u}${A}B`;return h},up:(F=1)=>`${u}${F}A`,down:(F=1)=>`${u}${F}B`,forward:(F=1)=>`${u}${F}C`,backward:(F=1)=>`${u}${F}D`,nextLine:(F=1)=>`${u}E`.repeat(F),prevLine:(F=1)=>`${u}F`.repeat(F),left:`${u}G`,hide:`${u}?25l`,show:`${u}?25h`,save:`${D}7`,restore:`${D}8`},B={up:(F=1)=>`${u}S`.repeat(F),down:(F=1)=>`${u}T`.repeat(F)},$={screen:`${u}2J`,up:(F=1)=>`${u}1J`.repeat(F),down:(F=1)=>`${u}J`.repeat(F),line:`${u}2K`,lineEnd:`${u}K`,lineStart:`${u}1K`,lines(F){let A="";for(let h=0;h<F;h++)A+=this.line+(h<F-1?E.up():"");if(F)A+=E.left;return A}};return HD={cursor:E,scroll:B,erase:$,beep:C},HD}function A0(){if(Cu)return s.exports;Cu=1;let D=process||{},u=D.argv||[],C=D.env||{},E=!(!!C.NO_COLOR||u.includes("--no-color"))&&(!!C.FORCE_COLOR||u.includes("--color")||D.platform==="win32"||(D.stdout||{}).isTTY&&C.TERM!=="dumb"||!!C.CI),B=(A,h,_=A)=>(M)=>{let J=""+M,T=J.indexOf(h,A.length);return~T?A+$(J,h,_,T)+h:A+J+h},$=(A,h,_,M)=>{let J="",T=0;do J+=A.substring(T,M)+_,T=M+h.length,M=A.indexOf(h,T);while(~M);return J+A.substring(T)},F=(A=E)=>{let h=A?B:()=>String;return{isColorSupported:A,reset:h("\x1B[0m","\x1B[0m"),bold:h("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:h("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:h("\x1B[3m","\x1B[23m"),underline:h("\x1B[4m","\x1B[24m"),inverse:h("\x1B[7m","\x1B[27m"),hidden:h("\x1B[8m","\x1B[28m"),strikethrough:h("\x1B[9m","\x1B[29m"),black:h("\x1B[30m","\x1B[39m"),red:h("\x1B[31m","\x1B[39m"),green:h("\x1B[32m","\x1B[39m"),yellow:h("\x1B[33m","\x1B[39m"),blue:h("\x1B[34m","\x1B[39m"),magenta:h("\x1B[35m","\x1B[39m"),cyan:h("\x1B[36m","\x1B[39m"),white:h("\x1B[37m","\x1B[39m"),gray:h("\x1B[90m","\x1B[39m"),bgBlack:h("\x1B[40m","\x1B[49m"),bgRed:h("\x1B[41m","\x1B[49m"),bgGreen:h("\x1B[42m","\x1B[49m"),bgYellow:h("\x1B[43m","\x1B[49m"),bgBlue:h("\x1B[44m","\x1B[49m"),bgMagenta:h("\x1B[45m","\x1B[49m"),bgCyan:h("\x1B[46m","\x1B[49m"),bgWhite:h("\x1B[47m","\x1B[49m"),blackBright:h("\x1B[90m","\x1B[39m"),redBright:h("\x1B[91m","\x1B[39m"),greenBright:h("\x1B[92m","\x1B[39m"),yellowBright:h("\x1B[93m","\x1B[39m"),blueBright:h("\x1B[94m","\x1B[39m"),magentaBright:h("\x1B[95m","\x1B[39m"),cyanBright:h("\x1B[96m","\x1B[39m"),whiteBright:h("\x1B[97m","\x1B[39m"),bgBlackBright:h("\x1B[100m","\x1B[49m"),bgRedBright:h("\x1B[101m","\x1B[49m"),bgGreenBright:h("\x1B[102m","\x1B[49m"),bgYellowBright:h("\x1B[103m","\x1B[49m"),bgBlueBright:h("\x1B[104m","\x1B[49m"),bgMagentaBright:h("\x1B[105m","\x1B[49m"),bgCyanBright:h("\x1B[106m","\x1B[49m"),bgWhiteBright:h("\x1B[107m","\x1B[49m")}};return s.exports=F(),s.exports.createColors=F,s.exports}function _0({onlyFirst:D=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function Tu(D){if(typeof D!="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(M0,"")}function Qu(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function g(D,u={}){if(typeof D!="string"||D.length===0||(u={ambiguousIsNarrow:!0,...u},D=Tu(D),D.length===0))return 0;D=D.replace(T0()," ");let C=u.ambiguousIsNarrow?1:2,E=0;for(let B of D){let $=B.codePointAt(0);if($<=31||$>=127&&$<=159||$>=768&&$<=879)continue;switch(J0.eastAsianWidth(B)){case"F":case"W":E+=2;break;case"A":E+=C;break;default:E+=1}}return E}function X0(){let D=new Map;for(let[u,C]of Object.entries(H)){for(let[E,B]of Object.entries(C))H[E]={open:`\x1B[${B[0]}m`,close:`\x1B[${B[1]}m`},C[E]=H[E],D.set(B[0],B[1]);Object.defineProperty(H,u,{value:C,enumerable:!1})}return Object.defineProperty(H,"codes",{value:D,enumerable:!1}),H.color.close="\x1B[39m",H.bgColor.close="\x1B[49m",H.color.ansi=Eu(),H.color.ansi256=Bu(),H.color.ansi16m=$u(),H.bgColor.ansi=Eu(WD),H.bgColor.ansi256=Bu(WD),H.bgColor.ansi16m=$u(WD),Object.defineProperties(H,{rgbToAnsi256:{value:(u,C,E)=>u===C&&C===E?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(C/255*5)+Math.round(E/255*5),enumerable:!1},hexToRgb:{value:(u)=>{let C=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!C)return[0,0,0];let[E]=C;E.length===3&&(E=[...E].map(($)=>$+$).join(""));let B=Number.parseInt(E,16);return[B>>16&255,B>>8&255,B&255]},enumerable:!1},hexToAnsi256:{value:(u)=>H.rgbToAnsi256(...H.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:(u)=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let C,E,B;if(u>=232)C=((u-232)*10+8)/255,E=C,B=C;else{u-=16;let A=u%36;C=Math.floor(u/36)/5,E=Math.floor(A/6)/5,B=A%6/5}let $=Math.max(C,E,B)*2;if($===0)return 30;let F=30+(Math.round(B)<<2|Math.round(E)<<1|Math.round(C));return $===2&&(F+=60),F},enumerable:!1},rgbToAnsi:{value:(u,C,E)=>H.ansi256ToAnsi(H.rgbToAnsi256(u,C,E)),enumerable:!1},hexToAnsi:{value:(u)=>H.ansi256ToAnsi(H.hexToAnsi256(u)),enumerable:!1}}),H}function _u(D,u,C){return String(D).normalize().replace(/\r\n/g,`
|
|
28
|
+
`).split(`
|
|
29
|
+
`).map((E)=>q0(E,u,C)).join(`
|
|
30
|
+
`)}function Wu(D,u){if(typeof D=="string")return t.aliases.get(D)===u;for(let C of D)if(C!==void 0&&Wu(C,u))return!0;return!1}function w0(D,u){if(D===u)return;let C=D.split(`
|
|
31
|
+
`),E=u.split(`
|
|
32
|
+
`),B=[];for(let $=0;$<Math.max(C.length,E.length);$++)C[$]!==E[$]&&B.push($);return B}function n(D,u){let C=D;C.isTTY&&C.setRawMode(u)}class c{constructor(D,u=!0){U(this,"input"),U(this,"output"),U(this,"_abortSignal"),U(this,"rl"),U(this,"opts"),U(this,"_render"),U(this,"_track",!1),U(this,"_prevFrame",""),U(this,"_subscribers",new Map),U(this,"_cursor",0),U(this,"state","initial"),U(this,"error",""),U(this,"value");let{input:C=F0,output:E=C0,render:B,signal:$,...F}=D;this.opts=F,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=B.bind(this),this._track=u,this._abortSignal=$,this.input=C,this.output=E}unsubscribe(){this._subscribers.clear()}setSubscriber(D,u){let C=this._subscribers.get(D)??[];C.push(u),this._subscribers.set(D,C)}on(D,u){this.setSubscriber(D,{cb:u})}once(D,u){this.setSubscriber(D,{cb:u,once:!0})}emit(D,...u){let C=this._subscribers.get(D)??[],E=[];for(let B of C)B.cb(...u),B.once&&E.push(()=>C.splice(C.indexOf(B),1));for(let B of E)B()}prompt(){return new Promise((D,u)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),D(Mu);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let C=new E0(0);C._write=(E,B,$)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),$()},this.input.pipe(C),this.rl=uu.createInterface({input:this.input,output:C,tabSize:2,prompt:"",escapeCodeTimeout:50}),uu.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),n(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(R.cursor.show),this.output.off("resize",this.render),n(this.input,!1),D(this.value)}),this.once("cancel",()=>{this.output.write(R.cursor.show),this.output.off("resize",this.render),n(this.input,!1),D(Mu)})})}onKeypress(D,u){if(this.state==="error"&&(this.state="active"),u?.name&&(!this._track&&t.aliases.has(u.name)&&this.emit("cursor",t.aliases.get(u.name)),t.actions.has(u.name)&&this.emit("cursor",u.name)),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),u?.name==="return"){if(this.opts.validate){let C=this.opts.validate(this.value);C&&(this.error=C instanceof Error?C.message:C,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Wu([D,u?.name,u?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
33
|
+
`),n(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let D=_u(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
34
|
+
`).length-1;this.output.write(R.cursor.move(-999,D*-1))}render(){let D=_u(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(R.cursor.hide);else{let u=w0(this._prevFrame,D);if(this.restoreCursor(),u&&u?.length===1){let C=u[0];this.output.write(R.cursor.move(0,C)),this.output.write(R.erase.lines(1));let E=D.split(`
|
|
35
|
+
`);this.output.write(E[C]),this._prevFrame=D,this.output.write(R.cursor.move(0,E.length-C-1));return}if(u&&u?.length>1){let C=u[0];this.output.write(R.cursor.move(0,C)),this.output.write(R.erase.down());let E=D.split(`
|
|
36
|
+
`).slice(C);this.output.write(E.join(`
|
|
37
|
+
`)),this._prevFrame=D;return}this.output.write(R.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}function b0(){return q.platform!=="win32"?q.env.TERM!=="linux":!!q.env.CI||!!q.env.WT_SESSION||!!q.env.TERMINUS_SUBLIME||q.env.ConEmuTask==="{cmd::Cmder}"||q.env.TERM_PROGRAM==="Terminus-Sublime"||q.env.TERM_PROGRAM==="vscode"||q.env.TERM==="xterm-256color"||q.env.TERM==="alacritty"||q.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function Ru(D,u={}){let C=(E)=>{if(typeof E!=="symbol"||E.toString()!=="Symbol(clack:cancel)")return E;switch(u.cancel){case"reject":{let B=Error("Prompt cancelled.");if(B.name="ConsolaPromptCancelledError",Error.captureStackTrace)Error.captureStackTrace(B,Ru);throw B}case"undefined":return;case"null":return null;case"symbol":return qu;default:case"default":return u.default??u.initial}};if(!u.type||u.type==="text")return await m0({message:D,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial}).then(C);if(u.type==="confirm")return await d0({message:D,initialValue:u.initial}).then(C);if(u.type==="select")return await l0({message:D,options:u.options.map((E)=>typeof E==="string"?{value:E,label:E}:E),initialValue:u.initial}).then(C);if(u.type==="multiselect")return await x0({message:D,options:u.options.map((E)=>typeof E==="string"?{value:E,label:E}:E),required:u.required,initialValues:u.initial}).then(C);throw Error(`Unknown prompt type: ${u.type}`)}var HD,Fu,R,s,Cu,h0,Z,M0,Gu,Z0,J0,Y0=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},T0,WD=10,Eu=(D=0)=>(u)=>`\x1B[${u+D}m`,Bu=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,$u=(D=0)=>(u,C,E)=>`\x1B[${38+D};2;${u};${C};${E}m`,H,Q0,G0,H0,r,W0=39,RD="\x07",Xu="[",z0="]",Hu="m",wD,Au=(D)=>`${r.values().next().value}${Xu}${D}${Hu}`,hu=(D)=>`${r.values().next().value}${wD}${D}${RD}`,S0=(D)=>D.split(" ").map((u)=>g(u)),zD=(D,u,C)=>{let E=[...u],B=!1,$=!1,F=g(Tu(D[D.length-1]));for(let[A,h]of E.entries()){let _=g(h);if(F+_<=C?D[D.length-1]+=h:(D.push(h),F=0),r.has(h)&&(B=!0,$=E.slice(A+1).join("").startsWith(wD)),B){$?h===RD&&(B=!1,$=!1):h===Hu&&(B=!1);continue}F+=_,F===C&&A<E.length-1&&(D.push(""),F=0)}!F&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},U0=(D)=>{let u=D.split(" "),C=u.length;for(;C>0&&!(g(u[C-1])>0);)C--;return C===u.length?D:u.slice(0,C).join(" ")+u.slice(C).join("")},q0=(D,u,C={})=>{if(C.trim!==!1&&D.trim()==="")return"";let E="",B,$,F=S0(D),A=[""];for(let[_,M]of D.split(" ").entries()){C.trim!==!1&&(A[A.length-1]=A[A.length-1].trimStart());let J=g(A[A.length-1]);if(_!==0&&(J>=u&&(C.wordWrap===!1||C.trim===!1)&&(A.push(""),J=0),(J>0||C.trim===!1)&&(A[A.length-1]+=" ",J++)),C.hard&&F[_]>u){let T=u-J,G=1+Math.floor((F[_]-T-1)/u);Math.floor((F[_]-1)/u)<G&&A.push(""),zD(A,M,u);continue}if(J+F[_]>u&&J>0&&F[_]>0){if(C.wordWrap===!1&&J<u){zD(A,M,u);continue}A.push("")}if(J+F[_]>u&&C.wordWrap===!1){zD(A,M,u);continue}A[A.length-1]+=M}C.trim!==!1&&(A=A.map((_)=>U0(_)));let h=[...A.join(`
|
|
38
|
+
`)];for(let[_,M]of h.entries()){if(E+=M,r.has(M)){let{groups:T}=new RegExp(`(?:\\${Xu}(?<code>\\d+)m|\\${wD}(?<uri>.*)${RD})`).exec(h.slice(_).join(""))||{groups:{}};if(T.code!==void 0){let G=Number.parseFloat(T.code);B=G===W0?void 0:G}else T.uri!==void 0&&($=T.uri.length===0?void 0:T.uri)}let J=H0.codes.get(Number(B));h[_+1]===`
|
|
39
|
+
`?($&&(E+=hu("")),B&&J&&(E+=Au(J))):M===`
|
|
40
|
+
`&&(B&&J&&(E+=Au(B)),$&&(E+=hu($)))}return E},R0,t,Mu,V0,I0=(D,u,C)=>(u in D)?V0(D,u,{enumerable:!0,configurable:!0,writable:!0,value:C}):D[u]=C,U=(D,u,C)=>(I0(D,typeof u!="symbol"?u+"":u,C),C),zu,L0,K0=(D,u,C)=>(u in D)?L0(D,u,{enumerable:!0,configurable:!0,writable:!0,value:C}):D[u]=C,Zu=(D,u,C)=>(K0(D,typeof u!="symbol"?u+"":u,C),C),N0,f0,P0=(D,u,C)=>(u in D)?f0(D,u,{enumerable:!0,configurable:!0,writable:!0,value:C}):D[u]=C,Ju=(D,u,C)=>(P0(D,typeof u!="symbol"?u+"":u,C),C),Su,Uu,j0,w=(D,u)=>j0?D:u,O0,k0,v0,y0,X,O,SD,UD,g0,Yu,c0,o=(D)=>{switch(D){case"initial":case"active":return Z.cyan(O0);case"cancel":return Z.red(k0);case"error":return Z.yellow(v0);case"submit":return Z.green(y0)}},qD=(D)=>{let{cursor:u,options:C,style:E}=D,B=D.maxItems??Number.POSITIVE_INFINITY,$=Math.max(process.stdout.rows-4,0),F=Math.min($,Math.max(B,5)),A=0;u>=A+F-3?A=Math.max(Math.min(u-F+3,C.length-F),0):u<A+2&&(A=Math.max(u-2,0));let h=F<C.length&&A>0,_=F<C.length&&A+F<C.length;return C.slice(A,A+F).map((M,J,T)=>{let G=J===0&&h,P=J===T.length-1&&_;return G||P?Z.dim("..."):E(M,J+A===u)})},m0=(D)=>new Uu({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){let u=`${Z.gray(X)}
|
|
41
|
+
${o(this.state)} ${D.message}
|
|
42
|
+
`,C=D.placeholder?Z.inverse(D.placeholder[0])+Z.dim(D.placeholder.slice(1)):Z.inverse(Z.hidden("_")),E=this.value?this.valueWithCursor:C;switch(this.state){case"error":return`${u.trim()}
|
|
43
|
+
${Z.yellow(X)} ${E}
|
|
44
|
+
${Z.yellow(O)} ${Z.yellow(this.error)}
|
|
45
|
+
`;case"submit":return`${u}${Z.gray(X)} ${Z.dim(this.value||D.placeholder)}`;case"cancel":return`${u}${Z.gray(X)} ${Z.strikethrough(Z.dim(this.value??""))}${this.value?.trim()?`
|
|
46
|
+
${Z.gray(X)}`:""}`;default:return`${u}${Z.cyan(X)} ${E}
|
|
47
|
+
${Z.cyan(O)}
|
|
48
|
+
`}}}).prompt(),d0=(D)=>{let u=D.active??"Yes",C=D.inactive??"No";return new zu({active:u,inactive:C,initialValue:D.initialValue??!0,render(){let E=`${Z.gray(X)}
|
|
49
|
+
${o(this.state)} ${D.message}
|
|
50
|
+
`,B=this.value?u:C;switch(this.state){case"submit":return`${E}${Z.gray(X)} ${Z.dim(B)}`;case"cancel":return`${E}${Z.gray(X)} ${Z.strikethrough(Z.dim(B))}
|
|
51
|
+
${Z.gray(X)}`;default:return`${E}${Z.cyan(X)} ${this.value?`${Z.green(SD)} ${u}`:`${Z.dim(UD)} ${Z.dim(u)}`} ${Z.dim("/")} ${this.value?`${Z.dim(UD)} ${Z.dim(C)}`:`${Z.green(SD)} ${C}`}
|
|
52
|
+
${Z.cyan(O)}
|
|
53
|
+
`}}}).prompt()},l0=(D)=>{let u=(C,E)=>{let B=C.label??String(C.value);switch(E){case"selected":return`${Z.dim(B)}`;case"active":return`${Z.green(SD)} ${B} ${C.hint?Z.dim(`(${C.hint})`):""}`;case"cancelled":return`${Z.strikethrough(Z.dim(B))}`;default:return`${Z.dim(UD)} ${Z.dim(B)}`}};return new Su({options:D.options,initialValue:D.initialValue,render(){let C=`${Z.gray(X)}
|
|
54
|
+
${o(this.state)} ${D.message}
|
|
55
|
+
`;switch(this.state){case"submit":return`${C}${Z.gray(X)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${C}${Z.gray(X)} ${u(this.options[this.cursor],"cancelled")}
|
|
56
|
+
${Z.gray(X)}`;default:return`${C}${Z.cyan(X)} ${qD({cursor:this.cursor,options:this.options,maxItems:D.maxItems,style:(E,B)=>u(E,B?"active":"inactive")}).join(`
|
|
57
|
+
${Z.cyan(X)} `)}
|
|
58
|
+
${Z.cyan(O)}
|
|
59
|
+
`}}}).prompt()},x0=(D)=>{let u=(C,E)=>{let B=C.label??String(C.value);return E==="active"?`${Z.cyan(g0)} ${B} ${C.hint?Z.dim(`(${C.hint})`):""}`:E==="selected"?`${Z.green(Yu)} ${Z.dim(B)}`:E==="cancelled"?`${Z.strikethrough(Z.dim(B))}`:E==="active-selected"?`${Z.green(Yu)} ${B} ${C.hint?Z.dim(`(${C.hint})`):""}`:E==="submitted"?`${Z.dim(B)}`:`${Z.dim(c0)} ${Z.dim(B)}`};return new N0({options:D.options,initialValues:D.initialValues,required:D.required??!0,cursorAt:D.cursorAt,validate(C){if(this.required&&C.length===0)return`Please select at least one option.
|
|
60
|
+
${Z.reset(Z.dim(`Press ${Z.gray(Z.bgWhite(Z.inverse(" space ")))} to select, ${Z.gray(Z.bgWhite(Z.inverse(" enter ")))} to submit`))}`},render(){let C=`${Z.gray(X)}
|
|
61
|
+
${o(this.state)} ${D.message}
|
|
62
|
+
`,E=(B,$)=>{let F=this.value.includes(B.value);return $&&F?u(B,"active-selected"):F?u(B,"selected"):u(B,$?"active":"inactive")};switch(this.state){case"submit":return`${C}${Z.gray(X)} ${this.options.filter(({value:B})=>this.value.includes(B)).map((B)=>u(B,"submitted")).join(Z.dim(", "))||Z.dim("none")}`;case"cancel":{let B=this.options.filter(({value:$})=>this.value.includes($)).map(($)=>u($,"cancelled")).join(Z.dim(", "));return`${C}${Z.gray(X)} ${B.trim()?`${B}
|
|
63
|
+
${Z.gray(X)}`:""}`}case"error":{let B=this.error.split(`
|
|
64
|
+
`).map(($,F)=>F===0?`${Z.yellow(O)} ${Z.yellow($)}`:` ${$}`).join(`
|
|
65
|
+
`);return`${C+Z.yellow(X)} ${qD({options:this.options,cursor:this.cursor,maxItems:D.maxItems,style:E}).join(`
|
|
66
|
+
${Z.yellow(X)} `)}
|
|
67
|
+
${B}
|
|
68
|
+
`}default:return`${C}${Z.cyan(X)} ${qD({options:this.options,cursor:this.cursor,maxItems:D.maxItems,style:E}).join(`
|
|
69
|
+
${Z.cyan(X)} `)}
|
|
70
|
+
${Z.cyan(O)}
|
|
71
|
+
`}}}).prompt()},qu;var Vu=iu(()=>{R=$0(),s={exports:{}};h0=A0(),Z=B0(h0);M0=_0();Gu={exports:{}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function(E){var B=E.charCodeAt(0),$=E.length==2?E.charCodeAt(1):0,F=B;return 55296<=B&&B<=56319&&56320<=$&&$<=57343&&(B&=1023,$&=1023,F=B<<10|$,F+=65536),F==12288||65281<=F&&F<=65376||65504<=F&&F<=65510?"F":F==8361||65377<=F&&F<=65470||65474<=F&&F<=65479||65482<=F&&F<=65487||65490<=F&&F<=65495||65498<=F&&F<=65500||65512<=F&&F<=65518?"H":4352<=F&&F<=4447||4515<=F&&F<=4519||4602<=F&&F<=4607||9001<=F&&F<=9002||11904<=F&&F<=11929||11931<=F&&F<=12019||12032<=F&&F<=12245||12272<=F&&F<=12283||12289<=F&&F<=12350||12353<=F&&F<=12438||12441<=F&&F<=12543||12549<=F&&F<=12589||12593<=F&&F<=12686||12688<=F&&F<=12730||12736<=F&&F<=12771||12784<=F&&F<=12830||12832<=F&&F<=12871||12880<=F&&F<=13054||13056<=F&&F<=19903||19968<=F&&F<=42124||42128<=F&&F<=42182||43360<=F&&F<=43388||44032<=F&&F<=55203||55216<=F&&F<=55238||55243<=F&&F<=55291||63744<=F&&F<=64255||65040<=F&&F<=65049||65072<=F&&F<=65106||65108<=F&&F<=65126||65128<=F&&F<=65131||110592<=F&&F<=110593||127488<=F&&F<=127490||127504<=F&&F<=127546||127552<=F&&F<=127560||127568<=F&&F<=127569||131072<=F&&F<=194367||177984<=F&&F<=196605||196608<=F&&F<=262141?"W":32<=F&&F<=126||162<=F&&F<=163||165<=F&&F<=166||F==172||F==175||10214<=F&&F<=10221||10629<=F&&F<=10630?"Na":F==161||F==164||167<=F&&F<=168||F==170||173<=F&&F<=174||176<=F&&F<=180||182<=F&&F<=186||188<=F&&F<=191||F==198||F==208||215<=F&&F<=216||222<=F&&F<=225||F==230||232<=F&&F<=234||236<=F&&F<=237||F==240||242<=F&&F<=243||247<=F&&F<=250||F==252||F==254||F==257||F==273||F==275||F==283||294<=F&&F<=295||F==299||305<=F&&F<=307||F==312||319<=F&&F<=322||F==324||328<=F&&F<=331||F==333||338<=F&&F<=339||358<=F&&F<=359||F==363||F==462||F==464||F==466||F==468||F==470||F==472||F==474||F==476||F==593||F==609||F==708||F==711||713<=F&&F<=715||F==717||F==720||728<=F&&F<=731||F==733||F==735||768<=F&&F<=879||913<=F&&F<=929||931<=F&&F<=937||945<=F&&F<=961||963<=F&&F<=969||F==1025||1040<=F&&F<=1103||F==1105||F==8208||8211<=F&&F<=8214||8216<=F&&F<=8217||8220<=F&&F<=8221||8224<=F&&F<=8226||8228<=F&&F<=8231||F==8240||8242<=F&&F<=8243||F==8245||F==8251||F==8254||F==8308||F==8319||8321<=F&&F<=8324||F==8364||F==8451||F==8453||F==8457||F==8467||F==8470||8481<=F&&F<=8482||F==8486||F==8491||8531<=F&&F<=8532||8539<=F&&F<=8542||8544<=F&&F<=8555||8560<=F&&F<=8569||F==8585||8592<=F&&F<=8601||8632<=F&&F<=8633||F==8658||F==8660||F==8679||F==8704||8706<=F&&F<=8707||8711<=F&&F<=8712||F==8715||F==8719||F==8721||F==8725||F==8730||8733<=F&&F<=8736||F==8739||F==8741||8743<=F&&F<=8748||F==8750||8756<=F&&F<=8759||8764<=F&&F<=8765||F==8776||F==8780||F==8786||8800<=F&&F<=8801||8804<=F&&F<=8807||8810<=F&&F<=8811||8814<=F&&F<=8815||8834<=F&&F<=8835||8838<=F&&F<=8839||F==8853||F==8857||F==8869||F==8895||F==8978||9312<=F&&F<=9449||9451<=F&&F<=9547||9552<=F&&F<=9587||9600<=F&&F<=9615||9618<=F&&F<=9621||9632<=F&&F<=9633||9635<=F&&F<=9641||9650<=F&&F<=9651||9654<=F&&F<=9655||9660<=F&&F<=9661||9664<=F&&F<=9665||9670<=F&&F<=9672||F==9675||9678<=F&&F<=9681||9698<=F&&F<=9701||F==9711||9733<=F&&F<=9734||F==9737||9742<=F&&F<=9743||9748<=F&&F<=9749||F==9756||F==9758||F==9792||F==9794||9824<=F&&F<=9825||9827<=F&&F<=9829||9831<=F&&F<=9834||9836<=F&&F<=9837||F==9839||9886<=F&&F<=9887||9918<=F&&F<=9919||9924<=F&&F<=9933||9935<=F&&F<=9953||F==9955||9960<=F&&F<=9983||F==10045||F==10071||10102<=F&&F<=10111||11093<=F&&F<=11097||12872<=F&&F<=12879||57344<=F&&F<=63743||65024<=F&&F<=65039||F==65533||127232<=F&&F<=127242||127248<=F&&F<=127277||127280<=F&&F<=127337||127344<=F&&F<=127386||917760<=F&&F<=917999||983040<=F&&F<=1048573||1048576<=F&&F<=1114109?"A":"N"},u.characterLength=function(E){var B=this.eastAsianWidth(E);return B=="F"||B=="W"||B=="A"?2:1};function C(E){return E.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(E){for(var B=C(E),$=0,F=0;F<B.length;F++)$=$+this.characterLength(B[F]);return $},u.slice=function(E,B,$){textLen=u.length(E),B=B||0,$=$||1,B<0&&(B=textLen+B),$<0&&($=textLen+$);for(var F="",A=0,h=C(E),_=0;_<h.length;_++){var M=h[_],J=u.length(M);if(A>=B-(J==2?1:0))if(A+J<=$)F+=M;else break;A+=J}return F}})(Gu);Z0=Gu.exports,J0=Qu(Z0),T0=Qu(Y0);H={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(H.modifier);Q0=Object.keys(H.color),G0=Object.keys(H.bgColor);[...Q0,...G0];H0=X0(),r=new Set(["\x1B",""]),wD=`${z0}8;;`;R0=["up","down","left","right","space","enter","cancel"],t={actions:new Set(R0),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");Mu=Symbol("clack:cancel");V0=Object.defineProperty;zu=class zu extends c{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(u)=>{this.output.write(R.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};L0=Object.defineProperty,N0=class extends c{constructor(D){super(D,!1),Zu(this,"options"),Zu(this,"cursor",0),this.options=D.options,this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:u})=>u===D.cursorAt),0),this.on("key",(u)=>{u==="a"&&this.toggleAll()}),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let D=this.value.length===this.options.length;this.value=D?[]:this.options.map((u)=>u.value)}toggleValue(){let D=this.value.includes(this._value);this.value=D?this.value.filter((u)=>u!==this._value):[...this.value,this._value]}},f0=Object.defineProperty;Su=class Su extends c{constructor(D){super(D,!1),Ju(this,"options"),Ju(this,"cursor",0),this.options=D.options,this.cursor=this.options.findIndex(({value:u})=>u===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};Uu=class Uu extends c{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}█`;let D=this.value.slice(0,this.cursor),[u,...C]=this.value.slice(this.cursor);return`${D}${Z.inverse(u)}${C.join("")}`}get cursor(){return this._cursor}constructor(D){super(D),this.on("finalize",()=>{this.value||(this.value=D.defaultValue)})}};j0=b0(),O0=w("❯",">"),k0=w("■","x"),v0=w("▲","x"),y0=w("✔","√"),X=w(""),O=w(""),SD=w("●",">"),UD=w("○"," "),g0=w("◻","[•]"),Yu=w("◼","[+]"),c0=w("◻","[ ]");`${Z.gray(X)} `;qu=Symbol.for("cancel")});var xD=lu(lD(),1),{program:x,createCommand:xF,createArgument:iF,createOption:pF,CommanderError:sF,InvalidArgumentError:nF,InvalidOptionArgumentError:tF,Command:rF,Argument:oF,Option:aF,Help:eF}=xD.default;import{existsSync as DD,mkdirSync as KF,readFileSync as NF,readdirSync as fF,writeFileSync as PF}from"fs";import{join as k,dirname as Ou}from"path";import{fileURLToPath as ku}from"url";function iD(D,u){let C=D.match(/<svg[^>]*>([\s\S]*)<\/svg>/);if(!C||!C[1])throw Error("Error parsing Lucide SVG");let E=C[1].trim();return`{%- comment -%}
|
|
72
|
+
Lucide icon: ${u}
|
|
73
|
+
Usage:
|
|
74
|
+
{% render 'icon-${u}' %}
|
|
75
|
+
{% render 'icon-${u}', size: 32 %}
|
|
76
|
+
{% render 'icon-${u}', class: 'custom-class' %}
|
|
77
|
+
{% render 'icon-${u}', stroke_width: 1.5 %}
|
|
78
|
+
{%- endcomment -%}
|
|
79
|
+
{%- liquid
|
|
80
|
+
assign size = size | default: 24
|
|
81
|
+
assign stroke_width = stroke_width | default: 2
|
|
82
|
+
-%}
|
|
83
|
+
<svg
|
|
84
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
85
|
+
width="{{ size }}"
|
|
86
|
+
height="{{ size }}"
|
|
87
|
+
viewBox="0 0 24 24"
|
|
88
|
+
fill="none"
|
|
89
|
+
stroke="currentColor"
|
|
90
|
+
stroke-width="{{ stroke_width }}"
|
|
91
|
+
stroke-linecap="round"
|
|
92
|
+
stroke-linejoin="round"
|
|
93
|
+
class="lucide lucide-${u}{% if class %} {{ class }}{% endif %}"
|
|
94
|
+
aria-hidden="true"
|
|
95
|
+
>
|
|
96
|
+
${E}
|
|
97
|
+
</svg>
|
|
98
|
+
`}var z={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},TD={silent:{level:-1},fatal:{level:z.fatal},error:{level:z.error},warn:{level:z.warn},log:{level:z.log},info:{level:z.info},success:{level:z.success},fail:{level:z.fail},ready:{level:z.info},start:{level:z.info},box:{level:z.info},debug:{level:z.debug},trace:{level:z.trace},verbose:{level:z.verbose}};function ZD(D){if(D===null||typeof D!=="object")return!1;let u=Object.getPrototypeOf(D);if(u!==null&&u!==Object.prototype&&Object.getPrototypeOf(u)!==null)return!1;if(Symbol.iterator in D)return!1;if(Symbol.toStringTag in D)return Object.prototype.toString.call(D)==="[object Module]";return!0}function QD(D,u,C=".",E){if(!ZD(u))return QD(D,{},C,E);let B=Object.assign({},u);for(let $ in D){if($==="__proto__"||$==="constructor")continue;let F=D[$];if(F===null||F===void 0)continue;if(E&&E(B,$,F,C))continue;if(Array.isArray(F)&&Array.isArray(B[$]))B[$]=[...F,...B[$]];else if(ZD(F)&&ZD(B[$]))B[$]=QD(F,B[$],(C?`${C}.`:"")+$.toString(),E);else B[$]=F}return B}function v2(D){return(...u)=>u.reduce((C,E)=>QD(C,E,"",D),{})}var y2=v2();function g2(D){return Object.prototype.toString.call(D)==="[object Object]"}function c2(D){if(!g2(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}var JD=!1,pD=[];class W{options;_lastLog;_mockFn;constructor(D={}){let u=D.types||TD;this.options=y2({...D,defaults:{...D.defaults},level:YD(D.level,u),reporters:[...D.reporters||[]]},{types:TD,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let C in u){let E={type:C,...this.options.defaults,...u[C]};this[C]=this._wrapLogFn(E),this[C].raw=this._wrapLogFn(E,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=YD(D,this.options.types,this.options.level)}prompt(D,u){if(!this.options.prompt)throw Error("prompt is not supported!");return this.options.prompt(D,u)}create(D){let u=new W({...this.options,...D});if(this._mockFn)u.mockTypes(this._mockFn);return u}withDefaults(D){return this.create({...this.options,defaults:{...this.options.defaults,...D}})}withTag(D){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+D:D})}addReporter(D){return this.options.reporters.push(D),this}removeReporter(D){if(D){let u=this.options.reporters.indexOf(D);if(u!==-1)return this.options.reporters.splice(u,1)}else this.options.reporters.splice(0);return this}setReporters(D){return this.options.reporters=Array.isArray(D)?D:[D],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let D in this.options.types){if(!console["__"+D])console["__"+D]=console[D];console[D]=this[D].raw}}restoreConsole(){for(let D in this.options.types)if(console["__"+D])console[D]=console["__"+D],delete console["__"+D]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(D,u){if(!D)return;if(!D.__write)D.__write=D.write;D.write=(C)=>{this[u].raw(String(C).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(D){if(!D)return;if(D.__write)D.write=D.__write,delete D.__write}pauseLogs(){JD=!0}resumeLogs(){JD=!1;let D=pD.splice(0);for(let u of D)u[0]._logFn(u[1],u[2])}mockTypes(D){let u=D||this.options.mockFn;if(this._mockFn=u,typeof u!=="function")return;for(let C in this.options.types)this[C]=u(C,this.options.types[C])||this[C],this[C].raw=this[C]}_wrapLogFn(D,u){return(...C)=>{if(JD){pD.push([this,D,C,u]);return}return this._logFn(D,C,u)}}_logFn(D,u,C){if((D.level||0)>this.level)return!1;let E={date:new Date,args:[],...D,level:YD(D.level,this.options.types)};if(!C&&u.length===1&&c2(u[0]))Object.assign(E,u[0]);else E.args=[...u];if(E.message)E.args.unshift(E.message),delete E.message;if(E.additional){if(!Array.isArray(E.additional))E.additional=E.additional.split(`
|
|
99
|
+
`);E.args.push(`
|
|
100
|
+
`+E.additional.join(`
|
|
101
|
+
`)),delete E.additional}E.type=typeof E.type==="string"?E.type.toLowerCase():"log",E.tag=typeof E.tag==="string"?E.tag:"";let B=(F=!1)=>{let A=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&A>0){let h=[...this._lastLog.object.args];if(A>1)h.push(`(repeated ${A} times)`);this._log({...this._lastLog.object,args:h}),this._lastLog.count=1}if(F)this._lastLog.object=E,this._log(E)};clearTimeout(this._lastLog.timeout);let $=this._lastLog.time&&E.date?E.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=E.date,$<this.options.throttle)try{let F=JSON.stringify([E.type,E.tag,E.args]),A=this._lastLog.serialized===F;if(this._lastLog.serialized=F,A){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout(B,this.options.throttle);return}}}catch{}B(!0)}_log(D){for(let u of this.options.reporters)u.log(D,{options:this.options})}}function YD(D,u={},C=3){if(D===void 0)return C;if(typeof D==="number")return D;if(u[D]&&u[D].level!==void 0)return u[D].level;return C}W.prototype.add=W.prototype.addReporter;W.prototype.remove=W.prototype.removeReporter;W.prototype.clear=W.prototype.removeReporter;W.prototype.withScope=W.prototype.withTag;W.prototype.mock=W.prototype.mockTypes;W.prototype.pause=W.prototype.pauseLogs;W.prototype.resume=W.prototype.resumeLogs;function sD(D={}){return new W(D)}import{formatWithOptions as nD}from"node:util";import{sep as m2}from"node:path";function XD(D,u){let C=process.cwd()+m2;return D.split(`
|
|
102
|
+
`).splice(u.split(`
|
|
103
|
+
`).length).map((B)=>B.trim().replace("file://","").replace(C,""))}function d2(D,u){return(u.__write||u.write).call(u,D)}var GD=(D)=>D?`[${D}]`:"";class i{formatStack(D,u,C){let E=" ".repeat((C?.errorLevel||0)+1);return E+XD(D,u).join(`
|
|
104
|
+
${E}`)}formatError(D,u){let C=D.message??nD(u,D),E=D.stack?this.formatStack(D.stack,C,u):"",B=u?.errorLevel||0,$=B>0?`${" ".repeat(B)}[cause]: `:"",F=D.cause?`
|
|
105
|
+
|
|
106
|
+
`+this.formatError(D.cause,{...u,errorLevel:B+1}):"";return $+C+`
|
|
107
|
+
`+E+F}formatArgs(D,u){let C=D.map((E)=>{if(E&&typeof E.stack==="string")return this.formatError(E,u);return E});return nD(u,...C)}formatDate(D,u){return u.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,u){let C=this.formatArgs(D.args,u);if(D.type==="box")return`
|
|
108
|
+
`+[GD(D.tag),D.title&&D.title,...C.split(`
|
|
109
|
+
`)].filter(Boolean).map((E)=>" > "+E).join(`
|
|
110
|
+
`)+`
|
|
111
|
+
`;return this.filterAndJoin([GD(D.type),GD(D.tag),C])}log(D,u){let C=this.formatLogObj(D,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return d2(C+`
|
|
112
|
+
`,D.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}}import Iu from"node:process";import*as p from"node:tty";var{env:K={},argv:oD=[],platform:l2=""}=typeof process>"u"?{}:process,x2="NO_COLOR"in K||oD.includes("--no-color"),i2="FORCE_COLOR"in K||oD.includes("--color"),p2=l2==="win32",aD=K.TERM==="dumb",s2=p&&p.isatty&&p.isatty(1)&&K.TERM&&!aD,n2="CI"in K&&(("GITHUB_ACTIONS"in K)||("GITLAB_CI"in K)||("CIRCLECI"in K)),t2=!x2&&(i2||p2&&!aD||s2||n2);function eD(D,u,C,E,B=u.slice(0,Math.max(0,D))+E,$=u.slice(Math.max(0,D+C.length)),F=$.indexOf(C)){return B+(F<0?$:eD(F,$,C,E))}function r2(D,u,C,E,B){return D<0?C+u+E:C+eD(D,u,E,B)+E}function o2(D,u,C=D,E=D.length+1){return(B)=>B||!(B===""||B===void 0)?r2((""+B).indexOf(u,E),B,D,u,C):""}function Y(D,u,C){return o2(`\x1B[${D}m`,`\x1B[${u}m`,C)}var tD={reset:Y(0,0),bold:Y(1,22,"\x1B[22m\x1B[1m"),dim:Y(2,22,"\x1B[22m\x1B[2m"),italic:Y(3,23),underline:Y(4,24),inverse:Y(7,27),hidden:Y(8,28),strikethrough:Y(9,29),black:Y(30,39),red:Y(31,39),green:Y(32,39),yellow:Y(33,39),blue:Y(34,39),magenta:Y(35,39),cyan:Y(36,39),white:Y(37,39),gray:Y(90,39),bgBlack:Y(40,49),bgRed:Y(41,49),bgGreen:Y(42,49),bgYellow:Y(43,49),bgBlue:Y(44,49),bgMagenta:Y(45,49),bgCyan:Y(46,49),bgWhite:Y(47,49),blackBright:Y(90,39),redBright:Y(91,39),greenBright:Y(92,39),yellowBright:Y(93,39),blueBright:Y(94,39),magentaBright:Y(95,39),cyanBright:Y(96,39),whiteBright:Y(97,39),bgBlackBright:Y(100,49),bgRedBright:Y(101,49),bgGreenBright:Y(102,49),bgYellowBright:Y(103,49),bgBlueBright:Y(104,49),bgMagentaBright:Y(105,49),bgCyanBright:Y(106,49),bgWhiteBright:Y(107,49)};function a2(D=t2){return D?tD:Object.fromEntries(Object.keys(tD).map((u)=>[u,String]))}var S=a2();function e2(D,u="reset"){return S[D]||S[u]}var D0=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");function L(D){return D.replace(new RegExp(D0,"g"),"")}var rD={solid:{tl:"┌",tr:"┐",bl:"└",br:"┘",h:"─",v:"│"},double:{tl:"╔",tr:"╗",bl:"╚",br:"╝",h:"═",v:"║"},doubleSingle:{tl:"╓",tr:"╖",bl:"╙",br:"╜",h:"─",v:"║"},doubleSingleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"║"},singleThick:{tl:"┏",tr:"┓",bl:"┗",br:"┛",h:"━",v:"┃"},singleDouble:{tl:"╒",tr:"╕",bl:"╘",br:"╛",h:"═",v:"│"},singleDoubleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"═",v:"│"},rounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"│"}},u0={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};function Du(D,u={}){let C={...u,style:{...u0,...u.style}},E=D.split(`
|
|
113
|
+
`),B=[],$=e2(C.style.borderColor),F={...typeof C.style.borderStyle==="string"?rD[C.style.borderStyle]||rD.solid:C.style.borderStyle};if($)for(let G in F)F[G]=$(F[G]);let A=C.style.padding%2===0?C.style.padding:C.style.padding+1,h=E.length+A,_=Math.max(...E.map((G)=>L(G).length),C.title?L(C.title).length:0)+A,M=_+A,J=C.style.marginLeft>0?" ".repeat(C.style.marginLeft):"";if(C.style.marginTop>0)B.push("".repeat(C.style.marginTop));if(C.title){let G=$?$(C.title):C.title,P=F.h.repeat(Math.floor((_-L(C.title).length)/2)),uD=F.h.repeat(_-L(C.title).length-L(P).length+A);B.push(`${J}${F.tl}${P}${G}${uD}${F.tr}`)}else B.push(`${J}${F.tl}${F.h.repeat(M)}${F.tr}`);let T=C.style.valign==="center"?Math.floor((h-E.length)/2):C.style.valign==="top"?h-E.length-A:h-E.length;for(let G=0;G<h;G++)if(G<T||G>=T+E.length)B.push(`${J}${F.v}${" ".repeat(M)}${F.v}`);else{let P=E[G-T],uD=" ".repeat(A),yu=" ".repeat(_-L(P).length);B.push(`${J}${F.v}${uD}${P}${yu}${F.v}`)}if(B.push(`${J}${F.bl}${F.h.repeat(M)}${F.br}`),C.style.marginBottom>0)B.push("".repeat(C.style.marginBottom));return B.join(`
|
|
114
|
+
`)}var e=Object.create(null),m=(D)=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(D?e:globalThis),N=new Proxy(e,{get(D,u){return m()[u]??e[u]},has(D,u){let C=m();return u in C||u in e},set(D,u,C){let E=m(!0);return E[u]=C,!0},deleteProperty(D,u){if(!u)return!1;let C=m(!0);return delete C[u],!0},ownKeys(){let D=m(!0);return Object.keys(D)}}),i0=typeof process<"u"&&process.env&&"development"||"",p0=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function s0(){if(globalThis.process?.env)for(let D of p0){let u=D[1]||D[0];if(globalThis.process?.env[u])return{name:D[0].toLowerCase(),...D[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var fu=s0();fu.name;function j(D){return D?D!=="false":!1}var n0=globalThis.process?.platform||"",VD=j(N.CI)||fu.ci!==!1,Pu=j(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),t0=j(N.DEBUG),ID=i0==="test"||j(N.TEST);j(N.MINIMAL);var r0=/^win/i.test(n0);!j(N.NO_COLOR)&&(j(N.FORCE_COLOR)||(Pu||r0)&&N.TERM);var o0=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(o0?.split(".")[0]);var a0=globalThis.process||Object.create(null),Lu={versions:{}};new Proxy(a0,{get(D,u){if(u==="env")return N;if(u in D)return D[u];if(u in Lu)return Lu[u]}});var e0=globalThis.process?.release?.name==="node",DF=!!globalThis.Bun||!!globalThis.process?.versions?.bun,uF=!!globalThis.Deno,FF=!!globalThis.fastly,CF=!!globalThis.Netlify,EF=!!globalThis.EdgeRuntime,BF=globalThis.navigator?.userAgent==="Cloudflare-Workers",$F=[[CF,"netlify"],[EF,"edge-light"],[BF,"workerd"],[FF,"fastly"],[uF,"deno"],[DF,"bun"],[e0,"node"]];function AF(){let D=$F.find((u)=>u[0]);if(D)return{name:D[1]}}var hF=AF();hF?.name;function _F({onlyFirst:D=!1}={}){let C=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(C,D?void 0:"g")}var MF=_F();function ZF(D){if(typeof D!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(MF,"")}function JF(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function YF(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function TF(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9776&&D<=9783||D>=9800&&D<=9811||D===9855||D>=9866&&D<=9871||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12773||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101631&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D>=119552&&D<=119638||D>=119648&&D<=119670||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129673||D>=129679&&D<=129734||D>=129742&&D<=129756||D>=129759&&D<=129769||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function QF(D){if(!Number.isSafeInteger(D))throw TypeError(`Expected a code point, got \`${typeof D}\`.`)}function GF(D,{ambiguousAsWide:u=!1}={}){if(QF(D),YF(D)||TF(D)||u&&JF(D))return 2;return 1}var XF=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},HF=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:(D)=>D.split("")},WF=/^\p{Default_Ignorable_Code_Point}$/u;function zF(D,u={}){if(typeof D!=="string"||D.length===0)return 0;let{ambiguousIsNarrow:C=!0,countAnsiEscapeCodes:E=!1}=u;if(!E)D=ZF(D);if(D.length===0)return 0;let B=0,$={ambiguousAsWide:!C};for(let{segment:F}of HF.segment(D)){let A=F.codePointAt(0);if(A<=31||A>=127&&A<=159)continue;if(A>=8203&&A<=8207||A===65279)continue;if(A>=768&&A<=879||A>=6832&&A<=6911||A>=7616&&A<=7679||A>=8400&&A<=8447||A>=65056&&A<=65071)continue;if(A>=55296&&A<=57343)continue;if(A>=65024&&A<=65039)continue;if(WF.test(F))continue;if(XF().test(F)){B+=2;continue}B+=GF(A,$)}return B}function SF(){let{env:D}=Iu,{TERM:u,TERM_PROGRAM:C}=D;if(Iu.platform!=="win32")return u!=="linux";return Boolean(D.WT_SESSION)||Boolean(D.TERMINUS_SUBLIME)||D.ConEmuTask==="{cmd::Cmder}"||C==="Terminus-Sublime"||C==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||D.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var UF={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},qF={0:"red",1:"yellow"},RF=SF(),V=(D,u)=>RF?D:u,Ku={error:V("✖","×"),fatal:V("✖","×"),ready:V("✔","√"),warn:V("⚠","‼"),info:V("ℹ","i"),success:V("✔","√"),debug:V("⚙","D"),trace:V("→","→"),fail:V("✖","×"),start:V("◐","o"),log:""};function Nu(D){if(typeof Intl!=="object"||!Intl.Segmenter)return L(D).length;return zF(D)}class bu extends i{formatStack(D,u,C){let E=" ".repeat((C?.errorLevel||0)+1);return`
|
|
115
|
+
${E}`+XD(D,u).map((B)=>" "+B.replace(/^at +/,($)=>S.gray($)).replace(/\((.+)\)/,($,F)=>`(${S.cyan(F)})`)).join(`
|
|
116
|
+
${E}`)}formatType(D,u,C){let E=UF[D.type]||qF[D.level]||"gray";if(u)return VF(E)(S.black(` ${D.type.toUpperCase()} `));let B=typeof Ku[D.type]==="string"?Ku[D.type]:D.icon||D.type;return B?wF(E)(B):""}formatLogObj(D,u){let[C,...E]=this.formatArgs(D.args,u).split(`
|
|
117
|
+
`);if(D.type==="box")return Du(a(C+(E.length>0?`
|
|
118
|
+
`+E.join(`
|
|
119
|
+
`):"")),{title:D.title?a(D.title):void 0,style:D.style});let B=this.formatDate(D.date,u),$=B&&S.gray(B),F=D.badge??D.level<2,A=this.formatType(D,F,u),h=D.tag?S.gray(D.tag):"",_,M=this.filterAndJoin([A,a(C)]),J=this.filterAndJoin(u.columns?[h,$]:[h]),T=(u.columns||0)-Nu(M)-Nu(J)-2;if(_=T>0&&(u.columns||0)>=80?M+" ".repeat(T)+J:(J?`${S.gray(`[${J}]`)} `:"")+M,_+=a(E.length>0?`
|
|
120
|
+
`+E.join(`
|
|
121
|
+
`):""),D.type==="trace"){let G=Error("Trace: "+D.message);_+=this.formatStack(G.stack||"",G.message)}return F?`
|
|
122
|
+
`+_+`
|
|
123
|
+
`:_}}function a(D){return D.replace(/`([^`]+)`/gm,(u,C)=>S.cyan(C)).replace(/\s+_([^_]+)_\s+/gm,(u,C)=>` ${S.underline(C)} `)}function wF(D="white"){return S[D]||S.white}function VF(D="bgWhite"){return S[`bg${D[0].toUpperCase()}${D.slice(1)}`]||S.bgWhite}function IF(D={}){let u=LF();if(process.env.CONSOLA_LEVEL)u=Number.parseInt(process.env.CONSOLA_LEVEL)??u;return sD({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...E)=>Promise.resolve().then(() => (Vu(),wu)).then((B)=>B.prompt(...E)),reporters:D.reporters||[D.fancy??!(VD||ID)?new bu:new i],...D})}function LF(){if(t0)return z.debug;if(ID)return z.warn;return z.info}var f=IF();function ju(D,u){if(D===u)return 0;let C=0,E=D.length-1,B=u.length-1;while(C<=E&&C<=B&&D[C]===u[C])C++;while(E>=C&&B>=C&&D[E]===u[B])E--,B--;let $=E-C+1,F=B-C+1;if($===0)return F;if(F===0)return $;let A=$+1,h=F+1,_=Array(A*h).fill(0);for(let M=1;M<h;M++)_[M]=M;for(let M=1;M<A;M++)_[M*h]=M;for(let M=1;M<h;M++)for(let J=1;J<A;J++){let T=J*h+M;_[T]=Math.min(_[T-h]+1,_[T-1]+1,_[T-h-1]+(D[C+J-1]===u[C+M-1]?0:1))}return _[$*h+F]}function bF(D){let u=[k(process.cwd(),"node_modules","lucide-static","icons",`${D}.svg`),k(Ou(ku(import.meta.url)),"..","..","node_modules","lucide-static","icons",`${D}.svg`)];for(let C of u)if(DD(C))return C;return null}function jF(){let D=[k(process.cwd(),"node_modules","lucide-static","icons"),k(Ou(ku(import.meta.url)),"..","..","node_modules","lucide-static","icons")];for(let u of D)if(DD(u))return fF(u).filter((C)=>C.endsWith(".svg")).map((C)=>C.replace(".svg",""));return[]}async function vu(D,u){let C=k(process.cwd(),u.dir);if(!DD(C))f.log(`Creating ${u.dir} directory...`),KF(C,{recursive:!0});let E=0,B=0;for(let $ of D){let F=performance.now(),A=bF($);if(!A){f.error(`Error: Icon "${$}" not found.`);let _=jF().filter((M)=>ju(M.toLowerCase(),$.toLowerCase())<=2).slice(0,5);if(_.length>0)f.log(` Did you mean: ${_.join(", ")}?`);B++;continue}try{let h=NF(A,"utf-8"),_=iD(h,$),M=k(C,`${u.prefix}${$}.liquid`);if(DD(M)&&!u.force){B++,f.error(`File ${M} already exists`);continue}PF(M,_);let J=performance.now()-F;f.log(`✅ [${J.toFixed(2)} ms] ${u.prefix}${$}.liquid`),E++}catch(h){f.error(`Error processing "${$}":`,h),B++}}f.log(`
|
|
124
|
+
Done! Added ${E} icon(s)${B>0?`, ${B} failed`:""}.`)}x.name("lucide-shopify-snippets").description("Add Lucide icon snippets to your Shopify theme").version("0.1.0");x.command("add").description("Add icon snippet(s) to your Shopify theme").argument("<icons...>","Icon name(s) to add (e.g., menu chevron-down)").option("-d, --dir <path>","Snippets directory","snippets").option("-p, --prefix <prefix>","Prefix for snippet filenames","icon-").option("-f, --force","Overwrite output files if already exists").action(vu);x.parse();
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ckreidl/lucide-shopify-snippets",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CLI to add Lucide icon snippets to Shopify themes",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"icons",
|
|
8
|
+
"liquid",
|
|
9
|
+
"lucide",
|
|
10
|
+
"shopify",
|
|
11
|
+
"snippets"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "",
|
|
15
|
+
"bin": {
|
|
16
|
+
"lucide-shopify-snippets": "./dist/cli.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "bun scripts/build.ts",
|
|
24
|
+
"dev": "bun run --watch src/cli.ts",
|
|
25
|
+
"format": "oxfmt --write",
|
|
26
|
+
"format:check": "oxfmt --check",
|
|
27
|
+
"lint": "oxlint --type-aware",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"check": "bun run format:check && bun run lint && bun run typecheck",
|
|
30
|
+
"prepublishOnly": "bun run check"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"commander": "^14.0.2",
|
|
34
|
+
"consola": "^3.4.2",
|
|
35
|
+
"lucide-static": "latest",
|
|
36
|
+
"radashi": "^12.7.1"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/bun": "latest",
|
|
40
|
+
"@types/node": "^22.19.3",
|
|
41
|
+
"oxfmt": "^0.20.0",
|
|
42
|
+
"oxlint": "^1.35.0",
|
|
43
|
+
"oxlint-tsgolint": "^0.10.0",
|
|
44
|
+
"typescript": "^5.9.3"
|
|
45
|
+
}
|
|
46
|
+
}
|