xevol 0.0.1 → 0.2.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 CHANGED
@@ -1,23 +1,345 @@
1
1
  # xevol
2
2
 
3
- CLI for [XEVol](https://xevol.com) — transcribe, analyze, and explore YouTube content from your terminal.
3
+ **Transcribe, analyze, and explore YouTube content from your terminal.**
4
4
 
5
- ## Install
5
+ [![npm version](https://img.shields.io/npm/v/xevol)](https://www.npmjs.com/package/xevol)
6
+ [![License](https://img.shields.io/badge/license-proprietary-blue)](https://xevol.com)
7
+ [![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
8
+
9
+ Paste a YouTube URL, get AI-powered transcription and analysis — no API keys, no local GPU, no tool chaining.
10
+
11
+ ## Quick Demo
12
+
13
+ ```bash
14
+ $ xevol add https://youtube.com/watch?v=oOylEw3tPQ8 --analyze facts
15
+
16
+ ⠋ Processing... (12s)
17
+ ✔ "Cursor CEO: Going Beyond Code" (37:29)
18
+
19
+ ─── facts ───
20
+ • Cursor reached $100M ARR in 20 months
21
+ • 40-50% of code in Cursor is AI-generated
22
+ • Team hired first 10 employees over 6 months deliberately
23
+ • Pivoted from AI-CAD to AI coding tools
24
+
25
+ ✔ Done
26
+ ```
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ npm install -g xevol
32
+ ```
33
+
34
+ Or run without installing:
35
+
36
+ ```bash
37
+ npx xevol
38
+ ```
39
+
40
+ Requires Node.js 18+.
41
+
42
+ ## Quick Start
6
43
 
7
44
  ```bash
8
- npm i -g xevol
45
+ # 1. Authenticate
46
+ xevol login
47
+
48
+ # 2. Add a YouTube video (waits for completion by default)
49
+ xevol add "https://youtube.com/watch?v=abc123"
50
+
51
+ # 3. Analyze it
52
+ xevol analyze <id> --prompt facts
53
+
54
+ # 4. View the transcript
55
+ xevol view <id>
9
56
  ```
10
57
 
11
- ## Usage
58
+ ## Commands
59
+
60
+ | Command | Description |
61
+ |---------|-------------|
62
+ | `login` | Authenticate via device flow (opens browser) |
63
+ | `logout` | Clear stored credentials |
64
+ | `whoami` | Show current user, plan, and usage |
65
+ | `add` | Add a YouTube URL for transcription |
66
+ | `list` | List your transcriptions |
67
+ | `view` | View a transcription summary or full transcript |
68
+ | `analyze` | Generate AI analysis using a prompt |
69
+ | `prompts` | List available analysis prompts |
70
+ | `stream` | Stream analysis output via SSE |
71
+ | `resume` | Resume a previous streaming session |
72
+ | `config` | View or edit CLI configuration |
73
+
74
+ All commands support `--json` for machine-readable output.
75
+
76
+ ## Command Details
77
+
78
+ ### `xevol login`
79
+
80
+ Authenticate using the device code flow — opens your browser, you confirm, done.
12
81
 
13
82
  ```bash
14
- xevol login # Authenticate via browser
15
- xevol list # List your transcriptions
16
- xevol add <url> # Transcribe a YouTube video
17
- xevol view <id> # View transcript
18
- xevol spikes <id> # View AI-generated insights
83
+ # Interactive device flow
84
+ xevol login
85
+
86
+ # Token-based (CI / headless)
87
+ xevol login --token <token>
88
+
89
+ # Or set via environment variable
90
+ export XEVOL_TOKEN=<token>
19
91
  ```
20
92
 
93
+ ### `xevol add`
94
+
95
+ Add a YouTube video for transcription.
96
+
97
+ ```bash
98
+ # Add and wait for transcription (default)
99
+ xevol add "https://youtube.com/watch?v=abc123"
100
+
101
+ # Fire-and-forget (returns ID immediately)
102
+ xevol add "https://youtube.com/watch?v=abc123" --no-wait
103
+
104
+ # Specify language
105
+ xevol add "https://youtube.com/watch?v=abc123" --lang de
106
+
107
+ # Transcribe and analyze in one step
108
+ xevol add "https://youtube.com/watch?v=abc123" --analyze facts
109
+
110
+ # Analyze with multiple prompts
111
+ xevol add "https://youtube.com/watch?v=abc123" --analyze facts,advice
112
+
113
+ # Stream analysis output in real time
114
+ xevol add "https://youtube.com/watch?v=abc123" --analyze facts --stream
115
+ ```
116
+
117
+ | Flag | Description |
118
+ |------|-------------|
119
+ | `--no-wait` | Return immediately without waiting |
120
+ | `--lang <code>` | Language code (e.g. `en`, `de`, `ja`) |
121
+ | `--analyze <prompts>` | Comma-separated prompt IDs to run after transcription |
122
+ | `--stream` | Stream analysis output via SSE |
123
+ | `--json` | JSON output |
124
+
125
+ ### `xevol list`
126
+
127
+ List your transcriptions.
128
+
129
+ ```bash
130
+ # Default table view
131
+ xevol list
132
+
133
+ # Pagination
134
+ xevol list --page 2 --limit 50
135
+
136
+ # Filter by status
137
+ xevol list --status completed
138
+
139
+ # Machine-readable formats
140
+ xevol list --json
141
+ xevol list --csv
142
+ ```
143
+
144
+ | Flag | Description |
145
+ |------|-------------|
146
+ | `--page <n>` | Page number |
147
+ | `--limit <n>` | Results per page |
148
+ | `--status <s>` | Filter by status |
149
+ | `--json` | JSON output |
150
+ | `--csv` | CSV output |
151
+
152
+ ### `xevol view`
153
+
154
+ View a transcription's summary or full transcript.
155
+
156
+ ```bash
157
+ # Summary view
158
+ xevol view abc123def45
159
+
160
+ # Full transcript (pipe-friendly)
161
+ xevol view abc123def45 --raw
162
+
163
+ # Clean transcript (processed content)
164
+ xevol view abc123def45 --clean
165
+
166
+ # JSON output
167
+ xevol view abc123def45 --json
168
+ ```
169
+
170
+ | Flag | Description |
171
+ |------|-------------|
172
+ | `--raw` | Print the full transcript text |
173
+ | `--clean` | Use cleaned/processed content |
174
+ | `--json` | JSON output |
175
+
176
+ ### `xevol analyze`
177
+
178
+ Generate AI-powered analysis of a transcription.
179
+
180
+ ```bash
181
+ # Analyze with a specific prompt
182
+ xevol analyze abc123def45 --prompt facts
183
+
184
+ # Use a different language for output
185
+ xevol analyze abc123def45 --prompt facts --lang de
186
+
187
+ # JSON output
188
+ xevol analyze abc123def45 --prompt facts --json
189
+ ```
190
+
191
+ | Flag | Description |
192
+ |------|-------------|
193
+ | `--prompt <id>` | Prompt to use (default: `review`) |
194
+ | `--lang <code>` | Output language |
195
+ | `--json` | JSON output |
196
+
197
+ Use `xevol prompts` to see all available prompts.
198
+
199
+ ### `xevol prompts`
200
+
201
+ List available analysis prompts.
202
+
203
+ ```bash
204
+ xevol prompts
205
+ xevol prompts --json
206
+ xevol prompts --csv
207
+ ```
208
+
209
+ ### `xevol stream`
210
+
211
+ Stream analysis output in real time via SSE.
212
+
213
+ ```bash
214
+ xevol stream <spike-id>
215
+ xevol stream <spike-id> --last-event-id <id>
216
+ ```
217
+
218
+ ### `xevol resume`
219
+
220
+ Resume a previously interrupted streaming session.
221
+
222
+ ```bash
223
+ xevol resume <transcription-id>
224
+ ```
225
+
226
+ ### `xevol config`
227
+
228
+ View or edit CLI configuration.
229
+
230
+ ```bash
231
+ # Show all config
232
+ xevol config
233
+
234
+ # Get a value
235
+ xevol config get apiUrl
236
+
237
+ # Set a value
238
+ xevol config set default.lang de
239
+ xevol config set default.limit 50
240
+ ```
241
+
242
+ Available config keys:
243
+
244
+ | Key | Description |
245
+ |-----|-------------|
246
+ | `apiUrl` | Base API URL |
247
+ | `default.lang` | Default output language |
248
+ | `default.limit` | Default page size for `list` |
249
+ | `api.timeout` | API request timeout (ms) |
250
+
251
+ ## Output Formats
252
+
253
+ ### Table (default)
254
+
255
+ ```
256
+ ┌─────────────┬────────────────────────────────┬──────────┬──────────┐
257
+ │ ID │ Title │ Duration │ Status │
258
+ ├─────────────┼────────────────────────────────┼──────────┼──────────┤
259
+ │ abc123def45 │ Cursor CEO: Going Beyond Code │ 37:29 │ ✔ done │
260
+ │ xyz789ghi01 │ Naval on Happiness │ 12:03 │ ⠋ proc… │
261
+ └─────────────┴────────────────────────────────┴──────────┴──────────┘
262
+ ```
263
+
264
+ ### JSON (`--json`)
265
+
266
+ ```bash
267
+ xevol list --json | jq '.list[] | select(.channelTitle == "Y Combinator")'
268
+ xevol analyze abc123 --prompt facts --json | jq '.spikes[0].content'
269
+ ```
270
+
271
+ ### CSV (`--csv`)
272
+
273
+ ```bash
274
+ xevol list --csv > transcriptions.csv
275
+ xevol prompts --csv
276
+ ```
277
+
278
+ ## Streaming
279
+
280
+ Analysis output streams in real time via Server-Sent Events (SSE). Use `--stream` with `add` to watch analysis as it's generated:
281
+
282
+ ```bash
283
+ xevol add "https://youtube.com/watch?v=..." --analyze facts --stream
284
+ ```
285
+
286
+ If a stream is interrupted, resume it:
287
+
288
+ ```bash
289
+ xevol resume <transcription-id>
290
+ ```
291
+
292
+ ## Authentication
293
+
294
+ xevol uses a device authorization flow, similar to `gh auth login`:
295
+
296
+ 1. Run `xevol login`
297
+ 2. A code is displayed and your browser opens
298
+ 3. Enter the code to authorize
299
+ 4. The CLI stores your token locally at `~/.xevol/`
300
+
301
+ For CI/CD or headless environments, use token-based auth:
302
+
303
+ ```bash
304
+ xevol login --token <token>
305
+ # or
306
+ export XEVOL_TOKEN=<token>
307
+ ```
308
+
309
+ Check your auth status:
310
+
311
+ ```bash
312
+ xevol whoami
313
+ ```
314
+
315
+ ## Piping & Scripting
316
+
317
+ ```bash
318
+ # Pipe transcript to other tools
319
+ xevol view <id> --raw | wc -w
320
+
321
+ # JSON output for scripting
322
+ xevol list --json | jq '.list | length'
323
+
324
+ # Export to CSV
325
+ xevol list --csv > my-transcriptions.csv
326
+ ```
327
+
328
+ ## Global Options
329
+
330
+ | Flag | Description |
331
+ |------|-------------|
332
+ | `--token <token>` | Override auth token for a single command |
333
+ | `--no-color` | Disable colored output |
334
+ | `--json` | Machine-readable JSON output |
335
+ | `-V, --version` | Print version |
336
+ | `-h, --help` | Show help |
337
+
338
+ ## Links
339
+
340
+ - **Website**: [xevol.com](https://xevol.com)
341
+ - **Issues**: [github.com/xevol/xevol-cli/issues](https://github.com/xevol/xevol-cli/issues)
342
+
21
343
  ## License
22
344
 
23
- MIT
345
+ Proprietary — see [xevol.com](https://xevol.com) for terms.
package/dist/index.js CHANGED
@@ -1,5 +1,85 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
+ import{createRequire as j2}from"node:module";var R2=Object.create;var{getPrototypeOf:U2,defineProperty:nu,getOwnPropertyNames:N2}=Object;var W2=Object.prototype.hasOwnProperty;var CD=(D,u,F)=>{F=D!=null?R2(U2(D)):{};let E=u||!D||!D.__esModule?nu(F,"default",{value:D,enumerable:!0}):F;for(let C of N2(D))if(!W2.call(E,C))nu(E,C,{get:()=>D[C],enumerable:!0});return E};var W=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var FD=j2(import.meta.url);var YD=W((L2)=>{class eD extends Error{constructor(D,u,F){super(F);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=u,this.exitCode=D,this.nestedError=void 0}}class su extends eD{constructor(D){super(1,"commander.invalidArgument",D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}L2.CommanderError=eD;L2.InvalidArgumentError=su});var PD=W((O2)=>{var{InvalidArgumentError:w2}=YD();class tu{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.length>3&&this._name.slice(-3)==="...")this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_concatValue(D,u){if(u===this.defaultValue||!Array.isArray(u))return[D];return u.concat(D)}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,F)=>{if(!this.argChoices.includes(u))throw new w2(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(u,F);return u},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function P2(D){let u=D.name()+(D.variadic===!0?"...":"");return D.required?"<"+u+">":"["+u+"]"}O2.Argument=tu;O2.humanReadableArgName=P2});var Du=W((v2)=>{var{humanReadableArgName:b2}=PD();class ou{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),F=D._getHelpCommand();if(F&&!F._hidden)u.push(F);if(this.sortSubcommands)u.sort((E,C)=>{return E.name().localeCompare(C.name())});return u}compareOptions(D,u){let F=(E)=>{return E.short?E.short.replace(/^-/,""):E.long.replace(/^--/,"")};return F(D).localeCompare(F(u))}visibleOptions(D){let u=D.options.filter((E)=>!E.hidden),F=D._getHelpOption();if(F&&!F.hidden){let E=F.short&&D._findOption(F.short),C=F.long&&D._findOption(F.long);if(!E&&!C)u.push(F);else if(F.long&&!C)u.push(D.createOption(F.long,F.description));else if(F.short&&!E)u.push(D.createOption(F.short,F.description))}if(this.sortOptions)u.sort(this.compareOptions);return u}visibleGlobalOptions(D){if(!this.showGlobalOptions)return[];let u=[];for(let F=D.parent;F;F=F.parent){let E=F.options.filter((C)=>!C.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((F)=>b2(F)).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((F,E)=>{return Math.max(F,this.displayWidth(u.styleSubcommandTerm(u.subcommandTerm(E))))},0)}longestOptionTermLength(D,u){return u.visibleOptions(D).reduce((F,E)=>{return Math.max(F,this.displayWidth(u.styleOptionTerm(u.optionTerm(E))))},0)}longestGlobalOptionTermLength(D,u){return u.visibleGlobalOptions(D).reduce((F,E)=>{return Math.max(F,this.displayWidth(u.styleOptionTerm(u.optionTerm(E))))},0)}longestArgumentTermLength(D,u){return u.visibleArguments(D).reduce((F,E)=>{return Math.max(F,this.displayWidth(u.styleArgumentTerm(u.argumentTerm(E))))},0)}commandUsage(D){let u=D._name;if(D._aliases[0])u=u+"|"+D._aliases[0];let F="";for(let E=D.parent;E;E=E.parent)F=E.name()+" "+F;return F+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((F)=>JSON.stringify(F)).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)return`${D.description} (${u.join(", ")})`;return D.description}argumentDescription(D){let u=[];if(D.argChoices)u.push(`choices: ${D.argChoices.map((F)=>JSON.stringify(F)).join(", ")}`);if(D.defaultValue!==void 0)u.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`);if(u.length>0){let F=`(${u.join(", ")})`;if(D.description)return`${D.description} ${F}`;return F}return D.description}formatHelp(D,u){let F=u.padWidth(D,u),E=u.helpWidth??80;function C($,H){return u.formatItem($,F,H,u)}let B=[`${u.styleTitle("Usage:")} ${u.styleUsage(u.commandUsage(D))}`,""],A=u.commandDescription(D);if(A.length>0)B=B.concat([u.boxWrap(u.styleCommandDescription(A),E),""]);let _=u.visibleArguments(D).map(($)=>{return C(u.styleArgumentTerm(u.argumentTerm($)),u.styleArgumentDescription(u.argumentDescription($)))});if(_.length>0)B=B.concat([u.styleTitle("Arguments:"),..._,""]);let z=u.visibleOptions(D).map(($)=>{return C(u.styleOptionTerm(u.optionTerm($)),u.styleOptionDescription(u.optionDescription($)))});if(z.length>0)B=B.concat([u.styleTitle("Options:"),...z,""]);if(u.showGlobalOptions){let $=u.visibleGlobalOptions(D).map((H)=>{return C(u.styleOptionTerm(u.optionTerm(H)),u.styleOptionDescription(u.optionDescription(H)))});if($.length>0)B=B.concat([u.styleTitle("Global Options:"),...$,""])}let q=u.visibleCommands(D).map(($)=>{return C(u.styleSubcommandTerm(u.subcommandTerm($)),u.styleSubcommandDescription(u.subcommandDescription($)))});if(q.length>0)B=B.concat([u.styleTitle("Commands:"),...q,""]);return B.join(`
4
+ `)}displayWidth(D){return eu(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,F,E){let B=" ".repeat(2);if(!F)return B+D;let A=D.padEnd(u+D.length-E.displayWidth(D)),_=2,q=(this.helpWidth??80)-u-_-2,$;if(q<this.minWidthToWrap||E.preformatted(F))$=F;else $=E.boxWrap(F,q).replace(/\n/g,`
5
+ `+" ".repeat(u+_));return B+A+" ".repeat(_)+$.replace(/\n/g,`
6
+ ${B}`)}boxWrap(D,u){if(u<this.minWidthToWrap)return D;let F=D.split(/\r\n|\n/),E=/[\s]*[^\s]+/g,C=[];return F.forEach((B)=>{let A=B.match(E);if(A===null){C.push("");return}let _=[A.shift()],z=this.displayWidth(_[0]);A.forEach((q)=>{let $=this.displayWidth(q);if(z+$<=u){_.push(q),z+=$;return}C.push(_.join(""));let H=q.trimStart();_=[H],z=this.displayWidth(H)}),C.push(_.join(""))}),C.join(`
7
+ `)}}function eu(D){let u=/\x1b\[\d*(;\d*)*m/g;return D.replace(u,"")}v2.Help=ou;v2.stripColor=eu});var uu=W((g2)=>{var{InvalidArgumentError:x2}=YD();class u0{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 F=h2(D);if(this.short=F.shortFlag,this.long=F.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}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}_concatValue(D,u){if(u===this.defaultValue||!Array.isArray(u))return[D];return u.concat(D)}choices(D){return this.argChoices=D.slice(),this.parseArg=(u,F)=>{if(!this.argChoices.includes(u))throw new x2(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(u,F);return u},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return D0(this.name().replace(/^no-/,""));return D0(this.name())}is(D){return this.short===D||this.long===D}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class F0{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,F)=>{if(this.positiveOptions.has(F))this.dualOptions.add(F)})}valueFromOption(D,u){let F=u.attributeName();if(!this.dualOptions.has(F))return!0;let E=this.negativeOptions.get(F).presetArg,C=E!==void 0?E:!1;return u.negate===(C===D)}}function D0(D){return D.split("-").reduce((u,F)=>{return u+F[0].toUpperCase()+F.slice(1)})}function h2(D){let u,F,E=/^-[^-]$/,C=/^--[^-]/,B=D.split(/[ |,]+/).concat("guard");if(E.test(B[0]))u=B.shift();if(C.test(B[0]))F=B.shift();if(!u&&E.test(B[0]))u=B.shift();if(!u&&C.test(B[0]))u=F,F=B.shift();if(B[0].startsWith("-")){let A=B[0],_=`option creation failed due to '${A}' in option flags '${D}'`;if(/^-[^-][^-]/.test(A))throw Error(`${_}
8
+ - a short flag is a single dash and a single character
9
+ - either use a single dash and a single character (for a short flag)
10
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(E.test(A))throw Error(`${_}
11
+ - too many short flags`);if(C.test(A))throw Error(`${_}
12
+ - too many long flags`);throw Error(`${_}
13
+ - unrecognised flag format`)}if(u===void 0&&F===void 0)throw Error(`option creation failed due to no flags found in '${D}'.`);return{shortFlag:u,longFlag:F}}g2.Option=u0;g2.DualOptions=F0});var E0=W((l2)=>{function d2(D,u){if(Math.abs(D.length-u.length)>3)return Math.max(D.length,u.length);let F=[];for(let E=0;E<=D.length;E++)F[E]=[E];for(let E=0;E<=u.length;E++)F[0][E]=E;for(let E=1;E<=u.length;E++)for(let C=1;C<=D.length;C++){let B=1;if(D[C-1]===u[E-1])B=0;else B=1;if(F[C][E]=Math.min(F[C-1][E]+1,F[C][E-1]+1,F[C-1][E-1]+B),C>1&&E>1&&D[C-1]===u[E-2]&&D[C-2]===u[E-1])F[C][E]=Math.min(F[C][E],F[C-2][E-2]+1)}return F[D.length][u.length]}function p2(D,u){if(!u||u.length===0)return"";u=Array.from(new Set(u));let F=D.startsWith("--");if(F)D=D.slice(2),u=u.map((A)=>A.slice(2));let E=[],C=3,B=0.4;if(u.forEach((A)=>{if(A.length<=1)return;let _=d2(D,A),z=Math.max(D.length,A.length);if((z-_)/z>B){if(_<C)C=_,E=[A];else if(_===C)E.push(A)}}),E.sort((A,_)=>A.localeCompare(_)),F)E=E.map((A)=>`--${A}`);if(E.length>1)return`
14
+ (Did you mean one of ${E.join(", ")}?)`;if(E.length===1)return`
15
+ (Did you mean ${E[0]}?)`;return""}l2.suggestSimilar=p2});var _0=W((e2)=>{var r2=FD("node:events").EventEmitter,Fu=FD("node:child_process"),DD=FD("node:path"),OD=FD("node:fs"),j=FD("node:process"),{Argument:i2,humanReadableArgName:n2}=PD(),{CommanderError:Eu}=YD(),{Help:s2,stripColor:t2}=Du(),{Option:C0,DualOptions:o2}=uu(),{suggestSimilar:B0}=E0();class Bu extends r2{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)=>j.stdout.write(u),writeErr:(u)=>j.stderr.write(u),outputError:(u,F)=>F(u),getOutHelpWidth:()=>j.stdout.isTTY?j.stdout.columns:void 0,getErrHelpWidth:()=>j.stderr.isTTY?j.stderr.columns:void 0,getOutHasColors:()=>Cu()??(j.stdout.isTTY&&j.stdout.hasColors?.()),getErrHasColors:()=>Cu()??(j.stderr.isTTY&&j.stderr.hasColors?.()),stripColor:(u)=>t2(u)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}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,F){let E=u,C=F;if(typeof E==="object"&&E!==null)C=E,E=null;C=C||{};let[,B,A]=D.match(/([^ ]+) *(.*)/),_=this.createCommand(B);if(E)_.description(E),_._executableHandler=!0;if(C.isDefault)this._defaultCommandName=_._name;if(_._hidden=!!(C.noHelp||C.hidden),_._executableFile=C.executableFile||null,A)_.arguments(A);if(this._registerCommand(_),_.parent=this,_.copyInheritedSettings(this),E)return this;return _}createCommand(D){return new Bu(D)}createHelp(){return Object.assign(new s2,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 Object.assign(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
16
+ - 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 i2(D,u)}argument(D,u,F,E){let C=this.createArgument(D,u);if(typeof F==="function")C.default(E).argParser(F);else C.default(F);return this.addArgument(C),this}arguments(D){return D.trim().split(/ +/).forEach((u)=>{this.argument(u)}),this}addArgument(D){let u=this.registeredArguments.slice(-1)[0];if(u&&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")return this._addImplicitHelpCommand=D,this;D=D??"help [command]";let[,F,E]=D.match(/([^ ]+) *(.*)/),C=u??"display help for command",B=this.createCommand(F);if(B.helpOption(!1),E)B.arguments(E);if(C)B.description(C);return this._addImplicitHelpCommand=!0,this._helpCommand=B,this}addHelpCommand(D,u){if(typeof D!=="object")return this.helpCommand(D,u),this;return this._addImplicitHelpCommand=!0,this._helpCommand=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 F=["preSubcommand","preAction","postAction"];if(!F.includes(D))throw Error(`Unexpected value for event passed to hook : '${D}'.
17
+ Expecting one of '${F.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,F){if(this._exitCallback)this._exitCallback(new Eu(D,u,F));j.exit(D)}action(D){let u=(F)=>{let E=this.registeredArguments.length,C=F.slice(0,E);if(this._storeOptionsAsProperties)C[E]=this;else C[E]=this.opts();return C.push(this),D.apply(this,C)};return this._actionHandler=u,this}createOption(D,u){return new C0(D,u)}_callParseArg(D,u,F,E){try{return D.parseArg(u,F)}catch(C){if(C.code==="commander.invalidArgument"){let B=`${E} ${C.message}`;this.error(B,{exitCode:C.exitCode,code:C.code})}throw C}}_registerOption(D){let u=D.short&&this._findOption(D.short)||D.long&&this._findOption(D.long);if(u){let F=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 '${F}'
18
+ - already used by option '${u.flags}'`)}this.options.push(D)}_registerCommand(D){let u=(E)=>{return[E.name()].concat(E.aliases())},F=u(D).find((E)=>this._findCommand(E));if(F){let E=u(this._findCommand(F)).join("|"),C=u(D).join("|");throw Error(`cannot add command '${C}' as already have command '${E}'`)}this.commands.push(D)}addOption(D){this._registerOption(D);let u=D.name(),F=D.attributeName();if(D.negate){let C=D.long.replace(/^--no-/,"--");if(!this._findOption(C))this.setOptionValueWithSource(F,D.defaultValue===void 0?!0:D.defaultValue,"default")}else if(D.defaultValue!==void 0)this.setOptionValueWithSource(F,D.defaultValue,"default");let E=(C,B,A)=>{if(C==null&&D.presetArg!==void 0)C=D.presetArg;let _=this.getOptionValue(F);if(C!==null&&D.parseArg)C=this._callParseArg(D,C,_,B);else if(C!==null&&D.variadic)C=D._concatValue(C,_);if(C==null)if(D.negate)C=!1;else if(D.isBoolean()||D.optional)C=!0;else C="";this.setOptionValueWithSource(F,C,A)};if(this.on("option:"+u,(C)=>{let B=`error: option '${D.flags}' argument '${C}' is invalid.`;E(C,B,"cli")}),D.envVar)this.on("optionEnv:"+u,(C)=>{let B=`error: option '${D.flags}' value '${C}' from env '${D.envVar}' is invalid.`;E(C,B,"env")});return this}_optionEx(D,u,F,E,C){if(typeof u==="object"&&u instanceof C0)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let B=this.createOption(u,F);if(B.makeOptionMandatory(!!D.mandatory),typeof E==="function")B.default(C).argParser(E);else if(E instanceof RegExp){let A=E;E=(_,z)=>{let q=A.exec(_);return q?q[0]:z},B.default(C).argParser(E)}else B.default(E);return this.addOption(B)}option(D,u,F,E){return this._optionEx({},D,u,F,E)}requiredOption(D,u,F,E){return this._optionEx({mandatory:!0},D,u,F,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,F){if(this._storeOptionsAsProperties)this[D]=u;else this._optionValues[D]=u;return this._optionValueSources[D]=F,this}getOptionValueSource(D){return this._optionValueSources[D]}getOptionValueSourceWithGlobals(D){let u;return this._getCommandAndAncestors().forEach((F)=>{if(F.getOptionValueSource(D)!==void 0)u=F.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(j.versions?.electron)u.from="electron";let E=j.execArgv??[];if(E.includes("-e")||E.includes("--eval")||E.includes("-p")||E.includes("--print"))u.from="eval"}if(D===void 0)D=j.argv;this.rawArgs=D.slice();let F;switch(u.from){case void 0:case"node":this._scriptPath=D[1],F=D.slice(2);break;case"electron":if(j.defaultApp)this._scriptPath=D[1],F=D.slice(2);else F=D.slice(1);break;case"user":F=D.slice(0);break;case"eval":F=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",F}parse(D,u){this._prepareForParse();let F=this._prepareUserArgs(D,u);return this._parseCommand([],F),this}async parseAsync(D,u){this._prepareForParse();let F=this._prepareUserArgs(D,u);return await this._parseCommand([],F),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.
19
+ - 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,F){if(OD.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",C=`'${D}' does not exist
20
+ - if '${F}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
21
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
22
+ - ${E}`;throw Error(C)}_executeSubCommand(D,u){u=u.slice();let F=!1,E=[".js",".ts",".tsx",".mjs",".cjs"];function C(q,$){let H=DD.resolve(q,$);if(OD.existsSync(H))return H;if(E.includes(DD.extname($)))return;let Z=E.find((X)=>OD.existsSync(`${H}${X}`));if(Z)return`${H}${Z}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let B=D._executableFile||`${this._name}-${D._name}`,A=this._executableDir||"";if(this._scriptPath){let q;try{q=OD.realpathSync(this._scriptPath)}catch{q=this._scriptPath}A=DD.resolve(DD.dirname(q),A)}if(A){let q=C(A,B);if(!q&&!D._executableFile&&this._scriptPath){let $=DD.basename(this._scriptPath,DD.extname(this._scriptPath));if($!==this._name)q=C(A,`${$}-${D._name}`)}B=q||B}F=E.includes(DD.extname(B));let _;if(j.platform!=="win32")if(F)u.unshift(B),u=A0(j.execArgv).concat(u),_=Fu.spawn(j.argv[0],u,{stdio:"inherit"});else _=Fu.spawn(B,u,{stdio:"inherit"});else this._checkForMissingExecutable(B,A,D._name),u.unshift(B),u=A0(j.execArgv).concat(u),_=Fu.spawn(j.execPath,u,{stdio:"inherit"});if(!_.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(($)=>{j.on($,()=>{if(_.killed===!1&&_.exitCode===null)_.kill($)})});let z=this._exitCallback;_.on("close",(q)=>{if(q=q??1,!z)j.exit(q);else z(new Eu(q,"commander.executeSubCommandAsync","(close)"))}),_.on("error",(q)=>{if(q.code==="ENOENT")this._checkForMissingExecutable(B,A,D._name);else if(q.code==="EACCES")throw Error(`'${B}' not executable`);if(!z)j.exit(1);else{let $=new Eu(1,"commander.executeSubCommandAsync","(error)");$.nestedError=q,z($)}}),this.runningCommand=_}_dispatchSubcommand(D,u,F){let E=this._findCommand(D);if(!E)this.help({error:!0});E._prepareForParse();let C;return C=this._chainOrCallSubCommandHook(C,E,"preSubcommand"),C=this._chainOrCall(C,()=>{if(E._executableHandler)this._executeSubCommand(E,u.concat(F));else return E._parseCommand(u,F)}),C}_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=(F,E,C)=>{let B=E;if(E!==null&&F.parseArg){let A=`error: command-argument value '${E}' is invalid for argument '${F.name()}'.`;B=this._callParseArg(F,E,C,A)}return B};this._checkNumberOfArguments();let u=[];this.registeredArguments.forEach((F,E)=>{let C=F.defaultValue;if(F.variadic){if(E<this.args.length){if(C=this.args.slice(E),F.parseArg)C=C.reduce((B,A)=>{return D(F,A,B)},F.defaultValue)}else if(C===void 0)C=[]}else if(E<this.args.length){if(C=this.args[E],F.parseArg)C=D(F,C,F.defaultValue)}u[E]=C}),this.processedArgs=u}_chainOrCall(D,u){if(D&&D.then&&typeof D.then==="function")return D.then(()=>u());return u()}_chainOrCallHooks(D,u){let F=D,E=[];if(this._getCommandAndAncestors().reverse().filter((C)=>C._lifeCycleHooks[u]!==void 0).forEach((C)=>{C._lifeCycleHooks[u].forEach((B)=>{E.push({hookedCommand:C,callback:B})})}),u==="postAction")E.reverse();return E.forEach((C)=>{F=this._chainOrCall(F,()=>{return C.callback(C.hookedCommand,this)})}),F}_chainOrCallSubCommandHook(D,u,F){let E=D;if(this._lifeCycleHooks[F]!==void 0)this._lifeCycleHooks[F].forEach((C)=>{E=this._chainOrCall(E,()=>{return C(this,u)})});return E}_parseCommand(D,u){let F=this.parseOptions(u);if(this._parseOptionsEnv(),this._parseOptionsImplied(),D=D.concat(F.operands),u=F.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(F.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let E=()=>{if(F.unknown.length>0)this.unknownOption(F.unknown[0])},C=`command:${this.name()}`;if(this._actionHandler){E(),this._processArguments();let B;if(B=this._chainOrCallHooks(B,"preAction"),B=this._chainOrCall(B,()=>this._actionHandler(this.processedArgs)),this.parent)B=this._chainOrCall(B,()=>{this.parent.emit(C,D,u)});return B=this._chainOrCallHooks(B,"postAction"),B}if(this.parent&&this.parent.listenerCount(C))E(),this._processArguments(),this.parent.emit(C,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((F)=>{let E=F.attributeName();if(this.getOptionValue(E)===void 0)return!1;return this.getOptionValueSource(E)!=="default"});D.filter((F)=>F.conflictsWith.length>0).forEach((F)=>{let E=D.find((C)=>F.conflictsWith.includes(C.attributeName()));if(E)this._conflictingOption(F,E)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((D)=>{D._checkForConflictingLocalOptions()})}parseOptions(D){let u=[],F=[],E=u,C=D.slice();function B(_){return _.length>1&&_[0]==="-"}let A=null;while(C.length){let _=C.shift();if(_==="--"){if(E===F)E.push(_);E.push(...C);break}if(A&&!B(_)){this.emit(`option:${A.name()}`,_);continue}if(A=null,B(_)){let z=this._findOption(_);if(z){if(z.required){let q=C.shift();if(q===void 0)this.optionMissingArgument(z);this.emit(`option:${z.name()}`,q)}else if(z.optional){let q=null;if(C.length>0&&!B(C[0]))q=C.shift();this.emit(`option:${z.name()}`,q)}else this.emit(`option:${z.name()}`);A=z.variadic?z:null;continue}}if(_.length>2&&_[0]==="-"&&_[1]!=="-"){let z=this._findOption(`-${_[1]}`);if(z){if(z.required||z.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${z.name()}`,_.slice(2));else this.emit(`option:${z.name()}`),C.unshift(`-${_.slice(2)}`);continue}}if(/^--[^=]+=/.test(_)){let z=_.indexOf("="),q=this._findOption(_.slice(0,z));if(q&&(q.required||q.optional)){this.emit(`option:${q.name()}`,_.slice(z+1));continue}}if(B(_))E=F;if((this._enablePositionalOptions||this._passThroughOptions)&&u.length===0&&F.length===0){if(this._findCommand(_)){if(u.push(_),C.length>0)F.push(...C);break}else if(this._getHelpCommand()&&_===this._getHelpCommand().name()){if(u.push(_),C.length>0)u.push(...C);break}else if(this._defaultCommandName){if(F.push(_),C.length>0)F.push(...C);break}}if(this._passThroughOptions){if(E.push(_),C.length>0)E.push(...C);break}E.push(_)}return{operands:u,unknown:F}}opts(){if(this._storeOptionsAsProperties){let D={},u=this.options.length;for(let F=0;F<u;F++){let E=this.options[F].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}
23
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
24
+ `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
25
+ `),this.outputHelp({error:!0});let F=u||{},E=F.exitCode||1,C=F.code||"commander.error";this._exit(E,C,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in j.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()}`,j.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new o2(this.options),u=(F)=>{return this.getOptionValue(F)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(F))};this.options.filter((F)=>F.implied!==void 0&&u(F.attributeName())&&D.valueFromOption(this.getOptionValue(F.attributeName()),F)).forEach((F)=>{Object.keys(F.implied).filter((E)=>!u(E)).forEach((E)=>{this.setOptionValueWithSource(E,F.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 F=(B)=>{let A=B.attributeName(),_=this.getOptionValue(A),z=this.options.find(($)=>$.negate&&A===$.attributeName()),q=this.options.find(($)=>!$.negate&&A===$.attributeName());if(z&&(z.presetArg===void 0&&_===!1||z.presetArg!==void 0&&_===z.presetArg))return z;return q||B},E=(B)=>{let A=F(B),_=A.attributeName();if(this.getOptionValueSource(_)==="env")return`environment variable '${A.envVar}'`;return`option '${A.flags}'`},C=`error: ${E(D)} cannot be used with ${E(u)}`;this.error(C,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let u="";if(D.startsWith("--")&&this._showSuggestionAfterError){let E=[],C=this;do{let B=C.createHelp().visibleOptions(C).filter((A)=>A.long).map((A)=>A.long);E=E.concat(B),C=C.parent}while(C&&!C._enablePositionalOptions);u=B0(D,E)}let F=`error: unknown option '${D}'${u}`;this.error(F,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let u=this.registeredArguments.length,F=u===1?"":"s",C=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${u} argument${F} but got ${D.length}.`;this.error(C,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],u="";if(this._showSuggestionAfterError){let E=[];this.createHelp().visibleCommands(this).forEach((C)=>{if(E.push(C.name()),C.alias())E.push(C.alias())}),u=B0(D,E)}let F=`error: unknown command '${D}'${u}`;this.error(F,{code:"commander.unknownCommand"})}version(D,u,F){if(D===void 0)return this._version;this._version=D,u=u||"-V, --version",F=F||"output the version number";let E=this.createOption(u,F);return this._versionOptionName=E.attributeName(),this._registerOption(E),this.on("option:"+E.name(),()=>{this._outputConfiguration.writeOut(`${D}
26
+ `),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 F=this.parent?._findCommand(D);if(F){let E=[F.name()].concat(F.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((F)=>{return n2(F)});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}nameFromFilename(D){return this._name=DD.basename(D,DD.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let u=this.createHelp(),F=this._getOutputContext(D);u.prepareContext({error:F.error,helpWidth:F.helpWidth,outputHasColors:F.hasColors});let E=u.formatHelp(this,u);if(F.hasColors)return E;return this._outputConfiguration.stripColor(E)}_getOutputContext(D){D=D||{};let u=!!D.error,F,E,C;if(u)F=(A)=>this._outputConfiguration.writeErr(A),E=this._outputConfiguration.getErrHasColors(),C=this._outputConfiguration.getErrHelpWidth();else F=(A)=>this._outputConfiguration.writeOut(A),E=this._outputConfiguration.getOutHasColors(),C=this._outputConfiguration.getOutHelpWidth();return{error:u,write:(A)=>{if(!E)A=this._outputConfiguration.stripColor(A);return F(A)},hasColors:E,helpWidth:C}}outputHelp(D){let u;if(typeof D==="function")u=D,D=void 0;let F=this._getOutputContext(D),E={error:F.error,write:F.write,command:this};this._getCommandAndAncestors().reverse().forEach((B)=>B.emit("beforeAllHelp",E)),this.emit("beforeHelp",E);let C=this.helpInformation({error:F.error});if(u){if(C=u(C),typeof C!=="string"&&!Buffer.isBuffer(C))throw Error("outputHelp callback must return a string or a Buffer")}if(F.write(C),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",E),this._getCommandAndAncestors().forEach((B)=>B.emit("afterAllHelp",E))}helpOption(D,u){if(typeof D==="boolean"){if(D)this._helpOption=this._helpOption??void 0;else this._helpOption=null;return this}return D=D??"-h, --help",u=u??"display help for command",this._helpOption=this.createOption(D,u),this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(D){return this._helpOption=D,this}help(D){this.outputHelp(D);let u=Number(j.exitCode??0);if(u===0&&D&&typeof D!=="function"&&D.error)u=1;this._exit(u,"commander.help","(outputHelp)")}addHelpText(D,u){let F=["beforeAll","before","after","afterAll"];if(!F.includes(D))throw Error(`Unexpected value for position to addHelpText.
27
+ Expecting one of '${F.join("', '")}'`);let E=`${D}Help`;return this.on(E,(C)=>{let B;if(typeof u==="function")B=u({error:C.error,command:C.command});else B=u;if(B)C.write(`${B}
28
+ `)}),this}_outputHelpIfRequested(D){let u=this._getHelpOption();if(u&&D.find((E)=>u.is(E)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function A0(D){return D.map((u)=>{if(!u.startsWith("--inspect"))return u;let F,E="127.0.0.1",C="9229",B;if((B=u.match(/^(--inspect(-brk)?)$/))!==null)F=B[1];else if((B=u.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(F=B[1],/^\d+$/.test(B[3]))C=B[3];else E=B[3];else if((B=u.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)F=B[1],E=B[3],C=B[4];if(F&&C!=="0")return`${F}=${E}:${parseInt(C)+1}`;return u})}function Cu(){if(j.env.NO_COLOR||j.env.FORCE_COLOR==="0"||j.env.FORCE_COLOR==="false")return!1;if(j.env.FORCE_COLOR||j.env.CLICOLOR_FORCE!==void 0)return!0;return}e2.Command=Bu;e2.useColor=Cu});var _u=W((C3)=>{var{Argument:$0}=PD(),{Command:Au}=_0(),{CommanderError:F3,InvalidArgumentError:q0}=YD(),{Help:E3}=Du(),{Option:z0}=uu();C3.program=new Au;C3.createCommand=(D)=>new Au(D);C3.createOption=(D,u)=>new z0(D,u);C3.createArgument=(D,u)=>new $0(D,u);C3.Command=Au;C3.Option=z0;C3.Argument=$0;C3.Help=E3;C3.CommanderError=F3;C3.InvalidArgumentError=q0;C3.InvalidOptionArgumentError=q0});var hD=W((X6,O0)=>{var Yu=[],P0=0,x=(D,u)=>{if(P0>=u)Yu.push(D)};x.WARN=1;x.INFO=2;x.DEBUG=3;x.reset=()=>{Yu=[]};x.setDebugLevel=(D)=>{P0=D};x.warn=(D)=>x(D,x.WARN);x.info=(D)=>x(D,x.INFO);x.debug=(D)=>x(D,x.DEBUG);x.debugMessages=()=>Yu;O0.exports=x});var f0=W((G6,S0)=>{S0.exports=({onlyFirst:D=!1}={})=>{let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}});var v0=W((J6,b0)=>{var p3=f0();b0.exports=(D)=>typeof D==="string"?D.replace(p3(),""):D});var k0=W((Y6,Ku)=>{var y0=(D)=>{if(Number.isNaN(D))return!1;if(D>=4352&&(D<=4447||D===9001||D===9002||11904<=D&&D<=12871&&D!==12351||12880<=D&&D<=19903||19968<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65131||65281<=D&&D<=65376||65504<=D&&D<=65510||110592<=D&&D<=110593||127488<=D&&D<=127569||131072<=D&&D<=262141))return!0;return!1};Ku.exports=y0;Ku.exports.default=y0});var h0=W((K6,x0)=>{x0.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var m0=W((M6,Mu)=>{var l3=v0(),a3=k0(),r3=h0(),g0=(D)=>{if(typeof D!=="string"||D.length===0)return 0;if(D=l3(D),D.length===0)return 0;D=D.replace(r3()," ");let u=0;for(let F=0;F<D.length;F++){let E=D.codePointAt(F);if(E<=31||E>=127&&E<=159)continue;if(E>=768&&E<=879)continue;if(E>65535)F++;u+=a3(E)?2:1}return u};Mu.exports=g0;Mu.exports.default=g0});var Vu=W((V6,l0)=>{var c0=m0();function gD(D){return D?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function t(D){let u=gD();return(""+D).replace(u,"").split(`
29
+ `).reduce(function(C,B){return c0(B)>C?c0(B):C},0)}function UD(D,u){return Array(u+1).join(D)}function i3(D,u,F,E){let C=t(D);if(u+1>=C){let B=u-C;switch(E){case"right":{D=UD(F,B)+D;break}case"center":{let A=Math.ceil(B/2),_=B-A;D=UD(F,_)+D+UD(F,A);break}default:{D=D+UD(F,B);break}}}return D}var XD={};function ND(D,u,F){u="\x1B["+u+"m",F="\x1B["+F+"m",XD[u]={set:D,to:!0},XD[F]={set:D,to:!1},XD[D]={on:u,off:F}}ND("bold",1,22);ND("italics",3,23);ND("underline",4,24);ND("inverse",7,27);ND("strikethrough",9,29);function d0(D,u){let F=u[1]?parseInt(u[1].split(";")[0]):0;if(F>=30&&F<=39||F>=90&&F<=97){D.lastForegroundAdded=u[0];return}if(F>=40&&F<=49||F>=100&&F<=107){D.lastBackgroundAdded=u[0];return}if(F===0){for(let C in D)if(Object.prototype.hasOwnProperty.call(D,C))delete D[C];return}let E=XD[u[0]];if(E)D[E.set]=E.to}function n3(D){let u=gD(!0),F=u.exec(D),E={};while(F!==null)d0(E,F),F=u.exec(D);return E}function p0(D,u){let{lastBackgroundAdded:F,lastForegroundAdded:E}=D;if(delete D.lastBackgroundAdded,delete D.lastForegroundAdded,Object.keys(D).forEach(function(C){if(D[C])u+=XD[C].off}),F&&F!="\x1B[49m")u+="\x1B[49m";if(E&&E!="\x1B[39m")u+="\x1B[39m";return u}function s3(D,u){let{lastBackgroundAdded:F,lastForegroundAdded:E}=D;if(delete D.lastBackgroundAdded,delete D.lastForegroundAdded,Object.keys(D).forEach(function(C){if(D[C])u=XD[C].on+u}),F&&F!="\x1B[49m")u=F+u;if(E&&E!="\x1B[39m")u=E+u;return u}function t3(D,u){if(D.length===t(D))return D.substr(0,u);while(t(D)>u)D=D.slice(0,-1);return D}function o3(D,u){let F=gD(!0),E=D.split(gD()),C=0,B=0,A="",_,z={};while(B<u){_=F.exec(D);let q=E[C];if(C++,B+t(q)>u)q=t3(q,u-B);if(A+=q,B+=t(q),B<u){if(!_)break;A+=_[0],d0(z,_)}}return p0(z,A)}function e3(D,u,F){if(F=F||"…",t(D)<=u)return D;u-=t(F);let C=o3(D,u);C+=F;let B="\x1B]8;;\x07";if(D.includes(B)&&!C.includes(B))C+=B;return C}function D8(){return{chars:{top:"─","top-mid":"┬","top-left":"┌","top-right":"┐",bottom:"─","bottom-mid":"┴","bottom-left":"└","bottom-right":"┘",left:"│","left-mid":"├",mid:"─","mid-mid":"┼",right:"│","right-mid":"┤",middle:"│"},truncate:"…",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function u8(D,u){D=D||{},u=u||D8();let F=Object.assign({},u,D);return F.chars=Object.assign({},u.chars,D.chars),F.style=Object.assign({},u.style,D.style),F}function F8(D,u){let F=[],E=u.split(/(\s+)/g),C=[],B=0,A;for(let _=0;_<E.length;_+=2){let z=E[_],q=B+t(z);if(B>0&&A)q+=A.length;if(q>D){if(B!==0)F.push(C.join(""));C=[z],B=t(z)}else C.push(A||"",z),B=q;A=E[_+1]}if(B)F.push(C.join(""));return F}function E8(D,u){let F=[],E="";function C(A,_){if(E.length&&_)E+=_;E+=A;while(E.length>D)F.push(E.slice(0,D)),E=E.slice(D)}let B=u.split(/(\s+)/g);for(let A=0;A<B.length;A+=2)C(B[A],A&&B[A-1]);if(E.length)F.push(E);return F}function C8(D,u,F=!0){let E=[];u=u.split(`
30
+ `);let C=F?F8:E8;for(let B=0;B<u.length;B++)E.push.apply(E,C(D,u[B]));return E}function B8(D){let u={},F=[];for(let E=0;E<D.length;E++){let C=s3(u,D[E]);u=n3(C);let B=Object.assign({},u);F.push(p0(B,C))}return F}function A8(D,u){return["\x1B]","8",";",";",D||u,"\x07",u,"\x1B]","8",";",";","\x07"].join("")}l0.exports={strlen:t,repeat:UD,pad:i3,truncate:e3,mergeOptions:u8,wordWrap:C8,colorizeLines:B8,hyperlink:A8}});var n0=W((R6,i0)=>{var r0={};i0.exports=r0;var a0={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(a0).forEach(function(D){var u=a0[D],F=r0[D]=[];F.open="\x1B["+u[0]+"m",F.close="\x1B["+u[1]+"m"})});var t0=W((U6,s0)=>{s0.exports=function(D,u){u=u||process.argv;var F=u.indexOf("--"),E=/^-{1,2}/.test(D)?"":"--",C=u.indexOf(E+D);return C!==-1&&(F===-1?!0:C<F)}});var e0=W((N6,o0)=>{var _8=FD("os"),r=t0(),g=process.env,GD=void 0;if(r("no-color")||r("no-colors")||r("color=false"))GD=!1;else if(r("color")||r("colors")||r("color=true")||r("color=always"))GD=!0;if("FORCE_COLOR"in g)GD=g.FORCE_COLOR.length===0||parseInt(g.FORCE_COLOR,10)!==0;function $8(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function q8(D){if(GD===!1)return 0;if(r("color=16m")||r("color=full")||r("color=truecolor"))return 3;if(r("color=256"))return 2;if(D&&!D.isTTY&&GD!==!0)return 0;var u=GD?1:0;if(process.platform==="win32"){var F=_8.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(F[0])>=10&&Number(F[2])>=10586)return Number(F[2])>=14931?3:2;return 1}if("CI"in g){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(C){return C in g})||g.CI_NAME==="codeship")return 1;return u}if("TEAMCITY_VERSION"in g)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(g.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in g){var E=parseInt((g.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(g.TERM_PROGRAM){case"iTerm.app":return E>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(g.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(g.TERM))return 1;if("COLORTERM"in g)return 1;if(g.TERM==="dumb")return u;return u}function Ru(D){var u=q8(D);return $8(u)}o0.exports={supportsColor:Ru,stdout:Ru(process.stdout),stderr:Ru(process.stderr)}});var uF=W((W6,DF)=>{DF.exports=function(u,F){var E="";u=u||"Run the trap, drop the bass",u=u.split("");var C={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return u.forEach(function(B){B=B.toLowerCase();var A=C[B]||[" "],_=Math.floor(Math.random()*A.length);if(typeof C[B]<"u")E+=C[B][_];else E+=B}),E}});var EF=W((j6,FF)=>{FF.exports=function(u,F){u=u||" he is here ";var E={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},C=[].concat(E.up,E.down,E.mid);function B(z){var q=Math.floor(Math.random()*z);return q}function A(z){var q=!1;return C.filter(function($){q=$===z}),q}function _(z,q){var $="",H,Z;q=q||{},q.up=typeof q.up<"u"?q.up:!0,q.mid=typeof q.mid<"u"?q.mid:!0,q.down=typeof q.down<"u"?q.down:!0,q.size=typeof q.size<"u"?q.size:"maxi",z=z.split("");for(Z in z){if(A(Z))continue;switch($=$+z[Z],H={up:0,down:0,mid:0},q.size){case"mini":H.up=B(8),H.mid=B(2),H.down=B(8);break;case"maxi":H.up=B(16)+3,H.mid=B(4)+1,H.down=B(64)+3;break;default:H.up=B(8)+1,H.mid=B(6)/2,H.down=B(8)+1;break}var X=["up","mid","down"];for(var Q in X){var G=X[Q];for(var Y=0;Y<=H[G];Y++)if(q[G])$=$+E[G][B(E[G].length)]}}return $}return _(u,F)}});var BF=W((L6,CF)=>{CF.exports=function(D){return function(u,F,E){if(u===" ")return u;switch(F%3){case 0:return D.red(u);case 1:return D.white(u);case 2:return D.blue(u)}}}});var _F=W((T6,AF)=>{AF.exports=function(D){return function(u,F,E){return F%2===0?u:D.inverse(u)}}});var qF=W((I6,$F)=>{$F.exports=function(D){var u=["red","yellow","green","blue","magenta"];return function(F,E,C){if(F===" ")return F;else return D[u[E++%u.length]](F)}}});var ZF=W((w6,zF)=>{zF.exports=function(D){var u=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(F,E,C){return F===" "?F:D[u[Math.round(Math.random()*(u.length-2))]](F)}}});var JF=W((O6,GF)=>{var N={};GF.exports=N;N.themes={};var z8=FD("util"),BD=N.styles=n0(),HF=Object.defineProperties,Z8=new RegExp(/[\r\n]+/g);N.supportsColor=e0().supportsColor;if(typeof N.enabled>"u")N.enabled=N.supportsColor()!==!1;N.enable=function(){N.enabled=!0};N.disable=function(){N.enabled=!1};N.stripColors=N.strip=function(D){return(""+D).replace(/\x1B\[\d+m/g,"")};var P6=N.stylize=function(u,F){if(!N.enabled)return u+"";var E=BD[F];if(!E&&F in N)return N[F](u);return E.open+u+E.close},H8=/[|\\{}()[\]^$+*?.]/g,Q8=function(D){if(typeof D!=="string")throw TypeError("Expected a string");return D.replace(H8,"\\$&")};function QF(D){var u=function F(){return G8.apply(F,arguments)};return u._styles=D,u.__proto__=X8,u}var XF=function(){var D={};return BD.grey=BD.gray,Object.keys(BD).forEach(function(u){BD[u].closeRe=new RegExp(Q8(BD[u].close),"g"),D[u]={get:function(){return QF(this._styles.concat(u))}}}),D}(),X8=HF(function(){},XF);function G8(){var D=Array.prototype.slice.call(arguments),u=D.map(function(A){if(A!=null&&A.constructor===String)return A;else return z8.inspect(A)}).join(" ");if(!N.enabled||!u)return u;var F=u.indexOf(`
31
+ `)!=-1,E=this._styles,C=E.length;while(C--){var B=BD[E[C]];if(u=B.open+u.replace(B.closeRe,B.open)+B.close,F)u=u.replace(Z8,function(A){return B.close+A+B.open})}return u}N.setTheme=function(D){if(typeof D==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var u in D)(function(F){N[F]=function(E){if(typeof D[F]==="object"){var C=E;for(var B in D[F])C=N[D[F][B]](C);return C}return N[D[F]](E)}})(u)};function J8(){var D={};return Object.keys(XF).forEach(function(u){D[u]={get:function(){return QF([u])}}}),D}var Y8=function(u,F){var E=F.split("");return E=E.map(u),E.join("")};N.trap=uF();N.zalgo=EF();N.maps={};N.maps.america=BF()(N);N.maps.zebra=_F()(N);N.maps.rainbow=qF()(N);N.maps.random=ZF()(N);for(Uu in N.maps)(function(D){N[D]=function(u){return Y8(N.maps[D],u)}})(Uu);var Uu;HF(N,J8())});var KF=W((S6,YF)=>{var K8=JF();YF.exports=K8});var UF=W((f6,dD)=>{var{info:M8,debug:RF}=hD(),c=Vu();class WD{constructor(D){this.setOptions(D),this.x=null,this.y=null}setOptions(D){if(["boolean","number","bigint","string"].indexOf(typeof D)!==-1)D={content:""+D};D=D||{},this.options=D;let u=D.content;if(["boolean","number","bigint","string"].indexOf(typeof u)!==-1)this.content=String(u);else if(!u)this.content=this.options.href||"";else throw Error("Content needs to be a primitive, got: "+typeof u);if(this.colSpan=D.colSpan||1,this.rowSpan=D.rowSpan||1,this.options.href)Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(D,u){this.cells=u;let F=this.options.chars||{},E=D.chars,C=this.chars={};R8.forEach(function(_){Nu(F,E,_,C)}),this.truncate=this.options.truncate||D.truncate;let B=this.options.style=this.options.style||{},A=D.style;Nu(B,A,"padding-left",this),Nu(B,A,"padding-right",this),this.head=B.head||A.head,this.border=B.border||A.border,this.fixedWidth=D.colWidths[this.x],this.lines=this.computeLines(D),this.desiredWidth=c.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(D){let u=D.wordWrap||D.textWrap,{wordWrap:F=u}=this.options;if(this.fixedWidth&&F){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let B=1;while(B<this.colSpan)this.fixedWidth+=D.colWidths[this.x+B],B++}let{wrapOnWordBoundary:E=!0}=D,{wrapOnWordBoundary:C=E}=this.options;return this.wrapLines(c.wordWrap(this.fixedWidth,this.content,C))}return this.wrapLines(this.content.split(`
32
+ `))}wrapLines(D){let u=c.colorizeLines(D);if(this.href)return u.map((F)=>c.hyperlink(this.href,F));return u}init(D){let u=this.x,F=this.y;this.widths=D.colWidths.slice(u,u+this.colSpan),this.heights=D.rowHeights.slice(F,F+this.rowSpan),this.width=this.widths.reduce(VF,-1),this.height=this.heights.reduce(VF,-1),this.hAlign=this.options.hAlign||D.colAligns[u],this.vAlign=this.options.vAlign||D.rowAligns[F],this.drawRight=u+this.colSpan==D.colWidths.length}draw(D,u){if(D=="top")return this.drawTop(this.drawRight);if(D=="bottom")return this.drawBottom(this.drawRight);let F=c.truncate(this.content,10,this.truncate);if(!D)M8(`${this.y}-${this.x}: ${this.rowSpan-D}x${this.colSpan} Cell ${F}`);let E=Math.max(this.height-this.lines.length,0),C;switch(this.vAlign){case"center":C=Math.ceil(E/2);break;case"bottom":C=E;break;default:C=0}if(D<C||D>=C+this.lines.length)return this.drawEmpty(this.drawRight,u);let B=this.lines.length>this.height&&D+1>=this.height;return this.drawLine(D-C,this.drawRight,B,u)}drawTop(D){let u=[];if(this.cells)this.widths.forEach(function(F,E){u.push(this._topLeftChar(E)),u.push(c.repeat(this.chars[this.y==0?"top":"mid"],F))},this);else u.push(this._topLeftChar(0)),u.push(c.repeat(this.chars[this.y==0?"top":"mid"],this.width));if(D)u.push(this.chars[this.y==0?"topRight":"rightMid"]);return this.wrapWithStyleColors("border",u.join(""))}_topLeftChar(D){let u=this.x+D,F;if(this.y==0)F=u==0?"topLeft":D==0?"topMid":"top";else if(u==0)F="leftMid";else if(F=D==0?"midMid":"bottomMid",this.cells){if(this.cells[this.y-1][u]instanceof WD.ColSpanCell)F=D==0?"topMid":"mid";if(D==0){let C=1;while(this.cells[this.y][u-C]instanceof WD.ColSpanCell)C++;if(this.cells[this.y][u-C]instanceof WD.RowSpanCell)F="leftMid"}}return this.chars[F]}wrapWithStyleColors(D,u){if(this[D]&&this[D].length)try{let F=KF();for(let E=this[D].length-1;E>=0;E--)F=F[this[D][E]];return F(u)}catch(F){return u}else return u}drawLine(D,u,F,E){let C=this.chars[this.x==0?"left":"middle"];if(this.x&&E&&this.cells){let H=this.cells[this.y+E][this.x-1];while(H instanceof mD)H=this.cells[H.y][H.x-1];if(!(H instanceof cD))C=this.chars.rightMid}let B=c.repeat(" ",this.paddingLeft),A=u?this.chars.right:"",_=c.repeat(" ",this.paddingRight),z=this.lines[D],q=this.width-(this.paddingLeft+this.paddingRight);if(F)z+=this.truncate||"…";let $=c.truncate(z,q,this.truncate);return $=c.pad($,q," ",this.hAlign),$=B+$+_,this.stylizeLine(C,$,A)}stylizeLine(D,u,F){if(D=this.wrapWithStyleColors("border",D),F=this.wrapWithStyleColors("border",F),this.y===0)u=this.wrapWithStyleColors("head",u);return D+u+F}drawBottom(D){let u=this.chars[this.x==0?"bottomLeft":"bottomMid"],F=c.repeat(this.chars.bottom,this.width),E=D?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",u+F+E)}drawEmpty(D,u){let F=this.chars[this.x==0?"left":"middle"];if(this.x&&u&&this.cells){let B=this.cells[this.y+u][this.x-1];while(B instanceof mD)B=this.cells[B.y][B.x-1];if(!(B instanceof cD))F=this.chars.rightMid}let E=D?this.chars.right:"",C=c.repeat(" ",this.width);return this.stylizeLine(F,C,E)}}class mD{constructor(){}draw(D){if(typeof D==="number")RF(`${this.y}-${this.x}: 1x1 ColSpanCell`);return""}init(){}mergeTableOptions(){}}class cD{constructor(D){this.originalCell=D}init(D){let u=this.y,F=this.originalCell.y;this.cellOffset=u-F,this.offset=V8(D.rowHeights,F,this.cellOffset)}draw(D){if(D=="top")return this.originalCell.draw(this.offset,this.cellOffset);if(D=="bottom")return this.originalCell.draw("bottom");return RF(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+D)}mergeTableOptions(){}}function MF(...D){return D.filter((u)=>u!==void 0&&u!==null).shift()}function Nu(D,u,F,E){let C=F.split("-");if(C.length>1)C[1]=C[1].charAt(0).toUpperCase()+C[1].substr(1),C=C.join(""),E[C]=MF(D[C],D[F],u[C],u[F]);else E[F]=MF(D[F],u[F])}function V8(D,u,F){let E=D[u];for(let C=1;C<F;C++)E+=1+D[u+C];return E}function VF(D,u){return D+u+1}var R8=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];dD.exports=WD;dD.exports.ColSpanCell=mD;dD.exports.RowSpanCell=cD});var jF=W((b6,WF)=>{var{warn:U8,debug:N8}=hD(),Wu=UF(),{ColSpanCell:W8,RowSpanCell:j8}=Wu;(function(){function D(X,Q){if(X[Q]>0)return D(X,Q+1);return Q}function u(X){let Q={};X.forEach(function(G,Y){let M=0;G.forEach(function(K){K.y=Y,K.x=Y?D(Q,M):M;let R=K.rowSpan||1,V=K.colSpan||1;if(R>1)for(let U=0;U<V;U++)Q[K.x+U]=R;M=K.x+V}),Object.keys(Q).forEach((K)=>{if(Q[K]--,Q[K]<1)delete Q[K]})})}function F(X){let Q=0;return X.forEach(function(G){G.forEach(function(Y){Q=Math.max(Q,Y.x+(Y.colSpan||1))})}),Q}function E(X){return X.length}function C(X,Q){let G=X.y,Y=X.y-1+(X.rowSpan||1),M=Q.y,K=Q.y-1+(Q.rowSpan||1),R=!(G>K||M>Y),V=X.x,U=X.x-1+(X.colSpan||1),m=Q.x,f=Q.x-1+(Q.colSpan||1),h=!(V>f||m>U);return R&&h}function B(X,Q,G){let Y=Math.min(X.length-1,G),M={x:Q,y:G};for(let K=0;K<=Y;K++){let R=X[K];for(let V=0;V<R.length;V++)if(C(M,R[V]))return!0}return!1}function A(X,Q,G,Y){for(let M=G;M<Y;M++)if(B(X,M,Q))return!1;return!0}function _(X){X.forEach(function(Q,G){Q.forEach(function(Y){for(let M=1;M<Y.rowSpan;M++){let K=new j8(Y);K.x=Y.x,K.y=Y.y+M,K.colSpan=Y.colSpan,q(K,X[G+M])}})})}function z(X){for(let Q=X.length-1;Q>=0;Q--){let G=X[Q];for(let Y=0;Y<G.length;Y++){let M=G[Y];for(let K=1;K<M.colSpan;K++){let R=new W8;R.x=M.x+K,R.y=M.y,G.splice(Y+1,0,R)}}}}function q(X,Q){let G=0;while(G<Q.length&&Q[G].x<X.x)G++;Q.splice(G,0,X)}function $(X){let Q=E(X),G=F(X);N8(`Max rows: ${Q}; Max cols: ${G}`);for(let Y=0;Y<Q;Y++)for(let M=0;M<G;M++)if(!B(X,M,Y)){let K={x:M,y:Y,colSpan:1,rowSpan:1};M++;while(M<G&&!B(X,M,Y))K.colSpan++,M++;let R=Y+1;while(R<Q&&A(X,R,K.x,K.x+K.colSpan))K.rowSpan++,R++;let V=new Wu(K);V.x=K.x,V.y=K.y,U8(`Missing cell at ${V.y}-${V.x}.`),q(V,X[Y])}}function H(X){return X.map(function(Q){if(!Array.isArray(Q)){let G=Object.keys(Q)[0];if(Q=Q[G],Array.isArray(Q))Q=Q.slice(),Q.unshift(G);else Q=[G,Q]}return Q.map(function(G){return new Wu(G)})})}function Z(X){let Q=H(X);return u(Q),$(Q),_(Q),z(Q),Q}WF.exports={makeTableLayout:Z,layoutTable:u,addRowSpanCells:_,maxWidth:F,fillInTable:$,computeWidths:NF("colSpan","desiredWidth","x",1),computeHeights:NF("rowSpan","desiredHeight","y",1)}})();function NF(D,u,F,E){return function(C,B){let A=[],_=[],z={};B.forEach(function(q){q.forEach(function($){if(($[D]||1)>1)_.push($);else A[$[F]]=Math.max(A[$[F]]||0,$[u]||0,E)})}),C.forEach(function(q,$){if(typeof q==="number")A[$]=q});for(let q=_.length-1;q>=0;q--){let $=_[q],H=$[D],Z=$[F],X=A[Z],Q=typeof C[Z]==="number"?0:1;if(typeof X==="number"){for(let G=1;G<H;G++)if(X+=1+A[Z+G],typeof C[Z+G]!=="number")Q++}else if(X=u==="desiredWidth"?$.desiredWidth-1:1,!z[Z]||z[Z]<X)z[Z]=X;if($[u]>X){let G=0;while(Q>0&&$[u]>X){if(typeof C[Z+G]!=="number"){let Y=Math.round(($[u]-X)/Q);X+=Y,A[Z+G]+=Y,Q--}G++}}}Object.assign(C,A,z);for(let q=0;q<C.length;q++)C[q]=Math.max(E,C[q]||0)}}});var TF=W((v6,LF)=>{var uD=hD(),L8=Vu(),ju=jF();class Tu extends Array{constructor(D){super();let u=L8.mergeOptions(D);if(Object.defineProperty(this,"options",{value:u,enumerable:u.debug}),u.debug){switch(typeof u.debug){case"boolean":uD.setDebugLevel(uD.WARN);break;case"number":uD.setDebugLevel(u.debug);break;case"string":uD.setDebugLevel(parseInt(u.debug,10));break;default:uD.setDebugLevel(uD.WARN),uD.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof u.debug}`)}Object.defineProperty(this,"messages",{get(){return uD.debugMessages()}})}}toString(){let D=this,u=this.options.head&&this.options.head.length;if(u){if(D=[this.options.head],this.length)D.push.apply(D,this)}else this.options.style.head=[];let F=ju.makeTableLayout(D);F.forEach(function(C){C.forEach(function(B){B.mergeTableOptions(this.options,F)},this)},this),ju.computeWidths(this.options.colWidths,F),ju.computeHeights(this.options.rowHeights,F),F.forEach(function(C){C.forEach(function(B){B.init(this.options)},this)},this);let E=[];for(let C=0;C<F.length;C++){let B=F[C],A=this.options.rowHeights[C];if(C===0||!this.options.style.compact||C==1&&u)Lu(B,"top",E);for(let _=0;_<A;_++)Lu(B,_,E);if(C+1==F.length)Lu(B,"bottom",E)}return E.join(`
33
+ `)}get width(){return this.toString().split(`
34
+ `)[0].length}}Tu.reset=()=>uD.reset();function Lu(D,u,F){let E=[];D.forEach(function(B){E.push(B.draw(u))});let C=E.join("");if(C.length)F.push(C)}LF.exports=Tu});var kF=W((t6,k8)=>{k8.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},dwarfFortress:{interval:80,frames:[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}});var bu=W((o6,hF)=>{var iD=Object.assign({},kF()),xF=Object.keys(iD);Object.defineProperty(iD,"random",{get(){let D=Math.floor(Math.random()*xF.length),u=xF[D];return iD[u]}});hF.exports=iD});var lF=W((ZC,pF)=>{pF.exports=()=>{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-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}});var Z0=CD(_u(),1),{program:UE,createCommand:NE,createArgument:WE,createOption:jE,CommanderError:LE,InvalidArgumentError:TE,InvalidOptionArgumentError:IE,Command:H0,Argument:wE,Option:PE,Help:OE}=Z0.default;var Q0=(D=0)=>(u)=>`\x1B[${u+D}m`,X0=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,G0=(D=0)=>(u,F,E)=>`\x1B[${38+D};2;${u};${F};${E}m`,I={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]}},fE=Object.keys(I.modifier),J3=Object.keys(I.color),Y3=Object.keys(I.bgColor),bE=[...J3,...Y3];function K3(){let D=new Map;for(let[u,F]of Object.entries(I)){for(let[E,C]of Object.entries(F))I[E]={open:`\x1B[${C[0]}m`,close:`\x1B[${C[1]}m`},F[E]=I[E],D.set(C[0],C[1]);Object.defineProperty(I,u,{value:F,enumerable:!1})}return Object.defineProperty(I,"codes",{value:D,enumerable:!1}),I.color.close="\x1B[39m",I.bgColor.close="\x1B[49m",I.color.ansi=Q0(),I.color.ansi256=X0(),I.color.ansi16m=G0(),I.bgColor.ansi=Q0(10),I.bgColor.ansi256=X0(10),I.bgColor.ansi16m=G0(10),Object.defineProperties(I,{rgbToAnsi256:{value(u,F,E){if(u===F&&F===E){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(E/255*5)},enumerable:!1},hexToRgb:{value(u){let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[E]=F;if(E.length===3)E=[...E].map((B)=>B+B).join("");let C=Number.parseInt(E,16);return[C>>16&255,C>>8&255,C&255]},enumerable:!1},hexToAnsi256:{value:(u)=>I.rgbToAnsi256(...I.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,E,C;if(u>=232)F=((u-232)*10+8)/255,E=F,C=F;else{u-=16;let _=u%36;F=Math.floor(u/36)/5,E=Math.floor(_/6)/5,C=_%6/5}let B=Math.max(F,E,C)*2;if(B===0)return 30;let A=30+(Math.round(C)<<2|Math.round(E)<<1|Math.round(F));if(B===2)A+=60;return A},enumerable:!1},rgbToAnsi:{value:(u,F,E)=>I.ansi256ToAnsi(I.rgbToAnsi256(u,F,E)),enumerable:!1},hexToAnsi:{value:(u)=>I.ansi256ToAnsi(I.hexToAnsi256(u)),enumerable:!1}}),I}var M3=K3(),P=M3;import $u from"node:process";import V3 from"node:os";import J0 from"node:tty";function p(D,u=globalThis.Deno?globalThis.Deno.args:$u.argv){let F=D.startsWith("-")?"":D.length===1?"-":"--",E=u.indexOf(F+D),C=u.indexOf("--");return E!==-1&&(C===-1||E<C)}var{env:w}=$u,SD;if(p("no-color")||p("no-colors")||p("color=false")||p("color=never"))SD=0;else if(p("color")||p("colors")||p("color=true")||p("color=always"))SD=1;function R3(){if("FORCE_COLOR"in w){if(w.FORCE_COLOR==="true")return 1;if(w.FORCE_COLOR==="false")return 0;return w.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(w.FORCE_COLOR,10),3)}}function U3(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function N3(D,{streamIsTTY:u,sniffFlags:F=!0}={}){let E=R3();if(E!==void 0)SD=E;let C=F?SD:E;if(C===0)return 0;if(F){if(p("color=16m")||p("color=full")||p("color=truecolor"))return 3;if(p("color=256"))return 2}if("TF_BUILD"in w&&"AGENT_NAME"in w)return 1;if(D&&!u&&C===void 0)return 0;let B=C||0;if(w.TERM==="dumb")return B;if($u.platform==="win32"){let A=V3.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in w){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((A)=>(A in w)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in w))||w.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in w)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(w.TEAMCITY_VERSION)?1:0;if(w.COLORTERM==="truecolor")return 3;if(w.TERM==="xterm-kitty")return 3;if(w.TERM==="xterm-ghostty")return 3;if(w.TERM==="wezterm")return 3;if("TERM_PROGRAM"in w){let A=Number.parseInt((w.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(w.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(w.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(w.TERM))return 1;if("COLORTERM"in w)return 1;return B}function Y0(D,u={}){let F=N3(D,{streamIsTTY:D&&D.isTTY,...u});return U3(F)}var W3={stdout:Y0({isTTY:J0.isatty(1)}),stderr:Y0({isTTY:J0.isatty(2)})},fD=W3;function bD(D,u,F){let E=D.indexOf(u);if(E===-1)return D;let C=u.length,B=0,A="";do A+=D.slice(B,E)+u+F,B=E+C,E=D.indexOf(u,B);while(E!==-1);return A+=D.slice(B),A}function vD(D,u,F,E){let C=0,B="";do{let A=D[E-1]==="\r";B+=D.slice(C,A?E-1:E)+u+(A?`\r
35
+ `:`
36
+ `)+F,C=E+1,E=D.indexOf(`
37
+ `,C)}while(E!==-1);return B+=D.slice(C),B}var{stdout:K0,stderr:M0}=fD,qu=Symbol("GENERATOR"),zD=Symbol("STYLER"),KD=Symbol("IS_EMPTY"),V0=["ansi","ansi","ansi256","ansi16m"],ZD=Object.create(null),j3=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let F=K0?K0.level:0;D.level=u.level===void 0?F:u.level};var L3=(D)=>{let u=(...F)=>F.join(" ");return j3(u,D),Object.setPrototypeOf(u,MD.prototype),u};function MD(D){return L3(D)}Object.setPrototypeOf(MD.prototype,Function.prototype);for(let[D,u]of Object.entries(P))ZD[D]={get(){let F=yD(this,Zu(u.open,u.close,this[zD]),this[KD]);return Object.defineProperty(this,D,{value:F}),F}};ZD.visible={get(){let D=yD(this,this[zD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var zu=(D,u,F,...E)=>{if(D==="rgb"){if(u==="ansi16m")return P[F].ansi16m(...E);if(u==="ansi256")return P[F].ansi256(P.rgbToAnsi256(...E));return P[F].ansi(P.rgbToAnsi(...E))}if(D==="hex")return zu("rgb",u,F,...P.hexToRgb(...E));return P[F][D](...E)},T3=["rgb","hex","ansi256"];for(let D of T3){ZD[D]={get(){let{level:F}=this;return function(...E){let C=Zu(zu(D,V0[F],"color",...E),P.color.close,this[zD]);return yD(this,C,this[KD])}}};let u="bg"+D[0].toUpperCase()+D.slice(1);ZD[u]={get(){let{level:F}=this;return function(...E){let C=Zu(zu(D,V0[F],"bgColor",...E),P.bgColor.close,this[zD]);return yD(this,C,this[KD])}}}}var I3=Object.defineProperties(()=>{},{...ZD,level:{enumerable:!0,get(){return this[qu].level},set(D){this[qu].level=D}}}),Zu=(D,u,F)=>{let E,C;if(F===void 0)E=D,C=u;else E=F.openAll+D,C=u+F.closeAll;return{open:D,close:u,openAll:E,closeAll:C,parent:F}},yD=(D,u,F)=>{let E=(...C)=>w3(E,C.length===1?""+C[0]:C.join(" "));return Object.setPrototypeOf(E,I3),E[qu]=D,E[zD]=u,E[KD]=F,E},w3=(D,u)=>{if(D.level<=0||!u)return D[KD]?"":u;let F=D[zD];if(F===void 0)return u;let{openAll:E,closeAll:C}=F;if(u.includes("\x1B"))while(F!==void 0)u=bD(u,F.close,F.open),F=F.parent;let B=u.indexOf(`
38
+ `);if(B!==-1)u=vD(u,C,E,B);return E+u+C};Object.defineProperties(MD.prototype,ZD);var P3=MD(),pE=MD({level:M0?M0.level:0});var R0=P3;import{createRequire as zE}from"module";var U0=CD(_u(),1),{program:aE,createCommand:rE,createArgument:iE,createOption:nE,CommanderError:sE,InvalidArgumentError:tE,InvalidOptionArgumentError:oE,Command:eE,Argument:D6,Option:N0,Help:u6}=U0.default;var{stdout:W0,stderr:j0}=fD,Hu=Symbol("GENERATOR"),HD=Symbol("STYLER"),VD=Symbol("IS_EMPTY"),L0=["ansi","ansi","ansi256","ansi16m"],QD=Object.create(null),O3=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let F=W0?W0.level:0;D.level=u.level===void 0?F:u.level};var S3=(D)=>{let u=(...F)=>F.join(" ");return O3(u,D),Object.setPrototypeOf(u,RD.prototype),u};function RD(D){return S3(D)}Object.setPrototypeOf(RD.prototype,Function.prototype);for(let[D,u]of Object.entries(P))QD[D]={get(){let F=kD(this,Xu(u.open,u.close,this[HD]),this[VD]);return Object.defineProperty(this,D,{value:F}),F}};QD.visible={get(){let D=kD(this,this[HD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var Qu=(D,u,F,...E)=>{if(D==="rgb"){if(u==="ansi16m")return P[F].ansi16m(...E);if(u==="ansi256")return P[F].ansi256(P.rgbToAnsi256(...E));return P[F].ansi(P.rgbToAnsi(...E))}if(D==="hex")return Qu("rgb",u,F,...P.hexToRgb(...E));return P[F][D](...E)},f3=["rgb","hex","ansi256"];for(let D of f3){QD[D]={get(){let{level:F}=this;return function(...E){let C=Xu(Qu(D,L0[F],"color",...E),P.color.close,this[HD]);return kD(this,C,this[VD])}}};let u="bg"+D[0].toUpperCase()+D.slice(1);QD[u]={get(){let{level:F}=this;return function(...E){let C=Xu(Qu(D,L0[F],"bgColor",...E),P.bgColor.close,this[HD]);return kD(this,C,this[VD])}}}}var b3=Object.defineProperties(()=>{},{...QD,level:{enumerable:!0,get(){return this[Hu].level},set(D){this[Hu].level=D}}}),Xu=(D,u,F)=>{let E,C;if(F===void 0)E=D,C=u;else E=F.openAll+D,C=u+F.closeAll;return{open:D,close:u,openAll:E,closeAll:C,parent:F}},kD=(D,u,F)=>{let E=(...C)=>v3(E,C.length===1?""+C[0]:C.join(" "));return Object.setPrototypeOf(E,b3),E[Hu]=D,E[HD]=u,E[VD]=F,E},v3=(D,u)=>{if(D.level<=0||!u)return D[VD]?"":u;let F=D[HD];if(F===void 0)return u;let{openAll:E,closeAll:C}=F;if(u.includes("\x1B"))while(F!==void 0)u=bD(u,F.close,F.open),F=F.parent;let B=u.indexOf(`
39
+ `);if(B!==-1)u=vD(u,C,E,B);return E+u+C};Object.defineProperties(RD.prototype,QD);var y3=RD(),A6=RD({level:j0?j0.level:0});var J=y3;import{promises as xD}from"fs";import k3 from"os";import T0 from"path";var x3="https://api.xevol.com",I0=T0.join(k3.homedir(),".xevol"),Gu=T0.join(I0,"config.json");async function h3(){await xD.mkdir(I0,{recursive:!0})}async function b(){try{let D=await xD.readFile(Gu,"utf8");return JSON.parse(D)}catch(D){if(D.code==="ENOENT")return null;if(D instanceof SyntaxError)return console.error("Warning: config.json is corrupt. Run `xevol login` to fix it."),null;throw D}}async function g3(D){await h3();let u=JSON.stringify(D,null,2)+`
40
+ `;await xD.writeFile(Gu,u,{encoding:"utf8",mode:384})}async function Ju(D){let F={...await b()??{},...D};return await g3(F),F}async function w0(){try{await xD.unlink(Gu)}catch(D){if(D.code!=="ENOENT")throw D}}function O(D){return process.env.XEVOL_API_URL??D?.apiUrl??x3}function v(D,u){let F=u??process.env.XEVOL_TOKEN??D?.token;if(F&&!u&&!process.env.XEVOL_TOKEN&&D?.expiresAt){let E=new Date(D.expiresAt).getTime();if(Number.isFinite(E)&&Date.now()>=E)return{token:void 0,expired:!0}}return{token:F,expired:!1}}function y(D,u){if(D.token)return D.token;return(typeof u.optsWithGlobals==="function"?u.optsWithGlobals():u.parent?.opts()??{}).token}function m3(D,u,F){let E=F??O(),C=new URL(D,E);if(u)for(let[B,A]of Object.entries(u)){if(A===void 0||A===null)continue;C.searchParams.set(B,String(A))}return C}function c3(D,u){let F=u?.trim();if(!F)return D;let E=new Headers(D);return E.set("Authorization",`Bearer ${F}`),E}async function d3(D){let u=D.headers.get("content-type")??"";try{if(u.includes("application/json")){let F=await D.json();return F.message??F.error??JSON.stringify(F)}return await D.text()}catch{return null}}async function S(D,{method:u,query:F,body:E,headers:C,token:B,apiUrl:A}={}){let _=m3(D,F,A),z=c3(C??{},B);if(E!==void 0&&!(E instanceof FormData))z.set("Content-Type","application/json");let q;try{q=await fetch(_,{method:u??(E===void 0?"GET":"POST"),headers:z,body:E===void 0?void 0:E instanceof FormData?E:JSON.stringify(E),signal:AbortSignal.timeout(30000)})}catch(H){if(H.name==="TimeoutError")throw Error(`Request timed out after 30s. Is the API at ${_.origin} reachable?`);throw Error(`Network error: could not reach ${_.origin}. Check your connection or API status.`)}if(!q.ok){let H=await d3(q),Z=H?`API ${q.status}: ${H}`:`API ${q.status} ${q.statusText}`;throw Error(Z)}if((q.headers.get("content-type")??"").includes("application/json"))return await q.json();return await q.text()}var sF=CD(TF(),1);import nD from"node:process";import yF from"node:process";import aD from"node:process";var T8=(D,u,F,E)=>{if(F==="length"||F==="prototype")return;if(F==="arguments"||F==="caller")return;let C=Object.getOwnPropertyDescriptor(D,F),B=Object.getOwnPropertyDescriptor(u,F);if(!I8(C,B)&&E)return;Object.defineProperty(D,F,B)},I8=function(D,u){return D===void 0||D.configurable||D.writable===u.writable&&D.enumerable===u.enumerable&&D.configurable===u.configurable&&(D.writable||D.value===u.value)},w8=(D,u)=>{let F=Object.getPrototypeOf(u);if(F===Object.getPrototypeOf(D))return;Object.setPrototypeOf(D,F)},P8=(D,u)=>`/* Wrapped ${D}*/
41
+ ${u}`,O8=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),S8=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),f8=(D,u,F)=>{let E=F===""?"":`with ${F.trim()}() `,C=P8.bind(null,E,u.toString());Object.defineProperty(C,"name",S8);let{writable:B,enumerable:A,configurable:_}=O8;Object.defineProperty(D,"toString",{value:C,writable:B,enumerable:A,configurable:_})};function Iu(D,u,{ignoreNonConfigurable:F=!1}={}){let{name:E}=D;for(let C of Reflect.ownKeys(u))T8(D,u,C,F);return w8(D,u),f8(D,u,E),D}var pD=new WeakMap,IF=(D,u={})=>{if(typeof D!=="function")throw TypeError("Expected a function");let F,E=0,C=D.displayName||D.name||"<anonymous>",B=function(...A){if(pD.set(B,++E),E===1)F=D.apply(this,A),D=void 0;else if(u.throw===!0)throw Error(`Function \`${C}\` can only be called once`);return F};return Iu(B,D),pD.set(B,E),B};IF.callCount=(D)=>{if(!pD.has(D))throw Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return pD.get(D)};var wF=IF;var AD=[];AD.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")AD.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")AD.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var lD=(D)=>!!D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function",wu=Symbol.for("signal-exit emitter"),Pu=globalThis,b8=Object.defineProperty.bind(Object);class PF{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Pu[wu])return Pu[wu];b8(Pu,wu,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,u){this.listeners[D].push(u)}removeListener(D,u){let F=this.listeners[D],E=F.indexOf(u);if(E===-1)return;if(E===0&&F.length===1)F.length=0;else F.splice(E,1)}emit(D,u,F){if(this.emitted[D])return!1;this.emitted[D]=!0;let E=!1;for(let C of this.listeners[D])E=C(u,F)===!0||E;if(D==="exit")E=this.emit("afterExit",u,F)||E;return E}}class Su{}var v8=(D)=>{return{onExit(u,F){return D.onExit(u,F)},load(){return D.load()},unload(){return D.unload()}}};class OF extends Su{onExit(){return()=>{}}load(){}unload(){}}class SF extends Su{#A=Ou.platform==="win32"?"SIGINT":"SIGHUP";#F=new PF;#D;#C;#H;#u={};#B=!1;constructor(D){super();this.#D=D,this.#u={};for(let u of AD)this.#u[u]=()=>{let F=this.#D.listeners(u),{count:E}=this.#F,C=D;if(typeof C.__signal_exit_emitter__==="object"&&typeof C.__signal_exit_emitter__.count==="number")E+=C.__signal_exit_emitter__.count;if(F.length===E){this.unload();let B=this.#F.emit("exit",null,u),A=u==="SIGHUP"?this.#A:u;if(!B)D.kill(D.pid,A)}};this.#H=D.reallyExit,this.#C=D.emit}onExit(D,u){if(!lD(this.#D))return()=>{};if(this.#B===!1)this.load();let F=u?.alwaysLast?"afterExit":"exit";return this.#F.on(F,D),()=>{if(this.#F.removeListener(F,D),this.#F.listeners.exit.length===0&&this.#F.listeners.afterExit.length===0)this.unload()}}load(){if(this.#B)return;this.#B=!0,this.#F.count+=1;for(let D of AD)try{let u=this.#u[D];if(u)this.#D.on(D,u)}catch(u){}this.#D.emit=(D,...u)=>{return this.#Q(D,...u)},this.#D.reallyExit=(D)=>{return this.#E(D)}}unload(){if(!this.#B)return;this.#B=!1,AD.forEach((D)=>{let u=this.#u[D];if(!u)throw Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,u)}catch(F){}}),this.#D.emit=this.#C,this.#D.reallyExit=this.#H,this.#F.count-=1}#E(D){if(!lD(this.#D))return 0;return this.#D.exitCode=D||0,this.#F.emit("exit",this.#D.exitCode,null),this.#H.call(this.#D,this.#D.exitCode)}#Q(D,...u){let F=this.#C;if(D==="exit"&&lD(this.#D)){if(typeof u[0]==="number")this.#D.exitCode=u[0];let E=F.call(this.#D,D,...u);return this.#F.emit("exit",this.#D.exitCode,null),E}else return F.call(this.#D,D,...u)}}var Ou=globalThis.process,{onExit:fF,load:m6,unload:c6}=v8(lD(Ou)?new SF(Ou):new OF);var bF=aD.stderr.isTTY?aD.stderr:aD.stdout.isTTY?aD.stdout:void 0,y8=bF?wF(()=>{fF(()=>{bF.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},vF=y8;var rD=!1,JD={};JD.show=(D=yF.stderr)=>{if(!D.isTTY)return;rD=!1,D.write("\x1B[?25h")};JD.hide=(D=yF.stderr)=>{if(!D.isTTY)return;vF(),rD=!0,D.write("\x1B[?25l")};JD.toggle=(D,u)=>{if(D!==void 0)rD=D;if(rD)JD.show(u);else JD.hide(u)};var fu=JD;var TD=CD(bu(),1);import i from"node:process";function vu(){if(i.platform!=="win32")return i.env.TERM!=="linux";return Boolean(i.env.CI)||Boolean(i.env.WT_SESSION)||Boolean(i.env.TERMINUS_SUBLIME)||i.env.ConEmuTask==="{cmd::Cmder}"||i.env.TERM_PROGRAM==="Terminus-Sublime"||i.env.TERM_PROGRAM==="vscode"||i.env.TERM==="xterm-256color"||i.env.TERM==="alacritty"||i.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var x8={info:J.blue("ℹ"),success:J.green("✔"),warning:J.yellow("⚠"),error:J.red("✖")},h8={info:J.blue("i"),success:J.green("√"),warning:J.yellow("‼"),error:J.red("×")},g8=vu()?x8:h8,jD=g8;function yu({onlyFirst:D=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",D?void 0:"g")}var m8=yu();function LD(D){if(typeof D!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(m8,"")}function gF(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 mF(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function cF(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<=94198||D>=94208&&D<=101589||D>=101631&&D<=101662||D>=101760&&D<=101874||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<=128728||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<=129674||D>=129678&&D<=129734||D===129736||D>=129741&&D<=129756||D>=129759&&D<=129770||D>=129775&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function c8(D){if(!Number.isSafeInteger(D))throw TypeError(`Expected a code point, got \`${typeof D}\`.`)}function dF(D,{ambiguousAsWide:u=!1}={}){if(c8(D),mF(D)||cF(D)||u&&gF(D))return 2;return 1}var aF=CD(lF(),1),d8=new Intl.Segmenter,p8=/^\p{Default_Ignorable_Code_Point}$/u;function ku(D,u={}){if(typeof D!=="string"||D.length===0)return 0;let{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:E=!1}=u;if(!E)D=LD(D);if(D.length===0)return 0;let C=0,B={ambiguousAsWide:!F};for(let{segment:A}of d8.segment(D)){let _=A.codePointAt(0);if(_<=31||_>=127&&_<=159)continue;if(_>=8203&&_<=8207||_===65279)continue;if(_>=768&&_<=879||_>=6832&&_<=6911||_>=7616&&_<=7679||_>=8400&&_<=8447||_>=65056&&_<=65071)continue;if(_>=55296&&_<=57343)continue;if(_>=65024&&_<=65039)continue;if(p8.test(A))continue;if(aF.default().test(A)){C+=2;continue}C+=dF(_,B)}return C}function xu({stream:D=process.stdout}={}){return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import rF from"node:process";function hu(){let{env:D}=rF,{TERM:u,TERM_PROGRAM:F}=D;if(rF.platform!=="win32")return u!=="linux";return Boolean(D.WT_SESSION)||Boolean(D.TERMINUS_SUBLIME)||D.ConEmuTask==="{cmd::Cmder}"||F==="Terminus-Sublime"||F==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||D.TERMINAL_EMULATOR==="JetBrains-JediTerm"}import o from"node:process";var l8=3;class iF{#A=0;start(){if(this.#A++,this.#A===1)this.#F()}stop(){if(this.#A<=0)throw Error("`stop` called more times than `start`");if(this.#A--,this.#A===0)this.#D()}#F(){if(o.platform==="win32"||!o.stdin.isTTY)return;o.stdin.setRawMode(!0),o.stdin.on("data",this.#C),o.stdin.resume()}#D(){if(!o.stdin.isTTY)return;o.stdin.off("data",this.#C),o.stdin.pause(),o.stdin.setRawMode(!1)}#C(D){if(D[0]===l8)o.emit("SIGINT")}}var a8=new iF,gu=a8;var r8=CD(bu(),1);class nF{#A=0;#F=!1;#D=0;#C=-1;#H=0;#u;#B;#E;#Q;#G;#q;#z;#Z;#J;#_;#$;color;constructor(D){if(typeof D==="string")D={text:D};if(this.#u={color:"cyan",stream:nD.stderr,discardStdin:!0,hideCursor:!0,...D},this.color=this.#u.color,this.spinner=this.#u.spinner,this.#G=this.#u.interval,this.#E=this.#u.stream,this.#q=typeof this.#u.isEnabled==="boolean"?this.#u.isEnabled:xu({stream:this.#E}),this.#z=typeof this.#u.isSilent==="boolean"?this.#u.isSilent:!1,this.text=this.#u.text,this.prefixText=this.#u.prefixText,this.suffixText=this.#u.suffixText,this.indent=this.#u.indent,nD.env.NODE_ENV==="test")this._stream=this.#E,this._isEnabled=this.#q,Object.defineProperty(this,"_linesToClear",{get(){return this.#A},set(u){this.#A=u}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#C}}),Object.defineProperty(this,"_lineCount",{get(){return this.#D}})}get indent(){return this.#Z}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw Error("The `indent` option must be an integer from 0 and up");this.#Z=D,this.#X()}get interval(){return this.#G??this.#B.interval??100}get spinner(){return this.#B}set spinner(D){if(this.#C=-1,this.#G=void 0,typeof D==="object"){if(D.frames===void 0)throw Error("The given spinner must have a `frames` property");this.#B=D}else if(!hu())this.#B=TD.default.line;else if(D===void 0)this.#B=TD.default.dots;else if(D!=="default"&&TD.default[D])this.#B=TD.default[D];else throw Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#J}set text(D=""){this.#J=D,this.#X()}get prefixText(){return this.#_}set prefixText(D=""){this.#_=D,this.#X()}get suffixText(){return this.#$}set suffixText(D=""){this.#$=D,this.#X()}get isSpinning(){return this.#Q!==void 0}#Y(D=this.#_,u=" "){if(typeof D==="string"&&D!=="")return D+u;if(typeof D==="function")return D()+u;return""}#K(D=this.#$,u=" "){if(typeof D==="string"&&D!=="")return u+D;if(typeof D==="function")return u+D();return""}#X(){let D=this.#E.columns??80,u=this.#Y(this.#_,"-"),F=this.#K(this.#$,"-"),E=" ".repeat(this.#Z)+u+"--"+this.#J+"--"+F;this.#D=0;for(let C of LD(E).split(`
42
+ `))this.#D+=Math.max(1,Math.ceil(ku(C,{countAnsiEscapeCodes:!0})/D))}get isEnabled(){return this.#q&&!this.#z}set isEnabled(D){if(typeof D!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this.#q=D}get isSilent(){return this.#z}set isSilent(D){if(typeof D!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this.#z=D}frame(){let D=Date.now();if(this.#C===-1||D-this.#H>=this.interval)this.#C=++this.#C%this.#B.frames.length,this.#H=D;let{frames:u}=this.#B,F=u[this.#C];if(this.color)F=J[this.color](F);let E=typeof this.#_==="string"&&this.#_!==""?this.#_+" ":"",C=typeof this.text==="string"?" "+this.text:"",B=typeof this.#$==="string"&&this.#$!==""?" "+this.#$:"";return E+F+C+B}clear(){if(!this.#q||!this.#E.isTTY)return this;this.#E.cursorTo(0);for(let D=0;D<this.#A;D++){if(D>0)this.#E.moveCursor(0,-1);this.#E.clearLine(1)}if(this.#Z||this.lastIndent!==this.#Z)this.#E.cursorTo(this.#Z);return this.lastIndent=this.#Z,this.#A=0,this}render(){if(this.#z)return this;return this.clear(),this.#E.write(this.frame()),this.#A=this.#D,this}start(D){if(D)this.text=D;if(this.#z)return this;if(!this.#q){if(this.text)this.#E.write(`- ${this.text}
43
+ `);return this}if(this.isSpinning)return this;if(this.#u.hideCursor)fu.hide(this.#E);if(this.#u.discardStdin&&nD.stdin.isTTY)this.#F=!0,gu.start();return this.render(),this.#Q=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#q)return this;if(clearInterval(this.#Q),this.#Q=void 0,this.#C=0,this.clear(),this.#u.hideCursor)fu.show(this.#E);if(this.#u.discardStdin&&nD.stdin.isTTY&&this.#F)gu.stop(),this.#F=!1;return this}succeed(D){return this.stopAndPersist({symbol:jD.success,text:D})}fail(D){return this.stopAndPersist({symbol:jD.error,text:D})}warn(D){return this.stopAndPersist({symbol:jD.warning,text:D})}info(D){return this.stopAndPersist({symbol:jD.info,text:D})}stopAndPersist(D={}){if(this.#z)return this;let u=D.prefixText??this.#_,F=this.#Y(u," "),E=D.symbol??" ",C=D.text??this.text,A=typeof C==="string"?(E?" ":"")+C:"",_=D.suffixText??this.#$,z=this.#K(_," "),q=F+E+A+z+`
44
+ `;return this.stop(),this.#E.write(q),this}}function mu(D){return new nF(D)}function T(D){console.log(JSON.stringify(D,null,2))}function _D(D){if(D===null||D===void 0||D==="")return"—";if(typeof D==="string")return D;if(!Number.isFinite(D))return"—";let u=Math.max(0,Math.floor(D)),F=Math.floor(u/3600),E=Math.floor(u%3600/60),C=u%60,B=F>0?String(E).padStart(2,"0"):String(E),A=String(C).padStart(2,"0");return F>0?`${F}:${B}:${A}`:`${B}:${A}`}function tF(D){if(!D)return"—";let u=D.toLowerCase();if(u.includes("complete"))return J.green(D);if(u.includes("pending")||u.includes("processing"))return J.yellow(D);if(u.includes("error")||u.includes("failed"))return J.red(D);return D}function sD(D,u){let F=new sF.default({head:D,style:{head:["cyan"],border:["gray"]},wordWrap:!0});for(let E of u)F.push(E);return F.toString()}function ID(D){let F=Math.min(D??process.stdout.columns??40,100),E=Math.max(20,F);return"─".repeat(E)}function e(D){return mu({text:D,spinner:"dots"}).start()}function n(D,u){for(let F of u){let E=D[F];if(typeof E==="string"&&E.length>0)return E}return}function s(D,u){for(let F of u){let E=D[F];if(typeof E==="string"&&E.length>0)return E;if(typeof E==="number")return String(E)}return"—"}function l(D,u){let F=D[u];if(typeof F==="string")return F;let E=D.user?.[u];if(typeof E==="string")return E;let C=D.session?.[u];if(typeof C==="string")return C;return}function cu(D,u){let F=D[u];if(typeof F==="number"&&Number.isFinite(F))return F;if(typeof F==="string"){let E=Number(F);if(Number.isFinite(E))return E}return}function oF(D){return n(D,["id","transcriptionId"])??D.transcription?.id?.toString()??D.data?.id?.toString()}function tD(D){return n(D,["status","state"])}import{promises as du}from"fs";import i8 from"os";import eF from"path";var D2=eF.join(i8.homedir(),".xevol","jobs");async function n8(){await du.mkdir(D2,{recursive:!0})}function u2(D){return eF.join(D2,`${D}.json`)}async function d(D){await n8(),D.updatedAt=new Date().toISOString();let u=JSON.stringify(D,null,2)+`
45
+ `;await du.writeFile(u2(D.transcriptionId),u,{encoding:"utf8",mode:384})}async function F2(D){try{let u=await du.readFile(u2(D),"utf8");return JSON.parse(u)}catch(u){if(u.code==="ENOENT")return null;throw u}}async function*oD(D,u){let F=new URL(D,u.apiUrl),E={Accept:"text/event-stream",Authorization:`Bearer ${u.token.trim()}`};if(u.lastEventId)E["Last-Event-ID"]=u.lastEventId;let C=await fetch(F,{method:"GET",headers:E,signal:u.signal});if(!C.ok){let Z=await C.text().catch(()=>"");throw Error(`SSE ${C.status}: ${Z||C.statusText}`)}if((C.headers.get("content-type")??"").includes("application/json")){yield{event:"complete",data:await C.text()};return}if(!C.body)throw Error("SSE: no response body (streaming not supported)");let A=C.body.getReader(),_=new TextDecoder,z="",q,$,H=[];try{while(!0){let{done:Z,value:X}=await A.read();if(Z){if(H.length>0)yield{id:q,event:$,data:H.join(`
46
+ `)};break}z+=_.decode(X,{stream:!0});let Q=z.split(`
47
+ `);z=Q.pop()??"";for(let G of Q){if(G===""){if(H.length>0)yield{id:q,event:$,data:H.join(`
48
+ `)};q=void 0,$=void 0,H=[];continue}if(G.startsWith(":"))continue;let Y=G.indexOf(":"),M,K;if(Y===-1)M=G,K="";else if(M=G.slice(0,Y),K=G.slice(Y+1),K.startsWith(" "))K=K.slice(1);switch(M){case"id":q=K;break;case"event":$=K;break;case"data":H.push(K);break}}}}finally{A.releaseLock()}}var E2=30000;async function wD(D,u,F,E={}){if(E.header)console.log(J.bold.cyan(`
49
+ ─── ${E.header} ───`));let C=E.lastEventId,B="",A=new AbortController,_=setTimeout(()=>A.abort(),E2),z=()=>{clearTimeout(_),_=setTimeout(()=>A.abort(),E2)},q=oD(`/spikes/stream/${D}`,{token:u,apiUrl:F,lastEventId:E.lastEventId,signal:A.signal});try{for await(let $ of q){if(z(),$.id)C=$.id;if(E.json){T($);continue}if($.event==="complete"){try{let H=JSON.parse($.data),Z=H.data??H.content??H.markdown??"";B+=Z,process.stdout.write(Z)}catch{B+=$.data,process.stdout.write($.data)}continue}if($.event==="chunk"||$.event==="delta"||!$.event){try{let H=JSON.parse($.data),Z=H.text??H.content??H.chunk??H.delta??$.data;B+=Z,process.stdout.write(Z)}catch{B+=$.data,process.stdout.write($.data)}continue}if($.event==="done"||$.event==="end"){if($.data&&$.data!=="[DONE]")try{let H=JSON.parse($.data),Z=H.content??H.text;if(Z&&!B)B=Z,process.stdout.write(Z)}catch{}continue}if($.event==="error"){console.error(J.red(`
50
+ Stream error: ${$.data}`));continue}}if(B&&!B.endsWith(`
51
+ `))process.stdout.write(`
52
+ `)}finally{clearTimeout(_)}return{lastEventId:C,content:B}}var s8=/^https?:\/\/(?:www\.|m\.|music\.)?(?:youtube\.com\/(?:watch|shorts|live|embed)|youtu\.be\/)/i;async function t8(D,u,F){let E=e("Processing..."),C=Date.now(),B=120;try{for(let A=0;A<120;A+=1){let _=await S(`/v1/status/${D}`,{token:u,apiUrl:F}),z=tD(_)?.toLowerCase()??"pending",q=Math.floor((Date.now()-C)/1000);if(E.text=`Processing... (${q}s)`,z.includes("complete")){let $=n(_,["title","videoTitle","name"]),H=_D(_.duration??_.durationSec??_.durationSeconds);return E.succeed(`Completed: ${$?`"${$}"`:D} (${H})`),_}if(z.includes("error")||z.includes("failed"))return E.fail(`Failed: ${D}`),_;await new Promise(($)=>setTimeout($,5000))}return E.fail("Timed out waiting for transcription to complete."),null}catch(A){return E.fail(A.message),null}}function C2(D){D.command("add").description("Submit a YouTube URL for transcription").argument("<youtubeUrl>","YouTube URL").option("--lang <code>","Output language","en").option("--no-wait","Don't wait for completion (fire-and-forget)").option("--analyze <prompts>","Comma-separated prompt IDs to generate analysis after transcription").addOption(new N0("--spikes <prompts>").hideHelp()).option("--stream","Stream analysis content in real-time via SSE (use with --analyze)").option("--json","Raw JSON output").addHelpText("after",`
53
+ Examples:
54
+ $ xevol add "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
55
+ $ xevol add "https://youtu.be/dQw4w9WgXcQ" --lang kk
56
+ $ xevol add "https://www.youtube.com/watch?v=..." --analyze review,summary --stream
57
+ $ xevol add "https://www.youtube.com/watch?v=..." --no-wait`).action(async(u,F,E)=>{try{if(!s8.test(u)){console.error(J.red("Error:")+" Not a valid YouTube URL. Expected youtube.com/watch?v=... or youtu.be/..."),process.exitCode=1;return}let C=await b()??{},B=y(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let z=O(C),q=await S("/v1/add",{query:{url:u,outputLang:F.lang},token:A,apiUrl:z}),$=oF(q),H=tD(q)??"pending";if(!$){if(F.json)T(q);else console.error("Transcription created, but the response did not include an ID.");process.exitCode=1;return}if(!F.json)console.log(`${J.green("✔")} Transcription created: ${$}`),console.log(`Status: ${H}`);let Z=F.analyze??F.spikes;if(F.wait!==!1){let X=Z?Z.split(",").map((Y)=>Y.trim()).filter(Boolean):[],Q=1+X.length;if(!F.json)console.log(J.dim(`[1/${Q}] Transcribing...`));let G=await t8($,A,z);if(F.json&&!Z)T(G??q);if(Z&&G)if(!(tD(G)?.toLowerCase()??"").includes("complete"))console.error(J.red("Error:")+" Transcription did not complete — skipping analysis generation.");else if(F.stream){let M=F.lang??"en",K=[],R={transcriptionId:$,url:u,lang:M,outputLang:M,spikes:[],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};for(let V=0;V<X.length;V++){let U=X[V],m=V+2;if(!F.json)console.log(J.dim(`[${m}/${Q}] Generating analysis: ${U}...`));let f=e(`Creating analysis: ${U}...`);try{let h=await S(`/spikes/${$}`,{method:"POST",body:{promptId:U,outputLang:M},token:A,apiUrl:z}),L=h.spikeId,k={spikeId:L??U,promptId:U,status:"pending"};R.spikes.push(k);let ED=h.content??h.markdown;if(ED){if(f.succeed(`Analysis ready: ${U} (cached)`),!F.json)console.log(J.bold.cyan(`
58
+ ─── ${U} ───`)),console.log(ED);k.status="complete",await d(R),K.push(h);continue}if(!L){f.fail(`No analysis ID returned for ${U}`),k.status="error",await d(R);continue}f.succeed(`Analysis created: ${U}`),k.status="streaming",await d(R);let qD=await wD(L,A,z,{json:F.json,header:U});if(k.status="complete",k.lastEventId=qD.lastEventId,await d(R),!F.json)console.log(J.green(`✔ Analysis complete: ${U}`));K.push({spikeId:L,promptId:U,content:qD.content})}catch(h){f.fail(`Analysis failed: ${U} — ${h.message}`);let L=R.spikes.find((k)=>k.promptId===U);if(L)L.status="error",await d(R)}}if(!F.json)console.log(J.green(`
59
+ ✔ All done. Resume anytime: xevol resume ${$}`));else T({transcription:G,spikes:K})}else{let M=F.lang??"en",K=[];for(let R=0;R<X.length;R++){let V=X[R],U=R+2;if(!F.json)console.log(J.dim(`[${U}/${Q}] Generating analysis: ${V}...`));let m=e(`Generating analysis: ${V}...`),f=Date.now(),h=120;try{let L=await S(`/spikes/${$}`,{method:"POST",body:{promptId:V,outputLang:M},token:A,apiUrl:z}),k=L.spikes??L.data??L.items;if((!k||Array.isArray(k)&&k.length===0)&&L.spikeId)for(let ED=0;ED<h;ED+=1){await new Promise((V2)=>setTimeout(V2,5000));let qD=Math.floor((Date.now()-f)/1000);m.text=`Generating analysis: ${V}... (${qD}s)`,L=await S(`/spikes/${$}`,{method:"POST",body:{promptId:V,outputLang:M},token:A,apiUrl:z});let M2=L.content??L.markdown??L.text,iu=L.spikes??L.data;if(M2||Array.isArray(iu)&&iu.length>0)break}m.succeed(`Analysis ready: ${V}`),K.push(L)}catch(L){m.fail(`Analysis failed: ${V} — ${L.message}`)}}if(F.json)T({transcription:G,spikes:K})}return}if(F.json)T(q)}catch(C){console.error(C.message),process.exitCode=1}})}function o8(D){let u=l(D,"email")??"Unknown",F=D.plan?.name??D.subscription?.plan??D.plan,E=D.usage?.transcriptionsThisMonth??D.monthly?.transcriptions??D.transcriptionsThisMonth,C=[];if(C.push(`${J.dim("Email:")} ${J.bold(u)}`),F)C.push(`${J.dim("Plan:")} ${F}`);if(E!==void 0)C.push(`${J.dim("Usage:")} ${E} transcriptions this month`);return C.join(`
60
+ `)}function e8(D){if(!Number.isFinite(D)||D<=0)return"soon";if(D<90)return`${Math.ceil(D)} sec`;return`${Math.ceil(D/60)} min`}async function DE(D){try{let{execFile:u}=await import("child_process"),F=process.platform==="darwin"?"open":"xdg-open";u(F,[D],(E)=>{})}catch{}}async function pu(D){let u=D.headers.get("content-type")??"";try{if(u.includes("application/json")){let E=await D.json();return E.message??E.error??JSON.stringify(E)}let F=await D.text();return F.trim()?F:null}catch{return null}}async function uE(D){await new Promise((u)=>setTimeout(u,D))}function B2(D){D.command("login").description("Authenticate with the browser-based device flow").option("--token <token>","CLI token (overrides XEVOL_TOKEN)").option("--json","Raw JSON output").action(async(u,F)=>{try{let E=await b()??{},C=y(u,F),B=O(E);if(C){let{token:R,expired:V}=v(E,C);if(!R){console.error(V?"Token expired. Run `xevol login` to re-authenticate.":"Token required. Use --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let U=await S("/auth/session",{token:R,apiUrl:B}),m=l(U,"accountId"),f=l(U,"email"),h=l(U,"expiresAt");if(await Ju({apiUrl:B,token:R,accountId:m??E.accountId,email:f??E.email,expiresAt:h??E.expiresAt}),u.json){T(U);return}let L=f?`Logged in as ${J.bold(f)}`:"Logged in";console.log(`${J.green("✓")} ${L}`);return}let A=new URL("/auth/cli/device-code",B),_=await fetch(A,{method:"POST"});if(!_.ok){let R=await pu(_),V=R?`API ${_.status}: ${R}`:`API ${_.status} ${_.statusText}`;throw Error(V)}let z=await _.json(),q=l(z,"deviceCode"),$=l(z,"userCode"),H=l(z,"verificationUrl"),Z=cu(z,"expiresIn"),X=cu(z,"interval");if(!q||!$||!H||!Z||!X)throw Error("Invalid device authorization response.");let Q=new URL(H);Q.searchParams.set("code",$),await DE(Q.toString()),console.log("Open this URL to authenticate:"),console.log(` ${Q.toString()}`),console.log(""),console.log(`Waiting for approval... (expires in ${e8(Z)})`);let G=e("Waiting for approval..."),Y=Date.now()+Z*1000,M=Math.max(1,X)*1000,K=new URL("/auth/cli/device-token",B);try{while(Date.now()<Y){let V=await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:q})});if(V.status===202){await uE(M);continue}if(V.status===400){let f=await pu(V);G.fail("Device authorization expired."),console.error(f??"Device authorization expired. Run xevol login again."),process.exitCode=1;return}if(V.ok){let f=await V.json(),h=l(f,"token"),L=l(f,"accountId"),k=l(f,"email"),ED=l(f,"expiresAt");if(!h)throw G.fail("Authentication failed."),Error("No token received from device authorization.");if(await Ju({apiUrl:B,token:h,accountId:L??E.accountId,email:k??E.email,expiresAt:ED??E.expiresAt}),G.succeed("Approved"),u.json){T(f);return}let qD=k?`Logged in as ${J.bold(k)}`:"Logged in";console.log(`${J.green("✓")} ${qD}`);return}let U=await pu(V);G.fail("Authentication failed.");let m=U?`API ${V.status}: ${U}`:`API ${V.status} ${V.statusText}`;throw Error(m)}let R="Device authorization timed out. Run xevol login again.";G.fail("Timed out."),console.error(R),process.exitCode=1}catch(R){if(G.isSpinning)G.fail("Authentication failed.");throw R}}catch(E){console.error(E.message),process.exitCode=1}}),D.command("logout").description("Revoke CLI token and clear local config").option("--json","Raw JSON output").action(async(u,F)=>{try{let E=await b()??{},C=y(u,F),B=E.token,{token:A,expired:_}=v(E,C),z=B??A;if(!z){console.log(_?"Token expired. Run `xevol login` to re-authenticate.":"You are not logged in.");return}let q=O(E),$={ok:!0};try{$=await S("/auth/cli/revoke",{method:"POST",token:z,apiUrl:q})}catch(H){$={error:H.message}}if(await w0(),u.json){T($);return}console.log(`${J.green("✓")} Logged out`)}catch(E){console.error(E.message),process.exitCode=1}}),D.command("whoami").description("Show the current authenticated account").option("--json","Raw JSON output").action(async(u,F)=>{try{let E=await b()??{},C=y(u,F),{token:B,expired:A}=v(E,C);if(!B){console.error(A?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login to authenticate."),process.exitCode=1;return}let _=O(E),z=await S("/auth/session",{token:B,apiUrl:_});if(u.json){T(z);return}console.log(o8(z))}catch(E){console.error(E.message),process.exitCode=1}})}function FE(D){let u=D.list??D.data??D.transcriptions??D.items??D.results??[],F=D.pagination??D.meta??{},E=D.page??F.page??1,C=D.limit??F.limit??u.length,B=D.total??F.total??u.length,A=D.totalPages??F.totalPages??(C?Math.ceil(B/C):1);return{items:u,page:E,limit:C,total:B,totalPages:A}}function A2(D){D.command("list").description("List transcriptions").option("--page <number>","Page number",(u)=>Number.parseInt(u,10),1).option("--limit <number>","Items per page",(u)=>Number.parseInt(u,10),20).option("--json","Raw JSON output").option("--csv","CSV output").option("--status <status>","Filter by status (complete, pending, error)").addHelpText("after",`
61
+ Examples:
62
+ $ xevol list
63
+ $ xevol list --limit 5 --page 2
64
+ $ xevol list --status complete --csv
65
+ $ xevol list --json`).action(async(u,F)=>{try{let E=await b()??{},C=y(u,F),{token:B,expired:A}=v(E,C);if(!B){console.error(A?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let _=O(E),z=await S("/v1/transcriptions",{query:{page:u.page,limit:u.limit,status:u.status},token:B,apiUrl:_});if(u.json){T(z);return}let{items:q,page:$,total:H,totalPages:Z}=FE(z);if(u.csv){let Q=(G)=>{let Y=G.replace(/\n/g," ");return Y.includes(",")||Y.includes('"')?`"${Y.replace(/"/g,'""')}"`:Y};console.log("ID,Status,Lang,Duration,Channel,Title");for(let G of q){let Y=s(G,["id","transcriptionId","_id"]),M=s(G,["status","state"]),K=s(G,["lang","outputLang","language"]),R=G.duration??G.durationSec??G.durationSeconds??G.lengthSec,V=_D(R??"—"),U=s(G,["channel","channelTitle","author","uploader"]),m=s(G,["title","videoTitle","name"]);console.log([Y,M,K,V,U,m].map(Q).join(","))}return}console.log(J.bold(`Transcriptions (page ${$}/${Z}, ${H} total)`)),console.log("");let X=q.map((Q)=>{let G=s(Q,["id","transcriptionId","_id"]),Y=tF(s(Q,["status","state"])),M=s(Q,["lang","outputLang","language"]),K=Q.duration??Q.durationSec??Q.durationSeconds??Q.lengthSec,R=_D(K??"—"),V=s(Q,["channel","channelTitle","author","uploader"]),U=s(Q,["title","videoTitle","name"]);return[G,Y,M,R,V,U]});if(X.length===0){console.log("No transcriptions found.");return}if(console.log(sD(["ID","Status","Lang","Duration","Channel","Title"],X)),Z>1&&$<Z)console.log(""),console.log(`Page ${$} of ${Z} — use --page ${$+1} for next`)}catch(E){console.error(J.red("Error:")+" "+E.message),process.exitCode=1}})}function lu(D){let u=D.spikes??D.data??D.items;if(Array.isArray(u))return u;if(D.content||D.markdown||D.text)return[D];return[]}function EE(D){return D.markdown??D.content??D.text??D.body}async function _2(D,u,F,E="review",C="en"){return await S(`/spikes/${D}`,{method:"POST",body:{promptId:E,outputLang:C},token:u,apiUrl:F})}async function CE(D,u,F,E="review",C="en"){let B=e("Generating analysis..."),A=Date.now(),_=120;try{for(let z=0;z<120;z+=1){let q=await _2(D,u,F,E,C),$=lu(q),H=Math.floor((Date.now()-A)/1000);if(B.text=`Generating analysis... (${H}s)`,$.length>0)return B.succeed("Analysis ready"),q;await new Promise((Z)=>setTimeout(Z,5000))}return B.fail("Timed out waiting for analysis to generate."),null}catch(z){return B.fail(z.message),null}}function $2(D){D.command("analyze").alias("spikes").description("View or generate analysis for a transcription").argument("<id>","Transcription ID").option("--generate","Generate analysis if missing").option("--prompt <id>","Prompt ID for generation").option("--lang <code>","Output language","en").option("--json","Raw JSON output").addHelpText("after",`
66
+ Examples:
67
+ $ xevol analyze abc123
68
+ $ xevol analyze abc123 --prompt facts --lang kk
69
+ $ xevol analyze abc123 --generate --prompt review --json`).action(async(u,F,E)=>{try{let C=await b()??{},B=y(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let z=O(C),q=F.prompt??"review",$=F.lang??"en",H=await _2(u,A,z,q,$),Z=lu(H);if(Z.length===0&&H.spikeId){let G=await CE(u,A,z,q,$);if(!G){process.exitCode=1;return}H=G,Z=lu(H)}if(F.json){T(H);return}let X=H.title??H.transcriptionTitle??Z[0]?.title??u;console.log(J.bold(`Analysis for "${X}"`)),console.log(ID());let Q=Z.map((G)=>EE(G)).filter((G)=>Boolean(G)).join(`
3
70
 
4
- // src/index.ts
5
- console.log("xevol v0.0.1 \u2014 coming soon");
71
+ `);if(Q)console.log(Q);else console.log("No analysis content available.")}catch(C){console.error(J.red("Error:")+" "+C.message),process.exitCode=1}})}function BE(D){if(D.analysis&&typeof D.analysis==="object")return D.analysis;if(D.data&&typeof D.data==="object")return D.data;return D}function q2(D){D.command("view").description("View a transcription").argument("<id>","Transcription ID").option("--raw","Print the full transcript").option("--clean","Use cleanContent instead of content").option("--json","Raw JSON output").action(async(u,F,E)=>{try{let C=await b()??{},B=y(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}if(F.clean&&!F.raw){console.error("--clean can only be used with --raw."),process.exitCode=1;return}let z=O(C),q=await S(`/v1/analysis/${u}`,{token:A,apiUrl:z});if(F.json){T(q);return}let $=BE(q),H=n($,["title","videoTitle","name"])??"Untitled",Z=n($,["channel","channelTitle","author"])??"Unknown",X=n($,["channelHandle","handle","channelTag"]),Q=_D($.duration??$.durationSec??$.durationSeconds),G=n($,["lang","outputLang","language"])??"—",Y=n($,["status","state"])??"—",M=n($,["url","youtubeUrl","videoUrl"]);if(F.raw){let V=F.clean?"cleanContent":"content",U=$[V];if(!U){console.error("No transcript content available."),process.exitCode=1;return}console.log(U);return}let K=X?`${Z} (${X.startsWith("@")?X:`@${X}`})`:Z;if(console.log(J.bold(H)),console.log(`Channel: ${K}`),console.log(`Duration: ${Q} | Lang: ${G} | Status: ${Y}`),M)console.log(`URL: ${M}`);console.log(ID());let R=$.summary??$.overview??$.analysis?.summary?.toString();if(R)console.log(R);else console.log("No summary available.");console.log(ID()),console.log("Full transcript: use --raw")}catch(C){console.error(J.red("Error:")+" "+C.message),process.exitCode=1}})}function z2(D){D.command("prompts").description("List available prompts").option("--json","Raw JSON output").option("--csv","CSV output").action(async(u,F)=>{try{let E=await b()??{},C=y(u,F),{token:B}=v(E,C),A=O(E),_=await S("/v1/prompts",{token:B??void 0,apiUrl:A}),z=_.prompts??[];if(u.json){T(_);return}if(u.csv){let H=(Z)=>{let X=Z.replace(/\n/g," ");return X.includes(",")||X.includes('"')?`"${X.replace(/"/g,'""')}"`:X};console.log("ID,Description");for(let Z of z)console.log([Z.id,Z.description??"—"].map(H).join(","));return}if(console.log(J.bold(`Available Prompts (${z.length} total)`)),console.log(""),z.length===0){console.log("No prompts found.");return}let q=(H,Z)=>{let X=H.replace(/[\r\n]+/g," ").replace(/\s+/g," ").trim();return X.length>Z?X.slice(0,Z-1)+"…":X},$=z.map((H)=>[H.id,H.description?q(H.description,60):"—"]);console.log(sD(["ID","Description"],$))}catch(E){console.error(J.red("Error:")+" "+E.message),process.exitCode=1}})}var Z2=30000;async function AE(D,u,F,E={}){if(E.header)console.log(J.bold.cyan(`
72
+ ─── ${E.header} ───`));let C=E.lastEventId,B="",A=new AbortController,_=setTimeout(()=>A.abort(),Z2),z=()=>{clearTimeout(_),_=setTimeout(()=>A.abort(),Z2)},q=oD(`/spikes/stream/${D}`,{token:u,apiUrl:F,lastEventId:E.lastEventId,signal:A.signal});try{for await(let $ of q){if(z(),$.id)C=$.id;if(E.json){T($);continue}if($.event==="complete"){try{let H=JSON.parse($.data),Z=H.data??H.content??H.markdown??"";B+=Z,process.stdout.write(Z)}catch{B+=$.data,process.stdout.write($.data)}continue}if($.event==="chunk"||$.event==="delta"||!$.event){try{let H=JSON.parse($.data),Z=H.text??H.content??H.chunk??H.delta??$.data;B+=Z,process.stdout.write(Z)}catch{B+=$.data,process.stdout.write($.data)}continue}if($.event==="done"||$.event==="end"){if($.data&&$.data!=="[DONE]")try{let H=JSON.parse($.data),Z=H.content??H.text;if(Z&&!B)B=Z,process.stdout.write(Z)}catch{}continue}if($.event==="error"){console.error(J.red(`
73
+ Stream error: ${$.data}`));continue}}if(B&&!B.endsWith(`
74
+ `))process.stdout.write(`
75
+ `)}finally{clearTimeout(_)}return{lastEventId:C,content:B}}function H2(D){D.command("stream").description("Stream analysis content in real-time via SSE").argument("<spikeId>","Analysis ID to stream").option("--json","Output raw SSE events as JSON").option("--last-event-id <id>","Resume from a specific event ID").addHelpText("after",`
76
+ Examples:
77
+ $ xevol stream abc123
78
+ $ xevol stream abc123 --json
79
+ $ xevol stream abc123 --last-event-id 42`).action(async(u,F,E)=>{try{let C=await b()??{},B=y(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let z=O(C),q=await AE(u,A,z,{json:F.json,lastEventId:F.lastEventId});if(!F.json&&q.content)console.log(J.green(`
80
+ ✔ Stream complete`))}catch(C){console.error(J.red(C.message)),process.exitCode=1}})}function Q2(D){D.command("resume").description("Resume a previous streaming session").argument("<id>","Transcription ID").option("--json","Raw JSON output").action(async(u,F,E)=>{try{let C=await b()??{},B=y(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let z=O(C),q=await F2(u);if(!q){console.error(J.red(`No job state found for ${u}.`),"\nMake sure you previously ran `xevol add --stream --analyze` for this transcription."),process.exitCode=1;return}let $=q.lang??q.outputLang??"en";if(!F.json)console.log(J.bold(`Resuming job for transcription: ${u}`)),console.log(J.dim(`URL: ${q.url}`)),console.log(J.dim(`Analyses: ${q.spikes.length}`)),console.log();let H=[];for(let Z of q.spikes){if(Z.status==="complete"){if(!F.json)console.log(J.bold.cyan(`
81
+ ─── ${Z.promptId} ───`)),console.log(J.dim("(cached)"));try{let X=await S(`/spikes/${u}`,{method:"POST",body:{promptId:Z.promptId,outputLang:$},token:A,apiUrl:z});if(F.json)H.push(X);else{let Q=X.content??X.markdown??X.text??"";if(Q)console.log(Q);console.log(J.green("✔ Analysis complete: "+Z.promptId))}}catch(X){console.error(J.red(`Failed to fetch ${Z.promptId}: ${X.message}`))}continue}if(Z.status==="streaming"){if(!F.json)console.log(J.dim(`
82
+ Reconnecting to ${Z.promptId}...`));try{let X=await wD(Z.spikeId,A,z,{json:F.json,lastEventId:Z.lastEventId,header:Z.promptId});if(Z.status="complete",Z.lastEventId=X.lastEventId,await d(q),!F.json)console.log(J.green("✔ Analysis complete: "+Z.promptId));else H.push({spikeId:Z.spikeId,promptId:Z.promptId,content:X.content})}catch(X){console.error(J.red(`Analysis stream failed for ${Z.promptId}: ${X.message}`)),Z.status="error",await d(q)}continue}if(Z.status==="pending"||Z.status==="error"){let X=e(`Starting analysis: ${Z.promptId}...`);try{let Q=await S(`/spikes/${u}`,{method:"POST",body:{promptId:Z.promptId,outputLang:$},token:A,apiUrl:z}),G=Q.spikeId??Z.spikeId;Z.spikeId=G;let Y=Q.content??Q.markdown;if(Y){if(X.succeed(`Analysis ready: ${Z.promptId}`),!F.json)console.log(J.bold.cyan(`
83
+ ─── ${Z.promptId} ───`)),console.log(Y);if(Z.status="complete",await d(q),F.json)H.push(Q);continue}X.succeed(`Analysis started: ${Z.promptId}`),Z.status="streaming",await d(q);let M=await wD(G,A,z,{json:F.json,header:Z.promptId});if(Z.status="complete",Z.lastEventId=M.lastEventId,await d(q),!F.json)console.log(J.green("✔ Analysis complete: "+Z.promptId));else H.push({spikeId:G,promptId:Z.promptId,content:M.content})}catch(Q){X.fail(`Failed: ${Z.promptId} — ${Q.message}`),Z.status="error",await d(q)}}}if(F.json)T({transcriptionId:u,spikes:H});else console.log(J.green(`
84
+ ✔ All analyses resumed.`))}catch(C){console.error(J.red(C.message)),process.exitCode=1}})}import{promises as ru}from"fs";import _E from"os";import G2 from"path";var J2=G2.join(_E.homedir(),".xevol"),Y2=G2.join(J2,"config.json"),$D={apiUrl:"Base API URL","default.lang":"Default output language for transcriptions","default.limit":"Default page size for list command","api.timeout":"API request timeout in milliseconds"};async function au(){try{let D=await ru.readFile(Y2,"utf8");return JSON.parse(D)}catch(D){if(D.code==="ENOENT")return{};if(D instanceof SyntaxError)return console.error(J.yellow("Warning:")+" config.json is corrupt, starting fresh."),{};throw D}}async function $E(D){await ru.mkdir(J2,{recursive:!0});let u=JSON.stringify(D,null,2)+`
85
+ `;await ru.writeFile(Y2,u,{encoding:"utf8",mode:384})}function X2(D,u){let F=u.split("."),E=D;for(let C of F){if(E===null||E===void 0||typeof E!=="object")return;E=E[C]}return E}function qE(D,u,F){let E=u.split("."),C=D;for(let B=0;B<E.length-1;B++){let A=E[B];if(C[A]===void 0||typeof C[A]!=="object")C[A]={};C=C[A]}C[E[E.length-1]]=F}function K2(D){let u=D.command("config").description("Manage local CLI configuration");u.command("get").description("Get a config value").argument("<key>",`Config key (${Object.keys($D).join(", ")})`).action(async(F)=>{try{if(!(F in $D)){console.error(J.red("Error:")+` Unknown config key: ${F}`),console.error(`Allowed keys: ${Object.keys($D).join(", ")}`),process.exitCode=1;return}let E=await au(),C=X2(E,F);if(C===void 0)console.log(J.dim("(not set)"));else console.log(String(C))}catch(E){console.error(J.red("Error:")+" "+E.message),process.exitCode=1}}),u.command("set").description("Set a config value").argument("<key>",`Config key (${Object.keys($D).join(", ")})`).argument("<value>","Value to set").action(async(F,E)=>{try{if(!(F in $D)){console.error(J.red("Error:")+` Unknown config key: ${F}`),console.error(`Allowed keys: ${Object.keys($D).join(", ")}`),process.exitCode=1;return}let C=await au(),B=E;if(F==="default.limit"||F==="api.timeout"){let A=Number(E);if(!Number.isFinite(A)||A<=0){console.error(J.red("Error:")+` ${F} must be a positive number`),process.exitCode=1;return}B=A}qE(C,F,B),await $E(C),console.log(`${J.green("✔")} ${F} = ${E}`)}catch(C){console.error(J.red("Error:")+" "+C.message),process.exitCode=1}}),u.command("list").description("List all config values").action(async()=>{try{let F=await au(),E=!1;for(let C of Object.keys($D)){let B=X2(F,C);if(B!==void 0)console.log(`${J.dim(C)} = ${B}`),E=!0}if(!E)console.log(J.dim("No config values set."))}catch(F){console.error(J.red("Error:")+" "+F.message),process.exitCode=1}})}var ZE=zE(import.meta.url),{version:HE}=ZE("../package.json"),a=new H0;a.name("xevol").description("CLI for XEVol \u2014 transcribe, analyze, and explore YouTube content").version(HE).option("--token <token>","Override auth token").option("--no-color","Disable colored output").hook("preAction",()=>{if(a.opts().color===!1)R0.level=0});B2(a);A2(a);C2(a);q2(a);$2(a);z2(a);H2(a);Q2(a);K2(a);await a.parseAsync(process.argv);
package/package.json CHANGED
@@ -1,19 +1,28 @@
1
1
  {
2
2
  "name": "xevol",
3
- "version": "0.0.1",
4
- "description": "CLI for XEVol — transcribe, analyze, and explore YouTube content",
3
+ "version": "0.2.0",
4
+ "description": "Transcribe, analyze, and explore YouTube content from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
7
- "xevol": "./src/index.ts"
7
+ "xevol": "./dist/index.js"
8
8
  },
9
9
  "scripts": {
10
10
  "dev": "bun run src/index.ts",
11
- "build": "bun build src/index.ts --outdir dist --target node",
11
+ "build": "bun build src/index.ts --outdir dist --target node --minify",
12
12
  "prepublishOnly": "bun run build"
13
13
  },
14
- "keywords": ["xevol", "transcription", "youtube", "cli"],
14
+ "dependencies": {
15
+ "@inquirer/prompts": "^7.0.0",
16
+ "chalk": "^5.4.0",
17
+ "cli-table3": "^0.6.5",
18
+ "commander": "^13.0.0",
19
+ "ora": "^8.0.0"
20
+ },
21
+ "keywords": ["xevol", "transcription", "transcribe", "youtube", "analysis", "cli", "ai", "video", "subtitles", "intelligence"],
22
+ "files": ["dist", "README.md", "package.json"],
15
23
  "author": "Kuan <kuka@xevol.com>",
16
- "license": "MIT",
24
+ "license": "UNLICENSED",
25
+ "private": false,
17
26
  "repository": {
18
27
  "type": "git",
19
28
  "url": "https://github.com/xevol/xevol-cli"
@@ -21,5 +30,9 @@
21
30
  "homepage": "https://xevol.com",
22
31
  "engines": {
23
32
  "node": ">=18"
33
+ },
34
+ "devDependencies": {
35
+ "@types/bun": "latest",
36
+ "typescript": "^5.7.0"
24
37
  }
25
38
  }
package/PLAN.md DELETED
@@ -1,310 +0,0 @@
1
- # xevol-cli — Plan
2
-
3
- Minimal CLI for xevol-api. Auth + transcriptions only.
4
-
5
- ## Scope
6
-
7
- 4 features, nothing else:
8
-
9
- 1. **Auth** — login/logout + token-based auth
10
- 2. **List transcriptions** — paginated, filterable
11
- 3. **Add YouTube URL** — submit for processing, poll status
12
- 4. **View transcript** — raw content + formatted spikes
13
-
14
- ## Tech
15
-
16
- - **Runtime:** Bun
17
- - **Framework:** Commander.js
18
- - **HTTP:** native fetch
19
- - **Output:** `cli-table3` + `chalk`
20
- - **Config:** `~/.xevol/config.json`
21
- - **Lang:** TypeScript
22
-
23
- ## Auth — Device Authorization Flow (public-facing)
24
-
25
- No passwords in the CLI. Browser handles all auth complexity (2FA, OAuth, SSO, password managers).
26
-
27
- ### Login flow
28
- ```
29
- xevol login
30
- ```
31
-
32
- 1. CLI calls `POST /auth/cli/device-code` → gets `{ deviceCode, userCode, verificationUrl, expiresIn, interval }`
33
- 2. Opens browser to `https://xevol.com/cli-auth?code=ABCD-1234`
34
- 3. Prints fallback for headless environments:
35
-
36
- ```
37
- Open this URL to authenticate:
38
- https://xevol.com/cli-auth?code=ABCD-1234
39
-
40
- Waiting for approval... (expires in 5 min)
41
- ```
42
-
43
- 4. CLI polls `POST /auth/cli/device-token` with `{ deviceCode }` every `interval` seconds
44
- 5. User logs in on browser (existing session or fresh), sees "Authorize XEVol CLI?" + the user code for verification
45
- 6. User clicks Approve
46
- 7. CLI receives long-lived token, stores in `~/.xevol/config.json`:
47
-
48
- ```json
49
- {
50
- "apiUrl": "https://api.xevol.com",
51
- "token": "xevol_cli_...",
52
- "accountId": "...",
53
- "email": "kuka@xevol.com",
54
- "expiresAt": "2026-08-02T00:00:00Z"
55
- }
56
- ```
57
-
58
- ### Token mode (CI/CD, servers)
59
- ```
60
- xevol login --token <token>
61
- ```
62
- Validates via `GET /auth/session`, stores if valid. For automation where browser isn't available.
63
-
64
- ### Logout
65
- ```
66
- xevol logout
67
- ```
68
- Revokes token server-side, clears local config.
69
-
70
- ### Who am I
71
- ```
72
- xevol whoami
73
- > kuka@xevol.com (Pro plan, 47 transcriptions this month)
74
- ```
75
-
76
- ### Env override
77
- ```
78
- XEVOL_API_URL=http://localhost:8081
79
- XEVOL_TOKEN=<token>
80
- ```
81
-
82
- ### Precedence
83
- 1. `--token` flag
84
- 2. `XEVOL_TOKEN` env var
85
- 3. `~/.xevol/config.json`
86
-
87
- ### New API endpoints needed (xevol-api)
88
-
89
- | Endpoint | Method | Description |
90
- |---|---|---|
91
- | `/auth/cli/device-code` | POST | Generate device code + user code |
92
- | `/auth/cli/device-token` | POST | Poll for token (pending/approved/expired) |
93
- | `/auth/cli/revoke` | POST | Revoke CLI token |
94
- | `/cli-auth` (frontend) | GET | Browser page showing user code + approve button |
95
-
96
- Token format: `xevol_cli_<random>` — separate from session tokens, longer-lived (6 months), revocable from account settings.
97
-
98
- ## Commands
99
-
100
- ### `xevol list`
101
-
102
- List transcriptions with pagination.
103
-
104
- ```
105
- xevol list
106
- xevol list --page 2 --limit 50
107
- xevol list --json
108
- ```
109
-
110
- **API:** `GET /v1/transcription/transcriptions?page=N&limit=N`
111
- **Auth:** session token in cookie header
112
-
113
- **Default output:**
114
- ```
115
- Transcriptions (page 1/3, 47 total)
116
-
117
- ID Status Lang Duration Channel Title
118
- ─────────────────────────────────────────────────────────────────────────
119
- abc123def45 completed en 12:34 Y Combinator How to Build a Startup
120
- xyz789ghi01 completed de 45:12 Lex Fridman Interview with...
121
- ...
122
-
123
- Page 1 of 3 — use --page 2 for next
124
- ```
125
-
126
- **JSON output:** raw API response.
127
-
128
- ### `xevol add <youtube-url>`
129
-
130
- Submit a YouTube URL for transcription.
131
-
132
- ```
133
- xevol add "https://youtube.com/watch?v=abc123"
134
- xevol add "https://youtube.com/watch?v=abc123" --lang de
135
- xevol add "https://youtube.com/watch?v=abc123" --wait
136
- ```
137
-
138
- **API:** `GET /v1/transcription/add?url=<url>&outputLang=<lang>`
139
- **Auth:** session token in cookie header
140
-
141
- **Default output:**
142
- ```
143
- ✓ Transcription created: abc123def45
144
- Status: pending
145
- ```
146
-
147
- **With `--wait`:** polls `GET /v1/transcription/status/:id` every 5s until completed/error.
148
- ```
149
- ✓ Transcription created: abc123def45
150
- ⠋ Processing... (30s)
151
- ✓ Completed: "How to Build a Startup" (12:34)
152
- ```
153
-
154
- **Options:**
155
- - `--lang <code>` — output language (default: `en`)
156
- - `--wait` — poll until complete
157
- - `--json` — raw JSON response
158
-
159
- ### `xevol view <id>`
160
-
161
- View a transcription's raw content.
162
-
163
- ```
164
- xevol view abc123def45
165
- xevol view abc123def45 --raw
166
- xevol view abc123def45 --json
167
- ```
168
-
169
- **API:** `GET /v1/transcription/analysis/:id`
170
-
171
- **Default output:**
172
- ```
173
- How to Build a Startup
174
- Channel: Y Combinator (@ycombinator)
175
- Duration: 12:34 | Lang: en | Status: completed
176
- URL: https://youtube.com/watch?v=abc123
177
- ───────────────────────────────────────
178
-
179
- [summary text]
180
-
181
- ───────────────────────────────────────
182
- Full transcript: use --raw
183
- ```
184
-
185
- **With `--raw`:** prints full `content` or `cleanContent` field to stdout (pipeable).
186
-
187
- ```
188
- xevol view abc123def45 --raw > transcript.txt
189
- xevol view abc123def45 --raw --clean # cleanContent instead of content
190
- ```
191
-
192
- ### `xevol spikes <id>`
193
-
194
- View formatted AI-generated spikes for a transcription.
195
-
196
- ```
197
- xevol spikes abc123def45
198
- xevol spikes abc123def45 --json
199
- ```
200
-
201
- **API:** Direct query — `GET /spikes` where `transcriptionId = :id`
202
-
203
- Since spikes are generated on-demand via `POST /spikes/:transcriptionId` with a `promptId`, the CLI needs to:
204
-
205
- 1. Check if spikes exist for this transcription
206
- 2. If yes, display them
207
- 3. If no, offer to generate (requires `--prompt <id>`)
208
-
209
- ```
210
- xevol spikes abc123def45
211
- ```
212
-
213
- **Output (if spikes exist):**
214
- ```
215
- Spikes for "How to Build a Startup"
216
- ───────────────────────────────────────
217
-
218
- [formatted spike content — markdown rendered to terminal]
219
- ```
220
-
221
- **Output (no spikes):**
222
- ```
223
- No spikes found for abc123def45.
224
- Generate with: xevol spikes abc123def45 --generate --prompt <promptId>
225
- ```
226
-
227
- **Generate:**
228
- ```
229
- xevol spikes abc123def45 --generate --prompt default --lang en
230
- ```
231
- Calls `POST /spikes/:id` with `{ promptId, outputLang }`, then polls stream until complete.
232
-
233
- ## Project Structure
234
-
235
- ```
236
- xevol-cli/
237
- ├── src/
238
- │ ├── index.ts # Entry: commander setup, register commands
239
- │ ├── commands/
240
- │ │ ├── login.ts # login + logout
241
- │ │ ├── list.ts # list transcriptions
242
- │ │ ├── add.ts # add youtube url
243
- │ │ ├── view.ts # view transcript
244
- │ │ └── spikes.ts # view/generate spikes
245
- │ └── lib/
246
- │ ├── api.ts # fetch wrapper (base URL, auth headers, error handling)
247
- │ ├── config.ts # read/write ~/.xevol/config.json
248
- │ └── output.ts # table formatting, spinners, colors
249
- ├── package.json
250
- ├── tsconfig.json
251
- ├── PLAN.md
252
- └── README.md
253
- ```
254
-
255
- ## package.json
256
-
257
- ```json
258
- {
259
- "name": "xevol-cli",
260
- "version": "0.1.0",
261
- "type": "module",
262
- "bin": {
263
- "xevol": "./src/index.ts"
264
- },
265
- "dependencies": {
266
- "commander": "^13.0.0",
267
- "chalk": "^5.4.0",
268
- "cli-table3": "^0.6.5",
269
- "ora": "^8.0.0",
270
- "@inquirer/prompts": "^7.0.0"
271
- },
272
- "devDependencies": {
273
- "@types/bun": "latest",
274
- "typescript": "^5.7.0"
275
- }
276
- }
277
- ```
278
-
279
- ## Install & Link
280
-
281
- ```bash
282
- cd ~/stack/xevol-cli
283
- bun install
284
- bun link # → `xevol` available globally
285
- ```
286
-
287
- ## Implementation Order
288
-
289
- ### Phase 1: API-side (xevol-api)
290
- 1. `POST /auth/cli/device-code` — generate device + user codes, store in Redis with TTL
291
- 2. `POST /auth/cli/device-token` — poll endpoint, returns pending/approved/expired
292
- 3. `POST /auth/cli/revoke` — revoke CLI token
293
- 4. CLI token model — new table or extend existing API keys with `type: "cli"`
294
- 5. Frontend: `/cli-auth` page — show user code, approve button, calls device-token approve
295
-
296
- ### Phase 2: CLI
297
- 1. `lib/config.ts` + `lib/api.ts` — foundation
298
- 2. `commands/login.ts` — device auth flow + `--token` fallback
299
- 3. `commands/list.ts` — list transcriptions
300
- 4. `commands/add.ts` — add URL + polling
301
- 5. `commands/view.ts` — view transcript
302
- 6. `commands/spikes.ts` — view/generate spikes
303
- 7. `lib/output.ts` — polish formatting
304
-
305
- ### Phase 3: Distribution
306
- 1. npm publish as `xevol-cli` (or `@xevol/cli`)
307
- 2. README with install + auth flow
308
- 3. `xevol update` — self-update command
309
-
310
- Estimate: Phase 1 ~3-4h, Phase 2 ~2-3h, Phase 3 ~1h.
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env bun
2
- console.log("xevol v0.0.1 — coming soon");