weapp-tailwindcss 5.0.0-next.25 → 5.0.0-next.27

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 (68) hide show
  1. package/dist/{auto-B11j1XiD.js → auto-DP-qtQzE.js} +5 -7
  2. package/dist/{auto-AduSz49t.mjs → auto-XyKTOP7B.mjs} +4 -6
  3. package/dist/{bundle-state-CBouNDzi.mjs → bundle-state-7DRnJcJp.mjs} +1 -2
  4. package/dist/{bundle-state-BY7PWHAc.js → bundle-state-Nn90UQDa.js} +3 -4
  5. package/dist/bundlers/vite/index.d.ts +5 -2
  6. package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
  7. package/dist/bundlers/vite/source-candidates.d.ts +3 -0
  8. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
  9. package/dist/cli.js +9 -11
  10. package/dist/cli.mjs +9 -11
  11. package/dist/core.js +1 -2
  12. package/dist/core.mjs +1 -1
  13. package/dist/css-macro/postcss.js +1 -1
  14. package/dist/css-macro/postcss.mjs +1 -1
  15. package/dist/css-macro.js +4 -4
  16. package/dist/css-macro.mjs +3 -3
  17. package/dist/{defaults-B-1EEhdL.mjs → defaults-8xrgzxFY.mjs} +1 -1
  18. package/dist/{defaults-C10hYUch.js → defaults-C5w9OOrj.js} +1 -2
  19. package/dist/defaults.js +1 -1
  20. package/dist/defaults.mjs +1 -1
  21. package/dist/{generator-CtqzN9L-.mjs → generator-CbpjNxJh.mjs} +1 -1
  22. package/dist/{generator-DTPePQZ9.js → generator-DRNbzjx5.js} +2 -2
  23. package/dist/generator.js +2 -3
  24. package/dist/generator.mjs +2 -2
  25. package/dist/gulp.js +6 -6
  26. package/dist/gulp.mjs +5 -5
  27. package/dist/{incremental-runtime-class-set-CERcE0fP.js → incremental-runtime-class-set-BQPhkSov.js} +48 -14
  28. package/dist/{incremental-runtime-class-set-BlJ86j-A.mjs → incremental-runtime-class-set-C4JgSgRY.mjs} +48 -14
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +4 -6
  31. package/dist/index.mjs +5 -5
  32. package/dist/{postcss-BAO9tGi5.js → postcss-Br1eOaFd.js} +3 -3
  33. package/dist/{postcss-DYktK8_T.mjs → postcss-C7BMYpEF.mjs} +4 -4
  34. package/dist/{postcss-DXkxsPNg.js → postcss-CiYLsqZn.js} +4 -4
  35. package/dist/{postcss-CYPHxj7a.mjs → postcss-YetooK6S.mjs} +2 -2
  36. package/dist/postcss-html-transform.js +1 -1
  37. package/dist/postcss.js +1 -1
  38. package/dist/postcss.mjs +1 -1
  39. package/dist/{precheck-ezN3ovAq.js → precheck-B6xigu7s.js} +2005 -13
  40. package/dist/{precheck-B4CpMt_w.mjs → precheck-uG16Cqaj.mjs} +1998 -12
  41. package/dist/presets/index.d.ts +1 -0
  42. package/dist/presets.js +19 -6
  43. package/dist/presets.mjs +17 -6
  44. package/dist/reset.js +1 -1
  45. package/dist/{source-candidates-DoyOltpZ.mjs → source-candidates-CX2ozpKM.mjs} +49 -7
  46. package/dist/{source-candidates-0jPRIPmC.js → source-candidates-DeK5b9i9.js} +50 -8
  47. package/dist/{tailwindcss-ujlr9Iad.mjs → tailwindcss-C7dJHZ0G.mjs} +2 -2
  48. package/dist/{tailwindcss-nQetCaPp.js → tailwindcss-DEEtJf4u.js} +3 -3
  49. package/dist/{utils-CSA174-I.js → utils-nta4tfFs.js} +1 -1
  50. package/dist/{v3-engine-Bbsrez2w.js → v3-engine-B_33V3Lu.js} +12 -4
  51. package/dist/{v3-engine-COw08vWd.mjs → v3-engine-DcvCCHfs.mjs} +11 -3
  52. package/dist/{vite-DE8Vfzal.js → vite-Bg18XZZc.js} +169 -22
  53. package/dist/{vite-hZsQAY1a.mjs → vite-DOmiMftw.mjs} +168 -21
  54. package/dist/vite.js +1 -1
  55. package/dist/vite.mjs +1 -1
  56. package/dist/weapp-tw-css-import-rewrite-loader.js +53 -22
  57. package/dist/weapp-tw-runtime-classset-loader.js +1 -1
  58. package/dist/{webpack-c2WJnCJI.mjs → webpack-BdrjJf41.mjs} +17 -13
  59. package/dist/{webpack-CTJcw_sX.js → webpack-BzPDhzSz.js} +18 -14
  60. package/dist/webpack.d.ts +1 -3
  61. package/dist/webpack.js +3 -4
  62. package/dist/webpack.mjs +2 -2
  63. package/package.json +9 -7
  64. /package/dist/{chunk-8l464Juk.js → chunk-D6vf50IK.js} +0 -0
  65. /package/dist/{logger-Dr7IvyH2.mjs → logger-BNzxZbZj.mjs} +0 -0
  66. /package/dist/{logger-Cdzl3p8j.js → logger-TlKT3xmR.js} +0 -0
  67. /package/dist/{runtime-registry-CdCV3Opt.js → runtime-registry-DpcR3IHI.js} +0 -0
  68. /package/dist/{utils-B2SJgA1L.mjs → utils-DsaS975I.mjs} +0 -0
@@ -1,8 +1,8 @@
1
- const require_chunk = require("./chunk-8l464Juk.js");
2
- const require_v3_engine = require("./v3-engine-Bbsrez2w.js");
3
- const require_defaults = require("./defaults-C10hYUch.js");
4
- require("./utils-CSA174-I.js");
5
- const require_tailwindcss = require("./tailwindcss-nQetCaPp.js");
1
+ const require_chunk = require("./chunk-D6vf50IK.js");
2
+ const require_v3_engine = require("./v3-engine-B_33V3Lu.js");
3
+ const require_defaults = require("./defaults-C5w9OOrj.js");
4
+ require("./utils-nta4tfFs.js");
5
+ const require_tailwindcss = require("./tailwindcss-DEEtJf4u.js");
6
6
  let node_path = require("node:path");
7
7
  node_path = require_chunk.__toESM(node_path);
8
8
  let node_process = require("node:process");
@@ -23,7 +23,6 @@ let _ast_core_escape = require("@ast-core/escape");
23
23
  let _weapp_tailwindcss_shared_extractors = require("@weapp-tailwindcss/shared/extractors");
24
24
  let _babel_types = require("@babel/types");
25
25
  _babel_types = require_chunk.__toESM(_babel_types);
26
- let htmlparser2 = require("htmlparser2");
27
26
  let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
28
27
  //#region src/cache/index.ts
29
28
  function isProcessResult(value) {
@@ -1231,7 +1230,7 @@ function walkEvalExpression(path, options, updater, handler) {
1231
1230
  }
1232
1231
  }
1233
1232
  //#endregion
1234
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
1233
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
1235
1234
  function _typeof(o) {
1236
1235
  "@babel/helpers - typeof";
1237
1236
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -1241,7 +1240,7 @@ function _typeof(o) {
1241
1240
  }, _typeof(o);
1242
1241
  }
1243
1242
  //#endregion
1244
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
1243
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
1245
1244
  function toPrimitive(t, r) {
1246
1245
  if ("object" != _typeof(t) || !t) return t;
1247
1246
  var e = t[Symbol.toPrimitive];
@@ -1253,13 +1252,13 @@ function toPrimitive(t, r) {
1253
1252
  return ("string" === r ? String : Number)(t);
1254
1253
  }
1255
1254
  //#endregion
1256
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
1255
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
1257
1256
  function toPropertyKey(t) {
1258
1257
  var i = toPrimitive(t, "string");
1259
1258
  return "symbol" == _typeof(i) ? i : i + "";
1260
1259
  }
1261
1260
  //#endregion
1262
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
1261
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
1263
1262
  function _defineProperty(e, r, t) {
1264
1263
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
1265
1264
  value: t,
@@ -1978,9 +1977,8 @@ function jsHandler(rawSource, options) {
1978
1977
  if (shouldWrapExpression) {
1979
1978
  const start = 0;
1980
1979
  const end = source.length;
1981
- const prefixLength = 2;
1982
1980
  const suffixLength = 2;
1983
- ms.remove(start, start + prefixLength);
1981
+ ms.remove(start, 2);
1984
1982
  ms.remove(end - suffixLength, end);
1985
1983
  }
1986
1984
  const result = { code: ms.toString() };
@@ -2233,6 +2231,1994 @@ function generateCode(match, options = {}) {
2233
2231
  }
2234
2232
  }
2235
2233
  //#endregion
2234
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode-codepoint.js
2235
+ const decodeMap = new Map([
2236
+ [0, 65533],
2237
+ [128, 8364],
2238
+ [130, 8218],
2239
+ [131, 402],
2240
+ [132, 8222],
2241
+ [133, 8230],
2242
+ [134, 8224],
2243
+ [135, 8225],
2244
+ [136, 710],
2245
+ [137, 8240],
2246
+ [138, 352],
2247
+ [139, 8249],
2248
+ [140, 338],
2249
+ [142, 381],
2250
+ [145, 8216],
2251
+ [146, 8217],
2252
+ [147, 8220],
2253
+ [148, 8221],
2254
+ [149, 8226],
2255
+ [150, 8211],
2256
+ [151, 8212],
2257
+ [152, 732],
2258
+ [153, 8482],
2259
+ [154, 353],
2260
+ [155, 8250],
2261
+ [156, 339],
2262
+ [158, 382],
2263
+ [159, 376]
2264
+ ]);
2265
+ /**
2266
+ * Replace the given code point with a replacement character if it is a
2267
+ * surrogate or is outside the valid range. Otherwise return the code
2268
+ * point unchanged.
2269
+ * @param codePoint Unicode code point to convert.
2270
+ */
2271
+ function replaceCodePoint(codePoint) {
2272
+ if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) return 65533;
2273
+ return decodeMap.get(codePoint) ?? codePoint;
2274
+ }
2275
+ //#endregion
2276
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/decode-shared.js
2277
+ /**
2278
+ * Shared base64 decode helper for generated decode data.
2279
+ * Assumes global atob is available.
2280
+ * @param input Input string to encode or decode.
2281
+ */
2282
+ function decodeBase64(input) {
2283
+ const binary = atob(input);
2284
+ const evenLength = binary.length & -2;
2285
+ const out = new Uint16Array(evenLength / 2);
2286
+ for (let index = 0, outIndex = 0; index < evenLength; index += 2) {
2287
+ const lo = binary.charCodeAt(index);
2288
+ const hi = binary.charCodeAt(index + 1);
2289
+ out[outIndex++] = lo | hi << 8;
2290
+ }
2291
+ return out;
2292
+ }
2293
+ //#endregion
2294
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/generated/decode-data-html.js
2295
+ /** Packed HTML decode trie data. */
2296
+ const htmlDecodeTree = /* #__PURE__ */ decodeBase64("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcg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CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");
2297
+ //#endregion
2298
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/generated/decode-data-xml.js
2299
+ /** Packed XML decode trie data. */
2300
+ const xmlDecodeTree = /* #__PURE__ */ decodeBase64("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg");
2301
+ //#endregion
2302
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/bin-trie-flags.js
2303
+ /**
2304
+ * Bit flags & masks for the binary trie encoding used for entity decoding.
2305
+ *
2306
+ * Bit layout (16 bits total):
2307
+ * 15..14 VALUE_LENGTH (+1 encoding; 0 => no value)
2308
+ * 13 FLAG13. If valueLength>0: semicolon required flag (implicit ';').
2309
+ * If valueLength==0: compact run flag.
2310
+ * 12..7 BRANCH_LENGTH Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)
2311
+ * 6..0 JUMP_TABLE Jump offset (jump table) OR single-branch char code OR first run char
2312
+ */
2313
+ var BinTrieFlags;
2314
+ (function(BinTrieFlags) {
2315
+ BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
2316
+ BinTrieFlags[BinTrieFlags["FLAG13"] = 8192] = "FLAG13";
2317
+ BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 8064] = "BRANCH_LENGTH";
2318
+ BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
2319
+ })(BinTrieFlags || (BinTrieFlags = {}));
2320
+ //#endregion
2321
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode.js
2322
+ var CharCodes$1;
2323
+ (function(CharCodes) {
2324
+ CharCodes[CharCodes["NUM"] = 35] = "NUM";
2325
+ CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
2326
+ CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
2327
+ CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
2328
+ CharCodes[CharCodes["NINE"] = 57] = "NINE";
2329
+ CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
2330
+ CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
2331
+ CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
2332
+ CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
2333
+ CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
2334
+ CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
2335
+ CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
2336
+ })(CharCodes$1 || (CharCodes$1 = {}));
2337
+ /** Bit that needs to be set to convert an upper case ASCII character to lower case */
2338
+ const TO_LOWER_BIT = 32;
2339
+ function isNumber(code) {
2340
+ return code >= CharCodes$1.ZERO && code <= CharCodes$1.NINE;
2341
+ }
2342
+ function isHexadecimalCharacter(code) {
2343
+ return code >= CharCodes$1.UPPER_A && code <= CharCodes$1.UPPER_F || code >= CharCodes$1.LOWER_A && code <= CharCodes$1.LOWER_F;
2344
+ }
2345
+ function isAsciiAlphaNumeric(code) {
2346
+ return code >= CharCodes$1.UPPER_A && code <= CharCodes$1.UPPER_Z || code >= CharCodes$1.LOWER_A && code <= CharCodes$1.LOWER_Z || isNumber(code);
2347
+ }
2348
+ /**
2349
+ * Checks if the given character is a valid end character for an entity in an attribute.
2350
+ *
2351
+ * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
2352
+ * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
2353
+ * @param code Code point to decode.
2354
+ */
2355
+ function isEntityInAttributeInvalidEnd(code) {
2356
+ return code === CharCodes$1.EQUALS || isAsciiAlphaNumeric(code);
2357
+ }
2358
+ var EntityDecoderState;
2359
+ (function(EntityDecoderState) {
2360
+ EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
2361
+ EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
2362
+ EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
2363
+ EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
2364
+ EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
2365
+ })(EntityDecoderState || (EntityDecoderState = {}));
2366
+ /**
2367
+ * Decoding mode for named entities.
2368
+ */
2369
+ var DecodingMode;
2370
+ (function(DecodingMode) {
2371
+ /** Entities in text nodes that can end with any character. */
2372
+ DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
2373
+ /** Only allow entities terminated with a semicolon. */
2374
+ DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
2375
+ /** Entities in attributes have limitations on ending characters. */
2376
+ DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
2377
+ })(DecodingMode || (DecodingMode = {}));
2378
+ /**
2379
+ * Token decoder with support of writing partial entities.
2380
+ */
2381
+ var EntityDecoder = class {
2382
+ constructor(decodeTree, emitCodePoint, errors) {
2383
+ _defineProperty(this, "decodeTree", void 0);
2384
+ _defineProperty(this, "emitCodePoint", void 0);
2385
+ _defineProperty(this, "errors", void 0);
2386
+ _defineProperty(
2387
+ this,
2388
+ /** The current state of the decoder. */
2389
+ "state",
2390
+ EntityDecoderState.EntityStart
2391
+ );
2392
+ _defineProperty(
2393
+ this,
2394
+ /** Characters that were consumed while parsing an entity. */
2395
+ "consumed",
2396
+ 1
2397
+ );
2398
+ _defineProperty(
2399
+ this,
2400
+ /**
2401
+ * The result of the entity.
2402
+ *
2403
+ * Either the result index of a numeric entity, or the codepoint of a
2404
+ * numeric entity.
2405
+ */
2406
+ "result",
2407
+ 0
2408
+ );
2409
+ _defineProperty(
2410
+ this,
2411
+ /** The current index in the decode tree. */
2412
+ "treeIndex",
2413
+ 0
2414
+ );
2415
+ _defineProperty(
2416
+ this,
2417
+ /** The number of characters that were consumed in excess. */
2418
+ "excess",
2419
+ 1
2420
+ );
2421
+ _defineProperty(
2422
+ this,
2423
+ /** The mode in which the decoder is operating. */
2424
+ "decodeMode",
2425
+ DecodingMode.Strict
2426
+ );
2427
+ _defineProperty(
2428
+ this,
2429
+ /** The number of characters that have been consumed in the current run. */
2430
+ "runConsumed",
2431
+ 0
2432
+ );
2433
+ this.decodeTree = decodeTree;
2434
+ this.emitCodePoint = emitCodePoint;
2435
+ this.errors = errors;
2436
+ }
2437
+ /**
2438
+ * Resets the instance to make it reusable.
2439
+ * @param decodeMode Entity decoding mode to use.
2440
+ */
2441
+ startEntity(decodeMode) {
2442
+ this.decodeMode = decodeMode;
2443
+ this.state = EntityDecoderState.EntityStart;
2444
+ this.result = 0;
2445
+ this.treeIndex = 0;
2446
+ this.excess = 1;
2447
+ this.consumed = 1;
2448
+ this.runConsumed = 0;
2449
+ }
2450
+ /**
2451
+ * Write an entity to the decoder. This can be called multiple times with partial entities.
2452
+ * If the entity is incomplete, the decoder will return -1.
2453
+ *
2454
+ * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
2455
+ * entity is incomplete, and resume when the next string is written.
2456
+ * @param input The string containing the entity (or a continuation of the entity).
2457
+ * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
2458
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2459
+ */
2460
+ write(input, offset) {
2461
+ switch (this.state) {
2462
+ case EntityDecoderState.EntityStart:
2463
+ if (input.charCodeAt(offset) === CharCodes$1.NUM) {
2464
+ this.state = EntityDecoderState.NumericStart;
2465
+ this.consumed += 1;
2466
+ return this.stateNumericStart(input, offset + 1);
2467
+ }
2468
+ this.state = EntityDecoderState.NamedEntity;
2469
+ return this.stateNamedEntity(input, offset);
2470
+ case EntityDecoderState.NumericStart: return this.stateNumericStart(input, offset);
2471
+ case EntityDecoderState.NumericDecimal: return this.stateNumericDecimal(input, offset);
2472
+ case EntityDecoderState.NumericHex: return this.stateNumericHex(input, offset);
2473
+ case EntityDecoderState.NamedEntity: return this.stateNamedEntity(input, offset);
2474
+ }
2475
+ }
2476
+ /**
2477
+ * Switches between the numeric decimal and hexadecimal states.
2478
+ *
2479
+ * Equivalent to the `Numeric character reference state` in the HTML spec.
2480
+ * @param input The string containing the entity (or a continuation of the entity).
2481
+ * @param offset The current offset.
2482
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2483
+ */
2484
+ stateNumericStart(input, offset) {
2485
+ if (offset >= input.length) return -1;
2486
+ if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes$1.LOWER_X) {
2487
+ this.state = EntityDecoderState.NumericHex;
2488
+ this.consumed += 1;
2489
+ return this.stateNumericHex(input, offset + 1);
2490
+ }
2491
+ this.state = EntityDecoderState.NumericDecimal;
2492
+ return this.stateNumericDecimal(input, offset);
2493
+ }
2494
+ /**
2495
+ * Parses a hexadecimal numeric entity.
2496
+ *
2497
+ * Equivalent to the `Hexademical character reference state` in the HTML spec.
2498
+ * @param input The string containing the entity (or a continuation of the entity).
2499
+ * @param offset The current offset.
2500
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2501
+ */
2502
+ stateNumericHex(input, offset) {
2503
+ while (offset < input.length) {
2504
+ const char = input.charCodeAt(offset);
2505
+ if (isNumber(char) || isHexadecimalCharacter(char)) {
2506
+ const digit = char <= CharCodes$1.NINE ? char - CharCodes$1.ZERO : (char | TO_LOWER_BIT) - CharCodes$1.LOWER_A + 10;
2507
+ this.result = this.result * 16 + digit;
2508
+ this.consumed++;
2509
+ offset++;
2510
+ } else return this.emitNumericEntity(char, 3);
2511
+ }
2512
+ return -1;
2513
+ }
2514
+ /**
2515
+ * Parses a decimal numeric entity.
2516
+ *
2517
+ * Equivalent to the `Decimal character reference state` in the HTML spec.
2518
+ * @param input The string containing the entity (or a continuation of the entity).
2519
+ * @param offset The current offset.
2520
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2521
+ */
2522
+ stateNumericDecimal(input, offset) {
2523
+ while (offset < input.length) {
2524
+ const char = input.charCodeAt(offset);
2525
+ if (isNumber(char)) {
2526
+ this.result = this.result * 10 + (char - CharCodes$1.ZERO);
2527
+ this.consumed++;
2528
+ offset++;
2529
+ } else return this.emitNumericEntity(char, 2);
2530
+ }
2531
+ return -1;
2532
+ }
2533
+ /**
2534
+ * Validate and emit a numeric entity.
2535
+ *
2536
+ * Implements the logic from the `Hexademical character reference start
2537
+ * state` and `Numeric character reference end state` in the HTML spec.
2538
+ * @param lastCp The last code point of the entity. Used to see if the
2539
+ * entity was terminated with a semicolon.
2540
+ * @param expectedLength The minimum number of characters that should be
2541
+ * consumed. Used to validate that at least one digit
2542
+ * was consumed.
2543
+ * @returns The number of characters that were consumed.
2544
+ */
2545
+ emitNumericEntity(lastCp, expectedLength) {
2546
+ if (this.consumed <= expectedLength) {
2547
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
2548
+ return 0;
2549
+ }
2550
+ if (lastCp === CharCodes$1.SEMI) this.consumed += 1;
2551
+ else if (this.decodeMode === DecodingMode.Strict) return 0;
2552
+ this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
2553
+ if (this.errors) {
2554
+ if (lastCp !== CharCodes$1.SEMI) this.errors.missingSemicolonAfterCharacterReference();
2555
+ this.errors.validateNumericCharacterReference(this.result);
2556
+ }
2557
+ return this.consumed;
2558
+ }
2559
+ /**
2560
+ * Parses a named entity.
2561
+ *
2562
+ * Equivalent to the `Named character reference state` in the HTML spec.
2563
+ * @param input The string containing the entity (or a continuation of the entity).
2564
+ * @param offset The current offset.
2565
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2566
+ */
2567
+ stateNamedEntity(input, offset) {
2568
+ const { decodeTree } = this;
2569
+ let current = decodeTree[this.treeIndex];
2570
+ let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
2571
+ while (offset < input.length) {
2572
+ if (valueLength === 0 && (current & BinTrieFlags.FLAG13) !== 0) {
2573
+ const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
2574
+ if (this.runConsumed === 0) {
2575
+ const firstChar = current & BinTrieFlags.JUMP_TABLE;
2576
+ if (input.charCodeAt(offset) !== firstChar) return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
2577
+ offset++;
2578
+ this.excess++;
2579
+ this.runConsumed++;
2580
+ }
2581
+ while (this.runConsumed < runLength) {
2582
+ if (offset >= input.length) return -1;
2583
+ const charIndexInPacked = this.runConsumed - 1;
2584
+ const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)];
2585
+ const expectedChar = charIndexInPacked % 2 === 0 ? packedWord & 255 : packedWord >> 8 & 255;
2586
+ if (input.charCodeAt(offset) !== expectedChar) {
2587
+ this.runConsumed = 0;
2588
+ return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
2589
+ }
2590
+ offset++;
2591
+ this.excess++;
2592
+ this.runConsumed++;
2593
+ }
2594
+ this.runConsumed = 0;
2595
+ this.treeIndex += 1 + (runLength >> 1);
2596
+ current = decodeTree[this.treeIndex];
2597
+ valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
2598
+ }
2599
+ if (offset >= input.length) break;
2600
+ const char = input.charCodeAt(offset);
2601
+ if (char === CharCodes$1.SEMI && valueLength !== 0 && (current & BinTrieFlags.FLAG13) !== 0) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
2602
+ this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
2603
+ if (this.treeIndex < 0) return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
2604
+ current = decodeTree[this.treeIndex];
2605
+ valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
2606
+ if (valueLength !== 0) {
2607
+ if (char === CharCodes$1.SEMI) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
2608
+ if (this.decodeMode !== DecodingMode.Strict && (current & BinTrieFlags.FLAG13) === 0) {
2609
+ this.result = this.treeIndex;
2610
+ this.consumed += this.excess;
2611
+ this.excess = 0;
2612
+ }
2613
+ }
2614
+ offset++;
2615
+ this.excess++;
2616
+ }
2617
+ return -1;
2618
+ }
2619
+ /**
2620
+ * Emit a named entity that was not terminated with a semicolon.
2621
+ * @returns The number of characters consumed.
2622
+ */
2623
+ emitNotTerminatedNamedEntity() {
2624
+ const { result, decodeTree } = this;
2625
+ const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
2626
+ this.emitNamedEntityData(result, valueLength, this.consumed);
2627
+ this.errors?.missingSemicolonAfterCharacterReference();
2628
+ return this.consumed;
2629
+ }
2630
+ /**
2631
+ * Emit a named entity.
2632
+ * @param result The index of the entity in the decode tree.
2633
+ * @param valueLength The number of bytes in the entity.
2634
+ * @param consumed The number of characters consumed.
2635
+ * @returns The number of characters consumed.
2636
+ */
2637
+ emitNamedEntityData(result, valueLength, consumed) {
2638
+ const { decodeTree } = this;
2639
+ this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~(BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13) : decodeTree[result + 1], consumed);
2640
+ if (valueLength === 3) this.emitCodePoint(decodeTree[result + 2], consumed);
2641
+ return consumed;
2642
+ }
2643
+ /**
2644
+ * Signal to the parser that the end of the input was reached.
2645
+ *
2646
+ * Remaining data will be emitted and relevant errors will be produced.
2647
+ * @returns The number of characters consumed.
2648
+ */
2649
+ end() {
2650
+ switch (this.state) {
2651
+ case EntityDecoderState.NamedEntity: return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
2652
+ case EntityDecoderState.NumericDecimal: return this.emitNumericEntity(0, 2);
2653
+ case EntityDecoderState.NumericHex: return this.emitNumericEntity(0, 3);
2654
+ case EntityDecoderState.NumericStart:
2655
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
2656
+ return 0;
2657
+ case EntityDecoderState.EntityStart: return 0;
2658
+ }
2659
+ }
2660
+ };
2661
+ /**
2662
+ * Determines the branch of the current node that is taken given the current
2663
+ * character. This function is used to traverse the trie.
2664
+ * @param decodeTree The trie.
2665
+ * @param current The current node.
2666
+ * @param nodeIndex Index immediately after the current node header.
2667
+ * @param char The current character.
2668
+ * @returns The index of the next node, or -1 if no branch is taken.
2669
+ */
2670
+ function determineBranch(decodeTree, current, nodeIndex, char) {
2671
+ const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
2672
+ const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
2673
+ if (branchCount === 0) return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;
2674
+ if (jumpOffset) {
2675
+ const value = char - jumpOffset;
2676
+ return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1;
2677
+ }
2678
+ const packedKeySlots = branchCount + 1 >> 1;
2679
+ let lo = 0;
2680
+ let hi = branchCount - 1;
2681
+ while (lo <= hi) {
2682
+ const mid = lo + hi >>> 1;
2683
+ const midKey = decodeTree[nodeIndex + (mid >> 1)] >> (mid & 1) * 8 & 255;
2684
+ if (midKey < char) lo = mid + 1;
2685
+ else if (midKey > char) hi = mid - 1;
2686
+ else return decodeTree[nodeIndex + packedKeySlots + mid];
2687
+ }
2688
+ return -1;
2689
+ }
2690
+ //#endregion
2691
+ //#region ../../node_modules/.pnpm/htmlparser2@12.0.0/node_modules/htmlparser2/dist/Tokenizer.js
2692
+ var CharCodes;
2693
+ (function(CharCodes) {
2694
+ CharCodes[CharCodes["Tab"] = 9] = "Tab";
2695
+ CharCodes[CharCodes["NewLine"] = 10] = "NewLine";
2696
+ CharCodes[CharCodes["FormFeed"] = 12] = "FormFeed";
2697
+ CharCodes[CharCodes["CarriageReturn"] = 13] = "CarriageReturn";
2698
+ CharCodes[CharCodes["Space"] = 32] = "Space";
2699
+ CharCodes[CharCodes["ExclamationMark"] = 33] = "ExclamationMark";
2700
+ CharCodes[CharCodes["Number"] = 35] = "Number";
2701
+ CharCodes[CharCodes["Amp"] = 38] = "Amp";
2702
+ CharCodes[CharCodes["SingleQuote"] = 39] = "SingleQuote";
2703
+ CharCodes[CharCodes["DoubleQuote"] = 34] = "DoubleQuote";
2704
+ CharCodes[CharCodes["Dash"] = 45] = "Dash";
2705
+ CharCodes[CharCodes["Slash"] = 47] = "Slash";
2706
+ CharCodes[CharCodes["Zero"] = 48] = "Zero";
2707
+ CharCodes[CharCodes["Nine"] = 57] = "Nine";
2708
+ CharCodes[CharCodes["Semi"] = 59] = "Semi";
2709
+ CharCodes[CharCodes["Lt"] = 60] = "Lt";
2710
+ CharCodes[CharCodes["Eq"] = 61] = "Eq";
2711
+ CharCodes[CharCodes["Gt"] = 62] = "Gt";
2712
+ CharCodes[CharCodes["Questionmark"] = 63] = "Questionmark";
2713
+ CharCodes[CharCodes["UpperA"] = 65] = "UpperA";
2714
+ CharCodes[CharCodes["LowerA"] = 97] = "LowerA";
2715
+ CharCodes[CharCodes["UpperF"] = 70] = "UpperF";
2716
+ CharCodes[CharCodes["LowerF"] = 102] = "LowerF";
2717
+ CharCodes[CharCodes["UpperZ"] = 90] = "UpperZ";
2718
+ CharCodes[CharCodes["LowerZ"] = 122] = "LowerZ";
2719
+ CharCodes[CharCodes["LowerX"] = 120] = "LowerX";
2720
+ CharCodes[CharCodes["OpeningSquareBracket"] = 91] = "OpeningSquareBracket";
2721
+ })(CharCodes || (CharCodes = {}));
2722
+ /** All the states the tokenizer can be in. */
2723
+ var State;
2724
+ (function(State) {
2725
+ State[State["Text"] = 1] = "Text";
2726
+ State[State["BeforeTagName"] = 2] = "BeforeTagName";
2727
+ State[State["InTagName"] = 3] = "InTagName";
2728
+ State[State["InSelfClosingTag"] = 4] = "InSelfClosingTag";
2729
+ State[State["BeforeClosingTagName"] = 5] = "BeforeClosingTagName";
2730
+ State[State["InClosingTagName"] = 6] = "InClosingTagName";
2731
+ State[State["AfterClosingTagName"] = 7] = "AfterClosingTagName";
2732
+ State[State["BeforeAttributeName"] = 8] = "BeforeAttributeName";
2733
+ State[State["InAttributeName"] = 9] = "InAttributeName";
2734
+ State[State["AfterAttributeName"] = 10] = "AfterAttributeName";
2735
+ State[State["BeforeAttributeValue"] = 11] = "BeforeAttributeValue";
2736
+ State[State["InAttributeValueDq"] = 12] = "InAttributeValueDq";
2737
+ State[State["InAttributeValueSq"] = 13] = "InAttributeValueSq";
2738
+ State[State["InAttributeValueNq"] = 14] = "InAttributeValueNq";
2739
+ State[State["BeforeDeclaration"] = 15] = "BeforeDeclaration";
2740
+ State[State["InDeclaration"] = 16] = "InDeclaration";
2741
+ State[State["InProcessingInstruction"] = 17] = "InProcessingInstruction";
2742
+ State[State["BeforeComment"] = 18] = "BeforeComment";
2743
+ State[State["CDATASequence"] = 19] = "CDATASequence";
2744
+ State[State["DeclarationSequence"] = 20] = "DeclarationSequence";
2745
+ State[State["InSpecialComment"] = 21] = "InSpecialComment";
2746
+ State[State["InCommentLike"] = 22] = "InCommentLike";
2747
+ State[State["SpecialStartSequence"] = 23] = "SpecialStartSequence";
2748
+ State[State["InSpecialTag"] = 24] = "InSpecialTag";
2749
+ State[State["InPlainText"] = 25] = "InPlainText";
2750
+ State[State["InEntity"] = 26] = "InEntity";
2751
+ })(State || (State = {}));
2752
+ function isWhitespace$1(c) {
2753
+ return c === CharCodes.Space || c === CharCodes.NewLine || c === CharCodes.Tab || c === CharCodes.FormFeed || c === CharCodes.CarriageReturn;
2754
+ }
2755
+ function isEndOfTagSection(c) {
2756
+ return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace$1(c);
2757
+ }
2758
+ function isASCIIAlpha(c) {
2759
+ return c >= CharCodes.LowerA && c <= CharCodes.LowerZ || c >= CharCodes.UpperA && c <= CharCodes.UpperZ;
2760
+ }
2761
+ /**
2762
+ * Quote style used for parsed attributes.
2763
+ */
2764
+ var QuoteType;
2765
+ (function(QuoteType) {
2766
+ QuoteType[QuoteType["NoValue"] = 0] = "NoValue";
2767
+ QuoteType[QuoteType["Unquoted"] = 1] = "Unquoted";
2768
+ QuoteType[QuoteType["Single"] = 2] = "Single";
2769
+ QuoteType[QuoteType["Double"] = 3] = "Double";
2770
+ })(QuoteType || (QuoteType = {}));
2771
+ /**
2772
+ * Sequences used to match longer strings.
2773
+ *
2774
+ * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End
2775
+ * sequences with an increased offset.
2776
+ */
2777
+ const Sequences = {
2778
+ Empty: new Uint8Array(0),
2779
+ Cdata: new Uint8Array([
2780
+ 67,
2781
+ 68,
2782
+ 65,
2783
+ 84,
2784
+ 65,
2785
+ 91
2786
+ ]),
2787
+ CdataEnd: new Uint8Array([
2788
+ 93,
2789
+ 93,
2790
+ 62
2791
+ ]),
2792
+ CommentEnd: new Uint8Array([
2793
+ 45,
2794
+ 45,
2795
+ 33,
2796
+ 62
2797
+ ]),
2798
+ Doctype: new Uint8Array([
2799
+ 100,
2800
+ 111,
2801
+ 99,
2802
+ 116,
2803
+ 121,
2804
+ 112,
2805
+ 101
2806
+ ]),
2807
+ IframeEnd: new Uint8Array([
2808
+ 60,
2809
+ 47,
2810
+ 105,
2811
+ 102,
2812
+ 114,
2813
+ 97,
2814
+ 109,
2815
+ 101
2816
+ ]),
2817
+ NoembedEnd: new Uint8Array([
2818
+ 60,
2819
+ 47,
2820
+ 110,
2821
+ 111,
2822
+ 101,
2823
+ 109,
2824
+ 98,
2825
+ 101,
2826
+ 100
2827
+ ]),
2828
+ NoframesEnd: new Uint8Array([
2829
+ 60,
2830
+ 47,
2831
+ 110,
2832
+ 111,
2833
+ 102,
2834
+ 114,
2835
+ 97,
2836
+ 109,
2837
+ 101,
2838
+ 115
2839
+ ]),
2840
+ Plaintext: new Uint8Array([
2841
+ 60,
2842
+ 47,
2843
+ 112,
2844
+ 108,
2845
+ 97,
2846
+ 105,
2847
+ 110,
2848
+ 116,
2849
+ 101,
2850
+ 120,
2851
+ 116
2852
+ ]),
2853
+ ScriptEnd: new Uint8Array([
2854
+ 60,
2855
+ 47,
2856
+ 115,
2857
+ 99,
2858
+ 114,
2859
+ 105,
2860
+ 112,
2861
+ 116
2862
+ ]),
2863
+ StyleEnd: new Uint8Array([
2864
+ 60,
2865
+ 47,
2866
+ 115,
2867
+ 116,
2868
+ 121,
2869
+ 108,
2870
+ 101
2871
+ ]),
2872
+ TitleEnd: new Uint8Array([
2873
+ 60,
2874
+ 47,
2875
+ 116,
2876
+ 105,
2877
+ 116,
2878
+ 108,
2879
+ 101
2880
+ ]),
2881
+ TextareaEnd: new Uint8Array([
2882
+ 60,
2883
+ 47,
2884
+ 116,
2885
+ 101,
2886
+ 120,
2887
+ 116,
2888
+ 97,
2889
+ 114,
2890
+ 101,
2891
+ 97
2892
+ ]),
2893
+ XmpEnd: new Uint8Array([
2894
+ 60,
2895
+ 47,
2896
+ 120,
2897
+ 109,
2898
+ 112
2899
+ ])
2900
+ };
2901
+ /**
2902
+ * Maps the first lowercase character of an HTML tag name to the sequence
2903
+ * used for special-tag detection. All sequences share a common layout
2904
+ * where index 2 is the first tag-name character, so matching always
2905
+ * continues from offset 3.
2906
+ */
2907
+ const specialStartSequences = new Map([
2908
+ [Sequences.IframeEnd[2], Sequences.IframeEnd],
2909
+ [Sequences.NoembedEnd[2], Sequences.NoembedEnd],
2910
+ [Sequences.Plaintext[2], Sequences.Plaintext],
2911
+ [Sequences.ScriptEnd[2], Sequences.ScriptEnd],
2912
+ [Sequences.TitleEnd[2], Sequences.TitleEnd],
2913
+ [Sequences.XmpEnd[2], Sequences.XmpEnd]
2914
+ ]);
2915
+ /**
2916
+ * Tokenizer implementation used by `Parser`.
2917
+ */
2918
+ var Tokenizer$1 = class {
2919
+ constructor({ xmlMode = false, decodeEntities = true, recognizeSelfClosing = xmlMode }, cbs) {
2920
+ _defineProperty(this, "cbs", void 0);
2921
+ _defineProperty(
2922
+ this,
2923
+ /** The current state the tokenizer is in. */
2924
+ "state",
2925
+ State.Text
2926
+ );
2927
+ _defineProperty(
2928
+ this,
2929
+ /** The read buffer. */
2930
+ "buffer",
2931
+ ""
2932
+ );
2933
+ _defineProperty(
2934
+ this,
2935
+ /** The beginning of the section that is currently being read. */
2936
+ "sectionStart",
2937
+ 0
2938
+ );
2939
+ _defineProperty(
2940
+ this,
2941
+ /** The index within the buffer that we are currently looking at. */
2942
+ "index",
2943
+ 0
2944
+ );
2945
+ _defineProperty(
2946
+ this,
2947
+ /** The start of the last entity. */
2948
+ "entityStart",
2949
+ 0
2950
+ );
2951
+ _defineProperty(
2952
+ this,
2953
+ /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
2954
+ "baseState",
2955
+ State.Text
2956
+ );
2957
+ _defineProperty(
2958
+ this,
2959
+ /** For special parsing behavior inside of script and style tags. */
2960
+ "isSpecial",
2961
+ false
2962
+ );
2963
+ _defineProperty(
2964
+ this,
2965
+ /** Indicates whether the tokenizer has been paused. */
2966
+ "running",
2967
+ true
2968
+ );
2969
+ _defineProperty(
2970
+ this,
2971
+ /** The offset of the current buffer. */
2972
+ "offset",
2973
+ 0
2974
+ );
2975
+ _defineProperty(this, "xmlMode", void 0);
2976
+ _defineProperty(this, "decodeEntities", void 0);
2977
+ _defineProperty(this, "recognizeSelfClosing", void 0);
2978
+ _defineProperty(this, "entityDecoder", void 0);
2979
+ _defineProperty(this, "currentSequence", Sequences.Empty);
2980
+ _defineProperty(this, "sequenceIndex", 0);
2981
+ this.cbs = cbs;
2982
+ this.xmlMode = xmlMode;
2983
+ this.decodeEntities = decodeEntities;
2984
+ this.recognizeSelfClosing = recognizeSelfClosing;
2985
+ this.entityDecoder = new EntityDecoder(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed));
2986
+ }
2987
+ reset() {
2988
+ this.state = State.Text;
2989
+ this.buffer = "";
2990
+ this.sectionStart = 0;
2991
+ this.index = 0;
2992
+ this.baseState = State.Text;
2993
+ this.isSpecial = false;
2994
+ this.currentSequence = Sequences.Empty;
2995
+ this.sequenceIndex = 0;
2996
+ this.running = true;
2997
+ this.offset = 0;
2998
+ }
2999
+ write(chunk) {
3000
+ this.offset += this.buffer.length;
3001
+ this.buffer = chunk;
3002
+ this.parse();
3003
+ }
3004
+ end() {
3005
+ if (this.running) this.finish();
3006
+ }
3007
+ pause() {
3008
+ this.running = false;
3009
+ }
3010
+ resume() {
3011
+ this.running = true;
3012
+ if (this.index < this.buffer.length + this.offset) this.parse();
3013
+ }
3014
+ stateText(c) {
3015
+ if (c === CharCodes.Lt || !this.decodeEntities && this.fastForwardTo(CharCodes.Lt)) {
3016
+ if (this.index > this.sectionStart) this.cbs.ontext(this.sectionStart, this.index);
3017
+ this.state = State.BeforeTagName;
3018
+ this.sectionStart = this.index;
3019
+ } else if (this.decodeEntities && c === CharCodes.Amp) this.startEntity();
3020
+ }
3021
+ enterTagBody() {
3022
+ if (this.currentSequence === Sequences.Plaintext) {
3023
+ this.currentSequence = Sequences.Empty;
3024
+ this.state = State.InPlainText;
3025
+ } else if (this.isSpecial) {
3026
+ this.state = State.InSpecialTag;
3027
+ this.sequenceIndex = 0;
3028
+ } else this.state = State.Text;
3029
+ }
3030
+ /**
3031
+ * Match the opening tag name against an HTML text-only tag sequence.
3032
+ *
3033
+ * Some tags share an initial prefix (`script`/`style`, `title`/`textarea`,
3034
+ * `noembed`/`noframes`), so we may switch to an alternate sequence at the
3035
+ * first distinguishing byte. On a successful full match we fall back to
3036
+ * the normal tag-name state; a later `>` will enter raw-text, RCDATA, or
3037
+ * plaintext mode based on `currentSequence` / `isSpecial`.
3038
+ * @param c Current character code point.
3039
+ */
3040
+ stateSpecialStartSequence(c) {
3041
+ const lower = c | 32;
3042
+ if (this.sequenceIndex < this.currentSequence.length) {
3043
+ if (lower === this.currentSequence[this.sequenceIndex]) {
3044
+ this.sequenceIndex++;
3045
+ return;
3046
+ }
3047
+ if (this.sequenceIndex === 3) {
3048
+ if (this.currentSequence === Sequences.ScriptEnd && lower === Sequences.StyleEnd[3]) {
3049
+ this.currentSequence = Sequences.StyleEnd;
3050
+ this.sequenceIndex = 4;
3051
+ return;
3052
+ }
3053
+ if (this.currentSequence === Sequences.TitleEnd && lower === Sequences.TextareaEnd[3]) {
3054
+ this.currentSequence = Sequences.TextareaEnd;
3055
+ this.sequenceIndex = 4;
3056
+ return;
3057
+ }
3058
+ } else if (this.sequenceIndex === 4 && this.currentSequence === Sequences.NoembedEnd && lower === Sequences.NoframesEnd[4]) {
3059
+ this.currentSequence = Sequences.NoframesEnd;
3060
+ this.sequenceIndex = 5;
3061
+ return;
3062
+ }
3063
+ } else if (isEndOfTagSection(c)) {
3064
+ this.sequenceIndex = 0;
3065
+ this.state = State.InTagName;
3066
+ this.stateInTagName(c);
3067
+ return;
3068
+ }
3069
+ this.isSpecial = false;
3070
+ this.currentSequence = Sequences.Empty;
3071
+ this.sequenceIndex = 0;
3072
+ this.state = State.InTagName;
3073
+ this.stateInTagName(c);
3074
+ }
3075
+ stateCDATASequence(c) {
3076
+ if (c === Sequences.Cdata[this.sequenceIndex]) {
3077
+ if (++this.sequenceIndex === Sequences.Cdata.length) {
3078
+ this.state = State.InCommentLike;
3079
+ this.currentSequence = Sequences.CdataEnd;
3080
+ this.sequenceIndex = 0;
3081
+ this.sectionStart = this.index + 1;
3082
+ }
3083
+ } else {
3084
+ this.sequenceIndex = 0;
3085
+ if (this.xmlMode) {
3086
+ this.state = State.InDeclaration;
3087
+ this.stateInDeclaration(c);
3088
+ } else {
3089
+ this.state = State.InSpecialComment;
3090
+ this.stateInSpecialComment(c);
3091
+ }
3092
+ }
3093
+ }
3094
+ /**
3095
+ * When we wait for one specific character, we can speed things up
3096
+ * by skipping through the buffer until we find it.
3097
+ * @param c Current character code point.
3098
+ * @returns Whether the character was found.
3099
+ */
3100
+ fastForwardTo(c) {
3101
+ while (++this.index < this.buffer.length + this.offset) if (this.buffer.charCodeAt(this.index - this.offset) === c) return true;
3102
+ this.index = this.buffer.length + this.offset - 1;
3103
+ return false;
3104
+ }
3105
+ /**
3106
+ * Emit a comment token and return to the text state.
3107
+ * @param offset Number of characters in the end sequence that have already been matched.
3108
+ */
3109
+ emitComment(offset) {
3110
+ this.cbs.oncomment(this.sectionStart, this.index, offset);
3111
+ this.sequenceIndex = 0;
3112
+ this.sectionStart = this.index + 1;
3113
+ this.state = State.Text;
3114
+ }
3115
+ /**
3116
+ * Comments and CDATA end with `-->` and `]]>`.
3117
+ *
3118
+ * Their common qualities are:
3119
+ * - Their end sequences have a distinct character they start with.
3120
+ * - That character is then repeated, so we have to check multiple repeats.
3121
+ * - All characters but the start character of the sequence can be skipped.
3122
+ * @param c Current character code point.
3123
+ */
3124
+ stateInCommentLike(c) {
3125
+ if (!this.xmlMode && this.currentSequence === Sequences.CommentEnd && this.sequenceIndex <= 1 && this.index === this.sectionStart + this.sequenceIndex && c === CharCodes.Gt) this.emitComment(this.sequenceIndex);
3126
+ else if (this.currentSequence === Sequences.CommentEnd && this.sequenceIndex === 2 && c === CharCodes.Gt) this.emitComment(2);
3127
+ else if (this.currentSequence === Sequences.CommentEnd && this.sequenceIndex === this.currentSequence.length - 1 && c !== CharCodes.Gt) this.sequenceIndex = Number(c === CharCodes.Dash);
3128
+ else if (c === this.currentSequence[this.sequenceIndex]) {
3129
+ if (++this.sequenceIndex === this.currentSequence.length) {
3130
+ if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, this.index, 2);
3131
+ else this.cbs.oncomment(this.sectionStart, this.index, 3);
3132
+ this.sequenceIndex = 0;
3133
+ this.sectionStart = this.index + 1;
3134
+ this.state = State.Text;
3135
+ }
3136
+ } else if (this.sequenceIndex === 0) {
3137
+ if (this.fastForwardTo(this.currentSequence[0])) this.sequenceIndex = 1;
3138
+ } else if (c !== this.currentSequence[this.sequenceIndex - 1]) this.sequenceIndex = 0;
3139
+ }
3140
+ /**
3141
+ * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
3142
+ *
3143
+ * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
3144
+ * We allow anything that wouldn't end the tag.
3145
+ * @param c Current character code point.
3146
+ */
3147
+ isTagStartChar(c) {
3148
+ return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
3149
+ }
3150
+ /**
3151
+ * Scan raw-text / RCDATA content for the matching end tag.
3152
+ *
3153
+ * For RCDATA tags (`<title>`, `<textarea>`) entities are decoded inline.
3154
+ * For raw-text tags (`<script>`, `<style>`, etc.) we fast-forward to `<`.
3155
+ * @param c Current character code point.
3156
+ */
3157
+ stateInSpecialTag(c) {
3158
+ if (this.sequenceIndex === this.currentSequence.length) {
3159
+ if (isEndOfTagSection(c)) {
3160
+ const endOfText = this.index - this.currentSequence.length;
3161
+ if (this.sectionStart < endOfText) {
3162
+ const actualIndex = this.index;
3163
+ this.index = endOfText;
3164
+ this.cbs.ontext(this.sectionStart, endOfText);
3165
+ this.index = actualIndex;
3166
+ }
3167
+ this.isSpecial = false;
3168
+ this.sectionStart = endOfText + 2;
3169
+ this.stateInClosingTagName(c);
3170
+ return;
3171
+ }
3172
+ this.sequenceIndex = 0;
3173
+ }
3174
+ if ((c | 32) === this.currentSequence[this.sequenceIndex]) this.sequenceIndex += 1;
3175
+ else if (this.sequenceIndex === 0) {
3176
+ if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd) {
3177
+ if (this.decodeEntities && c === CharCodes.Amp) this.startEntity();
3178
+ } else if (this.fastForwardTo(CharCodes.Lt)) this.sequenceIndex = 1;
3179
+ } else this.sequenceIndex = Number(c === CharCodes.Lt);
3180
+ }
3181
+ stateBeforeTagName(c) {
3182
+ if (c === CharCodes.ExclamationMark) {
3183
+ this.state = State.BeforeDeclaration;
3184
+ this.sectionStart = this.index + 1;
3185
+ } else if (c === CharCodes.Questionmark) if (this.xmlMode) {
3186
+ this.state = State.InProcessingInstruction;
3187
+ this.sequenceIndex = 0;
3188
+ this.sectionStart = this.index + 1;
3189
+ } else {
3190
+ this.state = State.InSpecialComment;
3191
+ this.sectionStart = this.index;
3192
+ }
3193
+ else if (this.isTagStartChar(c)) {
3194
+ this.sectionStart = this.index;
3195
+ const special = this.xmlMode || this.cbs.isInForeignContext?.() ? void 0 : specialStartSequences.get(c | 32);
3196
+ if (special === void 0) this.state = State.InTagName;
3197
+ else {
3198
+ this.isSpecial = true;
3199
+ this.currentSequence = special;
3200
+ this.sequenceIndex = 3;
3201
+ this.state = State.SpecialStartSequence;
3202
+ }
3203
+ } else if (c === CharCodes.Slash) this.state = State.BeforeClosingTagName;
3204
+ else {
3205
+ this.state = State.Text;
3206
+ this.stateText(c);
3207
+ }
3208
+ }
3209
+ stateInTagName(c) {
3210
+ if (isEndOfTagSection(c)) {
3211
+ this.cbs.onopentagname(this.sectionStart, this.index);
3212
+ this.sectionStart = -1;
3213
+ this.state = State.BeforeAttributeName;
3214
+ this.stateBeforeAttributeName(c);
3215
+ }
3216
+ }
3217
+ stateBeforeClosingTagName(c) {
3218
+ if (isWhitespace$1(c)) if (this.xmlMode) {} else {
3219
+ this.state = State.InSpecialComment;
3220
+ this.sectionStart = this.index;
3221
+ }
3222
+ else if (c === CharCodes.Gt) {
3223
+ this.state = State.Text;
3224
+ if (!this.xmlMode) this.sectionStart = this.index + 1;
3225
+ } else {
3226
+ this.state = this.isTagStartChar(c) ? State.InClosingTagName : State.InSpecialComment;
3227
+ this.sectionStart = this.index;
3228
+ }
3229
+ }
3230
+ stateInClosingTagName(c) {
3231
+ if (isEndOfTagSection(c)) {
3232
+ this.cbs.onclosetag(this.sectionStart, this.index);
3233
+ this.sectionStart = -1;
3234
+ this.state = State.AfterClosingTagName;
3235
+ this.stateAfterClosingTagName(c);
3236
+ }
3237
+ }
3238
+ stateAfterClosingTagName(c) {
3239
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
3240
+ this.state = State.Text;
3241
+ this.sectionStart = this.index + 1;
3242
+ }
3243
+ }
3244
+ stateBeforeAttributeName(c) {
3245
+ if (c === CharCodes.Gt) {
3246
+ this.cbs.onopentagend(this.index);
3247
+ this.enterTagBody();
3248
+ this.sectionStart = this.index + 1;
3249
+ } else if (c === CharCodes.Slash) this.state = State.InSelfClosingTag;
3250
+ else if (!isWhitespace$1(c)) {
3251
+ this.state = State.InAttributeName;
3252
+ this.sectionStart = this.index;
3253
+ }
3254
+ }
3255
+ /**
3256
+ * Handle `/` before `>` in an opening tag.
3257
+ *
3258
+ * In HTML mode, text-only tags ignore the self-closing flag and still enter
3259
+ * their raw-text/RCDATA/plaintext state unless self-closing tags are being
3260
+ * recognized. In XML mode, or for ordinary tags, the tokenizer returns to
3261
+ * regular text parsing after emitting the self-closing callback.
3262
+ * @param c Current character code point.
3263
+ */
3264
+ stateInSelfClosingTag(c) {
3265
+ if (c === CharCodes.Gt) {
3266
+ this.cbs.onselfclosingtag(this.index);
3267
+ this.sectionStart = this.index + 1;
3268
+ if (!this.recognizeSelfClosing) {
3269
+ this.enterTagBody();
3270
+ return;
3271
+ }
3272
+ this.state = State.Text;
3273
+ this.isSpecial = false;
3274
+ this.currentSequence = Sequences.Empty;
3275
+ } else if (!isWhitespace$1(c)) {
3276
+ this.state = State.BeforeAttributeName;
3277
+ this.stateBeforeAttributeName(c);
3278
+ }
3279
+ }
3280
+ stateInAttributeName(c) {
3281
+ if (c === CharCodes.Eq || isEndOfTagSection(c)) {
3282
+ this.cbs.onattribname(this.sectionStart, this.index);
3283
+ this.sectionStart = this.index;
3284
+ this.state = State.AfterAttributeName;
3285
+ this.stateAfterAttributeName(c);
3286
+ }
3287
+ }
3288
+ stateAfterAttributeName(c) {
3289
+ if (c === CharCodes.Eq) this.state = State.BeforeAttributeValue;
3290
+ else if (c === CharCodes.Slash || c === CharCodes.Gt) {
3291
+ this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);
3292
+ this.sectionStart = -1;
3293
+ this.state = State.BeforeAttributeName;
3294
+ this.stateBeforeAttributeName(c);
3295
+ } else if (!isWhitespace$1(c)) {
3296
+ this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);
3297
+ this.state = State.InAttributeName;
3298
+ this.sectionStart = this.index;
3299
+ }
3300
+ }
3301
+ stateBeforeAttributeValue(c) {
3302
+ if (c === CharCodes.DoubleQuote) {
3303
+ this.state = State.InAttributeValueDq;
3304
+ this.sectionStart = this.index + 1;
3305
+ } else if (c === CharCodes.SingleQuote) {
3306
+ this.state = State.InAttributeValueSq;
3307
+ this.sectionStart = this.index + 1;
3308
+ } else if (!isWhitespace$1(c)) {
3309
+ this.sectionStart = this.index;
3310
+ this.state = State.InAttributeValueNq;
3311
+ this.stateInAttributeValueNoQuotes(c);
3312
+ }
3313
+ }
3314
+ handleInAttributeValue(c, quote) {
3315
+ if (c === quote || !this.decodeEntities && this.fastForwardTo(quote)) {
3316
+ this.cbs.onattribdata(this.sectionStart, this.index);
3317
+ this.sectionStart = -1;
3318
+ this.cbs.onattribend(quote === CharCodes.DoubleQuote ? QuoteType.Double : QuoteType.Single, this.index + 1);
3319
+ this.state = State.BeforeAttributeName;
3320
+ } else if (this.decodeEntities && c === CharCodes.Amp) this.startEntity();
3321
+ }
3322
+ stateInAttributeValueDoubleQuotes(c) {
3323
+ this.handleInAttributeValue(c, CharCodes.DoubleQuote);
3324
+ }
3325
+ stateInAttributeValueSingleQuotes(c) {
3326
+ this.handleInAttributeValue(c, CharCodes.SingleQuote);
3327
+ }
3328
+ stateInAttributeValueNoQuotes(c) {
3329
+ if (isWhitespace$1(c) || c === CharCodes.Gt) {
3330
+ this.cbs.onattribdata(this.sectionStart, this.index);
3331
+ this.sectionStart = -1;
3332
+ this.cbs.onattribend(QuoteType.Unquoted, this.index);
3333
+ this.state = State.BeforeAttributeName;
3334
+ this.stateBeforeAttributeName(c);
3335
+ } else if (this.decodeEntities && c === CharCodes.Amp) this.startEntity();
3336
+ }
3337
+ /**
3338
+ * Distinguish between CDATA, declarations, HTML comments, and HTML bogus
3339
+ * comments after `<!`.
3340
+ *
3341
+ * In HTML mode, only real comments and doctypes stay on declaration paths;
3342
+ * everything else becomes a bogus comment terminated by the next `>`.
3343
+ * @param c Current character code point.
3344
+ */
3345
+ stateBeforeDeclaration(c) {
3346
+ if (c === CharCodes.OpeningSquareBracket) {
3347
+ this.state = State.CDATASequence;
3348
+ this.sequenceIndex = 0;
3349
+ } else if (this.xmlMode) this.state = c === CharCodes.Dash ? State.BeforeComment : State.InDeclaration;
3350
+ else if ((c | 32) === Sequences.Doctype[0]) {
3351
+ this.state = State.DeclarationSequence;
3352
+ this.currentSequence = Sequences.Doctype;
3353
+ this.sequenceIndex = 1;
3354
+ } else if (c === CharCodes.Gt) {
3355
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
3356
+ this.state = State.Text;
3357
+ this.sectionStart = this.index + 1;
3358
+ } else if (c === CharCodes.Dash) this.state = State.BeforeComment;
3359
+ else this.state = State.InSpecialComment;
3360
+ }
3361
+ /**
3362
+ * Continue matching `doctype` after `<!d`.
3363
+ *
3364
+ * A full `doctype` match stays on the declaration path; any other name falls
3365
+ * back to an HTML bogus comment, which matches browser behavior for
3366
+ * non-doctype `<!...>` constructs.
3367
+ * @param c Current character code point.
3368
+ */
3369
+ stateDeclarationSequence(c) {
3370
+ if (this.sequenceIndex === this.currentSequence.length) {
3371
+ this.state = State.InDeclaration;
3372
+ this.stateInDeclaration(c);
3373
+ } else if ((c | 32) === this.currentSequence[this.sequenceIndex]) this.sequenceIndex += 1;
3374
+ else if (c === CharCodes.Gt) {
3375
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
3376
+ this.state = State.Text;
3377
+ this.sectionStart = this.index + 1;
3378
+ } else this.state = State.InSpecialComment;
3379
+ }
3380
+ stateInDeclaration(c) {
3381
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
3382
+ this.cbs.ondeclaration(this.sectionStart, this.index);
3383
+ this.state = State.Text;
3384
+ this.sectionStart = this.index + 1;
3385
+ }
3386
+ }
3387
+ /**
3388
+ * XML processing instructions (`<?...?>`).
3389
+ *
3390
+ * In HTML mode `<?` is routed to `InSpecialComment` instead, so this
3391
+ * state is only reachable in XML mode.
3392
+ * @param c Current character code point.
3393
+ */
3394
+ stateInProcessingInstruction(c) {
3395
+ if (c === CharCodes.Questionmark) this.sequenceIndex = 1;
3396
+ else if (c === CharCodes.Gt && this.sequenceIndex === 1) {
3397
+ this.cbs.onprocessinginstruction(this.sectionStart, this.index - 1);
3398
+ this.sequenceIndex = 0;
3399
+ this.state = State.Text;
3400
+ this.sectionStart = this.index + 1;
3401
+ } else this.sequenceIndex = Number(this.fastForwardTo(CharCodes.Questionmark));
3402
+ }
3403
+ stateBeforeComment(c) {
3404
+ if (c === CharCodes.Dash) {
3405
+ this.state = State.InCommentLike;
3406
+ this.currentSequence = Sequences.CommentEnd;
3407
+ this.sequenceIndex = 0;
3408
+ this.sectionStart = this.index + 1;
3409
+ } else if (this.xmlMode) this.state = State.InDeclaration;
3410
+ else if (c === CharCodes.Gt) {
3411
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
3412
+ this.state = State.Text;
3413
+ this.sectionStart = this.index + 1;
3414
+ } else this.state = State.InSpecialComment;
3415
+ }
3416
+ stateInSpecialComment(c) {
3417
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
3418
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
3419
+ this.state = State.Text;
3420
+ this.sectionStart = this.index + 1;
3421
+ }
3422
+ }
3423
+ startEntity() {
3424
+ this.baseState = this.state;
3425
+ this.state = State.InEntity;
3426
+ this.entityStart = this.index;
3427
+ this.entityDecoder.startEntity(this.xmlMode ? DecodingMode.Strict : this.baseState === State.Text || this.baseState === State.InSpecialTag ? DecodingMode.Legacy : DecodingMode.Attribute);
3428
+ }
3429
+ stateInEntity() {
3430
+ const indexInBuffer = this.index - this.offset;
3431
+ const length = this.entityDecoder.write(this.buffer, indexInBuffer);
3432
+ if (length >= 0) {
3433
+ this.state = this.baseState;
3434
+ if (length === 0) this.index -= 1;
3435
+ } else {
3436
+ if (indexInBuffer < this.buffer.length && this.buffer.charCodeAt(indexInBuffer) === CharCodes.Amp) {
3437
+ this.state = this.baseState;
3438
+ this.index -= 1;
3439
+ return;
3440
+ }
3441
+ this.index = this.offset + this.buffer.length - 1;
3442
+ }
3443
+ }
3444
+ /**
3445
+ * Remove data that has already been consumed from the buffer.
3446
+ */
3447
+ cleanup() {
3448
+ if (this.running && this.sectionStart !== this.index) {
3449
+ if (this.state === State.Text || this.state === State.InPlainText || this.state === State.InSpecialTag && this.sequenceIndex === 0) {
3450
+ this.cbs.ontext(this.sectionStart, this.index);
3451
+ this.sectionStart = this.index;
3452
+ } else if (this.state === State.InAttributeValueDq || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueNq) {
3453
+ this.cbs.onattribdata(this.sectionStart, this.index);
3454
+ this.sectionStart = this.index;
3455
+ }
3456
+ }
3457
+ }
3458
+ shouldContinue() {
3459
+ return this.index < this.buffer.length + this.offset && this.running;
3460
+ }
3461
+ /**
3462
+ * Iterates through the buffer, calling the function corresponding to the current state.
3463
+ *
3464
+ * States that are more likely to be hit are higher up, as a performance improvement.
3465
+ */
3466
+ parse() {
3467
+ while (this.shouldContinue()) {
3468
+ const c = this.buffer.charCodeAt(this.index - this.offset);
3469
+ switch (this.state) {
3470
+ case State.Text:
3471
+ this.stateText(c);
3472
+ break;
3473
+ case State.InPlainText:
3474
+ this.index = this.buffer.length + this.offset - 1;
3475
+ break;
3476
+ case State.SpecialStartSequence:
3477
+ this.stateSpecialStartSequence(c);
3478
+ break;
3479
+ case State.InSpecialTag:
3480
+ this.stateInSpecialTag(c);
3481
+ break;
3482
+ case State.CDATASequence:
3483
+ this.stateCDATASequence(c);
3484
+ break;
3485
+ case State.DeclarationSequence:
3486
+ this.stateDeclarationSequence(c);
3487
+ break;
3488
+ case State.InAttributeValueDq:
3489
+ this.stateInAttributeValueDoubleQuotes(c);
3490
+ break;
3491
+ case State.InAttributeName:
3492
+ this.stateInAttributeName(c);
3493
+ break;
3494
+ case State.InCommentLike:
3495
+ this.stateInCommentLike(c);
3496
+ break;
3497
+ case State.InSpecialComment:
3498
+ this.stateInSpecialComment(c);
3499
+ break;
3500
+ case State.BeforeAttributeName:
3501
+ this.stateBeforeAttributeName(c);
3502
+ break;
3503
+ case State.InTagName:
3504
+ this.stateInTagName(c);
3505
+ break;
3506
+ case State.InClosingTagName:
3507
+ this.stateInClosingTagName(c);
3508
+ break;
3509
+ case State.BeforeTagName:
3510
+ this.stateBeforeTagName(c);
3511
+ break;
3512
+ case State.AfterAttributeName:
3513
+ this.stateAfterAttributeName(c);
3514
+ break;
3515
+ case State.InAttributeValueSq:
3516
+ this.stateInAttributeValueSingleQuotes(c);
3517
+ break;
3518
+ case State.BeforeAttributeValue:
3519
+ this.stateBeforeAttributeValue(c);
3520
+ break;
3521
+ case State.BeforeClosingTagName:
3522
+ this.stateBeforeClosingTagName(c);
3523
+ break;
3524
+ case State.AfterClosingTagName:
3525
+ this.stateAfterClosingTagName(c);
3526
+ break;
3527
+ case State.InAttributeValueNq:
3528
+ this.stateInAttributeValueNoQuotes(c);
3529
+ break;
3530
+ case State.InSelfClosingTag:
3531
+ this.stateInSelfClosingTag(c);
3532
+ break;
3533
+ case State.InDeclaration:
3534
+ this.stateInDeclaration(c);
3535
+ break;
3536
+ case State.BeforeDeclaration:
3537
+ this.stateBeforeDeclaration(c);
3538
+ break;
3539
+ case State.BeforeComment:
3540
+ this.stateBeforeComment(c);
3541
+ break;
3542
+ case State.InProcessingInstruction:
3543
+ this.stateInProcessingInstruction(c);
3544
+ break;
3545
+ case State.InEntity:
3546
+ this.stateInEntity();
3547
+ break;
3548
+ }
3549
+ this.index++;
3550
+ }
3551
+ this.cleanup();
3552
+ }
3553
+ finish() {
3554
+ if (this.state === State.InEntity) {
3555
+ this.entityDecoder.end();
3556
+ this.state = this.baseState;
3557
+ }
3558
+ this.handleTrailingData();
3559
+ this.cbs.onend();
3560
+ }
3561
+ handleTrailingCommentLikeData(endIndex) {
3562
+ if (this.state !== State.InCommentLike) return false;
3563
+ if (this.currentSequence === Sequences.CdataEnd) if (this.xmlMode) {
3564
+ if (this.sectionStart < endIndex) this.cbs.oncdata(this.sectionStart, endIndex, 0);
3565
+ } else {
3566
+ const cdataStart = this.sectionStart - Sequences.Cdata.length - 1;
3567
+ this.cbs.oncomment(cdataStart, endIndex, 0);
3568
+ }
3569
+ else {
3570
+ const offset = this.xmlMode ? 0 : Math.min(this.sequenceIndex, Sequences.CommentEnd.length - 1);
3571
+ this.cbs.oncomment(this.sectionStart, endIndex, offset);
3572
+ }
3573
+ return true;
3574
+ }
3575
+ handleTrailingMarkupDeclaration(endIndex) {
3576
+ if (this.xmlMode) switch (this.state) {
3577
+ case State.InSpecialComment:
3578
+ case State.BeforeComment:
3579
+ case State.CDATASequence:
3580
+ case State.DeclarationSequence:
3581
+ case State.InDeclaration:
3582
+ this.cbs.ontext(this.sectionStart, endIndex);
3583
+ return true;
3584
+ default: return false;
3585
+ }
3586
+ switch (this.state) {
3587
+ case State.BeforeDeclaration:
3588
+ case State.InSpecialComment:
3589
+ case State.BeforeComment:
3590
+ case State.CDATASequence:
3591
+ this.cbs.oncomment(this.sectionStart, endIndex, 0);
3592
+ return true;
3593
+ case State.DeclarationSequence:
3594
+ if (this.sequenceIndex !== Sequences.Doctype.length) this.cbs.oncomment(this.sectionStart, endIndex, 0);
3595
+ return true;
3596
+ case State.InDeclaration: return true;
3597
+ default: return false;
3598
+ }
3599
+ }
3600
+ /** Handle any trailing data. */
3601
+ handleTrailingData() {
3602
+ const endIndex = this.buffer.length + this.offset;
3603
+ if (this.handleTrailingCommentLikeData(endIndex) || this.handleTrailingMarkupDeclaration(endIndex)) return;
3604
+ if (this.sectionStart >= endIndex) return;
3605
+ switch (this.state) {
3606
+ case State.InTagName:
3607
+ case State.BeforeAttributeName:
3608
+ case State.BeforeAttributeValue:
3609
+ case State.AfterAttributeName:
3610
+ case State.InAttributeName:
3611
+ case State.InAttributeValueSq:
3612
+ case State.InAttributeValueDq:
3613
+ case State.InAttributeValueNq:
3614
+ case State.InClosingTagName: break;
3615
+ default: this.cbs.ontext(this.sectionStart, endIndex);
3616
+ }
3617
+ }
3618
+ emitCodePoint(cp, consumed) {
3619
+ if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) {
3620
+ if (this.sectionStart < this.entityStart) this.cbs.onattribdata(this.sectionStart, this.entityStart);
3621
+ this.sectionStart = this.entityStart + consumed;
3622
+ this.index = this.sectionStart - 1;
3623
+ this.cbs.onattribentity(cp);
3624
+ } else {
3625
+ if (this.sectionStart < this.entityStart) this.cbs.ontext(this.sectionStart, this.entityStart);
3626
+ this.sectionStart = this.entityStart + consumed;
3627
+ this.index = this.sectionStart - 1;
3628
+ this.cbs.ontextentity(cp, this.sectionStart);
3629
+ }
3630
+ }
3631
+ };
3632
+ //#endregion
3633
+ //#region ../../node_modules/.pnpm/htmlparser2@12.0.0/node_modules/htmlparser2/dist/Parser.js
3634
+ const { fromCodePoint } = String;
3635
+ const formTags = new Set([
3636
+ "input",
3637
+ "option",
3638
+ "optgroup",
3639
+ "select",
3640
+ "button",
3641
+ "datalist",
3642
+ "textarea"
3643
+ ]);
3644
+ const pTag = new Set(["p"]);
3645
+ const headingTags = new Set([
3646
+ "h1",
3647
+ "h2",
3648
+ "h3",
3649
+ "h4",
3650
+ "h5",
3651
+ "h6",
3652
+ "p"
3653
+ ]);
3654
+ const tableSectionTags = new Set(["thead", "tbody"]);
3655
+ const ddtTags = new Set(["dd", "dt"]);
3656
+ const rtpTags = new Set(["rt", "rp"]);
3657
+ const openImpliesClose = new Map([
3658
+ ["tr", new Set([
3659
+ "tr",
3660
+ "th",
3661
+ "td"
3662
+ ])],
3663
+ ["th", new Set(["th"])],
3664
+ ["td", new Set([
3665
+ "thead",
3666
+ "th",
3667
+ "td"
3668
+ ])],
3669
+ ["body", new Set([
3670
+ "head",
3671
+ "link",
3672
+ "script"
3673
+ ])],
3674
+ ["a", new Set(["a"])],
3675
+ ["li", new Set(["li"])],
3676
+ ["p", pTag],
3677
+ ["h1", headingTags],
3678
+ ["h2", headingTags],
3679
+ ["h3", headingTags],
3680
+ ["h4", headingTags],
3681
+ ["h5", headingTags],
3682
+ ["h6", headingTags],
3683
+ ["select", formTags],
3684
+ ["input", formTags],
3685
+ ["output", formTags],
3686
+ ["button", formTags],
3687
+ ["datalist", formTags],
3688
+ ["textarea", formTags],
3689
+ ["option", new Set(["option"])],
3690
+ ["optgroup", new Set(["optgroup", "option"])],
3691
+ ["dd", ddtTags],
3692
+ ["dt", ddtTags],
3693
+ ["address", pTag],
3694
+ ["article", pTag],
3695
+ ["aside", pTag],
3696
+ ["blockquote", pTag],
3697
+ ["details", pTag],
3698
+ ["div", pTag],
3699
+ ["dl", pTag],
3700
+ ["fieldset", pTag],
3701
+ ["figcaption", pTag],
3702
+ ["figure", pTag],
3703
+ ["footer", pTag],
3704
+ ["form", pTag],
3705
+ ["header", pTag],
3706
+ ["hr", pTag],
3707
+ ["main", pTag],
3708
+ ["nav", pTag],
3709
+ ["ol", pTag],
3710
+ ["pre", pTag],
3711
+ ["section", pTag],
3712
+ ["table", pTag],
3713
+ ["ul", pTag],
3714
+ ["rt", rtpTags],
3715
+ ["rp", rtpTags],
3716
+ ["tbody", tableSectionTags],
3717
+ ["tfoot", tableSectionTags]
3718
+ ]);
3719
+ const DOCUMENT_TYPE = "doctype";
3720
+ const voidElements = new Set([
3721
+ "area",
3722
+ "base",
3723
+ "basefont",
3724
+ "br",
3725
+ "col",
3726
+ "command",
3727
+ "embed",
3728
+ "frame",
3729
+ "hr",
3730
+ "img",
3731
+ "input",
3732
+ "isindex",
3733
+ "keygen",
3734
+ "link",
3735
+ "meta",
3736
+ "param",
3737
+ "source",
3738
+ "track",
3739
+ "wbr"
3740
+ ]);
3741
+ const foreignContextElements = new Set(["math", "svg"]);
3742
+ /**
3743
+ * Elements that can be used to integrate HTML content within foreign namespaces (e.g., SVG or MathML).
3744
+ *
3745
+ * Entries must use the SVG-adjusted casing (e.g. "foreignObject" not
3746
+ * "foreignobject") since they are compared against adjusted tag names.
3747
+ */
3748
+ const htmlIntegrationElements = new Set([
3749
+ "mi",
3750
+ "mo",
3751
+ "mn",
3752
+ "ms",
3753
+ "mtext",
3754
+ "annotation-xml",
3755
+ "foreignObject",
3756
+ "desc",
3757
+ "title"
3758
+ ]);
3759
+ const svgTagNameAdjustments = new Map([
3760
+ ["altglyph", "altGlyph"],
3761
+ ["altglyphdef", "altGlyphDef"],
3762
+ ["altglyphitem", "altGlyphItem"],
3763
+ ["animatecolor", "animateColor"],
3764
+ ["animatemotion", "animateMotion"],
3765
+ ["animatetransform", "animateTransform"],
3766
+ ["clippath", "clipPath"],
3767
+ ["feblend", "feBlend"],
3768
+ ["fecolormatrix", "feColorMatrix"],
3769
+ ["fecomponenttransfer", "feComponentTransfer"],
3770
+ ["fecomposite", "feComposite"],
3771
+ ["feconvolvematrix", "feConvolveMatrix"],
3772
+ ["fediffuselighting", "feDiffuseLighting"],
3773
+ ["fedisplacementmap", "feDisplacementMap"],
3774
+ ["fedistantlight", "feDistantLight"],
3775
+ ["fedropshadow", "feDropShadow"],
3776
+ ["feflood", "feFlood"],
3777
+ ["fefunca", "feFuncA"],
3778
+ ["fefuncb", "feFuncB"],
3779
+ ["fefuncg", "feFuncG"],
3780
+ ["fefuncr", "feFuncR"],
3781
+ ["fegaussianblur", "feGaussianBlur"],
3782
+ ["feimage", "feImage"],
3783
+ ["femerge", "feMerge"],
3784
+ ["femergenode", "feMergeNode"],
3785
+ ["femorphology", "feMorphology"],
3786
+ ["feoffset", "feOffset"],
3787
+ ["fepointlight", "fePointLight"],
3788
+ ["fespecularlighting", "feSpecularLighting"],
3789
+ ["fespotlight", "feSpotLight"],
3790
+ ["fetile", "feTile"],
3791
+ ["feturbulence", "feTurbulence"],
3792
+ ["foreignobject", "foreignObject"],
3793
+ ["glyphref", "glyphRef"],
3794
+ ["lineargradient", "linearGradient"],
3795
+ ["radialgradient", "radialGradient"],
3796
+ ["textpath", "textPath"]
3797
+ ]);
3798
+ var ForeignContext;
3799
+ (function(ForeignContext) {
3800
+ ForeignContext[ForeignContext["None"] = 0] = "None";
3801
+ ForeignContext[ForeignContext["Svg"] = 1] = "Svg";
3802
+ ForeignContext[ForeignContext["MathML"] = 2] = "MathML";
3803
+ })(ForeignContext || (ForeignContext = {}));
3804
+ const reNameEnd = /\s|\//;
3805
+ /**
3806
+ * Incremental parser implementation.
3807
+ */
3808
+ var Parser = class {
3809
+ constructor(cbs, options = {}) {
3810
+ _defineProperty(this, "options", void 0);
3811
+ _defineProperty(
3812
+ this,
3813
+ /** The start index of the last event. */
3814
+ "startIndex",
3815
+ 0
3816
+ );
3817
+ _defineProperty(
3818
+ this,
3819
+ /** The end index of the last event. */
3820
+ "endIndex",
3821
+ 0
3822
+ );
3823
+ _defineProperty(
3824
+ this,
3825
+ /**
3826
+ * Store the start index of the current open tag,
3827
+ * so we can update the start index for attributes.
3828
+ */
3829
+ "openTagStart",
3830
+ 0
3831
+ );
3832
+ _defineProperty(this, "tagname", "");
3833
+ _defineProperty(this, "attribname", "");
3834
+ _defineProperty(this, "attribvalue", "");
3835
+ _defineProperty(this, "attribs", null);
3836
+ _defineProperty(this, "stack", []);
3837
+ _defineProperty(this, "foreignContext", void 0);
3838
+ _defineProperty(this, "cbs", void 0);
3839
+ _defineProperty(this, "lowerCaseTagNames", void 0);
3840
+ _defineProperty(this, "lowerCaseAttributeNames", void 0);
3841
+ _defineProperty(this, "recognizeSelfClosing", void 0);
3842
+ _defineProperty(
3843
+ this,
3844
+ /** We are parsing HTML. Inverse of the `xmlMode` option. */
3845
+ "htmlMode",
3846
+ void 0
3847
+ );
3848
+ _defineProperty(this, "tokenizer", void 0);
3849
+ _defineProperty(this, "buffers", []);
3850
+ _defineProperty(this, "bufferOffset", 0);
3851
+ _defineProperty(
3852
+ this,
3853
+ /** The index of the last written buffer. Used when resuming after a `pause()`. */
3854
+ "writeIndex",
3855
+ 0
3856
+ );
3857
+ _defineProperty(
3858
+ this,
3859
+ /** Indicates whether the parser has finished running / `.end` has been called. */
3860
+ "ended",
3861
+ false
3862
+ );
3863
+ this.options = options;
3864
+ this.cbs = cbs ?? {};
3865
+ this.htmlMode = !this.options.xmlMode;
3866
+ this.lowerCaseTagNames = options.lowerCaseTags ?? this.htmlMode;
3867
+ this.lowerCaseAttributeNames = options.lowerCaseAttributeNames ?? this.htmlMode;
3868
+ this.recognizeSelfClosing = options.recognizeSelfClosing ?? !this.htmlMode;
3869
+ this.tokenizer = new (options.Tokenizer ?? Tokenizer$1)(this.options, this);
3870
+ this.foreignContext = [ForeignContext.None];
3871
+ this.cbs.onparserinit?.(this);
3872
+ }
3873
+ /**
3874
+ * @param start Start index for the current parser event.
3875
+ * @param endIndex End index for the current parser event.
3876
+ * @internal
3877
+ */
3878
+ ontext(start, endIndex) {
3879
+ const data = this.getSlice(start, endIndex);
3880
+ this.endIndex = endIndex - 1;
3881
+ this.cbs.ontext?.(data);
3882
+ this.startIndex = endIndex;
3883
+ }
3884
+ /**
3885
+ * @param cp Current Unicode code point.
3886
+ * @param endIndex End index for the current parser event.
3887
+ * @internal
3888
+ */
3889
+ ontextentity(cp, endIndex) {
3890
+ this.endIndex = endIndex - 1;
3891
+ this.cbs.ontext?.(fromCodePoint(cp));
3892
+ this.startIndex = endIndex;
3893
+ }
3894
+ /** @internal */
3895
+ isInForeignContext() {
3896
+ return this.foreignContext[0] !== ForeignContext.None;
3897
+ }
3898
+ /**
3899
+ * Checks if the current tag is a void element. Override this if you want
3900
+ * to specify your own additional void elements.
3901
+ * @param name Name of the pseudo selector.
3902
+ */
3903
+ isVoidElement(name) {
3904
+ return this.htmlMode && voidElements.has(name);
3905
+ }
3906
+ /**
3907
+ * Read a tag name from the buffer.
3908
+ *
3909
+ * When `lowerCaseTagNames` is enabled (the default in HTML mode), the name
3910
+ * is lowercased and may be adjusted for SVG casing or the `image` → `img`
3911
+ * alias.
3912
+ * @param start Start index of the tag name in the buffer.
3913
+ * @param endIndex End index of the tag name in the buffer.
3914
+ */
3915
+ readTagName(start, endIndex) {
3916
+ const name = this.lowerCaseTagNames ? this.getSlice(start, endIndex).toLowerCase() : this.getSlice(start, endIndex);
3917
+ if (!(this.lowerCaseTagNames && this.htmlMode)) return name;
3918
+ if (this.foreignContext[0] === ForeignContext.Svg) return svgTagNameAdjustments.get(name) ?? name;
3919
+ if (this.foreignContext.length > 1) {
3920
+ const adjusted = svgTagNameAdjustments.get(name);
3921
+ if (adjusted !== void 0 && this.stack.includes(adjusted)) return adjusted;
3922
+ }
3923
+ if (!this.isInForeignContext()) return name === "image" ? "img" : name;
3924
+ return name;
3925
+ }
3926
+ /**
3927
+ * @param start Start index for the current parser event.
3928
+ * @param endIndex End index for the current parser event.
3929
+ * @internal
3930
+ */
3931
+ onopentagname(start, endIndex) {
3932
+ this.endIndex = endIndex;
3933
+ this.emitOpenTag(this.readTagName(start, endIndex));
3934
+ }
3935
+ emitOpenTag(name) {
3936
+ this.openTagStart = this.startIndex;
3937
+ this.tagname = name;
3938
+ if (this.htmlMode && name === "form" && this.stack.includes("form")) {
3939
+ this.tagname = "";
3940
+ return;
3941
+ }
3942
+ const impliesClose = this.htmlMode && openImpliesClose.get(name);
3943
+ if (impliesClose) while (this.stack.length > 0 && impliesClose.has(this.stack[0])) this.popElement(true);
3944
+ if (!this.isVoidElement(name)) {
3945
+ this.stack.unshift(name);
3946
+ if (this.htmlMode) {
3947
+ if (name === "svg") this.foreignContext.unshift(ForeignContext.Svg);
3948
+ else if (name === "math") this.foreignContext.unshift(ForeignContext.MathML);
3949
+ else if (htmlIntegrationElements.has(name)) this.foreignContext.unshift(ForeignContext.None);
3950
+ }
3951
+ }
3952
+ this.cbs.onopentagname?.(name);
3953
+ if (this.cbs.onopentag) this.attribs = {};
3954
+ }
3955
+ endOpenTag(isImplied) {
3956
+ this.startIndex = this.openTagStart;
3957
+ if (this.attribs) {
3958
+ this.cbs.onopentag?.(this.tagname, this.attribs, isImplied);
3959
+ this.attribs = null;
3960
+ }
3961
+ if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) this.cbs.onclosetag(this.tagname, true);
3962
+ this.tagname = "";
3963
+ }
3964
+ /**
3965
+ * @param endIndex End index for the current parser event.
3966
+ * @internal
3967
+ */
3968
+ onopentagend(endIndex) {
3969
+ this.endIndex = endIndex;
3970
+ this.endOpenTag(false);
3971
+ this.startIndex = endIndex + 1;
3972
+ }
3973
+ /**
3974
+ * @param start Start index for the current parser event.
3975
+ * @param endIndex End index for the current parser event.
3976
+ * @internal
3977
+ */
3978
+ onclosetag(start, endIndex) {
3979
+ this.endIndex = endIndex;
3980
+ const name = this.readTagName(start, endIndex);
3981
+ if (!this.isVoidElement(name)) {
3982
+ const pos = this.stack.indexOf(name);
3983
+ if (pos !== -1) {
3984
+ for (let index = 0; index < pos; index++) this.popElement(true);
3985
+ this.popElement(false);
3986
+ } else if (this.htmlMode && name === "p") {
3987
+ this.emitOpenTag("p");
3988
+ this.closeCurrentTag(true);
3989
+ }
3990
+ } else if (this.htmlMode && name === "br") {
3991
+ this.cbs.onopentagname?.("br");
3992
+ this.cbs.onopentag?.("br", {}, true);
3993
+ this.cbs.onclosetag?.("br", false);
3994
+ }
3995
+ this.startIndex = endIndex + 1;
3996
+ }
3997
+ /**
3998
+ * @param endIndex End index for the current parser event.
3999
+ * @internal
4000
+ */
4001
+ onselfclosingtag(endIndex) {
4002
+ this.endIndex = endIndex;
4003
+ if (this.recognizeSelfClosing || this.isInForeignContext()) {
4004
+ this.closeCurrentTag(false);
4005
+ this.startIndex = endIndex + 1;
4006
+ } else this.onopentagend(endIndex);
4007
+ }
4008
+ /**
4009
+ * Pop the top element off the stack, emit a close event, and maintain
4010
+ * the foreign context stack.
4011
+ * @param implied Whether this close is implied (not from an explicit end tag).
4012
+ */
4013
+ popElement(implied) {
4014
+ const element = this.stack.shift();
4015
+ if (this.htmlMode && (foreignContextElements.has(element) || htmlIntegrationElements.has(element))) this.foreignContext.shift();
4016
+ this.cbs.onclosetag?.(element, implied);
4017
+ }
4018
+ closeCurrentTag(isOpenImplied) {
4019
+ const name = this.tagname;
4020
+ this.endOpenTag(isOpenImplied);
4021
+ if (this.stack[0] === name) this.popElement(!isOpenImplied);
4022
+ }
4023
+ /**
4024
+ * @param start Start index for the current parser event.
4025
+ * @param endIndex End index for the current parser event.
4026
+ * @internal
4027
+ */
4028
+ onattribname(start, endIndex) {
4029
+ this.startIndex = start;
4030
+ const name = this.getSlice(start, endIndex);
4031
+ this.attribname = this.lowerCaseAttributeNames ? name.toLowerCase() : name;
4032
+ }
4033
+ /**
4034
+ * @param start Start index for the current parser event.
4035
+ * @param endIndex End index for the current parser event.
4036
+ * @internal
4037
+ */
4038
+ onattribdata(start, endIndex) {
4039
+ this.attribvalue += this.getSlice(start, endIndex);
4040
+ }
4041
+ /**
4042
+ * @param cp Current Unicode code point.
4043
+ * @internal
4044
+ */
4045
+ onattribentity(cp) {
4046
+ this.attribvalue += fromCodePoint(cp);
4047
+ }
4048
+ /**
4049
+ * @param quote Quote type used for the current attribute.
4050
+ * @param endIndex End index for the current parser event.
4051
+ * @internal
4052
+ */
4053
+ onattribend(quote, endIndex) {
4054
+ this.endIndex = endIndex;
4055
+ this.cbs.onattribute?.(this.attribname, this.attribvalue, quote === QuoteType.Double ? "\"" : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? void 0 : null);
4056
+ if (this.attribs && !Object.hasOwn(this.attribs, this.attribname)) this.attribs[this.attribname] = this.attribvalue;
4057
+ this.attribvalue = "";
4058
+ }
4059
+ getInstructionName(value) {
4060
+ const index = value.search(reNameEnd);
4061
+ let name = index < 0 ? value : value.substr(0, index);
4062
+ if (this.lowerCaseTagNames) name = name.toLowerCase();
4063
+ return name;
4064
+ }
4065
+ /**
4066
+ * @param start Start index for the current parser event.
4067
+ * @param endIndex End index for the current parser event.
4068
+ * @internal
4069
+ */
4070
+ ondeclaration(start, endIndex) {
4071
+ this.endIndex = endIndex;
4072
+ const value = this.getSlice(start, endIndex);
4073
+ if (this.cbs.onprocessinginstruction) {
4074
+ const name = this.htmlMode ? this.lowerCaseTagNames ? DOCUMENT_TYPE : value.slice(0, 7) : this.getInstructionName(value);
4075
+ this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);
4076
+ }
4077
+ this.startIndex = endIndex + 1;
4078
+ }
4079
+ /**
4080
+ * @param start Start index for the current parser event.
4081
+ * @param endIndex End index for the current parser event.
4082
+ * @internal
4083
+ */
4084
+ onprocessinginstruction(start, endIndex) {
4085
+ this.endIndex = endIndex;
4086
+ const value = this.getSlice(start, endIndex);
4087
+ if (this.cbs.onprocessinginstruction) {
4088
+ const name = this.getInstructionName(value);
4089
+ this.cbs.onprocessinginstruction(`?${name}`, `?${value}`);
4090
+ }
4091
+ this.startIndex = endIndex + 1;
4092
+ }
4093
+ /**
4094
+ * @param start Start index for the current parser event.
4095
+ * @param endIndex End index for the current parser event.
4096
+ * @param offset Offset applied when computing parser indices.
4097
+ * @internal
4098
+ */
4099
+ oncomment(start, endIndex, offset) {
4100
+ this.endIndex = endIndex;
4101
+ this.cbs.oncomment?.(this.getSlice(start, endIndex - offset));
4102
+ this.cbs.oncommentend?.();
4103
+ this.startIndex = endIndex + 1;
4104
+ }
4105
+ /**
4106
+ * @param start Start index for the current parser event.
4107
+ * @param endIndex End index for the current parser event.
4108
+ * @param offset Offset applied when computing parser indices.
4109
+ * @internal
4110
+ */
4111
+ oncdata(start, endIndex, offset) {
4112
+ this.endIndex = endIndex;
4113
+ const value = this.getSlice(start, endIndex - offset);
4114
+ if (!this.htmlMode || this.options.recognizeCDATA) {
4115
+ this.cbs.oncdatastart?.();
4116
+ this.cbs.ontext?.(value);
4117
+ this.cbs.oncdataend?.();
4118
+ } else if (this.isInForeignContext()) this.cbs.ontext?.(value);
4119
+ else {
4120
+ this.cbs.oncomment?.(`[CDATA[${value}]]`);
4121
+ this.cbs.oncommentend?.();
4122
+ }
4123
+ this.startIndex = endIndex + 1;
4124
+ }
4125
+ /** @internal */
4126
+ onend() {
4127
+ if (this.cbs.onclosetag) {
4128
+ this.endIndex = this.startIndex;
4129
+ for (let index = 0; index < this.stack.length; index++) this.cbs.onclosetag(this.stack[index], true);
4130
+ }
4131
+ this.cbs.onend?.();
4132
+ }
4133
+ /**
4134
+ * Resets the parser to a blank state, ready to parse a new HTML document
4135
+ */
4136
+ reset() {
4137
+ this.cbs.onreset?.();
4138
+ this.tokenizer.reset();
4139
+ this.tagname = "";
4140
+ this.attribname = "";
4141
+ this.attribvalue = "";
4142
+ this.attribs = null;
4143
+ this.stack.length = 0;
4144
+ this.startIndex = 0;
4145
+ this.endIndex = 0;
4146
+ this.cbs.onparserinit?.(this);
4147
+ this.buffers.length = 0;
4148
+ this.foreignContext.length = 0;
4149
+ this.foreignContext.unshift(ForeignContext.None);
4150
+ this.bufferOffset = 0;
4151
+ this.writeIndex = 0;
4152
+ this.ended = false;
4153
+ }
4154
+ /**
4155
+ * Resets the parser, then parses a complete document and
4156
+ * pushes it to the handler.
4157
+ * @param data Document to parse.
4158
+ */
4159
+ parseComplete(data) {
4160
+ this.reset();
4161
+ this.end(data);
4162
+ }
4163
+ getSlice(start, end) {
4164
+ if (start === end) return "";
4165
+ while (start - this.bufferOffset >= this.buffers[0].length) this.shiftBuffer();
4166
+ let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset);
4167
+ while (end - this.bufferOffset > this.buffers[0].length) {
4168
+ this.shiftBuffer();
4169
+ slice += this.buffers[0].slice(0, end - this.bufferOffset);
4170
+ }
4171
+ return slice;
4172
+ }
4173
+ shiftBuffer() {
4174
+ this.bufferOffset += this.buffers[0].length;
4175
+ this.writeIndex--;
4176
+ this.buffers.shift();
4177
+ }
4178
+ /**
4179
+ * Parses a chunk of data and calls the corresponding callbacks.
4180
+ * @param chunk Chunk to parse.
4181
+ */
4182
+ write(chunk) {
4183
+ if (this.ended) {
4184
+ this.cbs.onerror?.(/* @__PURE__ */ new Error(".write() after done!"));
4185
+ return;
4186
+ }
4187
+ this.buffers.push(chunk);
4188
+ if (this.tokenizer.running) {
4189
+ this.tokenizer.write(chunk);
4190
+ this.writeIndex++;
4191
+ }
4192
+ }
4193
+ /**
4194
+ * Parses the end of the buffer and clears the stack, calls onend.
4195
+ * @param chunk Optional final chunk to parse.
4196
+ */
4197
+ end(chunk) {
4198
+ if (this.ended) {
4199
+ this.cbs.onerror?.(/* @__PURE__ */ new Error(".end() after done!"));
4200
+ return;
4201
+ }
4202
+ if (chunk) this.write(chunk);
4203
+ this.ended = true;
4204
+ this.tokenizer.end();
4205
+ }
4206
+ /**
4207
+ * Pauses parsing. The parser won't emit events until `resume` is called.
4208
+ */
4209
+ pause() {
4210
+ this.tokenizer.pause();
4211
+ }
4212
+ /**
4213
+ * Resumes parsing after `pause` was called.
4214
+ */
4215
+ resume() {
4216
+ this.tokenizer.resume();
4217
+ while (this.tokenizer.running && this.writeIndex < this.buffers.length) this.tokenizer.write(this.buffers[this.writeIndex++]);
4218
+ if (this.ended) this.tokenizer.end();
4219
+ }
4220
+ };
4221
+ //#endregion
2236
4222
  //#region src/wxml/whitespace.ts
2237
4223
  const WHITESPACE_CODES = new Set([
2238
4224
  9,
@@ -2467,7 +4453,7 @@ async function customTemplateHandler(rawSource, options, cachedMatcher) {
2467
4453
  const lowerName = name.toLowerCase();
2468
4454
  return lowerName === "class" || lowerName === "hover-class" || lowerName === "virtualhostclass";
2469
4455
  }
2470
- const parser = new htmlparser2.Parser({
4456
+ const parser = new Parser({
2471
4457
  onopentagname(name) {
2472
4458
  tag = name;
2473
4459
  },
@@ -2715,6 +4701,12 @@ Object.defineProperty(exports, "JsTokenUpdater", {
2715
4701
  return JsTokenUpdater;
2716
4702
  }
2717
4703
  });
4704
+ Object.defineProperty(exports, "Parser", {
4705
+ enumerable: true,
4706
+ get: function() {
4707
+ return Parser;
4708
+ }
4709
+ });
2718
4710
  Object.defineProperty(exports, "_defineProperty", {
2719
4711
  enumerable: true,
2720
4712
  get: function() {