@wirecat/amo-cli 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +2 -2
- package/contracts/wirecat.json +14 -0
- package/dist/amo/button.js +1 -1
- package/dist/amo/json.js +1 -1
- package/dist/amo/oauth.js +3 -5
- package/dist/amo/transport.js +3 -7
- package/dist/api-keys.js +1 -1
- package/dist/bin/amo.js +11 -11
- package/dist/bundle/amo.js +5 -183
- package/dist/bundle/{chunk-3PYE55JY.js → chunk-3HWD4BKU.js} +4 -6
- package/dist/bundle/{chunk-M6VZXAJC.js → chunk-4EXURQQQ.js} +21 -19
- package/dist/bundle/chunk-AEWYRB6F.js +8 -0
- package/dist/bundle/{chunk-WUFX4TKA.js → chunk-GL7CRTHR.js} +3 -3
- package/dist/bundle/chunk-N2UB32VN.js +76 -0
- package/dist/bundle/{chunk-KZ2FIDI3.js → chunk-PVVSHDMQ.js} +7 -15
- package/dist/bundle/program-SQH3SPOW.js +2352 -0
- package/dist/bundle/{instructions-AMH5RWVJ.js → source-C65ZJUTW.js} +5 -6
- package/dist/bundle/store-SJ2TOUGU.js +12 -0
- package/dist/bundle/writer-I7GBI3VE.js +12 -0
- package/dist/commands/account.js +1 -1
- package/dist/commands/api.js +1 -3
- package/dist/commands/crm-shared.js +2 -3
- package/dist/commands/schedule.js +1 -1
- package/dist/commands/session.js +1 -8
- package/dist/commands/write.js +1 -2
- package/dist/config.js +1 -2
- package/dist/context.js +1 -2
- package/dist/crm/activities.js +1 -1
- package/dist/crm/records.js +1 -1
- package/dist/crm/source.js +1 -1
- package/dist/crm/writer.js +1 -1
- package/dist/identity.js +4 -0
- package/dist/program.js +1 -2
- package/dist/setup/flow.js +1 -1
- package/dist/store.js +1 -1
- package/dist/version.js +1 -1
- package/dist/whoami.js +1 -1
- package/package.json +3 -3
- package/scenarios/first-sync.md +13 -11
- package/scenarios/keep-in-sync.md +7 -6
- package/scenarios/safe-agent-writes.md +10 -9
- package/dist/amo/account.d.ts +0 -18
- package/dist/amo/account.d.ts.map +0 -1
- package/dist/amo/account.js.map +0 -1
- package/dist/amo/allow-list.d.ts +0 -31
- package/dist/amo/allow-list.d.ts.map +0 -1
- package/dist/amo/allow-list.js.map +0 -1
- package/dist/amo/button.d.ts +0 -53
- package/dist/amo/button.d.ts.map +0 -1
- package/dist/amo/button.js.map +0 -1
- package/dist/amo/errors.d.ts +0 -12
- package/dist/amo/errors.d.ts.map +0 -1
- package/dist/amo/errors.js.map +0 -1
- package/dist/amo/json.d.ts +0 -3
- package/dist/amo/json.d.ts.map +0 -1
- package/dist/amo/json.js.map +0 -1
- package/dist/amo/oauth.d.ts +0 -64
- package/dist/amo/oauth.d.ts.map +0 -1
- package/dist/amo/oauth.js.map +0 -1
- package/dist/amo/operation.d.ts +0 -45
- package/dist/amo/operation.d.ts.map +0 -1
- package/dist/amo/operation.js.map +0 -1
- package/dist/amo/operations.d.ts +0 -3
- package/dist/amo/operations.d.ts.map +0 -1
- package/dist/amo/operations.js.map +0 -1
- package/dist/amo/routes.d.ts +0 -67
- package/dist/amo/routes.d.ts.map +0 -1
- package/dist/amo/routes.js.map +0 -1
- package/dist/amo/transport.d.ts +0 -62
- package/dist/amo/transport.d.ts.map +0 -1
- package/dist/amo/transport.js.map +0 -1
- package/dist/api-keys.d.ts +0 -47
- package/dist/api-keys.d.ts.map +0 -1
- package/dist/api-keys.js.map +0 -1
- package/dist/bin/amo.d.ts +0 -3
- package/dist/bin/amo.d.ts.map +0 -1
- package/dist/bin/amo.js.map +0 -1
- package/dist/bundle/agent-EFMUK732.js +0 -41
- package/dist/bundle/all-profiles-PIWUQWBA.js +0 -320
- package/dist/bundle/anthropic-47CMXBPQ.js +0 -90
- package/dist/bundle/app-server-QRBQODF2.js +0 -257
- package/dist/bundle/areas-QVHVU57Z.js +0 -63
- package/dist/bundle/bun-OPDGMZZQ.js +0 -169
- package/dist/bundle/bun-sqlite-7I4X7CZW.js +0 -75
- package/dist/bundle/chunk-2JHVQMVC.js +0 -16
- package/dist/bundle/chunk-2XBDILVW.js +0 -53
- package/dist/bundle/chunk-3DEQUYEG.js +0 -185
- package/dist/bundle/chunk-3GX6KM2E.js +0 -5302
- package/dist/bundle/chunk-3HC5F3P7.js +0 -24
- package/dist/bundle/chunk-3YM4B2GT.js +0 -63
- package/dist/bundle/chunk-43OW5NTG.js +0 -338
- package/dist/bundle/chunk-43PMSR33.js +0 -357
- package/dist/bundle/chunk-4N7PP76S.js +0 -6848
- package/dist/bundle/chunk-4VN7RI4I.js +0 -1718
- package/dist/bundle/chunk-57HFPNMF.js +0 -189
- package/dist/bundle/chunk-5UTB3ADZ.js +0 -360
- package/dist/bundle/chunk-633NQY2R.js +0 -80
- package/dist/bundle/chunk-63N46DJU.js +0 -12278
- package/dist/bundle/chunk-6D4VWSJD.js +0 -259
- package/dist/bundle/chunk-6JTHXWPE.js +0 -64
- package/dist/bundle/chunk-6QGUK3H7.js +0 -161
- package/dist/bundle/chunk-6WS6GJ4V.js +0 -30
- package/dist/bundle/chunk-7IR2G5XY.js +0 -559
- package/dist/bundle/chunk-7IWIFVXH.js +0 -52
- package/dist/bundle/chunk-ABX7BBS4.js +0 -388
- package/dist/bundle/chunk-ADLS6FVG.js +0 -24600
- package/dist/bundle/chunk-ADTI5RUO.js +0 -1007
- package/dist/bundle/chunk-AKRIUNYP.js +0 -1197
- package/dist/bundle/chunk-BIKOE2IW.js +0 -614
- package/dist/bundle/chunk-BVVMIAQ6.js +0 -37727
- package/dist/bundle/chunk-CGW5R4UD.js +0 -362
- package/dist/bundle/chunk-D4NE7EON.js +0 -170
- package/dist/bundle/chunk-D72URWJE.js +0 -532
- package/dist/bundle/chunk-DFDN6AUB.js +0 -21
- package/dist/bundle/chunk-DNCLQPOM.js +0 -7
- package/dist/bundle/chunk-DPV53EZC.js +0 -206
- package/dist/bundle/chunk-DQ6S5TFZ.js +0 -9539
- package/dist/bundle/chunk-DSJ6EAOA.js +0 -4172
- package/dist/bundle/chunk-DVZ75WZJ.js +0 -3752
- package/dist/bundle/chunk-EH6ZEJGT.js +0 -932
- package/dist/bundle/chunk-EHK73OSW.js +0 -2017
- package/dist/bundle/chunk-FNV5HLHX.js +0 -1068
- package/dist/bundle/chunk-FV4GQNIK.js +0 -136
- package/dist/bundle/chunk-G2TU5RYY.js +0 -332
- package/dist/bundle/chunk-GDK7ETSB.js +0 -218
- package/dist/bundle/chunk-GGMAIIVE.js +0 -38
- package/dist/bundle/chunk-GLYWZQY4.js +0 -86
- package/dist/bundle/chunk-H4AFNENN.js +0 -1343
- package/dist/bundle/chunk-HOF7GQWW.js +0 -142
- package/dist/bundle/chunk-HSPEU6S7.js +0 -209
- package/dist/bundle/chunk-IA7LLLEI.js +0 -100
- package/dist/bundle/chunk-IB55P46L.js +0 -334
- package/dist/bundle/chunk-IG2TJQJ7.js +0 -79
- package/dist/bundle/chunk-JG6LCSEX.js +0 -407
- package/dist/bundle/chunk-JLXXUEAM.js +0 -72
- package/dist/bundle/chunk-JXT6GY4V.js +0 -1023
- package/dist/bundle/chunk-K7YY6SXR.js +0 -738
- package/dist/bundle/chunk-KEKXERBE.js +0 -67181
- package/dist/bundle/chunk-KZN2BG3P.js +0 -721
- package/dist/bundle/chunk-LKH3UKLO.js +0 -230
- package/dist/bundle/chunk-LZPKBN3C.js +0 -193
- package/dist/bundle/chunk-MDEPJZYJ.js +0 -106
- package/dist/bundle/chunk-NB7EOAUZ.js +0 -123
- package/dist/bundle/chunk-NISH4UXM.js +0 -58
- package/dist/bundle/chunk-NSKMNIY6.js +0 -460
- package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
- package/dist/bundle/chunk-PPSAWFJD.js +0 -1293
- package/dist/bundle/chunk-Q7ICVP25.js +0 -18
- package/dist/bundle/chunk-QFOP3KUP.js +0 -2603
- package/dist/bundle/chunk-R53XXHEI.js +0 -76
- package/dist/bundle/chunk-RIMPFMZE.js +0 -1251
- package/dist/bundle/chunk-RN6RT5CB.js +0 -58
- package/dist/bundle/chunk-RRTMPSQR.js +0 -29
- package/dist/bundle/chunk-S4ZHQMNM.js +0 -133
- package/dist/bundle/chunk-S6JG4YUH.js +0 -72
- package/dist/bundle/chunk-TAVI73RW.js +0 -288
- package/dist/bundle/chunk-TLG6ECZ2.js +0 -54
- package/dist/bundle/chunk-TXDR6YSF.js +0 -23
- package/dist/bundle/chunk-TY7NDMFY.js +0 -46
- package/dist/bundle/chunk-U5RJJ2EC.js +0 -353
- package/dist/bundle/chunk-UDSL3MUU.js +0 -2333
- package/dist/bundle/chunk-V2CNGXWX.js +0 -798
- package/dist/bundle/chunk-VB7FZOYX.js +0 -633
- package/dist/bundle/chunk-VZ5PPYDG.js +0 -77
- package/dist/bundle/chunk-W5JRXIG6.js +0 -27995
- package/dist/bundle/chunk-WIHN3ELW.js +0 -2793
- package/dist/bundle/chunk-WOPVBRPV.js +0 -29
- package/dist/bundle/chunk-WXJYMMEL.js +0 -95
- package/dist/bundle/chunk-XCCU2E3Z.js +0 -274
- package/dist/bundle/chunk-XEQQJBBO.js +0 -92
- package/dist/bundle/chunk-XUT7DSM5.js +0 -108
- package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
- package/dist/bundle/chunk-YWDFYQOU.js +0 -82
- package/dist/bundle/chunk-ZLUIRFJX.js +0 -780
- package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
- package/dist/bundle/cli-3NXOSENF.js +0 -1239
- package/dist/bundle/command-contract-LNSAV5LA.js +0 -39
- package/dist/bundle/command-server-entry-4ZQPNUL4.js +0 -168
- package/dist/bundle/decode-K7U7X5EL.js +0 -296
- package/dist/bundle/dispatch-56FECRCU.js +0 -411
- package/dist/bundle/dist-PAKDDIBT.js +0 -191
- package/dist/bundle/dist-T54K3FJV.js +0 -7577
- package/dist/bundle/echarts-O3TNDAXJ.js +0 -42501
- package/dist/bundle/embed-SWLVG73O.js +0 -37
- package/dist/bundle/embedder-EJN75BPV.js +0 -110
- package/dist/bundle/failure-WDSX6H3B.js +0 -24
- package/dist/bundle/first-run-WPGUUC4Z.js +0 -28
- package/dist/bundle/first-screen-JMNEUQ46.js +0 -40
- package/dist/bundle/mcp-5HFPWC3W.js +0 -167
- package/dist/bundle/meeting-combined-5TKG2RYD.js +0 -24
- package/dist/bundle/meeting-model-YXXNETKC.js +0 -24
- package/dist/bundle/meeting-semantic-U7EUB3ET.js +0 -21
- package/dist/bundle/node-EGMCBAO7.js +0 -176
- package/dist/bundle/node-P4E63KXA.js +0 -2340
- package/dist/bundle/node-TLZSIHIJ.js +0 -21
- package/dist/bundle/node-sqlite-YVOGMDSP.js +0 -73
- package/dist/bundle/oauth-2SNRBIJM.js +0 -19
- package/dist/bundle/open-ABCPY5IH.js +0 -22
- package/dist/bundle/openai-4D6PXJR7.js +0 -237
- package/dist/bundle/process-SGHEN6MQ.js +0 -91
- package/dist/bundle/program-CBDQBZZ3.js +0 -4971
- package/dist/bundle/prompt-2QUK5QST.js +0 -16
- package/dist/bundle/recognize-QMQSJRIH.js +0 -25
- package/dist/bundle/remote-U7TC2BLZ.js +0 -30
- package/dist/bundle/rerank-5UPVXGVV.js +0 -51
- package/dist/bundle/serve-VX6GUM6J.js +0 -198
- package/dist/bundle/server-FOPC6DJ3.js +0 -219
- package/dist/bundle/server-OIVNOMVK.js +0 -87
- package/dist/bundle/source-HWS5SJIV.js +0 -46
- package/dist/bundle/sqlite-runtime-77NKDEXN.js +0 -19
- package/dist/bundle/state-X2HU6GB2.js +0 -35
- package/dist/bundle/store-2U4U6KL4.js +0 -184
- package/dist/bundle/store-3CHPHFP7.js +0 -301
- package/dist/bundle/store-Z3747L5F.js +0 -34
- package/dist/bundle/store-maintenance-command-UOSZJTVP.js +0 -74
- package/dist/bundle/surface-MUT72QON.js +0 -73
- package/dist/bundle/writer-RBKQ64ZM.js +0 -48
- package/dist/commands/account.d.ts +0 -4
- package/dist/commands/account.d.ts.map +0 -1
- package/dist/commands/account.js.map +0 -1
- package/dist/commands/api.d.ts +0 -3
- package/dist/commands/api.d.ts.map +0 -1
- package/dist/commands/api.js.map +0 -1
- package/dist/commands/crm-shared.d.ts +0 -8
- package/dist/commands/crm-shared.d.ts.map +0 -1
- package/dist/commands/crm-shared.js.map +0 -1
- package/dist/commands/schedule.d.ts +0 -3
- package/dist/commands/schedule.d.ts.map +0 -1
- package/dist/commands/schedule.js.map +0 -1
- package/dist/commands/session.d.ts +0 -35
- package/dist/commands/session.d.ts.map +0 -1
- package/dist/commands/session.js.map +0 -1
- package/dist/commands/write.d.ts +0 -14
- package/dist/commands/write.d.ts.map +0 -1
- package/dist/commands/write.js.map +0 -1
- package/dist/config.d.ts +0 -4
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/context.d.ts +0 -62
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/crm/activities.d.ts +0 -32
- package/dist/crm/activities.d.ts.map +0 -1
- package/dist/crm/activities.js.map +0 -1
- package/dist/crm/records.d.ts +0 -20
- package/dist/crm/records.d.ts.map +0 -1
- package/dist/crm/records.js.map +0 -1
- package/dist/crm/source.d.ts +0 -41
- package/dist/crm/source.d.ts.map +0 -1
- package/dist/crm/source.js.map +0 -1
- package/dist/crm/writer.d.ts +0 -14
- package/dist/crm/writer.d.ts.map +0 -1
- package/dist/crm/writer.js.map +0 -1
- package/dist/identity.d.ts +0 -7
- package/dist/identity.d.ts.map +0 -1
- package/dist/identity.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/program.d.ts +0 -6
- package/dist/program.d.ts.map +0 -1
- package/dist/program.js.map +0 -1
- package/dist/reasons.d.ts +0 -10
- package/dist/reasons.d.ts.map +0 -1
- package/dist/reasons.js.map +0 -1
- package/dist/setup/flow.d.ts +0 -2
- package/dist/setup/flow.d.ts.map +0 -1
- package/dist/setup/flow.js.map +0 -1
- package/dist/store.d.ts +0 -15
- package/dist/store.d.ts.map +0 -1
- package/dist/store.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js.map +0 -1
- package/dist/wcat.d.ts +0 -3
- package/dist/wcat.d.ts.map +0 -1
- package/dist/wcat.js.map +0 -1
- package/dist/whoami.d.ts +0 -24
- package/dist/whoami.d.ts.map +0 -1
- package/dist/whoami.js.map +0 -1
|
@@ -1,932 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
__name
|
|
5
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
-
|
|
7
|
-
// node_modules/.pnpm/ansi-regex@6.6.0/node_modules/ansi-regex/index.js
|
|
8
|
-
var ST = String.raw`(?:\u001B\u005C|\u009C)`;
|
|
9
|
-
var stringControls = String.raw`\u0018\u001A\u001B\u0080-\u009F`;
|
|
10
|
-
var osc = String.raw`(?:\u001B\]|\u009D)[^\u0007${stringControls}]*(?:\u0007|${ST})`;
|
|
11
|
-
var controlString = String.raw`(?:\u001B[PX^_k]|[\u0090\u0098\u009E\u009F])[^${stringControls}]*${ST}`;
|
|
12
|
-
var linuxPalette = String.raw`\u001B\](?:P[\dA-Fa-f]{7}|R)(?:\u0007|${ST})?`;
|
|
13
|
-
var csi = String.raw`(?:\u001B\[|\u009B)[\u0030-\u003F]*[\u0020-\u002F]*[\u0040-\u007E]`;
|
|
14
|
-
var escape = String.raw`\u001B(?:[\u0020-\u002F]+[\u0030-\u007E]|[\dA-PR-TZcf-oq-uy=><~|}])`;
|
|
15
|
-
var pattern = `${linuxPalette}|${osc}|${controlString}|${csi}|${escape}`;
|
|
16
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
17
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
18
|
-
}
|
|
19
|
-
__name(ansiRegex, "ansiRegex");
|
|
20
|
-
|
|
21
|
-
// node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
22
|
-
var regex = ansiRegex();
|
|
23
|
-
function stripAnsi(string) {
|
|
24
|
-
if (typeof string !== "string") {
|
|
25
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
26
|
-
}
|
|
27
|
-
if (!string.includes("\x1B") && !string.includes("\x9B")) {
|
|
28
|
-
return string;
|
|
29
|
-
}
|
|
30
|
-
return string.replace(regex, "");
|
|
31
|
-
}
|
|
32
|
-
__name(stripAnsi, "stripAnsi");
|
|
33
|
-
|
|
34
|
-
// node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup-data.js
|
|
35
|
-
var ambiguousMinimalCodePoint = 161;
|
|
36
|
-
var ambiguousMaximumCodePoint = 1114109;
|
|
37
|
-
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
38
|
-
var fullwidthMinimalCodePoint = 12288;
|
|
39
|
-
var fullwidthMaximumCodePoint = 65510;
|
|
40
|
-
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
41
|
-
var wideMinimalCodePoint = 4352;
|
|
42
|
-
var wideMaximumCodePoint = 262141;
|
|
43
|
-
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];
|
|
44
|
-
|
|
45
|
-
// node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/utilities.js
|
|
46
|
-
var isInRange = /* @__PURE__ */ __name((ranges, codePoint) => {
|
|
47
|
-
let low = 0;
|
|
48
|
-
let high = Math.floor(ranges.length / 2) - 1;
|
|
49
|
-
while (low <= high) {
|
|
50
|
-
const mid = Math.floor((low + high) / 2);
|
|
51
|
-
const i = mid * 2;
|
|
52
|
-
if (codePoint < ranges[i]) {
|
|
53
|
-
high = mid - 1;
|
|
54
|
-
} else if (codePoint > ranges[i + 1]) {
|
|
55
|
-
low = mid + 1;
|
|
56
|
-
} else {
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return false;
|
|
61
|
-
}, "isInRange");
|
|
62
|
-
|
|
63
|
-
// node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup.js
|
|
64
|
-
var commonCjkCodePoint = 19968;
|
|
65
|
-
var [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
|
|
66
|
-
function findWideFastPathRange(ranges) {
|
|
67
|
-
let fastPathStart = ranges[0];
|
|
68
|
-
let fastPathEnd = ranges[1];
|
|
69
|
-
for (let index = 0; index < ranges.length; index += 2) {
|
|
70
|
-
const start = ranges[index];
|
|
71
|
-
const end = ranges[index + 1];
|
|
72
|
-
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
|
|
73
|
-
return [start, end];
|
|
74
|
-
}
|
|
75
|
-
if (end - start > fastPathEnd - fastPathStart) {
|
|
76
|
-
fastPathStart = start;
|
|
77
|
-
fastPathEnd = end;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return [fastPathStart, fastPathEnd];
|
|
81
|
-
}
|
|
82
|
-
__name(findWideFastPathRange, "findWideFastPathRange");
|
|
83
|
-
var isAmbiguous = /* @__PURE__ */ __name((codePoint) => {
|
|
84
|
-
if (codePoint < ambiguousMinimalCodePoint || codePoint > ambiguousMaximumCodePoint) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
return isInRange(ambiguousRanges, codePoint);
|
|
88
|
-
}, "isAmbiguous");
|
|
89
|
-
var isFullwidth = /* @__PURE__ */ __name((codePoint) => {
|
|
90
|
-
if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
return isInRange(fullwidthRanges, codePoint);
|
|
94
|
-
}, "isFullwidth");
|
|
95
|
-
var isWide = /* @__PURE__ */ __name((codePoint) => {
|
|
96
|
-
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
if (codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint) {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
return isInRange(wideRanges, codePoint);
|
|
103
|
-
}, "isWide");
|
|
104
|
-
|
|
105
|
-
// node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/index.js
|
|
106
|
-
function validate(codePoint) {
|
|
107
|
-
if (!Number.isSafeInteger(codePoint)) {
|
|
108
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
__name(validate, "validate");
|
|
112
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
113
|
-
validate(codePoint);
|
|
114
|
-
if (isFullwidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
115
|
-
return 2;
|
|
116
|
-
}
|
|
117
|
-
return 1;
|
|
118
|
-
}
|
|
119
|
-
__name(eastAsianWidth, "eastAsianWidth");
|
|
120
|
-
|
|
121
|
-
// node_modules/.pnpm/string-width@8.3.0/node_modules/string-width/index.js
|
|
122
|
-
var segmenter = new Intl.Segmenter();
|
|
123
|
-
var visibleCharacterRegex = new RegExp("[^\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]", "v");
|
|
124
|
-
var spacingMarkRegex = new RegExp("\\p{Spacing_Mark}", "v");
|
|
125
|
-
var rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
126
|
-
var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
|
|
127
|
-
var extendedPictographicRegex = new RegExp("\\p{Extended_Pictographic}", "gu");
|
|
128
|
-
function isDoubleWidthNonRgiEmojiSequence(segment) {
|
|
129
|
-
if (segment.length > 50) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
if (unqualifiedKeycapRegex.test(segment)) {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
if (segment.includes("\u200D")) {
|
|
136
|
-
const pictographics = segment.match(extendedPictographicRegex);
|
|
137
|
-
return pictographics !== null && pictographics.length >= 2;
|
|
138
|
-
}
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
__name(isDoubleWidthNonRgiEmojiSequence, "isDoubleWidthNonRgiEmojiSequence");
|
|
142
|
-
function baseVisible(segment) {
|
|
143
|
-
const index = segment.search(visibleCharacterRegex);
|
|
144
|
-
return index === -1 ? void 0 : segment.slice(index);
|
|
145
|
-
}
|
|
146
|
-
__name(baseVisible, "baseVisible");
|
|
147
|
-
function isHangulLeadingJamo(codePoint) {
|
|
148
|
-
return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
|
|
149
|
-
}
|
|
150
|
-
__name(isHangulLeadingJamo, "isHangulLeadingJamo");
|
|
151
|
-
function isHangulVowelJamo(codePoint) {
|
|
152
|
-
return codePoint >= 4448 && codePoint <= 4519 || codePoint >= 55216 && codePoint <= 55238;
|
|
153
|
-
}
|
|
154
|
-
__name(isHangulVowelJamo, "isHangulVowelJamo");
|
|
155
|
-
function isHangulTrailingJamo(codePoint) {
|
|
156
|
-
return codePoint >= 4520 && codePoint <= 4607 || codePoint >= 55243 && codePoint <= 55291;
|
|
157
|
-
}
|
|
158
|
-
__name(isHangulTrailingJamo, "isHangulTrailingJamo");
|
|
159
|
-
function isHangulJamo(codePoint) {
|
|
160
|
-
return isHangulLeadingJamo(codePoint) || isHangulVowelJamo(codePoint) || isHangulTrailingJamo(codePoint);
|
|
161
|
-
}
|
|
162
|
-
__name(isHangulJamo, "isHangulJamo");
|
|
163
|
-
function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
|
|
164
|
-
const codePoints = [];
|
|
165
|
-
for (const character of visibleSegment) {
|
|
166
|
-
if (!visibleCharacterRegex.test(character)) {
|
|
167
|
-
continue;
|
|
168
|
-
}
|
|
169
|
-
codePoints.push(character.codePointAt(0));
|
|
170
|
-
}
|
|
171
|
-
if (codePoints.length === 0) {
|
|
172
|
-
return void 0;
|
|
173
|
-
}
|
|
174
|
-
let width = 0;
|
|
175
|
-
for (let index = 0; index < codePoints.length; index++) {
|
|
176
|
-
const codePoint = codePoints[index];
|
|
177
|
-
if (!isHangulJamo(codePoint)) {
|
|
178
|
-
if (width === 0) {
|
|
179
|
-
return void 0;
|
|
180
|
-
}
|
|
181
|
-
for (let remaining = index; remaining < codePoints.length; remaining++) {
|
|
182
|
-
width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
|
|
183
|
-
}
|
|
184
|
-
return width;
|
|
185
|
-
}
|
|
186
|
-
if (isHangulLeadingJamo(codePoint) && isHangulVowelJamo(codePoints[index + 1])) {
|
|
187
|
-
width += 2;
|
|
188
|
-
index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
|
|
189
|
-
continue;
|
|
190
|
-
}
|
|
191
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
192
|
-
}
|
|
193
|
-
return width;
|
|
194
|
-
}
|
|
195
|
-
__name(hangulClusterWidth, "hangulClusterWidth");
|
|
196
|
-
function trailingWidth(visibleSegment, eastAsianWidthOptions) {
|
|
197
|
-
let extra = 0;
|
|
198
|
-
let first = true;
|
|
199
|
-
for (const character of visibleSegment) {
|
|
200
|
-
if (first) {
|
|
201
|
-
first = false;
|
|
202
|
-
continue;
|
|
203
|
-
}
|
|
204
|
-
if (spacingMarkRegex.test(character) || character >= "\uFF00" && character <= "\uFFEF") {
|
|
205
|
-
extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
return extra;
|
|
209
|
-
}
|
|
210
|
-
__name(trailingWidth, "trailingWidth");
|
|
211
|
-
function stringWidth(input, options = {}) {
|
|
212
|
-
if (typeof input !== "string" || input.length === 0) {
|
|
213
|
-
return 0;
|
|
214
|
-
}
|
|
215
|
-
const {
|
|
216
|
-
ambiguousIsNarrow = true,
|
|
217
|
-
countAnsiEscapeCodes = false
|
|
218
|
-
} = options;
|
|
219
|
-
let string = input;
|
|
220
|
-
if (!countAnsiEscapeCodes && (string.includes("\x1B") || string.includes("\x9B"))) {
|
|
221
|
-
string = stripAnsi(string);
|
|
222
|
-
}
|
|
223
|
-
if (string.length === 0) {
|
|
224
|
-
return 0;
|
|
225
|
-
}
|
|
226
|
-
if (/^[\u0020-\u007E]*$/.test(string)) {
|
|
227
|
-
return string.length;
|
|
228
|
-
}
|
|
229
|
-
let width = 0;
|
|
230
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
231
|
-
for (const { segment } of segmenter.segment(string)) {
|
|
232
|
-
const visibleSegment = baseVisible(segment);
|
|
233
|
-
if (visibleSegment === void 0) {
|
|
234
|
-
continue;
|
|
235
|
-
}
|
|
236
|
-
if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
|
|
237
|
-
width += 2;
|
|
238
|
-
continue;
|
|
239
|
-
}
|
|
240
|
-
const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
|
|
241
|
-
if (hangulWidth !== void 0) {
|
|
242
|
-
width += hangulWidth;
|
|
243
|
-
continue;
|
|
244
|
-
}
|
|
245
|
-
const codePoint = visibleSegment.codePointAt(0);
|
|
246
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
247
|
-
width += trailingWidth(visibleSegment, eastAsianWidthOptions);
|
|
248
|
-
}
|
|
249
|
-
return width;
|
|
250
|
-
}
|
|
251
|
-
__name(stringWidth, "stringWidth");
|
|
252
|
-
|
|
253
|
-
// node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
254
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
255
|
-
var wrapAnsi16 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${code + offset}m`, "wrapAnsi16");
|
|
256
|
-
var wrapAnsi256 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, "wrapAnsi256");
|
|
257
|
-
var wrapAnsi16m = /* @__PURE__ */ __name((offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, "wrapAnsi16m");
|
|
258
|
-
var styles = {
|
|
259
|
-
modifier: {
|
|
260
|
-
reset: [0, 0],
|
|
261
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
262
|
-
bold: [1, 22],
|
|
263
|
-
dim: [2, 22],
|
|
264
|
-
italic: [3, 23],
|
|
265
|
-
underline: [4, 24],
|
|
266
|
-
overline: [53, 55],
|
|
267
|
-
inverse: [7, 27],
|
|
268
|
-
hidden: [8, 28],
|
|
269
|
-
strikethrough: [9, 29]
|
|
270
|
-
},
|
|
271
|
-
color: {
|
|
272
|
-
black: [30, 39],
|
|
273
|
-
red: [31, 39],
|
|
274
|
-
green: [32, 39],
|
|
275
|
-
yellow: [33, 39],
|
|
276
|
-
blue: [34, 39],
|
|
277
|
-
magenta: [35, 39],
|
|
278
|
-
cyan: [36, 39],
|
|
279
|
-
white: [37, 39],
|
|
280
|
-
// Bright color
|
|
281
|
-
blackBright: [90, 39],
|
|
282
|
-
gray: [90, 39],
|
|
283
|
-
// Alias of `blackBright`
|
|
284
|
-
grey: [90, 39],
|
|
285
|
-
// Alias of `blackBright`
|
|
286
|
-
redBright: [91, 39],
|
|
287
|
-
greenBright: [92, 39],
|
|
288
|
-
yellowBright: [93, 39],
|
|
289
|
-
blueBright: [94, 39],
|
|
290
|
-
magentaBright: [95, 39],
|
|
291
|
-
cyanBright: [96, 39],
|
|
292
|
-
whiteBright: [97, 39]
|
|
293
|
-
},
|
|
294
|
-
bgColor: {
|
|
295
|
-
bgBlack: [40, 49],
|
|
296
|
-
bgRed: [41, 49],
|
|
297
|
-
bgGreen: [42, 49],
|
|
298
|
-
bgYellow: [43, 49],
|
|
299
|
-
bgBlue: [44, 49],
|
|
300
|
-
bgMagenta: [45, 49],
|
|
301
|
-
bgCyan: [46, 49],
|
|
302
|
-
bgWhite: [47, 49],
|
|
303
|
-
// Bright color
|
|
304
|
-
bgBlackBright: [100, 49],
|
|
305
|
-
bgGray: [100, 49],
|
|
306
|
-
// Alias of `bgBlackBright`
|
|
307
|
-
bgGrey: [100, 49],
|
|
308
|
-
// Alias of `bgBlackBright`
|
|
309
|
-
bgRedBright: [101, 49],
|
|
310
|
-
bgGreenBright: [102, 49],
|
|
311
|
-
bgYellowBright: [103, 49],
|
|
312
|
-
bgBlueBright: [104, 49],
|
|
313
|
-
bgMagentaBright: [105, 49],
|
|
314
|
-
bgCyanBright: [106, 49],
|
|
315
|
-
bgWhiteBright: [107, 49]
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
319
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
320
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
321
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
322
|
-
function assembleStyles() {
|
|
323
|
-
const codes = /* @__PURE__ */ new Map();
|
|
324
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
325
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
326
|
-
styles[styleName] = {
|
|
327
|
-
open: `\x1B[${style[0]}m`,
|
|
328
|
-
close: `\x1B[${style[1]}m`
|
|
329
|
-
};
|
|
330
|
-
group[styleName] = styles[styleName];
|
|
331
|
-
codes.set(style[0], style[1]);
|
|
332
|
-
}
|
|
333
|
-
Object.defineProperty(styles, groupName, {
|
|
334
|
-
value: group,
|
|
335
|
-
enumerable: false
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
Object.defineProperty(styles, "codes", {
|
|
339
|
-
value: codes,
|
|
340
|
-
enumerable: false
|
|
341
|
-
});
|
|
342
|
-
styles.color.close = "\x1B[39m";
|
|
343
|
-
styles.bgColor.close = "\x1B[49m";
|
|
344
|
-
styles.color.ansi = wrapAnsi16();
|
|
345
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
346
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
347
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
348
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
349
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
350
|
-
Object.defineProperties(styles, {
|
|
351
|
-
rgbToAnsi256: {
|
|
352
|
-
value(red, green, blue) {
|
|
353
|
-
if (red === green && green === blue) {
|
|
354
|
-
if (red < 8) {
|
|
355
|
-
return 16;
|
|
356
|
-
}
|
|
357
|
-
if (red > 248) {
|
|
358
|
-
return 231;
|
|
359
|
-
}
|
|
360
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
361
|
-
}
|
|
362
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
363
|
-
},
|
|
364
|
-
enumerable: false
|
|
365
|
-
},
|
|
366
|
-
hexToRgb: {
|
|
367
|
-
value(hex) {
|
|
368
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
369
|
-
if (!matches) {
|
|
370
|
-
return [0, 0, 0];
|
|
371
|
-
}
|
|
372
|
-
let [colorString] = matches;
|
|
373
|
-
if (colorString.length === 3) {
|
|
374
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
375
|
-
}
|
|
376
|
-
const integer = Number.parseInt(colorString, 16);
|
|
377
|
-
return [
|
|
378
|
-
/* eslint-disable no-bitwise */
|
|
379
|
-
integer >> 16 & 255,
|
|
380
|
-
integer >> 8 & 255,
|
|
381
|
-
integer & 255
|
|
382
|
-
/* eslint-enable no-bitwise */
|
|
383
|
-
];
|
|
384
|
-
},
|
|
385
|
-
enumerable: false
|
|
386
|
-
},
|
|
387
|
-
hexToAnsi256: {
|
|
388
|
-
value: /* @__PURE__ */ __name((hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), "value"),
|
|
389
|
-
enumerable: false
|
|
390
|
-
},
|
|
391
|
-
ansi256ToAnsi: {
|
|
392
|
-
value(code) {
|
|
393
|
-
if (code < 8) {
|
|
394
|
-
return 30 + code;
|
|
395
|
-
}
|
|
396
|
-
if (code < 16) {
|
|
397
|
-
return 90 + (code - 8);
|
|
398
|
-
}
|
|
399
|
-
let red;
|
|
400
|
-
let green;
|
|
401
|
-
let blue;
|
|
402
|
-
if (code >= 232) {
|
|
403
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
404
|
-
green = red;
|
|
405
|
-
blue = red;
|
|
406
|
-
} else {
|
|
407
|
-
code -= 16;
|
|
408
|
-
const remainder = code % 36;
|
|
409
|
-
red = Math.floor(code / 36) / 5;
|
|
410
|
-
green = Math.floor(remainder / 6) / 5;
|
|
411
|
-
blue = remainder % 6 / 5;
|
|
412
|
-
}
|
|
413
|
-
const value = Math.max(red, green, blue) * 2;
|
|
414
|
-
if (value === 0) {
|
|
415
|
-
return 30;
|
|
416
|
-
}
|
|
417
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
418
|
-
if (value === 2) {
|
|
419
|
-
result += 60;
|
|
420
|
-
}
|
|
421
|
-
return result;
|
|
422
|
-
},
|
|
423
|
-
enumerable: false
|
|
424
|
-
},
|
|
425
|
-
rgbToAnsi: {
|
|
426
|
-
value: /* @__PURE__ */ __name((red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), "value"),
|
|
427
|
-
enumerable: false
|
|
428
|
-
},
|
|
429
|
-
hexToAnsi: {
|
|
430
|
-
value: /* @__PURE__ */ __name((hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), "value"),
|
|
431
|
-
enumerable: false
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
return styles;
|
|
435
|
-
}
|
|
436
|
-
__name(assembleStyles, "assembleStyles");
|
|
437
|
-
var ansiStyles = assembleStyles();
|
|
438
|
-
var ansi_styles_default = ansiStyles;
|
|
439
|
-
|
|
440
|
-
// node_modules/.pnpm/wrap-ansi@10.0.2/node_modules/wrap-ansi/index.js
|
|
441
|
-
var ANSI_ESCAPE = "\x1B";
|
|
442
|
-
var ANSI_ESCAPE_BELL = "\x07";
|
|
443
|
-
var C1_CSI = "\x9B";
|
|
444
|
-
var ANSI_CSI = "[";
|
|
445
|
-
var ANSI_OSC = "]";
|
|
446
|
-
var ANSI_SGR_TERMINATOR = "m";
|
|
447
|
-
var ANSI_SGR_RESET = 0;
|
|
448
|
-
var ANSI_SGR_RESET_FOREGROUND = 39;
|
|
449
|
-
var ANSI_SGR_RESET_BACKGROUND = 49;
|
|
450
|
-
var ANSI_SGR_RESET_UNDERLINE_COLOR = 59;
|
|
451
|
-
var ANSI_SGR_FOREGROUND_EXTENDED = 38;
|
|
452
|
-
var ANSI_SGR_BACKGROUND_EXTENDED = 48;
|
|
453
|
-
var ANSI_SGR_UNDERLINE_COLOR_EXTENDED = 58;
|
|
454
|
-
var ANSI_SGR_COLOR_MODE_RGB = 2;
|
|
455
|
-
var ANSI_SGR_COLOR_MODE_256 = 5;
|
|
456
|
-
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;`;
|
|
457
|
-
var ESCAPES = /* @__PURE__ */ new Set([
|
|
458
|
-
ANSI_ESCAPE,
|
|
459
|
-
C1_CSI
|
|
460
|
-
]);
|
|
461
|
-
var ESCAPE_CHARACTERS = [...ESCAPES].join("");
|
|
462
|
-
var CSI_INTRODUCER = `(?:${ANSI_ESCAPE}\\${ANSI_CSI}|${C1_CSI})`;
|
|
463
|
-
var CSI_PARAMETERS = "[0-?]*[ -/]*[@-~]";
|
|
464
|
-
var SGR_PARAMETERS = `(?<sgr>[0-9;:]*)${ANSI_SGR_TERMINATOR}`;
|
|
465
|
-
var OSC_STRING_TERMINATOR = `(?:${ANSI_ESCAPE_BELL}|${ANSI_ESCAPE}\\\\)`;
|
|
466
|
-
var OSC_STRING_PAYLOAD = String.raw`[^\u0000-\u001F\u007F-\u009F]*`;
|
|
467
|
-
var LINK_PARAMETERS = String.raw`8;(?<parameters>[^;\u0000-\u001F\u007F-\u009F]*);(?<uri>${OSC_STRING_PAYLOAD})${OSC_STRING_TERMINATOR}`;
|
|
468
|
-
var OSC_STRING = `${OSC_STRING_PAYLOAD}${OSC_STRING_TERMINATOR}`;
|
|
469
|
-
var ANSI_ESCAPE_REGEX = new RegExp(
|
|
470
|
-
`${CSI_INTRODUCER}(?:${SGR_PARAMETERS}|${CSI_PARAMETERS})|${ANSI_ESCAPE}\\${ANSI_OSC}(?:${LINK_PARAMETERS}|${OSC_STRING})`,
|
|
471
|
-
"y"
|
|
472
|
-
);
|
|
473
|
-
var ANSI_SGR_MODIFIER_CLOSE_CODES = new Set(ansi_styles_default.codes.values());
|
|
474
|
-
ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);
|
|
475
|
-
var segmenter2 = new Intl.Segmenter();
|
|
476
|
-
var getStringWidth = /* @__PURE__ */ __name((string) => stringWidth(string, { countAnsiEscapeCodes: true }), "getStringWidth");
|
|
477
|
-
var TAB_SIZE = 8;
|
|
478
|
-
var ESCAPE_INTRODUCER_REGEX = new RegExp(`[${ESCAPE_CHARACTERS}]`, "g");
|
|
479
|
-
var ROW_BOUNDARY_REGEX = new RegExp(`[\\n${ESCAPE_CHARACTERS}]`, "g");
|
|
480
|
-
var ASCII_PRINTABLE_REGEX = /^[ -~]*$/;
|
|
481
|
-
var wrapAnsiCode = /* @__PURE__ */ __name((code) => `${ANSI_ESCAPE}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, "wrapAnsiCode");
|
|
482
|
-
var wrapAnsiHyperlink = /* @__PURE__ */ __name((url, parameters = "") => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK}${parameters};${url}${ANSI_ESCAPE_BELL}`, "wrapAnsiHyperlink");
|
|
483
|
-
var matchAnsiEscape = /* @__PURE__ */ __name((string, index) => {
|
|
484
|
-
if (!ESCAPES.has(string[index])) {
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
ANSI_ESCAPE_REGEX.lastIndex = index;
|
|
488
|
-
return ANSI_ESCAPE_REGEX.exec(string) ?? void 0;
|
|
489
|
-
}, "matchAnsiEscape");
|
|
490
|
-
var forEachSegment = /* @__PURE__ */ __name((string, onPlainText, onEscape = () => {
|
|
491
|
-
}) => {
|
|
492
|
-
let plainStart = 0;
|
|
493
|
-
let index = 0;
|
|
494
|
-
while (index < string.length) {
|
|
495
|
-
ESCAPE_INTRODUCER_REGEX.lastIndex = index;
|
|
496
|
-
const introducer = ESCAPE_INTRODUCER_REGEX.exec(string);
|
|
497
|
-
if (!introducer) {
|
|
498
|
-
break;
|
|
499
|
-
}
|
|
500
|
-
const escape2 = matchAnsiEscape(string, introducer.index);
|
|
501
|
-
if (!escape2) {
|
|
502
|
-
index = introducer.index + 1;
|
|
503
|
-
continue;
|
|
504
|
-
}
|
|
505
|
-
if (introducer.index > plainStart) {
|
|
506
|
-
onPlainText(string.slice(plainStart, introducer.index));
|
|
507
|
-
}
|
|
508
|
-
onEscape(escape2[0]);
|
|
509
|
-
index = introducer.index + escape2[0].length;
|
|
510
|
-
plainStart = index;
|
|
511
|
-
}
|
|
512
|
-
if (plainStart < string.length) {
|
|
513
|
-
onPlainText(string.slice(plainStart));
|
|
514
|
-
}
|
|
515
|
-
}, "forEachSegment");
|
|
516
|
-
var getWidth = /* @__PURE__ */ __name((string) => {
|
|
517
|
-
let plainText = "";
|
|
518
|
-
forEachSegment(string, (part) => {
|
|
519
|
-
plainText += part;
|
|
520
|
-
});
|
|
521
|
-
return getStringWidth(plainText);
|
|
522
|
-
}, "getWidth");
|
|
523
|
-
var getTokens = /* @__PURE__ */ __name((string) => {
|
|
524
|
-
const tokens = [];
|
|
525
|
-
forEachSegment(string, (plainText) => {
|
|
526
|
-
if (ASCII_PRINTABLE_REGEX.test(plainText)) {
|
|
527
|
-
for (const character of plainText) {
|
|
528
|
-
tokens.push({ value: character, width: 1 });
|
|
529
|
-
}
|
|
530
|
-
return;
|
|
531
|
-
}
|
|
532
|
-
for (const { segment } of segmenter2.segment(plainText)) {
|
|
533
|
-
tokens.push({ value: segment, width: getStringWidth(segment) });
|
|
534
|
-
}
|
|
535
|
-
}, (escape2) => {
|
|
536
|
-
tokens.push({ value: escape2, width: 0 });
|
|
537
|
-
});
|
|
538
|
-
return tokens;
|
|
539
|
-
}, "getTokens");
|
|
540
|
-
var splitWords = /* @__PURE__ */ __name((string) => {
|
|
541
|
-
let currentWord = { value: "", plainText: "" };
|
|
542
|
-
const words = [currentWord];
|
|
543
|
-
forEachSegment(string, (plainText) => {
|
|
544
|
-
const parts = plainText.split(" ");
|
|
545
|
-
currentWord.value += parts[0];
|
|
546
|
-
currentWord.plainText += parts[0];
|
|
547
|
-
for (let index = 1; index < parts.length; index++) {
|
|
548
|
-
currentWord = { value: parts[index], plainText: parts[index] };
|
|
549
|
-
words.push(currentWord);
|
|
550
|
-
}
|
|
551
|
-
}, (escape2) => {
|
|
552
|
-
currentWord.value += escape2;
|
|
553
|
-
});
|
|
554
|
-
for (const word of words) {
|
|
555
|
-
word.width = getStringWidth(word.plainText);
|
|
556
|
-
}
|
|
557
|
-
return words;
|
|
558
|
-
}, "splitWords");
|
|
559
|
-
var getColonColorToken = /* @__PURE__ */ __name((parameter) => {
|
|
560
|
-
const parts = parameter.split(":");
|
|
561
|
-
const code = Number.parseInt(parts[0], 10);
|
|
562
|
-
const mode = Number.parseInt(parts[1], 10);
|
|
563
|
-
if (![ANSI_SGR_FOREGROUND_EXTENDED, ANSI_SGR_BACKGROUND_EXTENDED, ANSI_SGR_UNDERLINE_COLOR_EXTENDED].includes(code)) {
|
|
564
|
-
return;
|
|
565
|
-
}
|
|
566
|
-
if (mode === ANSI_SGR_COLOR_MODE_256 && parts.length === 3 && /^\d+$/.test(parts[2])) {
|
|
567
|
-
return { code, open: parameter, hasArguments: true };
|
|
568
|
-
}
|
|
569
|
-
if (mode !== ANSI_SGR_COLOR_MODE_RGB) {
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
const components = parts.length === 6 ? parts.slice(3) : parts.slice(2);
|
|
573
|
-
const colorSpace = parts.length === 6 ? parts[2] : void 0;
|
|
574
|
-
if (components.length === 3 && components.every((component) => /^\d+$/.test(component)) && (colorSpace === void 0 || /^\d*$/.test(colorSpace))) {
|
|
575
|
-
return { code, open: parameter, hasArguments: true };
|
|
576
|
-
}
|
|
577
|
-
}, "getColonColorToken");
|
|
578
|
-
var getSgrTokens = /* @__PURE__ */ __name((sgrParameters) => {
|
|
579
|
-
const parameters = sgrParameters.split(";");
|
|
580
|
-
const sgrTokens = [];
|
|
581
|
-
for (let index = 0; index < parameters.length; index++) {
|
|
582
|
-
const parameter = parameters[index];
|
|
583
|
-
if (parameter.includes(":")) {
|
|
584
|
-
const colonColorToken = getColonColorToken(parameter);
|
|
585
|
-
if (colonColorToken) {
|
|
586
|
-
sgrTokens.push(colonColorToken);
|
|
587
|
-
}
|
|
588
|
-
continue;
|
|
589
|
-
}
|
|
590
|
-
const code = parameter === "" ? ANSI_SGR_RESET : Number.parseInt(parameter, 10);
|
|
591
|
-
if (!Number.isFinite(code)) {
|
|
592
|
-
continue;
|
|
593
|
-
}
|
|
594
|
-
if (code === ANSI_SGR_FOREGROUND_EXTENDED || code === ANSI_SGR_BACKGROUND_EXTENDED || code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
|
|
595
|
-
if (index + 1 >= parameters.length) {
|
|
596
|
-
break;
|
|
597
|
-
}
|
|
598
|
-
const mode = Number.parseInt(parameters[index + 1], 10);
|
|
599
|
-
const colorIndex = Number.parseInt(parameters[index + 2], 10);
|
|
600
|
-
if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(colorIndex)) {
|
|
601
|
-
sgrTokens.push({ code, open: [code, mode, colorIndex].join(";"), hasArguments: true });
|
|
602
|
-
index += 2;
|
|
603
|
-
continue;
|
|
604
|
-
}
|
|
605
|
-
const red = Number.parseInt(parameters[index + 2], 10);
|
|
606
|
-
const green = Number.parseInt(parameters[index + 3], 10);
|
|
607
|
-
const blue = Number.parseInt(parameters[index + 4], 10);
|
|
608
|
-
if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red) && Number.isFinite(green) && Number.isFinite(blue)) {
|
|
609
|
-
sgrTokens.push({ code, open: [code, mode, red, green, blue].join(";"), hasArguments: true });
|
|
610
|
-
index += 4;
|
|
611
|
-
continue;
|
|
612
|
-
}
|
|
613
|
-
break;
|
|
614
|
-
}
|
|
615
|
-
sgrTokens.push({ code, open: String(code), hasArguments: false });
|
|
616
|
-
}
|
|
617
|
-
return sgrTokens;
|
|
618
|
-
}, "getSgrTokens");
|
|
619
|
-
var removeActiveStyle = /* @__PURE__ */ __name((activeStyles, family) => {
|
|
620
|
-
const activeStyleIndex = activeStyles.findIndex((activeStyle) => activeStyle.family === family);
|
|
621
|
-
if (activeStyleIndex !== -1) {
|
|
622
|
-
activeStyles.splice(activeStyleIndex, 1);
|
|
623
|
-
}
|
|
624
|
-
}, "removeActiveStyle");
|
|
625
|
-
var upsertActiveStyle = /* @__PURE__ */ __name((activeStyles, nextActiveStyle) => {
|
|
626
|
-
removeActiveStyle(activeStyles, nextActiveStyle.family);
|
|
627
|
-
activeStyles.push(nextActiveStyle);
|
|
628
|
-
}, "upsertActiveStyle");
|
|
629
|
-
var removeModifierStylesByClose = /* @__PURE__ */ __name((activeStyles, closeCode) => {
|
|
630
|
-
for (let index = activeStyles.length - 1; index >= 0; index--) {
|
|
631
|
-
const activeStyle = activeStyles[index];
|
|
632
|
-
if (activeStyle.family.startsWith("modifier-") && activeStyle.close === closeCode) {
|
|
633
|
-
activeStyles.splice(index, 1);
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
}, "removeModifierStylesByClose");
|
|
637
|
-
var getColorStyle = /* @__PURE__ */ __name((sgrToken) => {
|
|
638
|
-
const { code, open, hasArguments } = sgrToken;
|
|
639
|
-
if (code >= 30 && code <= 37 || code >= 90 && code <= 97 || code === ANSI_SGR_FOREGROUND_EXTENDED && hasArguments) {
|
|
640
|
-
return {
|
|
641
|
-
family: "foreground",
|
|
642
|
-
open,
|
|
643
|
-
close: ANSI_SGR_RESET_FOREGROUND
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
if (code >= 40 && code <= 47 || code >= 100 && code <= 107 || code === ANSI_SGR_BACKGROUND_EXTENDED && hasArguments) {
|
|
647
|
-
return {
|
|
648
|
-
family: "background",
|
|
649
|
-
open,
|
|
650
|
-
close: ANSI_SGR_RESET_BACKGROUND
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
if (code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && hasArguments) {
|
|
654
|
-
return {
|
|
655
|
-
family: "underlineColor",
|
|
656
|
-
open,
|
|
657
|
-
close: ANSI_SGR_RESET_UNDERLINE_COLOR
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
}, "getColorStyle");
|
|
661
|
-
var applySgrResetCode = /* @__PURE__ */ __name((code, activeStyles) => {
|
|
662
|
-
if (code === ANSI_SGR_RESET) {
|
|
663
|
-
activeStyles.length = 0;
|
|
664
|
-
return true;
|
|
665
|
-
}
|
|
666
|
-
if (code === ANSI_SGR_RESET_FOREGROUND) {
|
|
667
|
-
removeActiveStyle(activeStyles, "foreground");
|
|
668
|
-
return true;
|
|
669
|
-
}
|
|
670
|
-
if (code === ANSI_SGR_RESET_BACKGROUND) {
|
|
671
|
-
removeActiveStyle(activeStyles, "background");
|
|
672
|
-
return true;
|
|
673
|
-
}
|
|
674
|
-
if (code === ANSI_SGR_RESET_UNDERLINE_COLOR) {
|
|
675
|
-
removeActiveStyle(activeStyles, "underlineColor");
|
|
676
|
-
return true;
|
|
677
|
-
}
|
|
678
|
-
if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code)) {
|
|
679
|
-
removeModifierStylesByClose(activeStyles, code);
|
|
680
|
-
return true;
|
|
681
|
-
}
|
|
682
|
-
return false;
|
|
683
|
-
}, "applySgrResetCode");
|
|
684
|
-
var applySgrToken = /* @__PURE__ */ __name((sgrToken, activeStyles) => {
|
|
685
|
-
const { code } = sgrToken;
|
|
686
|
-
if (applySgrResetCode(code, activeStyles)) {
|
|
687
|
-
return;
|
|
688
|
-
}
|
|
689
|
-
const colorStyle = getColorStyle(sgrToken);
|
|
690
|
-
if (colorStyle) {
|
|
691
|
-
upsertActiveStyle(activeStyles, colorStyle);
|
|
692
|
-
return;
|
|
693
|
-
}
|
|
694
|
-
const close = ansi_styles_default.codes.get(code);
|
|
695
|
-
if (close !== void 0 && close !== ANSI_SGR_RESET) {
|
|
696
|
-
upsertActiveStyle(activeStyles, {
|
|
697
|
-
family: `modifier-${code}`,
|
|
698
|
-
open: sgrToken.open,
|
|
699
|
-
close
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
}, "applySgrToken");
|
|
703
|
-
var applySgrParameters = /* @__PURE__ */ __name((sgrParameters, activeStyles) => {
|
|
704
|
-
for (const sgrToken of getSgrTokens(sgrParameters)) {
|
|
705
|
-
applySgrToken(sgrToken, activeStyles);
|
|
706
|
-
}
|
|
707
|
-
}, "applySgrParameters");
|
|
708
|
-
var applySgrResets = /* @__PURE__ */ __name((sgrParameters, activeStyles) => {
|
|
709
|
-
for (const { code } of getSgrTokens(sgrParameters)) {
|
|
710
|
-
applySgrResetCode(code, activeStyles);
|
|
711
|
-
}
|
|
712
|
-
}, "applySgrResets");
|
|
713
|
-
var applyLeadingSgrResets = /* @__PURE__ */ __name((string, startIndex, activeStyles) => {
|
|
714
|
-
let index = startIndex;
|
|
715
|
-
while (index < string.length) {
|
|
716
|
-
const match = matchAnsiEscape(string, index);
|
|
717
|
-
if (!match) {
|
|
718
|
-
break;
|
|
719
|
-
}
|
|
720
|
-
if (match.groups.sgr !== void 0) {
|
|
721
|
-
applySgrResets(match.groups.sgr, activeStyles);
|
|
722
|
-
}
|
|
723
|
-
index += match[0].length;
|
|
724
|
-
}
|
|
725
|
-
}, "applyLeadingSgrResets");
|
|
726
|
-
var getClosingSgrSequence = /* @__PURE__ */ __name((activeStyles) => [...activeStyles].reverse().map((activeStyle) => wrapAnsiCode(activeStyle.close)).join(""), "getClosingSgrSequence");
|
|
727
|
-
var getOpeningSgrSequence = /* @__PURE__ */ __name((activeStyles) => activeStyles.map((activeStyle) => wrapAnsiCode(activeStyle.open)).join(""), "getOpeningSgrSequence");
|
|
728
|
-
var wrapWord = /* @__PURE__ */ __name((rows, word, columns, rowWidth) => {
|
|
729
|
-
const tokens = getTokens(word);
|
|
730
|
-
let visible = rowWidth;
|
|
731
|
-
for (let index = 0; index < tokens.length; index++) {
|
|
732
|
-
const token = tokens[index];
|
|
733
|
-
if (token.width > 0 && visible > 0 && visible + token.width > columns) {
|
|
734
|
-
rows.push("");
|
|
735
|
-
visible = 0;
|
|
736
|
-
}
|
|
737
|
-
rows[rows.length - 1] += token.value;
|
|
738
|
-
visible += token.width;
|
|
739
|
-
if (visible === columns && index < tokens.length - 1) {
|
|
740
|
-
rows.push("");
|
|
741
|
-
visible = 0;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
745
|
-
rows[rows.length - 2] += rows.pop();
|
|
746
|
-
}
|
|
747
|
-
return getWidth(rows.at(-1));
|
|
748
|
-
}, "wrapWord");
|
|
749
|
-
var stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((string) => {
|
|
750
|
-
if (!string.includes(" ")) {
|
|
751
|
-
return string;
|
|
752
|
-
}
|
|
753
|
-
const segments = [];
|
|
754
|
-
forEachSegment(string, (plainText) => {
|
|
755
|
-
segments.push({ value: plainText, isEscape: false });
|
|
756
|
-
}, (escape2) => {
|
|
757
|
-
segments.push({ value: escape2, isEscape: true });
|
|
758
|
-
});
|
|
759
|
-
for (let index = segments.length - 1; index >= 0; index--) {
|
|
760
|
-
const segment = segments[index];
|
|
761
|
-
if (segment.isEscape) {
|
|
762
|
-
continue;
|
|
763
|
-
}
|
|
764
|
-
let end = segment.value.length;
|
|
765
|
-
while (end > 0 && segment.value[end - 1] === " ") {
|
|
766
|
-
end--;
|
|
767
|
-
}
|
|
768
|
-
segment.value = segment.value.slice(0, end);
|
|
769
|
-
if (getStringWidth(segment.value) > 0) {
|
|
770
|
-
break;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
return segments.map((segment) => segment.value).join("");
|
|
774
|
-
}, "stringVisibleTrimSpacesRight");
|
|
775
|
-
var expandTabs = /* @__PURE__ */ __name((line) => {
|
|
776
|
-
if (!line.includes(" ")) {
|
|
777
|
-
return line;
|
|
778
|
-
}
|
|
779
|
-
let visible = 0;
|
|
780
|
-
let expandedLine = "";
|
|
781
|
-
let plainTextSinceTab = "";
|
|
782
|
-
const expandPlainText = /* @__PURE__ */ __name((plainText) => {
|
|
783
|
-
const segments = plainText.split(" ");
|
|
784
|
-
for (const [index, segment] of segments.entries()) {
|
|
785
|
-
expandedLine += segment;
|
|
786
|
-
plainTextSinceTab += segment;
|
|
787
|
-
if (index < segments.length - 1) {
|
|
788
|
-
visible += getStringWidth(plainTextSinceTab);
|
|
789
|
-
plainTextSinceTab = "";
|
|
790
|
-
const spaces = TAB_SIZE - visible % TAB_SIZE;
|
|
791
|
-
expandedLine += " ".repeat(spaces);
|
|
792
|
-
visible += spaces;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
}, "expandPlainText");
|
|
796
|
-
forEachSegment(line, expandPlainText, (escape2) => {
|
|
797
|
-
expandedLine += escape2;
|
|
798
|
-
});
|
|
799
|
-
return expandedLine;
|
|
800
|
-
}, "expandTabs");
|
|
801
|
-
var restoreStylesAcrossRows = /* @__PURE__ */ __name((preString) => {
|
|
802
|
-
let returnValue = "";
|
|
803
|
-
let activeHyperlink;
|
|
804
|
-
const activeStyles = [];
|
|
805
|
-
let index = 0;
|
|
806
|
-
let copiedIndex = 0;
|
|
807
|
-
while (index < preString.length) {
|
|
808
|
-
ROW_BOUNDARY_REGEX.lastIndex = index;
|
|
809
|
-
const boundary = ROW_BOUNDARY_REGEX.exec(preString);
|
|
810
|
-
if (!boundary) {
|
|
811
|
-
break;
|
|
812
|
-
}
|
|
813
|
-
index = boundary.index;
|
|
814
|
-
if (boundary[0] !== "\n") {
|
|
815
|
-
const escape2 = matchAnsiEscape(preString, index);
|
|
816
|
-
if (!escape2) {
|
|
817
|
-
index++;
|
|
818
|
-
continue;
|
|
819
|
-
}
|
|
820
|
-
const { groups } = escape2;
|
|
821
|
-
if (groups.sgr !== void 0) {
|
|
822
|
-
applySgrParameters(groups.sgr, activeStyles);
|
|
823
|
-
} else if (groups.uri !== void 0) {
|
|
824
|
-
activeHyperlink = groups.uri.length === 0 ? void 0 : { parameters: groups.parameters, uri: groups.uri };
|
|
825
|
-
}
|
|
826
|
-
index += escape2[0].length;
|
|
827
|
-
continue;
|
|
828
|
-
}
|
|
829
|
-
returnValue += preString.slice(copiedIndex, index);
|
|
830
|
-
if (index > copiedIndex) {
|
|
831
|
-
if (activeHyperlink) {
|
|
832
|
-
returnValue += wrapAnsiHyperlink("");
|
|
833
|
-
}
|
|
834
|
-
returnValue += getClosingSgrSequence(activeStyles);
|
|
835
|
-
}
|
|
836
|
-
returnValue += "\n";
|
|
837
|
-
index++;
|
|
838
|
-
copiedIndex = index;
|
|
839
|
-
if (index < preString.length && preString[index] !== "\n") {
|
|
840
|
-
const openingStyles = [...activeStyles];
|
|
841
|
-
applyLeadingSgrResets(preString, index, openingStyles);
|
|
842
|
-
returnValue += getOpeningSgrSequence(openingStyles);
|
|
843
|
-
if (activeHyperlink) {
|
|
844
|
-
returnValue += wrapAnsiHyperlink(activeHyperlink.uri, activeHyperlink.parameters);
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
return returnValue + preString.slice(copiedIndex);
|
|
849
|
-
}, "restoreStylesAcrossRows");
|
|
850
|
-
var exec = /* @__PURE__ */ __name((string, columns, options = {}) => {
|
|
851
|
-
if (options.trim !== false && string.trim() === "") {
|
|
852
|
-
return "";
|
|
853
|
-
}
|
|
854
|
-
const words = splitWords(string);
|
|
855
|
-
let rows = [""];
|
|
856
|
-
let rowLength = 0;
|
|
857
|
-
let trimmedRowIndex = -1;
|
|
858
|
-
let isFirstWord = true;
|
|
859
|
-
for (const word of words) {
|
|
860
|
-
const rowIndex = rows.length - 1;
|
|
861
|
-
if (options.trim !== false && trimmedRowIndex !== rowIndex) {
|
|
862
|
-
const row = rows[rowIndex];
|
|
863
|
-
const trimmedRow = row.trimStart();
|
|
864
|
-
if (trimmedRow.length !== row.length) {
|
|
865
|
-
rows[rowIndex] = trimmedRow;
|
|
866
|
-
rowLength = getWidth(trimmedRow);
|
|
867
|
-
}
|
|
868
|
-
if (trimmedRow.length > 0) {
|
|
869
|
-
trimmedRowIndex = rowIndex;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
if (isFirstWord) {
|
|
873
|
-
isFirstWord = false;
|
|
874
|
-
} else {
|
|
875
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
876
|
-
rows.push("");
|
|
877
|
-
rowLength = 0;
|
|
878
|
-
}
|
|
879
|
-
if (rowLength > 0 || options.trim === false) {
|
|
880
|
-
rows[rows.length - 1] += " ";
|
|
881
|
-
rowLength++;
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
if (options.hard && options.wordWrap !== false && word.width > columns) {
|
|
885
|
-
const remainingColumns = columns - rowLength;
|
|
886
|
-
const breaksStartingThisLine = 1 + Math.floor((word.width - remainingColumns - 1) / columns);
|
|
887
|
-
const breaksStartingNextLine = Math.floor((word.width - 1) / columns);
|
|
888
|
-
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
889
|
-
rows.push("");
|
|
890
|
-
rowLength = 0;
|
|
891
|
-
}
|
|
892
|
-
rowLength = wrapWord(rows, word.value, columns, rowLength);
|
|
893
|
-
continue;
|
|
894
|
-
}
|
|
895
|
-
if (rowLength + word.width > columns && rowLength > 0 && word.width > 0) {
|
|
896
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
897
|
-
rowLength = wrapWord(rows, word.value, columns, rowLength);
|
|
898
|
-
continue;
|
|
899
|
-
}
|
|
900
|
-
rows.push("");
|
|
901
|
-
rowLength = 0;
|
|
902
|
-
}
|
|
903
|
-
if (rowLength + word.width > columns && options.wordWrap === false) {
|
|
904
|
-
rowLength = wrapWord(rows, word.value, columns, rowLength);
|
|
905
|
-
continue;
|
|
906
|
-
}
|
|
907
|
-
rows[rows.length - 1] += word.value;
|
|
908
|
-
rowLength += word.width;
|
|
909
|
-
}
|
|
910
|
-
if (options.trim !== false) {
|
|
911
|
-
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
912
|
-
}
|
|
913
|
-
return restoreStylesAcrossRows(rows.join("\n"));
|
|
914
|
-
}, "exec");
|
|
915
|
-
var normalizeText = /* @__PURE__ */ __name((string) => {
|
|
916
|
-
let normalizedString = "";
|
|
917
|
-
forEachSegment(string, (plainText) => {
|
|
918
|
-
normalizedString += plainText.normalize();
|
|
919
|
-
}, (escape2) => {
|
|
920
|
-
normalizedString += escape2;
|
|
921
|
-
});
|
|
922
|
-
return normalizedString;
|
|
923
|
-
}, "normalizeText");
|
|
924
|
-
function wrapAnsi(string, columns, options) {
|
|
925
|
-
return normalizeText(String(string)).replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs(line), columns, options)).join("\n");
|
|
926
|
-
}
|
|
927
|
-
__name(wrapAnsi, "wrapAnsi");
|
|
928
|
-
|
|
929
|
-
export {
|
|
930
|
-
stringWidth,
|
|
931
|
-
wrapAnsi
|
|
932
|
-
};
|