@qelos/aidev 1.0.1 → 1.0.3

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 (120) hide show
  1. package/dist/providers/clickup.d.ts.map +1 -1
  2. package/dist/providers/clickup.js +2 -11
  3. package/dist/providers/clickup.js.map +1 -1
  4. package/package.json +1 -1
  5. package/ui/.output/nitro.json +1 -1
  6. package/ui/.output/public/_nuxt/builds/latest.json +1 -1
  7. package/ui/.output/public/_nuxt/builds/meta/201c9849-97b7-4436-b6e4-26a47cf05d53.json +1 -0
  8. package/ui/.output/server/chunks/build/styles.mjs +3 -3
  9. package/ui/.output/server/chunks/build/styles.mjs.map +1 -1
  10. package/ui/.output/server/chunks/nitro/nitro.mjs +82 -82
  11. package/ui/.output/server/node_modules/entities/LICENSE +11 -0
  12. package/ui/.output/server/node_modules/entities/decode.d.ts +3 -0
  13. package/ui/.output/server/node_modules/entities/decode.js +3 -0
  14. package/ui/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +19 -0
  15. package/ui/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +1 -0
  16. package/ui/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  17. package/ui/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
  18. package/ui/.output/server/node_modules/entities/dist/commonjs/decode.d.ts +205 -0
  19. package/ui/.output/server/node_modules/entities/dist/commonjs/decode.d.ts.map +1 -0
  20. package/ui/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  21. package/ui/.output/server/node_modules/entities/dist/commonjs/decode.js.map +1 -0
  22. package/ui/.output/server/node_modules/entities/dist/commonjs/encode.d.ts +22 -0
  23. package/ui/.output/server/node_modules/entities/dist/commonjs/encode.d.ts.map +1 -0
  24. package/ui/.output/server/node_modules/entities/dist/commonjs/encode.js +92 -0
  25. package/ui/.output/server/node_modules/entities/dist/commonjs/encode.js.map +1 -0
  26. package/ui/.output/server/node_modules/entities/dist/commonjs/escape.d.ts +46 -0
  27. package/ui/.output/server/node_modules/entities/dist/commonjs/escape.d.ts.map +1 -0
  28. package/ui/.output/server/node_modules/entities/dist/commonjs/escape.js +138 -0
  29. package/ui/.output/server/node_modules/entities/dist/commonjs/escape.js.map +1 -0
  30. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +2 -0
  31. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +1 -0
  32. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  33. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
  34. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +2 -0
  35. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +1 -0
  36. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  37. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
  38. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +3 -0
  39. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +1 -0
  40. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/encode-html.js +14 -0
  41. package/ui/.output/server/node_modules/entities/dist/commonjs/generated/encode-html.js.map +1 -0
  42. package/ui/.output/server/node_modules/entities/dist/commonjs/index.d.ts +96 -0
  43. package/ui/.output/server/node_modules/entities/dist/commonjs/index.d.ts.map +1 -0
  44. package/ui/.output/server/node_modules/entities/dist/commonjs/index.js +131 -0
  45. package/ui/.output/server/node_modules/entities/dist/commonjs/index.js.map +1 -0
  46. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +17 -0
  47. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +1 -0
  48. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  49. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +1 -0
  50. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +2 -0
  51. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +1 -0
  52. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  53. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +1 -0
  54. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +32 -0
  55. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +1 -0
  56. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/encode-shared.js +94 -0
  57. package/ui/.output/server/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +1 -0
  58. package/ui/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  59. package/ui/.output/server/node_modules/entities/dist/esm/decode-codepoint.d.ts +19 -0
  60. package/ui/.output/server/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +1 -0
  61. package/ui/.output/server/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
  62. package/ui/.output/server/node_modules/entities/dist/esm/decode-codepoint.js.map +1 -0
  63. package/ui/.output/server/node_modules/entities/dist/esm/decode.d.ts +205 -0
  64. package/ui/.output/server/node_modules/entities/dist/esm/decode.d.ts.map +1 -0
  65. package/ui/.output/server/node_modules/entities/dist/esm/decode.js +554 -0
  66. package/ui/.output/server/node_modules/entities/dist/esm/decode.js.map +1 -0
  67. package/ui/.output/server/node_modules/entities/dist/esm/encode.d.ts +22 -0
  68. package/ui/.output/server/node_modules/entities/dist/esm/encode.d.ts.map +1 -0
  69. package/ui/.output/server/node_modules/entities/dist/esm/encode.js +88 -0
  70. package/ui/.output/server/node_modules/entities/dist/esm/encode.js.map +1 -0
  71. package/ui/.output/server/node_modules/entities/dist/esm/escape.d.ts +46 -0
  72. package/ui/.output/server/node_modules/entities/dist/esm/escape.d.ts.map +1 -0
  73. package/ui/.output/server/node_modules/entities/dist/esm/escape.js +134 -0
  74. package/ui/.output/server/node_modules/entities/dist/esm/escape.js.map +1 -0
  75. package/ui/.output/server/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +2 -0
  76. package/ui/.output/server/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +1 -0
  77. package/ui/.output/server/node_modules/entities/dist/esm/generated/decode-data-html.js +4 -0
  78. package/ui/.output/server/node_modules/entities/dist/esm/generated/decode-data-html.js.map +1 -0
  79. package/ui/.output/server/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +2 -0
  80. package/ui/.output/server/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +1 -0
  81. package/ui/.output/server/node_modules/entities/dist/esm/generated/decode-data-xml.js +4 -0
  82. package/ui/.output/server/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +1 -0
  83. package/ui/.output/server/node_modules/entities/dist/esm/generated/encode-html.d.ts +3 -0
  84. package/ui/.output/server/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +1 -0
  85. package/ui/.output/server/node_modules/entities/dist/esm/generated/encode-html.js +11 -0
  86. package/ui/.output/server/node_modules/entities/dist/esm/generated/encode-html.js.map +1 -0
  87. package/ui/.output/server/node_modules/entities/dist/esm/index.d.ts +96 -0
  88. package/ui/.output/server/node_modules/entities/dist/esm/index.d.ts.map +1 -0
  89. package/ui/.output/server/node_modules/entities/dist/esm/index.js +107 -0
  90. package/ui/.output/server/node_modules/entities/dist/esm/index.js.map +1 -0
  91. package/ui/.output/server/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +17 -0
  92. package/ui/.output/server/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +1 -0
  93. package/ui/.output/server/node_modules/entities/dist/esm/internal/bin-trie-flags.js +18 -0
  94. package/ui/.output/server/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +1 -0
  95. package/ui/.output/server/node_modules/entities/dist/esm/internal/decode-shared.d.ts +2 -0
  96. package/ui/.output/server/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +1 -0
  97. package/ui/.output/server/node_modules/entities/dist/esm/internal/decode-shared.js +28 -0
  98. package/ui/.output/server/node_modules/entities/dist/esm/internal/decode-shared.js.map +1 -0
  99. package/ui/.output/server/node_modules/entities/dist/esm/internal/encode-shared.d.ts +32 -0
  100. package/ui/.output/server/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +1 -0
  101. package/ui/.output/server/node_modules/entities/dist/esm/internal/encode-shared.js +91 -0
  102. package/ui/.output/server/node_modules/entities/dist/esm/internal/encode-shared.js.map +1 -0
  103. package/ui/.output/server/node_modules/entities/dist/esm/package.json +3 -0
  104. package/ui/.output/server/node_modules/entities/escape.d.ts +3 -0
  105. package/ui/.output/server/node_modules/entities/escape.js +3 -0
  106. package/ui/.output/server/node_modules/entities/package.json +120 -0
  107. package/ui/.output/server/node_modules/entities/readme.md +143 -0
  108. package/ui/.output/server/node_modules/entities/src/decode-codepoint.ts +81 -0
  109. package/ui/.output/server/node_modules/entities/src/decode.ts +685 -0
  110. package/ui/.output/server/node_modules/entities/src/encode.ts +93 -0
  111. package/ui/.output/server/node_modules/entities/src/escape.ts +161 -0
  112. package/ui/.output/server/node_modules/entities/src/generated/.eslintrc.json +10 -0
  113. package/ui/.output/server/node_modules/entities/src/generated/decode-data-html.ts +6 -0
  114. package/ui/.output/server/node_modules/entities/src/generated/decode-data-xml.ts +6 -0
  115. package/ui/.output/server/node_modules/entities/src/generated/encode-html.ts +17 -0
  116. package/ui/.output/server/node_modules/entities/src/index.ts +187 -0
  117. package/ui/.output/server/node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
  118. package/ui/.output/server/node_modules/entities/src/internal/decode-shared.ts +30 -0
  119. package/ui/.output/server/node_modules/entities/src/internal/encode-shared.ts +121 -0
  120. package/ui/.output/public/_nuxt/builds/meta/c49b1b03-d8dc-418a-b51f-b44d0b1baf95.json +0 -1
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeUTF8 = exports.escapeText = exports.escapeAttribute = exports.encodeXML = exports.encodeNonAsciiHTML = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeHTML = exports.EntityDecoder = exports.decodeXMLStrict = exports.decodeXML = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTML = exports.DecodingMode = exports.EncodingMode = exports.EntityLevel = void 0;
4
+ exports.decode = decode;
5
+ exports.decodeStrict = decodeStrict;
6
+ exports.encode = encode;
7
+ const decode_js_1 = require("./decode.js");
8
+ const encode_js_1 = require("./encode.js");
9
+ const escape_js_1 = require("./escape.js");
10
+ /** The level of entities to support. */
11
+ var EntityLevel;
12
+ (function (EntityLevel) {
13
+ /** Support only XML entities. */
14
+ EntityLevel[EntityLevel["XML"] = 0] = "XML";
15
+ /** Support HTML entities, which are a superset of XML entities. */
16
+ EntityLevel[EntityLevel["HTML"] = 1] = "HTML";
17
+ })(EntityLevel || (exports.EntityLevel = EntityLevel = {}));
18
+ var EncodingMode;
19
+ (function (EncodingMode) {
20
+ /**
21
+ * The output is UTF-8 encoded. Only characters that need escaping within
22
+ * XML will be escaped.
23
+ */
24
+ EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8";
25
+ /**
26
+ * The output consists only of ASCII characters. Characters that need
27
+ * escaping within HTML, and characters that aren't ASCII characters will
28
+ * be escaped.
29
+ */
30
+ EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII";
31
+ /**
32
+ * Encode all characters that have an equivalent entity, as well as all
33
+ * characters that are not ASCII characters.
34
+ */
35
+ EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive";
36
+ /**
37
+ * Encode all characters that have to be escaped in HTML attributes,
38
+ * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
39
+ */
40
+ EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute";
41
+ /**
42
+ * Encode all characters that have to be escaped in HTML text,
43
+ * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
44
+ */
45
+ EncodingMode[EncodingMode["Text"] = 4] = "Text";
46
+ })(EncodingMode || (exports.EncodingMode = EncodingMode = {}));
47
+ /**
48
+ * Decodes a string with entities.
49
+ *
50
+ * @param input String to decode.
51
+ * @param options Decoding options.
52
+ */
53
+ function decode(input, options = EntityLevel.XML) {
54
+ const level = typeof options === "number" ? options : options.level;
55
+ if (level === EntityLevel.HTML) {
56
+ const mode = typeof options === "object" ? options.mode : undefined;
57
+ return (0, decode_js_1.decodeHTML)(input, mode);
58
+ }
59
+ return (0, decode_js_1.decodeXML)(input);
60
+ }
61
+ /**
62
+ * Decodes a string with entities. Does not allow missing trailing semicolons for entities.
63
+ *
64
+ * @param input String to decode.
65
+ * @param options Decoding options.
66
+ * @deprecated Use `decode` with the `mode` set to `Strict`.
67
+ */
68
+ function decodeStrict(input, options = EntityLevel.XML) {
69
+ var _a;
70
+ const normalizedOptions = typeof options === "number" ? { level: options } : options;
71
+ (_a = normalizedOptions.mode) !== null && _a !== void 0 ? _a : (normalizedOptions.mode = decode_js_1.DecodingMode.Strict);
72
+ return decode(input, normalizedOptions);
73
+ }
74
+ /**
75
+ * Encodes a string with entities.
76
+ *
77
+ * @param input String to encode.
78
+ * @param options Encoding options.
79
+ */
80
+ function encode(input, options = EntityLevel.XML) {
81
+ const { mode = EncodingMode.Extensive, level = EntityLevel.XML } = typeof options === "number" ? { level: options } : options;
82
+ switch (mode) {
83
+ case EncodingMode.UTF8: {
84
+ return (0, escape_js_1.escapeUTF8)(input);
85
+ }
86
+ case EncodingMode.Attribute: {
87
+ return (0, escape_js_1.escapeAttribute)(input);
88
+ }
89
+ case EncodingMode.Text: {
90
+ return (0, escape_js_1.escapeText)(input);
91
+ }
92
+ case EncodingMode.ASCII: {
93
+ return level === EntityLevel.HTML
94
+ ? (0, encode_js_1.encodeNonAsciiHTML)(input)
95
+ : (0, escape_js_1.encodeXML)(input);
96
+ }
97
+ // biome-ignore lint/complexity/noUselessSwitchCase: we get an error for the switch not being exhaustive
98
+ case EncodingMode.Extensive: // eslint-disable-line unicorn/no-useless-switch-case
99
+ default: {
100
+ return level === EntityLevel.HTML
101
+ ? (0, encode_js_1.encodeHTML)(input)
102
+ : (0, escape_js_1.encodeXML)(input);
103
+ }
104
+ }
105
+ }
106
+ var decode_js_2 = require("./decode.js");
107
+ Object.defineProperty(exports, "DecodingMode", { enumerable: true, get: function () { return decode_js_2.DecodingMode; } });
108
+ Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } });
109
+ // Legacy aliases (deprecated)
110
+ Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } });
111
+ Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } });
112
+ Object.defineProperty(exports, "decodeHTMLAttribute", { enumerable: true, get: function () { return decode_js_2.decodeHTMLAttribute; } });
113
+ Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } });
114
+ Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } });
115
+ Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } });
116
+ Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function () { return decode_js_2.decodeXML; } });
117
+ Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeXML; } });
118
+ Object.defineProperty(exports, "EntityDecoder", { enumerable: true, get: function () { return decode_js_2.EntityDecoder; } });
119
+ var encode_js_2 = require("./encode.js");
120
+ Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } });
121
+ // Legacy aliases (deprecated)
122
+ Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } });
123
+ Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } });
124
+ Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function () { return encode_js_2.encodeNonAsciiHTML; } });
125
+ var escape_js_2 = require("./escape.js");
126
+ Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function () { return escape_js_2.encodeXML; } });
127
+ Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
128
+ Object.defineProperty(exports, "escapeAttribute", { enumerable: true, get: function () { return escape_js_2.escapeAttribute; } });
129
+ Object.defineProperty(exports, "escapeText", { enumerable: true, get: function () { return escape_js_2.escapeText; } });
130
+ Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function () { return escape_js_2.escapeUTF8; } });
131
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAwEA,wBAYC;AASD,oCASC;AAwBD,wBA8BC;AA5JD,2CAAkE;AAClE,2CAA6D;AAC7D,2CAKqB;AAErB,wCAAwC;AACxC,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,4BAAZ,YAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,KAAa,EACb,U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AAA;AACN,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AACV,uGAAA,UAAU,OAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Bit flags & masks for the binary trie encoding used for entity decoding.
3
+ *
4
+ * Bit layout (16 bits total):
5
+ * 15..14 VALUE_LENGTH (+1 encoding; 0 => no value)
6
+ * 13 FLAG13. If valueLength>0: semicolon required flag (implicit ';').
7
+ * If valueLength==0: compact run flag.
8
+ * 12..7 BRANCH_LENGTH Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)
9
+ * 6..0 JUMP_TABLE Jump offset (jump table) OR single-branch char code OR first run char
10
+ */
11
+ export declare enum BinTrieFlags {
12
+ VALUE_LENGTH = 49152,
13
+ FLAG13 = 8192,
14
+ BRANCH_LENGTH = 8064,
15
+ JUMP_TABLE = 127
16
+ }
17
+ //# sourceMappingURL=bin-trie-flags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin-trie-flags.d.ts","sourceRoot":"","sources":["../../../src/internal/bin-trie-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,MAAM,OAAwB;IAC9B,aAAa,OAAwB;IACrC,UAAU,MAAwB;CACrC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BinTrieFlags = void 0;
4
+ /**
5
+ * Bit flags & masks for the binary trie encoding used for entity decoding.
6
+ *
7
+ * Bit layout (16 bits total):
8
+ * 15..14 VALUE_LENGTH (+1 encoding; 0 => no value)
9
+ * 13 FLAG13. If valueLength>0: semicolon required flag (implicit ';').
10
+ * If valueLength==0: compact run flag.
11
+ * 12..7 BRANCH_LENGTH Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)
12
+ * 6..0 JUMP_TABLE Jump offset (jump table) OR single-branch char code OR first run char
13
+ */
14
+ var BinTrieFlags;
15
+ (function (BinTrieFlags) {
16
+ BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
17
+ BinTrieFlags[BinTrieFlags["FLAG13"] = 8192] = "FLAG13";
18
+ BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 8064] = "BRANCH_LENGTH";
19
+ BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
20
+ })(BinTrieFlags || (exports.BinTrieFlags = BinTrieFlags = {}));
21
+ //# sourceMappingURL=bin-trie-flags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin-trie-flags.js","sourceRoot":"","sources":["../../../src/internal/bin-trie-flags.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,mEAAoC,CAAA;IACpC,sDAA8B,CAAA;IAC9B,oEAAqC,CAAA;IACrC,6DAAkC,CAAA;AACtC,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB"}
@@ -0,0 +1,2 @@
1
+ export declare function decodeBase64(input: string): Uint16Array;
2
+ //# sourceMappingURL=decode-shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode-shared.d.ts","sourceRoot":"","sources":["../../../src/internal/decode-shared.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAyBvD"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeBase64 = decodeBase64;
4
+ /*
5
+ * Shared base64 decode helper for generated decode data.
6
+ * Assumes global atob is available.
7
+ */
8
+ function decodeBase64(input) {
9
+ const binary =
10
+ // eslint-disable-next-line n/no-unsupported-features/node-builtins
11
+ typeof atob === "function"
12
+ ? // Browser (and Node >=16)
13
+ // eslint-disable-next-line n/no-unsupported-features/node-builtins
14
+ atob(input)
15
+ : // Older Node versions (<16)
16
+ // eslint-disable-next-line n/no-unsupported-features/node-builtins
17
+ typeof Buffer.from === "function"
18
+ ? // eslint-disable-next-line n/no-unsupported-features/node-builtins
19
+ Buffer.from(input, "base64").toString("binary")
20
+ : // eslint-disable-next-line unicorn/no-new-buffer, n/no-deprecated-api
21
+ new Buffer(input, "base64").toString("binary");
22
+ const evenLength = binary.length & ~1; // Round down to even length
23
+ const out = new Uint16Array(evenLength / 2);
24
+ for (let index = 0, outIndex = 0; index < evenLength; index += 2) {
25
+ const lo = binary.charCodeAt(index);
26
+ const hi = binary.charCodeAt(index + 1);
27
+ out[outIndex++] = lo | (hi << 8);
28
+ }
29
+ return out;
30
+ }
31
+ //# sourceMappingURL=decode-shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode-shared.js","sourceRoot":"","sources":["../../../src/internal/decode-shared.ts"],"names":[],"mappings":";;AAIA,oCAyBC;AA7BD;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAa;IACtC,MAAM,MAAM;IACR,mEAAmE;IACnE,OAAO,IAAI,KAAK,UAAU;QACtB,CAAC,CAAC,0BAA0B;YAC1B,mEAAmE;YACnE,IAAI,CAAC,KAAK,CAAC;QACb,CAAC,CAAC,4BAA4B;YAC5B,mEAAmE;YACnE,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU;gBACjC,CAAC,CAAC,mEAAmE;oBACnE,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACjD,CAAC,CAAC,sEAAsE;oBACtE,IAAI,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE3D,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,4BAA4B;IACnE,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAE5C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE,KAAK,GAAG,UAAU,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC/D,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACpC,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACxC,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * A node inside the encoding trie used by `encode.ts`.
3
+ *
4
+ * There are two physical shapes to minimize allocations and lookup cost:
5
+ *
6
+ * 1. Leaf node (string)
7
+ * - A plain string (already in the form `"&name;"`).
8
+ * - Represents a terminal match with no children.
9
+ *
10
+ * 2. Branch / value node (object)
11
+ */
12
+ export type EncodeTrieNode = string | {
13
+ /**
14
+ * Entity value for the current code point sequence (wrapped: `&...;`).
15
+ * Present when the path to this node itself is a valid named entity.
16
+ */
17
+ value: string | undefined;
18
+ /** If a number, the next code unit of the only next character. */
19
+ next: number | Map<number, EncodeTrieNode>;
20
+ /** If next is a number, `nextValue` contains the entity value. */
21
+ nextValue?: string;
22
+ };
23
+ /**
24
+ * Parse a compact encode trie string into a Map structure used for encoding.
25
+ *
26
+ * Format per entry (ascending code points using delta encoding):
27
+ * <diffBase36>[&name;][{<children>}] -- diff omitted when 0
28
+ * Where diff = currentKey - previousKey - 1 (first entry stores absolute key).
29
+ * `&name;` is the entity value (already wrapped); a following `{` denotes children.
30
+ */
31
+ export declare function parseEncodeTrie(serialized: string): Map<number, EncodeTrieNode>;
32
+ //# sourceMappingURL=encode-shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encode-shared.d.ts","sourceRoot":"","sources":["../../../src/internal/encode-shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,GACpB,MAAM,GACN;IACI;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,kEAAkE;IAClE,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC3C,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAER;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,MAAM,GACnB,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAqF7B"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseEncodeTrie = parseEncodeTrie;
4
+ /**
5
+ * Parse a compact encode trie string into a Map structure used for encoding.
6
+ *
7
+ * Format per entry (ascending code points using delta encoding):
8
+ * <diffBase36>[&name;][{<children>}] -- diff omitted when 0
9
+ * Where diff = currentKey - previousKey - 1 (first entry stores absolute key).
10
+ * `&name;` is the entity value (already wrapped); a following `{` denotes children.
11
+ */
12
+ function parseEncodeTrie(serialized) {
13
+ const top = new Map();
14
+ const totalLength = serialized.length;
15
+ let cursor = 0;
16
+ let lastTopKey = -1;
17
+ function readDiff() {
18
+ const start = cursor;
19
+ while (cursor < totalLength) {
20
+ const char = serialized.charAt(cursor);
21
+ if ((char < "0" || char > "9") && (char < "a" || char > "z")) {
22
+ break;
23
+ }
24
+ cursor++;
25
+ }
26
+ if (cursor === start)
27
+ return 0;
28
+ return Number.parseInt(serialized.slice(start, cursor), 36);
29
+ }
30
+ function readEntity() {
31
+ if (serialized[cursor] !== "&") {
32
+ throw new Error(`Child entry missing value near index ${cursor}`);
33
+ }
34
+ // Cursor currently points at '&'
35
+ const start = cursor;
36
+ const end = serialized.indexOf(";", cursor + 1);
37
+ if (end === -1) {
38
+ throw new Error(`Unterminated entity starting at index ${start}`);
39
+ }
40
+ cursor = end + 1; // Move past ';'
41
+ return serialized.slice(start, cursor); // Includes & ... ;
42
+ }
43
+ while (cursor < totalLength) {
44
+ const keyDiff = readDiff();
45
+ const key = lastTopKey === -1 ? keyDiff : lastTopKey + keyDiff + 1;
46
+ let value;
47
+ if (serialized[cursor] === "&")
48
+ value = readEntity();
49
+ if (serialized[cursor] === "{") {
50
+ cursor++; // Skip '{'
51
+ // Parse first child
52
+ let diff = readDiff();
53
+ let childKey = diff; // First key (lastChildKey = -1)
54
+ const firstValue = readEntity();
55
+ if (serialized[cursor] === "{") {
56
+ throw new Error("Unexpected nested '{' beyond depth 2");
57
+ }
58
+ // If end of block -> single child optimization
59
+ if (serialized[cursor] === "}") {
60
+ top.set(key, { value, next: childKey, nextValue: firstValue });
61
+ cursor++; // Skip '}'
62
+ }
63
+ else {
64
+ const childMap = new Map();
65
+ childMap.set(childKey, firstValue);
66
+ let lastChildKey = childKey;
67
+ while (cursor < totalLength && serialized[cursor] !== "}") {
68
+ diff = readDiff();
69
+ childKey = lastChildKey + diff + 1;
70
+ const childValue = readEntity();
71
+ if (serialized[cursor] === "{") {
72
+ throw new Error("Unexpected nested '{' beyond depth 2");
73
+ }
74
+ childMap.set(childKey, childValue);
75
+ lastChildKey = childKey;
76
+ }
77
+ if (serialized[cursor] !== "}") {
78
+ throw new Error("Unterminated child block");
79
+ }
80
+ cursor++; // Skip '}'
81
+ top.set(key, { value, next: childMap });
82
+ }
83
+ }
84
+ else if (value === undefined) {
85
+ throw new Error(`Malformed encode trie: missing value at index ${cursor}`);
86
+ }
87
+ else {
88
+ top.set(key, value);
89
+ }
90
+ lastTopKey = key;
91
+ }
92
+ return top;
93
+ }
94
+ //# sourceMappingURL=encode-shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encode-shared.js","sourceRoot":"","sources":["../../../src/internal/encode-shared.ts"],"names":[],"mappings":";;AAiCA,0CAuFC;AA/FD;;;;;;;GAOG;AACH,SAAgB,eAAe,CAC3B,UAAkB;IAElB,MAAM,GAAG,GAAG,IAAI,GAAG,EAA0B,CAAC;IA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C;oBAClB,QAAQ,GAAG,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC;oBACnC,MAAM,UAAU,GAAG,UAAU,EAAE,CAAC;oBAChC,IAAI,UAAU,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;wBAC7B,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;oBAC5D,CAAC;oBACD,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;oBACnC,YAAY,GAAG,QAAQ,CAAC;gBAC5B,CAAC;gBACD,IAAI,UAAU,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;oBAC7B,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;gBAChD,CAAC;gBACD,MAAM,EAAE,CAAC,CAAC,WAAW;gBACrB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;YAC5C,CAAC;QACL,CAAC;aAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACX,iDAAiD,MAAM,EAAE,CAC5D,CAAC;QACN,CAAC;aAAM,CAAC;YACJ,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACxB,CAAC;QACD,UAAU,GAAG,GAAG,CAAC;IACrB,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.
3
+ */
4
+ export declare const fromCodePoint: (...codePoints: number[]) => string;
5
+ /**
6
+ * Replace the given code point with a replacement character if it is a
7
+ * surrogate or is outside the valid range. Otherwise return the code
8
+ * point unchanged.
9
+ */
10
+ export declare function replaceCodePoint(codePoint: number): number;
11
+ /**
12
+ * Replace the code point if relevant, then convert it to a string.
13
+ *
14
+ * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.
15
+ * @param codePoint The code point to decode.
16
+ * @returns The decoded code point.
17
+ */
18
+ export declare function decodeCodePoint(codePoint: number): string;
19
+ //# sourceMappingURL=decode-codepoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode-codepoint.d.ts","sourceRoot":"","sources":["../../src/decode-codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,KAAK,MAgBnD,CAAC;AAEP;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAS1D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzD"}
@@ -0,0 +1,72 @@
1
+ // Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134
2
+ var _a;
3
+ const decodeMap = new Map([
4
+ [0, 65533],
5
+ // C1 Unicode control character reference replacements
6
+ [128, 8364],
7
+ [130, 8218],
8
+ [131, 402],
9
+ [132, 8222],
10
+ [133, 8230],
11
+ [134, 8224],
12
+ [135, 8225],
13
+ [136, 710],
14
+ [137, 8240],
15
+ [138, 352],
16
+ [139, 8249],
17
+ [140, 338],
18
+ [142, 381],
19
+ [145, 8216],
20
+ [146, 8217],
21
+ [147, 8220],
22
+ [148, 8221],
23
+ [149, 8226],
24
+ [150, 8211],
25
+ [151, 8212],
26
+ [152, 732],
27
+ [153, 8482],
28
+ [154, 353],
29
+ [155, 8250],
30
+ [156, 339],
31
+ [158, 382],
32
+ [159, 376],
33
+ ]);
34
+ /**
35
+ * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.
36
+ */
37
+ export const fromCodePoint =
38
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/es-builtins
39
+ (_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : ((codePoint) => {
40
+ let output = "";
41
+ if (codePoint > 65535) {
42
+ codePoint -= 65536;
43
+ output += String.fromCharCode(((codePoint >>> 10) & 1023) | 55296);
44
+ codePoint = 56320 | (codePoint & 1023);
45
+ }
46
+ output += String.fromCharCode(codePoint);
47
+ return output;
48
+ });
49
+ /**
50
+ * Replace the given code point with a replacement character if it is a
51
+ * surrogate or is outside the valid range. Otherwise return the code
52
+ * point unchanged.
53
+ */
54
+ export function replaceCodePoint(codePoint) {
55
+ var _a;
56
+ if ((codePoint >= 55296 && codePoint <= 57343) ||
57
+ codePoint > 1114111) {
58
+ return 65533;
59
+ }
60
+ return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
61
+ }
62
+ /**
63
+ * Replace the code point if relevant, then convert it to a string.
64
+ *
65
+ * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.
66
+ * @param codePoint The code point to decode.
67
+ * @returns The decoded code point.
68
+ */
69
+ export function decodeCodePoint(codePoint) {
70
+ return fromCodePoint(replaceCodePoint(codePoint));
71
+ }
72
+ //# sourceMappingURL=decode-codepoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode-codepoint.js","sourceRoot":"","sources":["../../src/decode-codepoint.ts"],"names":[],"mappings":"AAAA,qHAAqH;;AAErH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,KAAM,CAAC;IACX,sDAAsD;IACtD,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,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