UNPKG

clockodo-cli

Version:

**Unofficial node based CLI tool for [Clockodo](https://www.clockodo.com)**

1,180 lines (1,158 loc) 856 kB
#!/usr/bin/env node var __create = Object.create; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __typeError = (msg) => { throw TypeError(msg); }; var __pow = Math.pow; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) { if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x + '" is not supported'); }); var __objRest = (source, exclude) => { var target = {}; for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop]; if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) { if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop]; } return target; }; var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; // src/types/config.ts var init_config = __esm({ "src/types/config.ts"() { } }); // src/utils/auth.ts import inquirer from "inquirer"; import axios from "axios"; import keytar from "keytar"; var setClockodoData, setJiraToken, getJiraToken; var init_auth = __esm({ "src/utils/auth.ts"() { init_config(); setClockodoData = () => __async(void 0, null, function* () { const answers = yield inquirer.prompt([ { type: "input", name: "email", message: "Enter your email address:" }, { type: "password", name: "password", message: "Enter your password:" } ]); try { const response = yield axios.post( "https://my.clockodo.com/api/apikey", { autologin: false, email: answers.email, password: answers.password, start_session: 1 }, { headers: { "Content-Type": "application/json", "X-Requested-With": "XMLHttpRequest" } } ); const apiKey = response.data.apikey; yield keytar.setPassword("clockodo-cli", "clockodo-api-key" /* ApiKey */, apiKey); yield keytar.setPassword("clockodo-cli", "clockodo-email" /* Email */, answers.email); console.log("Clockodo login successful!"); return { apiKey, email: answers.email }; } catch (error) { console.error( "Login failed:", error.response ? [ error.response.data, error.response.data.errors, error.response.data.message ] : "No response from server." ); } }); setJiraToken = () => __async(void 0, null, function* () { const { jiraEmail } = yield inquirer.prompt([ { type: "input", name: "jiraEmail", message: "Enter your Jira email:" } ]); const { jiraToken } = yield inquirer.prompt([ { type: "input", name: "jiraToken", message: "Enter your Jira API token:" } ]); const encodedJiraToken = Buffer.from(`${jiraEmail}:${jiraToken}`).toString( "base64" ); yield keytar.setPassword("clockodo-cli", "jira-api-token", encodedJiraToken); console.log("Jira API token generation successful!"); return encodedJiraToken; }); getJiraToken = () => __async(void 0, null, function* () { const jiraToken = yield keytar.getPassword("clockodo-cli", "jira-api-token" /* JiraToken */); if (jiraToken === null) { console.log("No Jira API token found. Please enter it."); const generatedJiraToken = yield setJiraToken(); yield keytar.setPassword( "clockodo-cli", "jira-api-token" /* JiraToken */, generatedJiraToken ); return generatedJiraToken; } return jiraToken; }); } }); // node_modules/@inquirer/core/dist/esm/lib/key.js var isUpKey, isDownKey, isSpaceKey, isBackspaceKey, isNumberKey, isEnterKey; var init_key = __esm({ "node_modules/@inquirer/core/dist/esm/lib/key.js"() { isUpKey = (key) => ( // The up key key.name === "up" || // Vim keybinding key.name === "k" || // Emacs keybinding key.ctrl && key.name === "p" ); isDownKey = (key) => ( // The down key key.name === "down" || // Vim keybinding key.name === "j" || // Emacs keybinding key.ctrl && key.name === "n" ); isSpaceKey = (key) => key.name === "space"; isBackspaceKey = (key) => key.name === "backspace"; isNumberKey = (key) => "123456789".includes(key.name); isEnterKey = (key) => key.name === "enter" || key.name === "return"; } }); // node_modules/@inquirer/core/dist/esm/lib/errors.js var AbortPromptError, CancelPromptError, ExitPromptError, HookError, ValidationError; var init_errors = __esm({ "node_modules/@inquirer/core/dist/esm/lib/errors.js"() { AbortPromptError = class extends Error { constructor(options) { super(); __publicField(this, "name", "AbortPromptError"); __publicField(this, "message", "Prompt was aborted"); this.cause = options == null ? void 0 : options.cause; } }; CancelPromptError = class extends Error { constructor() { super(...arguments); __publicField(this, "name", "CancelPromptError"); __publicField(this, "message", "Prompt was canceled"); } }; ExitPromptError = class extends Error { constructor() { super(...arguments); __publicField(this, "name", "ExitPromptError"); } }; HookError = class extends Error { constructor() { super(...arguments); __publicField(this, "name", "HookError"); } }; ValidationError = class extends Error { constructor() { super(...arguments); __publicField(this, "name", "ValidationError"); } }; } }); // node_modules/@inquirer/core/dist/esm/lib/hook-engine.js import { AsyncLocalStorage, AsyncResource } from "node:async_hooks"; function createStore(rl) { const store = { rl, hooks: [], hooksCleanup: [], hooksEffect: [], index: 0, handleChange() { } }; return store; } function withHooks(rl, cb) { const store = createStore(rl); return hookStorage.run(store, () => { function cycle(render) { store.handleChange = () => { store.index = 0; render(); }; store.handleChange(); } return cb(cycle); }); } function getStore() { const store = hookStorage.getStore(); if (!store) { throw new HookError("[Inquirer] Hook functions can only be called from within a prompt"); } return store; } function readline() { return getStore().rl; } function withUpdates(fn) { const wrapped = (...args) => { const store = getStore(); let shouldUpdate = false; const oldHandleChange = store.handleChange; store.handleChange = () => { shouldUpdate = true; }; const returnValue = fn(...args); if (shouldUpdate) { oldHandleChange(); } store.handleChange = oldHandleChange; return returnValue; }; return AsyncResource.bind(wrapped); } function withPointer(cb) { const store = getStore(); const { index } = store; const pointer = { get() { return store.hooks[index]; }, set(value) { store.hooks[index] = value; }, initialized: index in store.hooks }; const returnValue = cb(pointer); store.index++; return returnValue; } function handleChange() { getStore().handleChange(); } var hookStorage, effectScheduler; var init_hook_engine = __esm({ "node_modules/@inquirer/core/dist/esm/lib/hook-engine.js"() { init_errors(); hookStorage = new AsyncLocalStorage(); effectScheduler = { queue(cb) { const store = getStore(); const { index } = store; store.hooksEffect.push(() => { var _a, _b; (_b = (_a = store.hooksCleanup)[index]) == null ? void 0 : _b.call(_a); const cleanFn = cb(readline()); if (cleanFn != null && typeof cleanFn !== "function") { throw new ValidationError("useEffect return value must be a cleanup function or nothing."); } store.hooksCleanup[index] = cleanFn; }); }, run() { const store = getStore(); withUpdates(() => { store.hooksEffect.forEach((effect) => { effect(); }); store.hooksEffect.length = 0; })(); }, clearAll() { const store = getStore(); store.hooksCleanup.forEach((cleanFn) => { cleanFn == null ? void 0 : cleanFn(); }); store.hooksEffect.length = 0; store.hooksCleanup.length = 0; } }; } }); // node_modules/@inquirer/core/dist/esm/lib/use-state.js function useState(defaultValue) { return withPointer((pointer) => { const setFn = (newValue) => { if (pointer.get() !== newValue) { pointer.set(newValue); handleChange(); } }; if (pointer.initialized) { return [pointer.get(), setFn]; } const value = typeof defaultValue === "function" ? defaultValue() : defaultValue; pointer.set(value); return [value, setFn]; }); } var init_use_state = __esm({ "node_modules/@inquirer/core/dist/esm/lib/use-state.js"() { init_hook_engine(); } }); // node_modules/@inquirer/core/dist/esm/lib/use-effect.js function useEffect(cb, depArray) { withPointer((pointer) => { const oldDeps = pointer.get(); const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i])); if (hasChanged) { effectScheduler.queue(cb); } pointer.set(depArray); }); } var init_use_effect = __esm({ "node_modules/@inquirer/core/dist/esm/lib/use-effect.js"() { init_hook_engine(); } }); // node_modules/yoctocolors-cjs/index.js var require_yoctocolors_cjs = __commonJS({ "node_modules/yoctocolors-cjs/index.js"(exports, module) { var tty = __require("node:tty"); var _a, _b, _c, _d; var hasColors = (_d = (_c = (_b = (_a = tty == null ? void 0 : tty.WriteStream) == null ? void 0 : _a.prototype) == null ? void 0 : _b.hasColors) == null ? void 0 : _c.call(_b)) != null ? _d : false; var format = (open, close) => { if (!hasColors) { return (input) => input; } const openCode = `\x1B[${open}m`; const closeCode = `\x1B[${close}m`; return (input) => { const string = input + ""; let index = string.indexOf(closeCode); if (index === -1) { return openCode + string + closeCode; } let result = openCode; let lastIndex = 0; while (index !== -1) { result += string.slice(lastIndex, index) + openCode; lastIndex = index + closeCode.length; index = string.indexOf(closeCode, lastIndex); } result += string.slice(lastIndex) + closeCode; return result; }; }; var colors8 = {}; colors8.reset = format(0, 0); colors8.bold = format(1, 22); colors8.dim = format(2, 22); colors8.italic = format(3, 23); colors8.underline = format(4, 24); colors8.overline = format(53, 55); colors8.inverse = format(7, 27); colors8.hidden = format(8, 28); colors8.strikethrough = format(9, 29); colors8.black = format(30, 39); colors8.red = format(31, 39); colors8.green = format(32, 39); colors8.yellow = format(33, 39); colors8.blue = format(34, 39); colors8.magenta = format(35, 39); colors8.cyan = format(36, 39); colors8.white = format(37, 39); colors8.gray = format(90, 39); colors8.bgBlack = format(40, 49); colors8.bgRed = format(41, 49); colors8.bgGreen = format(42, 49); colors8.bgYellow = format(43, 49); colors8.bgBlue = format(44, 49); colors8.bgMagenta = format(45, 49); colors8.bgCyan = format(46, 49); colors8.bgWhite = format(47, 49); colors8.bgGray = format(100, 49); colors8.redBright = format(91, 39); colors8.greenBright = format(92, 39); colors8.yellowBright = format(93, 39); colors8.blueBright = format(94, 39); colors8.magentaBright = format(95, 39); colors8.cyanBright = format(96, 39); colors8.whiteBright = format(97, 39); colors8.bgRedBright = format(101, 49); colors8.bgGreenBright = format(102, 49); colors8.bgYellowBright = format(103, 49); colors8.bgBlueBright = format(104, 49); colors8.bgMagentaBright = format(105, 49); colors8.bgCyanBright = format(106, 49); colors8.bgWhiteBright = format(107, 49); module.exports = colors8; } }); // node_modules/@inquirer/figures/dist/esm/index.js import process2 from "node:process"; function isUnicodeSupported() { if (process2.platform !== "win32") { return process2.env["TERM"] !== "linux"; } return Boolean(process2.env["WT_SESSION"]) || // Windows Terminal Boolean(process2.env["TERMINUS_SUBLIME"]) || // Terminus (<0.2.27) process2.env["ConEmuTask"] === "{cmd::Cmder}" || // ConEmu and cmder process2.env["TERM_PROGRAM"] === "Terminus-Sublime" || process2.env["TERM_PROGRAM"] === "vscode" || process2.env["TERM"] === "xterm-256color" || process2.env["TERM"] === "alacritty" || process2.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm"; } var common, specialMainSymbols, specialFallbackSymbols, mainSymbols, fallbackSymbols, shouldUseMain, figures, esm_default, replacements; var init_esm = __esm({ "node_modules/@inquirer/figures/dist/esm/index.js"() { common = { circleQuestionMark: "(?)", questionMarkPrefix: "(?)", square: "\u2588", squareDarkShade: "\u2593", squareMediumShade: "\u2592", squareLightShade: "\u2591", squareTop: "\u2580", squareBottom: "\u2584", squareLeft: "\u258C", squareRight: "\u2590", squareCenter: "\u25A0", bullet: "\u25CF", dot: "\u2024", ellipsis: "\u2026", pointerSmall: "\u203A", triangleUp: "\u25B2", triangleUpSmall: "\u25B4", triangleDown: "\u25BC", triangleDownSmall: "\u25BE", triangleLeftSmall: "\u25C2", triangleRightSmall: "\u25B8", home: "\u2302", heart: "\u2665", musicNote: "\u266A", musicNoteBeamed: "\u266B", arrowUp: "\u2191", arrowDown: "\u2193", arrowLeft: "\u2190", arrowRight: "\u2192", arrowLeftRight: "\u2194", arrowUpDown: "\u2195", almostEqual: "\u2248", notEqual: "\u2260", lessOrEqual: "\u2264", greaterOrEqual: "\u2265", identical: "\u2261", infinity: "\u221E", subscriptZero: "\u2080", subscriptOne: "\u2081", subscriptTwo: "\u2082", subscriptThree: "\u2083", subscriptFour: "\u2084", subscriptFive: "\u2085", subscriptSix: "\u2086", subscriptSeven: "\u2087", subscriptEight: "\u2088", subscriptNine: "\u2089", oneHalf: "\xBD", oneThird: "\u2153", oneQuarter: "\xBC", oneFifth: "\u2155", oneSixth: "\u2159", oneEighth: "\u215B", twoThirds: "\u2154", twoFifths: "\u2156", threeQuarters: "\xBE", threeFifths: "\u2157", threeEighths: "\u215C", fourFifths: "\u2158", fiveSixths: "\u215A", fiveEighths: "\u215D", sevenEighths: "\u215E", line: "\u2500", lineBold: "\u2501", lineDouble: "\u2550", lineDashed0: "\u2504", lineDashed1: "\u2505", lineDashed2: "\u2508", lineDashed3: "\u2509", lineDashed4: "\u254C", lineDashed5: "\u254D", lineDashed6: "\u2574", lineDashed7: "\u2576", lineDashed8: "\u2578", lineDashed9: "\u257A", lineDashed10: "\u257C", lineDashed11: "\u257E", lineDashed12: "\u2212", lineDashed13: "\u2013", lineDashed14: "\u2010", lineDashed15: "\u2043", lineVertical: "\u2502", lineVerticalBold: "\u2503", lineVerticalDouble: "\u2551", lineVerticalDashed0: "\u2506", lineVerticalDashed1: "\u2507", lineVerticalDashed2: "\u250A", lineVerticalDashed3: "\u250B", lineVerticalDashed4: "\u254E", lineVerticalDashed5: "\u254F", lineVerticalDashed6: "\u2575", lineVerticalDashed7: "\u2577", lineVerticalDashed8: "\u2579", lineVerticalDashed9: "\u257B", lineVerticalDashed10: "\u257D", lineVerticalDashed11: "\u257F", lineDownLeft: "\u2510", lineDownLeftArc: "\u256E", lineDownBoldLeftBold: "\u2513", lineDownBoldLeft: "\u2512", lineDownLeftBold: "\u2511", lineDownDoubleLeftDouble: "\u2557", lineDownDoubleLeft: "\u2556", lineDownLeftDouble: "\u2555", lineDownRight: "\u250C", lineDownRightArc: "\u256D", lineDownBoldRightBold: "\u250F", lineDownBoldRight: "\u250E", lineDownRightBold: "\u250D", lineDownDoubleRightDouble: "\u2554", lineDownDoubleRight: "\u2553", lineDownRightDouble: "\u2552", lineUpLeft: "\u2518", lineUpLeftArc: "\u256F", lineUpBoldLeftBold: "\u251B", lineUpBoldLeft: "\u251A", lineUpLeftBold: "\u2519", lineUpDoubleLeftDouble: "\u255D", lineUpDoubleLeft: "\u255C", lineUpLeftDouble: "\u255B", lineUpRight: "\u2514", lineUpRightArc: "\u2570", lineUpBoldRightBold: "\u2517", lineUpBoldRight: "\u2516", lineUpRightBold: "\u2515", lineUpDoubleRightDouble: "\u255A", lineUpDoubleRight: "\u2559", lineUpRightDouble: "\u2558", lineUpDownLeft: "\u2524", lineUpBoldDownBoldLeftBold: "\u252B", lineUpBoldDownBoldLeft: "\u2528", lineUpDownLeftBold: "\u2525", lineUpBoldDownLeftBold: "\u2529", lineUpDownBoldLeftBold: "\u252A", lineUpDownBoldLeft: "\u2527", lineUpBoldDownLeft: "\u2526", lineUpDoubleDownDoubleLeftDouble: "\u2563", lineUpDoubleDownDoubleLeft: "\u2562", lineUpDownLeftDouble: "\u2561", lineUpDownRight: "\u251C", lineUpBoldDownBoldRightBold: "\u2523", lineUpBoldDownBoldRight: "\u2520", lineUpDownRightBold: "\u251D", lineUpBoldDownRightBold: "\u2521", lineUpDownBoldRightBold: "\u2522", lineUpDownBoldRight: "\u251F", lineUpBoldDownRight: "\u251E", lineUpDoubleDownDoubleRightDouble: "\u2560", lineUpDoubleDownDoubleRight: "\u255F", lineUpDownRightDouble: "\u255E", lineDownLeftRight: "\u252C", lineDownBoldLeftBoldRightBold: "\u2533", lineDownLeftBoldRightBold: "\u252F", lineDownBoldLeftRight: "\u2530", lineDownBoldLeftBoldRight: "\u2531", lineDownBoldLeftRightBold: "\u2532", lineDownLeftRightBold: "\u252E", lineDownLeftBoldRight: "\u252D", lineDownDoubleLeftDoubleRightDouble: "\u2566", lineDownDoubleLeftRight: "\u2565", lineDownLeftDoubleRightDouble: "\u2564", lineUpLeftRight: "\u2534", lineUpBoldLeftBoldRightBold: "\u253B", lineUpLeftBoldRightBold: "\u2537", lineUpBoldLeftRight: "\u2538", lineUpBoldLeftBoldRight: "\u2539", lineUpBoldLeftRightBold: "\u253A", lineUpLeftRightBold: "\u2536", lineUpLeftBoldRight: "\u2535", lineUpDoubleLeftDoubleRightDouble: "\u2569", lineUpDoubleLeftRight: "\u2568", lineUpLeftDoubleRightDouble: "\u2567", lineUpDownLeftRight: "\u253C", lineUpBoldDownBoldLeftBoldRightBold: "\u254B", lineUpDownBoldLeftBoldRightBold: "\u2548", lineUpBoldDownLeftBoldRightBold: "\u2547", lineUpBoldDownBoldLeftRightBold: "\u254A", lineUpBoldDownBoldLeftBoldRight: "\u2549", lineUpBoldDownLeftRight: "\u2540", lineUpDownBoldLeftRight: "\u2541", lineUpDownLeftBoldRight: "\u253D", lineUpDownLeftRightBold: "\u253E", lineUpBoldDownBoldLeftRight: "\u2542", lineUpDownLeftBoldRightBold: "\u253F", lineUpBoldDownLeftBoldRight: "\u2543", lineUpBoldDownLeftRightBold: "\u2544", lineUpDownBoldLeftBoldRight: "\u2545", lineUpDownBoldLeftRightBold: "\u2546", lineUpDoubleDownDoubleLeftDoubleRightDouble: "\u256C", lineUpDoubleDownDoubleLeftRight: "\u256B", lineUpDownLeftDoubleRightDouble: "\u256A", lineCross: "\u2573", lineBackslash: "\u2572", lineSlash: "\u2571" }; specialMainSymbols = { tick: "\u2714", info: "\u2139", warning: "\u26A0", cross: "\u2718", squareSmall: "\u25FB", squareSmallFilled: "\u25FC", circle: "\u25EF", circleFilled: "\u25C9", circleDotted: "\u25CC", circleDouble: "\u25CE", circleCircle: "\u24DE", circleCross: "\u24E7", circlePipe: "\u24BE", radioOn: "\u25C9", radioOff: "\u25EF", checkboxOn: "\u2612", checkboxOff: "\u2610", checkboxCircleOn: "\u24E7", checkboxCircleOff: "\u24BE", pointer: "\u276F", triangleUpOutline: "\u25B3", triangleLeft: "\u25C0", triangleRight: "\u25B6", lozenge: "\u25C6", lozengeOutline: "\u25C7", hamburger: "\u2630", smiley: "\u32E1", mustache: "\u0DF4", star: "\u2605", play: "\u25B6", nodejs: "\u2B22", oneSeventh: "\u2150", oneNinth: "\u2151", oneTenth: "\u2152" }; specialFallbackSymbols = { tick: "\u221A", info: "i", warning: "\u203C", cross: "\xD7", squareSmall: "\u25A1", squareSmallFilled: "\u25A0", circle: "( )", circleFilled: "(*)", circleDotted: "( )", circleDouble: "( )", circleCircle: "(\u25CB)", circleCross: "(\xD7)", circlePipe: "(\u2502)", radioOn: "(*)", radioOff: "( )", checkboxOn: "[\xD7]", checkboxOff: "[ ]", checkboxCircleOn: "(\xD7)", checkboxCircleOff: "( )", pointer: ">", triangleUpOutline: "\u2206", triangleLeft: "\u25C4", triangleRight: "\u25BA", lozenge: "\u2666", lozengeOutline: "\u25CA", hamburger: "\u2261", smiley: "\u263A", mustache: "\u250C\u2500\u2510", star: "\u2736", play: "\u25BA", nodejs: "\u2666", oneSeventh: "1/7", oneNinth: "1/9", oneTenth: "1/10" }; mainSymbols = __spreadValues(__spreadValues({}, common), specialMainSymbols); fallbackSymbols = __spreadValues(__spreadValues({}, common), specialFallbackSymbols); shouldUseMain = isUnicodeSupported(); figures = shouldUseMain ? mainSymbols : fallbackSymbols; esm_default = figures; replacements = Object.entries(specialMainSymbols); } }); // node_modules/@inquirer/core/dist/esm/lib/theme.js var import_yoctocolors_cjs, defaultTheme; var init_theme = __esm({ "node_modules/@inquirer/core/dist/esm/lib/theme.js"() { import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1); init_esm(); defaultTheme = { prefix: { idle: import_yoctocolors_cjs.default.blue("?"), // TODO: use figure done: import_yoctocolors_cjs.default.green(esm_default.tick) }, spinner: { interval: 80, frames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"].map((frame) => import_yoctocolors_cjs.default.yellow(frame)) }, style: { answer: import_yoctocolors_cjs.default.cyan, message: import_yoctocolors_cjs.default.bold, error: (text) => import_yoctocolors_cjs.default.red(`> ${text}`), defaultAnswer: (text) => import_yoctocolors_cjs.default.dim(`(${text})`), help: import_yoctocolors_cjs.default.dim, highlight: import_yoctocolors_cjs.default.cyan, key: (text) => import_yoctocolors_cjs.default.cyan(import_yoctocolors_cjs.default.bold(`<${text}>`)) } }; } }); // node_modules/@inquirer/core/dist/esm/lib/make-theme.js function isPlainObject(value) { if (typeof value !== "object" || value === null) return false; let proto = value; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(value) === proto; } function deepMerge(...objects) { const output = {}; for (const obj of objects) { for (const [key, value] of Object.entries(obj)) { const prevValue = output[key]; output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value; } } return output; } function makeTheme(...themes) { const themesToMerge = [ defaultTheme, ...themes.filter((theme) => theme != null) ]; return deepMerge(...themesToMerge); } var init_make_theme = __esm({ "node_modules/@inquirer/core/dist/esm/lib/make-theme.js"() { init_theme(); } }); // node_modules/@inquirer/core/dist/esm/lib/use-prefix.js import { AsyncResource as AsyncResource2 } from "node:async_hooks"; function usePrefix({ status = "idle", theme }) { var _a; const [showLoader, setShowLoader] = useState(false); const [tick, setTick] = useState(0); const { prefix, spinner } = makeTheme(theme); useEffect(() => { if (status === "loading") { let tickInterval; let inc = -1; const delayTimeout = setTimeout(AsyncResource2.bind(() => { setShowLoader(true); tickInterval = setInterval(AsyncResource2.bind(() => { inc = inc + 1; setTick(inc % spinner.frames.length); }), spinner.interval); }), 300); return () => { clearTimeout(delayTimeout); clearInterval(tickInterval); }; } else { setShowLoader(false); } }, [status]); if (showLoader) { return spinner.frames[tick]; } const iconName = status === "loading" ? "idle" : status; return typeof prefix === "string" ? prefix : (_a = prefix[iconName]) != null ? _a : prefix["idle"]; } var init_use_prefix = __esm({ "node_modules/@inquirer/core/dist/esm/lib/use-prefix.js"() { init_use_state(); init_use_effect(); init_make_theme(); } }); // node_modules/@inquirer/core/dist/esm/lib/use-memo.js function useMemo(fn, dependencies) { return withPointer((pointer) => { const prev = pointer.get(); if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) { const value = fn(); pointer.set({ value, dependencies }); return value; } return prev.value; }); } var init_use_memo = __esm({ "node_modules/@inquirer/core/dist/esm/lib/use-memo.js"() { init_hook_engine(); } }); // node_modules/@inquirer/core/dist/esm/lib/use-ref.js function useRef(val) { return useState({ current: val })[0]; } var init_use_ref = __esm({ "node_modules/@inquirer/core/dist/esm/lib/use-ref.js"() { init_use_state(); } }); // node_modules/@inquirer/core/dist/esm/lib/use-keypress.js function useKeypress(userHandler) { const signal = useRef(userHandler); signal.current = userHandler; useEffect((rl) => { let ignore = false; const handler = withUpdates((_input, event) => { if (ignore) return; void signal.current(event, rl); }); rl.input.on("keypress", handler); return () => { ignore = true; rl.input.removeListener("keypress", handler); }; }, []); } var init_use_keypress = __esm({ "node_modules/@inquirer/core/dist/esm/lib/use-keypress.js"() { init_use_ref(); init_use_effect(); init_hook_engine(); } }); // node_modules/cli-width/index.js var require_cli_width = __commonJS({ "node_modules/cli-width/index.js"(exports, module) { "use strict"; module.exports = cliWidth2; function normalizeOpts(options) { const defaultOpts = { defaultWidth: 0, output: process.stdout, tty: __require("tty") }; if (!options) { return defaultOpts; } Object.keys(defaultOpts).forEach(function(key) { if (!options[key]) { options[key] = defaultOpts[key]; } }); return options; } function cliWidth2(options) { const opts = normalizeOpts(options); if (opts.output.getWindowSize) { return opts.output.getWindowSize()[0] || opts.defaultWidth; } if (opts.tty.getWindowSize) { return opts.tty.getWindowSize()[1] || opts.defaultWidth; } if (opts.output.columns) { return opts.output.columns; } if (process.env.CLI_WIDTH) { const width = parseInt(process.env.CLI_WIDTH, 10); if (!isNaN(width) && width !== 0) { return width; } } return opts.defaultWidth; } } }); // node_modules/ansi-regex/index.js var require_ansi_regex = __commonJS({ "node_modules/ansi-regex/index.js"(exports, module) { "use strict"; module.exports = ({ onlyFirst = false } = {}) => { const pattern = [ "[\\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(pattern, onlyFirst ? void 0 : "g"); }; } }); // node_modules/strip-ansi/index.js var require_strip_ansi = __commonJS({ "node_modules/strip-ansi/index.js"(exports, module) { "use strict"; var ansiRegex = require_ansi_regex(); module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; } }); // node_modules/is-fullwidth-code-point/index.js var require_is_fullwidth_code_point = __commonJS({ "node_modules/is-fullwidth-code-point/index.js"(exports, module) { "use strict"; var isFullwidthCodePoint = (codePoint) => { if (Number.isNaN(codePoint)) { return false; } if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET // CJK Radicals Supplement .. Enclosed CJK Letters and Months 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane 131072 <= codePoint && codePoint <= 262141)) { return true; } return false; }; module.exports = isFullwidthCodePoint; module.exports.default = isFullwidthCodePoint; } }); // node_modules/emoji-regex/index.js var require_emoji_regex = __commonJS({ "node_modules/emoji-regex/index.js"(exports, module) { "use strict"; module.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; }; } }); // node_modules/string-width/index.js var require_string_width = __commonJS({ "node_modules/string-width/index.js"(exports, module) { "use strict"; var stripAnsi = require_strip_ansi(); var isFullwidthCodePoint = require_is_fullwidth_code_point(); var emojiRegex = require_emoji_regex(); var stringWidth = (string) => { if (typeof string !== "string" || string.length === 0) { return 0; } string = stripAnsi(string); if (string.length === 0) { return 0; } string = string.replace(emojiRegex(), " "); let width = 0; for (let i = 0; i < string.length; i++) { const code = string.codePointAt(i); if (code <= 31 || code >= 127 && code <= 159) { continue; } if (code >= 768 && code <= 879) { continue; } if (code > 65535) { i++; } width += isFullwidthCodePoint(code) ? 2 : 1; } return width; }; module.exports = stringWidth; module.exports.default = stringWidth; } }); // node_modules/color-name/index.js var require_color_name = __commonJS({ "node_modules/color-name/index.js"(exports, module) { "use strict"; module.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":