@libria/scaffold 0.2.0 → 0.2.2
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/.clean-publish.hash +1 -1
- package/dist/cli/cli.mjs +444 -3
- package/dist/cli/cli.mjs.map +1 -1
- package/dist/cli/index.cjs +242 -2
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +39 -8
- package/dist/cli/index.d.mts +39 -8
- package/dist/cli/index.mjs +198 -2
- package/dist/cli/index.mjs.map +1 -1
- package/package.json +7 -2
- package/dist/templates/angular/index.cjs +0 -20
- package/dist/templates/angular/index.cjs.map +0 -1
- package/dist/templates/angular/index.d.cts +0 -31
- package/dist/templates/angular/index.d.mts +0 -31
- package/dist/templates/angular/index.mjs +0 -20
- package/dist/templates/angular/index.mjs.map +0 -1
- package/dist/templates/angular/plugin.json +0 -5
- package/dist/templates/ts-lib/files/.prettierrc +0 -8
- package/dist/templates/ts-lib/files/LICENSE +0 -21
- package/dist/templates/ts-lib/files/README.md +0 -58
- package/dist/templates/ts-lib/files/eslint.config.mjs +0 -106
- package/dist/templates/ts-lib/files/package.json +0 -61
- package/dist/templates/ts-lib/files/src/index.ts +0 -31
- package/dist/templates/ts-lib/files/tests/my.test.ts +0 -44
- package/dist/templates/ts-lib/files/tsconfig.json +0 -22
- package/dist/templates/ts-lib/files/tsconfig.test.json +0 -8
- package/dist/templates/ts-lib/files/tsdown.config.ts +0 -10
- package/dist/templates/ts-lib/files/vitest.config.ts +0 -12
- package/dist/templates/ts-lib/index.cjs +0 -19
- package/dist/templates/ts-lib/index.cjs.map +0 -1
- package/dist/templates/ts-lib/index.d.cts +0 -29
- package/dist/templates/ts-lib/index.d.mts +0 -29
- package/dist/templates/ts-lib/index.mjs +0 -19
- package/dist/templates/ts-lib/index.mjs.map +0 -1
- package/dist/templates/ts-lib/plugin.json +0 -5
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import eslint from '@eslint/js';
|
|
2
|
-
import tseslint from 'typescript-eslint';
|
|
3
|
-
import prettierConfig from 'eslint-config-prettier';
|
|
4
|
-
import prettierPlugin from 'eslint-plugin-prettier';
|
|
5
|
-
import unusedImports from 'eslint-plugin-unused-imports';
|
|
6
|
-
import importPlugin from 'eslint-plugin-import';
|
|
7
|
-
|
|
8
|
-
export default tseslint.config(
|
|
9
|
-
eslint.configs.recommended,
|
|
10
|
-
...tseslint.configs.recommended,
|
|
11
|
-
prettierConfig,
|
|
12
|
-
{
|
|
13
|
-
files: ['src/**/*.ts', 'src/**/*.tsx'], // Only lint src folder
|
|
14
|
-
languageOptions: {
|
|
15
|
-
parser: tseslint.parser,
|
|
16
|
-
parserOptions: {
|
|
17
|
-
project: './tsconfig.json',
|
|
18
|
-
tsconfigRootDir: import.meta.dirname,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
plugins: {
|
|
22
|
-
import: importPlugin,
|
|
23
|
-
prettier: prettierPlugin,
|
|
24
|
-
'unused-imports': unusedImports,
|
|
25
|
-
},
|
|
26
|
-
rules: {
|
|
27
|
-
// Prettier integration
|
|
28
|
-
'prettier/prettier': 'error',
|
|
29
|
-
|
|
30
|
-
// Unused variables and imports
|
|
31
|
-
'unused-imports/no-unused-imports': 'error',
|
|
32
|
-
'unused-imports/no-unused-vars': [
|
|
33
|
-
'warn',
|
|
34
|
-
{
|
|
35
|
-
vars: 'all',
|
|
36
|
-
varsIgnorePattern: '^_',
|
|
37
|
-
args: 'after-used',
|
|
38
|
-
argsIgnorePattern: '^_',
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
'@typescript-eslint/no-unused-vars': [
|
|
42
|
-
'error',
|
|
43
|
-
{
|
|
44
|
-
argsIgnorePattern: '^_',
|
|
45
|
-
varsIgnorePattern: '^_',
|
|
46
|
-
caughtErrorsIgnorePattern: '^_',
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
|
|
50
|
-
// Explicit member accessibility (public, private, protected)
|
|
51
|
-
'@typescript-eslint/explicit-member-accessibility': [
|
|
52
|
-
'error',
|
|
53
|
-
{
|
|
54
|
-
accessibility: 'explicit',
|
|
55
|
-
overrides: {
|
|
56
|
-
constructors: 'off', // constructors default to public, no need to specify
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
|
|
61
|
-
// Explicit function return types
|
|
62
|
-
'@typescript-eslint/explicit-function-return-type': [
|
|
63
|
-
'warn',
|
|
64
|
-
{
|
|
65
|
-
allowExpressions: true,
|
|
66
|
-
allowTypedFunctionExpressions: true,
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
|
|
70
|
-
// Sort imports alphabetically
|
|
71
|
-
'import/order': [
|
|
72
|
-
'error',
|
|
73
|
-
{
|
|
74
|
-
groups: [
|
|
75
|
-
'builtin', // Node.js built-in modules
|
|
76
|
-
'external', // npm packages
|
|
77
|
-
'internal', // Your own modules
|
|
78
|
-
'parent', // Parent directories
|
|
79
|
-
'sibling', // Same directory
|
|
80
|
-
'index', // Index files
|
|
81
|
-
],
|
|
82
|
-
'newlines-between': 'always',
|
|
83
|
-
alphabetize: {
|
|
84
|
-
order: 'asc',
|
|
85
|
-
caseInsensitive: true,
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
|
|
90
|
-
// No unused imports
|
|
91
|
-
'no-unused-vars': 'off', // Turn off base rule (using TS version)
|
|
92
|
-
// 'import/no-unused-modules': ['warn', { unusedExports: true }],
|
|
93
|
-
|
|
94
|
-
// Additional helpful rules
|
|
95
|
-
'no-console': ['warn', { allow: ['log', 'warn', 'error'] }],
|
|
96
|
-
'@typescript-eslint/no-explicit-any': 'warn',
|
|
97
|
-
'@typescript-eslint/no-non-null-assertion': 'warn',
|
|
98
|
-
'prefer-const': 'error',
|
|
99
|
-
'no-var': 'error',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
// Ignore patterns (replaces .eslintignore)
|
|
104
|
-
ignores: ['node_modules/**', 'dist/**', 'build/**', '*.config.js', 'coverage/**', 'scripts/**', '.tmp/**', './tmp-clean-publish/**'],
|
|
105
|
-
}
|
|
106
|
-
);
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{PACKAGE_NAME}",
|
|
3
|
-
"version": "{VERSION}",
|
|
4
|
-
"description": "{DESCRIPTION}",
|
|
5
|
-
"main": "dist/index.cjs",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"require": {
|
|
10
|
-
"types": "./dist/index.d.cts",
|
|
11
|
-
"default": "./dist/index.cjs"
|
|
12
|
-
},
|
|
13
|
-
"import": {
|
|
14
|
-
"types": "./dist/index.d.mts",
|
|
15
|
-
"default": "./dist/index.mjs"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"type": "module",
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsdown",
|
|
22
|
-
"test": "vitest",
|
|
23
|
-
"lint": "eslint . --ext .ts",
|
|
24
|
-
"lint:fix": "eslint . --ext .ts --fix",
|
|
25
|
-
"format": "prettier --write .",
|
|
26
|
-
"test:coverage": "vitest --coverage",
|
|
27
|
-
"clean": "npm run lint:fix && npm run format",
|
|
28
|
-
"build-and-publish": "npm run build && npx @libria/clean-publish build && npx @libria/clean-publish publish"
|
|
29
|
-
},
|
|
30
|
-
"repository": {
|
|
31
|
-
"type": "git",
|
|
32
|
-
"url": "git+https://github.com/{GITHUB_REPO}.git"
|
|
33
|
-
},
|
|
34
|
-
"keywords": [
|
|
35
|
-
"typescript"
|
|
36
|
-
],
|
|
37
|
-
"author": "{AUTHOR}",
|
|
38
|
-
"license": "MIT",
|
|
39
|
-
"bugs": {
|
|
40
|
-
"url": "https://github.com/{GITHUB_REPO}/issues"
|
|
41
|
-
},
|
|
42
|
-
"homepage": "https://github.com/{GITHUB_REPO}#readme",
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@eslint/eslintrc": "^3.3.3",
|
|
45
|
-
"@eslint/js": "^9.39.2",
|
|
46
|
-
"@types/node": "^22.0.0",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
48
|
-
"@typescript-eslint/parser": "^8.0.0",
|
|
49
|
-
"@vitest/coverage-v8": "^2.0.0",
|
|
50
|
-
"eslint": "^9.0.0",
|
|
51
|
-
"eslint-config-prettier": "^10.0.0",
|
|
52
|
-
"eslint-plugin-import": "^2.30.0",
|
|
53
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
54
|
-
"eslint-plugin-unused-imports": "^4.0.0",
|
|
55
|
-
"prettier": "^3.0.0",
|
|
56
|
-
"tsdown": "^0.20.0",
|
|
57
|
-
"typescript": "^5.0.0",
|
|
58
|
-
"typescript-eslint": "^8.0.0",
|
|
59
|
-
"vitest": "^2.0.0"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds two numbers together.
|
|
3
|
-
*/
|
|
4
|
-
export function add(a: number, b: number): number {
|
|
5
|
-
return a + b;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Subtracts the second number from the first.
|
|
10
|
-
*/
|
|
11
|
-
export function subtract(a: number, b: number): number {
|
|
12
|
-
return a - b;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Multiplies two numbers together.
|
|
17
|
-
*/
|
|
18
|
-
export function multiply(a: number, b: number): number {
|
|
19
|
-
return a * b;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Divides the first number by the second.
|
|
24
|
-
* @throws Error if divisor is zero.
|
|
25
|
-
*/
|
|
26
|
-
export function divide(a: number, b: number): number {
|
|
27
|
-
if (b === 0) {
|
|
28
|
-
throw new Error('Cannot divide by zero');
|
|
29
|
-
}
|
|
30
|
-
return a / b;
|
|
31
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { add, subtract, multiply, divide } from '../src';
|
|
3
|
-
|
|
4
|
-
describe('Math functions', () => {
|
|
5
|
-
describe('add', () => {
|
|
6
|
-
it('should add two positive numbers', () => {
|
|
7
|
-
expect(add(2, 3)).toBe(5);
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
it('should handle negative numbers', () => {
|
|
11
|
-
expect(add(-1, 1)).toBe(0);
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
describe('subtract', () => {
|
|
16
|
-
it('should subtract two numbers', () => {
|
|
17
|
-
expect(subtract(5, 3)).toBe(2);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should return negative when second is larger', () => {
|
|
21
|
-
expect(subtract(3, 5)).toBe(-2);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
describe('multiply', () => {
|
|
26
|
-
it('should multiply two numbers', () => {
|
|
27
|
-
expect(multiply(4, 5)).toBe(20);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('should return zero when multiplied by zero', () => {
|
|
31
|
-
expect(multiply(5, 0)).toBe(0);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
describe('divide', () => {
|
|
36
|
-
it('should divide two numbers', () => {
|
|
37
|
-
expect(divide(10, 2)).toBe(5);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('should throw when dividing by zero', () => {
|
|
41
|
-
expect(() => divide(5, 0)).toThrow('Cannot divide by zero');
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
// Generate .d.ts files
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"outDir": "./dist",
|
|
12
|
-
"rootDir": "./src"
|
|
13
|
-
},
|
|
14
|
-
"include": [
|
|
15
|
-
"src/**/*"
|
|
16
|
-
],
|
|
17
|
-
"exclude": [
|
|
18
|
-
"node_modules",
|
|
19
|
-
"dist",
|
|
20
|
-
"tests"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`path`);l=c(l);let u=require(`url`),d=require(`child_process`),f=require(`util`),p=require(`fs-extra`);p=c(p);let m=require(`@libria/plugin-loader`),h=require(`node:async_hooks`),g=require(`node:process`);g=c(g);let _=require(`node:readline`);_=c(_);let ee=require(`node:util`);const te=e=>e.name===`backspace`,ne=e=>e.name===`tab`,v=e=>e.name===`enter`||e.name===`return`;var re=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},ie=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},y=class extends Error{name=`ExitPromptError`},ae=class extends Error{name=`HookError`},oe=class extends Error{name=`ValidationError`};const b=new h.AsyncLocalStorage;function se(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function ce(e,t){let n=se(e);return b.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function x(){let e=b.getStore();if(!e)throw new ae(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function S(){return x().rl}function C(e){return h.AsyncResource.bind((...t)=>{let n=x(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function w(e){let t=x(),{index:n}=t,r=e({get(){return t.hooks[n]},set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}function le(){x().handleChange()}const T={queue(e){let t=x(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(S());if(r!=null&&typeof r!=`function`)throw new oe(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=x();C(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=x();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function E(e){return w(t=>{let n=h.AsyncResource.bind(function(e){t.get()!==e&&(t.set(e),le())});if(t.initialized)return[t.get(),n];let r=typeof e==`function`?e():e;return t.set(r),[r,n]})}function D(e,t){w(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&T.queue(e),n.set(t)})}var ue=o(((e,t)=>{let n=require(`node:tty`)?.WriteStream?.prototype?.hasColors?.()??!1,r=(e,t)=>{if(!n)return e=>e;let r=`\u001B[${e}m`,i=`\u001B[${t}m`;return e=>{let n=e+``,a=n.indexOf(i);if(a===-1)return r+n+i;let o=r,s=0,c=(t===22?i:``)+r;for(;a!==-1;)o+=n.slice(s,a)+c,s=a+i.length,a=n.indexOf(i,s);return o+=n.slice(s)+i,o}},i={};i.reset=r(0,0),i.bold=r(1,22),i.dim=r(2,22),i.italic=r(3,23),i.underline=r(4,24),i.overline=r(53,55),i.inverse=r(7,27),i.hidden=r(8,28),i.strikethrough=r(9,29),i.black=r(30,39),i.red=r(31,39),i.green=r(32,39),i.yellow=r(33,39),i.blue=r(34,39),i.magenta=r(35,39),i.cyan=r(36,39),i.white=r(37,39),i.gray=r(90,39),i.bgBlack=r(40,49),i.bgRed=r(41,49),i.bgGreen=r(42,49),i.bgYellow=r(43,49),i.bgBlue=r(44,49),i.bgMagenta=r(45,49),i.bgCyan=r(46,49),i.bgWhite=r(47,49),i.bgGray=r(100,49),i.redBright=r(91,39),i.greenBright=r(92,39),i.yellowBright=r(93,39),i.blueBright=r(94,39),i.magentaBright=r(95,39),i.cyanBright=r(96,39),i.whiteBright=r(97,39),i.bgRedBright=r(101,49),i.bgGreenBright=r(102,49),i.bgYellowBright=r(103,49),i.bgBlueBright=r(104,49),i.bgMagentaBright=r(105,49),i.bgCyanBright=r(106,49),i.bgWhiteBright=r(107,49),t.exports=i}));function de(){return g.default.platform===`win32`?!!g.default.env.WT_SESSION||!!g.default.env.TERMINUS_SUBLIME||g.default.env.ConEmuTask===`{cmd::Cmder}`||g.default.env.TERM_PROGRAM===`Terminus-Sublime`||g.default.env.TERM_PROGRAM===`vscode`||g.default.env.TERM===`xterm-256color`||g.default.env.TERM===`alacritty`||g.default.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:g.default.env.TERM!==`linux`}const O={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},k={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},fe={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},pe={...O,...k},me={...O,...fe};var he=de()?pe:me;Object.entries(k);var A=c(ue(),1);const ge={prefix:{idle:A.default.blue(`?`),done:A.default.green(he.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>A.default.yellow(e))},style:{answer:A.default.cyan,message:A.default.bold,error:e=>A.default.red(`> ${e}`),defaultAnswer:e=>A.default.dim(`(${e})`),help:A.default.dim,highlight:A.default.cyan,key:e=>A.default.cyan(A.default.bold(`<${e}>`))}};function j(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function M(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=j(n)&&j(r)?M(n,r):r}return t}function N(...e){return M(ge,...e.filter(e=>e!=null))}function P({status:e=`idle`,theme:t}){let[n,r]=E(!1),[i,a]=E(0),{prefix:o,spinner:s}=N(t);return D(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function _e(e){return E({current:e})[0]}function F(e){let t=_e(e);t.current=e,D(e=>{let n=!1,r=C((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var ve=o(((e,t)=>{t.exports=r;function n(e){let t={defaultWidth:0,output:process.stdout,tty:require(`tty`)};return e?(Object.keys(t).forEach(function(n){e[n]||(e[n]=t[n])}),e):t}function r(e){let t=n(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}})),ye=o(((e,t)=>{t.exports=({onlyFirst:e=!1}={})=>{let t=[`[\\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(t,e?void 0:`g`)}})),I=o(((e,t)=>{let n=ye();t.exports=e=>typeof e==`string`?e.replace(n(),``):e})),be=o(((e,t)=>{let n=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);t.exports=n,t.exports.default=n})),xe=o(((e,t)=>{t.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}})),Se=o(((e,t)=>{let n=I(),r=be(),i=xe(),a=e=>{if(typeof e!=`string`||e.length===0||(e=n(e),e.length===0))return 0;e=e.replace(i(),` `);let t=0;for(let n=0;n<e.length;n++){let i=e.codePointAt(n);i<=31||i>=127&&i<=159||i>=768&&i<=879||(i>65535&&n++,t+=r(i)?2:1)}return t};t.exports=a,t.exports.default=a})),Ce=o(((e,t)=>{t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}})),L=o(((e,t)=>{let n=Ce(),r={};for(let e of Object.keys(n))r[n[e]]=e;let i={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};t.exports=i;for(let e of Object.keys(i)){if(!(`channels`in i[e]))throw Error(`missing channels property: `+e);if(!(`labels`in i[e]))throw Error(`missing channel labels property: `+e);if(i[e].labels.length!==i[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],`channels`,{value:t}),Object.defineProperty(i[e],`labels`,{value:n})}i.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(s*60,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,c*100,l*100]},i.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+1/2};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[i*360,a*100,l*100]},i.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],a=i.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[a,o*100,r*100]},i.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),a=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[a*100,o*100,s*100,i*100]};function a(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}i.rgb.keyword=function(e){let t=r[e];if(t)return t;let i=1/0,o;for(let t of Object.keys(n)){let r=n[t],s=a(e,r);s<i&&(i=s,o=t)}return o},i.keyword.rgb=function(e){return n[e]},i.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let i=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,a*100,o*100]},i.rgb.lab=function(e){let t=i.rgb.xyz(e),n=t[0],r=t[1],a=t[2];return n/=95.047,r/=100,a/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,[116*r-16,500*(n-r),200*(r-a)]},i.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=r*255,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+(i-s)*6*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=o*255;return c},i.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a;let o=(r+n)/2;return[t,(r===0?2*i/(a+i):2*n/(r+n))*100,o*100]},i.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},i.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,a*100,o*100]},i.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,o&1&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c;break}return[l*255,u*255,d*255]},i.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[a*255,o*255,s*255]},i.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]},i.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},i.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;a=(t+16)/116,i=n/500+a,o=a-r/200;let s=a**3,c=i**3,l=o**3;return a=s>.008856?s:(a-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]},i.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},i.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},i.rgb.ansi16=function(e,t=null){let[n,r,a]=e,o=t===null?i.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(~~(e>50)+1)*.5;return[(t&1)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},i.ansi256.rgb=function(e){if(e>=232){let t=(e-232)*10+8;return[t,t,t]}e-=16;let t;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},i.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return`000000`.substring(t.length)+t},i.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},i.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[c*360,o*100,s*100]},i.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},i.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},i.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},i.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],r*100,n*100]},i.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],r*100,n*100]},i.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],(n-t)*100,(1-n)*100]},i.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}})),we=o(((e,t)=>{let n=L();function r(){let e={},t=Object.keys(n);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function i(e){let t=r(),i=[e];for(t[e].distance=0;i.length;){let e=i.pop(),r=Object.keys(n[e]);for(let n=r.length,a=0;a<n;a++){let n=r[a],o=t[n];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,i.unshift(n))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let r=[t[e].parent,e],i=n[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),i=a(n[t[o].parent][o],i),o=t[o].parent;return i.conversion=r,i}t.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}})),Te=o(((e,t)=>{let n=L(),r=we(),i={},a=Object.keys(n);function o(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}function s(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}a.forEach(e=>{i[e]={},Object.defineProperty(i[e],`channels`,{value:n[e].channels}),Object.defineProperty(i[e],`labels`,{value:n[e].labels});let t=r(e);Object.keys(t).forEach(n=>{let r=t[n];i[e][n]=s(r),i[e][n].raw=o(r)})}),t.exports=i})),Ee=o(((e,t)=>{let n=(e,t)=>(...n)=>`\u001B[${e(...n)+t}m`,r=(e,t)=>(...n)=>{let r=e(...n);return`\u001B[${38+t};5;${r}m`},i=(e,t)=>(...n)=>{let r=e(...n);return`\u001B[${38+t};2;${r[0]};${r[1]};${r[2]}m`},a=e=>e,o=(e,t,n)=>[e,t,n],s=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})},c,l=(e,t,n,r)=>{c===void 0&&(c=Te());let i=r?10:0,a={};for(let[r,o]of Object.entries(c)){let s=r===`ansi16`?`ansi`:r;r===t?a[s]=e(n,i):typeof o==`object`&&(a[s]=e(o[t],i))}return a};function u(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[n,r]of Object.entries(t)){for(let[n,i]of Object.entries(r))t[n]={open:`\u001B[${i[0]}m`,close:`\u001B[${i[1]}m`},r[n]=t[n],e.set(i[0],i[1]);Object.defineProperty(t,n,{value:r,enumerable:!1})}return Object.defineProperty(t,`codes`,{value:e,enumerable:!1}),t.color.close=`\x1B[39m`,t.bgColor.close=`\x1B[49m`,s(t.color,`ansi`,()=>l(n,`ansi16`,a,!1)),s(t.color,`ansi256`,()=>l(r,`ansi256`,a,!1)),s(t.color,`ansi16m`,()=>l(i,`rgb`,o,!1)),s(t.bgColor,`ansi`,()=>l(n,`ansi16`,a,!0)),s(t.bgColor,`ansi256`,()=>l(r,`ansi256`,a,!0)),s(t.bgColor,`ansi16m`,()=>l(i,`rgb`,o,!0)),t}Object.defineProperty(t,`exports`,{enumerable:!0,get:u})})),De=o(((e,t)=>{let n=Se(),r=I(),i=Ee(),a=new Set([`\x1B`,``]),o=e=>`${a.values().next().value}[${e}m`,s=e=>e.split(` `).map(e=>n(e)),c=(e,t,i)=>{let o=[...t],s=!1,c=n(r(e[e.length-1]));for(let[t,r]of o.entries()){let l=n(r);if(c+l<=i?e[e.length-1]+=r:(e.push(r),c=0),a.has(r))s=!0;else if(s&&r===`m`){s=!1;continue}s||(c+=l,c===i&&t<o.length-1&&(e.push(``),c=0))}!c&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},l=e=>{let t=e.split(` `),r=t.length;for(;r>0&&!(n(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(` `)+t.slice(r).join(``)},u=(e,t,r={})=>{if(r.trim!==!1&&e.trim()===``)return``;let u=``,d=``,f,p=s(e),m=[``];for(let[i,a]of e.split(` `).entries()){r.trim!==!1&&(m[m.length-1]=m[m.length-1].trimLeft());let e=n(m[m.length-1]);if(i!==0&&(e>=t&&(r.wordWrap===!1||r.trim===!1)&&(m.push(``),e=0),(e>0||r.trim===!1)&&(m[m.length-1]+=` `,e++)),r.hard&&p[i]>t){let n=t-e,r=1+Math.floor((p[i]-n-1)/t);Math.floor((p[i]-1)/t)<r&&m.push(``),c(m,a,t);continue}if(e+p[i]>t&&e>0&&p[i]>0){if(r.wordWrap===!1&&e<t){c(m,a,t);continue}m.push(``)}if(e+p[i]>t&&r.wordWrap===!1){c(m,a,t);continue}m[m.length-1]+=a}r.trim!==!1&&(m=m.map(l)),u=m.join(`
|
|
2
|
-
`);for(let[e,t]of[...u].entries()){if(d+=t,a.has(t)){let t=parseFloat(/\d[^m]*/.exec(u.slice(e,e+4)));f=t===39?null:t}let n=i.codes.get(Number(f));f&&n&&(u[e+1]===`
|
|
3
|
-
`?d+=o(n):t===`
|
|
4
|
-
`&&(d+=o(f)))}return d};t.exports=(e,t,n)=>String(e).normalize().replace(/\r\n/g,`
|
|
5
|
-
`).split(`
|
|
6
|
-
`).map(e=>u(e,t,n)).join(`
|
|
7
|
-
`)})),Oe=c(ve(),1),ke=c(De(),1);function R(e,t){return e.split(`
|
|
8
|
-
`).flatMap(e=>(0,ke.default)(e,t,{trim:!1,hard:!0}).split(`
|
|
9
|
-
`).map(e=>e.trimEnd())).join(`
|
|
10
|
-
`)}function Ae(){return(0,Oe.default)({defaultWidth:80,output:S().output})}var je=o(((e,t)=>{let n=require(`stream`);t.exports=class extends n{#e=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on(`pipe`,this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,t){return this._dest?this._dest[e]:this._src?this._src[e]:t}#n(e,...t){typeof this._dest?.[e]==`function`&&this._dest[e](...t),typeof this._src?.[e]==`function`&&this._src[e](...t)}get isTTY(){return this.#e===null?this.#t(`isTTY`,!1):this.#e}set isTTY(e){this.#e=e}get rows(){return this.#t(`rows`)}get columns(){return this.#t(`columns`)}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,t){return this._dest=e,super.pipe(e,t)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return e.indexOf(this._prompt)===0&&(e=e.slice(this._prompt.length),e=e.replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit(`data`,e);this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit(`data`,this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit(`data`,e)}end(e){this.muted&&(e=e&&this.replace?e.toString().replace(/./g,this.replace):null),e&&this.emit(`data`,e),this.emit(`end`)}destroy(...e){return this.#n(`destroy`,...e)}destroySoon(...e){return this.#n(`destroySoon`,...e)}close(...e){return this.#n(`close`,...e)}}}));const z=[];z.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&z.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&z.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const B=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,V=Symbol.for(`signal-exit emitter`),H=globalThis,Me=Object.defineProperty.bind(Object);var Ne=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(H[V])return H[V];Me(H,V,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},U=class{};const Pe=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var Fe=class extends U{onExit(){return()=>{}}load(){}unload(){}},Ie=class extends U{#e=W.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new Ne;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of z)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!B(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of z)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,z.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return B(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&B(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}else return n.call(this.#n,e,...t)}};const W=globalThis.process,{onExit:Le,load:Re,unload:ze}=Pe(B(W)?new Ie(W):new Fe),G=(e=1)=>e>0?`[${e}A`:``,K=(e=1)=>e>0?`[${e}B`:``,q=(e,t)=>typeof t==`number`&&!Number.isNaN(t)?`[${t+1};${e+1}H`:`[${e+1}G`,J=`\x1B[2K`,Y=e=>e>0?(J+G(1)).repeat(e-1)+J+`\x1B[G`:``,X=e=>e.split(`
|
|
11
|
-
`).length,Be=e=>e.split(`
|
|
12
|
-
`).pop()??``;var Ve=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,t=``){let n=(0,ee.stripVTControlCharacters)(Be(e)),r=n;this.rl.line.length>0&&(r=r.slice(0,-this.rl.line.length)),this.rl.setPrompt(r),this.cursorPos=this.rl.getCursorPos();let i=Ae();e=R(e,i),t=R(t,i),n.length%i===0&&(e+=`
|
|
13
|
-
`);let a=e+(t?`
|
|
14
|
-
`+t:``),o=Math.floor(n.length/i)-this.cursorPos.rows+(t?X(t):0);o>0&&(a+=G(o)),a+=q(this.cursorPos.cols),this.write(K(this.extraLinesUnderPrompt)+Y(this.height)+a),this.extraLinesUnderPrompt=o,this.height=X(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(q(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt(``);let t=K(this.extraLinesUnderPrompt);t+=e?Y(this.height):`
|
|
15
|
-
`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},He=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}},Ue=c(je(),1);function We(){let e=Error.prepareStackTrace,t=[];try{Error.prepareStackTrace=(e,n)=>{let r=n.slice(1);return t=r,r},Error().stack}catch{return t}return Error.prepareStackTrace=e,t}function Z(e){let t=We();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new Ue.default;s.pipe(r.output??process.stdout);let c=_.createInterface({terminal:!0,input:i,output:s}),l=new Ve(c),{promise:u,resolve:d,reject:f}=He.withResolver(),p=()=>f(new ie);if(a){let e=()=>f(new re({cause:a.reason}));if(a.aborted)return e(),Object.assign(u,{cancel:p});a.addEventListener(`abort`,e),o.add(()=>a.removeEventListener(`abort`,e))}o.add(Le((e,t)=>{f(new y(`User force closed the prompt with ${e} ${t}`))}));let m=()=>f(new y(`User force closed the prompt with SIGINT`));c.on(`SIGINT`,m),o.add(()=>c.removeListener(`SIGINT`,m));let g=()=>l.checkCursorPos();return c.input.on(`keypress`,g),o.add(()=>c.input.removeListener(`keypress`,g)),ce(c,i=>{let a=h.AsyncResource.bind(()=>T.clearAll());return c.on(`close`,a),o.add(()=>c.removeListener(`close`,a)),i(()=>{try{let r=e(n,e=>{setImmediate(()=>d(e))});if(r===void 0){let e=t[1]?.getFileName();throw Error(`Prompt functions must return a string.\n at ${e}`)}let[i,a]=typeof r==`string`?[r]:r;l.render(i,a),T.run()}catch(e){f(e)}}),Object.assign(u.then(e=>(T.clearAll(),e),e=>{throw T.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:!!r.clearPromptOnDone}),s.end()}).then(()=>u),{cancel:p})})}}function Q(e,t){let n=t!==!1;return/^(y|yes)/i.test(e)?n=!0:/^(n|no)/i.test(e)&&(n=!1),n}function Ge(e){return e?`Yes`:`No`}var Ke=Z((e,t)=>{let{transformer:n=Ge}=e,[r,i]=E(`idle`),[a,o]=E(``),s=N(e.theme),c=P({status:r,theme:s});F((s,c)=>{if(r===`idle`)if(v(s)){let r=Q(a,e.default);o(n(r)),i(`done`),t(r)}else if(ne(s)){let t=Ge(!Q(a,e.default));c.clearLine(0),c.write(t),o(t)}else o(c.line)});let l=a,u=``;return r===`done`?l=s.style.answer(a):u=` ${s.style.defaultAnswer(e.default===!1?`y/N`:`Y/n`)}`,`${c} ${s.style.message(e.message,r)}${u} ${l}`});const qe={validationFailureMode:`keep`};var $=Z((e,t)=>{let{prefill:n=`tab`}=e,r=N(qe,e.theme),[i,a]=E(`idle`),[o=``,s]=E(e.default),[c,l]=E(),[u,d]=E(``),f=P({status:i,theme:r});async function p(t){let{required:n,pattern:r,patternError:i=`Invalid input`}=e;return n&&!t?`You must provide a value`:r&&!r.test(t)?i:typeof e.validate==`function`?await e.validate(t)||`You must provide a valid value`:!0}F(async(e,n)=>{if(i===`idle`)if(v(e)){let e=u||o;a(`loading`);let i=await p(e);i===!0?(d(e),a(`done`),t(e)):(r.validationFailureMode===`clear`?d(``):n.write(u),l(i),a(`idle`))}else te(e)&&!u?s(void 0):ne(e)&&!u?(s(void 0),n.clearLine(0),n.write(o),d(o)):(d(n.line),l(void 0))}),D(e=>{n===`editable`&&o&&(e.write(o),d(o))},[]);let m=r.style.message(e.message,i),h=u;typeof e.transformer==`function`?h=e.transformer(u,{isFinal:i===`done`}):i===`done`&&(h=r.style.answer(u));let g;o&&i!==`done`&&!u&&(g=r.style.defaultAnswer(o));let _=``;return c&&(_=r.style.error(c)),[[f,m,g,h].filter(e=>e!==void 0).join(` `),_]});const Je=(0,f.promisify)(d.exec),Ye=l.default.dirname((0,u.fileURLToPath)(require(`url`).pathToFileURL(__filename).href)),Xe=l.default.resolve(Ye,`files`);var Ze=(0,m.definePlugin)(`scaffold-template`,`ts-lib`,{argument:`ts-lib`,async execute(e){let t=await tt(e);await $e(t),await nt(t)}});async function Qe(e,t){let{packageName:n,description:r,version:i,githubRepo:a,author:o}=t,s={"{PACKAGE_NAME}":n,"{DESCRIPTION}":r,"{VERSION}":i,"{GITHUB_REPO}":a,"{AUTHOR}":o};async function c(e){let t=await p.default.readdir(e);for(let n of t){let t=l.default.join(e,n);if((await p.default.stat(t)).isDirectory())await c(t);else if(/\.(ts|js|json|md|txt)$/i.test(n)){let e=await p.default.readFile(t,`utf-8`);for(let[t,n]of Object.entries(s))e=e.replaceAll(t,n);await p.default.writeFile(t,e,`utf-8`)}}}await c(e)}async function $e(e){let{name:t,dryRun:n,force:r}=e,i=l.default.resolve(process.cwd(),t);await p.default.pathExists(i)&&(r||(console.error(`Directory '${t}' already exists. Use --force to overwrite.`),process.exit(1)),n?console.log(`[dry-run] Would remove existing directory: ${i}`):(await p.default.remove(i),console.log(`Removed existing directory: ${i}`))),n?console.log(`[dry-run] Would create directory: ${i}`):(await p.default.ensureDir(i),console.log(`Created directory: ${i}`)),await et(Xe,i,await p.default.readdir(Xe,{withFileTypes:!0}),n),n||await Qe(i,e),n?console.log(`
|
|
16
|
-
[dry-run] No files were actually created.`):console.log(`\nProject '${t}' created successfully!`)}async function et(e,t,n,r){for(let i of n){let n=l.default.join(e,i.name),a=l.default.join(t,i.name);i.isDirectory()?(r?console.log(`[dry-run] Would create directory: ${a}`):await p.default.ensureDir(a),await et(n,a,await p.default.readdir(n,{withFileTypes:!0}),r)):i.isFile()&&(r?console.log(`[dry-run] Would copy: ${i.name}`):(await p.default.copy(n,a),console.log(`Copied: ${i.name}`)))}}async function tt(e){let t=await $({message:`Package name:`,default:e.name}),n=await $({message:`Description:`}),r=await $({message:`Version:`,default:`0.0.0`}),i=await $({message:`Author:`});return{packageName:t,description:n,version:r,author:i,githubRepo:await $({message:`GitHub repository (owner/repo):`,default:`${i}/${t}`}),...e}}async function nt(e){let{name:t,dryRun:n}=e,r=l.default.resolve(process.cwd(),t);if(n){console.log(`
|
|
17
|
-
[dry-run] Skipping post-process steps.`);return}if(await Ke({message:`Initialize git repository?`,default:!0}))try{console.log(`Initializing git repository...`),await Je(`git init`,{cwd:r}),console.log(`Git repository initialized.`)}catch(e){console.error(`Failed to initialize git repository:`,e.message)}let i=await Ke({message:`Run npm install?`,default:!0});if(i)try{console.log(`Installing dependencies (this may take a moment)...`),await Je(`npm install`,{cwd:r}),console.log(`Dependencies installed successfully.`)}catch(e){console.error(`Failed to install dependencies:`,e.message)}console.log(`
|
|
18
|
-
All done! Your project is ready.`),console.log(`\n cd ${t}`),i||console.log(` npm install`),console.log(` npm run build`),console.log(` npm test`)}module.exports=Ze;
|
|
19
|
-
//# sourceMappingURL=index.cjs.map
|