@socketsecurity/lib 3.3.9 → 3.3.10

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.
@@ -918,10 +918,6 @@ var init_ansi_regex = __esm({
918
918
  });
919
919
 
920
920
  // node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
921
- var strip_ansi_exports = {};
922
- __export(strip_ansi_exports, {
923
- default: () => stripAnsi
924
- });
925
921
  function stripAnsi(string) {
926
922
  if (typeof string !== "string") {
927
923
  throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
@@ -937,1213 +933,334 @@ var init_strip_ansi = __esm({
937
933
  }
938
934
  });
939
935
 
940
- // node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
941
- var require_is_fullwidth_code_point = __commonJS({
942
- "node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports2, module2) {
943
- "use strict";
944
- var isFullwidthCodePoint = /* @__PURE__ */ __name((codePoint) => {
945
- if (Number.isNaN(codePoint)) {
946
- return false;
947
- }
948
- if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
949
- codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
950
- codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
951
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
952
- 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
953
- 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
954
- 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
955
- 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
956
- 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
957
- 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
958
- 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
959
- 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
960
- 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
961
- 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
962
- 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
963
- 131072 <= codePoint && codePoint <= 262141)) {
964
- return true;
965
- }
966
- return false;
967
- }, "isFullwidthCodePoint");
968
- module2.exports = isFullwidthCodePoint;
969
- module2.exports.default = isFullwidthCodePoint;
936
+ // node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js
937
+ function isAmbiguous(x) {
938
+ return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
939
+ }
940
+ function isFullWidth(x) {
941
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
942
+ }
943
+ function isWide(x) {
944
+ return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
945
+ }
946
+ var init_lookup = __esm({
947
+ "node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js"() {
948
+ __name(isAmbiguous, "isAmbiguous");
949
+ __name(isFullWidth, "isFullWidth");
950
+ __name(isWide, "isWide");
970
951
  }
971
952
  });
972
953
 
973
- // node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
974
- var require_emoji_regex = __commonJS({
975
- "node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports2, module2) {
976
- "use strict";
977
- module2.exports = function() {
978
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
979
- };
954
+ // node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js
955
+ function validate(codePoint) {
956
+ if (!Number.isSafeInteger(codePoint)) {
957
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
980
958
  }
981
- });
982
-
983
- // node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
984
- var require_string_width = __commonJS({
985
- "node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports2, module2) {
986
- "use strict";
987
- var stripAnsi2 = (init_strip_ansi(), __toCommonJS(strip_ansi_exports));
988
- var isFullwidthCodePoint = require_is_fullwidth_code_point();
989
- var emojiRegex = require_emoji_regex();
990
- var stringWidth = /* @__PURE__ */ __name((string) => {
991
- if (typeof string !== "string" || string.length === 0) {
992
- return 0;
993
- }
994
- string = stripAnsi2(string);
995
- if (string.length === 0) {
996
- return 0;
997
- }
998
- string = string.replace(emojiRegex(), " ");
999
- let width = 0;
1000
- for (let i = 0; i < string.length; i++) {
1001
- const code = string.codePointAt(i);
1002
- if (code <= 31 || code >= 127 && code <= 159) {
1003
- continue;
1004
- }
1005
- if (code >= 768 && code <= 879) {
1006
- continue;
1007
- }
1008
- if (code > 65535) {
1009
- i++;
1010
- }
1011
- width += isFullwidthCodePoint(code) ? 2 : 1;
1012
- }
1013
- return width;
1014
- }, "stringWidth");
1015
- module2.exports = stringWidth;
1016
- module2.exports.default = stringWidth;
959
+ }
960
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
961
+ validate(codePoint);
962
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
963
+ return 2;
1017
964
  }
1018
- });
1019
-
1020
- // node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
1021
- var require_color_name = __commonJS({
1022
- "node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports2, module2) {
1023
- "use strict";
1024
- module2.exports = {
1025
- "aliceblue": [240, 248, 255],
1026
- "antiquewhite": [250, 235, 215],
1027
- "aqua": [0, 255, 255],
1028
- "aquamarine": [127, 255, 212],
1029
- "azure": [240, 255, 255],
1030
- "beige": [245, 245, 220],
1031
- "bisque": [255, 228, 196],
1032
- "black": [0, 0, 0],
1033
- "blanchedalmond": [255, 235, 205],
1034
- "blue": [0, 0, 255],
1035
- "blueviolet": [138, 43, 226],
1036
- "brown": [165, 42, 42],
1037
- "burlywood": [222, 184, 135],
1038
- "cadetblue": [95, 158, 160],
1039
- "chartreuse": [127, 255, 0],
1040
- "chocolate": [210, 105, 30],
1041
- "coral": [255, 127, 80],
1042
- "cornflowerblue": [100, 149, 237],
1043
- "cornsilk": [255, 248, 220],
1044
- "crimson": [220, 20, 60],
1045
- "cyan": [0, 255, 255],
1046
- "darkblue": [0, 0, 139],
1047
- "darkcyan": [0, 139, 139],
1048
- "darkgoldenrod": [184, 134, 11],
1049
- "darkgray": [169, 169, 169],
1050
- "darkgreen": [0, 100, 0],
1051
- "darkgrey": [169, 169, 169],
1052
- "darkkhaki": [189, 183, 107],
1053
- "darkmagenta": [139, 0, 139],
1054
- "darkolivegreen": [85, 107, 47],
1055
- "darkorange": [255, 140, 0],
1056
- "darkorchid": [153, 50, 204],
1057
- "darkred": [139, 0, 0],
1058
- "darksalmon": [233, 150, 122],
1059
- "darkseagreen": [143, 188, 143],
1060
- "darkslateblue": [72, 61, 139],
1061
- "darkslategray": [47, 79, 79],
1062
- "darkslategrey": [47, 79, 79],
1063
- "darkturquoise": [0, 206, 209],
1064
- "darkviolet": [148, 0, 211],
1065
- "deeppink": [255, 20, 147],
1066
- "deepskyblue": [0, 191, 255],
1067
- "dimgray": [105, 105, 105],
1068
- "dimgrey": [105, 105, 105],
1069
- "dodgerblue": [30, 144, 255],
1070
- "firebrick": [178, 34, 34],
1071
- "floralwhite": [255, 250, 240],
1072
- "forestgreen": [34, 139, 34],
1073
- "fuchsia": [255, 0, 255],
1074
- "gainsboro": [220, 220, 220],
1075
- "ghostwhite": [248, 248, 255],
1076
- "gold": [255, 215, 0],
1077
- "goldenrod": [218, 165, 32],
1078
- "gray": [128, 128, 128],
1079
- "green": [0, 128, 0],
1080
- "greenyellow": [173, 255, 47],
1081
- "grey": [128, 128, 128],
1082
- "honeydew": [240, 255, 240],
1083
- "hotpink": [255, 105, 180],
1084
- "indianred": [205, 92, 92],
1085
- "indigo": [75, 0, 130],
1086
- "ivory": [255, 255, 240],
1087
- "khaki": [240, 230, 140],
1088
- "lavender": [230, 230, 250],
1089
- "lavenderblush": [255, 240, 245],
1090
- "lawngreen": [124, 252, 0],
1091
- "lemonchiffon": [255, 250, 205],
1092
- "lightblue": [173, 216, 230],
1093
- "lightcoral": [240, 128, 128],
1094
- "lightcyan": [224, 255, 255],
1095
- "lightgoldenrodyellow": [250, 250, 210],
1096
- "lightgray": [211, 211, 211],
1097
- "lightgreen": [144, 238, 144],
1098
- "lightgrey": [211, 211, 211],
1099
- "lightpink": [255, 182, 193],
1100
- "lightsalmon": [255, 160, 122],
1101
- "lightseagreen": [32, 178, 170],
1102
- "lightskyblue": [135, 206, 250],
1103
- "lightslategray": [119, 136, 153],
1104
- "lightslategrey": [119, 136, 153],
1105
- "lightsteelblue": [176, 196, 222],
1106
- "lightyellow": [255, 255, 224],
1107
- "lime": [0, 255, 0],
1108
- "limegreen": [50, 205, 50],
1109
- "linen": [250, 240, 230],
1110
- "magenta": [255, 0, 255],
1111
- "maroon": [128, 0, 0],
1112
- "mediumaquamarine": [102, 205, 170],
1113
- "mediumblue": [0, 0, 205],
1114
- "mediumorchid": [186, 85, 211],
1115
- "mediumpurple": [147, 112, 219],
1116
- "mediumseagreen": [60, 179, 113],
1117
- "mediumslateblue": [123, 104, 238],
1118
- "mediumspringgreen": [0, 250, 154],
1119
- "mediumturquoise": [72, 209, 204],
1120
- "mediumvioletred": [199, 21, 133],
1121
- "midnightblue": [25, 25, 112],
1122
- "mintcream": [245, 255, 250],
1123
- "mistyrose": [255, 228, 225],
1124
- "moccasin": [255, 228, 181],
1125
- "navajowhite": [255, 222, 173],
1126
- "navy": [0, 0, 128],
1127
- "oldlace": [253, 245, 230],
1128
- "olive": [128, 128, 0],
1129
- "olivedrab": [107, 142, 35],
1130
- "orange": [255, 165, 0],
1131
- "orangered": [255, 69, 0],
1132
- "orchid": [218, 112, 214],
1133
- "palegoldenrod": [238, 232, 170],
1134
- "palegreen": [152, 251, 152],
1135
- "paleturquoise": [175, 238, 238],
1136
- "palevioletred": [219, 112, 147],
1137
- "papayawhip": [255, 239, 213],
1138
- "peachpuff": [255, 218, 185],
1139
- "peru": [205, 133, 63],
1140
- "pink": [255, 192, 203],
1141
- "plum": [221, 160, 221],
1142
- "powderblue": [176, 224, 230],
1143
- "purple": [128, 0, 128],
1144
- "rebeccapurple": [102, 51, 153],
1145
- "red": [255, 0, 0],
1146
- "rosybrown": [188, 143, 143],
1147
- "royalblue": [65, 105, 225],
1148
- "saddlebrown": [139, 69, 19],
1149
- "salmon": [250, 128, 114],
1150
- "sandybrown": [244, 164, 96],
1151
- "seagreen": [46, 139, 87],
1152
- "seashell": [255, 245, 238],
1153
- "sienna": [160, 82, 45],
1154
- "silver": [192, 192, 192],
1155
- "skyblue": [135, 206, 235],
1156
- "slateblue": [106, 90, 205],
1157
- "slategray": [112, 128, 144],
1158
- "slategrey": [112, 128, 144],
1159
- "snow": [255, 250, 250],
1160
- "springgreen": [0, 255, 127],
1161
- "steelblue": [70, 130, 180],
1162
- "tan": [210, 180, 140],
1163
- "teal": [0, 128, 128],
1164
- "thistle": [216, 191, 216],
1165
- "tomato": [255, 99, 71],
1166
- "turquoise": [64, 224, 208],
1167
- "violet": [238, 130, 238],
1168
- "wheat": [245, 222, 179],
1169
- "white": [255, 255, 255],
1170
- "whitesmoke": [245, 245, 245],
1171
- "yellow": [255, 255, 0],
1172
- "yellowgreen": [154, 205, 50]
1173
- };
965
+ return 1;
966
+ }
967
+ var init_get_east_asian_width = __esm({
968
+ "node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js"() {
969
+ init_lookup();
970
+ __name(validate, "validate");
971
+ __name(eastAsianWidth, "eastAsianWidth");
1174
972
  }
1175
973
  });
1176
974
 
1177
- // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
1178
- var require_conversions = __commonJS({
1179
- "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports2, module2) {
1180
- var cssKeywords = require_color_name();
1181
- var reverseKeywords = {};
1182
- for (const key of Object.keys(cssKeywords)) {
1183
- reverseKeywords[cssKeywords[key]] = key;
1184
- }
1185
- var convert = {
1186
- rgb: { channels: 3, labels: "rgb" },
1187
- hsl: { channels: 3, labels: "hsl" },
1188
- hsv: { channels: 3, labels: "hsv" },
1189
- hwb: { channels: 3, labels: "hwb" },
1190
- cmyk: { channels: 4, labels: "cmyk" },
1191
- xyz: { channels: 3, labels: "xyz" },
1192
- lab: { channels: 3, labels: "lab" },
1193
- lch: { channels: 3, labels: "lch" },
1194
- hex: { channels: 1, labels: ["hex"] },
1195
- keyword: { channels: 1, labels: ["keyword"] },
1196
- ansi16: { channels: 1, labels: ["ansi16"] },
1197
- ansi256: { channels: 1, labels: ["ansi256"] },
1198
- hcg: { channels: 3, labels: ["h", "c", "g"] },
1199
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
1200
- gray: { channels: 1, labels: ["gray"] }
1201
- };
1202
- module2.exports = convert;
1203
- for (const model of Object.keys(convert)) {
1204
- if (!("channels" in convert[model])) {
1205
- throw new Error("missing channels property: " + model);
1206
- }
1207
- if (!("labels" in convert[model])) {
1208
- throw new Error("missing channel labels property: " + model);
1209
- }
1210
- if (convert[model].labels.length !== convert[model].channels) {
1211
- throw new Error("channel and label counts mismatch: " + model);
1212
- }
1213
- const { channels, labels } = convert[model];
1214
- delete convert[model].channels;
1215
- delete convert[model].labels;
1216
- Object.defineProperty(convert[model], "channels", { value: channels });
1217
- Object.defineProperty(convert[model], "labels", { value: labels });
1218
- }
1219
- convert.rgb.hsl = function(rgb) {
1220
- const r = rgb[0] / 255;
1221
- const g = rgb[1] / 255;
1222
- const b = rgb[2] / 255;
1223
- const min = Math.min(r, g, b);
1224
- const max = Math.max(r, g, b);
1225
- const delta = max - min;
1226
- let h;
1227
- let s;
1228
- if (max === min) {
1229
- h = 0;
1230
- } else if (r === max) {
1231
- h = (g - b) / delta;
1232
- } else if (g === max) {
1233
- h = 2 + (b - r) / delta;
1234
- } else if (b === max) {
1235
- h = 4 + (r - g) / delta;
1236
- }
1237
- h = Math.min(h * 60, 360);
1238
- if (h < 0) {
1239
- h += 360;
1240
- }
1241
- const l = (min + max) / 2;
1242
- if (max === min) {
1243
- s = 0;
1244
- } else if (l <= 0.5) {
1245
- s = delta / (max + min);
1246
- } else {
1247
- s = delta / (2 - max - min);
1248
- }
1249
- return [h, s * 100, l * 100];
1250
- };
1251
- convert.rgb.hsv = function(rgb) {
1252
- let rdif;
1253
- let gdif;
1254
- let bdif;
1255
- let h;
1256
- let s;
1257
- const r = rgb[0] / 255;
1258
- const g = rgb[1] / 255;
1259
- const b = rgb[2] / 255;
1260
- const v = Math.max(r, g, b);
1261
- const diff = v - Math.min(r, g, b);
1262
- const diffc = /* @__PURE__ */ __name(function(c) {
1263
- return (v - c) / 6 / diff + 1 / 2;
1264
- }, "diffc");
1265
- if (diff === 0) {
1266
- h = 0;
1267
- s = 0;
1268
- } else {
1269
- s = diff / v;
1270
- rdif = diffc(r);
1271
- gdif = diffc(g);
1272
- bdif = diffc(b);
1273
- if (r === v) {
1274
- h = bdif - gdif;
1275
- } else if (g === v) {
1276
- h = 1 / 3 + rdif - bdif;
1277
- } else if (b === v) {
1278
- h = 2 / 3 + gdif - rdif;
1279
- }
1280
- if (h < 0) {
1281
- h += 1;
1282
- } else if (h > 1) {
1283
- h -= 1;
1284
- }
975
+ // node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js
976
+ function baseVisible(segment) {
977
+ return segment.replace(leadingNonPrintingRegex, "");
978
+ }
979
+ function isZeroWidthCluster(segment) {
980
+ return zeroWidthClusterRegex.test(segment);
981
+ }
982
+ function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
983
+ let extra = 0;
984
+ if (segment.length > 1) {
985
+ for (const char of segment.slice(1)) {
986
+ if (char >= "＀" && char <= "") {
987
+ extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
1285
988
  }
1286
- return [
1287
- h * 360,
1288
- s * 100,
1289
- v * 100
1290
- ];
1291
- };
1292
- convert.rgb.hwb = function(rgb) {
1293
- const r = rgb[0];
1294
- const g = rgb[1];
1295
- let b = rgb[2];
1296
- const h = convert.rgb.hsl(rgb)[0];
1297
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
1298
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
1299
- return [h, w * 100, b * 100];
1300
- };
1301
- convert.rgb.cmyk = function(rgb) {
1302
- const r = rgb[0] / 255;
1303
- const g = rgb[1] / 255;
1304
- const b = rgb[2] / 255;
1305
- const k = Math.min(1 - r, 1 - g, 1 - b);
1306
- const c = (1 - r - k) / (1 - k) || 0;
1307
- const m = (1 - g - k) / (1 - k) || 0;
1308
- const y = (1 - b - k) / (1 - k) || 0;
1309
- return [c * 100, m * 100, y * 100, k * 100];
1310
- };
1311
- function comparativeDistance(x, y) {
1312
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
1313
989
  }
1314
- __name(comparativeDistance, "comparativeDistance");
1315
- convert.rgb.keyword = function(rgb) {
1316
- const reversed = reverseKeywords[rgb];
1317
- if (reversed) {
1318
- return reversed;
1319
- }
1320
- let currentClosestDistance = Infinity;
1321
- let currentClosestKeyword;
1322
- for (const keyword of Object.keys(cssKeywords)) {
1323
- const value = cssKeywords[keyword];
1324
- const distance = comparativeDistance(rgb, value);
1325
- if (distance < currentClosestDistance) {
1326
- currentClosestDistance = distance;
1327
- currentClosestKeyword = keyword;
1328
- }
1329
- }
1330
- return currentClosestKeyword;
1331
- };
1332
- convert.keyword.rgb = function(keyword) {
1333
- return cssKeywords[keyword];
1334
- };
1335
- convert.rgb.xyz = function(rgb) {
1336
- let r = rgb[0] / 255;
1337
- let g = rgb[1] / 255;
1338
- let b = rgb[2] / 255;
1339
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
1340
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
1341
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
1342
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
1343
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
1344
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
1345
- return [x * 100, y * 100, z * 100];
1346
- };
1347
- convert.rgb.lab = function(rgb) {
1348
- const xyz = convert.rgb.xyz(rgb);
1349
- let x = xyz[0];
1350
- let y = xyz[1];
1351
- let z = xyz[2];
1352
- x /= 95.047;
1353
- y /= 100;
1354
- z /= 108.883;
1355
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1356
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1357
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1358
- const l = 116 * y - 16;
1359
- const a = 500 * (x - y);
1360
- const b = 200 * (y - z);
1361
- return [l, a, b];
1362
- };
1363
- convert.hsl.rgb = function(hsl) {
1364
- const h = hsl[0] / 360;
1365
- const s = hsl[1] / 100;
1366
- const l = hsl[2] / 100;
1367
- let t2;
1368
- let t3;
1369
- let val;
1370
- if (s === 0) {
1371
- val = l * 255;
1372
- return [val, val, val];
1373
- }
1374
- if (l < 0.5) {
1375
- t2 = l * (1 + s);
1376
- } else {
1377
- t2 = l + s - l * s;
1378
- }
1379
- const t1 = 2 * l - t2;
1380
- const rgb = [0, 0, 0];
1381
- for (let i = 0; i < 3; i++) {
1382
- t3 = h + 1 / 3 * -(i - 1);
1383
- if (t3 < 0) {
1384
- t3++;
1385
- }
1386
- if (t3 > 1) {
1387
- t3--;
1388
- }
1389
- if (6 * t3 < 1) {
1390
- val = t1 + (t2 - t1) * 6 * t3;
1391
- } else if (2 * t3 < 1) {
1392
- val = t2;
1393
- } else if (3 * t3 < 2) {
1394
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1395
- } else {
1396
- val = t1;
1397
- }
1398
- rgb[i] = val * 255;
1399
- }
1400
- return rgb;
1401
- };
1402
- convert.hsl.hsv = function(hsl) {
1403
- const h = hsl[0];
1404
- let s = hsl[1] / 100;
1405
- let l = hsl[2] / 100;
1406
- let smin = s;
1407
- const lmin = Math.max(l, 0.01);
1408
- l *= 2;
1409
- s *= l <= 1 ? l : 2 - l;
1410
- smin *= lmin <= 1 ? lmin : 2 - lmin;
1411
- const v = (l + s) / 2;
1412
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
1413
- return [h, sv * 100, v * 100];
1414
- };
1415
- convert.hsv.rgb = function(hsv) {
1416
- const h = hsv[0] / 60;
1417
- const s = hsv[1] / 100;
1418
- let v = hsv[2] / 100;
1419
- const hi = Math.floor(h) % 6;
1420
- const f = h - Math.floor(h);
1421
- const p = 255 * v * (1 - s);
1422
- const q = 255 * v * (1 - s * f);
1423
- const t = 255 * v * (1 - s * (1 - f));
1424
- v *= 255;
1425
- switch (hi) {
1426
- case 0:
1427
- return [v, t, p];
1428
- case 1:
1429
- return [q, v, p];
1430
- case 2:
1431
- return [p, v, t];
1432
- case 3:
1433
- return [p, q, v];
1434
- case 4:
1435
- return [t, p, v];
1436
- case 5:
1437
- return [v, p, q];
1438
- }
1439
- };
1440
- convert.hsv.hsl = function(hsv) {
1441
- const h = hsv[0];
1442
- const s = hsv[1] / 100;
1443
- const v = hsv[2] / 100;
1444
- const vmin = Math.max(v, 0.01);
1445
- let sl;
1446
- let l;
1447
- l = (2 - s) * v;
1448
- const lmin = (2 - s) * vmin;
1449
- sl = s * vmin;
1450
- sl /= lmin <= 1 ? lmin : 2 - lmin;
1451
- sl = sl || 0;
1452
- l /= 2;
1453
- return [h, sl * 100, l * 100];
1454
- };
1455
- convert.hwb.rgb = function(hwb) {
1456
- const h = hwb[0] / 360;
1457
- let wh = hwb[1] / 100;
1458
- let bl = hwb[2] / 100;
1459
- const ratio = wh + bl;
1460
- let f;
1461
- if (ratio > 1) {
1462
- wh /= ratio;
1463
- bl /= ratio;
1464
- }
1465
- const i = Math.floor(6 * h);
1466
- const v = 1 - bl;
1467
- f = 6 * h - i;
1468
- if ((i & 1) !== 0) {
1469
- f = 1 - f;
1470
- }
1471
- const n = wh + f * (v - wh);
1472
- let r;
1473
- let g;
1474
- let b;
1475
- switch (i) {
1476
- default:
1477
- case 6:
1478
- case 0:
1479
- r = v;
1480
- g = n;
1481
- b = wh;
1482
- break;
1483
- case 1:
1484
- r = n;
1485
- g = v;
1486
- b = wh;
1487
- break;
1488
- case 2:
1489
- r = wh;
1490
- g = v;
1491
- b = n;
1492
- break;
1493
- case 3:
1494
- r = wh;
1495
- g = n;
1496
- b = v;
1497
- break;
1498
- case 4:
1499
- r = n;
1500
- g = wh;
1501
- b = v;
1502
- break;
1503
- case 5:
1504
- r = v;
1505
- g = wh;
1506
- b = n;
1507
- break;
1508
- }
1509
- return [r * 255, g * 255, b * 255];
1510
- };
1511
- convert.cmyk.rgb = function(cmyk) {
1512
- const c = cmyk[0] / 100;
1513
- const m = cmyk[1] / 100;
1514
- const y = cmyk[2] / 100;
1515
- const k = cmyk[3] / 100;
1516
- const r = 1 - Math.min(1, c * (1 - k) + k);
1517
- const g = 1 - Math.min(1, m * (1 - k) + k);
1518
- const b = 1 - Math.min(1, y * (1 - k) + k);
1519
- return [r * 255, g * 255, b * 255];
1520
- };
1521
- convert.xyz.rgb = function(xyz) {
1522
- const x = xyz[0] / 100;
1523
- const y = xyz[1] / 100;
1524
- const z = xyz[2] / 100;
1525
- let r;
1526
- let g;
1527
- let b;
1528
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
1529
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
1530
- b = x * 0.0557 + y * -0.204 + z * 1.057;
1531
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
1532
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
1533
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
1534
- r = Math.min(Math.max(0, r), 1);
1535
- g = Math.min(Math.max(0, g), 1);
1536
- b = Math.min(Math.max(0, b), 1);
1537
- return [r * 255, g * 255, b * 255];
1538
- };
1539
- convert.xyz.lab = function(xyz) {
1540
- let x = xyz[0];
1541
- let y = xyz[1];
1542
- let z = xyz[2];
1543
- x /= 95.047;
1544
- y /= 100;
1545
- z /= 108.883;
1546
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1547
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1548
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1549
- const l = 116 * y - 16;
1550
- const a = 500 * (x - y);
1551
- const b = 200 * (y - z);
1552
- return [l, a, b];
1553
- };
1554
- convert.lab.xyz = function(lab) {
1555
- const l = lab[0];
1556
- const a = lab[1];
1557
- const b = lab[2];
1558
- let x;
1559
- let y;
1560
- let z;
1561
- y = (l + 16) / 116;
1562
- x = a / 500 + y;
1563
- z = y - b / 200;
1564
- const y2 = y ** 3;
1565
- const x2 = x ** 3;
1566
- const z2 = z ** 3;
1567
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
1568
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
1569
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
1570
- x *= 95.047;
1571
- y *= 100;
1572
- z *= 108.883;
1573
- return [x, y, z];
1574
- };
1575
- convert.lab.lch = function(lab) {
1576
- const l = lab[0];
1577
- const a = lab[1];
1578
- const b = lab[2];
1579
- let h;
1580
- const hr = Math.atan2(b, a);
1581
- h = hr * 360 / 2 / Math.PI;
1582
- if (h < 0) {
1583
- h += 360;
1584
- }
1585
- const c = Math.sqrt(a * a + b * b);
1586
- return [l, c, h];
1587
- };
1588
- convert.lch.lab = function(lch) {
1589
- const l = lch[0];
1590
- const c = lch[1];
1591
- const h = lch[2];
1592
- const hr = h / 360 * 2 * Math.PI;
1593
- const a = c * Math.cos(hr);
1594
- const b = c * Math.sin(hr);
1595
- return [l, a, b];
1596
- };
1597
- convert.rgb.ansi16 = function(args, saturation = null) {
1598
- const [r, g, b] = args;
1599
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
1600
- value = Math.round(value / 50);
1601
- if (value === 0) {
1602
- return 30;
1603
- }
1604
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1605
- if (value === 2) {
1606
- ansi += 60;
1607
- }
1608
- return ansi;
1609
- };
1610
- convert.hsv.ansi16 = function(args) {
1611
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
1612
- };
1613
- convert.rgb.ansi256 = function(args) {
1614
- const r = args[0];
1615
- const g = args[1];
1616
- const b = args[2];
1617
- if (r === g && g === b) {
1618
- if (r < 8) {
1619
- return 16;
1620
- }
1621
- if (r > 248) {
1622
- return 231;
1623
- }
1624
- return Math.round((r - 8) / 247 * 24) + 232;
1625
- }
1626
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1627
- return ansi;
1628
- };
1629
- convert.ansi16.rgb = function(args) {
1630
- let color = args % 10;
1631
- if (color === 0 || color === 7) {
1632
- if (args > 50) {
1633
- color += 3.5;
1634
- }
1635
- color = color / 10.5 * 255;
1636
- return [color, color, color];
1637
- }
1638
- const mult = (~~(args > 50) + 1) * 0.5;
1639
- const r = (color & 1) * mult * 255;
1640
- const g = (color >> 1 & 1) * mult * 255;
1641
- const b = (color >> 2 & 1) * mult * 255;
1642
- return [r, g, b];
1643
- };
1644
- convert.ansi256.rgb = function(args) {
1645
- if (args >= 232) {
1646
- const c = (args - 232) * 10 + 8;
1647
- return [c, c, c];
1648
- }
1649
- args -= 16;
1650
- let rem;
1651
- const r = Math.floor(args / 36) / 5 * 255;
1652
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
1653
- const b = rem % 6 / 5 * 255;
1654
- return [r, g, b];
1655
- };
1656
- convert.rgb.hex = function(args) {
1657
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
1658
- const string = integer.toString(16).toUpperCase();
1659
- return "000000".substring(string.length) + string;
1660
- };
1661
- convert.hex.rgb = function(args) {
1662
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1663
- if (!match) {
1664
- return [0, 0, 0];
1665
- }
1666
- let colorString = match[0];
1667
- if (match[0].length === 3) {
1668
- colorString = colorString.split("").map((char) => {
1669
- return char + char;
1670
- }).join("");
1671
- }
1672
- const integer = parseInt(colorString, 16);
1673
- const r = integer >> 16 & 255;
1674
- const g = integer >> 8 & 255;
1675
- const b = integer & 255;
1676
- return [r, g, b];
1677
- };
1678
- convert.rgb.hcg = function(rgb) {
1679
- const r = rgb[0] / 255;
1680
- const g = rgb[1] / 255;
1681
- const b = rgb[2] / 255;
1682
- const max = Math.max(Math.max(r, g), b);
1683
- const min = Math.min(Math.min(r, g), b);
1684
- const chroma = max - min;
1685
- let grayscale;
1686
- let hue;
1687
- if (chroma < 1) {
1688
- grayscale = min / (1 - chroma);
1689
- } else {
1690
- grayscale = 0;
1691
- }
1692
- if (chroma <= 0) {
1693
- hue = 0;
1694
- } else if (max === r) {
1695
- hue = (g - b) / chroma % 6;
1696
- } else if (max === g) {
1697
- hue = 2 + (b - r) / chroma;
1698
- } else {
1699
- hue = 4 + (r - g) / chroma;
1700
- }
1701
- hue /= 6;
1702
- hue %= 1;
1703
- return [hue * 360, chroma * 100, grayscale * 100];
1704
- };
1705
- convert.hsl.hcg = function(hsl) {
1706
- const s = hsl[1] / 100;
1707
- const l = hsl[2] / 100;
1708
- const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
1709
- let f = 0;
1710
- if (c < 1) {
1711
- f = (l - 0.5 * c) / (1 - c);
1712
- }
1713
- return [hsl[0], c * 100, f * 100];
1714
- };
1715
- convert.hsv.hcg = function(hsv) {
1716
- const s = hsv[1] / 100;
1717
- const v = hsv[2] / 100;
1718
- const c = s * v;
1719
- let f = 0;
1720
- if (c < 1) {
1721
- f = (v - c) / (1 - c);
1722
- }
1723
- return [hsv[0], c * 100, f * 100];
1724
- };
1725
- convert.hcg.rgb = function(hcg) {
1726
- const h = hcg[0] / 360;
1727
- const c = hcg[1] / 100;
1728
- const g = hcg[2] / 100;
1729
- if (c === 0) {
1730
- return [g * 255, g * 255, g * 255];
1731
- }
1732
- const pure = [0, 0, 0];
1733
- const hi = h % 1 * 6;
1734
- const v = hi % 1;
1735
- const w = 1 - v;
1736
- let mg = 0;
1737
- switch (Math.floor(hi)) {
1738
- case 0:
1739
- pure[0] = 1;
1740
- pure[1] = v;
1741
- pure[2] = 0;
1742
- break;
1743
- case 1:
1744
- pure[0] = w;
1745
- pure[1] = 1;
1746
- pure[2] = 0;
1747
- break;
1748
- case 2:
1749
- pure[0] = 0;
1750
- pure[1] = 1;
1751
- pure[2] = v;
1752
- break;
1753
- case 3:
1754
- pure[0] = 0;
1755
- pure[1] = w;
1756
- pure[2] = 1;
1757
- break;
1758
- case 4:
1759
- pure[0] = v;
1760
- pure[1] = 0;
1761
- pure[2] = 1;
1762
- break;
1763
- default:
1764
- pure[0] = 1;
1765
- pure[1] = 0;
1766
- pure[2] = w;
1767
- }
1768
- mg = (1 - c) * g;
1769
- return [
1770
- (c * pure[0] + mg) * 255,
1771
- (c * pure[1] + mg) * 255,
1772
- (c * pure[2] + mg) * 255
1773
- ];
1774
- };
1775
- convert.hcg.hsv = function(hcg) {
1776
- const c = hcg[1] / 100;
1777
- const g = hcg[2] / 100;
1778
- const v = c + g * (1 - c);
1779
- let f = 0;
1780
- if (v > 0) {
1781
- f = c / v;
1782
- }
1783
- return [hcg[0], f * 100, v * 100];
1784
- };
1785
- convert.hcg.hsl = function(hcg) {
1786
- const c = hcg[1] / 100;
1787
- const g = hcg[2] / 100;
1788
- const l = g * (1 - c) + 0.5 * c;
1789
- let s = 0;
1790
- if (l > 0 && l < 0.5) {
1791
- s = c / (2 * l);
1792
- } else if (l >= 0.5 && l < 1) {
1793
- s = c / (2 * (1 - l));
1794
- }
1795
- return [hcg[0], s * 100, l * 100];
1796
- };
1797
- convert.hcg.hwb = function(hcg) {
1798
- const c = hcg[1] / 100;
1799
- const g = hcg[2] / 100;
1800
- const v = c + g * (1 - c);
1801
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
1802
- };
1803
- convert.hwb.hcg = function(hwb) {
1804
- const w = hwb[1] / 100;
1805
- const b = hwb[2] / 100;
1806
- const v = 1 - b;
1807
- const c = v - w;
1808
- let g = 0;
1809
- if (c < 1) {
1810
- g = (v - c) / (1 - c);
1811
- }
1812
- return [hwb[0], c * 100, g * 100];
1813
- };
1814
- convert.apple.rgb = function(apple) {
1815
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
1816
- };
1817
- convert.rgb.apple = function(rgb) {
1818
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
1819
- };
1820
- convert.gray.rgb = function(args) {
1821
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
1822
- };
1823
- convert.gray.hsl = function(args) {
1824
- return [0, 0, args[0]];
1825
- };
1826
- convert.gray.hsv = convert.gray.hsl;
1827
- convert.gray.hwb = function(gray) {
1828
- return [0, 100, gray[0]];
1829
- };
1830
- convert.gray.cmyk = function(gray) {
1831
- return [0, 0, 0, gray[0]];
1832
- };
1833
- convert.gray.lab = function(gray) {
1834
- return [gray[0], 0, 0];
1835
- };
1836
- convert.gray.hex = function(gray) {
1837
- const val = Math.round(gray[0] / 100 * 255) & 255;
1838
- const integer = (val << 16) + (val << 8) + val;
1839
- const string = integer.toString(16).toUpperCase();
1840
- return "000000".substring(string.length) + string;
1841
- };
1842
- convert.rgb.gray = function(rgb) {
1843
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1844
- return [val / 255 * 100];
1845
- };
1846
990
  }
1847
- });
1848
-
1849
- // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
1850
- var require_route = __commonJS({
1851
- "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports2, module2) {
1852
- var conversions = require_conversions();
1853
- function buildGraph() {
1854
- const graph = {};
1855
- const models = Object.keys(conversions);
1856
- for (let len = models.length, i = 0; i < len; i++) {
1857
- graph[models[i]] = {
1858
- // http://jsperf.com/1-vs-infinity
1859
- // micro-opt, but this is simple.
1860
- distance: -1,
1861
- parent: null
1862
- };
1863
- }
1864
- return graph;
1865
- }
1866
- __name(buildGraph, "buildGraph");
1867
- function deriveBFS(fromModel) {
1868
- const graph = buildGraph();
1869
- const queue = [fromModel];
1870
- graph[fromModel].distance = 0;
1871
- while (queue.length) {
1872
- const current = queue.pop();
1873
- const adjacents = Object.keys(conversions[current]);
1874
- for (let len = adjacents.length, i = 0; i < len; i++) {
1875
- const adjacent = adjacents[i];
1876
- const node = graph[adjacent];
1877
- if (node.distance === -1) {
1878
- node.distance = graph[current].distance + 1;
1879
- node.parent = current;
1880
- queue.unshift(adjacent);
1881
- }
1882
- }
1883
- }
1884
- return graph;
1885
- }
1886
- __name(deriveBFS, "deriveBFS");
1887
- function link(from, to) {
1888
- return function(args) {
1889
- return to(from(args));
1890
- };
991
+ return extra;
992
+ }
993
+ function stringWidth(input, options = {}) {
994
+ if (typeof input !== "string" || input.length === 0) {
995
+ return 0;
996
+ }
997
+ const {
998
+ ambiguousIsNarrow = true,
999
+ countAnsiEscapeCodes = false
1000
+ } = options;
1001
+ let string = input;
1002
+ if (!countAnsiEscapeCodes) {
1003
+ string = stripAnsi(string);
1004
+ }
1005
+ if (string.length === 0) {
1006
+ return 0;
1007
+ }
1008
+ let width = 0;
1009
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
1010
+ for (const { segment } of segmenter.segment(string)) {
1011
+ if (isZeroWidthCluster(segment)) {
1012
+ continue;
1891
1013
  }
1892
- __name(link, "link");
1893
- function wrapConversion(toModel, graph) {
1894
- const path = [graph[toModel].parent, toModel];
1895
- let fn = conversions[graph[toModel].parent][toModel];
1896
- let cur = graph[toModel].parent;
1897
- while (graph[cur].parent) {
1898
- path.unshift(graph[cur].parent);
1899
- fn = link(conversions[graph[cur].parent][cur], fn);
1900
- cur = graph[cur].parent;
1901
- }
1902
- fn.conversion = path;
1903
- return fn;
1014
+ if (rgiEmojiRegex.test(segment)) {
1015
+ width += 2;
1016
+ continue;
1904
1017
  }
1905
- __name(wrapConversion, "wrapConversion");
1906
- module2.exports = function(fromModel) {
1907
- const graph = deriveBFS(fromModel);
1908
- const conversion = {};
1909
- const models = Object.keys(graph);
1910
- for (let len = models.length, i = 0; i < len; i++) {
1911
- const toModel = models[i];
1912
- const node = graph[toModel];
1913
- if (node.parent === null) {
1914
- continue;
1915
- }
1916
- conversion[toModel] = wrapConversion(toModel, graph);
1917
- }
1918
- return conversion;
1919
- };
1018
+ const codePoint = baseVisible(segment).codePointAt(0);
1019
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
1020
+ width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
1021
+ }
1022
+ return width;
1023
+ }
1024
+ var segmenter, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex;
1025
+ var init_string_width = __esm({
1026
+ "node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js"() {
1027
+ init_strip_ansi();
1028
+ init_get_east_asian_width();
1029
+ segmenter = new Intl.Segmenter();
1030
+ zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$", "v");
1031
+ leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
1032
+ rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
1033
+ __name(baseVisible, "baseVisible");
1034
+ __name(isZeroWidthCluster, "isZeroWidthCluster");
1035
+ __name(trailingHalfwidthWidth, "trailingHalfwidthWidth");
1036
+ __name(stringWidth, "stringWidth");
1920
1037
  }
1921
1038
  });
1922
1039
 
1923
- // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
1924
- var require_color_convert = __commonJS({
1925
- "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports2, module2) {
1926
- var conversions = require_conversions();
1927
- var route = require_route();
1928
- var convert = {};
1929
- var models = Object.keys(conversions);
1930
- function wrapRaw(fn) {
1931
- const wrappedFn = /* @__PURE__ */ __name(function(...args) {
1932
- const arg0 = args[0];
1933
- if (arg0 === void 0 || arg0 === null) {
1934
- return arg0;
1935
- }
1936
- if (arg0.length > 1) {
1937
- args = arg0;
1938
- }
1939
- return fn(args);
1940
- }, "wrappedFn");
1941
- if ("conversion" in fn) {
1942
- wrappedFn.conversion = fn.conversion;
1943
- }
1944
- return wrappedFn;
1945
- }
1946
- __name(wrapRaw, "wrapRaw");
1947
- function wrapRounded(fn) {
1948
- const wrappedFn = /* @__PURE__ */ __name(function(...args) {
1949
- const arg0 = args[0];
1950
- if (arg0 === void 0 || arg0 === null) {
1951
- return arg0;
1952
- }
1953
- if (arg0.length > 1) {
1954
- args = arg0;
1955
- }
1956
- const result = fn(args);
1957
- if (typeof result === "object") {
1958
- for (let len = result.length, i = 0; i < len; i++) {
1959
- result[i] = Math.round(result[i]);
1960
- }
1961
- }
1962
- return result;
1963
- }, "wrappedFn");
1964
- if ("conversion" in fn) {
1965
- wrappedFn.conversion = fn.conversion;
1966
- }
1967
- return wrappedFn;
1040
+ // node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
1041
+ function assembleStyles() {
1042
+ const codes = /* @__PURE__ */ new Map();
1043
+ for (const [groupName, group] of Object.entries(styles)) {
1044
+ for (const [styleName, style] of Object.entries(group)) {
1045
+ styles[styleName] = {
1046
+ open: `\x1B[${style[0]}m`,
1047
+ close: `\x1B[${style[1]}m`
1048
+ };
1049
+ group[styleName] = styles[styleName];
1050
+ codes.set(style[0], style[1]);
1968
1051
  }
1969
- __name(wrapRounded, "wrapRounded");
1970
- models.forEach((fromModel) => {
1971
- convert[fromModel] = {};
1972
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1973
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1974
- const routes = route(fromModel);
1975
- const routeModels = Object.keys(routes);
1976
- routeModels.forEach((toModel) => {
1977
- const fn = routes[toModel];
1978
- convert[fromModel][toModel] = wrapRounded(fn);
1979
- convert[fromModel][toModel].raw = wrapRaw(fn);
1980
- });
1052
+ Object.defineProperty(styles, groupName, {
1053
+ value: group,
1054
+ enumerable: false
1981
1055
  });
1982
- module2.exports = convert;
1983
1056
  }
1984
- });
1985
-
1986
- // node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js
1987
- var require_ansi_styles = __commonJS({
1988
- "node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports2, module2) {
1989
- "use strict";
1990
- var wrapAnsi16 = /* @__PURE__ */ __name((fn, offset) => (...args) => {
1991
- const code = fn(...args);
1992
- return `\x1B[${code + offset}m`;
1993
- }, "wrapAnsi16");
1994
- var wrapAnsi256 = /* @__PURE__ */ __name((fn, offset) => (...args) => {
1995
- const code = fn(...args);
1996
- return `\x1B[${38 + offset};5;${code}m`;
1997
- }, "wrapAnsi256");
1998
- var wrapAnsi16m = /* @__PURE__ */ __name((fn, offset) => (...args) => {
1999
- const rgb = fn(...args);
2000
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
2001
- }, "wrapAnsi16m");
2002
- var ansi2ansi = /* @__PURE__ */ __name((n) => n, "ansi2ansi");
2003
- var rgb2rgb = /* @__PURE__ */ __name((r, g, b) => [r, g, b], "rgb2rgb");
2004
- var setLazyProperty = /* @__PURE__ */ __name((object, property, get) => {
2005
- Object.defineProperty(object, property, {
2006
- get: /* @__PURE__ */ __name(() => {
2007
- const value = get();
2008
- Object.defineProperty(object, property, {
2009
- value,
2010
- enumerable: true,
2011
- configurable: true
2012
- });
2013
- return value;
2014
- }, "get"),
2015
- enumerable: true,
2016
- configurable: true
2017
- });
2018
- }, "setLazyProperty");
2019
- var colorConvert;
2020
- var makeDynamicStyles = /* @__PURE__ */ __name((wrap, targetSpace, identity, isBackground) => {
2021
- if (colorConvert === void 0) {
2022
- colorConvert = require_color_convert();
2023
- }
2024
- const offset = isBackground ? 10 : 0;
2025
- const styles = {};
2026
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
2027
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
2028
- if (sourceSpace === targetSpace) {
2029
- styles[name] = wrap(identity, offset);
2030
- } else if (typeof suite === "object") {
2031
- styles[name] = wrap(suite[targetSpace], offset);
2032
- }
2033
- }
2034
- return styles;
2035
- }, "makeDynamicStyles");
2036
- function assembleStyles() {
2037
- const codes = /* @__PURE__ */ new Map();
2038
- const styles = {
2039
- modifier: {
2040
- reset: [0, 0],
2041
- // 21 isn't widely supported and 22 does the same thing
2042
- bold: [1, 22],
2043
- dim: [2, 22],
2044
- italic: [3, 23],
2045
- underline: [4, 24],
2046
- inverse: [7, 27],
2047
- hidden: [8, 28],
2048
- strikethrough: [9, 29]
2049
- },
2050
- color: {
2051
- black: [30, 39],
2052
- red: [31, 39],
2053
- green: [32, 39],
2054
- yellow: [33, 39],
2055
- blue: [34, 39],
2056
- magenta: [35, 39],
2057
- cyan: [36, 39],
2058
- white: [37, 39],
2059
- // Bright color
2060
- blackBright: [90, 39],
2061
- redBright: [91, 39],
2062
- greenBright: [92, 39],
2063
- yellowBright: [93, 39],
2064
- blueBright: [94, 39],
2065
- magentaBright: [95, 39],
2066
- cyanBright: [96, 39],
2067
- whiteBright: [97, 39]
2068
- },
2069
- bgColor: {
2070
- bgBlack: [40, 49],
2071
- bgRed: [41, 49],
2072
- bgGreen: [42, 49],
2073
- bgYellow: [43, 49],
2074
- bgBlue: [44, 49],
2075
- bgMagenta: [45, 49],
2076
- bgCyan: [46, 49],
2077
- bgWhite: [47, 49],
2078
- // Bright color
2079
- bgBlackBright: [100, 49],
2080
- bgRedBright: [101, 49],
2081
- bgGreenBright: [102, 49],
2082
- bgYellowBright: [103, 49],
2083
- bgBlueBright: [104, 49],
2084
- bgMagentaBright: [105, 49],
2085
- bgCyanBright: [106, 49],
2086
- bgWhiteBright: [107, 49]
1057
+ Object.defineProperty(styles, "codes", {
1058
+ value: codes,
1059
+ enumerable: false
1060
+ });
1061
+ styles.color.close = "\x1B[39m";
1062
+ styles.bgColor.close = "\x1B[49m";
1063
+ styles.color.ansi = wrapAnsi16();
1064
+ styles.color.ansi256 = wrapAnsi256();
1065
+ styles.color.ansi16m = wrapAnsi16m();
1066
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
1067
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
1068
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
1069
+ Object.defineProperties(styles, {
1070
+ rgbToAnsi256: {
1071
+ value(red, green, blue) {
1072
+ if (red === green && green === blue) {
1073
+ if (red < 8) {
1074
+ return 16;
1075
+ }
1076
+ if (red > 248) {
1077
+ return 231;
1078
+ }
1079
+ return Math.round((red - 8) / 247 * 24) + 232;
2087
1080
  }
2088
- };
2089
- styles.color.gray = styles.color.blackBright;
2090
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
2091
- styles.color.grey = styles.color.blackBright;
2092
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
2093
- for (const [groupName, group] of Object.entries(styles)) {
2094
- for (const [styleName, style] of Object.entries(group)) {
2095
- styles[styleName] = {
2096
- open: `\x1B[${style[0]}m`,
2097
- close: `\x1B[${style[1]}m`
2098
- };
2099
- group[styleName] = styles[styleName];
2100
- codes.set(style[0], style[1]);
1081
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1082
+ },
1083
+ enumerable: false
1084
+ },
1085
+ hexToRgb: {
1086
+ value(hex) {
1087
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
1088
+ if (!matches) {
1089
+ return [0, 0, 0];
1090
+ }
1091
+ let [colorString] = matches;
1092
+ if (colorString.length === 3) {
1093
+ colorString = [...colorString].map((character) => character + character).join("");
1094
+ }
1095
+ const integer = Number.parseInt(colorString, 16);
1096
+ return [
1097
+ /* eslint-disable no-bitwise */
1098
+ integer >> 16 & 255,
1099
+ integer >> 8 & 255,
1100
+ integer & 255
1101
+ /* eslint-enable no-bitwise */
1102
+ ];
1103
+ },
1104
+ enumerable: false
1105
+ },
1106
+ hexToAnsi256: {
1107
+ value: /* @__PURE__ */ __name((hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), "value"),
1108
+ enumerable: false
1109
+ },
1110
+ ansi256ToAnsi: {
1111
+ value(code) {
1112
+ if (code < 8) {
1113
+ return 30 + code;
1114
+ }
1115
+ if (code < 16) {
1116
+ return 90 + (code - 8);
1117
+ }
1118
+ let red;
1119
+ let green;
1120
+ let blue;
1121
+ if (code >= 232) {
1122
+ red = ((code - 232) * 10 + 8) / 255;
1123
+ green = red;
1124
+ blue = red;
1125
+ } else {
1126
+ code -= 16;
1127
+ const remainder = code % 36;
1128
+ red = Math.floor(code / 36) / 5;
1129
+ green = Math.floor(remainder / 6) / 5;
1130
+ blue = remainder % 6 / 5;
2101
1131
  }
2102
- Object.defineProperty(styles, groupName, {
2103
- value: group,
2104
- enumerable: false
2105
- });
2106
- }
2107
- Object.defineProperty(styles, "codes", {
2108
- value: codes,
2109
- enumerable: false
2110
- });
2111
- styles.color.close = "\x1B[39m";
2112
- styles.bgColor.close = "\x1B[49m";
2113
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
2114
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
2115
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
2116
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
2117
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
2118
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
2119
- return styles;
1132
+ const value = Math.max(red, green, blue) * 2;
1133
+ if (value === 0) {
1134
+ return 30;
1135
+ }
1136
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1137
+ if (value === 2) {
1138
+ result += 60;
1139
+ }
1140
+ return result;
1141
+ },
1142
+ enumerable: false
1143
+ },
1144
+ rgbToAnsi: {
1145
+ value: /* @__PURE__ */ __name((red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), "value"),
1146
+ enumerable: false
1147
+ },
1148
+ hexToAnsi: {
1149
+ value: /* @__PURE__ */ __name((hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), "value"),
1150
+ enumerable: false
2120
1151
  }
1152
+ });
1153
+ return styles;
1154
+ }
1155
+ var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
1156
+ var init_ansi_styles = __esm({
1157
+ "node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js"() {
1158
+ ANSI_BACKGROUND_OFFSET = 10;
1159
+ wrapAnsi16 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${code + offset}m`, "wrapAnsi16");
1160
+ wrapAnsi256 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, "wrapAnsi256");
1161
+ wrapAnsi16m = /* @__PURE__ */ __name((offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, "wrapAnsi16m");
1162
+ styles = {
1163
+ modifier: {
1164
+ reset: [0, 0],
1165
+ // 21 isn't widely supported and 22 does the same thing
1166
+ bold: [1, 22],
1167
+ dim: [2, 22],
1168
+ italic: [3, 23],
1169
+ underline: [4, 24],
1170
+ overline: [53, 55],
1171
+ inverse: [7, 27],
1172
+ hidden: [8, 28],
1173
+ strikethrough: [9, 29]
1174
+ },
1175
+ color: {
1176
+ black: [30, 39],
1177
+ red: [31, 39],
1178
+ green: [32, 39],
1179
+ yellow: [33, 39],
1180
+ blue: [34, 39],
1181
+ magenta: [35, 39],
1182
+ cyan: [36, 39],
1183
+ white: [37, 39],
1184
+ // Bright color
1185
+ blackBright: [90, 39],
1186
+ gray: [90, 39],
1187
+ // Alias of `blackBright`
1188
+ grey: [90, 39],
1189
+ // Alias of `blackBright`
1190
+ redBright: [91, 39],
1191
+ greenBright: [92, 39],
1192
+ yellowBright: [93, 39],
1193
+ blueBright: [94, 39],
1194
+ magentaBright: [95, 39],
1195
+ cyanBright: [96, 39],
1196
+ whiteBright: [97, 39]
1197
+ },
1198
+ bgColor: {
1199
+ bgBlack: [40, 49],
1200
+ bgRed: [41, 49],
1201
+ bgGreen: [42, 49],
1202
+ bgYellow: [43, 49],
1203
+ bgBlue: [44, 49],
1204
+ bgMagenta: [45, 49],
1205
+ bgCyan: [46, 49],
1206
+ bgWhite: [47, 49],
1207
+ // Bright color
1208
+ bgBlackBright: [100, 49],
1209
+ bgGray: [100, 49],
1210
+ // Alias of `bgBlackBright`
1211
+ bgGrey: [100, 49],
1212
+ // Alias of `bgBlackBright`
1213
+ bgRedBright: [101, 49],
1214
+ bgGreenBright: [102, 49],
1215
+ bgYellowBright: [103, 49],
1216
+ bgBlueBright: [104, 49],
1217
+ bgMagentaBright: [105, 49],
1218
+ bgCyanBright: [106, 49],
1219
+ bgWhiteBright: [107, 49]
1220
+ }
1221
+ };
1222
+ modifierNames = Object.keys(styles.modifier);
1223
+ foregroundColorNames = Object.keys(styles.color);
1224
+ backgroundColorNames = Object.keys(styles.bgColor);
1225
+ colorNames = [...foregroundColorNames, ...backgroundColorNames];
2121
1226
  __name(assembleStyles, "assembleStyles");
2122
- Object.defineProperty(module2, "exports", {
2123
- enumerable: true,
2124
- get: assembleStyles
2125
- });
1227
+ ansiStyles = assembleStyles();
1228
+ ansi_styles_default = ansiStyles;
2126
1229
  }
2127
1230
  });
2128
1231
 
2129
- // node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js
2130
- var require_wrap_ansi = __commonJS({
2131
- "node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports2, module2) {
2132
- "use strict";
2133
- var stringWidth = require_string_width();
2134
- var stripAnsi2 = (init_strip_ansi(), __toCommonJS(strip_ansi_exports));
2135
- var ansiStyles = require_ansi_styles();
2136
- var ESCAPES = /* @__PURE__ */ new Set([
1232
+ // node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
1233
+ var wrap_ansi_exports = {};
1234
+ __export(wrap_ansi_exports, {
1235
+ default: () => wrapAnsi
1236
+ });
1237
+ function wrapAnsi(string, columns, options) {
1238
+ return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
1239
+ }
1240
+ var ESCAPES, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, wrapAnsiCode, wrapAnsiHyperlink, wordLengths, wrapWord, stringVisibleTrimSpacesRight, exec;
1241
+ var init_wrap_ansi = __esm({
1242
+ "node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js"() {
1243
+ init_string_width();
1244
+ init_strip_ansi();
1245
+ init_ansi_styles();
1246
+ ESCAPES = /* @__PURE__ */ new Set([
2137
1247
  "\x1B",
2138
1248
  "›"
2139
1249
  ]);
2140
- var END_CODE = 39;
2141
- var wrapAnsi = /* @__PURE__ */ __name((code) => `${ESCAPES.values().next().value}[${code}m`, "wrapAnsi");
2142
- var wordLengths = /* @__PURE__ */ __name((string) => string.split(" ").map((character) => stringWidth(character)), "wordLengths");
2143
- var wrapWord = /* @__PURE__ */ __name((rows, word, columns) => {
1250
+ END_CODE = 39;
1251
+ ANSI_ESCAPE_BELL = "\x07";
1252
+ ANSI_CSI = "[";
1253
+ ANSI_OSC = "]";
1254
+ ANSI_SGR_TERMINATOR = "m";
1255
+ ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
1256
+ wrapAnsiCode = /* @__PURE__ */ __name((code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, "wrapAnsiCode");
1257
+ wrapAnsiHyperlink = /* @__PURE__ */ __name((url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, "wrapAnsiHyperlink");
1258
+ wordLengths = /* @__PURE__ */ __name((string) => string.split(" ").map((character) => stringWidth(character)), "wordLengths");
1259
+ wrapWord = /* @__PURE__ */ __name((rows, word, columns) => {
2144
1260
  const characters = [...word];
2145
1261
  let isInsideEscape = false;
2146
- let visible = stringWidth(stripAnsi2(rows[rows.length - 1]));
1262
+ let isInsideLinkEscape = false;
1263
+ let visible = stringWidth(stripAnsi(rows.at(-1)));
2147
1264
  for (const [index, character] of characters.entries()) {
2148
1265
  const characterLength = stringWidth(character);
2149
1266
  if (visible + characterLength <= columns) {
@@ -2154,11 +1271,18 @@ var require_wrap_ansi = __commonJS({
2154
1271
  }
2155
1272
  if (ESCAPES.has(character)) {
2156
1273
  isInsideEscape = true;
2157
- } else if (isInsideEscape && character === "m") {
2158
- isInsideEscape = false;
2159
- continue;
1274
+ const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
1275
+ isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
2160
1276
  }
2161
1277
  if (isInsideEscape) {
1278
+ if (isInsideLinkEscape) {
1279
+ if (character === ANSI_ESCAPE_BELL) {
1280
+ isInsideEscape = false;
1281
+ isInsideLinkEscape = false;
1282
+ }
1283
+ } else if (character === ANSI_SGR_TERMINATOR) {
1284
+ isInsideEscape = false;
1285
+ }
2162
1286
  continue;
2163
1287
  }
2164
1288
  visible += characterLength;
@@ -2167,12 +1291,12 @@ var require_wrap_ansi = __commonJS({
2167
1291
  visible = 0;
2168
1292
  }
2169
1293
  }
2170
- if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
1294
+ if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
2171
1295
  rows[rows.length - 2] += rows.pop();
2172
1296
  }
2173
1297
  }, "wrapWord");
2174
- var stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((str) => {
2175
- const words = str.split(" ");
1298
+ stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((string) => {
1299
+ const words = string.split(" ");
2176
1300
  let last = words.length;
2177
1301
  while (last > 0) {
2178
1302
  if (stringWidth(words[last - 1]) > 0) {
@@ -2181,24 +1305,24 @@ var require_wrap_ansi = __commonJS({
2181
1305
  last--;
2182
1306
  }
2183
1307
  if (last === words.length) {
2184
- return str;
1308
+ return string;
2185
1309
  }
2186
1310
  return words.slice(0, last).join(" ") + words.slice(last).join("");
2187
1311
  }, "stringVisibleTrimSpacesRight");
2188
- var exec = /* @__PURE__ */ __name((string, columns, options = {}) => {
1312
+ exec = /* @__PURE__ */ __name((string, columns, options = {}) => {
2189
1313
  if (options.trim !== false && string.trim() === "") {
2190
1314
  return "";
2191
1315
  }
2192
- let pre = "";
2193
- let ret = "";
1316
+ let returnValue = "";
2194
1317
  let escapeCode;
1318
+ let escapeUrl;
2195
1319
  const lengths = wordLengths(string);
2196
1320
  let rows = [""];
2197
1321
  for (const [index, word] of string.split(" ").entries()) {
2198
1322
  if (options.trim !== false) {
2199
- rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
1323
+ rows[rows.length - 1] = rows.at(-1).trimStart();
2200
1324
  }
2201
- let rowLength = stringWidth(rows[rows.length - 1]);
1325
+ let rowLength = stringWidth(rows.at(-1));
2202
1326
  if (index !== 0) {
2203
1327
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
2204
1328
  rows.push("");
@@ -2233,29 +1357,43 @@ var require_wrap_ansi = __commonJS({
2233
1357
  rows[rows.length - 1] += word;
2234
1358
  }
2235
1359
  if (options.trim !== false) {
2236
- rows = rows.map(stringVisibleTrimSpacesRight);
1360
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
2237
1361
  }
2238
- pre = rows.join("\n");
2239
- for (const [index, character] of [...pre].entries()) {
2240
- ret += character;
1362
+ const preString = rows.join("\n");
1363
+ const pre = [...preString];
1364
+ let preStringIndex = 0;
1365
+ for (const [index, character] of pre.entries()) {
1366
+ returnValue += character;
2241
1367
  if (ESCAPES.has(character)) {
2242
- const code2 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
2243
- escapeCode = code2 === END_CODE ? null : code2;
2244
- }
2245
- const code = ansiStyles.codes.get(Number(escapeCode));
2246
- if (escapeCode && code) {
2247
- if (pre[index + 1] === "\n") {
2248
- ret += wrapAnsi(code);
2249
- } else if (character === "\n") {
2250
- ret += wrapAnsi(escapeCode);
1368
+ const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
1369
+ if (groups.code !== void 0) {
1370
+ const code2 = Number.parseFloat(groups.code);
1371
+ escapeCode = code2 === END_CODE ? void 0 : code2;
1372
+ } else if (groups.uri !== void 0) {
1373
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
1374
+ }
1375
+ }
1376
+ const code = ansi_styles_default.codes.get(Number(escapeCode));
1377
+ if (pre[index + 1] === "\n") {
1378
+ if (escapeUrl) {
1379
+ returnValue += wrapAnsiHyperlink("");
1380
+ }
1381
+ if (escapeCode && code) {
1382
+ returnValue += wrapAnsiCode(code);
1383
+ }
1384
+ } else if (character === "\n") {
1385
+ if (escapeCode && code) {
1386
+ returnValue += wrapAnsiCode(escapeCode);
1387
+ }
1388
+ if (escapeUrl) {
1389
+ returnValue += wrapAnsiHyperlink(escapeUrl);
2251
1390
  }
2252
1391
  }
1392
+ preStringIndex += character.length;
2253
1393
  }
2254
- return ret;
1394
+ return returnValue;
2255
1395
  }, "exec");
2256
- module2.exports = (string, columns, options) => {
2257
- return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
2258
- };
1396
+ __name(wrapAnsi, "wrapAnsi");
2259
1397
  }
2260
1398
  });
2261
1399
 
@@ -2270,7 +1408,7 @@ var require_utils = __commonJS({
2270
1408
  exports2.breakLines = breakLines;
2271
1409
  exports2.readlineWidth = readlineWidth;
2272
1410
  var cli_width_1 = __importDefault(require_cli_width());
2273
- var wrap_ansi_1 = __importDefault(require_wrap_ansi());
1411
+ var wrap_ansi_1 = __importDefault((init_wrap_ansi(), __toCommonJS(wrap_ansi_exports)));
2274
1412
  var hook_engine_ts_1 = require_hook_engine();
2275
1413
  function breakLines(content, width) {
2276
1414
  return content.split("\n").flatMap((line) => (0, wrap_ansi_1.default)(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");