@prismicio/cli 0.0.1 → 0.0.2-alpha.xru-fix-npx-install-warnings.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/dist/acorn-CCr8VihG.js +3019 -0
- package/dist/acorn-CCr8VihG.js.map +1 -0
- package/dist/angular-B-6Sdz-P.js +2737 -0
- package/dist/angular-B-6Sdz-P.js.map +1 -0
- package/dist/babel-DSSzU6fH.js +7175 -0
- package/dist/babel-DSSzU6fH.js.map +1 -0
- package/dist/cli-NVpkXC9F.js +150015 -0
- package/dist/cli-NVpkXC9F.js.map +1 -0
- package/dist/cli.js +3 -144
- package/dist/cli.js.map +1 -1
- package/dist/estree-DHLJIae3.js +4486 -0
- package/dist/estree-DHLJIae3.js.map +1 -0
- package/dist/flow-DVd4L7fO.js +27426 -0
- package/dist/flow-DVd4L7fO.js.map +1 -0
- package/dist/glimmer-ffe_QHPj.js +2696 -0
- package/dist/glimmer-ffe_QHPj.js.map +1 -0
- package/dist/graphql-Cx6A4xbM.js +1241 -0
- package/dist/graphql-Cx6A4xbM.js.map +1 -0
- package/dist/html-Cp0WeaDh.js +2794 -0
- package/dist/html-Cp0WeaDh.js.map +1 -0
- package/dist/index-CAoPVwid.js +397 -0
- package/dist/index-CAoPVwid.js.map +1 -0
- package/dist/index-CqzxeUkd.js +835 -0
- package/dist/index-CqzxeUkd.js.map +1 -0
- package/dist/index-D3Z7xY3-.js +323 -0
- package/dist/index-D3Z7xY3-.js.map +1 -0
- package/dist/index-D80unpFN.js +3003 -0
- package/dist/index-D80unpFN.js.map +1 -0
- package/dist/index-DA8FlEll.js +35 -0
- package/dist/index-DA8FlEll.js.map +1 -0
- package/dist/index-DVTRroeB.js +189 -0
- package/dist/index-DVTRroeB.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/markdown-B2nQpAgl.js +3380 -0
- package/dist/markdown-B2nQpAgl.js.map +1 -0
- package/dist/meriyah-oMgd23nK.js +2640 -0
- package/dist/meriyah-oMgd23nK.js.map +1 -0
- package/dist/multipart-parser-jkRZKgYV.js +354 -0
- package/dist/multipart-parser-jkRZKgYV.js.map +1 -0
- package/dist/postcss-4okJ6bzF.js +4943 -0
- package/dist/postcss-4okJ6bzF.js.map +1 -0
- package/dist/typescript-eHDX_fq8.js +12974 -0
- package/dist/typescript-eHDX_fq8.js.map +1 -0
- package/dist/yaml-CoPGVzvb.js +4165 -0
- package/dist/yaml-CoPGVzvb.js.map +1 -0
- package/package.json +16 -17
- package/src/utils/sentry.ts +2 -0
- package/dist/_node_modules/meow/build/dependencies.js +0 -9040
- package/dist/_node_modules/meow/build/dependencies.js.map +0 -1
- package/dist/_node_modules/meow/build/index.js +0 -80
- package/dist/_node_modules/meow/build/index.js.map +0 -1
- package/dist/_node_modules/meow/build/options.js +0 -86
- package/dist/_node_modules/meow/build/options.js.map +0 -1
- package/dist/_node_modules/meow/build/parser.js +0 -61
- package/dist/_node_modules/meow/build/parser.js.map +0 -1
- package/dist/_node_modules/meow/build/utils.js +0 -8
- package/dist/_node_modules/meow/build/utils.js.map +0 -1
- package/dist/_node_modules/meow/build/validate.js +0 -102
- package/dist/_node_modules/meow/build/validate.js.map +0 -1
- package/dist/commands/init.js +0 -34
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/sync.js +0 -32
- package/dist/commands/sync.js.map +0 -1
- package/dist/core/auth.js +0 -72
- package/dist/core/auth.js.map +0 -1
- package/dist/core/customType.js +0 -43
- package/dist/core/customType.js.map +0 -1
- package/dist/core/framework.js +0 -128
- package/dist/core/framework.js.map +0 -1
- package/dist/core/project.js +0 -92
- package/dist/core/project.js.map +0 -1
- package/dist/core/repository.js +0 -33
- package/dist/core/repository.js.map +0 -1
- package/dist/core/slices.js +0 -47
- package/dist/core/slices.js.map +0 -1
- package/dist/core/version.js +0 -27
- package/dist/core/version.js.map +0 -1
- package/dist/packages/cli/package.json.js +0 -63
- package/dist/packages/cli/package.json.js.map +0 -1
- package/dist/utils/error.js +0 -18
- package/dist/utils/error.js.map +0 -1
- package/dist/utils/listr.js +0 -12
- package/dist/utils/listr.js.map +0 -1
- package/dist/utils/output.js +0 -34
- package/dist/utils/output.js.map +0 -1
- package/dist/utils/package.js +0 -20
- package/dist/utils/package.js.map +0 -1
- package/dist/utils/sentry.js +0 -62
- package/dist/utils/sentry.js.map +0 -1
- package/dist/utils/telemetry.js +0 -42
- package/dist/utils/telemetry.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CqzxeUkd.js","sources":["../../../node_modules/environment/index.js","../../../node_modules/ansi-escapes/base.js","../../../node_modules/mimic-function/index.js","../../../node_modules/restore-cursor/node_modules/onetime/index.js","../../../node_modules/signal-exit/dist/mjs/signals.js","../../../node_modules/signal-exit/dist/mjs/index.js","../../../node_modules/restore-cursor/index.js","../../../node_modules/cli-cursor/index.js","../../../node_modules/log-update/node_modules/strip-ansi/index.js","../../../node_modules/log-update/node_modules/emoji-regex/index.mjs","../../../node_modules/log-update/node_modules/string-width/index.js","../../../node_modules/log-update/node_modules/ansi-styles/index.js","../../../node_modules/log-update/node_modules/wrap-ansi/index.js","../../../node_modules/log-update/index.js"],"sourcesContent":["/* globals WorkerGlobalScope, DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, ServiceWorkerGlobalScope */\n\nexport const isBrowser = globalThis.window?.document !== undefined;\n\nexport const isNode = globalThis.process?.versions?.node !== undefined;\n\nexport const isBun = globalThis.process?.versions?.bun !== undefined;\n\nexport const isDeno = globalThis.Deno?.version?.deno !== undefined;\n\nexport const isElectron = globalThis.process?.versions?.electron !== undefined;\n\nexport const isJsDom = globalThis.navigator?.userAgent?.includes('jsdom') === true;\n\nexport const isWebWorker = typeof WorkerGlobalScope !== 'undefined' && globalThis instanceof WorkerGlobalScope;\n\nexport const isDedicatedWorker = typeof DedicatedWorkerGlobalScope !== 'undefined' && globalThis instanceof DedicatedWorkerGlobalScope;\n\nexport const isSharedWorker = typeof SharedWorkerGlobalScope !== 'undefined' && globalThis instanceof SharedWorkerGlobalScope;\n\nexport const isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && globalThis instanceof ServiceWorkerGlobalScope;\n\n// Note: I'm intentionally not DRYing up the other variables to keep them \"lazy\".\nconst platform = globalThis.navigator?.userAgentData?.platform;\n\nexport const isMacOs = platform === 'macOS'\n\t|| globalThis.navigator?.platform === 'MacIntel' // Even on Apple silicon Macs.\n\t|| globalThis.navigator?.userAgent?.includes(' Mac ') === true\n\t|| globalThis.process?.platform === 'darwin';\n\nexport const isWindows = platform === 'Windows'\n\t|| globalThis.navigator?.platform === 'Win32'\n\t|| globalThis.process?.platform === 'win32';\n\nexport const isLinux = platform === 'Linux'\n\t|| globalThis.navigator?.platform?.startsWith('Linux') === true\n\t|| globalThis.navigator?.userAgent?.includes(' Linux ') === true\n\t|| globalThis.process?.platform === 'linux';\n\nexport const isIos = platform === 'iOS'\n\t|| (globalThis.navigator?.platform === 'MacIntel' && globalThis.navigator?.maxTouchPoints > 1)\n\t|| /iPad|iPhone|iPod/.test(globalThis.navigator?.platform);\n\nexport const isAndroid = platform === 'Android'\n\t|| globalThis.navigator?.platform === 'Android'\n\t|| globalThis.navigator?.userAgent?.includes(' Android ') === true\n\t|| globalThis.process?.platform === 'android';\n","import process from 'node:process';\nimport os from 'node:os';\nimport {isBrowser} from 'environment';\n\nconst ESC = '\\u001B[';\nconst OSC = '\\u001B]';\nconst BEL = '\\u0007';\nconst SEP = ';';\n\nconst isTerminalApp = !isBrowser && process.env.TERM_PROGRAM === 'Apple_Terminal';\nconst isWindows = !isBrowser && process.platform === 'win32';\nconst isTmux = !isBrowser && (process.env.TERM?.startsWith('screen') || process.env.TERM?.startsWith('tmux') || process.env.TMUX !== undefined);\n\nconst cwdFunction = isBrowser ? () => {\n\tthrow new Error('`process.cwd()` only works in Node.js, not the browser.');\n} : process.cwd;\n\nconst wrapOsc = sequence => {\n\tif (isTmux) {\n\t\t// Tmux requires OSC sequences to be wrapped with DCS tmux; <sequence> ST\n\t\t// and all ESCs in <sequence> to be replaced with ESC ESC.\n\t\t// It only accepts ESC backslash for ST.\n\t\treturn '\\u001BPtmux;' + sequence.replaceAll('\\u001B', '\\u001B\\u001B') + '\\u001B\\\\';\n\t}\n\n\treturn sequence;\n};\n\nexport const cursorTo = (x, y) => {\n\tif (typeof x !== 'number') {\n\t\tthrow new TypeError('The `x` argument is required');\n\t}\n\n\tif (typeof y !== 'number') {\n\t\treturn ESC + (x + 1) + 'G';\n\t}\n\n\treturn ESC + (y + 1) + SEP + (x + 1) + 'H';\n};\n\nexport const cursorMove = (x, y) => {\n\tif (typeof x !== 'number') {\n\t\tthrow new TypeError('The `x` argument is required');\n\t}\n\n\tlet returnValue = '';\n\n\tif (x < 0) {\n\t\treturnValue += ESC + (-x) + 'D';\n\t} else if (x > 0) {\n\t\treturnValue += ESC + x + 'C';\n\t}\n\n\tif (y < 0) {\n\t\treturnValue += ESC + (-y) + 'A';\n\t} else if (y > 0) {\n\t\treturnValue += ESC + y + 'B';\n\t}\n\n\treturn returnValue;\n};\n\nexport const cursorUp = (count = 1) => ESC + count + 'A';\nexport const cursorDown = (count = 1) => ESC + count + 'B';\nexport const cursorForward = (count = 1) => ESC + count + 'C';\nexport const cursorBackward = (count = 1) => ESC + count + 'D';\n\nexport const cursorLeft = ESC + 'G';\nexport const cursorSavePosition = isTerminalApp ? '\\u001B7' : ESC + 's';\nexport const cursorRestorePosition = isTerminalApp ? '\\u001B8' : ESC + 'u';\nexport const cursorGetPosition = ESC + '6n';\nexport const cursorNextLine = ESC + 'E';\nexport const cursorPrevLine = ESC + 'F';\nexport const cursorHide = ESC + '?25l';\nexport const cursorShow = ESC + '?25h';\n\nexport const eraseLines = count => {\n\tlet clear = '';\n\n\tfor (let i = 0; i < count; i++) {\n\t\tclear += eraseLine + (i < count - 1 ? cursorUp() : '');\n\t}\n\n\tif (count) {\n\t\tclear += cursorLeft;\n\t}\n\n\treturn clear;\n};\n\nexport const eraseEndLine = ESC + 'K';\nexport const eraseStartLine = ESC + '1K';\nexport const eraseLine = ESC + '2K';\nexport const eraseDown = ESC + 'J';\nexport const eraseUp = ESC + '1J';\nexport const eraseScreen = ESC + '2J';\nexport const scrollUp = ESC + 'S';\nexport const scrollDown = ESC + 'T';\n\nexport const clearScreen = '\\u001Bc';\n\nexport const clearViewport = `${eraseScreen}${ESC}H`;\n\nconst isOldWindows = () => {\n\tif (isBrowser || !isWindows) {\n\t\treturn false;\n\t}\n\n\tconst parts = os.release().split('.');\n\tconst major = Number(parts[0]);\n\tconst build = Number(parts[2] ?? 0);\n\n\tif (major < 10) {\n\t\treturn true;\n\t}\n\n\tif (major === 10 && build < 10_586) {\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\nexport const clearTerminal = isOldWindows()\n\t? `${eraseScreen}${ESC}0f`\n\t// 1. Erases the screen (Only done in case `2` is not supported)\n\t// 2. Erases the whole screen including scrollback buffer\n\t// 3. Moves cursor to the top-left position\n\t// More info: https://www.real-world-systems.com/docs/ANSIcode.html\n\t: `${eraseScreen}${ESC}3J${ESC}H`;\n\nexport const enterAlternativeScreen = ESC + '?1049h';\nexport const exitAlternativeScreen = ESC + '?1049l';\n\nexport const beep = BEL;\n\nexport const link = (text, url) => {\n\tconst openLink = wrapOsc(`${OSC}8${SEP}${SEP}${url}${BEL}`);\n\tconst closeLink = wrapOsc(`${OSC}8${SEP}${SEP}${BEL}`);\n\treturn openLink + text + closeLink;\n};\n\nexport const image = (data, options = {}) => {\n\tlet returnValue = `${OSC}1337;File=inline=1`;\n\n\tif (options.width) {\n\t\treturnValue += `;width=${options.width}`;\n\t}\n\n\tif (options.height) {\n\t\treturnValue += `;height=${options.height}`;\n\t}\n\n\tif (options.preserveAspectRatio === false) {\n\t\treturnValue += ';preserveAspectRatio=0';\n\t}\n\n\tconst imageBuffer = Buffer.from(data);\n\n\t// `size` is optional in the spec, but xterm.js requires it.\n\treturn wrapOsc(returnValue + `;size=${imageBuffer.byteLength}` + ':' + imageBuffer.toString('base64') + BEL);\n};\n\nexport const iTerm = {\n\tsetCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}50;CurrentDir=${cwd}${BEL}`),\n\n\tannotation(message, options = {}) {\n\t\tlet returnValue = `${OSC}1337;`;\n\n\t\tconst hasX = options.x !== undefined;\n\t\tconst hasY = options.y !== undefined;\n\t\tif ((hasX || hasY) && !(hasX && hasY && options.length !== undefined)) {\n\t\t\tthrow new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');\n\t\t}\n\n\t\tmessage = message.replaceAll('|', '');\n\n\t\treturnValue += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';\n\n\t\tif (options.length > 0) {\n\t\t\treturnValue += (\n\t\t\t\thasX\n\t\t\t\t\t? [message, options.length, options.x, options.y]\n\t\t\t\t\t: [options.length, message]\n\t\t\t).join('|');\n\t\t} else {\n\t\t\treturnValue += message;\n\t\t}\n\n\t\treturn wrapOsc(returnValue + BEL);\n\t},\n};\n\nexport const ConEmu = {\n\tsetCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}9;9;${cwd}${BEL}`),\n};\n\nexport const setCwd = (cwd = cwdFunction()) => iTerm.setCwd(cwd) + ConEmu.setCwd(cwd);\n","const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable\n\t\t&& toDescriptor.enumerable === fromDescriptor.enumerable\n\t\t&& toDescriptor.configurable === fromDescriptor.configurable\n\t\t&& (toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tconst {writable, enumerable, configurable} = toStringDescriptor; // We destructue to avoid a potential `get` descriptor.\n\tObject.defineProperty(to, 'toString', {value: newToString, writable, enumerable, configurable});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n","import mimicFunction from 'mimic-function';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = undefined;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n","/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals = [];\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM');\nif (process.platform !== 'win32') {\n signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n );\n}\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT');\n}\n//# sourceMappingURL=signals.js.map","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nimport { signals } from './signals.js';\nexport { signals };\nconst processOk = (process) => !!process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function';\nconst kExitEmitter = Symbol.for('signal-exit emitter');\nconst global = globalThis;\nconst ObjectDefineProperty = Object.defineProperty.bind(Object);\n// teeny special purpose ee\nclass Emitter {\n emitted = {\n afterExit: false,\n exit: false,\n };\n listeners = {\n afterExit: [],\n exit: [],\n };\n count = 0;\n id = Math.random();\n constructor() {\n if (global[kExitEmitter]) {\n return global[kExitEmitter];\n }\n ObjectDefineProperty(global, kExitEmitter, {\n value: this,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n }\n on(ev, fn) {\n this.listeners[ev].push(fn);\n }\n removeListener(ev, fn) {\n const list = this.listeners[ev];\n const i = list.indexOf(fn);\n /* c8 ignore start */\n if (i === -1) {\n return;\n }\n /* c8 ignore stop */\n if (i === 0 && list.length === 1) {\n list.length = 0;\n }\n else {\n list.splice(i, 1);\n }\n }\n emit(ev, code, signal) {\n if (this.emitted[ev]) {\n return false;\n }\n this.emitted[ev] = true;\n let ret = false;\n for (const fn of this.listeners[ev]) {\n ret = fn(code, signal) === true || ret;\n }\n if (ev === 'exit') {\n ret = this.emit('afterExit', code, signal) || ret;\n }\n return ret;\n }\n}\nclass SignalExitBase {\n}\nconst signalExitWrap = (handler) => {\n return {\n onExit(cb, opts) {\n return handler.onExit(cb, opts);\n },\n load() {\n return handler.load();\n },\n unload() {\n return handler.unload();\n },\n };\n};\nclass SignalExitFallback extends SignalExitBase {\n onExit() {\n return () => { };\n }\n load() { }\n unload() { }\n}\nclass SignalExit extends SignalExitBase {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n /* c8 ignore start */\n #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP';\n /* c8 ignore stop */\n #emitter = new Emitter();\n #process;\n #originalProcessEmit;\n #originalProcessReallyExit;\n #sigListeners = {};\n #loaded = false;\n constructor(process) {\n super();\n this.#process = process;\n // { <signal>: <listener fn>, ... }\n this.#sigListeners = {};\n for (const sig of signals) {\n this.#sigListeners[sig] = () => {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = this.#process.listeners(sig);\n let { count } = this.#emitter;\n // This is a workaround for the fact that signal-exit v3 and signal\n // exit v4 are not aware of each other, and each will attempt to let\n // the other handle it, so neither of them do. To correct this, we\n // detect if we're the only handler *except* for previous versions\n // of signal-exit, and increment by the count of listeners it has\n // created.\n /* c8 ignore start */\n const p = process;\n if (typeof p.__signal_exit_emitter__ === 'object' &&\n typeof p.__signal_exit_emitter__.count === 'number') {\n count += p.__signal_exit_emitter__.count;\n }\n /* c8 ignore stop */\n if (listeners.length === count) {\n this.unload();\n const ret = this.#emitter.emit('exit', null, sig);\n /* c8 ignore start */\n const s = sig === 'SIGHUP' ? this.#hupSig : sig;\n if (!ret)\n process.kill(process.pid, s);\n /* c8 ignore stop */\n }\n };\n }\n this.#originalProcessReallyExit = process.reallyExit;\n this.#originalProcessEmit = process.emit;\n }\n onExit(cb, opts) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return () => { };\n }\n /* c8 ignore stop */\n if (this.#loaded === false) {\n this.load();\n }\n const ev = opts?.alwaysLast ? 'afterExit' : 'exit';\n this.#emitter.on(ev, cb);\n return () => {\n this.#emitter.removeListener(ev, cb);\n if (this.#emitter.listeners['exit'].length === 0 &&\n this.#emitter.listeners['afterExit'].length === 0) {\n this.unload();\n }\n };\n }\n load() {\n if (this.#loaded) {\n return;\n }\n this.#loaded = true;\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n this.#emitter.count += 1;\n for (const sig of signals) {\n try {\n const fn = this.#sigListeners[sig];\n if (fn)\n this.#process.on(sig, fn);\n }\n catch (_) { }\n }\n this.#process.emit = (ev, ...a) => {\n return this.#processEmit(ev, ...a);\n };\n this.#process.reallyExit = (code) => {\n return this.#processReallyExit(code);\n };\n }\n unload() {\n if (!this.#loaded) {\n return;\n }\n this.#loaded = false;\n signals.forEach(sig => {\n const listener = this.#sigListeners[sig];\n /* c8 ignore start */\n if (!listener) {\n throw new Error('Listener not defined for signal: ' + sig);\n }\n /* c8 ignore stop */\n try {\n this.#process.removeListener(sig, listener);\n /* c8 ignore start */\n }\n catch (_) { }\n /* c8 ignore stop */\n });\n this.#process.emit = this.#originalProcessEmit;\n this.#process.reallyExit = this.#originalProcessReallyExit;\n this.#emitter.count -= 1;\n }\n #processReallyExit(code) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return 0;\n }\n this.#process.exitCode = code || 0;\n /* c8 ignore stop */\n this.#emitter.emit('exit', this.#process.exitCode, null);\n return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);\n }\n #processEmit(ev, ...args) {\n const og = this.#originalProcessEmit;\n if (ev === 'exit' && processOk(this.#process)) {\n if (typeof args[0] === 'number') {\n this.#process.exitCode = args[0];\n /* c8 ignore start */\n }\n /* c8 ignore start */\n const ret = og.call(this.#process, ev, ...args);\n /* c8 ignore start */\n this.#emitter.emit('exit', this.#process.exitCode, null);\n /* c8 ignore stop */\n return ret;\n }\n else {\n return og.call(this.#process, ev, ...args);\n }\n }\n}\nconst process = globalThis.process;\n// wrap so that we call the method on the actual handler, without\n// exporting it directly.\nexport const { \n/**\n * Called when the process is exiting, whether via signal, explicit\n * exit, or running out of stuff to do.\n *\n * If the global process object is not suitable for instrumentation,\n * then this will be a no-op.\n *\n * Returns a function that may be used to unload signal-exit.\n */\nonExit, \n/**\n * Load the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\nload, \n/**\n * Unload the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\nunload, } = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback());\n//# sourceMappingURL=index.js.map","import process from 'node:process';\nimport onetime from 'onetime';\nimport {onExit} from 'signal-exit';\n\nconst terminal = process.stderr.isTTY\n\t? process.stderr\n\t: (process.stdout.isTTY ? process.stdout : undefined);\n\nconst restoreCursor = terminal ? onetime(() => {\n\tonExit(() => {\n\t\tterminal.write('\\u001B[?25h');\n\t}, {alwaysLast: true});\n}) : () => {};\n\nexport default restoreCursor;\n","import process from 'node:process';\nimport restoreCursor from 'restore-cursor';\n\nlet isHidden = false;\n\nconst cliCursor = {};\n\ncliCursor.show = (writableStream = process.stderr) => {\n\tif (!writableStream.isTTY) {\n\t\treturn;\n\t}\n\n\tisHidden = false;\n\twritableStream.write('\\u001B[?25h');\n};\n\ncliCursor.hide = (writableStream = process.stderr) => {\n\tif (!writableStream.isTTY) {\n\t\treturn;\n\t}\n\n\trestoreCursor();\n\tisHidden = true;\n\twritableStream.write('\\u001B[?25l');\n};\n\ncliCursor.toggle = (force, writableStream) => {\n\tif (force !== undefined) {\n\t\tisHidden = force;\n\t}\n\n\tif (isHidden) {\n\t\tcliCursor.show(writableStream);\n\t} else {\n\t\tcliCursor.hide(writableStream);\n\t}\n};\n\nexport default cliCursor;\n","import ansiRegex from 'ansi-regex';\n\nconst regex = ansiRegex();\n\nexport default function stripAnsi(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\t}\n\n\t// Even though the regex is global, we don't need to reset the `.lastIndex`\n\t// because unlike `.exec()` and `.test()`, `.replace()` does it automatically\n\t// and doing it manually has a performance penalty.\n\treturn string.replace(regex, '');\n}\n","export default () => {\n\t// https://mths.be/emoji\n\treturn /[#*0-9]\\uFE0F?\\u20E3|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26AA\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C8\\u26CF\\u26D1\\u26E9\\u26F0-\\u26F5\\u26F7\\u26F8\\u26FA\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B55\\u3030\\u303D\\u3297\\u3299]\\uFE0F?|[\\u261D\\u270C\\u270D](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?|[\\u270A\\u270B](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u2693\\u26A1\\u26AB\\u26C5\\u26CE\\u26D4\\u26EA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2795-\\u2797\\u27B0\\u27BF\\u2B50]|\\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FE0F?)?|\\uDC41\\uFE0F?(?:\\u200D\\uD83D\\uDDE8\\uFE0F?)?|\\uDC68(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDC68\\uDC69]\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?))?|\\uDC69(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?[\\uDC68\\uDC69]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?|\\uDC69\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?))|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFC-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFE]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDD75(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\uDE2E(?:\\u200D\\uD83D\\uDCA8)?|\\uDE35(?:\\u200D\\uD83D\\uDCAB)?|\\uDE36(?:\\u200D\\uD83C\\uDF2B\\uFE0F?)?|\\uDE42(?:\\u200D[\\u2194\\u2195]\\uFE0F?)?|\\uDEB6(?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D(?:[\\u2640\\u2642]\\uFE0F?(?:\\u200D\\u27A1\\uFE0F?)?|\\u27A1\\uFE0F?))?)|\\uD83E(?:[\\uDD0C\\uDD0F\\uDD18-\\uDD1F\\uDD30-\\uDD34\\uDD36\\uDD77\\uDDB5\\uDDB6\\uDDBB\\uDDD2\\uDDD3\\uDDD5\\uDEC3-\\uDEC5\\uDEF0\\uDEF2-\\uDEF8](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3C-\\uDD3E\\uDDB8\\uDDB9\\uDDCD\\uDDCF\\uDDD4\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FE])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDEF1(?:\\uD83C(?:\\uDFFB(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFC-\\uDFFF])?|\\uDFFC(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])?|\\uDFFD(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])?|\\uDFFE(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])?|\\uDFFF(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFE])?))?)/g;\n};\n","import stripAnsi from 'strip-ansi';\nimport {eastAsianWidth} from 'get-east-asian-width';\nimport emojiRegex from 'emoji-regex';\n\nconst segmenter = new Intl.Segmenter();\n\nconst defaultIgnorableCodePointRegex = /^\\p{Default_Ignorable_Code_Point}$/u;\n\nexport default function stringWidth(string, options = {}) {\n\tif (typeof string !== 'string' || string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tconst {\n\t\tambiguousIsNarrow = true,\n\t\tcountAnsiEscapeCodes = false,\n\t} = options;\n\n\tif (!countAnsiEscapeCodes) {\n\t\tstring = stripAnsi(string);\n\t}\n\n\tif (string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tlet width = 0;\n\tconst eastAsianWidthOptions = {ambiguousAsWide: !ambiguousIsNarrow};\n\n\tfor (const {segment: character} of segmenter.segment(string)) {\n\t\tconst codePoint = character.codePointAt(0);\n\n\t\t// Ignore control characters\n\t\tif (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore zero-width characters\n\t\tif (\n\t\t\t(codePoint >= 0x20_0B && codePoint <= 0x20_0F) // Zero-width space, non-joiner, joiner, left-to-right mark, right-to-left mark\n\t\t\t|| codePoint === 0xFE_FF // Zero-width no-break space\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore combining characters\n\t\tif (\n\t\t\t(codePoint >= 0x3_00 && codePoint <= 0x3_6F) // Combining diacritical marks\n\t\t\t|| (codePoint >= 0x1A_B0 && codePoint <= 0x1A_FF) // Combining diacritical marks extended\n\t\t\t|| (codePoint >= 0x1D_C0 && codePoint <= 0x1D_FF) // Combining diacritical marks supplement\n\t\t\t|| (codePoint >= 0x20_D0 && codePoint <= 0x20_FF) // Combining diacritical marks for symbols\n\t\t\t|| (codePoint >= 0xFE_20 && codePoint <= 0xFE_2F) // Combining half marks\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore surrogate pairs\n\t\tif (codePoint >= 0xD8_00 && codePoint <= 0xDF_FF) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore variation selectors\n\t\tif (codePoint >= 0xFE_00 && codePoint <= 0xFE_0F) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// This covers some of the above cases, but we still keep them for performance reasons.\n\t\tif (defaultIgnorableCodePointRegex.test(character)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// TODO: Use `/\\p{RGI_Emoji}/v` when targeting Node.js 20.\n\t\tif (emojiRegex().test(character)) {\n\t\t\twidth += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\twidth += eastAsianWidth(codePoint, eastAsianWidthOptions);\n\t}\n\n\treturn width;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import stringWidth from 'string-width';\nimport stripAnsi from 'strip-ansi';\nimport ansiStyles from 'ansi-styles';\n\nconst ESCAPES = new Set([\n\t'\\u001B',\n\t'\\u009B',\n]);\n\nconst END_CODE = 39;\nconst ANSI_ESCAPE_BELL = '\\u0007';\nconst ANSI_CSI = '[';\nconst ANSI_OSC = ']';\nconst ANSI_SGR_TERMINATOR = 'm';\nconst ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;\n\nconst wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;\nconst wrapAnsiHyperlink = url => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;\n\n// Calculate the length of words split on ' ', ignoring\n// the extra characters added by ansi escape codes\nconst wordLengths = string => string.split(' ').map(character => stringWidth(character));\n\n// Wrap a long word across multiple rows\n// Ansi escape codes do not count towards length\nconst wrapWord = (rows, word, columns) => {\n\tconst characters = [...word];\n\n\tlet isInsideEscape = false;\n\tlet isInsideLinkEscape = false;\n\tlet visible = stringWidth(stripAnsi(rows.at(-1)));\n\n\tfor (const [index, character] of characters.entries()) {\n\t\tconst characterLength = stringWidth(character);\n\n\t\tif (visible + characterLength <= columns) {\n\t\t\trows[rows.length - 1] += character;\n\t\t} else {\n\t\t\trows.push(character);\n\t\t\tvisible = 0;\n\t\t}\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tisInsideEscape = true;\n\n\t\t\tconst ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join('');\n\t\t\tisInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;\n\t\t}\n\n\t\tif (isInsideEscape) {\n\t\t\tif (isInsideLinkEscape) {\n\t\t\t\tif (character === ANSI_ESCAPE_BELL) {\n\t\t\t\t\tisInsideEscape = false;\n\t\t\t\t\tisInsideLinkEscape = false;\n\t\t\t\t}\n\t\t\t} else if (character === ANSI_SGR_TERMINATOR) {\n\t\t\t\tisInsideEscape = false;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisible += characterLength;\n\n\t\tif (visible === columns && index < characters.length - 1) {\n\t\t\trows.push('');\n\t\t\tvisible = 0;\n\t\t}\n\t}\n\n\t// It's possible that the last row we copy over is only\n\t// ansi escape characters, handle this edge-case\n\tif (!visible && rows.at(-1).length > 0 && rows.length > 1) {\n\t\trows[rows.length - 2] += rows.pop();\n\t}\n};\n\n// Trims spaces from a string ignoring invisible sequences\nconst stringVisibleTrimSpacesRight = string => {\n\tconst words = string.split(' ');\n\tlet last = words.length;\n\n\twhile (last > 0) {\n\t\tif (stringWidth(words[last - 1]) > 0) {\n\t\t\tbreak;\n\t\t}\n\n\t\tlast--;\n\t}\n\n\tif (last === words.length) {\n\t\treturn string;\n\t}\n\n\treturn words.slice(0, last).join(' ') + words.slice(last).join('');\n};\n\n// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode.\n//\n// 'hard' will never allow a string to take up more than columns characters.\n//\n// 'soft' allows long words to expand past the column length.\nconst exec = (string, columns, options = {}) => {\n\tif (options.trim !== false && string.trim() === '') {\n\t\treturn '';\n\t}\n\n\tlet returnValue = '';\n\tlet escapeCode;\n\tlet escapeUrl;\n\n\tconst lengths = wordLengths(string);\n\tlet rows = [''];\n\n\tfor (const [index, word] of string.split(' ').entries()) {\n\t\tif (options.trim !== false) {\n\t\t\trows[rows.length - 1] = rows.at(-1).trimStart();\n\t\t}\n\n\t\tlet rowLength = stringWidth(rows.at(-1));\n\n\t\tif (index !== 0) {\n\t\t\tif (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {\n\t\t\t\t// If we start with a new word but the current row length equals the length of the columns, add a new row\n\t\t\t\trows.push('');\n\t\t\t\trowLength = 0;\n\t\t\t}\n\n\t\t\tif (rowLength > 0 || options.trim === false) {\n\t\t\t\trows[rows.length - 1] += ' ';\n\t\t\t\trowLength++;\n\t\t\t}\n\t\t}\n\n\t\t// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'\n\t\tif (options.hard && lengths[index] > columns) {\n\t\t\tconst remainingColumns = (columns - rowLength);\n\t\t\tconst breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);\n\t\t\tconst breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);\n\t\t\tif (breaksStartingNextLine < breaksStartingThisLine) {\n\t\t\t\trows.push('');\n\t\t\t}\n\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {\n\t\t\tif (options.wordWrap === false && rowLength < columns) {\n\t\t\t\twrapWord(rows, word, columns);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trows.push('');\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && options.wordWrap === false) {\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\trows[rows.length - 1] += word;\n\t}\n\n\tif (options.trim !== false) {\n\t\trows = rows.map(row => stringVisibleTrimSpacesRight(row));\n\t}\n\n\tconst preString = rows.join('\\n');\n\tconst pre = [...preString];\n\n\t// We need to keep a separate index as `String#slice()` works on Unicode code units, while `pre` is an array of codepoints.\n\tlet preStringIndex = 0;\n\n\tfor (const [index, character] of pre.entries()) {\n\t\treturnValue += character;\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tconst {groups} = new RegExp(`(?:\\\\${ANSI_CSI}(?<code>\\\\d+)m|\\\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || {groups: {}};\n\t\t\tif (groups.code !== undefined) {\n\t\t\t\tconst code = Number.parseFloat(groups.code);\n\t\t\t\tescapeCode = code === END_CODE ? undefined : code;\n\t\t\t} else if (groups.uri !== undefined) {\n\t\t\t\tescapeUrl = groups.uri.length === 0 ? undefined : groups.uri;\n\t\t\t}\n\t\t}\n\n\t\tconst code = ansiStyles.codes.get(Number(escapeCode));\n\n\t\tif (pre[index + 1] === '\\n') {\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink('');\n\t\t\t}\n\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(code);\n\t\t\t}\n\t\t} else if (character === '\\n') {\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(escapeCode);\n\t\t\t}\n\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink(escapeUrl);\n\t\t\t}\n\t\t}\n\n\t\tpreStringIndex += character.length;\n\t}\n\n\treturn returnValue;\n};\n\n// For each newline, invoke the method separately\nexport default function wrapAnsi(string, columns, options) {\n\treturn String(string)\n\t\t.normalize()\n\t\t.replaceAll('\\r\\n', '\\n')\n\t\t.split('\\n')\n\t\t.map(line => exec(line, columns, options))\n\t\t.join('\\n');\n}\n","import process from 'node:process';\nimport ansiEscapes from 'ansi-escapes';\nimport cliCursor from 'cli-cursor';\nimport wrapAnsi from 'wrap-ansi';\nimport sliceAnsi from 'slice-ansi';\nimport stripAnsi from 'strip-ansi';\n\nconst defaultTerminalHeight = 24;\n\nconst getWidth = ({columns = 80}) => columns;\n\nconst fitToTerminalHeight = (stream, text) => {\n\tconst terminalHeight = stream.rows ?? defaultTerminalHeight;\n\tconst lines = text.split('\\n');\n\tconst toRemove = Math.max(0, lines.length - terminalHeight);\n\treturn toRemove ? sliceAnsi(text, stripAnsi(lines.slice(0, toRemove).join('\\n')).length + 1) : text;\n};\n\nexport function createLogUpdate(stream, {showCursor = false} = {}) {\n\tlet previousLineCount = 0;\n\tlet previousWidth = getWidth(stream);\n\tlet previousOutput = '';\n\n\tconst reset = () => {\n\t\tpreviousOutput = '';\n\t\tpreviousWidth = getWidth(stream);\n\t\tpreviousLineCount = 0;\n\t};\n\n\tconst render = (...arguments_) => {\n\t\tif (!showCursor) {\n\t\t\tcliCursor.hide();\n\t\t}\n\n\t\tlet output = fitToTerminalHeight(stream, arguments_.join(' ') + '\\n');\n\t\tconst width = getWidth(stream);\n\n\t\tif (output === previousOutput && previousWidth === width) {\n\t\t\treturn;\n\t\t}\n\n\t\tpreviousOutput = output;\n\t\tpreviousWidth = width;\n\t\toutput = wrapAnsi(output, width, {trim: false, hard: true, wordWrap: false});\n\n\t\tstream.write(ansiEscapes.eraseLines(previousLineCount) + output);\n\t\tpreviousLineCount = output.split('\\n').length;\n\t};\n\n\trender.clear = () => {\n\t\tstream.write(ansiEscapes.eraseLines(previousLineCount));\n\t\treset();\n\t};\n\n\trender.done = () => {\n\t\treset();\n\t\tif (!showCursor) {\n\t\t\tcliCursor.show();\n\t\t}\n\t};\n\n\treturn render;\n}\n\nconst logUpdate = createLogUpdate(process.stdout);\nexport default logUpdate;\n\nexport const logUpdateStderr = createLogUpdate(process.stderr);\n"],"names":["process","os","onetime","code","ansiEscapes.e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,EAAC,MAAM,OAAO,MAAM,MAAM,UAAU,MAAK,CAAC;AAE3E,WAAO,MAAMC,WAAuB,iBAAiB,IAAI,MAAM;AAC/D,wBAAoB,OAAO,MAAM,IAAI,EAAE;AAAA,EACxC;AAEA,SAAO,QAAQ,MAAM;AACpB,WAAO,MAAMA,WAAuB,iBAAiB,CAAC;AACtD,UAAK;AAAA,EACN;AAEA,SAAO,OAAO,MAAM;AACnB,UAAK;AACL,QAAI,CAAC,YAAY;AAChB,gBAAU,KAAI;AAAA,IACf;AAAA,EACD;AAEA,SAAO;AACR;AAEkB,gBAAgBJ,UAAQ,MAAM;AAGjB,gBAAgBA,UAAQ,MAAM;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13]}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { i as isFullWidth, b as isWide } from "./index-DA8FlEll.js";
|
|
2
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
|
3
|
+
const wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
4
|
+
const wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
5
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
6
|
+
const styles = {
|
|
7
|
+
modifier: {
|
|
8
|
+
reset: [0, 0],
|
|
9
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
10
|
+
bold: [1, 22],
|
|
11
|
+
dim: [2, 22],
|
|
12
|
+
italic: [3, 23],
|
|
13
|
+
underline: [4, 24],
|
|
14
|
+
overline: [53, 55],
|
|
15
|
+
inverse: [7, 27],
|
|
16
|
+
hidden: [8, 28],
|
|
17
|
+
strikethrough: [9, 29]
|
|
18
|
+
},
|
|
19
|
+
color: {
|
|
20
|
+
black: [30, 39],
|
|
21
|
+
red: [31, 39],
|
|
22
|
+
green: [32, 39],
|
|
23
|
+
yellow: [33, 39],
|
|
24
|
+
blue: [34, 39],
|
|
25
|
+
magenta: [35, 39],
|
|
26
|
+
cyan: [36, 39],
|
|
27
|
+
white: [37, 39],
|
|
28
|
+
// Bright color
|
|
29
|
+
blackBright: [90, 39],
|
|
30
|
+
gray: [90, 39],
|
|
31
|
+
// Alias of `blackBright`
|
|
32
|
+
grey: [90, 39],
|
|
33
|
+
// Alias of `blackBright`
|
|
34
|
+
redBright: [91, 39],
|
|
35
|
+
greenBright: [92, 39],
|
|
36
|
+
yellowBright: [93, 39],
|
|
37
|
+
blueBright: [94, 39],
|
|
38
|
+
magentaBright: [95, 39],
|
|
39
|
+
cyanBright: [96, 39],
|
|
40
|
+
whiteBright: [97, 39]
|
|
41
|
+
},
|
|
42
|
+
bgColor: {
|
|
43
|
+
bgBlack: [40, 49],
|
|
44
|
+
bgRed: [41, 49],
|
|
45
|
+
bgGreen: [42, 49],
|
|
46
|
+
bgYellow: [43, 49],
|
|
47
|
+
bgBlue: [44, 49],
|
|
48
|
+
bgMagenta: [45, 49],
|
|
49
|
+
bgCyan: [46, 49],
|
|
50
|
+
bgWhite: [47, 49],
|
|
51
|
+
// Bright color
|
|
52
|
+
bgBlackBright: [100, 49],
|
|
53
|
+
bgGray: [100, 49],
|
|
54
|
+
// Alias of `bgBlackBright`
|
|
55
|
+
bgGrey: [100, 49],
|
|
56
|
+
// Alias of `bgBlackBright`
|
|
57
|
+
bgRedBright: [101, 49],
|
|
58
|
+
bgGreenBright: [102, 49],
|
|
59
|
+
bgYellowBright: [103, 49],
|
|
60
|
+
bgBlueBright: [104, 49],
|
|
61
|
+
bgMagentaBright: [105, 49],
|
|
62
|
+
bgCyanBright: [106, 49],
|
|
63
|
+
bgWhiteBright: [107, 49]
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.keys(styles.modifier);
|
|
67
|
+
const foregroundColorNames = Object.keys(styles.color);
|
|
68
|
+
const backgroundColorNames = Object.keys(styles.bgColor);
|
|
69
|
+
[...foregroundColorNames, ...backgroundColorNames];
|
|
70
|
+
function assembleStyles() {
|
|
71
|
+
const codes = /* @__PURE__ */ new Map();
|
|
72
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
73
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
74
|
+
styles[styleName] = {
|
|
75
|
+
open: `\x1B[${style[0]}m`,
|
|
76
|
+
close: `\x1B[${style[1]}m`
|
|
77
|
+
};
|
|
78
|
+
group[styleName] = styles[styleName];
|
|
79
|
+
codes.set(style[0], style[1]);
|
|
80
|
+
}
|
|
81
|
+
Object.defineProperty(styles, groupName, {
|
|
82
|
+
value: group,
|
|
83
|
+
enumerable: false
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
Object.defineProperty(styles, "codes", {
|
|
87
|
+
value: codes,
|
|
88
|
+
enumerable: false
|
|
89
|
+
});
|
|
90
|
+
styles.color.close = "\x1B[39m";
|
|
91
|
+
styles.bgColor.close = "\x1B[49m";
|
|
92
|
+
styles.color.ansi = wrapAnsi16();
|
|
93
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
94
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
95
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
96
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
97
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
98
|
+
Object.defineProperties(styles, {
|
|
99
|
+
rgbToAnsi256: {
|
|
100
|
+
value(red, green, blue) {
|
|
101
|
+
if (red === green && green === blue) {
|
|
102
|
+
if (red < 8) {
|
|
103
|
+
return 16;
|
|
104
|
+
}
|
|
105
|
+
if (red > 248) {
|
|
106
|
+
return 231;
|
|
107
|
+
}
|
|
108
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
109
|
+
}
|
|
110
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
111
|
+
},
|
|
112
|
+
enumerable: false
|
|
113
|
+
},
|
|
114
|
+
hexToRgb: {
|
|
115
|
+
value(hex) {
|
|
116
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
117
|
+
if (!matches) {
|
|
118
|
+
return [0, 0, 0];
|
|
119
|
+
}
|
|
120
|
+
let [colorString] = matches;
|
|
121
|
+
if (colorString.length === 3) {
|
|
122
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
123
|
+
}
|
|
124
|
+
const integer = Number.parseInt(colorString, 16);
|
|
125
|
+
return [
|
|
126
|
+
/* eslint-disable no-bitwise */
|
|
127
|
+
integer >> 16 & 255,
|
|
128
|
+
integer >> 8 & 255,
|
|
129
|
+
integer & 255
|
|
130
|
+
/* eslint-enable no-bitwise */
|
|
131
|
+
];
|
|
132
|
+
},
|
|
133
|
+
enumerable: false
|
|
134
|
+
},
|
|
135
|
+
hexToAnsi256: {
|
|
136
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
137
|
+
enumerable: false
|
|
138
|
+
},
|
|
139
|
+
ansi256ToAnsi: {
|
|
140
|
+
value(code) {
|
|
141
|
+
if (code < 8) {
|
|
142
|
+
return 30 + code;
|
|
143
|
+
}
|
|
144
|
+
if (code < 16) {
|
|
145
|
+
return 90 + (code - 8);
|
|
146
|
+
}
|
|
147
|
+
let red;
|
|
148
|
+
let green;
|
|
149
|
+
let blue;
|
|
150
|
+
if (code >= 232) {
|
|
151
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
152
|
+
green = red;
|
|
153
|
+
blue = red;
|
|
154
|
+
} else {
|
|
155
|
+
code -= 16;
|
|
156
|
+
const remainder = code % 36;
|
|
157
|
+
red = Math.floor(code / 36) / 5;
|
|
158
|
+
green = Math.floor(remainder / 6) / 5;
|
|
159
|
+
blue = remainder % 6 / 5;
|
|
160
|
+
}
|
|
161
|
+
const value = Math.max(red, green, blue) * 2;
|
|
162
|
+
if (value === 0) {
|
|
163
|
+
return 30;
|
|
164
|
+
}
|
|
165
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
166
|
+
if (value === 2) {
|
|
167
|
+
result += 60;
|
|
168
|
+
}
|
|
169
|
+
return result;
|
|
170
|
+
},
|
|
171
|
+
enumerable: false
|
|
172
|
+
},
|
|
173
|
+
rgbToAnsi: {
|
|
174
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
175
|
+
enumerable: false
|
|
176
|
+
},
|
|
177
|
+
hexToAnsi: {
|
|
178
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
179
|
+
enumerable: false
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
return styles;
|
|
183
|
+
}
|
|
184
|
+
const ansiStyles = assembleStyles();
|
|
185
|
+
function isFullwidthCodePoint(codePoint) {
|
|
186
|
+
if (!Number.isInteger(codePoint)) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
return isFullWidth(codePoint) || isWide(codePoint);
|
|
190
|
+
}
|
|
191
|
+
const ESCAPES = /* @__PURE__ */ new Set([27, 155]);
|
|
192
|
+
const CODE_POINT_0 = "0".codePointAt(0);
|
|
193
|
+
const CODE_POINT_9 = "9".codePointAt(0);
|
|
194
|
+
const MAX_ANSI_SEQUENCE_LENGTH = 19;
|
|
195
|
+
const endCodesSet = /* @__PURE__ */ new Set();
|
|
196
|
+
const endCodesMap = /* @__PURE__ */ new Map();
|
|
197
|
+
for (const [start, end] of ansiStyles.codes) {
|
|
198
|
+
endCodesSet.add(ansiStyles.color.ansi(end));
|
|
199
|
+
endCodesMap.set(ansiStyles.color.ansi(start), ansiStyles.color.ansi(end));
|
|
200
|
+
}
|
|
201
|
+
function getEndCode(code) {
|
|
202
|
+
if (endCodesSet.has(code)) {
|
|
203
|
+
return code;
|
|
204
|
+
}
|
|
205
|
+
if (endCodesMap.has(code)) {
|
|
206
|
+
return endCodesMap.get(code);
|
|
207
|
+
}
|
|
208
|
+
code = code.slice(2);
|
|
209
|
+
if (code.includes(";")) {
|
|
210
|
+
code = code[0] + "0";
|
|
211
|
+
}
|
|
212
|
+
const returnValue = ansiStyles.codes.get(Number.parseInt(code, 10));
|
|
213
|
+
if (returnValue) {
|
|
214
|
+
return ansiStyles.color.ansi(returnValue);
|
|
215
|
+
}
|
|
216
|
+
return ansiStyles.reset.open;
|
|
217
|
+
}
|
|
218
|
+
function findNumberIndex(string) {
|
|
219
|
+
for (let index = 0; index < string.length; index++) {
|
|
220
|
+
const codePoint = string.codePointAt(index);
|
|
221
|
+
if (codePoint >= CODE_POINT_0 && codePoint <= CODE_POINT_9) {
|
|
222
|
+
return index;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return -1;
|
|
226
|
+
}
|
|
227
|
+
function parseAnsiCode(string, offset) {
|
|
228
|
+
string = string.slice(offset, offset + MAX_ANSI_SEQUENCE_LENGTH);
|
|
229
|
+
const startIndex = findNumberIndex(string);
|
|
230
|
+
if (startIndex !== -1) {
|
|
231
|
+
let endIndex = string.indexOf("m", startIndex);
|
|
232
|
+
if (endIndex === -1) {
|
|
233
|
+
endIndex = string.length;
|
|
234
|
+
}
|
|
235
|
+
return string.slice(0, endIndex + 1);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {
|
|
239
|
+
const returnValue = [];
|
|
240
|
+
let index = 0;
|
|
241
|
+
let visibleCount = 0;
|
|
242
|
+
while (index < string.length) {
|
|
243
|
+
const codePoint = string.codePointAt(index);
|
|
244
|
+
if (ESCAPES.has(codePoint)) {
|
|
245
|
+
const code = parseAnsiCode(string, index);
|
|
246
|
+
if (code) {
|
|
247
|
+
returnValue.push({
|
|
248
|
+
type: "ansi",
|
|
249
|
+
code,
|
|
250
|
+
endCode: getEndCode(code)
|
|
251
|
+
});
|
|
252
|
+
index += code.length;
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const isFullWidth2 = isFullwidthCodePoint(codePoint);
|
|
257
|
+
const character = String.fromCodePoint(codePoint);
|
|
258
|
+
returnValue.push({
|
|
259
|
+
type: "character",
|
|
260
|
+
value: character,
|
|
261
|
+
isFullWidth: isFullWidth2
|
|
262
|
+
});
|
|
263
|
+
index += character.length;
|
|
264
|
+
visibleCount += isFullWidth2 ? 2 : character.length;
|
|
265
|
+
if (visibleCount >= endCharacter) {
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return returnValue;
|
|
270
|
+
}
|
|
271
|
+
function reduceAnsiCodes(codes) {
|
|
272
|
+
let returnValue = [];
|
|
273
|
+
for (const code of codes) {
|
|
274
|
+
if (code.code === ansiStyles.reset.open) {
|
|
275
|
+
returnValue = [];
|
|
276
|
+
} else if (endCodesSet.has(code.code)) {
|
|
277
|
+
returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.code);
|
|
278
|
+
} else {
|
|
279
|
+
returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.endCode);
|
|
280
|
+
returnValue.push(code);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return returnValue;
|
|
284
|
+
}
|
|
285
|
+
function undoAnsiCodes(codes) {
|
|
286
|
+
const reduced = reduceAnsiCodes(codes);
|
|
287
|
+
const endCodes = reduced.map(({ endCode }) => endCode);
|
|
288
|
+
return endCodes.reverse().join("");
|
|
289
|
+
}
|
|
290
|
+
function sliceAnsi(string, start, end) {
|
|
291
|
+
const tokens = tokenize(string, end);
|
|
292
|
+
let activeCodes = [];
|
|
293
|
+
let position = 0;
|
|
294
|
+
let returnValue = "";
|
|
295
|
+
let include = false;
|
|
296
|
+
for (const token of tokens) {
|
|
297
|
+
if (end !== void 0 && position >= end) {
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
if (token.type === "ansi") {
|
|
301
|
+
activeCodes.push(token);
|
|
302
|
+
if (include) {
|
|
303
|
+
returnValue += token.code;
|
|
304
|
+
}
|
|
305
|
+
} else {
|
|
306
|
+
if (!include && position >= start) {
|
|
307
|
+
include = true;
|
|
308
|
+
activeCodes = reduceAnsiCodes(activeCodes);
|
|
309
|
+
returnValue = activeCodes.map(({ code }) => code).join("");
|
|
310
|
+
}
|
|
311
|
+
if (include) {
|
|
312
|
+
returnValue += token.value;
|
|
313
|
+
}
|
|
314
|
+
position += token.isFullWidth ? 2 : token.value.length;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
returnValue += undoAnsiCodes(activeCodes);
|
|
318
|
+
return returnValue;
|
|
319
|
+
}
|
|
320
|
+
export {
|
|
321
|
+
sliceAnsi as s
|
|
322
|
+
};
|
|
323
|
+
//# sourceMappingURL=index-D3Z7xY3-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D3Z7xY3-.js","sources":["../../../node_modules/slice-ansi/node_modules/ansi-styles/index.js","../../../node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js","../../../node_modules/slice-ansi/index.js"],"sourcesContent":["const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import {\n\t_isFullWidth as isFullWidth,\n\t_isWide as isWide,\n} from 'get-east-asian-width';\n\nexport default function isFullwidthCodePoint(codePoint) {\n\tif (!Number.isInteger(codePoint)) {\n\t\treturn false;\n\t}\n\n\treturn isFullWidth(codePoint) || isWide(codePoint);\n}\n","import ansiStyles from 'ansi-styles';\nimport isFullwidthCodePoint from 'is-fullwidth-code-point';\n\n// \\x1b and \\x9b\nconst ESCAPES = new Set([27, 155]);\n\nconst CODE_POINT_0 = '0'.codePointAt(0);\nconst CODE_POINT_9 = '9'.codePointAt(0);\n\nconst MAX_ANSI_SEQUENCE_LENGTH = 19;\n\nconst endCodesSet = new Set();\nconst endCodesMap = new Map();\nfor (const [start, end] of ansiStyles.codes) {\n\tendCodesSet.add(ansiStyles.color.ansi(end));\n\tendCodesMap.set(ansiStyles.color.ansi(start), ansiStyles.color.ansi(end));\n}\n\nfunction getEndCode(code) {\n\tif (endCodesSet.has(code)) {\n\t\treturn code;\n\t}\n\n\tif (endCodesMap.has(code)) {\n\t\treturn endCodesMap.get(code);\n\t}\n\n\tcode = code.slice(2);\n\tif (code.includes(';')) {\n\t\tcode = code[0] + '0';\n\t}\n\n\tconst returnValue = ansiStyles.codes.get(Number.parseInt(code, 10));\n\tif (returnValue) {\n\t\treturn ansiStyles.color.ansi(returnValue);\n\t}\n\n\treturn ansiStyles.reset.open;\n}\n\nfunction findNumberIndex(string) {\n\tfor (let index = 0; index < string.length; index++) {\n\t\tconst codePoint = string.codePointAt(index);\n\t\tif (codePoint >= CODE_POINT_0 && codePoint <= CODE_POINT_9) {\n\t\t\treturn index;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\nfunction parseAnsiCode(string, offset) {\n\tstring = string.slice(offset, offset + MAX_ANSI_SEQUENCE_LENGTH);\n\tconst startIndex = findNumberIndex(string);\n\tif (startIndex !== -1) {\n\t\tlet endIndex = string.indexOf('m', startIndex);\n\t\tif (endIndex === -1) {\n\t\t\tendIndex = string.length;\n\t\t}\n\n\t\treturn string.slice(0, endIndex + 1);\n\t}\n}\n\nfunction tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {\n\tconst returnValue = [];\n\n\tlet index = 0;\n\tlet visibleCount = 0;\n\twhile (index < string.length) {\n\t\tconst codePoint = string.codePointAt(index);\n\n\t\tif (ESCAPES.has(codePoint)) {\n\t\t\tconst code = parseAnsiCode(string, index);\n\t\t\tif (code) {\n\t\t\t\treturnValue.push({\n\t\t\t\t\ttype: 'ansi',\n\t\t\t\t\tcode,\n\t\t\t\t\tendCode: getEndCode(code),\n\t\t\t\t});\n\t\t\t\tindex += code.length;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tconst isFullWidth = isFullwidthCodePoint(codePoint);\n\t\tconst character = String.fromCodePoint(codePoint);\n\n\t\treturnValue.push({\n\t\t\ttype: 'character',\n\t\t\tvalue: character,\n\t\t\tisFullWidth,\n\t\t});\n\n\t\tindex += character.length;\n\t\tvisibleCount += isFullWidth ? 2 : character.length;\n\n\t\tif (visibleCount >= endCharacter) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn returnValue;\n}\n\nfunction reduceAnsiCodes(codes) {\n\tlet returnValue = [];\n\n\tfor (const code of codes) {\n\t\tif (code.code === ansiStyles.reset.open) {\n\t\t\t// Reset code, disable all codes\n\t\t\treturnValue = [];\n\t\t} else if (endCodesSet.has(code.code)) {\n\t\t\t// This is an end code, disable all matching start codes\n\t\t\treturnValue = returnValue.filter(returnValueCode => returnValueCode.endCode !== code.code);\n\t\t} else {\n\t\t\t// This is a start code. Disable all styles this \"overrides\", then enable it\n\t\t\treturnValue = returnValue.filter(returnValueCode => returnValueCode.endCode !== code.endCode);\n\t\t\treturnValue.push(code);\n\t\t}\n\t}\n\n\treturn returnValue;\n}\n\nfunction undoAnsiCodes(codes) {\n\tconst reduced = reduceAnsiCodes(codes);\n\tconst endCodes = reduced.map(({endCode}) => endCode);\n\treturn endCodes.reverse().join('');\n}\n\nexport default function sliceAnsi(string, start, end) {\n\tconst tokens = tokenize(string, end);\n\tlet activeCodes = [];\n\tlet position = 0;\n\tlet returnValue = '';\n\tlet include = false;\n\n\tfor (const token of tokens) {\n\t\tif (end !== undefined && position >= end) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (token.type === 'ansi') {\n\t\t\tactiveCodes.push(token);\n\t\t\tif (include) {\n\t\t\t\treturnValue += token.code;\n\t\t\t}\n\t\t} else {\n\t\t\t// Character\n\t\t\tif (!include && position >= start) {\n\t\t\t\tinclude = true;\n\t\t\t\t// Simplify active codes\n\t\t\t\tactiveCodes = reduceAnsiCodes(activeCodes);\n\t\t\t\treturnValue = activeCodes.map(({code}) => code).join('');\n\t\t\t}\n\n\t\t\tif (include) {\n\t\t\t\treturnValue += token.value;\n\t\t\t}\n\n\t\t\tposition += token.isFullWidth ? 2 : token.value.length;\n\t\t}\n\t}\n\n\t// Disable active codes at the end\n\treturnValue += undoAnsiCodes(activeCodes);\n\treturn returnValue;\n}\n"],"names":["isFullWidth"],"mappings":";AAAA,MAAM,yBAAyB;AAE/B,MAAM,aAAa,CAAC,SAAS,MAAM,UAAQ,QAAU,OAAO,MAAM;AAElE,MAAM,cAAc,CAAC,SAAS,MAAM,UAAQ,QAAU,KAAK,MAAM,MAAM,IAAI;AAE3E,MAAM,cAAc,CAAC,SAAS,MAAM,CAAC,KAAK,OAAO,SAAS,QAAU,KAAK,MAAM,MAAM,GAAG,IAAI,KAAK,IAAI,IAAI;AAEzG,MAAM,SAAS;AAAA,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