@wirecat/zoom-cli 0.56.0 → 0.58.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.
Files changed (147) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/zm.js +35 -5
  3. package/dist/bundle/all-profiles-RS5IWIGR.js +25 -0
  4. package/dist/bundle/answer-policy-R7VZMCGE.js +96 -0
  5. package/dist/bundle/anthropic-5QHQR4WF.js +70 -0
  6. package/dist/bundle/app-server-7LANSZGE.js +232 -0
  7. package/dist/bundle/bun-O6RL6LRQ.js +169 -0
  8. package/dist/bundle/bun-sqlite-PEJM6CS4.js +69 -0
  9. package/dist/bundle/chunk-24DLFGES.js +97 -0
  10. package/dist/bundle/chunk-27P22POE.js +1109 -0
  11. package/dist/bundle/chunk-3SCTDFNO.js +3398 -0
  12. package/dist/bundle/chunk-3SERIWJD.js +36139 -0
  13. package/dist/bundle/chunk-4AURKUDZ.js +60 -0
  14. package/dist/bundle/chunk-4NGLRHWO.js +24 -0
  15. package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
  16. package/dist/bundle/chunk-5DVW77VC.js +789 -0
  17. package/dist/bundle/chunk-6CYLVFXM.js +9 -0
  18. package/dist/bundle/chunk-6FL25KC5.js +264 -0
  19. package/dist/bundle/chunk-7D2CD3E3.js +193 -0
  20. package/dist/bundle/chunk-7GVNQOV6.js +17 -0
  21. package/dist/bundle/chunk-7H3ZRDLW.js +630 -0
  22. package/dist/bundle/chunk-7Z4ANTAK.js +1095 -0
  23. package/dist/bundle/chunk-A6323R5P.js +22 -0
  24. package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
  25. package/dist/bundle/chunk-AIXLOMH4.js +63 -0
  26. package/dist/bundle/chunk-AQDWGJZT.js +188 -0
  27. package/dist/bundle/chunk-B32SF7J3.js +18 -0
  28. package/dist/bundle/chunk-BAQLQIMI.js +1938 -0
  29. package/dist/bundle/chunk-BGILD4CI.js +1109 -0
  30. package/dist/bundle/chunk-BXZ6WSVF.js +100 -0
  31. package/dist/bundle/chunk-CTGI4ES2.js +138 -0
  32. package/dist/bundle/chunk-CVIKKIGE.js +76 -0
  33. package/dist/bundle/chunk-DDYR6DYL.js +78 -0
  34. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  35. package/dist/bundle/chunk-DP5DX45H.js +151 -0
  36. package/dist/bundle/chunk-DXKVEOSS.js +53 -0
  37. package/dist/bundle/chunk-DXZTLB24.js +120 -0
  38. package/dist/bundle/chunk-G27MRA24.js +82 -0
  39. package/dist/bundle/chunk-HTQTIKWP.js +928 -0
  40. package/dist/bundle/chunk-IYAGQXED.js +433 -0
  41. package/dist/bundle/chunk-K76WFW4I.js +124 -0
  42. package/dist/bundle/chunk-KVHRHBLY.js +884 -0
  43. package/dist/bundle/chunk-L2UIJDWB.js +31 -0
  44. package/dist/bundle/chunk-L3VS3H34.js +482 -0
  45. package/dist/bundle/chunk-MBT7GP7K.js +1970 -0
  46. package/dist/bundle/chunk-MFS52LTZ.js +570 -0
  47. package/dist/bundle/chunk-MMT46EN4.js +29 -0
  48. package/dist/bundle/chunk-MNUTWGSA.js +6094 -0
  49. package/dist/bundle/chunk-N7GAQ27N.js +82 -0
  50. package/dist/bundle/chunk-NDXAZB5Z.js +409 -0
  51. package/dist/bundle/chunk-NOKFJJPA.js +1028 -0
  52. package/dist/bundle/chunk-NW7IMGRR.js +6848 -0
  53. package/dist/bundle/chunk-O5EHUB2V.js +2 -0
  54. package/dist/bundle/chunk-OBZWUNO4.js +160 -0
  55. package/dist/bundle/chunk-PACC5N6T.js +240 -0
  56. package/dist/bundle/chunk-PF25S7L4.js +422 -0
  57. package/dist/bundle/chunk-PKTFZAXG.js +48 -0
  58. package/dist/bundle/chunk-PNBEREOU.js +35626 -0
  59. package/dist/bundle/chunk-POOGFSRA.js +385 -0
  60. package/dist/bundle/chunk-PP3JGQQE.js +3517 -0
  61. package/dist/bundle/chunk-Q2Z3VCM4.js +2 -0
  62. package/dist/bundle/chunk-QCFHL4ES.js +45 -0
  63. package/dist/bundle/chunk-QFGBMS67.js +492 -0
  64. package/dist/bundle/chunk-RUP467ZX.js +948 -0
  65. package/dist/bundle/chunk-RXDIG23Z.js +166 -0
  66. package/dist/bundle/chunk-SIA7HJE2.js +8192 -0
  67. package/dist/bundle/chunk-SL3SXQZ5.js +100 -0
  68. package/dist/bundle/chunk-SV5L36WK.js +19 -0
  69. package/dist/bundle/chunk-T6AAM7UT.js +846 -0
  70. package/dist/bundle/chunk-U6QW67SU.js +18673 -0
  71. package/dist/bundle/chunk-UKR7KH3H.js +288 -0
  72. package/dist/bundle/chunk-UOFOMU3T.js +836 -0
  73. package/dist/bundle/chunk-URO44C5T.js +3570 -0
  74. package/dist/bundle/chunk-UXM7I35J.js +281 -0
  75. package/dist/bundle/chunk-UYJUTZTT.js +73 -0
  76. package/dist/bundle/chunk-VOAVOK4I.js +1146 -0
  77. package/dist/bundle/chunk-VSUY7PDW.js +192 -0
  78. package/dist/bundle/chunk-VYUSEJE4.js +98 -0
  79. package/dist/bundle/chunk-XFCSPOLZ.js +25 -0
  80. package/dist/bundle/chunk-XT7XVPEM.js +538 -0
  81. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  82. package/dist/bundle/chunk-YIFIY7ZE.js +58 -0
  83. package/dist/bundle/chunk-YIMI6O7R.js +5292 -0
  84. package/dist/bundle/chunk-YJRMMZI5.js +275 -0
  85. package/dist/bundle/chunk-YSHSCBPM.js +2315 -0
  86. package/dist/bundle/chunk-ZC5UXEIH.js +215 -0
  87. package/dist/bundle/chunk-ZHXIXDH5.js +161 -0
  88. package/dist/bundle/chunk-ZTOAAYFV.js +122 -0
  89. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  90. package/dist/bundle/cli-IQTASP44.js +831 -0
  91. package/dist/bundle/command-contract-WHZPF7NA.js +38 -0
  92. package/dist/bundle/config-IP5SGHKN.js +79 -0
  93. package/dist/bundle/dist-WT73DF46.js +136 -0
  94. package/dist/bundle/dist-XUFQCJXW.js +7577 -0
  95. package/dist/bundle/echarts-LD3AI55P.js +42501 -0
  96. package/dist/bundle/embed-XEMH4LNX.js +35 -0
  97. package/dist/bundle/embedder-ZCYKSKAE.js +108 -0
  98. package/dist/bundle/first-run-LGYDLIUM.js +23 -0
  99. package/dist/bundle/first-screen-LYQKPNF4.js +36 -0
  100. package/dist/bundle/folders-5ZBUQHAM.js +13 -0
  101. package/dist/bundle/instructions-RZMSW3OC.js +11 -0
  102. package/dist/bundle/main-NKY3JGXY.js +130 -0
  103. package/dist/bundle/mcp-7OXUHLTO.js +189 -0
  104. package/dist/bundle/mcp-OQBZXELQ.js +165 -0
  105. package/dist/bundle/mcp-VISEXTVC.js +92 -0
  106. package/dist/bundle/meetings-XPBHVZAU.js +215 -0
  107. package/dist/bundle/node-P4E63KXA.js +2340 -0
  108. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  109. package/dist/bundle/node-ZRLYQL7J.js +176 -0
  110. package/dist/bundle/node-sqlite-BBEDYBWO.js +45 -0
  111. package/dist/bundle/oauth-UHVRGKZU.js +17 -0
  112. package/dist/bundle/open-J4FCAUAJ.js +19 -0
  113. package/dist/bundle/output-file-SXV2ANW7.js +63 -0
  114. package/dist/bundle/process-LL77573L.js +91 -0
  115. package/dist/bundle/program-EPMIJCGA.js +5845 -0
  116. package/dist/bundle/prompt-LUUMQTMY.js +12 -0
  117. package/dist/bundle/recognize-EMHQX4XF.js +190 -0
  118. package/dist/bundle/remote-ZXS6D7VB.js +26 -0
  119. package/dist/bundle/rerank-WP7RKZNB.js +49 -0
  120. package/dist/bundle/run-log-GS2L66G6.js +111 -0
  121. package/dist/bundle/serve-L6KLLXK2.js +19 -0
  122. package/dist/bundle/server-NOFYENP5.js +53 -0
  123. package/dist/bundle/server-P5TXAPBY.js +66 -0
  124. package/dist/bundle/services-SPOEWVK3.js +330 -0
  125. package/dist/bundle/speech-6OBAKMND.js +44 -0
  126. package/dist/bundle/state-HN5EJKXQ.js +33 -0
  127. package/dist/bundle/store-LEU3M6IN.js +124 -0
  128. package/dist/bundle/store-ZP2URKET.js +141 -0
  129. package/dist/bundle/store-connection-I53XZ2TS.js +76 -0
  130. package/dist/bundle/store-maintenance-command-PSCHEHHY.js +54 -0
  131. package/dist/bundle/streaming-AK6Q2ZGQ.js +15 -0
  132. package/dist/bundle/tokens-CCM3D4ZT.js +17 -0
  133. package/dist/bundle/zm.js +8 -0
  134. package/dist/contract-overrides.d.ts.map +1 -1
  135. package/dist/contract-overrides.js +29 -17
  136. package/dist/contract-overrides.js.map +1 -1
  137. package/dist/mcp-command.d.ts +3 -2
  138. package/dist/mcp-command.d.ts.map +1 -1
  139. package/dist/mcp-command.js +62 -10
  140. package/dist/mcp-command.js.map +1 -1
  141. package/dist/program-bindings.d.ts.map +1 -1
  142. package/dist/program-bindings.js +1 -0
  143. package/dist/program-bindings.js.map +1 -1
  144. package/dist/version.d.ts +1 -1
  145. package/dist/version.js +1 -1
  146. package/package.json +7 -5
  147. package/skills/zoom-cli/SKILL.md +2 -0
@@ -0,0 +1,928 @@
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.4.0/node_modules/ansi-regex/index.js
8
+ function ansiRegex({ onlyFirst = false } = {}) {
9
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
10
+ const osc = `(?:(?:\\u001B\\]|\\u009D)[^\\u0007\\u001B\\u009C\\u009D]*${ST})`;
11
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
12
+ const pattern = `${osc}|${csi}`;
13
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
14
+ }
15
+ __name(ansiRegex, "ansiRegex");
16
+
17
+ // node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
18
+ var regex = ansiRegex();
19
+ function stripAnsi(string) {
20
+ if (typeof string !== "string") {
21
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
22
+ }
23
+ if (!string.includes("\x1B") && !string.includes("\x9B")) {
24
+ return string;
25
+ }
26
+ return string.replace(regex, "");
27
+ }
28
+ __name(stripAnsi, "stripAnsi");
29
+
30
+ // node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup-data.js
31
+ var ambiguousMinimalCodePoint = 161;
32
+ var ambiguousMaximumCodePoint = 1114109;
33
+ 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];
34
+ var fullwidthMinimalCodePoint = 12288;
35
+ var fullwidthMaximumCodePoint = 65510;
36
+ var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
37
+ var wideMinimalCodePoint = 4352;
38
+ var wideMaximumCodePoint = 262141;
39
+ 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];
40
+
41
+ // node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/utilities.js
42
+ var isInRange = /* @__PURE__ */ __name((ranges, codePoint) => {
43
+ let low = 0;
44
+ let high = Math.floor(ranges.length / 2) - 1;
45
+ while (low <= high) {
46
+ const mid = Math.floor((low + high) / 2);
47
+ const i = mid * 2;
48
+ if (codePoint < ranges[i]) {
49
+ high = mid - 1;
50
+ } else if (codePoint > ranges[i + 1]) {
51
+ low = mid + 1;
52
+ } else {
53
+ return true;
54
+ }
55
+ }
56
+ return false;
57
+ }, "isInRange");
58
+
59
+ // node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup.js
60
+ var commonCjkCodePoint = 19968;
61
+ var [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
62
+ function findWideFastPathRange(ranges) {
63
+ let fastPathStart = ranges[0];
64
+ let fastPathEnd = ranges[1];
65
+ for (let index = 0; index < ranges.length; index += 2) {
66
+ const start = ranges[index];
67
+ const end = ranges[index + 1];
68
+ if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
69
+ return [start, end];
70
+ }
71
+ if (end - start > fastPathEnd - fastPathStart) {
72
+ fastPathStart = start;
73
+ fastPathEnd = end;
74
+ }
75
+ }
76
+ return [fastPathStart, fastPathEnd];
77
+ }
78
+ __name(findWideFastPathRange, "findWideFastPathRange");
79
+ var isAmbiguous = /* @__PURE__ */ __name((codePoint) => {
80
+ if (codePoint < ambiguousMinimalCodePoint || codePoint > ambiguousMaximumCodePoint) {
81
+ return false;
82
+ }
83
+ return isInRange(ambiguousRanges, codePoint);
84
+ }, "isAmbiguous");
85
+ var isFullwidth = /* @__PURE__ */ __name((codePoint) => {
86
+ if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
87
+ return false;
88
+ }
89
+ return isInRange(fullwidthRanges, codePoint);
90
+ }, "isFullwidth");
91
+ var isWide = /* @__PURE__ */ __name((codePoint) => {
92
+ if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
93
+ return true;
94
+ }
95
+ if (codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint) {
96
+ return false;
97
+ }
98
+ return isInRange(wideRanges, codePoint);
99
+ }, "isWide");
100
+
101
+ // node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/index.js
102
+ function validate(codePoint) {
103
+ if (!Number.isSafeInteger(codePoint)) {
104
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
105
+ }
106
+ }
107
+ __name(validate, "validate");
108
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
109
+ validate(codePoint);
110
+ if (isFullwidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
111
+ return 2;
112
+ }
113
+ return 1;
114
+ }
115
+ __name(eastAsianWidth, "eastAsianWidth");
116
+
117
+ // node_modules/.pnpm/string-width@8.3.0/node_modules/string-width/index.js
118
+ var segmenter = new Intl.Segmenter();
119
+ var visibleCharacterRegex = new RegExp("[^\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]", "v");
120
+ var spacingMarkRegex = new RegExp("\\p{Spacing_Mark}", "v");
121
+ var rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
122
+ var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
123
+ var extendedPictographicRegex = new RegExp("\\p{Extended_Pictographic}", "gu");
124
+ function isDoubleWidthNonRgiEmojiSequence(segment) {
125
+ if (segment.length > 50) {
126
+ return false;
127
+ }
128
+ if (unqualifiedKeycapRegex.test(segment)) {
129
+ return true;
130
+ }
131
+ if (segment.includes("\u200D")) {
132
+ const pictographics = segment.match(extendedPictographicRegex);
133
+ return pictographics !== null && pictographics.length >= 2;
134
+ }
135
+ return false;
136
+ }
137
+ __name(isDoubleWidthNonRgiEmojiSequence, "isDoubleWidthNonRgiEmojiSequence");
138
+ function baseVisible(segment) {
139
+ const index = segment.search(visibleCharacterRegex);
140
+ return index === -1 ? void 0 : segment.slice(index);
141
+ }
142
+ __name(baseVisible, "baseVisible");
143
+ function isHangulLeadingJamo(codePoint) {
144
+ return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
145
+ }
146
+ __name(isHangulLeadingJamo, "isHangulLeadingJamo");
147
+ function isHangulVowelJamo(codePoint) {
148
+ return codePoint >= 4448 && codePoint <= 4519 || codePoint >= 55216 && codePoint <= 55238;
149
+ }
150
+ __name(isHangulVowelJamo, "isHangulVowelJamo");
151
+ function isHangulTrailingJamo(codePoint) {
152
+ return codePoint >= 4520 && codePoint <= 4607 || codePoint >= 55243 && codePoint <= 55291;
153
+ }
154
+ __name(isHangulTrailingJamo, "isHangulTrailingJamo");
155
+ function isHangulJamo(codePoint) {
156
+ return isHangulLeadingJamo(codePoint) || isHangulVowelJamo(codePoint) || isHangulTrailingJamo(codePoint);
157
+ }
158
+ __name(isHangulJamo, "isHangulJamo");
159
+ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
160
+ const codePoints = [];
161
+ for (const character of visibleSegment) {
162
+ if (!visibleCharacterRegex.test(character)) {
163
+ continue;
164
+ }
165
+ codePoints.push(character.codePointAt(0));
166
+ }
167
+ if (codePoints.length === 0) {
168
+ return void 0;
169
+ }
170
+ let width = 0;
171
+ for (let index = 0; index < codePoints.length; index++) {
172
+ const codePoint = codePoints[index];
173
+ if (!isHangulJamo(codePoint)) {
174
+ if (width === 0) {
175
+ return void 0;
176
+ }
177
+ for (let remaining = index; remaining < codePoints.length; remaining++) {
178
+ width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
179
+ }
180
+ return width;
181
+ }
182
+ if (isHangulLeadingJamo(codePoint) && isHangulVowelJamo(codePoints[index + 1])) {
183
+ width += 2;
184
+ index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
185
+ continue;
186
+ }
187
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
188
+ }
189
+ return width;
190
+ }
191
+ __name(hangulClusterWidth, "hangulClusterWidth");
192
+ function trailingWidth(visibleSegment, eastAsianWidthOptions) {
193
+ let extra = 0;
194
+ let first = true;
195
+ for (const character of visibleSegment) {
196
+ if (first) {
197
+ first = false;
198
+ continue;
199
+ }
200
+ if (spacingMarkRegex.test(character) || character >= "\uFF00" && character <= "\uFFEF") {
201
+ extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
202
+ }
203
+ }
204
+ return extra;
205
+ }
206
+ __name(trailingWidth, "trailingWidth");
207
+ function stringWidth(input, options = {}) {
208
+ if (typeof input !== "string" || input.length === 0) {
209
+ return 0;
210
+ }
211
+ const {
212
+ ambiguousIsNarrow = true,
213
+ countAnsiEscapeCodes = false
214
+ } = options;
215
+ let string = input;
216
+ if (!countAnsiEscapeCodes && (string.includes("\x1B") || string.includes("\x9B"))) {
217
+ string = stripAnsi(string);
218
+ }
219
+ if (string.length === 0) {
220
+ return 0;
221
+ }
222
+ if (/^[\u0020-\u007E]*$/.test(string)) {
223
+ return string.length;
224
+ }
225
+ let width = 0;
226
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
227
+ for (const { segment } of segmenter.segment(string)) {
228
+ const visibleSegment = baseVisible(segment);
229
+ if (visibleSegment === void 0) {
230
+ continue;
231
+ }
232
+ if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
233
+ width += 2;
234
+ continue;
235
+ }
236
+ const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
237
+ if (hangulWidth !== void 0) {
238
+ width += hangulWidth;
239
+ continue;
240
+ }
241
+ const codePoint = visibleSegment.codePointAt(0);
242
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
243
+ width += trailingWidth(visibleSegment, eastAsianWidthOptions);
244
+ }
245
+ return width;
246
+ }
247
+ __name(stringWidth, "stringWidth");
248
+
249
+ // node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
250
+ var ANSI_BACKGROUND_OFFSET = 10;
251
+ var wrapAnsi16 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${code + offset}m`, "wrapAnsi16");
252
+ var wrapAnsi256 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, "wrapAnsi256");
253
+ var wrapAnsi16m = /* @__PURE__ */ __name((offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, "wrapAnsi16m");
254
+ var styles = {
255
+ modifier: {
256
+ reset: [0, 0],
257
+ // 21 isn't widely supported and 22 does the same thing
258
+ bold: [1, 22],
259
+ dim: [2, 22],
260
+ italic: [3, 23],
261
+ underline: [4, 24],
262
+ overline: [53, 55],
263
+ inverse: [7, 27],
264
+ hidden: [8, 28],
265
+ strikethrough: [9, 29]
266
+ },
267
+ color: {
268
+ black: [30, 39],
269
+ red: [31, 39],
270
+ green: [32, 39],
271
+ yellow: [33, 39],
272
+ blue: [34, 39],
273
+ magenta: [35, 39],
274
+ cyan: [36, 39],
275
+ white: [37, 39],
276
+ // Bright color
277
+ blackBright: [90, 39],
278
+ gray: [90, 39],
279
+ // Alias of `blackBright`
280
+ grey: [90, 39],
281
+ // Alias of `blackBright`
282
+ redBright: [91, 39],
283
+ greenBright: [92, 39],
284
+ yellowBright: [93, 39],
285
+ blueBright: [94, 39],
286
+ magentaBright: [95, 39],
287
+ cyanBright: [96, 39],
288
+ whiteBright: [97, 39]
289
+ },
290
+ bgColor: {
291
+ bgBlack: [40, 49],
292
+ bgRed: [41, 49],
293
+ bgGreen: [42, 49],
294
+ bgYellow: [43, 49],
295
+ bgBlue: [44, 49],
296
+ bgMagenta: [45, 49],
297
+ bgCyan: [46, 49],
298
+ bgWhite: [47, 49],
299
+ // Bright color
300
+ bgBlackBright: [100, 49],
301
+ bgGray: [100, 49],
302
+ // Alias of `bgBlackBright`
303
+ bgGrey: [100, 49],
304
+ // Alias of `bgBlackBright`
305
+ bgRedBright: [101, 49],
306
+ bgGreenBright: [102, 49],
307
+ bgYellowBright: [103, 49],
308
+ bgBlueBright: [104, 49],
309
+ bgMagentaBright: [105, 49],
310
+ bgCyanBright: [106, 49],
311
+ bgWhiteBright: [107, 49]
312
+ }
313
+ };
314
+ var modifierNames = Object.keys(styles.modifier);
315
+ var foregroundColorNames = Object.keys(styles.color);
316
+ var backgroundColorNames = Object.keys(styles.bgColor);
317
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
318
+ function assembleStyles() {
319
+ const codes = /* @__PURE__ */ new Map();
320
+ for (const [groupName, group] of Object.entries(styles)) {
321
+ for (const [styleName, style] of Object.entries(group)) {
322
+ styles[styleName] = {
323
+ open: `\x1B[${style[0]}m`,
324
+ close: `\x1B[${style[1]}m`
325
+ };
326
+ group[styleName] = styles[styleName];
327
+ codes.set(style[0], style[1]);
328
+ }
329
+ Object.defineProperty(styles, groupName, {
330
+ value: group,
331
+ enumerable: false
332
+ });
333
+ }
334
+ Object.defineProperty(styles, "codes", {
335
+ value: codes,
336
+ enumerable: false
337
+ });
338
+ styles.color.close = "\x1B[39m";
339
+ styles.bgColor.close = "\x1B[49m";
340
+ styles.color.ansi = wrapAnsi16();
341
+ styles.color.ansi256 = wrapAnsi256();
342
+ styles.color.ansi16m = wrapAnsi16m();
343
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
344
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
345
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
346
+ Object.defineProperties(styles, {
347
+ rgbToAnsi256: {
348
+ value(red, green, blue) {
349
+ if (red === green && green === blue) {
350
+ if (red < 8) {
351
+ return 16;
352
+ }
353
+ if (red > 248) {
354
+ return 231;
355
+ }
356
+ return Math.round((red - 8) / 247 * 24) + 232;
357
+ }
358
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
359
+ },
360
+ enumerable: false
361
+ },
362
+ hexToRgb: {
363
+ value(hex) {
364
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
365
+ if (!matches) {
366
+ return [0, 0, 0];
367
+ }
368
+ let [colorString] = matches;
369
+ if (colorString.length === 3) {
370
+ colorString = [...colorString].map((character) => character + character).join("");
371
+ }
372
+ const integer = Number.parseInt(colorString, 16);
373
+ return [
374
+ /* eslint-disable no-bitwise */
375
+ integer >> 16 & 255,
376
+ integer >> 8 & 255,
377
+ integer & 255
378
+ /* eslint-enable no-bitwise */
379
+ ];
380
+ },
381
+ enumerable: false
382
+ },
383
+ hexToAnsi256: {
384
+ value: /* @__PURE__ */ __name((hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), "value"),
385
+ enumerable: false
386
+ },
387
+ ansi256ToAnsi: {
388
+ value(code) {
389
+ if (code < 8) {
390
+ return 30 + code;
391
+ }
392
+ if (code < 16) {
393
+ return 90 + (code - 8);
394
+ }
395
+ let red;
396
+ let green;
397
+ let blue;
398
+ if (code >= 232) {
399
+ red = ((code - 232) * 10 + 8) / 255;
400
+ green = red;
401
+ blue = red;
402
+ } else {
403
+ code -= 16;
404
+ const remainder = code % 36;
405
+ red = Math.floor(code / 36) / 5;
406
+ green = Math.floor(remainder / 6) / 5;
407
+ blue = remainder % 6 / 5;
408
+ }
409
+ const value = Math.max(red, green, blue) * 2;
410
+ if (value === 0) {
411
+ return 30;
412
+ }
413
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
414
+ if (value === 2) {
415
+ result += 60;
416
+ }
417
+ return result;
418
+ },
419
+ enumerable: false
420
+ },
421
+ rgbToAnsi: {
422
+ value: /* @__PURE__ */ __name((red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), "value"),
423
+ enumerable: false
424
+ },
425
+ hexToAnsi: {
426
+ value: /* @__PURE__ */ __name((hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), "value"),
427
+ enumerable: false
428
+ }
429
+ });
430
+ return styles;
431
+ }
432
+ __name(assembleStyles, "assembleStyles");
433
+ var ansiStyles = assembleStyles();
434
+ var ansi_styles_default = ansiStyles;
435
+
436
+ // node_modules/.pnpm/wrap-ansi@10.0.2/node_modules/wrap-ansi/index.js
437
+ var ANSI_ESCAPE = "\x1B";
438
+ var ANSI_ESCAPE_BELL = "\x07";
439
+ var C1_CSI = "\x9B";
440
+ var ANSI_CSI = "[";
441
+ var ANSI_OSC = "]";
442
+ var ANSI_SGR_TERMINATOR = "m";
443
+ var ANSI_SGR_RESET = 0;
444
+ var ANSI_SGR_RESET_FOREGROUND = 39;
445
+ var ANSI_SGR_RESET_BACKGROUND = 49;
446
+ var ANSI_SGR_RESET_UNDERLINE_COLOR = 59;
447
+ var ANSI_SGR_FOREGROUND_EXTENDED = 38;
448
+ var ANSI_SGR_BACKGROUND_EXTENDED = 48;
449
+ var ANSI_SGR_UNDERLINE_COLOR_EXTENDED = 58;
450
+ var ANSI_SGR_COLOR_MODE_RGB = 2;
451
+ var ANSI_SGR_COLOR_MODE_256 = 5;
452
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;`;
453
+ var ESCAPES = /* @__PURE__ */ new Set([
454
+ ANSI_ESCAPE,
455
+ C1_CSI
456
+ ]);
457
+ var ESCAPE_CHARACTERS = [...ESCAPES].join("");
458
+ var CSI_INTRODUCER = `(?:${ANSI_ESCAPE}\\${ANSI_CSI}|${C1_CSI})`;
459
+ var CSI_PARAMETERS = "[0-?]*[ -/]*[@-~]";
460
+ var SGR_PARAMETERS = `(?<sgr>[0-9;:]*)${ANSI_SGR_TERMINATOR}`;
461
+ var OSC_STRING_TERMINATOR = `(?:${ANSI_ESCAPE_BELL}|${ANSI_ESCAPE}\\\\)`;
462
+ var OSC_STRING_PAYLOAD = String.raw`[^\u0000-\u001F\u007F-\u009F]*`;
463
+ var LINK_PARAMETERS = String.raw`8;(?<parameters>[^;\u0000-\u001F\u007F-\u009F]*);(?<uri>${OSC_STRING_PAYLOAD})${OSC_STRING_TERMINATOR}`;
464
+ var OSC_STRING = `${OSC_STRING_PAYLOAD}${OSC_STRING_TERMINATOR}`;
465
+ var ANSI_ESCAPE_REGEX = new RegExp(
466
+ `${CSI_INTRODUCER}(?:${SGR_PARAMETERS}|${CSI_PARAMETERS})|${ANSI_ESCAPE}\\${ANSI_OSC}(?:${LINK_PARAMETERS}|${OSC_STRING})`,
467
+ "y"
468
+ );
469
+ var ANSI_SGR_MODIFIER_CLOSE_CODES = new Set(ansi_styles_default.codes.values());
470
+ ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);
471
+ var segmenter2 = new Intl.Segmenter();
472
+ var getStringWidth = /* @__PURE__ */ __name((string) => stringWidth(string, { countAnsiEscapeCodes: true }), "getStringWidth");
473
+ var TAB_SIZE = 8;
474
+ var ESCAPE_INTRODUCER_REGEX = new RegExp(`[${ESCAPE_CHARACTERS}]`, "g");
475
+ var ROW_BOUNDARY_REGEX = new RegExp(`[\\n${ESCAPE_CHARACTERS}]`, "g");
476
+ var ASCII_PRINTABLE_REGEX = /^[ -~]*$/;
477
+ var wrapAnsiCode = /* @__PURE__ */ __name((code) => `${ANSI_ESCAPE}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, "wrapAnsiCode");
478
+ var wrapAnsiHyperlink = /* @__PURE__ */ __name((url, parameters = "") => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK}${parameters};${url}${ANSI_ESCAPE_BELL}`, "wrapAnsiHyperlink");
479
+ var matchAnsiEscape = /* @__PURE__ */ __name((string, index) => {
480
+ if (!ESCAPES.has(string[index])) {
481
+ return;
482
+ }
483
+ ANSI_ESCAPE_REGEX.lastIndex = index;
484
+ return ANSI_ESCAPE_REGEX.exec(string) ?? void 0;
485
+ }, "matchAnsiEscape");
486
+ var forEachSegment = /* @__PURE__ */ __name((string, onPlainText, onEscape = () => {
487
+ }) => {
488
+ let plainStart = 0;
489
+ let index = 0;
490
+ while (index < string.length) {
491
+ ESCAPE_INTRODUCER_REGEX.lastIndex = index;
492
+ const introducer = ESCAPE_INTRODUCER_REGEX.exec(string);
493
+ if (!introducer) {
494
+ break;
495
+ }
496
+ const escape = matchAnsiEscape(string, introducer.index);
497
+ if (!escape) {
498
+ index = introducer.index + 1;
499
+ continue;
500
+ }
501
+ if (introducer.index > plainStart) {
502
+ onPlainText(string.slice(plainStart, introducer.index));
503
+ }
504
+ onEscape(escape[0]);
505
+ index = introducer.index + escape[0].length;
506
+ plainStart = index;
507
+ }
508
+ if (plainStart < string.length) {
509
+ onPlainText(string.slice(plainStart));
510
+ }
511
+ }, "forEachSegment");
512
+ var getWidth = /* @__PURE__ */ __name((string) => {
513
+ let plainText = "";
514
+ forEachSegment(string, (part) => {
515
+ plainText += part;
516
+ });
517
+ return getStringWidth(plainText);
518
+ }, "getWidth");
519
+ var getTokens = /* @__PURE__ */ __name((string) => {
520
+ const tokens = [];
521
+ forEachSegment(string, (plainText) => {
522
+ if (ASCII_PRINTABLE_REGEX.test(plainText)) {
523
+ for (const character of plainText) {
524
+ tokens.push({ value: character, width: 1 });
525
+ }
526
+ return;
527
+ }
528
+ for (const { segment } of segmenter2.segment(plainText)) {
529
+ tokens.push({ value: segment, width: getStringWidth(segment) });
530
+ }
531
+ }, (escape) => {
532
+ tokens.push({ value: escape, width: 0 });
533
+ });
534
+ return tokens;
535
+ }, "getTokens");
536
+ var splitWords = /* @__PURE__ */ __name((string) => {
537
+ let currentWord = { value: "", plainText: "" };
538
+ const words = [currentWord];
539
+ forEachSegment(string, (plainText) => {
540
+ const parts = plainText.split(" ");
541
+ currentWord.value += parts[0];
542
+ currentWord.plainText += parts[0];
543
+ for (let index = 1; index < parts.length; index++) {
544
+ currentWord = { value: parts[index], plainText: parts[index] };
545
+ words.push(currentWord);
546
+ }
547
+ }, (escape) => {
548
+ currentWord.value += escape;
549
+ });
550
+ for (const word of words) {
551
+ word.width = getStringWidth(word.plainText);
552
+ }
553
+ return words;
554
+ }, "splitWords");
555
+ var getColonColorToken = /* @__PURE__ */ __name((parameter) => {
556
+ const parts = parameter.split(":");
557
+ const code = Number.parseInt(parts[0], 10);
558
+ const mode = Number.parseInt(parts[1], 10);
559
+ if (![ANSI_SGR_FOREGROUND_EXTENDED, ANSI_SGR_BACKGROUND_EXTENDED, ANSI_SGR_UNDERLINE_COLOR_EXTENDED].includes(code)) {
560
+ return;
561
+ }
562
+ if (mode === ANSI_SGR_COLOR_MODE_256 && parts.length === 3 && /^\d+$/.test(parts[2])) {
563
+ return { code, open: parameter, hasArguments: true };
564
+ }
565
+ if (mode !== ANSI_SGR_COLOR_MODE_RGB) {
566
+ return;
567
+ }
568
+ const components = parts.length === 6 ? parts.slice(3) : parts.slice(2);
569
+ const colorSpace = parts.length === 6 ? parts[2] : void 0;
570
+ if (components.length === 3 && components.every((component) => /^\d+$/.test(component)) && (colorSpace === void 0 || /^\d*$/.test(colorSpace))) {
571
+ return { code, open: parameter, hasArguments: true };
572
+ }
573
+ }, "getColonColorToken");
574
+ var getSgrTokens = /* @__PURE__ */ __name((sgrParameters) => {
575
+ const parameters = sgrParameters.split(";");
576
+ const sgrTokens = [];
577
+ for (let index = 0; index < parameters.length; index++) {
578
+ const parameter = parameters[index];
579
+ if (parameter.includes(":")) {
580
+ const colonColorToken = getColonColorToken(parameter);
581
+ if (colonColorToken) {
582
+ sgrTokens.push(colonColorToken);
583
+ }
584
+ continue;
585
+ }
586
+ const code = parameter === "" ? ANSI_SGR_RESET : Number.parseInt(parameter, 10);
587
+ if (!Number.isFinite(code)) {
588
+ continue;
589
+ }
590
+ if (code === ANSI_SGR_FOREGROUND_EXTENDED || code === ANSI_SGR_BACKGROUND_EXTENDED || code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
591
+ if (index + 1 >= parameters.length) {
592
+ break;
593
+ }
594
+ const mode = Number.parseInt(parameters[index + 1], 10);
595
+ const colorIndex = Number.parseInt(parameters[index + 2], 10);
596
+ if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(colorIndex)) {
597
+ sgrTokens.push({ code, open: [code, mode, colorIndex].join(";"), hasArguments: true });
598
+ index += 2;
599
+ continue;
600
+ }
601
+ const red = Number.parseInt(parameters[index + 2], 10);
602
+ const green = Number.parseInt(parameters[index + 3], 10);
603
+ const blue = Number.parseInt(parameters[index + 4], 10);
604
+ if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red) && Number.isFinite(green) && Number.isFinite(blue)) {
605
+ sgrTokens.push({ code, open: [code, mode, red, green, blue].join(";"), hasArguments: true });
606
+ index += 4;
607
+ continue;
608
+ }
609
+ break;
610
+ }
611
+ sgrTokens.push({ code, open: String(code), hasArguments: false });
612
+ }
613
+ return sgrTokens;
614
+ }, "getSgrTokens");
615
+ var removeActiveStyle = /* @__PURE__ */ __name((activeStyles, family) => {
616
+ const activeStyleIndex = activeStyles.findIndex((activeStyle) => activeStyle.family === family);
617
+ if (activeStyleIndex !== -1) {
618
+ activeStyles.splice(activeStyleIndex, 1);
619
+ }
620
+ }, "removeActiveStyle");
621
+ var upsertActiveStyle = /* @__PURE__ */ __name((activeStyles, nextActiveStyle) => {
622
+ removeActiveStyle(activeStyles, nextActiveStyle.family);
623
+ activeStyles.push(nextActiveStyle);
624
+ }, "upsertActiveStyle");
625
+ var removeModifierStylesByClose = /* @__PURE__ */ __name((activeStyles, closeCode) => {
626
+ for (let index = activeStyles.length - 1; index >= 0; index--) {
627
+ const activeStyle = activeStyles[index];
628
+ if (activeStyle.family.startsWith("modifier-") && activeStyle.close === closeCode) {
629
+ activeStyles.splice(index, 1);
630
+ }
631
+ }
632
+ }, "removeModifierStylesByClose");
633
+ var getColorStyle = /* @__PURE__ */ __name((sgrToken) => {
634
+ const { code, open, hasArguments } = sgrToken;
635
+ if (code >= 30 && code <= 37 || code >= 90 && code <= 97 || code === ANSI_SGR_FOREGROUND_EXTENDED && hasArguments) {
636
+ return {
637
+ family: "foreground",
638
+ open,
639
+ close: ANSI_SGR_RESET_FOREGROUND
640
+ };
641
+ }
642
+ if (code >= 40 && code <= 47 || code >= 100 && code <= 107 || code === ANSI_SGR_BACKGROUND_EXTENDED && hasArguments) {
643
+ return {
644
+ family: "background",
645
+ open,
646
+ close: ANSI_SGR_RESET_BACKGROUND
647
+ };
648
+ }
649
+ if (code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && hasArguments) {
650
+ return {
651
+ family: "underlineColor",
652
+ open,
653
+ close: ANSI_SGR_RESET_UNDERLINE_COLOR
654
+ };
655
+ }
656
+ }, "getColorStyle");
657
+ var applySgrResetCode = /* @__PURE__ */ __name((code, activeStyles) => {
658
+ if (code === ANSI_SGR_RESET) {
659
+ activeStyles.length = 0;
660
+ return true;
661
+ }
662
+ if (code === ANSI_SGR_RESET_FOREGROUND) {
663
+ removeActiveStyle(activeStyles, "foreground");
664
+ return true;
665
+ }
666
+ if (code === ANSI_SGR_RESET_BACKGROUND) {
667
+ removeActiveStyle(activeStyles, "background");
668
+ return true;
669
+ }
670
+ if (code === ANSI_SGR_RESET_UNDERLINE_COLOR) {
671
+ removeActiveStyle(activeStyles, "underlineColor");
672
+ return true;
673
+ }
674
+ if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code)) {
675
+ removeModifierStylesByClose(activeStyles, code);
676
+ return true;
677
+ }
678
+ return false;
679
+ }, "applySgrResetCode");
680
+ var applySgrToken = /* @__PURE__ */ __name((sgrToken, activeStyles) => {
681
+ const { code } = sgrToken;
682
+ if (applySgrResetCode(code, activeStyles)) {
683
+ return;
684
+ }
685
+ const colorStyle = getColorStyle(sgrToken);
686
+ if (colorStyle) {
687
+ upsertActiveStyle(activeStyles, colorStyle);
688
+ return;
689
+ }
690
+ const close = ansi_styles_default.codes.get(code);
691
+ if (close !== void 0 && close !== ANSI_SGR_RESET) {
692
+ upsertActiveStyle(activeStyles, {
693
+ family: `modifier-${code}`,
694
+ open: sgrToken.open,
695
+ close
696
+ });
697
+ }
698
+ }, "applySgrToken");
699
+ var applySgrParameters = /* @__PURE__ */ __name((sgrParameters, activeStyles) => {
700
+ for (const sgrToken of getSgrTokens(sgrParameters)) {
701
+ applySgrToken(sgrToken, activeStyles);
702
+ }
703
+ }, "applySgrParameters");
704
+ var applySgrResets = /* @__PURE__ */ __name((sgrParameters, activeStyles) => {
705
+ for (const { code } of getSgrTokens(sgrParameters)) {
706
+ applySgrResetCode(code, activeStyles);
707
+ }
708
+ }, "applySgrResets");
709
+ var applyLeadingSgrResets = /* @__PURE__ */ __name((string, startIndex, activeStyles) => {
710
+ let index = startIndex;
711
+ while (index < string.length) {
712
+ const match = matchAnsiEscape(string, index);
713
+ if (!match) {
714
+ break;
715
+ }
716
+ if (match.groups.sgr !== void 0) {
717
+ applySgrResets(match.groups.sgr, activeStyles);
718
+ }
719
+ index += match[0].length;
720
+ }
721
+ }, "applyLeadingSgrResets");
722
+ var getClosingSgrSequence = /* @__PURE__ */ __name((activeStyles) => [...activeStyles].reverse().map((activeStyle) => wrapAnsiCode(activeStyle.close)).join(""), "getClosingSgrSequence");
723
+ var getOpeningSgrSequence = /* @__PURE__ */ __name((activeStyles) => activeStyles.map((activeStyle) => wrapAnsiCode(activeStyle.open)).join(""), "getOpeningSgrSequence");
724
+ var wrapWord = /* @__PURE__ */ __name((rows, word, columns, rowWidth) => {
725
+ const tokens = getTokens(word);
726
+ let visible = rowWidth;
727
+ for (let index = 0; index < tokens.length; index++) {
728
+ const token = tokens[index];
729
+ if (token.width > 0 && visible > 0 && visible + token.width > columns) {
730
+ rows.push("");
731
+ visible = 0;
732
+ }
733
+ rows[rows.length - 1] += token.value;
734
+ visible += token.width;
735
+ if (visible === columns && index < tokens.length - 1) {
736
+ rows.push("");
737
+ visible = 0;
738
+ }
739
+ }
740
+ if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
741
+ rows[rows.length - 2] += rows.pop();
742
+ }
743
+ return getWidth(rows.at(-1));
744
+ }, "wrapWord");
745
+ var stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((string) => {
746
+ if (!string.includes(" ")) {
747
+ return string;
748
+ }
749
+ const segments = [];
750
+ forEachSegment(string, (plainText) => {
751
+ segments.push({ value: plainText, isEscape: false });
752
+ }, (escape) => {
753
+ segments.push({ value: escape, isEscape: true });
754
+ });
755
+ for (let index = segments.length - 1; index >= 0; index--) {
756
+ const segment = segments[index];
757
+ if (segment.isEscape) {
758
+ continue;
759
+ }
760
+ let end = segment.value.length;
761
+ while (end > 0 && segment.value[end - 1] === " ") {
762
+ end--;
763
+ }
764
+ segment.value = segment.value.slice(0, end);
765
+ if (getStringWidth(segment.value) > 0) {
766
+ break;
767
+ }
768
+ }
769
+ return segments.map((segment) => segment.value).join("");
770
+ }, "stringVisibleTrimSpacesRight");
771
+ var expandTabs = /* @__PURE__ */ __name((line) => {
772
+ if (!line.includes(" ")) {
773
+ return line;
774
+ }
775
+ let visible = 0;
776
+ let expandedLine = "";
777
+ let plainTextSinceTab = "";
778
+ const expandPlainText = /* @__PURE__ */ __name((plainText) => {
779
+ const segments = plainText.split(" ");
780
+ for (const [index, segment] of segments.entries()) {
781
+ expandedLine += segment;
782
+ plainTextSinceTab += segment;
783
+ if (index < segments.length - 1) {
784
+ visible += getStringWidth(plainTextSinceTab);
785
+ plainTextSinceTab = "";
786
+ const spaces = TAB_SIZE - visible % TAB_SIZE;
787
+ expandedLine += " ".repeat(spaces);
788
+ visible += spaces;
789
+ }
790
+ }
791
+ }, "expandPlainText");
792
+ forEachSegment(line, expandPlainText, (escape) => {
793
+ expandedLine += escape;
794
+ });
795
+ return expandedLine;
796
+ }, "expandTabs");
797
+ var restoreStylesAcrossRows = /* @__PURE__ */ __name((preString) => {
798
+ let returnValue = "";
799
+ let activeHyperlink;
800
+ const activeStyles = [];
801
+ let index = 0;
802
+ let copiedIndex = 0;
803
+ while (index < preString.length) {
804
+ ROW_BOUNDARY_REGEX.lastIndex = index;
805
+ const boundary = ROW_BOUNDARY_REGEX.exec(preString);
806
+ if (!boundary) {
807
+ break;
808
+ }
809
+ index = boundary.index;
810
+ if (boundary[0] !== "\n") {
811
+ const escape = matchAnsiEscape(preString, index);
812
+ if (!escape) {
813
+ index++;
814
+ continue;
815
+ }
816
+ const { groups } = escape;
817
+ if (groups.sgr !== void 0) {
818
+ applySgrParameters(groups.sgr, activeStyles);
819
+ } else if (groups.uri !== void 0) {
820
+ activeHyperlink = groups.uri.length === 0 ? void 0 : { parameters: groups.parameters, uri: groups.uri };
821
+ }
822
+ index += escape[0].length;
823
+ continue;
824
+ }
825
+ returnValue += preString.slice(copiedIndex, index);
826
+ if (index > copiedIndex) {
827
+ if (activeHyperlink) {
828
+ returnValue += wrapAnsiHyperlink("");
829
+ }
830
+ returnValue += getClosingSgrSequence(activeStyles);
831
+ }
832
+ returnValue += "\n";
833
+ index++;
834
+ copiedIndex = index;
835
+ if (index < preString.length && preString[index] !== "\n") {
836
+ const openingStyles = [...activeStyles];
837
+ applyLeadingSgrResets(preString, index, openingStyles);
838
+ returnValue += getOpeningSgrSequence(openingStyles);
839
+ if (activeHyperlink) {
840
+ returnValue += wrapAnsiHyperlink(activeHyperlink.uri, activeHyperlink.parameters);
841
+ }
842
+ }
843
+ }
844
+ return returnValue + preString.slice(copiedIndex);
845
+ }, "restoreStylesAcrossRows");
846
+ var exec = /* @__PURE__ */ __name((string, columns, options = {}) => {
847
+ if (options.trim !== false && string.trim() === "") {
848
+ return "";
849
+ }
850
+ const words = splitWords(string);
851
+ let rows = [""];
852
+ let rowLength = 0;
853
+ let trimmedRowIndex = -1;
854
+ let isFirstWord = true;
855
+ for (const word of words) {
856
+ const rowIndex = rows.length - 1;
857
+ if (options.trim !== false && trimmedRowIndex !== rowIndex) {
858
+ const row = rows[rowIndex];
859
+ const trimmedRow = row.trimStart();
860
+ if (trimmedRow.length !== row.length) {
861
+ rows[rowIndex] = trimmedRow;
862
+ rowLength = getWidth(trimmedRow);
863
+ }
864
+ if (trimmedRow.length > 0) {
865
+ trimmedRowIndex = rowIndex;
866
+ }
867
+ }
868
+ if (isFirstWord) {
869
+ isFirstWord = false;
870
+ } else {
871
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
872
+ rows.push("");
873
+ rowLength = 0;
874
+ }
875
+ if (rowLength > 0 || options.trim === false) {
876
+ rows[rows.length - 1] += " ";
877
+ rowLength++;
878
+ }
879
+ }
880
+ if (options.hard && options.wordWrap !== false && word.width > columns) {
881
+ const remainingColumns = columns - rowLength;
882
+ const breaksStartingThisLine = 1 + Math.floor((word.width - remainingColumns - 1) / columns);
883
+ const breaksStartingNextLine = Math.floor((word.width - 1) / columns);
884
+ if (breaksStartingNextLine < breaksStartingThisLine) {
885
+ rows.push("");
886
+ rowLength = 0;
887
+ }
888
+ rowLength = wrapWord(rows, word.value, columns, rowLength);
889
+ continue;
890
+ }
891
+ if (rowLength + word.width > columns && rowLength > 0 && word.width > 0) {
892
+ if (options.wordWrap === false && rowLength < columns) {
893
+ rowLength = wrapWord(rows, word.value, columns, rowLength);
894
+ continue;
895
+ }
896
+ rows.push("");
897
+ rowLength = 0;
898
+ }
899
+ if (rowLength + word.width > columns && options.wordWrap === false) {
900
+ rowLength = wrapWord(rows, word.value, columns, rowLength);
901
+ continue;
902
+ }
903
+ rows[rows.length - 1] += word.value;
904
+ rowLength += word.width;
905
+ }
906
+ if (options.trim !== false) {
907
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
908
+ }
909
+ return restoreStylesAcrossRows(rows.join("\n"));
910
+ }, "exec");
911
+ var normalizeText = /* @__PURE__ */ __name((string) => {
912
+ let normalizedString = "";
913
+ forEachSegment(string, (plainText) => {
914
+ normalizedString += plainText.normalize();
915
+ }, (escape) => {
916
+ normalizedString += escape;
917
+ });
918
+ return normalizedString;
919
+ }, "normalizeText");
920
+ function wrapAnsi(string, columns, options) {
921
+ return normalizeText(String(string)).replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs(line), columns, options)).join("\n");
922
+ }
923
+ __name(wrapAnsi, "wrapAnsi");
924
+
925
+ export {
926
+ stringWidth,
927
+ wrapAnsi
928
+ };