@hienlh/ppm 0.13.50 → 0.13.51

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 (132) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/assets/skills/ppm/SKILL.md +1 -1
  3. package/assets/skills/ppm/references/http-api.md +1 -1
  4. package/dist/web/assets/ai-settings-section-AuV6Lzz2.js +1 -2
  5. package/dist/web/assets/api-client-DIhJ5qVW.js +1 -2
  6. package/dist/web/assets/api-settings-C3T95dWg.js +1 -2
  7. package/dist/web/assets/arrow-up-Rcw6_KKu.js +1 -2
  8. package/dist/web/assets/{audio-preview-CILFIsuu.js → audio-preview-BQWWkcm0.js} +1 -2
  9. package/dist/web/assets/{chat-tab-DBYwH_Aa.js → chat-tab-B-QMa-uT.js} +5 -6
  10. package/dist/web/assets/chevron-right-DnHIvvcy.js +1 -2
  11. package/dist/web/assets/code-DGBecc50.js +1 -2
  12. package/dist/web/assets/{code-editor-MXnkYRLp.js → code-editor-DChspYxh.js} +3 -4
  13. package/dist/web/assets/{conflict-editor-C6wH5wV6.js → conflict-editor-C1dZ8tsU.js} +2 -3
  14. package/dist/web/assets/createLucideIcon-BjHrJDVb.js +1 -2
  15. package/dist/web/assets/csv-parser-Dly5nqE1.js +1 -2
  16. package/dist/web/assets/csv-preview-B3Dyhgho.js +1 -2
  17. package/dist/web/assets/data-grid-overlay-editor-C1UUm7Ob.js +1 -2
  18. package/dist/web/assets/data-grid-types-D2cHE8hx.js +1 -2
  19. package/dist/web/assets/database-DOWH9-Vv.js +1 -2
  20. package/dist/web/assets/{database-viewer-BjUruZLv.js → database-viewer-2KW73oEG.js} +1 -2
  21. package/dist/web/assets/{diff-viewer-B_nU7bQi.js → diff-viewer-BMla30lw.js} +2 -3
  22. package/dist/web/assets/dist-BoIkGNC8.js +1 -2
  23. package/dist/web/assets/dist-DVk8T0R5.js +1 -2
  24. package/dist/web/assets/esm-DCbn6xno.js +1 -2
  25. package/dist/web/assets/{extension-webview-B56ZfvoD.js → extension-webview-DpaCcCXq.js} +2 -3
  26. package/dist/web/assets/file-exclamation-point-BwzaQ50n.js +1 -2
  27. package/dist/web/assets/file-store-DOxcU_7s.js +1 -2
  28. package/dist/web/assets/{glide-data-grid-D-qQqqp7.js → glide-data-grid-D08bJMrD.js} +2 -3
  29. package/dist/web/assets/globe-B4Ilypbs.js +1 -2
  30. package/dist/web/assets/{image-preview-Dc6AiqYX.js → image-preview-DVQkHkSo.js} +1 -2
  31. package/dist/web/assets/{index-8_rE2Q1-.js → index-U7GK_3ED.js} +3 -4
  32. package/dist/web/assets/input-_LFQwhzd.js +1 -2
  33. package/dist/web/assets/katex-C10ndCVt.js +1 -2
  34. package/dist/web/assets/keybindings-store-B9gpby19.js +1 -0
  35. package/dist/web/assets/lib-C2D8j3K3.js +1 -2
  36. package/dist/web/assets/{markdown-renderer-CNQ8I0Dk.js → markdown-renderer-B4_rx1aO.js} +2 -3
  37. package/dist/web/assets/notification-store-7WlicqzJ.js +1 -0
  38. package/dist/web/assets/number-overlay-editor-CyEqxXcg.js +1 -2
  39. package/dist/web/assets/panel-store-C8wwxBpn.js +1 -2
  40. package/dist/web/assets/{pdf-preview-zs9QdgDp.js → pdf-preview-D16LLBdq.js} +1 -2
  41. package/dist/web/assets/{port-forwarding-tab-sArYx1nt.js → port-forwarding-tab-CoKoquJZ.js} +1 -2
  42. package/dist/web/assets/{postgres-viewer-khk7N7cd.js → postgres-viewer-B45DfArf.js} +2 -3
  43. package/dist/web/assets/react-DMIOAtcX.js +1 -2
  44. package/dist/web/assets/refresh-cw-BjrAbUJe.js +1 -2
  45. package/dist/web/assets/scroll-area-BDi_FNzr.js +1 -2
  46. package/dist/web/assets/search-tM8K5zWU.js +1 -2
  47. package/dist/web/assets/settings-store-8FpQDjEA.js +1 -2
  48. package/dist/web/assets/{settings-tab-CGWhVzQm.js → settings-tab-Dc8TBxJQ.js} +1 -1
  49. package/dist/web/assets/sparkles-CulWHe4c.js +1 -2
  50. package/dist/web/assets/{sql-query-editor-B5Ndypxp.js → sql-query-editor-DMk0nmOO.js} +2 -3
  51. package/dist/web/assets/{sqlite-viewer-BkpONSGa.js → sqlite-viewer-G81XimpL.js} +1 -2
  52. package/dist/web/assets/tab-store-CNas5Ny8.js +1 -2
  53. package/dist/web/assets/table-BzjWcs87.js +1 -2
  54. package/dist/web/assets/{terminal-tab-BgMCsdeN.js → terminal-tab-rslAfxoV.js} +2 -3
  55. package/dist/web/assets/text-wrap-DJz9Bgpa.js +1 -2
  56. package/dist/web/assets/use-blob-url-DB4nNruT.js +1 -2
  57. package/dist/web/assets/use-monaco-theme-DEI-tJAh.js +1 -2
  58. package/dist/web/assets/utils-CQux7CsO.js +1 -2
  59. package/dist/web/assets/vendor-markdown-0Mxgxy0L.js +1 -2
  60. package/dist/web/assets/vendor-mermaid-D2KKkqNs.js +1 -2
  61. package/dist/web/assets/vendor-ui-UXCWAcmi.js +1 -2
  62. package/dist/web/assets/vendor-xterm-D1P36hcr.js +1 -2
  63. package/dist/web/assets/{video-preview-w8ZAy8av.js → video-preview-vjw8RpLK.js} +1 -2
  64. package/dist/web/assets/x-BPReZWnP.js +1 -2
  65. package/dist/web/index.html +1 -1
  66. package/dist/web/sw.js +1 -2
  67. package/package.json +1 -1
  68. package/src/web/components/chat/chat-tab.tsx +6 -4
  69. package/src/web/components/layout/tab-pool.tsx +1 -1
  70. package/src/web/hooks/use-chat.ts +7 -6
  71. package/vite.config.ts +1 -1
  72. package/dist/web/assets/ai-settings-section-AuV6Lzz2.js.map +0 -1
  73. package/dist/web/assets/api-client-DIhJ5qVW.js.map +0 -1
  74. package/dist/web/assets/api-settings-C3T95dWg.js.map +0 -1
  75. package/dist/web/assets/arrow-up-Rcw6_KKu.js.map +0 -1
  76. package/dist/web/assets/audio-preview-CILFIsuu.js.map +0 -1
  77. package/dist/web/assets/chat-tab-DBYwH_Aa.js.map +0 -1
  78. package/dist/web/assets/chevron-right-DnHIvvcy.js.map +0 -1
  79. package/dist/web/assets/code-DGBecc50.js.map +0 -1
  80. package/dist/web/assets/code-editor-MXnkYRLp.js.map +0 -1
  81. package/dist/web/assets/conflict-editor-C6wH5wV6.js.map +0 -1
  82. package/dist/web/assets/createLucideIcon-BjHrJDVb.js.map +0 -1
  83. package/dist/web/assets/csv-parser-Dly5nqE1.js.map +0 -1
  84. package/dist/web/assets/csv-preview-B3Dyhgho.js.map +0 -1
  85. package/dist/web/assets/data-grid-overlay-editor-C1UUm7Ob.js.map +0 -1
  86. package/dist/web/assets/data-grid-types-D2cHE8hx.js.map +0 -1
  87. package/dist/web/assets/database-DOWH9-Vv.js.map +0 -1
  88. package/dist/web/assets/database-viewer-BjUruZLv.js.map +0 -1
  89. package/dist/web/assets/diff-viewer-B_nU7bQi.js.map +0 -1
  90. package/dist/web/assets/dist-BoIkGNC8.js.map +0 -1
  91. package/dist/web/assets/dist-DVk8T0R5.js.map +0 -1
  92. package/dist/web/assets/esm-DCbn6xno.js.map +0 -1
  93. package/dist/web/assets/extension-webview-B56ZfvoD.js.map +0 -1
  94. package/dist/web/assets/file-exclamation-point-BwzaQ50n.js.map +0 -1
  95. package/dist/web/assets/file-store-DOxcU_7s.js.map +0 -1
  96. package/dist/web/assets/glide-data-grid-D-qQqqp7.js.map +0 -1
  97. package/dist/web/assets/globe-B4Ilypbs.js.map +0 -1
  98. package/dist/web/assets/image-preview-Dc6AiqYX.js.map +0 -1
  99. package/dist/web/assets/index-8_rE2Q1-.js.map +0 -1
  100. package/dist/web/assets/input-_LFQwhzd.js.map +0 -1
  101. package/dist/web/assets/katex-C10ndCVt.js.map +0 -1
  102. package/dist/web/assets/keybindings-store-COJD5O6M.js +0 -1
  103. package/dist/web/assets/lib-C2D8j3K3.js.map +0 -1
  104. package/dist/web/assets/markdown-renderer-CNQ8I0Dk.js.map +0 -1
  105. package/dist/web/assets/notification-store-BiZaLXop.js +0 -1
  106. package/dist/web/assets/number-overlay-editor-CyEqxXcg.js.map +0 -1
  107. package/dist/web/assets/panel-store-C8wwxBpn.js.map +0 -1
  108. package/dist/web/assets/pdf-preview-zs9QdgDp.js.map +0 -1
  109. package/dist/web/assets/port-forwarding-tab-sArYx1nt.js.map +0 -1
  110. package/dist/web/assets/postgres-viewer-khk7N7cd.js.map +0 -1
  111. package/dist/web/assets/react-DMIOAtcX.js.map +0 -1
  112. package/dist/web/assets/refresh-cw-BjrAbUJe.js.map +0 -1
  113. package/dist/web/assets/scroll-area-BDi_FNzr.js.map +0 -1
  114. package/dist/web/assets/search-tM8K5zWU.js.map +0 -1
  115. package/dist/web/assets/settings-store-8FpQDjEA.js.map +0 -1
  116. package/dist/web/assets/sparkles-CulWHe4c.js.map +0 -1
  117. package/dist/web/assets/sql-query-editor-B5Ndypxp.js.map +0 -1
  118. package/dist/web/assets/sqlite-viewer-BkpONSGa.js.map +0 -1
  119. package/dist/web/assets/tab-store-CNas5Ny8.js.map +0 -1
  120. package/dist/web/assets/table-BzjWcs87.js.map +0 -1
  121. package/dist/web/assets/terminal-tab-BgMCsdeN.js.map +0 -1
  122. package/dist/web/assets/text-wrap-DJz9Bgpa.js.map +0 -1
  123. package/dist/web/assets/use-blob-url-DB4nNruT.js.map +0 -1
  124. package/dist/web/assets/use-monaco-theme-DEI-tJAh.js.map +0 -1
  125. package/dist/web/assets/utils-CQux7CsO.js.map +0 -1
  126. package/dist/web/assets/vendor-markdown-0Mxgxy0L.js.map +0 -1
  127. package/dist/web/assets/vendor-mermaid-D2KKkqNs.js.map +0 -1
  128. package/dist/web/assets/vendor-ui-UXCWAcmi.js.map +0 -1
  129. package/dist/web/assets/vendor-xterm-D1P36hcr.js.map +0 -1
  130. package/dist/web/assets/video-preview-w8ZAy8av.js.map +0 -1
  131. package/dist/web/assets/x-BPReZWnP.js.map +0 -1
  132. package/dist/web/sw.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";8mBAiDA,IAAMA,GAAM,EAAE,CAAC,eAcf,SAAgB,GAAO,EAAK,EAAS,CACnC,IAAM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B,CACd,GAAI,CAAC,GAAO,CAAC,GAAc,KAAK,EAAI,CAAE,OACtC,EAAW,GAAK,CAChB,IAAI,EAAY,GACZ,EAAqB,KACnB,EAAQ,IAAc,CAY5B,OAXA,MAAM,oBAAoB,mBAAmB,EAAI,GAAI,CACnD,QAAS,EAAQ,CAAE,cAAe,UAAU,IAAS,CAAG,EAAE,CAC3D,CAAC,CACC,KAAM,GAAM,CAAE,GAAI,CAAC,EAAE,GAAI,MAAU,OAAO,CAAE,OAAO,EAAE,MAAM,EAAI,CAC/D,KAAM,GAAS,CACV,IACJ,EAAM,IAAI,gBAAgB,EAAK,CAC/B,EAAW,EAAI,CACf,EAAW,GAAM,GACjB,CACD,UAAY,CAAO,GAAW,EAAW,GAAM,EAAI,KACzC,CAAE,EAAY,GAAU,GAAK,IAAI,gBAAgB,EAAI,GACjE,CAAC,EAAI,CAAC,CAET,IAAM,EAAa,GAAW,GAAO,GAC/B,GAAO,IAAQ,EAAM,GAAS,EAAI,CAAG,IAE3C,gBACG,MAAD,CACE,IAAK,EACL,IAAK,GACL,YAAe,GAAc,EAAiB,EAAY,GAAK,CAC/D,UAAU,yFACV,MAAO,CAAE,QAAS,EAAU,GAAM,EAAG,UAAW,EAAU,GAAK,OAAW,SAAU,EAAU,GAAK,OAAW,CAC9G,GAAI,EACJ,EAKN,SAAS,GAAQ,CAAE,WAAU,OAAM,GAAG,GAAc,CAClD,gBAAQ,MAAD,CAAK,UAAU,0DAAwC,QAAD,CAAO,GAAI,EAAQ,WAAiB,EAAM","names":["own","one","all","element","patch","root","doctype","text","comment","commas","spaces","$","isAsciiAlphaNumeric","$$","TN","foreignContent.isIntegrationPoint","doctype.getDocumentMode","doctype.isConforming","foreignContent.causesExit","html.getTagID","structuredClone"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],"sources":["../../../node_modules/.bun/zwitch@2.0.4/node_modules/zwitch/index.js","../../../node_modules/.bun/mdast-util-newline-to-break@2.0.0/node_modules/mdast-util-newline-to-break/lib/index.js","../../../node_modules/.bun/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.js","../../../node_modules/.bun/vfile-location@5.0.3/node_modules/vfile-location/lib/index.js","../../../node_modules/.bun/hast-util-from-parse5@8.0.3/node_modules/hast-util-from-parse5/lib/index.js","../../../node_modules/.bun/hast-util-to-parse5@8.0.1/node_modules/hast-util-to-parse5/lib/index.js","../../../node_modules/.bun/html-void-elements@3.0.0/node_modules/html-void-elements/index.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/common/unicode.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/common/error-codes.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/tokenizer/preprocessor.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/common/token.js","../../../node_modules/.bun/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.js","../../../node_modules/.bun/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.js","../../../node_modules/.bun/entities@6.0.1/node_modules/entities/dist/esm/decode.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/common/html.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/tokenizer/index.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/parser/open-element-stack.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/parser/formatting-element-list.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/tree-adapters/default.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/common/doctype.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/common/foreign-content.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/parser/index.js","../../../node_modules/.bun/parse5@7.3.0/node_modules/parse5/dist/serializer/index.js","../../../node_modules/.bun/hast-util-raw@9.1.0/node_modules/hast-util-raw/lib/index.js","../../../node_modules/.bun/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js","../../../src/web/components/shared/markdown-context.ts","../../../src/web/components/shared/markdown-code-block.tsx","../../../src/web/components/shared/markdown-renderer.tsx"],"sourcesContent":["/**\n * @callback Handler\n * Handle a value, with a certain ID field set to a certain value.\n * The ID field is passed to `zwitch`, and it’s value is this function’s\n * place on the `handlers` record.\n * @param {...any} parameters\n * Arbitrary parameters passed to the zwitch.\n * The first will be an object with a certain ID field set to a certain value.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback UnknownHandler\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @param {unknown} value\n * An object with a certain ID field set to an unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback InvalidHandler\n * Handle values that do not have a certain ID field.\n * @param {unknown} value\n * Any unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {void|null|undefined|never}\n * This should crash or return nothing.\n */\n\n/**\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n * @typedef Options\n * Configuration (required).\n * @property {Invalid} [invalid]\n * Handler to use for invalid values.\n * @property {Unknown} [unknown]\n * Handler to use for unknown values.\n * @property {Handlers} [handlers]\n * Handlers to use.\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Handle values based on a field.\n *\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n * @param {string} key\n * Field to switch on.\n * @param {Options<Invalid, Unknown, Handlers>} [options]\n * Configuration (required).\n * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}\n */\nexport function zwitch(key, options) {\n const settings = options || {}\n\n /**\n * Handle one value.\n *\n * Based on the bound `key`, a respective handler will be called.\n * If `value` is not an object, or doesn’t have a `key` property, the special\n * “invalid” handler will be called.\n * If `value` has an unknown `key`, the special “unknown” handler will be\n * called.\n *\n * All arguments, and the context object, are passed through to the handler,\n * and it’s result is returned.\n *\n * @this {unknown}\n * Any context object.\n * @param {unknown} [value]\n * Any value.\n * @param {...unknown} parameters\n * Arbitrary parameters passed to the zwitch.\n * @property {Handler} invalid\n * Handle for values that do not have a certain ID field.\n * @property {Handler} unknown\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @property {Handlers} handlers\n * Record of handlers.\n * @returns {unknown}\n * Anything.\n */\n function one(value, ...parameters) {\n /** @type {Handler|undefined} */\n let fn = one.invalid\n const handlers = one.handlers\n\n if (value && own.call(value, key)) {\n // @ts-expect-error Indexable.\n const id = String(value[key])\n // @ts-expect-error Indexable.\n fn = own.call(handlers, id) ? handlers[id] : one.unknown\n }\n\n if (fn) {\n return fn.call(this, value, ...parameters)\n }\n }\n\n one.handlers = settings.handlers || {}\n one.invalid = settings.invalid\n one.unknown = settings.unknown\n\n // @ts-expect-error: matches!\n return one\n}\n","/**\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction\n */\n\nimport {findAndReplace} from 'mdast-util-find-and-replace'\n\n/**\n * Turn normal line endings into hard breaks.\n *\n * @param {Nodes} tree\n * Tree to change.\n * @returns {undefined}\n * Nothing.\n */\nexport function newlineToBreak(tree) {\n findAndReplace(tree, [/\\r?\\n|\\r/g, replace])\n}\n\n/**\n * Replace line endings.\n *\n * @type {ReplaceFunction}\n */\nfunction replace() {\n return {type: 'break'}\n}\n","/**\n * @typedef {import('mdast').Root} Root\n */\n\nimport {newlineToBreak} from 'mdast-util-newline-to-break'\n\n/**\n * Support hard breaks without needing spaces or escapes (turns enters into\n * `<br>`s).\n *\n * @returns\n * Transform.\n */\nexport default function remarkBreaks() {\n /**\n * Transform.\n *\n * @param {Root} tree\n * Tree.\n * @returns {undefined}\n * Nothing.\n */\n return function (tree) {\n newlineToBreak(tree)\n }\n}\n","/**\n * @import {VFile, Value} from 'vfile'\n * @import {Location} from 'vfile-location'\n */\n\n/**\n * Create an index of the given document to translate between line/column and\n * offset based positional info.\n *\n * Also implemented in Rust in [`wooorm/markdown-rs`][markdown-rs].\n *\n * [markdown-rs]: https://github.com/wooorm/markdown-rs/blob/main/src/util/location.rs\n *\n * @param {VFile | Value} file\n * File to index.\n * @returns {Location}\n * Accessors for index.\n */\nexport function location(file) {\n const value = String(file)\n /**\n * List, where each index is a line number (0-based), and each value is the\n * byte index *after* where the line ends.\n *\n * @type {Array<number>}\n */\n const indices = []\n\n return {toOffset, toPoint}\n\n /** @type {Location['toPoint']} */\n function toPoint(offset) {\n if (typeof offset === 'number' && offset > -1 && offset <= value.length) {\n let index = 0\n\n while (true) {\n let end = indices[index]\n\n if (end === undefined) {\n const eol = next(value, indices[index - 1])\n end = eol === -1 ? value.length + 1 : eol + 1\n indices[index] = end\n }\n\n if (end > offset) {\n return {\n line: index + 1,\n column: offset - (index > 0 ? indices[index - 1] : 0) + 1,\n offset\n }\n }\n\n index++\n }\n }\n }\n\n /** @type {Location['toOffset']} */\n function toOffset(point) {\n if (\n point &&\n typeof point.line === 'number' &&\n typeof point.column === 'number' &&\n !Number.isNaN(point.line) &&\n !Number.isNaN(point.column)\n ) {\n while (indices.length < point.line) {\n const from = indices[indices.length - 1]\n const eol = next(value, from)\n const end = eol === -1 ? value.length + 1 : eol + 1\n if (from === end) break\n indices.push(end)\n }\n\n const offset =\n (point.line > 1 ? indices[point.line - 2] : 0) + point.column - 1\n // The given `column` could not exist on this line.\n if (offset < indices[point.line - 1]) return offset\n }\n }\n}\n\n/**\n * @param {string} value\n * @param {number} from\n */\nfunction next(value, from) {\n const cr = value.indexOf('\\r', from)\n const lf = value.indexOf('\\n', from)\n if (lf === -1) return cr\n if (cr === -1 || cr + 1 === lf) return lf\n return cr < lf ? cr : lf\n}\n","/**\n * @import {ElementData, Element, Nodes, RootContent, Root} from 'hast'\n * @import {DefaultTreeAdapterMap, Token} from 'parse5'\n * @import {Schema} from 'property-information'\n * @import {Point, Position} from 'unist'\n * @import {VFile} from 'vfile'\n * @import {Options} from 'hast-util-from-parse5'\n */\n\n/**\n * @typedef State\n * Info passed around about the current state.\n * @property {VFile | undefined} file\n * Corresponding file.\n * @property {boolean} location\n * Whether location info was found.\n * @property {Schema} schema\n * Current schema.\n * @property {boolean | undefined} verbose\n * Add extra positional info.\n */\n\nimport {ok as assert} from 'devlop'\nimport {h, s} from 'hastscript'\nimport {find, html, svg} from 'property-information'\nimport {location} from 'vfile-location'\nimport {webNamespaces} from 'web-namespaces'\n\nconst own = {}.hasOwnProperty\n/** @type {unknown} */\n// type-coverage:ignore-next-line\nconst proto = Object.prototype\n\n/**\n * Transform a `parse5` AST to hast.\n *\n * @param {DefaultTreeAdapterMap['node']} tree\n * `parse5` tree to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Nodes}\n * hast tree.\n */\nexport function fromParse5(tree, options) {\n const settings = options || {}\n\n return one(\n {\n file: settings.file || undefined,\n location: false,\n schema: settings.space === 'svg' ? svg : html,\n verbose: settings.verbose || false\n },\n tree\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {DefaultTreeAdapterMap['node']} node\n * p5 node.\n * @returns {Nodes}\n * hast node.\n */\nfunction one(state, node) {\n /** @type {Nodes} */\n let result\n\n switch (node.nodeName) {\n case '#comment': {\n const reference = /** @type {DefaultTreeAdapterMap['commentNode']} */ (\n node\n )\n result = {type: 'comment', value: reference.data}\n patch(state, reference, result)\n return result\n }\n\n case '#document':\n case '#document-fragment': {\n const reference =\n /** @type {DefaultTreeAdapterMap['document'] | DefaultTreeAdapterMap['documentFragment']} */ (\n node\n )\n const quirksMode =\n 'mode' in reference\n ? reference.mode === 'quirks' || reference.mode === 'limited-quirks'\n : false\n\n result = {\n type: 'root',\n children: all(state, node.childNodes),\n data: {quirksMode}\n }\n\n if (state.file && state.location) {\n const document = String(state.file)\n const loc = location(document)\n const start = loc.toPoint(0)\n const end = loc.toPoint(document.length)\n // Always defined as we give valid input.\n assert(start, 'expected `start`')\n assert(end, 'expected `end`')\n result.position = {start, end}\n }\n\n return result\n }\n\n case '#documentType': {\n const reference = /** @type {DefaultTreeAdapterMap['documentType']} */ (\n node\n )\n result = {type: 'doctype'}\n patch(state, reference, result)\n return result\n }\n\n case '#text': {\n const reference = /** @type {DefaultTreeAdapterMap['textNode']} */ (node)\n result = {type: 'text', value: reference.value}\n patch(state, reference, result)\n return result\n }\n\n // Element.\n default: {\n const reference = /** @type {DefaultTreeAdapterMap['element']} */ (node)\n result = element(state, reference)\n return result\n }\n }\n}\n\n/**\n * Transform children.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Array<DefaultTreeAdapterMap['node']>} nodes\n * Nodes.\n * @returns {Array<RootContent>}\n * hast nodes.\n */\nfunction all(state, nodes) {\n let index = -1\n /** @type {Array<RootContent>} */\n const results = []\n\n while (++index < nodes.length) {\n // Assume no roots in `nodes`.\n const result = /** @type {RootContent} */ (one(state, nodes[index]))\n results.push(result)\n }\n\n return results\n}\n\n/**\n * Transform an element.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {DefaultTreeAdapterMap['element']} node\n * `parse5` node to transform.\n * @returns {Element}\n * hast node.\n */\nfunction element(state, node) {\n const schema = state.schema\n\n state.schema = node.namespaceURI === webNamespaces.svg ? svg : html\n\n // Props.\n let index = -1\n /** @type {Record<string, string>} */\n const properties = {}\n\n while (++index < node.attrs.length) {\n const attribute = node.attrs[index]\n const name =\n (attribute.prefix ? attribute.prefix + ':' : '') + attribute.name\n if (!own.call(proto, name)) {\n properties[name] = attribute.value\n }\n }\n\n // Build.\n const x = state.schema.space === 'svg' ? s : h\n const result = x(node.tagName, properties, all(state, node.childNodes))\n patch(state, node, result)\n\n // Switch content.\n if (result.tagName === 'template') {\n const reference = /** @type {DefaultTreeAdapterMap['template']} */ (node)\n const pos = reference.sourceCodeLocation\n const startTag = pos && pos.startTag && position(pos.startTag)\n const endTag = pos && pos.endTag && position(pos.endTag)\n\n // Root in, root out.\n const content = /** @type {Root} */ (one(state, reference.content))\n\n if (startTag && endTag && state.file) {\n content.position = {start: startTag.end, end: endTag.start}\n }\n\n result.content = content\n }\n\n state.schema = schema\n\n return result\n}\n\n/**\n * Patch positional info from `from` onto `to`.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {DefaultTreeAdapterMap['node']} from\n * p5 node.\n * @param {Nodes} to\n * hast node.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(state, from, to) {\n if ('sourceCodeLocation' in from && from.sourceCodeLocation && state.file) {\n const position = createLocation(state, to, from.sourceCodeLocation)\n\n if (position) {\n state.location = true\n to.position = position\n }\n }\n}\n\n/**\n * Create clean positional information.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Nodes} node\n * hast node.\n * @param {Token.ElementLocation} location\n * p5 location info.\n * @returns {Position | undefined}\n * Position, or nothing.\n */\nfunction createLocation(state, node, location) {\n const result = position(location)\n\n if (node.type === 'element') {\n const tail = node.children[node.children.length - 1]\n\n // Bug for unclosed with children.\n // See: <https://github.com/inikulin/parse5/issues/109>.\n if (\n result &&\n !location.endTag &&\n tail &&\n tail.position &&\n tail.position.end\n ) {\n result.end = Object.assign({}, tail.position.end)\n }\n\n if (state.verbose) {\n /** @type {Record<string, Position | undefined>} */\n const properties = {}\n /** @type {string} */\n let key\n\n if (location.attrs) {\n for (key in location.attrs) {\n if (own.call(location.attrs, key)) {\n properties[find(state.schema, key).property] = position(\n location.attrs[key]\n )\n }\n }\n }\n\n assert(location.startTag, 'a start tag should exist')\n const opening = position(location.startTag)\n const closing = location.endTag ? position(location.endTag) : undefined\n /** @type {ElementData['position']} */\n const data = {opening}\n if (closing) data.closing = closing\n data.properties = properties\n\n node.data = {position: data}\n }\n }\n\n return result\n}\n\n/**\n * Turn a p5 location into a position.\n *\n * @param {Token.Location} loc\n * Location.\n * @returns {Position | undefined}\n * Position or nothing.\n */\nfunction position(loc) {\n const start = point({\n line: loc.startLine,\n column: loc.startCol,\n offset: loc.startOffset\n })\n const end = point({\n line: loc.endLine,\n column: loc.endCol,\n offset: loc.endOffset\n })\n\n // @ts-expect-error: we do use `undefined` for points if one or the other\n // exists.\n return start || end ? {start, end} : undefined\n}\n\n/**\n * Filter out invalid points.\n *\n * @param {Point} point\n * Point with potentially `undefined` values.\n * @returns {Point | undefined}\n * Point or nothing.\n */\nfunction point(point) {\n return point.line && point.column ? point : undefined\n}\n","/**\n * @import {Comment, Doctype, Element, Nodes, RootContent, Root, Text} from 'hast'\n * @import {DefaultTreeAdapterMap, Token} from 'parse5'\n * @import {Schema} from 'property-information'\n */\n\n/**\n * @typedef {DefaultTreeAdapterMap['document']} Parse5Document\n * @typedef {DefaultTreeAdapterMap['documentFragment']} Parse5Fragment\n * @typedef {DefaultTreeAdapterMap['element']} Parse5Element\n * @typedef {DefaultTreeAdapterMap['node']} Parse5Nodes\n * @typedef {DefaultTreeAdapterMap['documentType']} Parse5Doctype\n * @typedef {DefaultTreeAdapterMap['commentNode']} Parse5Comment\n * @typedef {DefaultTreeAdapterMap['textNode']} Parse5Text\n * @typedef {DefaultTreeAdapterMap['parentNode']} Parse5Parent\n * @typedef {Token.Attribute} Parse5Attribute\n *\n * @typedef Options\n * Configuration.\n * @property {Space | null | undefined} [space='html']\n * Which space the document is in (default: `'html'`).\n *\n * When an `<svg>` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it.\n *\n * @typedef {Exclude<Parse5Nodes, Parse5Document | Parse5Fragment>} Parse5Content\n *\n * @typedef {'html' | 'svg'} Space\n */\n\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {ok as assert} from 'devlop'\nimport {find, html, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport {webNamespaces} from 'web-namespaces'\nimport {zwitch} from 'zwitch'\n\n/** @type {Options} */\nconst emptyOptions = {}\n\nconst own = {}.hasOwnProperty\n\nconst one = zwitch('type', {handlers: {root, element, text, comment, doctype}})\n\n/**\n * Transform a hast tree to a `parse5` AST.\n *\n * @param {Nodes} tree\n * Tree to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Parse5Nodes}\n * `parse5` node.\n */\nexport function toParse5(tree, options) {\n const settings = options || emptyOptions\n const space = settings.space\n return one(tree, space === 'svg' ? svg : html)\n}\n\n/**\n * @param {Root} node\n * Node (hast) to transform.\n * @param {Schema} schema\n * Current schema.\n * @returns {Parse5Document}\n * Parse5 node.\n */\nfunction root(node, schema) {\n /** @type {Parse5Document} */\n const result = {\n nodeName: '#document',\n // @ts-expect-error: `parse5` uses enums, which are actually strings.\n mode: (node.data || {}).quirksMode ? 'quirks' : 'no-quirks',\n childNodes: []\n }\n result.childNodes = all(node.children, result, schema)\n patch(node, result)\n return result\n}\n\n/**\n * @param {Root} node\n * Node (hast) to transform.\n * @param {Schema} schema\n * Current schema.\n * @returns {Parse5Fragment}\n * Parse5 node.\n */\nfunction fragment(node, schema) {\n /** @type {Parse5Fragment} */\n const result = {nodeName: '#document-fragment', childNodes: []}\n result.childNodes = all(node.children, result, schema)\n patch(node, result)\n return result\n}\n\n/**\n * @param {Doctype} node\n * Node (hast) to transform.\n * @returns {Parse5Doctype}\n * Parse5 node.\n */\nfunction doctype(node) {\n /** @type {Parse5Doctype} */\n const result = {\n nodeName: '#documentType',\n name: 'html',\n publicId: '',\n systemId: '',\n parentNode: null\n }\n\n patch(node, result)\n return result\n}\n\n/**\n * @param {Text} node\n * Node (hast) to transform.\n * @returns {Parse5Text}\n * Parse5 node.\n */\nfunction text(node) {\n /** @type {Parse5Text} */\n const result = {\n nodeName: '#text',\n value: node.value,\n parentNode: null\n }\n patch(node, result)\n return result\n}\n\n/**\n * @param {Comment} node\n * Node (hast) to transform.\n * @returns {Parse5Comment}\n * Parse5 node.\n */\nfunction comment(node) {\n /** @type {Parse5Comment} */\n const result = {\n nodeName: '#comment',\n data: node.value,\n parentNode: null\n }\n\n patch(node, result)\n\n return result\n}\n\n/**\n * @param {Element} node\n * Node (hast) to transform.\n * @param {Schema} schema\n * Current schema.\n * @returns {Parse5Element}\n * Parse5 node.\n */\nfunction element(node, schema) {\n const parentSchema = schema\n let currentSchema = parentSchema\n\n if (\n node.type === 'element' &&\n node.tagName.toLowerCase() === 'svg' &&\n parentSchema.space === 'html'\n ) {\n currentSchema = svg\n }\n\n /** @type {Array<Parse5Attribute>} */\n const attrs = []\n /** @type {string} */\n let prop\n\n if (node.properties) {\n for (prop in node.properties) {\n if (prop !== 'children' && own.call(node.properties, prop)) {\n const result = createProperty(\n currentSchema,\n prop,\n node.properties[prop]\n )\n\n if (result) {\n attrs.push(result)\n }\n }\n }\n }\n\n const space = currentSchema.space\n // `html` and `svg` both have a space.\n assert(space)\n\n /** @type {Parse5Element} */\n const result = {\n nodeName: node.tagName,\n tagName: node.tagName,\n attrs,\n // @ts-expect-error: `parse5` types are wrong.\n namespaceURI: webNamespaces[space],\n childNodes: [],\n parentNode: null\n }\n result.childNodes = all(node.children, result, currentSchema)\n patch(node, result)\n\n if (node.tagName === 'template' && node.content) {\n // @ts-expect-error: `parse5` types are wrong.\n result.content = fragment(node.content, currentSchema)\n }\n\n return result\n}\n\n/**\n * Handle a property.\n *\n * @param {Schema} schema\n * Current schema.\n * @param {string} prop\n * Key.\n * @param {Array<number | string> | boolean | number | string | null | undefined} value\n * hast property value.\n * @returns {Parse5Attribute | undefined}\n * Field for runtime, optional.\n */\nfunction createProperty(schema, prop, value) {\n const info = find(schema, prop)\n\n // Ignore nullish and `NaN` values.\n if (\n value === false ||\n value === null ||\n value === undefined ||\n (typeof value === 'number' && Number.isNaN(value)) ||\n (!value && info.boolean)\n ) {\n return\n }\n\n if (Array.isArray(value)) {\n // Accept `array`.\n // Most props are space-separated.\n value = info.commaSeparated ? commas(value) : spaces(value)\n }\n\n /** @type {Parse5Attribute} */\n const attribute = {\n name: info.attribute,\n value: value === true ? '' : String(value)\n }\n\n if (info.space && info.space !== 'html' && info.space !== 'svg') {\n const index = attribute.name.indexOf(':')\n\n if (index < 0) {\n attribute.prefix = ''\n } else {\n attribute.name = attribute.name.slice(index + 1)\n attribute.prefix = info.attribute.slice(0, index)\n }\n\n attribute.namespace = webNamespaces[info.space]\n }\n\n return attribute\n}\n\n/**\n * Transform all hast nodes.\n *\n * @param {Array<RootContent>} children\n * List of children.\n * @param {Parse5Parent} parentNode\n * `parse5` parent node.\n * @param {Schema} schema\n * Current schema.\n * @returns {Array<Parse5Content>}\n * Transformed children.\n */\nfunction all(children, parentNode, schema) {\n let index = -1\n /** @type {Array<Parse5Content>} */\n const results = []\n\n if (children) {\n while (++index < children.length) {\n /** @type {Parse5Content} */\n const child = one(children[index], schema)\n\n child.parentNode = parentNode\n\n results.push(child)\n }\n }\n\n return results\n}\n\n/**\n * Add position info from `from` to `to`.\n *\n * @param {Nodes} from\n * hast node.\n * @param {Parse5Nodes} to\n * `parse5` node.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(from, to) {\n const position = from.position\n\n if (position && position.start && position.end) {\n assert(typeof position.start.offset === 'number')\n assert(typeof position.end.offset === 'number')\n\n to.sourceCodeLocation = {\n startLine: position.start.line,\n startCol: position.start.column,\n startOffset: position.start.offset,\n endLine: position.end.line,\n endCol: position.end.column,\n endOffset: position.end.offset\n }\n }\n}\n","/**\n * List of HTML void tag names.\n *\n * @type {Array<string>}\n */\nexport const htmlVoidElements = [\n 'area',\n 'base',\n 'basefont',\n 'bgsound',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'frame',\n 'hr',\n 'image',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]\n","const UNDEFINED_CODE_POINTS = new Set([\n 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214,\n 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894,\n 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574,\n 1048575, 1114110, 1114111,\n]);\nexport const REPLACEMENT_CHARACTER = '\\uFFFD';\nexport var CODE_POINTS;\n(function (CODE_POINTS) {\n CODE_POINTS[CODE_POINTS[\"EOF\"] = -1] = \"EOF\";\n CODE_POINTS[CODE_POINTS[\"NULL\"] = 0] = \"NULL\";\n CODE_POINTS[CODE_POINTS[\"TABULATION\"] = 9] = \"TABULATION\";\n CODE_POINTS[CODE_POINTS[\"CARRIAGE_RETURN\"] = 13] = \"CARRIAGE_RETURN\";\n CODE_POINTS[CODE_POINTS[\"LINE_FEED\"] = 10] = \"LINE_FEED\";\n CODE_POINTS[CODE_POINTS[\"FORM_FEED\"] = 12] = \"FORM_FEED\";\n CODE_POINTS[CODE_POINTS[\"SPACE\"] = 32] = \"SPACE\";\n CODE_POINTS[CODE_POINTS[\"EXCLAMATION_MARK\"] = 33] = \"EXCLAMATION_MARK\";\n CODE_POINTS[CODE_POINTS[\"QUOTATION_MARK\"] = 34] = \"QUOTATION_MARK\";\n CODE_POINTS[CODE_POINTS[\"AMPERSAND\"] = 38] = \"AMPERSAND\";\n CODE_POINTS[CODE_POINTS[\"APOSTROPHE\"] = 39] = \"APOSTROPHE\";\n CODE_POINTS[CODE_POINTS[\"HYPHEN_MINUS\"] = 45] = \"HYPHEN_MINUS\";\n CODE_POINTS[CODE_POINTS[\"SOLIDUS\"] = 47] = \"SOLIDUS\";\n CODE_POINTS[CODE_POINTS[\"DIGIT_0\"] = 48] = \"DIGIT_0\";\n CODE_POINTS[CODE_POINTS[\"DIGIT_9\"] = 57] = \"DIGIT_9\";\n CODE_POINTS[CODE_POINTS[\"SEMICOLON\"] = 59] = \"SEMICOLON\";\n CODE_POINTS[CODE_POINTS[\"LESS_THAN_SIGN\"] = 60] = \"LESS_THAN_SIGN\";\n CODE_POINTS[CODE_POINTS[\"EQUALS_SIGN\"] = 61] = \"EQUALS_SIGN\";\n CODE_POINTS[CODE_POINTS[\"GREATER_THAN_SIGN\"] = 62] = \"GREATER_THAN_SIGN\";\n CODE_POINTS[CODE_POINTS[\"QUESTION_MARK\"] = 63] = \"QUESTION_MARK\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_A\"] = 65] = \"LATIN_CAPITAL_A\";\n CODE_POINTS[CODE_POINTS[\"LATIN_CAPITAL_Z\"] = 90] = \"LATIN_CAPITAL_Z\";\n CODE_POINTS[CODE_POINTS[\"RIGHT_SQUARE_BRACKET\"] = 93] = \"RIGHT_SQUARE_BRACKET\";\n CODE_POINTS[CODE_POINTS[\"GRAVE_ACCENT\"] = 96] = \"GRAVE_ACCENT\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_A\"] = 97] = \"LATIN_SMALL_A\";\n CODE_POINTS[CODE_POINTS[\"LATIN_SMALL_Z\"] = 122] = \"LATIN_SMALL_Z\";\n})(CODE_POINTS || (CODE_POINTS = {}));\nexport const SEQUENCES = {\n DASH_DASH: '--',\n CDATA_START: '[CDATA[',\n DOCTYPE: 'doctype',\n SCRIPT: 'script',\n PUBLIC: 'public',\n SYSTEM: 'system',\n};\n//Surrogates\nexport function isSurrogate(cp) {\n return cp >= 55296 && cp <= 57343;\n}\nexport function isSurrogatePair(cp) {\n return cp >= 56320 && cp <= 57343;\n}\nexport function getSurrogatePairCodePoint(cp1, cp2) {\n return (cp1 - 55296) * 1024 + 9216 + cp2;\n}\n//NOTE: excluding NULL and ASCII whitespace\nexport function isControlCodePoint(cp) {\n return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||\n (cp >= 0x7f && cp <= 0x9f));\n}\nexport function isUndefinedCodePoint(cp) {\n return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp);\n}\n","export var ERR;\n(function (ERR) {\n ERR[\"controlCharacterInInputStream\"] = \"control-character-in-input-stream\";\n ERR[\"noncharacterInInputStream\"] = \"noncharacter-in-input-stream\";\n ERR[\"surrogateInInputStream\"] = \"surrogate-in-input-stream\";\n ERR[\"nonVoidHtmlElementStartTagWithTrailingSolidus\"] = \"non-void-html-element-start-tag-with-trailing-solidus\";\n ERR[\"endTagWithAttributes\"] = \"end-tag-with-attributes\";\n ERR[\"endTagWithTrailingSolidus\"] = \"end-tag-with-trailing-solidus\";\n ERR[\"unexpectedSolidusInTag\"] = \"unexpected-solidus-in-tag\";\n ERR[\"unexpectedNullCharacter\"] = \"unexpected-null-character\";\n ERR[\"unexpectedQuestionMarkInsteadOfTagName\"] = \"unexpected-question-mark-instead-of-tag-name\";\n ERR[\"invalidFirstCharacterOfTagName\"] = \"invalid-first-character-of-tag-name\";\n ERR[\"unexpectedEqualsSignBeforeAttributeName\"] = \"unexpected-equals-sign-before-attribute-name\";\n ERR[\"missingEndTagName\"] = \"missing-end-tag-name\";\n ERR[\"unexpectedCharacterInAttributeName\"] = \"unexpected-character-in-attribute-name\";\n ERR[\"unknownNamedCharacterReference\"] = \"unknown-named-character-reference\";\n ERR[\"missingSemicolonAfterCharacterReference\"] = \"missing-semicolon-after-character-reference\";\n ERR[\"unexpectedCharacterAfterDoctypeSystemIdentifier\"] = \"unexpected-character-after-doctype-system-identifier\";\n ERR[\"unexpectedCharacterInUnquotedAttributeValue\"] = \"unexpected-character-in-unquoted-attribute-value\";\n ERR[\"eofBeforeTagName\"] = \"eof-before-tag-name\";\n ERR[\"eofInTag\"] = \"eof-in-tag\";\n ERR[\"missingAttributeValue\"] = \"missing-attribute-value\";\n ERR[\"missingWhitespaceBetweenAttributes\"] = \"missing-whitespace-between-attributes\";\n ERR[\"missingWhitespaceAfterDoctypePublicKeyword\"] = \"missing-whitespace-after-doctype-public-keyword\";\n ERR[\"missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers\"] = \"missing-whitespace-between-doctype-public-and-system-identifiers\";\n ERR[\"missingWhitespaceAfterDoctypeSystemKeyword\"] = \"missing-whitespace-after-doctype-system-keyword\";\n ERR[\"missingQuoteBeforeDoctypePublicIdentifier\"] = \"missing-quote-before-doctype-public-identifier\";\n ERR[\"missingQuoteBeforeDoctypeSystemIdentifier\"] = \"missing-quote-before-doctype-system-identifier\";\n ERR[\"missingDoctypePublicIdentifier\"] = \"missing-doctype-public-identifier\";\n ERR[\"missingDoctypeSystemIdentifier\"] = \"missing-doctype-system-identifier\";\n ERR[\"abruptDoctypePublicIdentifier\"] = \"abrupt-doctype-public-identifier\";\n ERR[\"abruptDoctypeSystemIdentifier\"] = \"abrupt-doctype-system-identifier\";\n ERR[\"cdataInHtmlContent\"] = \"cdata-in-html-content\";\n ERR[\"incorrectlyOpenedComment\"] = \"incorrectly-opened-comment\";\n ERR[\"eofInScriptHtmlCommentLikeText\"] = \"eof-in-script-html-comment-like-text\";\n ERR[\"eofInDoctype\"] = \"eof-in-doctype\";\n ERR[\"nestedComment\"] = \"nested-comment\";\n ERR[\"abruptClosingOfEmptyComment\"] = \"abrupt-closing-of-empty-comment\";\n ERR[\"eofInComment\"] = \"eof-in-comment\";\n ERR[\"incorrectlyClosedComment\"] = \"incorrectly-closed-comment\";\n ERR[\"eofInCdata\"] = \"eof-in-cdata\";\n ERR[\"absenceOfDigitsInNumericCharacterReference\"] = \"absence-of-digits-in-numeric-character-reference\";\n ERR[\"nullCharacterReference\"] = \"null-character-reference\";\n ERR[\"surrogateCharacterReference\"] = \"surrogate-character-reference\";\n ERR[\"characterReferenceOutsideUnicodeRange\"] = \"character-reference-outside-unicode-range\";\n ERR[\"controlCharacterReference\"] = \"control-character-reference\";\n ERR[\"noncharacterCharacterReference\"] = \"noncharacter-character-reference\";\n ERR[\"missingWhitespaceBeforeDoctypeName\"] = \"missing-whitespace-before-doctype-name\";\n ERR[\"missingDoctypeName\"] = \"missing-doctype-name\";\n ERR[\"invalidCharacterSequenceAfterDoctypeName\"] = \"invalid-character-sequence-after-doctype-name\";\n ERR[\"duplicateAttribute\"] = \"duplicate-attribute\";\n ERR[\"nonConformingDoctype\"] = \"non-conforming-doctype\";\n ERR[\"missingDoctype\"] = \"missing-doctype\";\n ERR[\"misplacedDoctype\"] = \"misplaced-doctype\";\n ERR[\"endTagWithoutMatchingOpenElement\"] = \"end-tag-without-matching-open-element\";\n ERR[\"closingOfElementWithOpenChildElements\"] = \"closing-of-element-with-open-child-elements\";\n ERR[\"disallowedContentInNoscriptInHead\"] = \"disallowed-content-in-noscript-in-head\";\n ERR[\"openElementsLeftAfterEof\"] = \"open-elements-left-after-eof\";\n ERR[\"abandonedHeadElementChild\"] = \"abandoned-head-element-child\";\n ERR[\"misplacedStartTagForHeadElement\"] = \"misplaced-start-tag-for-head-element\";\n ERR[\"nestedNoscriptInHead\"] = \"nested-noscript-in-head\";\n ERR[\"eofInElementThatCanContainOnlyText\"] = \"eof-in-element-that-can-contain-only-text\";\n})(ERR || (ERR = {}));\n","import { CODE_POINTS as $, getSurrogatePairCodePoint, isControlCodePoint, isSurrogate, isSurrogatePair, isUndefinedCodePoint, } from '../common/unicode.js';\nimport { ERR } from '../common/error-codes.js';\n//Const\nconst DEFAULT_BUFFER_WATERLINE = 1 << 16;\n//Preprocessor\n//NOTE: HTML input preprocessing\n//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream)\nexport class Preprocessor {\n constructor(handler) {\n this.handler = handler;\n this.html = '';\n this.pos = -1;\n // NOTE: Initial `lastGapPos` is -2, to ensure `col` on initialisation is 0\n this.lastGapPos = -2;\n this.gapStack = [];\n this.skipNextNewLine = false;\n this.lastChunkWritten = false;\n this.endOfChunkHit = false;\n this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;\n this.isEol = false;\n this.lineStartPos = 0;\n this.droppedBufferSize = 0;\n this.line = 1;\n //NOTE: avoid reporting errors twice on advance/retreat\n this.lastErrOffset = -1;\n }\n /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */\n get col() {\n return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);\n }\n get offset() {\n return this.droppedBufferSize + this.pos;\n }\n getError(code, cpOffset) {\n const { line, col, offset } = this;\n const startCol = col + cpOffset;\n const startOffset = offset + cpOffset;\n return {\n code,\n startLine: line,\n endLine: line,\n startCol,\n endCol: startCol,\n startOffset,\n endOffset: startOffset,\n };\n }\n _err(code) {\n if (this.handler.onParseError && this.lastErrOffset !== this.offset) {\n this.lastErrOffset = this.offset;\n this.handler.onParseError(this.getError(code, 0));\n }\n }\n _addGap() {\n this.gapStack.push(this.lastGapPos);\n this.lastGapPos = this.pos;\n }\n _processSurrogate(cp) {\n //NOTE: try to peek a surrogate pair\n if (this.pos !== this.html.length - 1) {\n const nextCp = this.html.charCodeAt(this.pos + 1);\n if (isSurrogatePair(nextCp)) {\n //NOTE: we have a surrogate pair. Peek pair character and recalculate code point.\n this.pos++;\n //NOTE: add a gap that should be avoided during retreat\n this._addGap();\n return getSurrogatePairCodePoint(cp, nextCp);\n }\n }\n //NOTE: we are at the end of a chunk, therefore we can't infer the surrogate pair yet.\n else if (!this.lastChunkWritten) {\n this.endOfChunkHit = true;\n return $.EOF;\n }\n //NOTE: isolated surrogate\n this._err(ERR.surrogateInInputStream);\n return cp;\n }\n willDropParsedChunk() {\n return this.pos > this.bufferWaterline;\n }\n dropParsedChunk() {\n if (this.willDropParsedChunk()) {\n this.html = this.html.substring(this.pos);\n this.lineStartPos -= this.pos;\n this.droppedBufferSize += this.pos;\n this.pos = 0;\n this.lastGapPos = -2;\n this.gapStack.length = 0;\n }\n }\n write(chunk, isLastChunk) {\n if (this.html.length > 0) {\n this.html += chunk;\n }\n else {\n this.html = chunk;\n }\n this.endOfChunkHit = false;\n this.lastChunkWritten = isLastChunk;\n }\n insertHtmlAtCurrentPos(chunk) {\n this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);\n this.endOfChunkHit = false;\n }\n startsWith(pattern, caseSensitive) {\n // Check if our buffer has enough characters\n if (this.pos + pattern.length > this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return false;\n }\n if (caseSensitive) {\n return this.html.startsWith(pattern, this.pos);\n }\n for (let i = 0; i < pattern.length; i++) {\n const cp = this.html.charCodeAt(this.pos + i) | 0x20;\n if (cp !== pattern.charCodeAt(i)) {\n return false;\n }\n }\n return true;\n }\n peek(offset) {\n const pos = this.pos + offset;\n if (pos >= this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return $.EOF;\n }\n const code = this.html.charCodeAt(pos);\n return code === $.CARRIAGE_RETURN ? $.LINE_FEED : code;\n }\n advance() {\n this.pos++;\n //NOTE: LF should be in the last column of the line\n if (this.isEol) {\n this.isEol = false;\n this.line++;\n this.lineStartPos = this.pos;\n }\n if (this.pos >= this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return $.EOF;\n }\n let cp = this.html.charCodeAt(this.pos);\n //NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters\n if (cp === $.CARRIAGE_RETURN) {\n this.isEol = true;\n this.skipNextNewLine = true;\n return $.LINE_FEED;\n }\n //NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character\n //must be ignored.\n if (cp === $.LINE_FEED) {\n this.isEol = true;\n if (this.skipNextNewLine) {\n // `line` will be bumped again in the recursive call.\n this.line--;\n this.skipNextNewLine = false;\n this._addGap();\n return this.advance();\n }\n }\n this.skipNextNewLine = false;\n if (isSurrogate(cp)) {\n cp = this._processSurrogate(cp);\n }\n //OPTIMIZATION: first check if code point is in the common allowed\n //range (ASCII alphanumeric, whitespaces, big chunk of BMP)\n //before going into detailed performance cost validation.\n const isCommonValidRange = this.handler.onParseError === null ||\n (cp > 0x1f && cp < 0x7f) ||\n cp === $.LINE_FEED ||\n cp === $.CARRIAGE_RETURN ||\n (cp > 0x9f && cp < 64976);\n if (!isCommonValidRange) {\n this._checkForProblematicCharacters(cp);\n }\n return cp;\n }\n _checkForProblematicCharacters(cp) {\n if (isControlCodePoint(cp)) {\n this._err(ERR.controlCharacterInInputStream);\n }\n else if (isUndefinedCodePoint(cp)) {\n this._err(ERR.noncharacterInInputStream);\n }\n }\n retreat(count) {\n this.pos -= count;\n while (this.pos < this.lastGapPos) {\n this.lastGapPos = this.gapStack.pop();\n this.pos--;\n }\n this.isEol = false;\n }\n}\n","export var TokenType;\n(function (TokenType) {\n TokenType[TokenType[\"CHARACTER\"] = 0] = \"CHARACTER\";\n TokenType[TokenType[\"NULL_CHARACTER\"] = 1] = \"NULL_CHARACTER\";\n TokenType[TokenType[\"WHITESPACE_CHARACTER\"] = 2] = \"WHITESPACE_CHARACTER\";\n TokenType[TokenType[\"START_TAG\"] = 3] = \"START_TAG\";\n TokenType[TokenType[\"END_TAG\"] = 4] = \"END_TAG\";\n TokenType[TokenType[\"COMMENT\"] = 5] = \"COMMENT\";\n TokenType[TokenType[\"DOCTYPE\"] = 6] = \"DOCTYPE\";\n TokenType[TokenType[\"EOF\"] = 7] = \"EOF\";\n TokenType[TokenType[\"HIBERNATION\"] = 8] = \"HIBERNATION\";\n})(TokenType || (TokenType = {}));\nexport function getTokenAttr(token, attrName) {\n for (let i = token.attrs.length - 1; i >= 0; i--) {\n if (token.attrs[i].name === attrName) {\n return token.attrs[i].value;\n }\n }\n return null;\n}\n","// Generated using scripts/write-decode-map.ts\nexport const htmlDecodeTree = /* #__PURE__ */ new Uint16Array(\n// prettier-ignore\n/* #__PURE__ */ \"\\u1d41<\\xd5\\u0131\\u028a\\u049d\\u057b\\u05d0\\u0675\\u06de\\u07a2\\u07d6\\u080f\\u0a4a\\u0a91\\u0da1\\u0e6d\\u0f09\\u0f26\\u10ca\\u1228\\u12e1\\u1415\\u149d\\u14c3\\u14df\\u1525\\0\\0\\0\\0\\0\\0\\u156b\\u16cd\\u198d\\u1c12\\u1ddd\\u1f7e\\u2060\\u21b0\\u228d\\u23c0\\u23fb\\u2442\\u2824\\u2912\\u2d08\\u2e48\\u2fce\\u3016\\u32ba\\u3639\\u37ac\\u38fe\\u3a28\\u3a71\\u3ae0\\u3b2e\\u0800EMabcfglmnoprstu\\\\bfms\\x7f\\x84\\x8b\\x90\\x95\\x98\\xa6\\xb3\\xb9\\xc8\\xcflig\\u803b\\xc6\\u40c6P\\u803b&\\u4026cute\\u803b\\xc1\\u40c1reve;\\u4102\\u0100iyx}rc\\u803b\\xc2\\u40c2;\\u4410r;\\uc000\\ud835\\udd04rave\\u803b\\xc0\\u40c0pha;\\u4391acr;\\u4100d;\\u6a53\\u0100gp\\x9d\\xa1on;\\u4104f;\\uc000\\ud835\\udd38plyFunction;\\u6061ing\\u803b\\xc5\\u40c5\\u0100cs\\xbe\\xc3r;\\uc000\\ud835\\udc9cign;\\u6254ilde\\u803b\\xc3\\u40c3ml\\u803b\\xc4\\u40c4\\u0400aceforsu\\xe5\\xfb\\xfe\\u0117\\u011c\\u0122\\u0127\\u012a\\u0100cr\\xea\\xf2kslash;\\u6216\\u0176\\xf6\\xf8;\\u6ae7ed;\\u6306y;\\u4411\\u0180crt\\u0105\\u010b\\u0114ause;\\u6235noullis;\\u612ca;\\u4392r;\\uc000\\ud835\\udd05pf;\\uc000\\ud835\\udd39eve;\\u42d8c\\xf2\\u0113mpeq;\\u624e\\u0700HOacdefhilorsu\\u014d\\u0151\\u0156\\u0180\\u019e\\u01a2\\u01b5\\u01b7\\u01ba\\u01dc\\u0215\\u0273\\u0278\\u027ecy;\\u4427PY\\u803b\\xa9\\u40a9\\u0180cpy\\u015d\\u0162\\u017aute;\\u4106\\u0100;i\\u0167\\u0168\\u62d2talDifferentialD;\\u6145leys;\\u612d\\u0200aeio\\u0189\\u018e\\u0194\\u0198ron;\\u410cdil\\u803b\\xc7\\u40c7rc;\\u4108nint;\\u6230ot;\\u410a\\u0100dn\\u01a7\\u01adilla;\\u40b8terDot;\\u40b7\\xf2\\u017fi;\\u43a7rcle\\u0200DMPT\\u01c7\\u01cb\\u01d1\\u01d6ot;\\u6299inus;\\u6296lus;\\u6295imes;\\u6297o\\u0100cs\\u01e2\\u01f8kwiseContourIntegral;\\u6232eCurly\\u0100DQ\\u0203\\u020foubleQuote;\\u601duote;\\u6019\\u0200lnpu\\u021e\\u0228\\u0247\\u0255on\\u0100;e\\u0225\\u0226\\u6237;\\u6a74\\u0180git\\u022f\\u0236\\u023aruent;\\u6261nt;\\u622fourIntegral;\\u622e\\u0100fr\\u024c\\u024e;\\u6102oduct;\\u6210nterClockwiseContourIntegral;\\u6233oss;\\u6a2fcr;\\uc000\\ud835\\udc9ep\\u0100;C\\u0284\\u0285\\u62d3ap;\\u624d\\u0580DJSZacefios\\u02a0\\u02ac\\u02b0\\u02b4\\u02b8\\u02cb\\u02d7\\u02e1\\u02e6\\u0333\\u048d\\u0100;o\\u0179\\u02a5trahd;\\u6911cy;\\u4402cy;\\u4405cy;\\u440f\\u0180grs\\u02bf\\u02c4\\u02c7ger;\\u6021r;\\u61a1hv;\\u6ae4\\u0100ay\\u02d0\\u02d5ron;\\u410e;\\u4414l\\u0100;t\\u02dd\\u02de\\u6207a;\\u4394r;\\uc000\\ud835\\udd07\\u0100af\\u02eb\\u0327\\u0100cm\\u02f0\\u0322ritical\\u0200ADGT\\u0300\\u0306\\u0316\\u031ccute;\\u40b4o\\u0174\\u030b\\u030d;\\u42d9bleAcute;\\u42ddrave;\\u4060ilde;\\u42dcond;\\u62c4ferentialD;\\u6146\\u0470\\u033d\\0\\0\\0\\u0342\\u0354\\0\\u0405f;\\uc000\\ud835\\udd3b\\u0180;DE\\u0348\\u0349\\u034d\\u40a8ot;\\u60dcqual;\\u6250ble\\u0300CDLRUV\\u0363\\u0372\\u0382\\u03cf\\u03e2\\u03f8ontourIntegra\\xec\\u0239o\\u0274\\u0379\\0\\0\\u037b\\xbb\\u0349nArrow;\\u61d3\\u0100eo\\u0387\\u03a4ft\\u0180ART\\u0390\\u0396\\u03a1rrow;\\u61d0ightArrow;\\u61d4e\\xe5\\u02cang\\u0100LR\\u03ab\\u03c4eft\\u0100AR\\u03b3\\u03b9rrow;\\u67f8ightArrow;\\u67faightArrow;\\u67f9ight\\u0100AT\\u03d8\\u03derrow;\\u61d2ee;\\u62a8p\\u0241\\u03e9\\0\\0\\u03efrrow;\\u61d1ownArrow;\\u61d5erticalBar;\\u6225n\\u0300ABLRTa\\u0412\\u042a\\u0430\\u045e\\u047f\\u037crrow\\u0180;BU\\u041d\\u041e\\u0422\\u6193ar;\\u6913pArrow;\\u61f5reve;\\u4311eft\\u02d2\\u043a\\0\\u0446\\0\\u0450ightVector;\\u6950eeVector;\\u695eector\\u0100;B\\u0459\\u045a\\u61bdar;\\u6956ight\\u01d4\\u0467\\0\\u0471eeVector;\\u695fector\\u0100;B\\u047a\\u047b\\u61c1ar;\\u6957ee\\u0100;A\\u0486\\u0487\\u62a4rrow;\\u61a7\\u0100ct\\u0492\\u0497r;\\uc000\\ud835\\udc9frok;\\u4110\\u0800NTacdfglmopqstux\\u04bd\\u04c0\\u04c4\\u04cb\\u04de\\u04e2\\u04e7\\u04ee\\u04f5\\u0521\\u052f\\u0536\\u0552\\u055d\\u0560\\u0565G;\\u414aH\\u803b\\xd0\\u40d0cute\\u803b\\xc9\\u40c9\\u0180aiy\\u04d2\\u04d7\\u04dcron;\\u411arc\\u803b\\xca\\u40ca;\\u442dot;\\u4116r;\\uc000\\ud835\\udd08rave\\u803b\\xc8\\u40c8ement;\\u6208\\u0100ap\\u04fa\\u04fecr;\\u4112ty\\u0253\\u0506\\0\\0\\u0512mallSquare;\\u65fberySmallSquare;\\u65ab\\u0100gp\\u0526\\u052aon;\\u4118f;\\uc000\\ud835\\udd3csilon;\\u4395u\\u0100ai\\u053c\\u0549l\\u0100;T\\u0542\\u0543\\u6a75ilde;\\u6242librium;\\u61cc\\u0100ci\\u0557\\u055ar;\\u6130m;\\u6a73a;\\u4397ml\\u803b\\xcb\\u40cb\\u0100ip\\u056a\\u056fsts;\\u6203onentialE;\\u6147\\u0280cfios\\u0585\\u0588\\u058d\\u05b2\\u05ccy;\\u4424r;\\uc000\\ud835\\udd09lled\\u0253\\u0597\\0\\0\\u05a3mallSquare;\\u65fcerySmallSquare;\\u65aa\\u0370\\u05ba\\0\\u05bf\\0\\0\\u05c4f;\\uc000\\ud835\\udd3dAll;\\u6200riertrf;\\u6131c\\xf2\\u05cb\\u0600JTabcdfgorst\\u05e8\\u05ec\\u05ef\\u05fa\\u0600\\u0612\\u0616\\u061b\\u061d\\u0623\\u066c\\u0672cy;\\u4403\\u803b>\\u403emma\\u0100;d\\u05f7\\u05f8\\u4393;\\u43dcreve;\\u411e\\u0180eiy\\u0607\\u060c\\u0610dil;\\u4122rc;\\u411c;\\u4413ot;\\u4120r;\\uc000\\ud835\\udd0a;\\u62d9pf;\\uc000\\ud835\\udd3eeater\\u0300EFGLST\\u0635\\u0644\\u064e\\u0656\\u065b\\u0666qual\\u0100;L\\u063e\\u063f\\u6265ess;\\u62dbullEqual;\\u6267reater;\\u6aa2ess;\\u6277lantEqual;\\u6a7eilde;\\u6273cr;\\uc000\\ud835\\udca2;\\u626b\\u0400Aacfiosu\\u0685\\u068b\\u0696\\u069b\\u069e\\u06aa\\u06be\\u06caRDcy;\\u442a\\u0100ct\\u0690\\u0694ek;\\u42c7;\\u405eirc;\\u4124r;\\u610clbertSpace;\\u610b\\u01f0\\u06af\\0\\u06b2f;\\u610dizontalLine;\\u6500\\u0100ct\\u06c3\\u06c5\\xf2\\u06a9rok;\\u4126mp\\u0144\\u06d0\\u06d8ownHum\\xf0\\u012fqual;\\u624f\\u0700EJOacdfgmnostu\\u06fa\\u06fe\\u0703\\u0707\\u070e\\u071a\\u071e\\u0721\\u0728\\u0744\\u0778\\u078b\\u078f\\u0795cy;\\u4415lig;\\u4132cy;\\u4401cute\\u803b\\xcd\\u40cd\\u0100iy\\u0713\\u0718rc\\u803b\\xce\\u40ce;\\u4418ot;\\u4130r;\\u6111rave\\u803b\\xcc\\u40cc\\u0180;ap\\u0720\\u072f\\u073f\\u0100cg\\u0734\\u0737r;\\u412ainaryI;\\u6148lie\\xf3\\u03dd\\u01f4\\u0749\\0\\u0762\\u0100;e\\u074d\\u074e\\u622c\\u0100gr\\u0753\\u0758ral;\\u622bsection;\\u62c2isible\\u0100CT\\u076c\\u0772omma;\\u6063imes;\\u6062\\u0180gpt\\u077f\\u0783\\u0788on;\\u412ef;\\uc000\\ud835\\udd40a;\\u4399cr;\\u6110ilde;\\u4128\\u01eb\\u079a\\0\\u079ecy;\\u4406l\\u803b\\xcf\\u40cf\\u0280cfosu\\u07ac\\u07b7\\u07bc\\u07c2\\u07d0\\u0100iy\\u07b1\\u07b5rc;\\u4134;\\u4419r;\\uc000\\ud835\\udd0dpf;\\uc000\\ud835\\udd41\\u01e3\\u07c7\\0\\u07ccr;\\uc000\\ud835\\udca5rcy;\\u4408kcy;\\u4404\\u0380HJacfos\\u07e4\\u07e8\\u07ec\\u07f1\\u07fd\\u0802\\u0808cy;\\u4425cy;\\u440cppa;\\u439a\\u0100ey\\u07f6\\u07fbdil;\\u4136;\\u441ar;\\uc000\\ud835\\udd0epf;\\uc000\\ud835\\udd42cr;\\uc000\\ud835\\udca6\\u0580JTaceflmost\\u0825\\u0829\\u082c\\u0850\\u0863\\u09b3\\u09b8\\u09c7\\u09cd\\u0a37\\u0a47cy;\\u4409\\u803b<\\u403c\\u0280cmnpr\\u0837\\u083c\\u0841\\u0844\\u084dute;\\u4139bda;\\u439bg;\\u67ealacetrf;\\u6112r;\\u619e\\u0180aey\\u0857\\u085c\\u0861ron;\\u413ddil;\\u413b;\\u441b\\u0100fs\\u0868\\u0970t\\u0500ACDFRTUVar\\u087e\\u08a9\\u08b1\\u08e0\\u08e6\\u08fc\\u092f\\u095b\\u0390\\u096a\\u0100nr\\u0883\\u088fgleBracket;\\u67e8row\\u0180;BR\\u0899\\u089a\\u089e\\u6190ar;\\u61e4ightArrow;\\u61c6eiling;\\u6308o\\u01f5\\u08b7\\0\\u08c3bleBracket;\\u67e6n\\u01d4\\u08c8\\0\\u08d2eeVector;\\u6961ector\\u0100;B\\u08db\\u08dc\\u61c3ar;\\u6959loor;\\u630aight\\u0100AV\\u08ef\\u08f5rrow;\\u6194ector;\\u694e\\u0100er\\u0901\\u0917e\\u0180;AV\\u0909\\u090a\\u0910\\u62a3rrow;\\u61a4ector;\\u695aiangle\\u0180;BE\\u0924\\u0925\\u0929\\u62b2ar;\\u69cfqual;\\u62b4p\\u0180DTV\\u0937\\u0942\\u094cownVector;\\u6951eeVector;\\u6960ector\\u0100;B\\u0956\\u0957\\u61bfar;\\u6958ector\\u0100;B\\u0965\\u0966\\u61bcar;\\u6952ight\\xe1\\u039cs\\u0300EFGLST\\u097e\\u098b\\u0995\\u099d\\u09a2\\u09adqualGreater;\\u62daullEqual;\\u6266reater;\\u6276ess;\\u6aa1lantEqual;\\u6a7dilde;\\u6272r;\\uc000\\ud835\\udd0f\\u0100;e\\u09bd\\u09be\\u62d8ftarrow;\\u61daidot;\\u413f\\u0180npw\\u09d4\\u0a16\\u0a1bg\\u0200LRlr\\u09de\\u09f7\\u0a02\\u0a10eft\\u0100AR\\u09e6\\u09ecrrow;\\u67f5ightArrow;\\u67f7ightArrow;\\u67f6eft\\u0100ar\\u03b3\\u0a0aight\\xe1\\u03bfight\\xe1\\u03caf;\\uc000\\ud835\\udd43er\\u0100LR\\u0a22\\u0a2ceftArrow;\\u6199ightArrow;\\u6198\\u0180cht\\u0a3e\\u0a40\\u0a42\\xf2\\u084c;\\u61b0rok;\\u4141;\\u626a\\u0400acefiosu\\u0a5a\\u0a5d\\u0a60\\u0a77\\u0a7c\\u0a85\\u0a8b\\u0a8ep;\\u6905y;\\u441c\\u0100dl\\u0a65\\u0a6fiumSpace;\\u605flintrf;\\u6133r;\\uc000\\ud835\\udd10nusPlus;\\u6213pf;\\uc000\\ud835\\udd44c\\xf2\\u0a76;\\u439c\\u0480Jacefostu\\u0aa3\\u0aa7\\u0aad\\u0ac0\\u0b14\\u0b19\\u0d91\\u0d97\\u0d9ecy;\\u440acute;\\u4143\\u0180aey\\u0ab4\\u0ab9\\u0aberon;\\u4147dil;\\u4145;\\u441d\\u0180gsw\\u0ac7\\u0af0\\u0b0eative\\u0180MTV\\u0ad3\\u0adf\\u0ae8ediumSpace;\\u600bhi\\u0100cn\\u0ae6\\u0ad8\\xeb\\u0ad9eryThi\\xee\\u0ad9ted\\u0100GL\\u0af8\\u0b06reaterGreate\\xf2\\u0673essLes\\xf3\\u0a48Line;\\u400ar;\\uc000\\ud835\\udd11\\u0200Bnpt\\u0b22\\u0b28\\u0b37\\u0b3areak;\\u6060BreakingSpace;\\u40a0f;\\u6115\\u0680;CDEGHLNPRSTV\\u0b55\\u0b56\\u0b6a\\u0b7c\\u0ba1\\u0beb\\u0c04\\u0c5e\\u0c84\\u0ca6\\u0cd8\\u0d61\\u0d85\\u6aec\\u0100ou\\u0b5b\\u0b64ngruent;\\u6262pCap;\\u626doubleVerticalBar;\\u6226\\u0180lqx\\u0b83\\u0b8a\\u0b9bement;\\u6209ual\\u0100;T\\u0b92\\u0b93\\u6260ilde;\\uc000\\u2242\\u0338ists;\\u6204reater\\u0380;EFGLST\\u0bb6\\u0bb7\\u0bbd\\u0bc9\\u0bd3\\u0bd8\\u0be5\\u626fqual;\\u6271ullEqual;\\uc000\\u2267\\u0338reater;\\uc000\\u226b\\u0338ess;\\u6279lantEqual;\\uc000\\u2a7e\\u0338ilde;\\u6275ump\\u0144\\u0bf2\\u0bfdownHump;\\uc000\\u224e\\u0338qual;\\uc000\\u224f\\u0338e\\u0100fs\\u0c0a\\u0c27tTriangle\\u0180;BE\\u0c1a\\u0c1b\\u0c21\\u62eaar;\\uc000\\u29cf\\u0338qual;\\u62ecs\\u0300;EGLST\\u0c35\\u0c36\\u0c3c\\u0c44\\u0c4b\\u0c58\\u626equal;\\u6270reater;\\u6278ess;\\uc000\\u226a\\u0338lantEqual;\\uc000\\u2a7d\\u0338ilde;\\u6274ested\\u0100GL\\u0c68\\u0c79reaterGreater;\\uc000\\u2aa2\\u0338essLess;\\uc000\\u2aa1\\u0338recedes\\u0180;ES\\u0c92\\u0c93\\u0c9b\\u6280qual;\\uc000\\u2aaf\\u0338lantEqual;\\u62e0\\u0100ei\\u0cab\\u0cb9verseElement;\\u620cghtTriangle\\u0180;BE\\u0ccb\\u0ccc\\u0cd2\\u62ebar;\\uc000\\u29d0\\u0338qual;\\u62ed\\u0100qu\\u0cdd\\u0d0cuareSu\\u0100bp\\u0ce8\\u0cf9set\\u0100;E\\u0cf0\\u0cf3\\uc000\\u228f\\u0338qual;\\u62e2erset\\u0100;E\\u0d03\\u0d06\\uc000\\u2290\\u0338qual;\\u62e3\\u0180bcp\\u0d13\\u0d24\\u0d4eset\\u0100;E\\u0d1b\\u0d1e\\uc000\\u2282\\u20d2qual;\\u6288ceeds\\u0200;EST\\u0d32\\u0d33\\u0d3b\\u0d46\\u6281qual;\\uc000\\u2ab0\\u0338lantEqual;\\u62e1ilde;\\uc000\\u227f\\u0338erset\\u0100;E\\u0d58\\u0d5b\\uc000\\u2283\\u20d2qual;\\u6289ilde\\u0200;EFT\\u0d6e\\u0d6f\\u0d75\\u0d7f\\u6241qual;\\u6244ullEqual;\\u6247ilde;\\u6249erticalBar;\\u6224cr;\\uc000\\ud835\\udca9ilde\\u803b\\xd1\\u40d1;\\u439d\\u0700Eacdfgmoprstuv\\u0dbd\\u0dc2\\u0dc9\\u0dd5\\u0ddb\\u0de0\\u0de7\\u0dfc\\u0e02\\u0e20\\u0e22\\u0e32\\u0e3f\\u0e44lig;\\u4152cute\\u803b\\xd3\\u40d3\\u0100iy\\u0dce\\u0dd3rc\\u803b\\xd4\\u40d4;\\u441eblac;\\u4150r;\\uc000\\ud835\\udd12rave\\u803b\\xd2\\u40d2\\u0180aei\\u0dee\\u0df2\\u0df6cr;\\u414cga;\\u43a9cron;\\u439fpf;\\uc000\\ud835\\udd46enCurly\\u0100DQ\\u0e0e\\u0e1aoubleQuote;\\u601cuote;\\u6018;\\u6a54\\u0100cl\\u0e27\\u0e2cr;\\uc000\\ud835\\udcaaash\\u803b\\xd8\\u40d8i\\u016c\\u0e37\\u0e3cde\\u803b\\xd5\\u40d5es;\\u6a37ml\\u803b\\xd6\\u40d6er\\u0100BP\\u0e4b\\u0e60\\u0100ar\\u0e50\\u0e53r;\\u603eac\\u0100ek\\u0e5a\\u0e5c;\\u63deet;\\u63b4arenthesis;\\u63dc\\u0480acfhilors\\u0e7f\\u0e87\\u0e8a\\u0e8f\\u0e92\\u0e94\\u0e9d\\u0eb0\\u0efcrtialD;\\u6202y;\\u441fr;\\uc000\\ud835\\udd13i;\\u43a6;\\u43a0usMinus;\\u40b1\\u0100ip\\u0ea2\\u0eadncareplan\\xe5\\u069df;\\u6119\\u0200;eio\\u0eb9\\u0eba\\u0ee0\\u0ee4\\u6abbcedes\\u0200;EST\\u0ec8\\u0ec9\\u0ecf\\u0eda\\u627aqual;\\u6aaflantEqual;\\u627cilde;\\u627eme;\\u6033\\u0100dp\\u0ee9\\u0eeeuct;\\u620fortion\\u0100;a\\u0225\\u0ef9l;\\u621d\\u0100ci\\u0f01\\u0f06r;\\uc000\\ud835\\udcab;\\u43a8\\u0200Ufos\\u0f11\\u0f16\\u0f1b\\u0f1fOT\\u803b\\\"\\u4022r;\\uc000\\ud835\\udd14pf;\\u611acr;\\uc000\\ud835\\udcac\\u0600BEacefhiorsu\\u0f3e\\u0f43\\u0f47\\u0f60\\u0f73\\u0fa7\\u0faa\\u0fad\\u1096\\u10a9\\u10b4\\u10bearr;\\u6910G\\u803b\\xae\\u40ae\\u0180cnr\\u0f4e\\u0f53\\u0f56ute;\\u4154g;\\u67ebr\\u0100;t\\u0f5c\\u0f5d\\u61a0l;\\u6916\\u0180aey\\u0f67\\u0f6c\\u0f71ron;\\u4158dil;\\u4156;\\u4420\\u0100;v\\u0f78\\u0f79\\u611cerse\\u0100EU\\u0f82\\u0f99\\u0100lq\\u0f87\\u0f8eement;\\u620builibrium;\\u61cbpEquilibrium;\\u696fr\\xbb\\u0f79o;\\u43a1ght\\u0400ACDFTUVa\\u0fc1\\u0feb\\u0ff3\\u1022\\u1028\\u105b\\u1087\\u03d8\\u0100nr\\u0fc6\\u0fd2gleBracket;\\u67e9row\\u0180;BL\\u0fdc\\u0fdd\\u0fe1\\u6192ar;\\u61e5eftArrow;\\u61c4eiling;\\u6309o\\u01f5\\u0ff9\\0\\u1005bleBracket;\\u67e7n\\u01d4\\u100a\\0\\u1014eeVector;\\u695dector\\u0100;B\\u101d\\u101e\\u61c2ar;\\u6955loor;\\u630b\\u0100er\\u102d\\u1043e\\u0180;AV\\u1035\\u1036\\u103c\\u62a2rrow;\\u61a6ector;\\u695biangle\\u0180;BE\\u1050\\u1051\\u1055\\u62b3ar;\\u69d0qual;\\u62b5p\\u0180DTV\\u1063\\u106e\\u1078ownVector;\\u694feeVector;\\u695cector\\u0100;B\\u1082\\u1083\\u61bear;\\u6954ector\\u0100;B\\u1091\\u1092\\u61c0ar;\\u6953\\u0100pu\\u109b\\u109ef;\\u611dndImplies;\\u6970ightarrow;\\u61db\\u0100ch\\u10b9\\u10bcr;\\u611b;\\u61b1leDelayed;\\u69f4\\u0680HOacfhimoqstu\\u10e4\\u10f1\\u10f7\\u10fd\\u1119\\u111e\\u1151\\u1156\\u1161\\u1167\\u11b5\\u11bb\\u11bf\\u0100Cc\\u10e9\\u10eeHcy;\\u4429y;\\u4428FTcy;\\u442ccute;\\u415a\\u0280;aeiy\\u1108\\u1109\\u110e\\u1113\\u1117\\u6abcron;\\u4160dil;\\u415erc;\\u415c;\\u4421r;\\uc000\\ud835\\udd16ort\\u0200DLRU\\u112a\\u1134\\u113e\\u1149ownArrow\\xbb\\u041eeftArrow\\xbb\\u089aightArrow\\xbb\\u0fddpArrow;\\u6191gma;\\u43a3allCircle;\\u6218pf;\\uc000\\ud835\\udd4a\\u0272\\u116d\\0\\0\\u1170t;\\u621aare\\u0200;ISU\\u117b\\u117c\\u1189\\u11af\\u65a1ntersection;\\u6293u\\u0100bp\\u118f\\u119eset\\u0100;E\\u1197\\u1198\\u628fqual;\\u6291erset\\u0100;E\\u11a8\\u11a9\\u6290qual;\\u6292nion;\\u6294cr;\\uc000\\ud835\\udcaear;\\u62c6\\u0200bcmp\\u11c8\\u11db\\u1209\\u120b\\u0100;s\\u11cd\\u11ce\\u62d0et\\u0100;E\\u11cd\\u11d5qual;\\u6286\\u0100ch\\u11e0\\u1205eeds\\u0200;EST\\u11ed\\u11ee\\u11f4\\u11ff\\u627bqual;\\u6ab0lantEqual;\\u627dilde;\\u627fTh\\xe1\\u0f8c;\\u6211\\u0180;es\\u1212\\u1213\\u1223\\u62d1rset\\u0100;E\\u121c\\u121d\\u6283qual;\\u6287et\\xbb\\u1213\\u0580HRSacfhiors\\u123e\\u1244\\u1249\\u1255\\u125e\\u1271\\u1276\\u129f\\u12c2\\u12c8\\u12d1ORN\\u803b\\xde\\u40deADE;\\u6122\\u0100Hc\\u124e\\u1252cy;\\u440by;\\u4426\\u0100bu\\u125a\\u125c;\\u4009;\\u43a4\\u0180aey\\u1265\\u126a\\u126fron;\\u4164dil;\\u4162;\\u4422r;\\uc000\\ud835\\udd17\\u0100ei\\u127b\\u1289\\u01f2\\u1280\\0\\u1287efore;\\u6234a;\\u4398\\u0100cn\\u128e\\u1298kSpace;\\uc000\\u205f\\u200aSpace;\\u6009lde\\u0200;EFT\\u12ab\\u12ac\\u12b2\\u12bc\\u623cqual;\\u6243ullEqual;\\u6245ilde;\\u6248pf;\\uc000\\ud835\\udd4bipleDot;\\u60db\\u0100ct\\u12d6\\u12dbr;\\uc000\\ud835\\udcafrok;\\u4166\\u0ae1\\u12f7\\u130e\\u131a\\u1326\\0\\u132c\\u1331\\0\\0\\0\\0\\0\\u1338\\u133d\\u1377\\u1385\\0\\u13ff\\u1404\\u140a\\u1410\\u0100cr\\u12fb\\u1301ute\\u803b\\xda\\u40dar\\u0100;o\\u1307\\u1308\\u619fcir;\\u6949r\\u01e3\\u1313\\0\\u1316y;\\u440eve;\\u416c\\u0100iy\\u131e\\u1323rc\\u803b\\xdb\\u40db;\\u4423blac;\\u4170r;\\uc000\\ud835\\udd18rave\\u803b\\xd9\\u40d9acr;\\u416a\\u0100di\\u1341\\u1369er\\u0100BP\\u1348\\u135d\\u0100ar\\u134d\\u1350r;\\u405fac\\u0100ek\\u1357\\u1359;\\u63dfet;\\u63b5arenthesis;\\u63ddon\\u0100;P\\u1370\\u1371\\u62c3lus;\\u628e\\u0100gp\\u137b\\u137fon;\\u4172f;\\uc000\\ud835\\udd4c\\u0400ADETadps\\u1395\\u13ae\\u13b8\\u13c4\\u03e8\\u13d2\\u13d7\\u13f3rrow\\u0180;BD\\u1150\\u13a0\\u13a4ar;\\u6912ownArrow;\\u61c5ownArrow;\\u6195quilibrium;\\u696eee\\u0100;A\\u13cb\\u13cc\\u62a5rrow;\\u61a5own\\xe1\\u03f3er\\u0100LR\\u13de\\u13e8eftArrow;\\u6196ightArrow;\\u6197i\\u0100;l\\u13f9\\u13fa\\u43d2on;\\u43a5ing;\\u416ecr;\\uc000\\ud835\\udcb0ilde;\\u4168ml\\u803b\\xdc\\u40dc\\u0480Dbcdefosv\\u1427\\u142c\\u1430\\u1433\\u143e\\u1485\\u148a\\u1490\\u1496ash;\\u62abar;\\u6aeby;\\u4412ash\\u0100;l\\u143b\\u143c\\u62a9;\\u6ae6\\u0100er\\u1443\\u1445;\\u62c1\\u0180bty\\u144c\\u1450\\u147aar;\\u6016\\u0100;i\\u144f\\u1455cal\\u0200BLST\\u1461\\u1465\\u146a\\u1474ar;\\u6223ine;\\u407ceparator;\\u6758ilde;\\u6240ThinSpace;\\u600ar;\\uc000\\ud835\\udd19pf;\\uc000\\ud835\\udd4dcr;\\uc000\\ud835\\udcb1dash;\\u62aa\\u0280cefos\\u14a7\\u14ac\\u14b1\\u14b6\\u14bcirc;\\u4174dge;\\u62c0r;\\uc000\\ud835\\udd1apf;\\uc000\\ud835\\udd4ecr;\\uc000\\ud835\\udcb2\\u0200fios\\u14cb\\u14d0\\u14d2\\u14d8r;\\uc000\\ud835\\udd1b;\\u439epf;\\uc000\\ud835\\udd4fcr;\\uc000\\ud835\\udcb3\\u0480AIUacfosu\\u14f1\\u14f5\\u14f9\\u14fd\\u1504\\u150f\\u1514\\u151a\\u1520cy;\\u442fcy;\\u4407cy;\\u442ecute\\u803b\\xdd\\u40dd\\u0100iy\\u1509\\u150drc;\\u4176;\\u442br;\\uc000\\ud835\\udd1cpf;\\uc000\\ud835\\udd50cr;\\uc000\\ud835\\udcb4ml;\\u4178\\u0400Hacdefos\\u1535\\u1539\\u153f\\u154b\\u154f\\u155d\\u1560\\u1564cy;\\u4416cute;\\u4179\\u0100ay\\u1544\\u1549ron;\\u417d;\\u4417ot;\\u417b\\u01f2\\u1554\\0\\u155boWidt\\xe8\\u0ad9a;\\u4396r;\\u6128pf;\\u6124cr;\\uc000\\ud835\\udcb5\\u0be1\\u1583\\u158a\\u1590\\0\\u15b0\\u15b6\\u15bf\\0\\0\\0\\0\\u15c6\\u15db\\u15eb\\u165f\\u166d\\0\\u1695\\u169b\\u16b2\\u16b9\\0\\u16becute\\u803b\\xe1\\u40e1reve;\\u4103\\u0300;Ediuy\\u159c\\u159d\\u15a1\\u15a3\\u15a8\\u15ad\\u623e;\\uc000\\u223e\\u0333;\\u623frc\\u803b\\xe2\\u40e2te\\u80bb\\xb4\\u0306;\\u4430lig\\u803b\\xe6\\u40e6\\u0100;r\\xb2\\u15ba;\\uc000\\ud835\\udd1erave\\u803b\\xe0\\u40e0\\u0100ep\\u15ca\\u15d6\\u0100fp\\u15cf\\u15d4sym;\\u6135\\xe8\\u15d3ha;\\u43b1\\u0100ap\\u15dfc\\u0100cl\\u15e4\\u15e7r;\\u4101g;\\u6a3f\\u0264\\u15f0\\0\\0\\u160a\\u0280;adsv\\u15fa\\u15fb\\u15ff\\u1601\\u1607\\u6227nd;\\u6a55;\\u6a5clope;\\u6a58;\\u6a5a\\u0380;elmrsz\\u1618\\u1619\\u161b\\u161e\\u163f\\u164f\\u1659\\u6220;\\u69a4e\\xbb\\u1619sd\\u0100;a\\u1625\\u1626\\u6221\\u0461\\u1630\\u1632\\u1634\\u1636\\u1638\\u163a\\u163c\\u163e;\\u69a8;\\u69a9;\\u69aa;\\u69ab;\\u69ac;\\u69ad;\\u69ae;\\u69aft\\u0100;v\\u1645\\u1646\\u621fb\\u0100;d\\u164c\\u164d\\u62be;\\u699d\\u0100pt\\u1654\\u1657h;\\u6222\\xbb\\xb9arr;\\u637c\\u0100gp\\u1663\\u1667on;\\u4105f;\\uc000\\ud835\\udd52\\u0380;Eaeiop\\u12c1\\u167b\\u167d\\u1682\\u1684\\u1687\\u168a;\\u6a70cir;\\u6a6f;\\u624ad;\\u624bs;\\u4027rox\\u0100;e\\u12c1\\u1692\\xf1\\u1683ing\\u803b\\xe5\\u40e5\\u0180cty\\u16a1\\u16a6\\u16a8r;\\uc000\\ud835\\udcb6;\\u402amp\\u0100;e\\u12c1\\u16af\\xf1\\u0288ilde\\u803b\\xe3\\u40e3ml\\u803b\\xe4\\u40e4\\u0100ci\\u16c2\\u16c8onin\\xf4\\u0272nt;\\u6a11\\u0800Nabcdefiklnoprsu\\u16ed\\u16f1\\u1730\\u173c\\u1743\\u1748\\u1778\\u177d\\u17e0\\u17e6\\u1839\\u1850\\u170d\\u193d\\u1948\\u1970ot;\\u6aed\\u0100cr\\u16f6\\u171ek\\u0200ceps\\u1700\\u1705\\u170d\\u1713ong;\\u624cpsilon;\\u43f6rime;\\u6035im\\u0100;e\\u171a\\u171b\\u623dq;\\u62cd\\u0176\\u1722\\u1726ee;\\u62bded\\u0100;g\\u172c\\u172d\\u6305e\\xbb\\u172drk\\u0100;t\\u135c\\u1737brk;\\u63b6\\u0100oy\\u1701\\u1741;\\u4431quo;\\u601e\\u0280cmprt\\u1753\\u175b\\u1761\\u1764\\u1768aus\\u0100;e\\u010a\\u0109ptyv;\\u69b0s\\xe9\\u170cno\\xf5\\u0113\\u0180ahw\\u176f\\u1771\\u1773;\\u43b2;\\u6136een;\\u626cr;\\uc000\\ud835\\udd1fg\\u0380costuvw\\u178d\\u179d\\u17b3\\u17c1\\u17d5\\u17db\\u17de\\u0180aiu\\u1794\\u1796\\u179a\\xf0\\u0760rc;\\u65efp\\xbb\\u1371\\u0180dpt\\u17a4\\u17a8\\u17adot;\\u6a00lus;\\u6a01imes;\\u6a02\\u0271\\u17b9\\0\\0\\u17becup;\\u6a06ar;\\u6605riangle\\u0100du\\u17cd\\u17d2own;\\u65bdp;\\u65b3plus;\\u6a04e\\xe5\\u1444\\xe5\\u14adarow;\\u690d\\u0180ako\\u17ed\\u1826\\u1835\\u0100cn\\u17f2\\u1823k\\u0180lst\\u17fa\\u05ab\\u1802ozenge;\\u69ebriangle\\u0200;dlr\\u1812\\u1813\\u1818\\u181d\\u65b4own;\\u65beeft;\\u65c2ight;\\u65b8k;\\u6423\\u01b1\\u182b\\0\\u1833\\u01b2\\u182f\\0\\u1831;\\u6592;\\u65914;\\u6593ck;\\u6588\\u0100eo\\u183e\\u184d\\u0100;q\\u1843\\u1846\\uc000=\\u20e5uiv;\\uc000\\u2261\\u20e5t;\\u6310\\u0200ptwx\\u1859\\u185e\\u1867\\u186cf;\\uc000\\ud835\\udd53\\u0100;t\\u13cb\\u1863om\\xbb\\u13cctie;\\u62c8\\u0600DHUVbdhmptuv\\u1885\\u1896\\u18aa\\u18bb\\u18d7\\u18db\\u18ec\\u18ff\\u1905\\u190a\\u1910\\u1921\\u0200LRlr\\u188e\\u1890\\u1892\\u1894;\\u6557;\\u6554;\\u6556;\\u6553\\u0280;DUdu\\u18a1\\u18a2\\u18a4\\u18a6\\u18a8\\u6550;\\u6566;\\u6569;\\u6564;\\u6567\\u0200LRlr\\u18b3\\u18b5\\u18b7\\u18b9;\\u655d;\\u655a;\\u655c;\\u6559\\u0380;HLRhlr\\u18ca\\u18cb\\u18cd\\u18cf\\u18d1\\u18d3\\u18d5\\u6551;\\u656c;\\u6563;\\u6560;\\u656b;\\u6562;\\u655fox;\\u69c9\\u0200LRlr\\u18e4\\u18e6\\u18e8\\u18ea;\\u6555;\\u6552;\\u6510;\\u650c\\u0280;DUdu\\u06bd\\u18f7\\u18f9\\u18fb\\u18fd;\\u6565;\\u6568;\\u652c;\\u6534inus;\\u629flus;\\u629eimes;\\u62a0\\u0200LRlr\\u1919\\u191b\\u191d\\u191f;\\u655b;\\u6558;\\u6518;\\u6514\\u0380;HLRhlr\\u1930\\u1931\\u1933\\u1935\\u1937\\u1939\\u193b\\u6502;\\u656a;\\u6561;\\u655e;\\u653c;\\u6524;\\u651c\\u0100ev\\u0123\\u1942bar\\u803b\\xa6\\u40a6\\u0200ceio\\u1951\\u1956\\u195a\\u1960r;\\uc000\\ud835\\udcb7mi;\\u604fm\\u0100;e\\u171a\\u171cl\\u0180;bh\\u1968\\u1969\\u196b\\u405c;\\u69c5sub;\\u67c8\\u016c\\u1974\\u197el\\u0100;e\\u1979\\u197a\\u6022t\\xbb\\u197ap\\u0180;Ee\\u012f\\u1985\\u1987;\\u6aae\\u0100;q\\u06dc\\u06db\\u0ce1\\u19a7\\0\\u19e8\\u1a11\\u1a15\\u1a32\\0\\u1a37\\u1a50\\0\\0\\u1ab4\\0\\0\\u1ac1\\0\\0\\u1b21\\u1b2e\\u1b4d\\u1b52\\0\\u1bfd\\0\\u1c0c\\u0180cpr\\u19ad\\u19b2\\u19ddute;\\u4107\\u0300;abcds\\u19bf\\u19c0\\u19c4\\u19ca\\u19d5\\u19d9\\u6229nd;\\u6a44rcup;\\u6a49\\u0100au\\u19cf\\u19d2p;\\u6a4bp;\\u6a47ot;\\u6a40;\\uc000\\u2229\\ufe00\\u0100eo\\u19e2\\u19e5t;\\u6041\\xee\\u0693\\u0200aeiu\\u19f0\\u19fb\\u1a01\\u1a05\\u01f0\\u19f5\\0\\u19f8s;\\u6a4don;\\u410ddil\\u803b\\xe7\\u40e7rc;\\u4109ps\\u0100;s\\u1a0c\\u1a0d\\u6a4cm;\\u6a50ot;\\u410b\\u0180dmn\\u1a1b\\u1a20\\u1a26il\\u80bb\\xb8\\u01adptyv;\\u69b2t\\u8100\\xa2;e\\u1a2d\\u1a2e\\u40a2r\\xe4\\u01b2r;\\uc000\\ud835\\udd20\\u0180cei\\u1a3d\\u1a40\\u1a4dy;\\u4447ck\\u0100;m\\u1a47\\u1a48\\u6713ark\\xbb\\u1a48;\\u43c7r\\u0380;Ecefms\\u1a5f\\u1a60\\u1a62\\u1a6b\\u1aa4\\u1aaa\\u1aae\\u65cb;\\u69c3\\u0180;el\\u1a69\\u1a6a\\u1a6d\\u42c6q;\\u6257e\\u0261\\u1a74\\0\\0\\u1a88rrow\\u0100lr\\u1a7c\\u1a81eft;\\u61baight;\\u61bb\\u0280RSacd\\u1a92\\u1a94\\u1a96\\u1a9a\\u1a9f\\xbb\\u0f47;\\u64c8st;\\u629birc;\\u629aash;\\u629dnint;\\u6a10id;\\u6aefcir;\\u69c2ubs\\u0100;u\\u1abb\\u1abc\\u6663it\\xbb\\u1abc\\u02ec\\u1ac7\\u1ad4\\u1afa\\0\\u1b0aon\\u0100;e\\u1acd\\u1ace\\u403a\\u0100;q\\xc7\\xc6\\u026d\\u1ad9\\0\\0\\u1ae2a\\u0100;t\\u1ade\\u1adf\\u402c;\\u4040\\u0180;fl\\u1ae8\\u1ae9\\u1aeb\\u6201\\xee\\u1160e\\u0100mx\\u1af1\\u1af6ent\\xbb\\u1ae9e\\xf3\\u024d\\u01e7\\u1afe\\0\\u1b07\\u0100;d\\u12bb\\u1b02ot;\\u6a6dn\\xf4\\u0246\\u0180fry\\u1b10\\u1b14\\u1b17;\\uc000\\ud835\\udd54o\\xe4\\u0254\\u8100\\xa9;s\\u0155\\u1b1dr;\\u6117\\u0100ao\\u1b25\\u1b29rr;\\u61b5ss;\\u6717\\u0100cu\\u1b32\\u1b37r;\\uc000\\ud835\\udcb8\\u0100bp\\u1b3c\\u1b44\\u0100;e\\u1b41\\u1b42\\u6acf;\\u6ad1\\u0100;e\\u1b49\\u1b4a\\u6ad0;\\u6ad2dot;\\u62ef\\u0380delprvw\\u1b60\\u1b6c\\u1b77\\u1b82\\u1bac\\u1bd4\\u1bf9arr\\u0100lr\\u1b68\\u1b6a;\\u6938;\\u6935\\u0270\\u1b72\\0\\0\\u1b75r;\\u62dec;\\u62dfarr\\u0100;p\\u1b7f\\u1b80\\u61b6;\\u693d\\u0300;bcdos\\u1b8f\\u1b90\\u1b96\\u1ba1\\u1ba5\\u1ba8\\u622arcap;\\u6a48\\u0100au\\u1b9b\\u1b9ep;\\u6a46p;\\u6a4aot;\\u628dr;\\u6a45;\\uc000\\u222a\\ufe00\\u0200alrv\\u1bb5\\u1bbf\\u1bde\\u1be3rr\\u0100;m\\u1bbc\\u1bbd\\u61b7;\\u693cy\\u0180evw\\u1bc7\\u1bd4\\u1bd8q\\u0270\\u1bce\\0\\0\\u1bd2re\\xe3\\u1b73u\\xe3\\u1b75ee;\\u62ceedge;\\u62cfen\\u803b\\xa4\\u40a4earrow\\u0100lr\\u1bee\\u1bf3eft\\xbb\\u1b80ight\\xbb\\u1bbde\\xe4\\u1bdd\\u0100ci\\u1c01\\u1c07onin\\xf4\\u01f7nt;\\u6231lcty;\\u632d\\u0980AHabcdefhijlorstuwz\\u1c38\\u1c3b\\u1c3f\\u1c5d\\u1c69\\u1c75\\u1c8a\\u1c9e\\u1cac\\u1cb7\\u1cfb\\u1cff\\u1d0d\\u1d7b\\u1d91\\u1dab\\u1dbb\\u1dc6\\u1dcdr\\xf2\\u0381ar;\\u6965\\u0200glrs\\u1c48\\u1c4d\\u1c52\\u1c54ger;\\u6020eth;\\u6138\\xf2\\u1133h\\u0100;v\\u1c5a\\u1c5b\\u6010\\xbb\\u090a\\u016b\\u1c61\\u1c67arow;\\u690fa\\xe3\\u0315\\u0100ay\\u1c6e\\u1c73ron;\\u410f;\\u4434\\u0180;ao\\u0332\\u1c7c\\u1c84\\u0100gr\\u02bf\\u1c81r;\\u61catseq;\\u6a77\\u0180glm\\u1c91\\u1c94\\u1c98\\u803b\\xb0\\u40b0ta;\\u43b4ptyv;\\u69b1\\u0100ir\\u1ca3\\u1ca8sht;\\u697f;\\uc000\\ud835\\udd21ar\\u0100lr\\u1cb3\\u1cb5\\xbb\\u08dc\\xbb\\u101e\\u0280aegsv\\u1cc2\\u0378\\u1cd6\\u1cdc\\u1ce0m\\u0180;os\\u0326\\u1cca\\u1cd4nd\\u0100;s\\u0326\\u1cd1uit;\\u6666amma;\\u43ddin;\\u62f2\\u0180;io\\u1ce7\\u1ce8\\u1cf8\\u40f7de\\u8100\\xf7;o\\u1ce7\\u1cf0ntimes;\\u62c7n\\xf8\\u1cf7cy;\\u4452c\\u026f\\u1d06\\0\\0\\u1d0arn;\\u631eop;\\u630d\\u0280lptuw\\u1d18\\u1d1d\\u1d22\\u1d49\\u1d55lar;\\u4024f;\\uc000\\ud835\\udd55\\u0280;emps\\u030b\\u1d2d\\u1d37\\u1d3d\\u1d42q\\u0100;d\\u0352\\u1d33ot;\\u6251inus;\\u6238lus;\\u6214quare;\\u62a1blebarwedg\\xe5\\xfan\\u0180adh\\u112e\\u1d5d\\u1d67ownarrow\\xf3\\u1c83arpoon\\u0100lr\\u1d72\\u1d76ef\\xf4\\u1cb4igh\\xf4\\u1cb6\\u0162\\u1d7f\\u1d85karo\\xf7\\u0f42\\u026f\\u1d8a\\0\\0\\u1d8ern;\\u631fop;\\u630c\\u0180cot\\u1d98\\u1da3\\u1da6\\u0100ry\\u1d9d\\u1da1;\\uc000\\ud835\\udcb9;\\u4455l;\\u69f6rok;\\u4111\\u0100dr\\u1db0\\u1db4ot;\\u62f1i\\u0100;f\\u1dba\\u1816\\u65bf\\u0100ah\\u1dc0\\u1dc3r\\xf2\\u0429a\\xf2\\u0fa6angle;\\u69a6\\u0100ci\\u1dd2\\u1dd5y;\\u445fgrarr;\\u67ff\\u0900Dacdefglmnopqrstux\\u1e01\\u1e09\\u1e19\\u1e38\\u0578\\u1e3c\\u1e49\\u1e61\\u1e7e\\u1ea5\\u1eaf\\u1ebd\\u1ee1\\u1f2a\\u1f37\\u1f44\\u1f4e\\u1f5a\\u0100Do\\u1e06\\u1d34o\\xf4\\u1c89\\u0100cs\\u1e0e\\u1e14ute\\u803b\\xe9\\u40e9ter;\\u6a6e\\u0200aioy\\u1e22\\u1e27\\u1e31\\u1e36ron;\\u411br\\u0100;c\\u1e2d\\u1e2e\\u6256\\u803b\\xea\\u40ealon;\\u6255;\\u444dot;\\u4117\\u0100Dr\\u1e41\\u1e45ot;\\u6252;\\uc000\\ud835\\udd22\\u0180;rs\\u1e50\\u1e51\\u1e57\\u6a9aave\\u803b\\xe8\\u40e8\\u0100;d\\u1e5c\\u1e5d\\u6a96ot;\\u6a98\\u0200;ils\\u1e6a\\u1e6b\\u1e72\\u1e74\\u6a99nters;\\u63e7;\\u6113\\u0100;d\\u1e79\\u1e7a\\u6a95ot;\\u6a97\\u0180aps\\u1e85\\u1e89\\u1e97cr;\\u4113ty\\u0180;sv\\u1e92\\u1e93\\u1e95\\u6205et\\xbb\\u1e93p\\u01001;\\u1e9d\\u1ea4\\u0133\\u1ea1\\u1ea3;\\u6004;\\u6005\\u6003\\u0100gs\\u1eaa\\u1eac;\\u414bp;\\u6002\\u0100gp\\u1eb4\\u1eb8on;\\u4119f;\\uc000\\ud835\\udd56\\u0180als\\u1ec4\\u1ece\\u1ed2r\\u0100;s\\u1eca\\u1ecb\\u62d5l;\\u69e3us;\\u6a71i\\u0180;lv\\u1eda\\u1edb\\u1edf\\u43b5on\\xbb\\u1edb;\\u43f5\\u0200csuv\\u1eea\\u1ef3\\u1f0b\\u1f23\\u0100io\\u1eef\\u1e31rc\\xbb\\u1e2e\\u0269\\u1ef9\\0\\0\\u1efb\\xed\\u0548ant\\u0100gl\\u1f02\\u1f06tr\\xbb\\u1e5dess\\xbb\\u1e7a\\u0180aei\\u1f12\\u1f16\\u1f1als;\\u403dst;\\u625fv\\u0100;D\\u0235\\u1f20D;\\u6a78parsl;\\u69e5\\u0100Da\\u1f2f\\u1f33ot;\\u6253rr;\\u6971\\u0180cdi\\u1f3e\\u1f41\\u1ef8r;\\u612fo\\xf4\\u0352\\u0100ah\\u1f49\\u1f4b;\\u43b7\\u803b\\xf0\\u40f0\\u0100mr\\u1f53\\u1f57l\\u803b\\xeb\\u40ebo;\\u60ac\\u0180cip\\u1f61\\u1f64\\u1f67l;\\u4021s\\xf4\\u056e\\u0100eo\\u1f6c\\u1f74ctatio\\xee\\u0559nential\\xe5\\u0579\\u09e1\\u1f92\\0\\u1f9e\\0\\u1fa1\\u1fa7\\0\\0\\u1fc6\\u1fcc\\0\\u1fd3\\0\\u1fe6\\u1fea\\u2000\\0\\u2008\\u205allingdotse\\xf1\\u1e44y;\\u4444male;\\u6640\\u0180ilr\\u1fad\\u1fb3\\u1fc1lig;\\u8000\\ufb03\\u0269\\u1fb9\\0\\0\\u1fbdg;\\u8000\\ufb00ig;\\u8000\\ufb04;\\uc000\\ud835\\udd23lig;\\u8000\\ufb01lig;\\uc000fj\\u0180alt\\u1fd9\\u1fdc\\u1fe1t;\\u666dig;\\u8000\\ufb02ns;\\u65b1of;\\u4192\\u01f0\\u1fee\\0\\u1ff3f;\\uc000\\ud835\\udd57\\u0100ak\\u05bf\\u1ff7\\u0100;v\\u1ffc\\u1ffd\\u62d4;\\u6ad9artint;\\u6a0d\\u0100ao\\u200c\\u2055\\u0100cs\\u2011\\u2052\\u03b1\\u201a\\u2030\\u2038\\u2045\\u2048\\0\\u2050\\u03b2\\u2022\\u2025\\u2027\\u202a\\u202c\\0\\u202e\\u803b\\xbd\\u40bd;\\u6153\\u803b\\xbc\\u40bc;\\u6155;\\u6159;\\u615b\\u01b3\\u2034\\0\\u2036;\\u6154;\\u6156\\u02b4\\u203e\\u2041\\0\\0\\u2043\\u803b\\xbe\\u40be;\\u6157;\\u615c5;\\u6158\\u01b6\\u204c\\0\\u204e;\\u615a;\\u615d8;\\u615el;\\u6044wn;\\u6322cr;\\uc000\\ud835\\udcbb\\u0880Eabcdefgijlnorstv\\u2082\\u2089\\u209f\\u20a5\\u20b0\\u20b4\\u20f0\\u20f5\\u20fa\\u20ff\\u2103\\u2112\\u2138\\u0317\\u213e\\u2152\\u219e\\u0100;l\\u064d\\u2087;\\u6a8c\\u0180cmp\\u2090\\u2095\\u209dute;\\u41f5ma\\u0100;d\\u209c\\u1cda\\u43b3;\\u6a86reve;\\u411f\\u0100iy\\u20aa\\u20aerc;\\u411d;\\u4433ot;\\u4121\\u0200;lqs\\u063e\\u0642\\u20bd\\u20c9\\u0180;qs\\u063e\\u064c\\u20c4lan\\xf4\\u0665\\u0200;cdl\\u0665\\u20d2\\u20d5\\u20e5c;\\u6aa9ot\\u0100;o\\u20dc\\u20dd\\u6a80\\u0100;l\\u20e2\\u20e3\\u6a82;\\u6a84\\u0100;e\\u20ea\\u20ed\\uc000\\u22db\\ufe00s;\\u6a94r;\\uc000\\ud835\\udd24\\u0100;g\\u0673\\u061bmel;\\u6137cy;\\u4453\\u0200;Eaj\\u065a\\u210c\\u210e\\u2110;\\u6a92;\\u6aa5;\\u6aa4\\u0200Eaes\\u211b\\u211d\\u2129\\u2134;\\u6269p\\u0100;p\\u2123\\u2124\\u6a8arox\\xbb\\u2124\\u0100;q\\u212e\\u212f\\u6a88\\u0100;q\\u212e\\u211bim;\\u62e7pf;\\uc000\\ud835\\udd58\\u0100ci\\u2143\\u2146r;\\u610am\\u0180;el\\u066b\\u214e\\u2150;\\u6a8e;\\u6a90\\u8300>;cdlqr\\u05ee\\u2160\\u216a\\u216e\\u2173\\u2179\\u0100ci\\u2165\\u2167;\\u6aa7r;\\u6a7aot;\\u62d7Par;\\u6995uest;\\u6a7c\\u0280adels\\u2184\\u216a\\u2190\\u0656\\u219b\\u01f0\\u2189\\0\\u218epro\\xf8\\u209er;\\u6978q\\u0100lq\\u063f\\u2196les\\xf3\\u2088i\\xed\\u066b\\u0100en\\u21a3\\u21adrtneqq;\\uc000\\u2269\\ufe00\\xc5\\u21aa\\u0500Aabcefkosy\\u21c4\\u21c7\\u21f1\\u21f5\\u21fa\\u2218\\u221d\\u222f\\u2268\\u227dr\\xf2\\u03a0\\u0200ilmr\\u21d0\\u21d4\\u21d7\\u21dbrs\\xf0\\u1484f\\xbb\\u2024il\\xf4\\u06a9\\u0100dr\\u21e0\\u21e4cy;\\u444a\\u0180;cw\\u08f4\\u21eb\\u21efir;\\u6948;\\u61adar;\\u610firc;\\u4125\\u0180alr\\u2201\\u220e\\u2213rts\\u0100;u\\u2209\\u220a\\u6665it\\xbb\\u220alip;\\u6026con;\\u62b9r;\\uc000\\ud835\\udd25s\\u0100ew\\u2223\\u2229arow;\\u6925arow;\\u6926\\u0280amopr\\u223a\\u223e\\u2243\\u225e\\u2263rr;\\u61fftht;\\u623bk\\u0100lr\\u2249\\u2253eftarrow;\\u61a9ightarrow;\\u61aaf;\\uc000\\ud835\\udd59bar;\\u6015\\u0180clt\\u226f\\u2274\\u2278r;\\uc000\\ud835\\udcbdas\\xe8\\u21f4rok;\\u4127\\u0100bp\\u2282\\u2287ull;\\u6043hen\\xbb\\u1c5b\\u0ae1\\u22a3\\0\\u22aa\\0\\u22b8\\u22c5\\u22ce\\0\\u22d5\\u22f3\\0\\0\\u22f8\\u2322\\u2367\\u2362\\u237f\\0\\u2386\\u23aa\\u23b4cute\\u803b\\xed\\u40ed\\u0180;iy\\u0771\\u22b0\\u22b5rc\\u803b\\xee\\u40ee;\\u4438\\u0100cx\\u22bc\\u22bfy;\\u4435cl\\u803b\\xa1\\u40a1\\u0100fr\\u039f\\u22c9;\\uc000\\ud835\\udd26rave\\u803b\\xec\\u40ec\\u0200;ino\\u073e\\u22dd\\u22e9\\u22ee\\u0100in\\u22e2\\u22e6nt;\\u6a0ct;\\u622dfin;\\u69dcta;\\u6129lig;\\u4133\\u0180aop\\u22fe\\u231a\\u231d\\u0180cgt\\u2305\\u2308\\u2317r;\\u412b\\u0180elp\\u071f\\u230f\\u2313in\\xe5\\u078ear\\xf4\\u0720h;\\u4131f;\\u62b7ed;\\u41b5\\u0280;cfot\\u04f4\\u232c\\u2331\\u233d\\u2341are;\\u6105in\\u0100;t\\u2338\\u2339\\u621eie;\\u69dddo\\xf4\\u2319\\u0280;celp\\u0757\\u234c\\u2350\\u235b\\u2361al;\\u62ba\\u0100gr\\u2355\\u2359er\\xf3\\u1563\\xe3\\u234darhk;\\u6a17rod;\\u6a3c\\u0200cgpt\\u236f\\u2372\\u2376\\u237by;\\u4451on;\\u412ff;\\uc000\\ud835\\udd5aa;\\u43b9uest\\u803b\\xbf\\u40bf\\u0100ci\\u238a\\u238fr;\\uc000\\ud835\\udcben\\u0280;Edsv\\u04f4\\u239b\\u239d\\u23a1\\u04f3;\\u62f9ot;\\u62f5\\u0100;v\\u23a6\\u23a7\\u62f4;\\u62f3\\u0100;i\\u0777\\u23aelde;\\u4129\\u01eb\\u23b8\\0\\u23bccy;\\u4456l\\u803b\\xef\\u40ef\\u0300cfmosu\\u23cc\\u23d7\\u23dc\\u23e1\\u23e7\\u23f5\\u0100iy\\u23d1\\u23d5rc;\\u4135;\\u4439r;\\uc000\\ud835\\udd27ath;\\u4237pf;\\uc000\\ud835\\udd5b\\u01e3\\u23ec\\0\\u23f1r;\\uc000\\ud835\\udcbfrcy;\\u4458kcy;\\u4454\\u0400acfghjos\\u240b\\u2416\\u2422\\u2427\\u242d\\u2431\\u2435\\u243bppa\\u0100;v\\u2413\\u2414\\u43ba;\\u43f0\\u0100ey\\u241b\\u2420dil;\\u4137;\\u443ar;\\uc000\\ud835\\udd28reen;\\u4138cy;\\u4445cy;\\u445cpf;\\uc000\\ud835\\udd5ccr;\\uc000\\ud835\\udcc0\\u0b80ABEHabcdefghjlmnoprstuv\\u2470\\u2481\\u2486\\u248d\\u2491\\u250e\\u253d\\u255a\\u2580\\u264e\\u265e\\u2665\\u2679\\u267d\\u269a\\u26b2\\u26d8\\u275d\\u2768\\u278b\\u27c0\\u2801\\u2812\\u0180art\\u2477\\u247a\\u247cr\\xf2\\u09c6\\xf2\\u0395ail;\\u691barr;\\u690e\\u0100;g\\u0994\\u248b;\\u6a8bar;\\u6962\\u0963\\u24a5\\0\\u24aa\\0\\u24b1\\0\\0\\0\\0\\0\\u24b5\\u24ba\\0\\u24c6\\u24c8\\u24cd\\0\\u24f9ute;\\u413amptyv;\\u69b4ra\\xee\\u084cbda;\\u43bbg\\u0180;dl\\u088e\\u24c1\\u24c3;\\u6991\\xe5\\u088e;\\u6a85uo\\u803b\\xab\\u40abr\\u0400;bfhlpst\\u0899\\u24de\\u24e6\\u24e9\\u24eb\\u24ee\\u24f1\\u24f5\\u0100;f\\u089d\\u24e3s;\\u691fs;\\u691d\\xeb\\u2252p;\\u61abl;\\u6939im;\\u6973l;\\u61a2\\u0180;ae\\u24ff\\u2500\\u2504\\u6aabil;\\u6919\\u0100;s\\u2509\\u250a\\u6aad;\\uc000\\u2aad\\ufe00\\u0180abr\\u2515\\u2519\\u251drr;\\u690crk;\\u6772\\u0100ak\\u2522\\u252cc\\u0100ek\\u2528\\u252a;\\u407b;\\u405b\\u0100es\\u2531\\u2533;\\u698bl\\u0100du\\u2539\\u253b;\\u698f;\\u698d\\u0200aeuy\\u2546\\u254b\\u2556\\u2558ron;\\u413e\\u0100di\\u2550\\u2554il;\\u413c\\xec\\u08b0\\xe2\\u2529;\\u443b\\u0200cqrs\\u2563\\u2566\\u256d\\u257da;\\u6936uo\\u0100;r\\u0e19\\u1746\\u0100du\\u2572\\u2577har;\\u6967shar;\\u694bh;\\u61b2\\u0280;fgqs\\u258b\\u258c\\u0989\\u25f3\\u25ff\\u6264t\\u0280ahlrt\\u2598\\u25a4\\u25b7\\u25c2\\u25e8rrow\\u0100;t\\u0899\\u25a1a\\xe9\\u24f6arpoon\\u0100du\\u25af\\u25b4own\\xbb\\u045ap\\xbb\\u0966eftarrows;\\u61c7ight\\u0180ahs\\u25cd\\u25d6\\u25derrow\\u0100;s\\u08f4\\u08a7arpoon\\xf3\\u0f98quigarro\\xf7\\u21f0hreetimes;\\u62cb\\u0180;qs\\u258b\\u0993\\u25falan\\xf4\\u09ac\\u0280;cdgs\\u09ac\\u260a\\u260d\\u261d\\u2628c;\\u6aa8ot\\u0100;o\\u2614\\u2615\\u6a7f\\u0100;r\\u261a\\u261b\\u6a81;\\u6a83\\u0100;e\\u2622\\u2625\\uc000\\u22da\\ufe00s;\\u6a93\\u0280adegs\\u2633\\u2639\\u263d\\u2649\\u264bppro\\xf8\\u24c6ot;\\u62d6q\\u0100gq\\u2643\\u2645\\xf4\\u0989gt\\xf2\\u248c\\xf4\\u099bi\\xed\\u09b2\\u0180ilr\\u2655\\u08e1\\u265asht;\\u697c;\\uc000\\ud835\\udd29\\u0100;E\\u099c\\u2663;\\u6a91\\u0161\\u2669\\u2676r\\u0100du\\u25b2\\u266e\\u0100;l\\u0965\\u2673;\\u696alk;\\u6584cy;\\u4459\\u0280;acht\\u0a48\\u2688\\u268b\\u2691\\u2696r\\xf2\\u25c1orne\\xf2\\u1d08ard;\\u696bri;\\u65fa\\u0100io\\u269f\\u26a4dot;\\u4140ust\\u0100;a\\u26ac\\u26ad\\u63b0che\\xbb\\u26ad\\u0200Eaes\\u26bb\\u26bd\\u26c9\\u26d4;\\u6268p\\u0100;p\\u26c3\\u26c4\\u6a89rox\\xbb\\u26c4\\u0100;q\\u26ce\\u26cf\\u6a87\\u0100;q\\u26ce\\u26bbim;\\u62e6\\u0400abnoptwz\\u26e9\\u26f4\\u26f7\\u271a\\u272f\\u2741\\u2747\\u2750\\u0100nr\\u26ee\\u26f1g;\\u67ecr;\\u61fdr\\xeb\\u08c1g\\u0180lmr\\u26ff\\u270d\\u2714eft\\u0100ar\\u09e6\\u2707ight\\xe1\\u09f2apsto;\\u67fcight\\xe1\\u09fdparrow\\u0100lr\\u2725\\u2729ef\\xf4\\u24edight;\\u61ac\\u0180afl\\u2736\\u2739\\u273dr;\\u6985;\\uc000\\ud835\\udd5dus;\\u6a2dimes;\\u6a34\\u0161\\u274b\\u274fst;\\u6217\\xe1\\u134e\\u0180;ef\\u2757\\u2758\\u1800\\u65cange\\xbb\\u2758ar\\u0100;l\\u2764\\u2765\\u4028t;\\u6993\\u0280achmt\\u2773\\u2776\\u277c\\u2785\\u2787r\\xf2\\u08a8orne\\xf2\\u1d8car\\u0100;d\\u0f98\\u2783;\\u696d;\\u600eri;\\u62bf\\u0300achiqt\\u2798\\u279d\\u0a40\\u27a2\\u27ae\\u27bbquo;\\u6039r;\\uc000\\ud835\\udcc1m\\u0180;eg\\u09b2\\u27aa\\u27ac;\\u6a8d;\\u6a8f\\u0100bu\\u252a\\u27b3o\\u0100;r\\u0e1f\\u27b9;\\u601arok;\\u4142\\u8400<;cdhilqr\\u082b\\u27d2\\u2639\\u27dc\\u27e0\\u27e5\\u27ea\\u27f0\\u0100ci\\u27d7\\u27d9;\\u6aa6r;\\u6a79re\\xe5\\u25f2mes;\\u62c9arr;\\u6976uest;\\u6a7b\\u0100Pi\\u27f5\\u27f9ar;\\u6996\\u0180;ef\\u2800\\u092d\\u181b\\u65c3r\\u0100du\\u2807\\u280dshar;\\u694ahar;\\u6966\\u0100en\\u2817\\u2821rtneqq;\\uc000\\u2268\\ufe00\\xc5\\u281e\\u0700Dacdefhilnopsu\\u2840\\u2845\\u2882\\u288e\\u2893\\u28a0\\u28a5\\u28a8\\u28da\\u28e2\\u28e4\\u0a83\\u28f3\\u2902Dot;\\u623a\\u0200clpr\\u284e\\u2852\\u2863\\u287dr\\u803b\\xaf\\u40af\\u0100et\\u2857\\u2859;\\u6642\\u0100;e\\u285e\\u285f\\u6720se\\xbb\\u285f\\u0100;s\\u103b\\u2868to\\u0200;dlu\\u103b\\u2873\\u2877\\u287bow\\xee\\u048cef\\xf4\\u090f\\xf0\\u13d1ker;\\u65ae\\u0100oy\\u2887\\u288cmma;\\u6a29;\\u443cash;\\u6014asuredangle\\xbb\\u1626r;\\uc000\\ud835\\udd2ao;\\u6127\\u0180cdn\\u28af\\u28b4\\u28c9ro\\u803b\\xb5\\u40b5\\u0200;acd\\u1464\\u28bd\\u28c0\\u28c4s\\xf4\\u16a7ir;\\u6af0ot\\u80bb\\xb7\\u01b5us\\u0180;bd\\u28d2\\u1903\\u28d3\\u6212\\u0100;u\\u1d3c\\u28d8;\\u6a2a\\u0163\\u28de\\u28e1p;\\u6adb\\xf2\\u2212\\xf0\\u0a81\\u0100dp\\u28e9\\u28eeels;\\u62a7f;\\uc000\\ud835\\udd5e\\u0100ct\\u28f8\\u28fdr;\\uc000\\ud835\\udcc2pos\\xbb\\u159d\\u0180;lm\\u2909\\u290a\\u290d\\u43bctimap;\\u62b8\\u0c00GLRVabcdefghijlmoprstuvw\\u2942\\u2953\\u297e\\u2989\\u2998\\u29da\\u29e9\\u2a15\\u2a1a\\u2a58\\u2a5d\\u2a83\\u2a95\\u2aa4\\u2aa8\\u2b04\\u2b07\\u2b44\\u2b7f\\u2bae\\u2c34\\u2c67\\u2c7c\\u2ce9\\u0100gt\\u2947\\u294b;\\uc000\\u22d9\\u0338\\u0100;v\\u2950\\u0bcf\\uc000\\u226b\\u20d2\\u0180elt\\u295a\\u2972\\u2976ft\\u0100ar\\u2961\\u2967rrow;\\u61cdightarrow;\\u61ce;\\uc000\\u22d8\\u0338\\u0100;v\\u297b\\u0c47\\uc000\\u226a\\u20d2ightarrow;\\u61cf\\u0100Dd\\u298e\\u2993ash;\\u62afash;\\u62ae\\u0280bcnpt\\u29a3\\u29a7\\u29ac\\u29b1\\u29ccla\\xbb\\u02deute;\\u4144g;\\uc000\\u2220\\u20d2\\u0280;Eiop\\u0d84\\u29bc\\u29c0\\u29c5\\u29c8;\\uc000\\u2a70\\u0338d;\\uc000\\u224b\\u0338s;\\u4149ro\\xf8\\u0d84ur\\u0100;a\\u29d3\\u29d4\\u666el\\u0100;s\\u29d3\\u0b38\\u01f3\\u29df\\0\\u29e3p\\u80bb\\xa0\\u0b37mp\\u0100;e\\u0bf9\\u0c00\\u0280aeouy\\u29f4\\u29fe\\u2a03\\u2a10\\u2a13\\u01f0\\u29f9\\0\\u29fb;\\u6a43on;\\u4148dil;\\u4146ng\\u0100;d\\u0d7e\\u2a0aot;\\uc000\\u2a6d\\u0338p;\\u6a42;\\u443dash;\\u6013\\u0380;Aadqsx\\u0b92\\u2a29\\u2a2d\\u2a3b\\u2a41\\u2a45\\u2a50rr;\\u61d7r\\u0100hr\\u2a33\\u2a36k;\\u6924\\u0100;o\\u13f2\\u13f0ot;\\uc000\\u2250\\u0338ui\\xf6\\u0b63\\u0100ei\\u2a4a\\u2a4ear;\\u6928\\xed\\u0b98ist\\u0100;s\\u0ba0\\u0b9fr;\\uc000\\ud835\\udd2b\\u0200Eest\\u0bc5\\u2a66\\u2a79\\u2a7c\\u0180;qs\\u0bbc\\u2a6d\\u0be1\\u0180;qs\\u0bbc\\u0bc5\\u2a74lan\\xf4\\u0be2i\\xed\\u0bea\\u0100;r\\u0bb6\\u2a81\\xbb\\u0bb7\\u0180Aap\\u2a8a\\u2a8d\\u2a91r\\xf2\\u2971rr;\\u61aear;\\u6af2\\u0180;sv\\u0f8d\\u2a9c\\u0f8c\\u0100;d\\u2aa1\\u2aa2\\u62fc;\\u62facy;\\u445a\\u0380AEadest\\u2ab7\\u2aba\\u2abe\\u2ac2\\u2ac5\\u2af6\\u2af9r\\xf2\\u2966;\\uc000\\u2266\\u0338rr;\\u619ar;\\u6025\\u0200;fqs\\u0c3b\\u2ace\\u2ae3\\u2aeft\\u0100ar\\u2ad4\\u2ad9rro\\xf7\\u2ac1ightarro\\xf7\\u2a90\\u0180;qs\\u0c3b\\u2aba\\u2aealan\\xf4\\u0c55\\u0100;s\\u0c55\\u2af4\\xbb\\u0c36i\\xed\\u0c5d\\u0100;r\\u0c35\\u2afei\\u0100;e\\u0c1a\\u0c25i\\xe4\\u0d90\\u0100pt\\u2b0c\\u2b11f;\\uc000\\ud835\\udd5f\\u8180\\xac;in\\u2b19\\u2b1a\\u2b36\\u40acn\\u0200;Edv\\u0b89\\u2b24\\u2b28\\u2b2e;\\uc000\\u22f9\\u0338ot;\\uc000\\u22f5\\u0338\\u01e1\\u0b89\\u2b33\\u2b35;\\u62f7;\\u62f6i\\u0100;v\\u0cb8\\u2b3c\\u01e1\\u0cb8\\u2b41\\u2b43;\\u62fe;\\u62fd\\u0180aor\\u2b4b\\u2b63\\u2b69r\\u0200;ast\\u0b7b\\u2b55\\u2b5a\\u2b5flle\\xec\\u0b7bl;\\uc000\\u2afd\\u20e5;\\uc000\\u2202\\u0338lint;\\u6a14\\u0180;ce\\u0c92\\u2b70\\u2b73u\\xe5\\u0ca5\\u0100;c\\u0c98\\u2b78\\u0100;e\\u0c92\\u2b7d\\xf1\\u0c98\\u0200Aait\\u2b88\\u2b8b\\u2b9d\\u2ba7r\\xf2\\u2988rr\\u0180;cw\\u2b94\\u2b95\\u2b99\\u619b;\\uc000\\u2933\\u0338;\\uc000\\u219d\\u0338ghtarrow\\xbb\\u2b95ri\\u0100;e\\u0ccb\\u0cd6\\u0380chimpqu\\u2bbd\\u2bcd\\u2bd9\\u2b04\\u0b78\\u2be4\\u2bef\\u0200;cer\\u0d32\\u2bc6\\u0d37\\u2bc9u\\xe5\\u0d45;\\uc000\\ud835\\udcc3ort\\u026d\\u2b05\\0\\0\\u2bd6ar\\xe1\\u2b56m\\u0100;e\\u0d6e\\u2bdf\\u0100;q\\u0d74\\u0d73su\\u0100bp\\u2beb\\u2bed\\xe5\\u0cf8\\xe5\\u0d0b\\u0180bcp\\u2bf6\\u2c11\\u2c19\\u0200;Ees\\u2bff\\u2c00\\u0d22\\u2c04\\u6284;\\uc000\\u2ac5\\u0338et\\u0100;e\\u0d1b\\u2c0bq\\u0100;q\\u0d23\\u2c00c\\u0100;e\\u0d32\\u2c17\\xf1\\u0d38\\u0200;Ees\\u2c22\\u2c23\\u0d5f\\u2c27\\u6285;\\uc000\\u2ac6\\u0338et\\u0100;e\\u0d58\\u2c2eq\\u0100;q\\u0d60\\u2c23\\u0200gilr\\u2c3d\\u2c3f\\u2c45\\u2c47\\xec\\u0bd7lde\\u803b\\xf1\\u40f1\\xe7\\u0c43iangle\\u0100lr\\u2c52\\u2c5ceft\\u0100;e\\u0c1a\\u2c5a\\xf1\\u0c26ight\\u0100;e\\u0ccb\\u2c65\\xf1\\u0cd7\\u0100;m\\u2c6c\\u2c6d\\u43bd\\u0180;es\\u2c74\\u2c75\\u2c79\\u4023ro;\\u6116p;\\u6007\\u0480DHadgilrs\\u2c8f\\u2c94\\u2c99\\u2c9e\\u2ca3\\u2cb0\\u2cb6\\u2cd3\\u2ce3ash;\\u62adarr;\\u6904p;\\uc000\\u224d\\u20d2ash;\\u62ac\\u0100et\\u2ca8\\u2cac;\\uc000\\u2265\\u20d2;\\uc000>\\u20d2nfin;\\u69de\\u0180Aet\\u2cbd\\u2cc1\\u2cc5rr;\\u6902;\\uc000\\u2264\\u20d2\\u0100;r\\u2cca\\u2ccd\\uc000<\\u20d2ie;\\uc000\\u22b4\\u20d2\\u0100At\\u2cd8\\u2cdcrr;\\u6903rie;\\uc000\\u22b5\\u20d2im;\\uc000\\u223c\\u20d2\\u0180Aan\\u2cf0\\u2cf4\\u2d02rr;\\u61d6r\\u0100hr\\u2cfa\\u2cfdk;\\u6923\\u0100;o\\u13e7\\u13e5ear;\\u6927\\u1253\\u1a95\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\u2d2d\\0\\u2d38\\u2d48\\u2d60\\u2d65\\u2d72\\u2d84\\u1b07\\0\\0\\u2d8d\\u2dab\\0\\u2dc8\\u2dce\\0\\u2ddc\\u2e19\\u2e2b\\u2e3e\\u2e43\\u0100cs\\u2d31\\u1a97ute\\u803b\\xf3\\u40f3\\u0100iy\\u2d3c\\u2d45r\\u0100;c\\u1a9e\\u2d42\\u803b\\xf4\\u40f4;\\u443e\\u0280abios\\u1aa0\\u2d52\\u2d57\\u01c8\\u2d5alac;\\u4151v;\\u6a38old;\\u69bclig;\\u4153\\u0100cr\\u2d69\\u2d6dir;\\u69bf;\\uc000\\ud835\\udd2c\\u036f\\u2d79\\0\\0\\u2d7c\\0\\u2d82n;\\u42dbave\\u803b\\xf2\\u40f2;\\u69c1\\u0100bm\\u2d88\\u0df4ar;\\u69b5\\u0200acit\\u2d95\\u2d98\\u2da5\\u2da8r\\xf2\\u1a80\\u0100ir\\u2d9d\\u2da0r;\\u69beoss;\\u69bbn\\xe5\\u0e52;\\u69c0\\u0180aei\\u2db1\\u2db5\\u2db9cr;\\u414dga;\\u43c9\\u0180cdn\\u2dc0\\u2dc5\\u01cdron;\\u43bf;\\u69b6pf;\\uc000\\ud835\\udd60\\u0180ael\\u2dd4\\u2dd7\\u01d2r;\\u69b7rp;\\u69b9\\u0380;adiosv\\u2dea\\u2deb\\u2dee\\u2e08\\u2e0d\\u2e10\\u2e16\\u6228r\\xf2\\u1a86\\u0200;efm\\u2df7\\u2df8\\u2e02\\u2e05\\u6a5dr\\u0100;o\\u2dfe\\u2dff\\u6134f\\xbb\\u2dff\\u803b\\xaa\\u40aa\\u803b\\xba\\u40bagof;\\u62b6r;\\u6a56lope;\\u6a57;\\u6a5b\\u0180clo\\u2e1f\\u2e21\\u2e27\\xf2\\u2e01ash\\u803b\\xf8\\u40f8l;\\u6298i\\u016c\\u2e2f\\u2e34de\\u803b\\xf5\\u40f5es\\u0100;a\\u01db\\u2e3as;\\u6a36ml\\u803b\\xf6\\u40f6bar;\\u633d\\u0ae1\\u2e5e\\0\\u2e7d\\0\\u2e80\\u2e9d\\0\\u2ea2\\u2eb9\\0\\0\\u2ecb\\u0e9c\\0\\u2f13\\0\\0\\u2f2b\\u2fbc\\0\\u2fc8r\\u0200;ast\\u0403\\u2e67\\u2e72\\u0e85\\u8100\\xb6;l\\u2e6d\\u2e6e\\u40b6le\\xec\\u0403\\u0269\\u2e78\\0\\0\\u2e7bm;\\u6af3;\\u6afdy;\\u443fr\\u0280cimpt\\u2e8b\\u2e8f\\u2e93\\u1865\\u2e97nt;\\u4025od;\\u402eil;\\u6030enk;\\u6031r;\\uc000\\ud835\\udd2d\\u0180imo\\u2ea8\\u2eb0\\u2eb4\\u0100;v\\u2ead\\u2eae\\u43c6;\\u43d5ma\\xf4\\u0a76ne;\\u660e\\u0180;tv\\u2ebf\\u2ec0\\u2ec8\\u43c0chfork\\xbb\\u1ffd;\\u43d6\\u0100au\\u2ecf\\u2edfn\\u0100ck\\u2ed5\\u2eddk\\u0100;h\\u21f4\\u2edb;\\u610e\\xf6\\u21f4s\\u0480;abcdemst\\u2ef3\\u2ef4\\u1908\\u2ef9\\u2efd\\u2f04\\u2f06\\u2f0a\\u2f0e\\u402bcir;\\u6a23ir;\\u6a22\\u0100ou\\u1d40\\u2f02;\\u6a25;\\u6a72n\\u80bb\\xb1\\u0e9dim;\\u6a26wo;\\u6a27\\u0180ipu\\u2f19\\u2f20\\u2f25ntint;\\u6a15f;\\uc000\\ud835\\udd61nd\\u803b\\xa3\\u40a3\\u0500;Eaceinosu\\u0ec8\\u2f3f\\u2f41\\u2f44\\u2f47\\u2f81\\u2f89\\u2f92\\u2f7e\\u2fb6;\\u6ab3p;\\u6ab7u\\xe5\\u0ed9\\u0100;c\\u0ece\\u2f4c\\u0300;acens\\u0ec8\\u2f59\\u2f5f\\u2f66\\u2f68\\u2f7eppro\\xf8\\u2f43urlye\\xf1\\u0ed9\\xf1\\u0ece\\u0180aes\\u2f6f\\u2f76\\u2f7approx;\\u6ab9qq;\\u6ab5im;\\u62e8i\\xed\\u0edfme\\u0100;s\\u2f88\\u0eae\\u6032\\u0180Eas\\u2f78\\u2f90\\u2f7a\\xf0\\u2f75\\u0180dfp\\u0eec\\u2f99\\u2faf\\u0180als\\u2fa0\\u2fa5\\u2faalar;\\u632eine;\\u6312urf;\\u6313\\u0100;t\\u0efb\\u2fb4\\xef\\u0efbrel;\\u62b0\\u0100ci\\u2fc0\\u2fc5r;\\uc000\\ud835\\udcc5;\\u43c8ncsp;\\u6008\\u0300fiopsu\\u2fda\\u22e2\\u2fdf\\u2fe5\\u2feb\\u2ff1r;\\uc000\\ud835\\udd2epf;\\uc000\\ud835\\udd62rime;\\u6057cr;\\uc000\\ud835\\udcc6\\u0180aeo\\u2ff8\\u3009\\u3013t\\u0100ei\\u2ffe\\u3005rnion\\xf3\\u06b0nt;\\u6a16st\\u0100;e\\u3010\\u3011\\u403f\\xf1\\u1f19\\xf4\\u0f14\\u0a80ABHabcdefhilmnoprstux\\u3040\\u3051\\u3055\\u3059\\u30e0\\u310e\\u312b\\u3147\\u3162\\u3172\\u318e\\u3206\\u3215\\u3224\\u3229\\u3258\\u326e\\u3272\\u3290\\u32b0\\u32b7\\u0180art\\u3047\\u304a\\u304cr\\xf2\\u10b3\\xf2\\u03ddail;\\u691car\\xf2\\u1c65ar;\\u6964\\u0380cdenqrt\\u3068\\u3075\\u3078\\u307f\\u308f\\u3094\\u30cc\\u0100eu\\u306d\\u3071;\\uc000\\u223d\\u0331te;\\u4155i\\xe3\\u116emptyv;\\u69b3g\\u0200;del\\u0fd1\\u3089\\u308b\\u308d;\\u6992;\\u69a5\\xe5\\u0fd1uo\\u803b\\xbb\\u40bbr\\u0580;abcfhlpstw\\u0fdc\\u30ac\\u30af\\u30b7\\u30b9\\u30bc\\u30be\\u30c0\\u30c3\\u30c7\\u30cap;\\u6975\\u0100;f\\u0fe0\\u30b4s;\\u6920;\\u6933s;\\u691e\\xeb\\u225d\\xf0\\u272el;\\u6945im;\\u6974l;\\u61a3;\\u619d\\u0100ai\\u30d1\\u30d5il;\\u691ao\\u0100;n\\u30db\\u30dc\\u6236al\\xf3\\u0f1e\\u0180abr\\u30e7\\u30ea\\u30eer\\xf2\\u17e5rk;\\u6773\\u0100ak\\u30f3\\u30fdc\\u0100ek\\u30f9\\u30fb;\\u407d;\\u405d\\u0100es\\u3102\\u3104;\\u698cl\\u0100du\\u310a\\u310c;\\u698e;\\u6990\\u0200aeuy\\u3117\\u311c\\u3127\\u3129ron;\\u4159\\u0100di\\u3121\\u3125il;\\u4157\\xec\\u0ff2\\xe2\\u30fa;\\u4440\\u0200clqs\\u3134\\u3137\\u313d\\u3144a;\\u6937dhar;\\u6969uo\\u0100;r\\u020e\\u020dh;\\u61b3\\u0180acg\\u314e\\u315f\\u0f44l\\u0200;ips\\u0f78\\u3158\\u315b\\u109cn\\xe5\\u10bbar\\xf4\\u0fa9t;\\u65ad\\u0180ilr\\u3169\\u1023\\u316esht;\\u697d;\\uc000\\ud835\\udd2f\\u0100ao\\u3177\\u3186r\\u0100du\\u317d\\u317f\\xbb\\u047b\\u0100;l\\u1091\\u3184;\\u696c\\u0100;v\\u318b\\u318c\\u43c1;\\u43f1\\u0180gns\\u3195\\u31f9\\u31fcht\\u0300ahlrst\\u31a4\\u31b0\\u31c2\\u31d8\\u31e4\\u31eerrow\\u0100;t\\u0fdc\\u31ada\\xe9\\u30c8arpoon\\u0100du\\u31bb\\u31bfow\\xee\\u317ep\\xbb\\u1092eft\\u0100ah\\u31ca\\u31d0rrow\\xf3\\u0feaarpoon\\xf3\\u0551ightarrows;\\u61c9quigarro\\xf7\\u30cbhreetimes;\\u62ccg;\\u42daingdotse\\xf1\\u1f32\\u0180ahm\\u320d\\u3210\\u3213r\\xf2\\u0feaa\\xf2\\u0551;\\u600foust\\u0100;a\\u321e\\u321f\\u63b1che\\xbb\\u321fmid;\\u6aee\\u0200abpt\\u3232\\u323d\\u3240\\u3252\\u0100nr\\u3237\\u323ag;\\u67edr;\\u61fer\\xeb\\u1003\\u0180afl\\u3247\\u324a\\u324er;\\u6986;\\uc000\\ud835\\udd63us;\\u6a2eimes;\\u6a35\\u0100ap\\u325d\\u3267r\\u0100;g\\u3263\\u3264\\u4029t;\\u6994olint;\\u6a12ar\\xf2\\u31e3\\u0200achq\\u327b\\u3280\\u10bc\\u3285quo;\\u603ar;\\uc000\\ud835\\udcc7\\u0100bu\\u30fb\\u328ao\\u0100;r\\u0214\\u0213\\u0180hir\\u3297\\u329b\\u32a0re\\xe5\\u31f8mes;\\u62cai\\u0200;efl\\u32aa\\u1059\\u1821\\u32ab\\u65b9tri;\\u69celuhar;\\u6968;\\u611e\\u0d61\\u32d5\\u32db\\u32df\\u332c\\u3338\\u3371\\0\\u337a\\u33a4\\0\\0\\u33ec\\u33f0\\0\\u3428\\u3448\\u345a\\u34ad\\u34b1\\u34ca\\u34f1\\0\\u3616\\0\\0\\u3633cute;\\u415bqu\\xef\\u27ba\\u0500;Eaceinpsy\\u11ed\\u32f3\\u32f5\\u32ff\\u3302\\u330b\\u330f\\u331f\\u3326\\u3329;\\u6ab4\\u01f0\\u32fa\\0\\u32fc;\\u6ab8on;\\u4161u\\xe5\\u11fe\\u0100;d\\u11f3\\u3307il;\\u415frc;\\u415d\\u0180Eas\\u3316\\u3318\\u331b;\\u6ab6p;\\u6abaim;\\u62e9olint;\\u6a13i\\xed\\u1204;\\u4441ot\\u0180;be\\u3334\\u1d47\\u3335\\u62c5;\\u6a66\\u0380Aacmstx\\u3346\\u334a\\u3357\\u335b\\u335e\\u3363\\u336drr;\\u61d8r\\u0100hr\\u3350\\u3352\\xeb\\u2228\\u0100;o\\u0a36\\u0a34t\\u803b\\xa7\\u40a7i;\\u403bwar;\\u6929m\\u0100in\\u3369\\xf0nu\\xf3\\xf1t;\\u6736r\\u0100;o\\u3376\\u2055\\uc000\\ud835\\udd30\\u0200acoy\\u3382\\u3386\\u3391\\u33a0rp;\\u666f\\u0100hy\\u338b\\u338fcy;\\u4449;\\u4448rt\\u026d\\u3399\\0\\0\\u339ci\\xe4\\u1464ara\\xec\\u2e6f\\u803b\\xad\\u40ad\\u0100gm\\u33a8\\u33b4ma\\u0180;fv\\u33b1\\u33b2\\u33b2\\u43c3;\\u43c2\\u0400;deglnpr\\u12ab\\u33c5\\u33c9\\u33ce\\u33d6\\u33de\\u33e1\\u33e6ot;\\u6a6a\\u0100;q\\u12b1\\u12b0\\u0100;E\\u33d3\\u33d4\\u6a9e;\\u6aa0\\u0100;E\\u33db\\u33dc\\u6a9d;\\u6a9fe;\\u6246lus;\\u6a24arr;\\u6972ar\\xf2\\u113d\\u0200aeit\\u33f8\\u3408\\u340f\\u3417\\u0100ls\\u33fd\\u3404lsetm\\xe9\\u336ahp;\\u6a33parsl;\\u69e4\\u0100dl\\u1463\\u3414e;\\u6323\\u0100;e\\u341c\\u341d\\u6aaa\\u0100;s\\u3422\\u3423\\u6aac;\\uc000\\u2aac\\ufe00\\u0180flp\\u342e\\u3433\\u3442tcy;\\u444c\\u0100;b\\u3438\\u3439\\u402f\\u0100;a\\u343e\\u343f\\u69c4r;\\u633ff;\\uc000\\ud835\\udd64a\\u0100dr\\u344d\\u0402es\\u0100;u\\u3454\\u3455\\u6660it\\xbb\\u3455\\u0180csu\\u3460\\u3479\\u349f\\u0100au\\u3465\\u346fp\\u0100;s\\u1188\\u346b;\\uc000\\u2293\\ufe00p\\u0100;s\\u11b4\\u3475;\\uc000\\u2294\\ufe00u\\u0100bp\\u347f\\u348f\\u0180;es\\u1197\\u119c\\u3486et\\u0100;e\\u1197\\u348d\\xf1\\u119d\\u0180;es\\u11a8\\u11ad\\u3496et\\u0100;e\\u11a8\\u349d\\xf1\\u11ae\\u0180;af\\u117b\\u34a6\\u05b0r\\u0165\\u34ab\\u05b1\\xbb\\u117car\\xf2\\u1148\\u0200cemt\\u34b9\\u34be\\u34c2\\u34c5r;\\uc000\\ud835\\udcc8tm\\xee\\xf1i\\xec\\u3415ar\\xe6\\u11be\\u0100ar\\u34ce\\u34d5r\\u0100;f\\u34d4\\u17bf\\u6606\\u0100an\\u34da\\u34edight\\u0100ep\\u34e3\\u34eapsilo\\xee\\u1ee0h\\xe9\\u2eafs\\xbb\\u2852\\u0280bcmnp\\u34fb\\u355e\\u1209\\u358b\\u358e\\u0480;Edemnprs\\u350e\\u350f\\u3511\\u3515\\u351e\\u3523\\u352c\\u3531\\u3536\\u6282;\\u6ac5ot;\\u6abd\\u0100;d\\u11da\\u351aot;\\u6ac3ult;\\u6ac1\\u0100Ee\\u3528\\u352a;\\u6acb;\\u628alus;\\u6abfarr;\\u6979\\u0180eiu\\u353d\\u3552\\u3555t\\u0180;en\\u350e\\u3545\\u354bq\\u0100;q\\u11da\\u350feq\\u0100;q\\u352b\\u3528m;\\u6ac7\\u0100bp\\u355a\\u355c;\\u6ad5;\\u6ad3c\\u0300;acens\\u11ed\\u356c\\u3572\\u3579\\u357b\\u3326ppro\\xf8\\u32faurlye\\xf1\\u11fe\\xf1\\u11f3\\u0180aes\\u3582\\u3588\\u331bppro\\xf8\\u331aq\\xf1\\u3317g;\\u666a\\u0680123;Edehlmnps\\u35a9\\u35ac\\u35af\\u121c\\u35b2\\u35b4\\u35c0\\u35c9\\u35d5\\u35da\\u35df\\u35e8\\u35ed\\u803b\\xb9\\u40b9\\u803b\\xb2\\u40b2\\u803b\\xb3\\u40b3;\\u6ac6\\u0100os\\u35b9\\u35bct;\\u6abeub;\\u6ad8\\u0100;d\\u1222\\u35c5ot;\\u6ac4s\\u0100ou\\u35cf\\u35d2l;\\u67c9b;\\u6ad7arr;\\u697bult;\\u6ac2\\u0100Ee\\u35e4\\u35e6;\\u6acc;\\u628blus;\\u6ac0\\u0180eiu\\u35f4\\u3609\\u360ct\\u0180;en\\u121c\\u35fc\\u3602q\\u0100;q\\u1222\\u35b2eq\\u0100;q\\u35e7\\u35e4m;\\u6ac8\\u0100bp\\u3611\\u3613;\\u6ad4;\\u6ad6\\u0180Aan\\u361c\\u3620\\u362drr;\\u61d9r\\u0100hr\\u3626\\u3628\\xeb\\u222e\\u0100;o\\u0a2b\\u0a29war;\\u692alig\\u803b\\xdf\\u40df\\u0be1\\u3651\\u365d\\u3660\\u12ce\\u3673\\u3679\\0\\u367e\\u36c2\\0\\0\\0\\0\\0\\u36db\\u3703\\0\\u3709\\u376c\\0\\0\\0\\u3787\\u0272\\u3656\\0\\0\\u365bget;\\u6316;\\u43c4r\\xeb\\u0e5f\\u0180aey\\u3666\\u366b\\u3670ron;\\u4165dil;\\u4163;\\u4442lrec;\\u6315r;\\uc000\\ud835\\udd31\\u0200eiko\\u3686\\u369d\\u36b5\\u36bc\\u01f2\\u368b\\0\\u3691e\\u01004f\\u1284\\u1281a\\u0180;sv\\u3698\\u3699\\u369b\\u43b8ym;\\u43d1\\u0100cn\\u36a2\\u36b2k\\u0100as\\u36a8\\u36aeppro\\xf8\\u12c1im\\xbb\\u12acs\\xf0\\u129e\\u0100as\\u36ba\\u36ae\\xf0\\u12c1rn\\u803b\\xfe\\u40fe\\u01ec\\u031f\\u36c6\\u22e7es\\u8180\\xd7;bd\\u36cf\\u36d0\\u36d8\\u40d7\\u0100;a\\u190f\\u36d5r;\\u6a31;\\u6a30\\u0180eps\\u36e1\\u36e3\\u3700\\xe1\\u2a4d\\u0200;bcf\\u0486\\u36ec\\u36f0\\u36f4ot;\\u6336ir;\\u6af1\\u0100;o\\u36f9\\u36fc\\uc000\\ud835\\udd65rk;\\u6ada\\xe1\\u3362rime;\\u6034\\u0180aip\\u370f\\u3712\\u3764d\\xe5\\u1248\\u0380adempst\\u3721\\u374d\\u3740\\u3751\\u3757\\u375c\\u375fngle\\u0280;dlqr\\u3730\\u3731\\u3736\\u3740\\u3742\\u65b5own\\xbb\\u1dbbeft\\u0100;e\\u2800\\u373e\\xf1\\u092e;\\u625cight\\u0100;e\\u32aa\\u374b\\xf1\\u105aot;\\u65ecinus;\\u6a3alus;\\u6a39b;\\u69cdime;\\u6a3bezium;\\u63e2\\u0180cht\\u3772\\u377d\\u3781\\u0100ry\\u3777\\u377b;\\uc000\\ud835\\udcc9;\\u4446cy;\\u445brok;\\u4167\\u0100io\\u378b\\u378ex\\xf4\\u1777head\\u0100lr\\u3797\\u37a0eftarro\\xf7\\u084fightarrow\\xbb\\u0f5d\\u0900AHabcdfghlmoprstuw\\u37d0\\u37d3\\u37d7\\u37e4\\u37f0\\u37fc\\u380e\\u381c\\u3823\\u3834\\u3851\\u385d\\u386b\\u38a9\\u38cc\\u38d2\\u38ea\\u38f6r\\xf2\\u03edar;\\u6963\\u0100cr\\u37dc\\u37e2ute\\u803b\\xfa\\u40fa\\xf2\\u1150r\\u01e3\\u37ea\\0\\u37edy;\\u445eve;\\u416d\\u0100iy\\u37f5\\u37farc\\u803b\\xfb\\u40fb;\\u4443\\u0180abh\\u3803\\u3806\\u380br\\xf2\\u13adlac;\\u4171a\\xf2\\u13c3\\u0100ir\\u3813\\u3818sht;\\u697e;\\uc000\\ud835\\udd32rave\\u803b\\xf9\\u40f9\\u0161\\u3827\\u3831r\\u0100lr\\u382c\\u382e\\xbb\\u0957\\xbb\\u1083lk;\\u6580\\u0100ct\\u3839\\u384d\\u026f\\u383f\\0\\0\\u384arn\\u0100;e\\u3845\\u3846\\u631cr\\xbb\\u3846op;\\u630fri;\\u65f8\\u0100al\\u3856\\u385acr;\\u416b\\u80bb\\xa8\\u0349\\u0100gp\\u3862\\u3866on;\\u4173f;\\uc000\\ud835\\udd66\\u0300adhlsu\\u114b\\u3878\\u387d\\u1372\\u3891\\u38a0own\\xe1\\u13b3arpoon\\u0100lr\\u3888\\u388cef\\xf4\\u382digh\\xf4\\u382fi\\u0180;hl\\u3899\\u389a\\u389c\\u43c5\\xbb\\u13faon\\xbb\\u389aparrows;\\u61c8\\u0180cit\\u38b0\\u38c4\\u38c8\\u026f\\u38b6\\0\\0\\u38c1rn\\u0100;e\\u38bc\\u38bd\\u631dr\\xbb\\u38bdop;\\u630eng;\\u416fri;\\u65f9cr;\\uc000\\ud835\\udcca\\u0180dir\\u38d9\\u38dd\\u38e2ot;\\u62f0lde;\\u4169i\\u0100;f\\u3730\\u38e8\\xbb\\u1813\\u0100am\\u38ef\\u38f2r\\xf2\\u38a8l\\u803b\\xfc\\u40fcangle;\\u69a7\\u0780ABDacdeflnoprsz\\u391c\\u391f\\u3929\\u392d\\u39b5\\u39b8\\u39bd\\u39df\\u39e4\\u39e8\\u39f3\\u39f9\\u39fd\\u3a01\\u3a20r\\xf2\\u03f7ar\\u0100;v\\u3926\\u3927\\u6ae8;\\u6ae9as\\xe8\\u03e1\\u0100nr\\u3932\\u3937grt;\\u699c\\u0380eknprst\\u34e3\\u3946\\u394b\\u3952\\u395d\\u3964\\u3996app\\xe1\\u2415othin\\xe7\\u1e96\\u0180hir\\u34eb\\u2ec8\\u3959op\\xf4\\u2fb5\\u0100;h\\u13b7\\u3962\\xef\\u318d\\u0100iu\\u3969\\u396dgm\\xe1\\u33b3\\u0100bp\\u3972\\u3984setneq\\u0100;q\\u397d\\u3980\\uc000\\u228a\\ufe00;\\uc000\\u2acb\\ufe00setneq\\u0100;q\\u398f\\u3992\\uc000\\u228b\\ufe00;\\uc000\\u2acc\\ufe00\\u0100hr\\u399b\\u399fet\\xe1\\u369ciangle\\u0100lr\\u39aa\\u39afeft\\xbb\\u0925ight\\xbb\\u1051y;\\u4432ash\\xbb\\u1036\\u0180elr\\u39c4\\u39d2\\u39d7\\u0180;be\\u2dea\\u39cb\\u39cfar;\\u62bbq;\\u625alip;\\u62ee\\u0100bt\\u39dc\\u1468a\\xf2\\u1469r;\\uc000\\ud835\\udd33tr\\xe9\\u39aesu\\u0100bp\\u39ef\\u39f1\\xbb\\u0d1c\\xbb\\u0d59pf;\\uc000\\ud835\\udd67ro\\xf0\\u0efbtr\\xe9\\u39b4\\u0100cu\\u3a06\\u3a0br;\\uc000\\ud835\\udccb\\u0100bp\\u3a10\\u3a18n\\u0100Ee\\u3980\\u3a16\\xbb\\u397en\\u0100Ee\\u3992\\u3a1e\\xbb\\u3990igzag;\\u699a\\u0380cefoprs\\u3a36\\u3a3b\\u3a56\\u3a5b\\u3a54\\u3a61\\u3a6airc;\\u4175\\u0100di\\u3a40\\u3a51\\u0100bg\\u3a45\\u3a49ar;\\u6a5fe\\u0100;q\\u15fa\\u3a4f;\\u6259erp;\\u6118r;\\uc000\\ud835\\udd34pf;\\uc000\\ud835\\udd68\\u0100;e\\u1479\\u3a66at\\xe8\\u1479cr;\\uc000\\ud835\\udccc\\u0ae3\\u178e\\u3a87\\0\\u3a8b\\0\\u3a90\\u3a9b\\0\\0\\u3a9d\\u3aa8\\u3aab\\u3aaf\\0\\0\\u3ac3\\u3ace\\0\\u3ad8\\u17dc\\u17dftr\\xe9\\u17d1r;\\uc000\\ud835\\udd35\\u0100Aa\\u3a94\\u3a97r\\xf2\\u03c3r\\xf2\\u09f6;\\u43be\\u0100Aa\\u3aa1\\u3aa4r\\xf2\\u03b8r\\xf2\\u09eba\\xf0\\u2713is;\\u62fb\\u0180dpt\\u17a4\\u3ab5\\u3abe\\u0100fl\\u3aba\\u17a9;\\uc000\\ud835\\udd69im\\xe5\\u17b2\\u0100Aa\\u3ac7\\u3acar\\xf2\\u03cer\\xf2\\u0a01\\u0100cq\\u3ad2\\u17b8r;\\uc000\\ud835\\udccd\\u0100pt\\u17d6\\u3adcr\\xe9\\u17d4\\u0400acefiosu\\u3af0\\u3afd\\u3b08\\u3b0c\\u3b11\\u3b15\\u3b1b\\u3b21c\\u0100uy\\u3af6\\u3afbte\\u803b\\xfd\\u40fd;\\u444f\\u0100iy\\u3b02\\u3b06rc;\\u4177;\\u444bn\\u803b\\xa5\\u40a5r;\\uc000\\ud835\\udd36cy;\\u4457pf;\\uc000\\ud835\\udd6acr;\\uc000\\ud835\\udcce\\u0100cm\\u3b26\\u3b29y;\\u444el\\u803b\\xff\\u40ff\\u0500acdefhiosw\\u3b42\\u3b48\\u3b54\\u3b58\\u3b64\\u3b69\\u3b6d\\u3b74\\u3b7a\\u3b80cute;\\u417a\\u0100ay\\u3b4d\\u3b52ron;\\u417e;\\u4437ot;\\u417c\\u0100et\\u3b5d\\u3b61tr\\xe6\\u155fa;\\u43b6r;\\uc000\\ud835\\udd37cy;\\u4436grarr;\\u61ddpf;\\uc000\\ud835\\udd6bcr;\\uc000\\ud835\\udccf\\u0100jn\\u3b85\\u3b87;\\u600dj;\\u600c\"\n .split(\"\")\n .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-html.js.map","// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\nvar _a;\nconst decodeMap = new Map([\n [0, 65533],\n // C1 Unicode control character reference replacements\n [128, 8364],\n [130, 8218],\n [131, 402],\n [132, 8222],\n [133, 8230],\n [134, 8224],\n [135, 8225],\n [136, 710],\n [137, 8240],\n [138, 352],\n [139, 8249],\n [140, 338],\n [142, 381],\n [145, 8216],\n [146, 8217],\n [147, 8220],\n [148, 8221],\n [149, 8226],\n [150, 8211],\n [151, 8212],\n [152, 732],\n [153, 8482],\n [154, 353],\n [155, 8250],\n [156, 339],\n [158, 382],\n [159, 376],\n]);\n/**\n * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.\n */\nexport const fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/es-builtins\n(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {\n let output = \"\";\n if (codePoint > 65535) {\n codePoint -= 65536;\n output += String.fromCharCode(((codePoint >>> 10) & 1023) | 55296);\n codePoint = 56320 | (codePoint & 1023);\n }\n output += String.fromCharCode(codePoint);\n return output;\n};\n/**\n * Replace the given code point with a replacement character if it is a\n * surrogate or is outside the valid range. Otherwise return the code\n * point unchanged.\n */\nexport function replaceCodePoint(codePoint) {\n var _a;\n if ((codePoint >= 55296 && codePoint <= 57343) ||\n codePoint > 1114111) {\n return 65533;\n }\n return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;\n}\n/**\n * Replace the code point if relevant, then convert it to a string.\n *\n * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.\n * @param codePoint The code point to decode.\n * @returns The decoded code point.\n */\nexport function decodeCodePoint(codePoint) {\n return fromCodePoint(replaceCodePoint(codePoint));\n}\n//# sourceMappingURL=decode-codepoint.js.map","import { htmlDecodeTree } from \"./generated/decode-data-html.js\";\nimport { xmlDecodeTree } from \"./generated/decode-data-xml.js\";\nimport { replaceCodePoint, fromCodePoint } from \"./decode-codepoint.js\";\nvar CharCodes;\n(function (CharCodes) {\n CharCodes[CharCodes[\"NUM\"] = 35] = \"NUM\";\n CharCodes[CharCodes[\"SEMI\"] = 59] = \"SEMI\";\n CharCodes[CharCodes[\"EQUALS\"] = 61] = \"EQUALS\";\n CharCodes[CharCodes[\"ZERO\"] = 48] = \"ZERO\";\n CharCodes[CharCodes[\"NINE\"] = 57] = \"NINE\";\n CharCodes[CharCodes[\"LOWER_A\"] = 97] = \"LOWER_A\";\n CharCodes[CharCodes[\"LOWER_F\"] = 102] = \"LOWER_F\";\n CharCodes[CharCodes[\"LOWER_X\"] = 120] = \"LOWER_X\";\n CharCodes[CharCodes[\"LOWER_Z\"] = 122] = \"LOWER_Z\";\n CharCodes[CharCodes[\"UPPER_A\"] = 65] = \"UPPER_A\";\n CharCodes[CharCodes[\"UPPER_F\"] = 70] = \"UPPER_F\";\n CharCodes[CharCodes[\"UPPER_Z\"] = 90] = \"UPPER_Z\";\n})(CharCodes || (CharCodes = {}));\n/** Bit that needs to be set to convert an upper case ASCII character to lower case */\nconst TO_LOWER_BIT = 32;\nexport var BinTrieFlags;\n(function (BinTrieFlags) {\n BinTrieFlags[BinTrieFlags[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n BinTrieFlags[BinTrieFlags[\"BRANCH_LENGTH\"] = 16256] = \"BRANCH_LENGTH\";\n BinTrieFlags[BinTrieFlags[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n})(BinTrieFlags || (BinTrieFlags = {}));\nfunction isNumber(code) {\n return code >= CharCodes.ZERO && code <= CharCodes.NINE;\n}\nfunction isHexadecimalCharacter(code) {\n return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||\n (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));\n}\nfunction isAsciiAlphaNumeric(code) {\n return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||\n (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||\n isNumber(code));\n}\n/**\n * Checks if the given character is a valid end character for an entity in an attribute.\n *\n * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n */\nfunction isEntityInAttributeInvalidEnd(code) {\n return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);\n}\nvar EntityDecoderState;\n(function (EntityDecoderState) {\n EntityDecoderState[EntityDecoderState[\"EntityStart\"] = 0] = \"EntityStart\";\n EntityDecoderState[EntityDecoderState[\"NumericStart\"] = 1] = \"NumericStart\";\n EntityDecoderState[EntityDecoderState[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n EntityDecoderState[EntityDecoderState[\"NumericHex\"] = 3] = \"NumericHex\";\n EntityDecoderState[EntityDecoderState[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState || (EntityDecoderState = {}));\nexport var DecodingMode;\n(function (DecodingMode) {\n /** Entities in text nodes that can end with any character. */\n DecodingMode[DecodingMode[\"Legacy\"] = 0] = \"Legacy\";\n /** Only allow entities terminated with a semicolon. */\n DecodingMode[DecodingMode[\"Strict\"] = 1] = \"Strict\";\n /** Entities in attributes have limitations on ending characters. */\n DecodingMode[DecodingMode[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode || (DecodingMode = {}));\n/**\n * Token decoder with support of writing partial entities.\n */\nexport class EntityDecoder {\n constructor(\n /** The tree used to decode entities. */\n decodeTree, \n /**\n * The function that is called when a codepoint is decoded.\n *\n * For multi-byte named entities, this will be called multiple times,\n * with the second codepoint, and the same `consumed` value.\n *\n * @param codepoint The decoded codepoint.\n * @param consumed The number of bytes consumed by the decoder.\n */\n emitCodePoint, \n /** An object that is used to produce errors. */\n errors) {\n this.decodeTree = decodeTree;\n this.emitCodePoint = emitCodePoint;\n this.errors = errors;\n /** The current state of the decoder. */\n this.state = EntityDecoderState.EntityStart;\n /** Characters that were consumed while parsing an entity. */\n this.consumed = 1;\n /**\n * The result of the entity.\n *\n * Either the result index of a numeric entity, or the codepoint of a\n * numeric entity.\n */\n this.result = 0;\n /** The current index in the decode tree. */\n this.treeIndex = 0;\n /** The number of characters that were consumed in excess. */\n this.excess = 1;\n /** The mode in which the decoder is operating. */\n this.decodeMode = DecodingMode.Strict;\n }\n /** Resets the instance to make it reusable. */\n startEntity(decodeMode) {\n this.decodeMode = decodeMode;\n this.state = EntityDecoderState.EntityStart;\n this.result = 0;\n this.treeIndex = 0;\n this.excess = 1;\n this.consumed = 1;\n }\n /**\n * Write an entity to the decoder. This can be called multiple times with partial entities.\n * If the entity is incomplete, the decoder will return -1.\n *\n * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the\n * entity is incomplete, and resume when the next string is written.\n *\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n write(input, offset) {\n switch (this.state) {\n case EntityDecoderState.EntityStart: {\n if (input.charCodeAt(offset) === CharCodes.NUM) {\n this.state = EntityDecoderState.NumericStart;\n this.consumed += 1;\n return this.stateNumericStart(input, offset + 1);\n }\n this.state = EntityDecoderState.NamedEntity;\n return this.stateNamedEntity(input, offset);\n }\n case EntityDecoderState.NumericStart: {\n return this.stateNumericStart(input, offset);\n }\n case EntityDecoderState.NumericDecimal: {\n return this.stateNumericDecimal(input, offset);\n }\n case EntityDecoderState.NumericHex: {\n return this.stateNumericHex(input, offset);\n }\n case EntityDecoderState.NamedEntity: {\n return this.stateNamedEntity(input, offset);\n }\n }\n }\n /**\n * Switches between the numeric decimal and hexadecimal states.\n *\n * Equivalent to the `Numeric character reference state` in the HTML spec.\n *\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNumericStart(input, offset) {\n if (offset >= input.length) {\n return -1;\n }\n if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n this.state = EntityDecoderState.NumericHex;\n this.consumed += 1;\n return this.stateNumericHex(input, offset + 1);\n }\n this.state = EntityDecoderState.NumericDecimal;\n return this.stateNumericDecimal(input, offset);\n }\n addToNumericResult(input, start, end, base) {\n if (start !== end) {\n const digitCount = end - start;\n this.result =\n this.result * Math.pow(base, digitCount) +\n Number.parseInt(input.substr(start, digitCount), base);\n this.consumed += digitCount;\n }\n }\n /**\n * Parses a hexadecimal numeric entity.\n *\n * Equivalent to the `Hexademical character reference state` in the HTML spec.\n *\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNumericHex(input, offset) {\n const startIndex = offset;\n while (offset < input.length) {\n const char = input.charCodeAt(offset);\n if (isNumber(char) || isHexadecimalCharacter(char)) {\n offset += 1;\n }\n else {\n this.addToNumericResult(input, startIndex, offset, 16);\n return this.emitNumericEntity(char, 3);\n }\n }\n this.addToNumericResult(input, startIndex, offset, 16);\n return -1;\n }\n /**\n * Parses a decimal numeric entity.\n *\n * Equivalent to the `Decimal character reference state` in the HTML spec.\n *\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNumericDecimal(input, offset) {\n const startIndex = offset;\n while (offset < input.length) {\n const char = input.charCodeAt(offset);\n if (isNumber(char)) {\n offset += 1;\n }\n else {\n this.addToNumericResult(input, startIndex, offset, 10);\n return this.emitNumericEntity(char, 2);\n }\n }\n this.addToNumericResult(input, startIndex, offset, 10);\n return -1;\n }\n /**\n * Validate and emit a numeric entity.\n *\n * Implements the logic from the `Hexademical character reference start\n * state` and `Numeric character reference end state` in the HTML spec.\n *\n * @param lastCp The last code point of the entity. Used to see if the\n * entity was terminated with a semicolon.\n * @param expectedLength The minimum number of characters that should be\n * consumed. Used to validate that at least one digit\n * was consumed.\n * @returns The number of characters that were consumed.\n */\n emitNumericEntity(lastCp, expectedLength) {\n var _a;\n // Ensure we consumed at least one digit.\n if (this.consumed <= expectedLength) {\n (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n return 0;\n }\n // Figure out if this is a legit end of the entity\n if (lastCp === CharCodes.SEMI) {\n this.consumed += 1;\n }\n else if (this.decodeMode === DecodingMode.Strict) {\n return 0;\n }\n this.emitCodePoint(replaceCodePoint(this.result), this.consumed);\n if (this.errors) {\n if (lastCp !== CharCodes.SEMI) {\n this.errors.missingSemicolonAfterCharacterReference();\n }\n this.errors.validateNumericCharacterReference(this.result);\n }\n return this.consumed;\n }\n /**\n * Parses a named entity.\n *\n * Equivalent to the `Named character reference state` in the HTML spec.\n *\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNamedEntity(input, offset) {\n const { decodeTree } = this;\n let current = decodeTree[this.treeIndex];\n // The mask is the number of bytes of the value, including the current byte.\n let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n for (; offset < input.length; offset++, this.excess++) {\n const char = input.charCodeAt(offset);\n this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);\n if (this.treeIndex < 0) {\n return this.result === 0 ||\n // If we are parsing an attribute\n (this.decodeMode === DecodingMode.Attribute &&\n // We shouldn't have consumed any characters after the entity,\n (valueLength === 0 ||\n // And there should be no invalid characters.\n isEntityInAttributeInvalidEnd(char)))\n ? 0\n : this.emitNotTerminatedNamedEntity();\n }\n current = decodeTree[this.treeIndex];\n valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n // If the branch is a value, store it and continue\n if (valueLength !== 0) {\n // If the entity is terminated by a semicolon, we are done.\n if (char === CharCodes.SEMI) {\n return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n }\n // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.\n if (this.decodeMode !== DecodingMode.Strict) {\n this.result = this.treeIndex;\n this.consumed += this.excess;\n this.excess = 0;\n }\n }\n }\n return -1;\n }\n /**\n * Emit a named entity that was not terminated with a semicolon.\n *\n * @returns The number of characters consumed.\n */\n emitNotTerminatedNamedEntity() {\n var _a;\n const { result, decodeTree } = this;\n const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;\n this.emitNamedEntityData(result, valueLength, this.consumed);\n (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();\n return this.consumed;\n }\n /**\n * Emit a named entity.\n *\n * @param result The index of the entity in the decode tree.\n * @param valueLength The number of bytes in the entity.\n * @param consumed The number of characters consumed.\n *\n * @returns The number of characters consumed.\n */\n emitNamedEntityData(result, valueLength, consumed) {\n const { decodeTree } = this;\n this.emitCodePoint(valueLength === 1\n ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH\n : decodeTree[result + 1], consumed);\n if (valueLength === 3) {\n // For multi-byte values, we need to emit the second byte.\n this.emitCodePoint(decodeTree[result + 2], consumed);\n }\n return consumed;\n }\n /**\n * Signal to the parser that the end of the input was reached.\n *\n * Remaining data will be emitted and relevant errors will be produced.\n *\n * @returns The number of characters consumed.\n */\n end() {\n var _a;\n switch (this.state) {\n case EntityDecoderState.NamedEntity: {\n // Emit a named entity if we have one.\n return this.result !== 0 &&\n (this.decodeMode !== DecodingMode.Attribute ||\n this.result === this.treeIndex)\n ? this.emitNotTerminatedNamedEntity()\n : 0;\n }\n // Otherwise, emit a numeric entity if we have one.\n case EntityDecoderState.NumericDecimal: {\n return this.emitNumericEntity(0, 2);\n }\n case EntityDecoderState.NumericHex: {\n return this.emitNumericEntity(0, 3);\n }\n case EntityDecoderState.NumericStart: {\n (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n return 0;\n }\n case EntityDecoderState.EntityStart: {\n // Return 0 if we have no entity.\n return 0;\n }\n }\n }\n}\n/**\n * Creates a function that decodes entities in a string.\n *\n * @param decodeTree The decode tree.\n * @returns A function that decodes entities in a string.\n */\nfunction getDecoder(decodeTree) {\n let returnValue = \"\";\n const decoder = new EntityDecoder(decodeTree, (data) => (returnValue += fromCodePoint(data)));\n return function decodeWithTrie(input, decodeMode) {\n let lastIndex = 0;\n let offset = 0;\n while ((offset = input.indexOf(\"&\", offset)) >= 0) {\n returnValue += input.slice(lastIndex, offset);\n decoder.startEntity(decodeMode);\n const length = decoder.write(input, \n // Skip the \"&\"\n offset + 1);\n if (length < 0) {\n lastIndex = offset + decoder.end();\n break;\n }\n lastIndex = offset + length;\n // If `length` is 0, skip the current `&` and continue.\n offset = length === 0 ? lastIndex + 1 : lastIndex;\n }\n const result = returnValue + input.slice(lastIndex);\n // Make sure we don't keep a reference to the final string.\n returnValue = \"\";\n return result;\n };\n}\n/**\n * Determines the branch of the current node that is taken given the current\n * character. This function is used to traverse the trie.\n *\n * @param decodeTree The trie.\n * @param current The current node.\n * @param nodeIdx The index right after the current node and its value.\n * @param char The current character.\n * @returns The index of the next node, or -1 if no branch is taken.\n */\nexport function determineBranch(decodeTree, current, nodeIndex, char) {\n const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n // Case 1: Single branch encoded in jump offset\n if (branchCount === 0) {\n return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;\n }\n // Case 2: Multiple branches encoded in jump table\n if (jumpOffset) {\n const value = char - jumpOffset;\n return value < 0 || value >= branchCount\n ? -1\n : decodeTree[nodeIndex + value] - 1;\n }\n // Case 3: Multiple branches encoded in dictionary\n // Binary search for the character.\n let lo = nodeIndex;\n let hi = lo + branchCount - 1;\n while (lo <= hi) {\n const mid = (lo + hi) >>> 1;\n const midValue = decodeTree[mid];\n if (midValue < char) {\n lo = mid + 1;\n }\n else if (midValue > char) {\n hi = mid - 1;\n }\n else {\n return decodeTree[mid + branchCount];\n }\n }\n return -1;\n}\nconst htmlDecoder = /* #__PURE__ */ getDecoder(htmlDecodeTree);\nconst xmlDecoder = /* #__PURE__ */ getDecoder(xmlDecodeTree);\n/**\n * Decodes an HTML string.\n *\n * @param htmlString The string to decode.\n * @param mode The decoding mode.\n * @returns The decoded string.\n */\nexport function decodeHTML(htmlString, mode = DecodingMode.Legacy) {\n return htmlDecoder(htmlString, mode);\n}\n/**\n * Decodes an HTML string in an attribute.\n *\n * @param htmlAttribute The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLAttribute(htmlAttribute) {\n return htmlDecoder(htmlAttribute, DecodingMode.Attribute);\n}\n/**\n * Decodes an HTML string, requiring all entities to be terminated by a semicolon.\n *\n * @param htmlString The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLStrict(htmlString) {\n return htmlDecoder(htmlString, DecodingMode.Strict);\n}\n/**\n * Decodes an XML string, requiring all entities to be terminated by a semicolon.\n *\n * @param xmlString The string to decode.\n * @returns The decoded string.\n */\nexport function decodeXML(xmlString) {\n return xmlDecoder(xmlString, DecodingMode.Strict);\n}\n// Re-export for use by eg. htmlparser2\nexport { htmlDecodeTree } from \"./generated/decode-data-html.js\";\nexport { xmlDecodeTree } from \"./generated/decode-data-xml.js\";\nexport { decodeCodePoint, replaceCodePoint, fromCodePoint, } from \"./decode-codepoint.js\";\n//# sourceMappingURL=decode.js.map","/** All valid namespaces in HTML. */\nexport var NS;\n(function (NS) {\n NS[\"HTML\"] = \"http://www.w3.org/1999/xhtml\";\n NS[\"MATHML\"] = \"http://www.w3.org/1998/Math/MathML\";\n NS[\"SVG\"] = \"http://www.w3.org/2000/svg\";\n NS[\"XLINK\"] = \"http://www.w3.org/1999/xlink\";\n NS[\"XML\"] = \"http://www.w3.org/XML/1998/namespace\";\n NS[\"XMLNS\"] = \"http://www.w3.org/2000/xmlns/\";\n})(NS || (NS = {}));\nexport var ATTRS;\n(function (ATTRS) {\n ATTRS[\"TYPE\"] = \"type\";\n ATTRS[\"ACTION\"] = \"action\";\n ATTRS[\"ENCODING\"] = \"encoding\";\n ATTRS[\"PROMPT\"] = \"prompt\";\n ATTRS[\"NAME\"] = \"name\";\n ATTRS[\"COLOR\"] = \"color\";\n ATTRS[\"FACE\"] = \"face\";\n ATTRS[\"SIZE\"] = \"size\";\n})(ATTRS || (ATTRS = {}));\n/**\n * The mode of the document.\n *\n * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks}\n */\nexport var DOCUMENT_MODE;\n(function (DOCUMENT_MODE) {\n DOCUMENT_MODE[\"NO_QUIRKS\"] = \"no-quirks\";\n DOCUMENT_MODE[\"QUIRKS\"] = \"quirks\";\n DOCUMENT_MODE[\"LIMITED_QUIRKS\"] = \"limited-quirks\";\n})(DOCUMENT_MODE || (DOCUMENT_MODE = {}));\nexport var TAG_NAMES;\n(function (TAG_NAMES) {\n TAG_NAMES[\"A\"] = \"a\";\n TAG_NAMES[\"ADDRESS\"] = \"address\";\n TAG_NAMES[\"ANNOTATION_XML\"] = \"annotation-xml\";\n TAG_NAMES[\"APPLET\"] = \"applet\";\n TAG_NAMES[\"AREA\"] = \"area\";\n TAG_NAMES[\"ARTICLE\"] = \"article\";\n TAG_NAMES[\"ASIDE\"] = \"aside\";\n TAG_NAMES[\"B\"] = \"b\";\n TAG_NAMES[\"BASE\"] = \"base\";\n TAG_NAMES[\"BASEFONT\"] = \"basefont\";\n TAG_NAMES[\"BGSOUND\"] = \"bgsound\";\n TAG_NAMES[\"BIG\"] = \"big\";\n TAG_NAMES[\"BLOCKQUOTE\"] = \"blockquote\";\n TAG_NAMES[\"BODY\"] = \"body\";\n TAG_NAMES[\"BR\"] = \"br\";\n TAG_NAMES[\"BUTTON\"] = \"button\";\n TAG_NAMES[\"CAPTION\"] = \"caption\";\n TAG_NAMES[\"CENTER\"] = \"center\";\n TAG_NAMES[\"CODE\"] = \"code\";\n TAG_NAMES[\"COL\"] = \"col\";\n TAG_NAMES[\"COLGROUP\"] = \"colgroup\";\n TAG_NAMES[\"DD\"] = \"dd\";\n TAG_NAMES[\"DESC\"] = \"desc\";\n TAG_NAMES[\"DETAILS\"] = \"details\";\n TAG_NAMES[\"DIALOG\"] = \"dialog\";\n TAG_NAMES[\"DIR\"] = \"dir\";\n TAG_NAMES[\"DIV\"] = \"div\";\n TAG_NAMES[\"DL\"] = \"dl\";\n TAG_NAMES[\"DT\"] = \"dt\";\n TAG_NAMES[\"EM\"] = \"em\";\n TAG_NAMES[\"EMBED\"] = \"embed\";\n TAG_NAMES[\"FIELDSET\"] = \"fieldset\";\n TAG_NAMES[\"FIGCAPTION\"] = \"figcaption\";\n TAG_NAMES[\"FIGURE\"] = \"figure\";\n TAG_NAMES[\"FONT\"] = \"font\";\n TAG_NAMES[\"FOOTER\"] = \"footer\";\n TAG_NAMES[\"FOREIGN_OBJECT\"] = \"foreignObject\";\n TAG_NAMES[\"FORM\"] = \"form\";\n TAG_NAMES[\"FRAME\"] = \"frame\";\n TAG_NAMES[\"FRAMESET\"] = \"frameset\";\n TAG_NAMES[\"H1\"] = \"h1\";\n TAG_NAMES[\"H2\"] = \"h2\";\n TAG_NAMES[\"H3\"] = \"h3\";\n TAG_NAMES[\"H4\"] = \"h4\";\n TAG_NAMES[\"H5\"] = \"h5\";\n TAG_NAMES[\"H6\"] = \"h6\";\n TAG_NAMES[\"HEAD\"] = \"head\";\n TAG_NAMES[\"HEADER\"] = \"header\";\n TAG_NAMES[\"HGROUP\"] = \"hgroup\";\n TAG_NAMES[\"HR\"] = \"hr\";\n TAG_NAMES[\"HTML\"] = \"html\";\n TAG_NAMES[\"I\"] = \"i\";\n TAG_NAMES[\"IMG\"] = \"img\";\n TAG_NAMES[\"IMAGE\"] = \"image\";\n TAG_NAMES[\"INPUT\"] = \"input\";\n TAG_NAMES[\"IFRAME\"] = \"iframe\";\n TAG_NAMES[\"KEYGEN\"] = \"keygen\";\n TAG_NAMES[\"LABEL\"] = \"label\";\n TAG_NAMES[\"LI\"] = \"li\";\n TAG_NAMES[\"LINK\"] = \"link\";\n TAG_NAMES[\"LISTING\"] = \"listing\";\n TAG_NAMES[\"MAIN\"] = \"main\";\n TAG_NAMES[\"MALIGNMARK\"] = \"malignmark\";\n TAG_NAMES[\"MARQUEE\"] = \"marquee\";\n TAG_NAMES[\"MATH\"] = \"math\";\n TAG_NAMES[\"MENU\"] = \"menu\";\n TAG_NAMES[\"META\"] = \"meta\";\n TAG_NAMES[\"MGLYPH\"] = \"mglyph\";\n TAG_NAMES[\"MI\"] = \"mi\";\n TAG_NAMES[\"MO\"] = \"mo\";\n TAG_NAMES[\"MN\"] = \"mn\";\n TAG_NAMES[\"MS\"] = \"ms\";\n TAG_NAMES[\"MTEXT\"] = \"mtext\";\n TAG_NAMES[\"NAV\"] = \"nav\";\n TAG_NAMES[\"NOBR\"] = \"nobr\";\n TAG_NAMES[\"NOFRAMES\"] = \"noframes\";\n TAG_NAMES[\"NOEMBED\"] = \"noembed\";\n TAG_NAMES[\"NOSCRIPT\"] = \"noscript\";\n TAG_NAMES[\"OBJECT\"] = \"object\";\n TAG_NAMES[\"OL\"] = \"ol\";\n TAG_NAMES[\"OPTGROUP\"] = \"optgroup\";\n TAG_NAMES[\"OPTION\"] = \"option\";\n TAG_NAMES[\"P\"] = \"p\";\n TAG_NAMES[\"PARAM\"] = \"param\";\n TAG_NAMES[\"PLAINTEXT\"] = \"plaintext\";\n TAG_NAMES[\"PRE\"] = \"pre\";\n TAG_NAMES[\"RB\"] = \"rb\";\n TAG_NAMES[\"RP\"] = \"rp\";\n TAG_NAMES[\"RT\"] = \"rt\";\n TAG_NAMES[\"RTC\"] = \"rtc\";\n TAG_NAMES[\"RUBY\"] = \"ruby\";\n TAG_NAMES[\"S\"] = \"s\";\n TAG_NAMES[\"SCRIPT\"] = \"script\";\n TAG_NAMES[\"SEARCH\"] = \"search\";\n TAG_NAMES[\"SECTION\"] = \"section\";\n TAG_NAMES[\"SELECT\"] = \"select\";\n TAG_NAMES[\"SOURCE\"] = \"source\";\n TAG_NAMES[\"SMALL\"] = \"small\";\n TAG_NAMES[\"SPAN\"] = \"span\";\n TAG_NAMES[\"STRIKE\"] = \"strike\";\n TAG_NAMES[\"STRONG\"] = \"strong\";\n TAG_NAMES[\"STYLE\"] = \"style\";\n TAG_NAMES[\"SUB\"] = \"sub\";\n TAG_NAMES[\"SUMMARY\"] = \"summary\";\n TAG_NAMES[\"SUP\"] = \"sup\";\n TAG_NAMES[\"TABLE\"] = \"table\";\n TAG_NAMES[\"TBODY\"] = \"tbody\";\n TAG_NAMES[\"TEMPLATE\"] = \"template\";\n TAG_NAMES[\"TEXTAREA\"] = \"textarea\";\n TAG_NAMES[\"TFOOT\"] = \"tfoot\";\n TAG_NAMES[\"TD\"] = \"td\";\n TAG_NAMES[\"TH\"] = \"th\";\n TAG_NAMES[\"THEAD\"] = \"thead\";\n TAG_NAMES[\"TITLE\"] = \"title\";\n TAG_NAMES[\"TR\"] = \"tr\";\n TAG_NAMES[\"TRACK\"] = \"track\";\n TAG_NAMES[\"TT\"] = \"tt\";\n TAG_NAMES[\"U\"] = \"u\";\n TAG_NAMES[\"UL\"] = \"ul\";\n TAG_NAMES[\"SVG\"] = \"svg\";\n TAG_NAMES[\"VAR\"] = \"var\";\n TAG_NAMES[\"WBR\"] = \"wbr\";\n TAG_NAMES[\"XMP\"] = \"xmp\";\n})(TAG_NAMES || (TAG_NAMES = {}));\n/**\n * Tag IDs are numeric IDs for known tag names.\n *\n * We use tag IDs to improve the performance of tag name comparisons.\n */\nexport var TAG_ID;\n(function (TAG_ID) {\n TAG_ID[TAG_ID[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n TAG_ID[TAG_ID[\"A\"] = 1] = \"A\";\n TAG_ID[TAG_ID[\"ADDRESS\"] = 2] = \"ADDRESS\";\n TAG_ID[TAG_ID[\"ANNOTATION_XML\"] = 3] = \"ANNOTATION_XML\";\n TAG_ID[TAG_ID[\"APPLET\"] = 4] = \"APPLET\";\n TAG_ID[TAG_ID[\"AREA\"] = 5] = \"AREA\";\n TAG_ID[TAG_ID[\"ARTICLE\"] = 6] = \"ARTICLE\";\n TAG_ID[TAG_ID[\"ASIDE\"] = 7] = \"ASIDE\";\n TAG_ID[TAG_ID[\"B\"] = 8] = \"B\";\n TAG_ID[TAG_ID[\"BASE\"] = 9] = \"BASE\";\n TAG_ID[TAG_ID[\"BASEFONT\"] = 10] = \"BASEFONT\";\n TAG_ID[TAG_ID[\"BGSOUND\"] = 11] = \"BGSOUND\";\n TAG_ID[TAG_ID[\"BIG\"] = 12] = \"BIG\";\n TAG_ID[TAG_ID[\"BLOCKQUOTE\"] = 13] = \"BLOCKQUOTE\";\n TAG_ID[TAG_ID[\"BODY\"] = 14] = \"BODY\";\n TAG_ID[TAG_ID[\"BR\"] = 15] = \"BR\";\n TAG_ID[TAG_ID[\"BUTTON\"] = 16] = \"BUTTON\";\n TAG_ID[TAG_ID[\"CAPTION\"] = 17] = \"CAPTION\";\n TAG_ID[TAG_ID[\"CENTER\"] = 18] = \"CENTER\";\n TAG_ID[TAG_ID[\"CODE\"] = 19] = \"CODE\";\n TAG_ID[TAG_ID[\"COL\"] = 20] = \"COL\";\n TAG_ID[TAG_ID[\"COLGROUP\"] = 21] = \"COLGROUP\";\n TAG_ID[TAG_ID[\"DD\"] = 22] = \"DD\";\n TAG_ID[TAG_ID[\"DESC\"] = 23] = \"DESC\";\n TAG_ID[TAG_ID[\"DETAILS\"] = 24] = \"DETAILS\";\n TAG_ID[TAG_ID[\"DIALOG\"] = 25] = \"DIALOG\";\n TAG_ID[TAG_ID[\"DIR\"] = 26] = \"DIR\";\n TAG_ID[TAG_ID[\"DIV\"] = 27] = \"DIV\";\n TAG_ID[TAG_ID[\"DL\"] = 28] = \"DL\";\n TAG_ID[TAG_ID[\"DT\"] = 29] = \"DT\";\n TAG_ID[TAG_ID[\"EM\"] = 30] = \"EM\";\n TAG_ID[TAG_ID[\"EMBED\"] = 31] = \"EMBED\";\n TAG_ID[TAG_ID[\"FIELDSET\"] = 32] = \"FIELDSET\";\n TAG_ID[TAG_ID[\"FIGCAPTION\"] = 33] = \"FIGCAPTION\";\n TAG_ID[TAG_ID[\"FIGURE\"] = 34] = \"FIGURE\";\n TAG_ID[TAG_ID[\"FONT\"] = 35] = \"FONT\";\n TAG_ID[TAG_ID[\"FOOTER\"] = 36] = \"FOOTER\";\n TAG_ID[TAG_ID[\"FOREIGN_OBJECT\"] = 37] = \"FOREIGN_OBJECT\";\n TAG_ID[TAG_ID[\"FORM\"] = 38] = \"FORM\";\n TAG_ID[TAG_ID[\"FRAME\"] = 39] = \"FRAME\";\n TAG_ID[TAG_ID[\"FRAMESET\"] = 40] = \"FRAMESET\";\n TAG_ID[TAG_ID[\"H1\"] = 41] = \"H1\";\n TAG_ID[TAG_ID[\"H2\"] = 42] = \"H2\";\n TAG_ID[TAG_ID[\"H3\"] = 43] = \"H3\";\n TAG_ID[TAG_ID[\"H4\"] = 44] = \"H4\";\n TAG_ID[TAG_ID[\"H5\"] = 45] = \"H5\";\n TAG_ID[TAG_ID[\"H6\"] = 46] = \"H6\";\n TAG_ID[TAG_ID[\"HEAD\"] = 47] = \"HEAD\";\n TAG_ID[TAG_ID[\"HEADER\"] = 48] = \"HEADER\";\n TAG_ID[TAG_ID[\"HGROUP\"] = 49] = \"HGROUP\";\n TAG_ID[TAG_ID[\"HR\"] = 50] = \"HR\";\n TAG_ID[TAG_ID[\"HTML\"] = 51] = \"HTML\";\n TAG_ID[TAG_ID[\"I\"] = 52] = \"I\";\n TAG_ID[TAG_ID[\"IMG\"] = 53] = \"IMG\";\n TAG_ID[TAG_ID[\"IMAGE\"] = 54] = \"IMAGE\";\n TAG_ID[TAG_ID[\"INPUT\"] = 55] = \"INPUT\";\n TAG_ID[TAG_ID[\"IFRAME\"] = 56] = \"IFRAME\";\n TAG_ID[TAG_ID[\"KEYGEN\"] = 57] = \"KEYGEN\";\n TAG_ID[TAG_ID[\"LABEL\"] = 58] = \"LABEL\";\n TAG_ID[TAG_ID[\"LI\"] = 59] = \"LI\";\n TAG_ID[TAG_ID[\"LINK\"] = 60] = \"LINK\";\n TAG_ID[TAG_ID[\"LISTING\"] = 61] = \"LISTING\";\n TAG_ID[TAG_ID[\"MAIN\"] = 62] = \"MAIN\";\n TAG_ID[TAG_ID[\"MALIGNMARK\"] = 63] = \"MALIGNMARK\";\n TAG_ID[TAG_ID[\"MARQUEE\"] = 64] = \"MARQUEE\";\n TAG_ID[TAG_ID[\"MATH\"] = 65] = \"MATH\";\n TAG_ID[TAG_ID[\"MENU\"] = 66] = \"MENU\";\n TAG_ID[TAG_ID[\"META\"] = 67] = \"META\";\n TAG_ID[TAG_ID[\"MGLYPH\"] = 68] = \"MGLYPH\";\n TAG_ID[TAG_ID[\"MI\"] = 69] = \"MI\";\n TAG_ID[TAG_ID[\"MO\"] = 70] = \"MO\";\n TAG_ID[TAG_ID[\"MN\"] = 71] = \"MN\";\n TAG_ID[TAG_ID[\"MS\"] = 72] = \"MS\";\n TAG_ID[TAG_ID[\"MTEXT\"] = 73] = \"MTEXT\";\n TAG_ID[TAG_ID[\"NAV\"] = 74] = \"NAV\";\n TAG_ID[TAG_ID[\"NOBR\"] = 75] = \"NOBR\";\n TAG_ID[TAG_ID[\"NOFRAMES\"] = 76] = \"NOFRAMES\";\n TAG_ID[TAG_ID[\"NOEMBED\"] = 77] = \"NOEMBED\";\n TAG_ID[TAG_ID[\"NOSCRIPT\"] = 78] = \"NOSCRIPT\";\n TAG_ID[TAG_ID[\"OBJECT\"] = 79] = \"OBJECT\";\n TAG_ID[TAG_ID[\"OL\"] = 80] = \"OL\";\n TAG_ID[TAG_ID[\"OPTGROUP\"] = 81] = \"OPTGROUP\";\n TAG_ID[TAG_ID[\"OPTION\"] = 82] = \"OPTION\";\n TAG_ID[TAG_ID[\"P\"] = 83] = \"P\";\n TAG_ID[TAG_ID[\"PARAM\"] = 84] = \"PARAM\";\n TAG_ID[TAG_ID[\"PLAINTEXT\"] = 85] = \"PLAINTEXT\";\n TAG_ID[TAG_ID[\"PRE\"] = 86] = \"PRE\";\n TAG_ID[TAG_ID[\"RB\"] = 87] = \"RB\";\n TAG_ID[TAG_ID[\"RP\"] = 88] = \"RP\";\n TAG_ID[TAG_ID[\"RT\"] = 89] = \"RT\";\n TAG_ID[TAG_ID[\"RTC\"] = 90] = \"RTC\";\n TAG_ID[TAG_ID[\"RUBY\"] = 91] = \"RUBY\";\n TAG_ID[TAG_ID[\"S\"] = 92] = \"S\";\n TAG_ID[TAG_ID[\"SCRIPT\"] = 93] = \"SCRIPT\";\n TAG_ID[TAG_ID[\"SEARCH\"] = 94] = \"SEARCH\";\n TAG_ID[TAG_ID[\"SECTION\"] = 95] = \"SECTION\";\n TAG_ID[TAG_ID[\"SELECT\"] = 96] = \"SELECT\";\n TAG_ID[TAG_ID[\"SOURCE\"] = 97] = \"SOURCE\";\n TAG_ID[TAG_ID[\"SMALL\"] = 98] = \"SMALL\";\n TAG_ID[TAG_ID[\"SPAN\"] = 99] = \"SPAN\";\n TAG_ID[TAG_ID[\"STRIKE\"] = 100] = \"STRIKE\";\n TAG_ID[TAG_ID[\"STRONG\"] = 101] = \"STRONG\";\n TAG_ID[TAG_ID[\"STYLE\"] = 102] = \"STYLE\";\n TAG_ID[TAG_ID[\"SUB\"] = 103] = \"SUB\";\n TAG_ID[TAG_ID[\"SUMMARY\"] = 104] = \"SUMMARY\";\n TAG_ID[TAG_ID[\"SUP\"] = 105] = \"SUP\";\n TAG_ID[TAG_ID[\"TABLE\"] = 106] = \"TABLE\";\n TAG_ID[TAG_ID[\"TBODY\"] = 107] = \"TBODY\";\n TAG_ID[TAG_ID[\"TEMPLATE\"] = 108] = \"TEMPLATE\";\n TAG_ID[TAG_ID[\"TEXTAREA\"] = 109] = \"TEXTAREA\";\n TAG_ID[TAG_ID[\"TFOOT\"] = 110] = \"TFOOT\";\n TAG_ID[TAG_ID[\"TD\"] = 111] = \"TD\";\n TAG_ID[TAG_ID[\"TH\"] = 112] = \"TH\";\n TAG_ID[TAG_ID[\"THEAD\"] = 113] = \"THEAD\";\n TAG_ID[TAG_ID[\"TITLE\"] = 114] = \"TITLE\";\n TAG_ID[TAG_ID[\"TR\"] = 115] = \"TR\";\n TAG_ID[TAG_ID[\"TRACK\"] = 116] = \"TRACK\";\n TAG_ID[TAG_ID[\"TT\"] = 117] = \"TT\";\n TAG_ID[TAG_ID[\"U\"] = 118] = \"U\";\n TAG_ID[TAG_ID[\"UL\"] = 119] = \"UL\";\n TAG_ID[TAG_ID[\"SVG\"] = 120] = \"SVG\";\n TAG_ID[TAG_ID[\"VAR\"] = 121] = \"VAR\";\n TAG_ID[TAG_ID[\"WBR\"] = 122] = \"WBR\";\n TAG_ID[TAG_ID[\"XMP\"] = 123] = \"XMP\";\n})(TAG_ID || (TAG_ID = {}));\nconst TAG_NAME_TO_ID = new Map([\n [TAG_NAMES.A, TAG_ID.A],\n [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],\n [TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML],\n [TAG_NAMES.APPLET, TAG_ID.APPLET],\n [TAG_NAMES.AREA, TAG_ID.AREA],\n [TAG_NAMES.ARTICLE, TAG_ID.ARTICLE],\n [TAG_NAMES.ASIDE, TAG_ID.ASIDE],\n [TAG_NAMES.B, TAG_ID.B],\n [TAG_NAMES.BASE, TAG_ID.BASE],\n [TAG_NAMES.BASEFONT, TAG_ID.BASEFONT],\n [TAG_NAMES.BGSOUND, TAG_ID.BGSOUND],\n [TAG_NAMES.BIG, TAG_ID.BIG],\n [TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE],\n [TAG_NAMES.BODY, TAG_ID.BODY],\n [TAG_NAMES.BR, TAG_ID.BR],\n [TAG_NAMES.BUTTON, TAG_ID.BUTTON],\n [TAG_NAMES.CAPTION, TAG_ID.CAPTION],\n [TAG_NAMES.CENTER, TAG_ID.CENTER],\n [TAG_NAMES.CODE, TAG_ID.CODE],\n [TAG_NAMES.COL, TAG_ID.COL],\n [TAG_NAMES.COLGROUP, TAG_ID.COLGROUP],\n [TAG_NAMES.DD, TAG_ID.DD],\n [TAG_NAMES.DESC, TAG_ID.DESC],\n [TAG_NAMES.DETAILS, TAG_ID.DETAILS],\n [TAG_NAMES.DIALOG, TAG_ID.DIALOG],\n [TAG_NAMES.DIR, TAG_ID.DIR],\n [TAG_NAMES.DIV, TAG_ID.DIV],\n [TAG_NAMES.DL, TAG_ID.DL],\n [TAG_NAMES.DT, TAG_ID.DT],\n [TAG_NAMES.EM, TAG_ID.EM],\n [TAG_NAMES.EMBED, TAG_ID.EMBED],\n [TAG_NAMES.FIELDSET, TAG_ID.FIELDSET],\n [TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION],\n [TAG_NAMES.FIGURE, TAG_ID.FIGURE],\n [TAG_NAMES.FONT, TAG_ID.FONT],\n [TAG_NAMES.FOOTER, TAG_ID.FOOTER],\n [TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT],\n [TAG_NAMES.FORM, TAG_ID.FORM],\n [TAG_NAMES.FRAME, TAG_ID.FRAME],\n [TAG_NAMES.FRAMESET, TAG_ID.FRAMESET],\n [TAG_NAMES.H1, TAG_ID.H1],\n [TAG_NAMES.H2, TAG_ID.H2],\n [TAG_NAMES.H3, TAG_ID.H3],\n [TAG_NAMES.H4, TAG_ID.H4],\n [TAG_NAMES.H5, TAG_ID.H5],\n [TAG_NAMES.H6, TAG_ID.H6],\n [TAG_NAMES.HEAD, TAG_ID.HEAD],\n [TAG_NAMES.HEADER, TAG_ID.HEADER],\n [TAG_NAMES.HGROUP, TAG_ID.HGROUP],\n [TAG_NAMES.HR, TAG_ID.HR],\n [TAG_NAMES.HTML, TAG_ID.HTML],\n [TAG_NAMES.I, TAG_ID.I],\n [TAG_NAMES.IMG, TAG_ID.IMG],\n [TAG_NAMES.IMAGE, TAG_ID.IMAGE],\n [TAG_NAMES.INPUT, TAG_ID.INPUT],\n [TAG_NAMES.IFRAME, TAG_ID.IFRAME],\n [TAG_NAMES.KEYGEN, TAG_ID.KEYGEN],\n [TAG_NAMES.LABEL, TAG_ID.LABEL],\n [TAG_NAMES.LI, TAG_ID.LI],\n [TAG_NAMES.LINK, TAG_ID.LINK],\n [TAG_NAMES.LISTING, TAG_ID.LISTING],\n [TAG_NAMES.MAIN, TAG_ID.MAIN],\n [TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK],\n [TAG_NAMES.MARQUEE, TAG_ID.MARQUEE],\n [TAG_NAMES.MATH, TAG_ID.MATH],\n [TAG_NAMES.MENU, TAG_ID.MENU],\n [TAG_NAMES.META, TAG_ID.META],\n [TAG_NAMES.MGLYPH, TAG_ID.MGLYPH],\n [TAG_NAMES.MI, TAG_ID.MI],\n [TAG_NAMES.MO, TAG_ID.MO],\n [TAG_NAMES.MN, TAG_ID.MN],\n [TAG_NAMES.MS, TAG_ID.MS],\n [TAG_NAMES.MTEXT, TAG_ID.MTEXT],\n [TAG_NAMES.NAV, TAG_ID.NAV],\n [TAG_NAMES.NOBR, TAG_ID.NOBR],\n [TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES],\n [TAG_NAMES.NOEMBED, TAG_ID.NOEMBED],\n [TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT],\n [TAG_NAMES.OBJECT, TAG_ID.OBJECT],\n [TAG_NAMES.OL, TAG_ID.OL],\n [TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP],\n [TAG_NAMES.OPTION, TAG_ID.OPTION],\n [TAG_NAMES.P, TAG_ID.P],\n [TAG_NAMES.PARAM, TAG_ID.PARAM],\n [TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT],\n [TAG_NAMES.PRE, TAG_ID.PRE],\n [TAG_NAMES.RB, TAG_ID.RB],\n [TAG_NAMES.RP, TAG_ID.RP],\n [TAG_NAMES.RT, TAG_ID.RT],\n [TAG_NAMES.RTC, TAG_ID.RTC],\n [TAG_NAMES.RUBY, TAG_ID.RUBY],\n [TAG_NAMES.S, TAG_ID.S],\n [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],\n [TAG_NAMES.SEARCH, TAG_ID.SEARCH],\n [TAG_NAMES.SECTION, TAG_ID.SECTION],\n [TAG_NAMES.SELECT, TAG_ID.SELECT],\n [TAG_NAMES.SOURCE, TAG_ID.SOURCE],\n [TAG_NAMES.SMALL, TAG_ID.SMALL],\n [TAG_NAMES.SPAN, TAG_ID.SPAN],\n [TAG_NAMES.STRIKE, TAG_ID.STRIKE],\n [TAG_NAMES.STRONG, TAG_ID.STRONG],\n [TAG_NAMES.STYLE, TAG_ID.STYLE],\n [TAG_NAMES.SUB, TAG_ID.SUB],\n [TAG_NAMES.SUMMARY, TAG_ID.SUMMARY],\n [TAG_NAMES.SUP, TAG_ID.SUP],\n [TAG_NAMES.TABLE, TAG_ID.TABLE],\n [TAG_NAMES.TBODY, TAG_ID.TBODY],\n [TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE],\n [TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA],\n [TAG_NAMES.TFOOT, TAG_ID.TFOOT],\n [TAG_NAMES.TD, TAG_ID.TD],\n [TAG_NAMES.TH, TAG_ID.TH],\n [TAG_NAMES.THEAD, TAG_ID.THEAD],\n [TAG_NAMES.TITLE, TAG_ID.TITLE],\n [TAG_NAMES.TR, TAG_ID.TR],\n [TAG_NAMES.TRACK, TAG_ID.TRACK],\n [TAG_NAMES.TT, TAG_ID.TT],\n [TAG_NAMES.U, TAG_ID.U],\n [TAG_NAMES.UL, TAG_ID.UL],\n [TAG_NAMES.SVG, TAG_ID.SVG],\n [TAG_NAMES.VAR, TAG_ID.VAR],\n [TAG_NAMES.WBR, TAG_ID.WBR],\n [TAG_NAMES.XMP, TAG_ID.XMP],\n]);\nexport function getTagID(tagName) {\n var _a;\n return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN;\n}\nconst $ = TAG_ID;\nexport const SPECIAL_ELEMENTS = {\n [NS.HTML]: new Set([\n $.ADDRESS,\n $.APPLET,\n $.AREA,\n $.ARTICLE,\n $.ASIDE,\n $.BASE,\n $.BASEFONT,\n $.BGSOUND,\n $.BLOCKQUOTE,\n $.BODY,\n $.BR,\n $.BUTTON,\n $.CAPTION,\n $.CENTER,\n $.COL,\n $.COLGROUP,\n $.DD,\n $.DETAILS,\n $.DIR,\n $.DIV,\n $.DL,\n $.DT,\n $.EMBED,\n $.FIELDSET,\n $.FIGCAPTION,\n $.FIGURE,\n $.FOOTER,\n $.FORM,\n $.FRAME,\n $.FRAMESET,\n $.H1,\n $.H2,\n $.H3,\n $.H4,\n $.H5,\n $.H6,\n $.HEAD,\n $.HEADER,\n $.HGROUP,\n $.HR,\n $.HTML,\n $.IFRAME,\n $.IMG,\n $.INPUT,\n $.LI,\n $.LINK,\n $.LISTING,\n $.MAIN,\n $.MARQUEE,\n $.MENU,\n $.META,\n $.NAV,\n $.NOEMBED,\n $.NOFRAMES,\n $.NOSCRIPT,\n $.OBJECT,\n $.OL,\n $.P,\n $.PARAM,\n $.PLAINTEXT,\n $.PRE,\n $.SCRIPT,\n $.SECTION,\n $.SELECT,\n $.SOURCE,\n $.STYLE,\n $.SUMMARY,\n $.TABLE,\n $.TBODY,\n $.TD,\n $.TEMPLATE,\n $.TEXTAREA,\n $.TFOOT,\n $.TH,\n $.THEAD,\n $.TITLE,\n $.TR,\n $.TRACK,\n $.UL,\n $.WBR,\n $.XMP,\n ]),\n [NS.MATHML]: new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]),\n [NS.SVG]: new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]),\n [NS.XLINK]: new Set(),\n [NS.XML]: new Set(),\n [NS.XMLNS]: new Set(),\n};\nexport const NUMBERED_HEADERS = new Set([$.H1, $.H2, $.H3, $.H4, $.H5, $.H6]);\nconst UNESCAPED_TEXT = new Set([\n TAG_NAMES.STYLE,\n TAG_NAMES.SCRIPT,\n TAG_NAMES.XMP,\n TAG_NAMES.IFRAME,\n TAG_NAMES.NOEMBED,\n TAG_NAMES.NOFRAMES,\n TAG_NAMES.PLAINTEXT,\n]);\nexport function hasUnescapedText(tn, scriptingEnabled) {\n return UNESCAPED_TEXT.has(tn) || (scriptingEnabled && tn === TAG_NAMES.NOSCRIPT);\n}\n","import { Preprocessor } from './preprocessor.js';\nimport { CODE_POINTS as $, SEQUENCES as $$, REPLACEMENT_CHARACTER, isSurrogate, isUndefinedCodePoint, isControlCodePoint, } from '../common/unicode.js';\nimport { TokenType, getTokenAttr, } from '../common/token.js';\nimport { htmlDecodeTree, EntityDecoder, DecodingMode } from 'entities/decode';\nimport { ERR } from '../common/error-codes.js';\nimport { TAG_ID, getTagID } from '../common/html.js';\n//States\nvar State;\n(function (State) {\n State[State[\"DATA\"] = 0] = \"DATA\";\n State[State[\"RCDATA\"] = 1] = \"RCDATA\";\n State[State[\"RAWTEXT\"] = 2] = \"RAWTEXT\";\n State[State[\"SCRIPT_DATA\"] = 3] = \"SCRIPT_DATA\";\n State[State[\"PLAINTEXT\"] = 4] = \"PLAINTEXT\";\n State[State[\"TAG_OPEN\"] = 5] = \"TAG_OPEN\";\n State[State[\"END_TAG_OPEN\"] = 6] = \"END_TAG_OPEN\";\n State[State[\"TAG_NAME\"] = 7] = \"TAG_NAME\";\n State[State[\"RCDATA_LESS_THAN_SIGN\"] = 8] = \"RCDATA_LESS_THAN_SIGN\";\n State[State[\"RCDATA_END_TAG_OPEN\"] = 9] = \"RCDATA_END_TAG_OPEN\";\n State[State[\"RCDATA_END_TAG_NAME\"] = 10] = \"RCDATA_END_TAG_NAME\";\n State[State[\"RAWTEXT_LESS_THAN_SIGN\"] = 11] = \"RAWTEXT_LESS_THAN_SIGN\";\n State[State[\"RAWTEXT_END_TAG_OPEN\"] = 12] = \"RAWTEXT_END_TAG_OPEN\";\n State[State[\"RAWTEXT_END_TAG_NAME\"] = 13] = \"RAWTEXT_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_LESS_THAN_SIGN\"] = 14] = \"SCRIPT_DATA_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_END_TAG_OPEN\"] = 15] = \"SCRIPT_DATA_END_TAG_OPEN\";\n State[State[\"SCRIPT_DATA_END_TAG_NAME\"] = 16] = \"SCRIPT_DATA_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_ESCAPE_START\"] = 17] = \"SCRIPT_DATA_ESCAPE_START\";\n State[State[\"SCRIPT_DATA_ESCAPE_START_DASH\"] = 18] = \"SCRIPT_DATA_ESCAPE_START_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED\"] = 19] = \"SCRIPT_DATA_ESCAPED\";\n State[State[\"SCRIPT_DATA_ESCAPED_DASH\"] = 20] = \"SCRIPT_DATA_ESCAPED_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED_DASH_DASH\"] = 21] = \"SCRIPT_DATA_ESCAPED_DASH_DASH\";\n State[State[\"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\"] = 22] = \"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\"] = 23] = \"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\";\n State[State[\"SCRIPT_DATA_ESCAPED_END_TAG_NAME\"] = 24] = \"SCRIPT_DATA_ESCAPED_END_TAG_NAME\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_START\"] = 25] = \"SCRIPT_DATA_DOUBLE_ESCAPE_START\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED\"] = 26] = \"SCRIPT_DATA_DOUBLE_ESCAPED\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\"] = 27] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\"] = 28] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\"] = 29] = \"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\";\n State[State[\"SCRIPT_DATA_DOUBLE_ESCAPE_END\"] = 30] = \"SCRIPT_DATA_DOUBLE_ESCAPE_END\";\n State[State[\"BEFORE_ATTRIBUTE_NAME\"] = 31] = \"BEFORE_ATTRIBUTE_NAME\";\n State[State[\"ATTRIBUTE_NAME\"] = 32] = \"ATTRIBUTE_NAME\";\n State[State[\"AFTER_ATTRIBUTE_NAME\"] = 33] = \"AFTER_ATTRIBUTE_NAME\";\n State[State[\"BEFORE_ATTRIBUTE_VALUE\"] = 34] = \"BEFORE_ATTRIBUTE_VALUE\";\n State[State[\"ATTRIBUTE_VALUE_DOUBLE_QUOTED\"] = 35] = \"ATTRIBUTE_VALUE_DOUBLE_QUOTED\";\n State[State[\"ATTRIBUTE_VALUE_SINGLE_QUOTED\"] = 36] = \"ATTRIBUTE_VALUE_SINGLE_QUOTED\";\n State[State[\"ATTRIBUTE_VALUE_UNQUOTED\"] = 37] = \"ATTRIBUTE_VALUE_UNQUOTED\";\n State[State[\"AFTER_ATTRIBUTE_VALUE_QUOTED\"] = 38] = \"AFTER_ATTRIBUTE_VALUE_QUOTED\";\n State[State[\"SELF_CLOSING_START_TAG\"] = 39] = \"SELF_CLOSING_START_TAG\";\n State[State[\"BOGUS_COMMENT\"] = 40] = \"BOGUS_COMMENT\";\n State[State[\"MARKUP_DECLARATION_OPEN\"] = 41] = \"MARKUP_DECLARATION_OPEN\";\n State[State[\"COMMENT_START\"] = 42] = \"COMMENT_START\";\n State[State[\"COMMENT_START_DASH\"] = 43] = \"COMMENT_START_DASH\";\n State[State[\"COMMENT\"] = 44] = \"COMMENT\";\n State[State[\"COMMENT_LESS_THAN_SIGN\"] = 45] = \"COMMENT_LESS_THAN_SIGN\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG\"] = 46] = \"COMMENT_LESS_THAN_SIGN_BANG\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH\"] = 47] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH\";\n State[State[\"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\"] = 48] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\";\n State[State[\"COMMENT_END_DASH\"] = 49] = \"COMMENT_END_DASH\";\n State[State[\"COMMENT_END\"] = 50] = \"COMMENT_END\";\n State[State[\"COMMENT_END_BANG\"] = 51] = \"COMMENT_END_BANG\";\n State[State[\"DOCTYPE\"] = 52] = \"DOCTYPE\";\n State[State[\"BEFORE_DOCTYPE_NAME\"] = 53] = \"BEFORE_DOCTYPE_NAME\";\n State[State[\"DOCTYPE_NAME\"] = 54] = \"DOCTYPE_NAME\";\n State[State[\"AFTER_DOCTYPE_NAME\"] = 55] = \"AFTER_DOCTYPE_NAME\";\n State[State[\"AFTER_DOCTYPE_PUBLIC_KEYWORD\"] = 56] = \"AFTER_DOCTYPE_PUBLIC_KEYWORD\";\n State[State[\"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\"] = 57] = \"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\";\n State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\"] = 58] = \"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\";\n State[State[\"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\"] = 59] = \"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\";\n State[State[\"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\"] = 60] = \"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\";\n State[State[\"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\"] = 61] = \"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\";\n State[State[\"AFTER_DOCTYPE_SYSTEM_KEYWORD\"] = 62] = \"AFTER_DOCTYPE_SYSTEM_KEYWORD\";\n State[State[\"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\"] = 63] = \"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\";\n State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\"] = 64] = \"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\";\n State[State[\"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\"] = 65] = \"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\";\n State[State[\"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\"] = 66] = \"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\";\n State[State[\"BOGUS_DOCTYPE\"] = 67] = \"BOGUS_DOCTYPE\";\n State[State[\"CDATA_SECTION\"] = 68] = \"CDATA_SECTION\";\n State[State[\"CDATA_SECTION_BRACKET\"] = 69] = \"CDATA_SECTION_BRACKET\";\n State[State[\"CDATA_SECTION_END\"] = 70] = \"CDATA_SECTION_END\";\n State[State[\"CHARACTER_REFERENCE\"] = 71] = \"CHARACTER_REFERENCE\";\n State[State[\"AMBIGUOUS_AMPERSAND\"] = 72] = \"AMBIGUOUS_AMPERSAND\";\n})(State || (State = {}));\n//Tokenizer initial states for different modes\nexport const TokenizerMode = {\n DATA: State.DATA,\n RCDATA: State.RCDATA,\n RAWTEXT: State.RAWTEXT,\n SCRIPT_DATA: State.SCRIPT_DATA,\n PLAINTEXT: State.PLAINTEXT,\n CDATA_SECTION: State.CDATA_SECTION,\n};\n//Utils\n//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline\n//this functions if they will be situated in another module due to context switch.\n//Always perform inlining check before modifying this functions ('node --trace-inlining').\nfunction isAsciiDigit(cp) {\n return cp >= $.DIGIT_0 && cp <= $.DIGIT_9;\n}\nfunction isAsciiUpper(cp) {\n return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_Z;\n}\nfunction isAsciiLower(cp) {\n return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_Z;\n}\nfunction isAsciiLetter(cp) {\n return isAsciiLower(cp) || isAsciiUpper(cp);\n}\nfunction isAsciiAlphaNumeric(cp) {\n return isAsciiLetter(cp) || isAsciiDigit(cp);\n}\nfunction toAsciiLower(cp) {\n return cp + 32;\n}\nfunction isWhitespace(cp) {\n return cp === $.SPACE || cp === $.LINE_FEED || cp === $.TABULATION || cp === $.FORM_FEED;\n}\nfunction isScriptDataDoubleEscapeSequenceEnd(cp) {\n return isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN;\n}\nfunction getErrorForNumericCharacterReference(code) {\n if (code === $.NULL) {\n return ERR.nullCharacterReference;\n }\n else if (code > 1114111) {\n return ERR.characterReferenceOutsideUnicodeRange;\n }\n else if (isSurrogate(code)) {\n return ERR.surrogateCharacterReference;\n }\n else if (isUndefinedCodePoint(code)) {\n return ERR.noncharacterCharacterReference;\n }\n else if (isControlCodePoint(code) || code === $.CARRIAGE_RETURN) {\n return ERR.controlCharacterReference;\n }\n return null;\n}\n//Tokenizer\nexport class Tokenizer {\n constructor(options, handler) {\n this.options = options;\n this.handler = handler;\n this.paused = false;\n /** Ensures that the parsing loop isn't run multiple times at once. */\n this.inLoop = false;\n /**\n * Indicates that the current adjusted node exists, is not an element in the HTML namespace,\n * and that it is not an integration point for either MathML or HTML.\n *\n * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction}\n */\n this.inForeignNode = false;\n this.lastStartTagName = '';\n this.active = false;\n this.state = State.DATA;\n this.returnState = State.DATA;\n this.entityStartPos = 0;\n this.consumedAfterSnapshot = -1;\n this.currentCharacterToken = null;\n this.currentToken = null;\n this.currentAttr = { name: '', value: '' };\n this.preprocessor = new Preprocessor(handler);\n this.currentLocation = this.getCurrentLocation(-1);\n this.entityDecoder = new EntityDecoder(htmlDecodeTree, (cp, consumed) => {\n // Note: Set `pos` _before_ flushing, as flushing might drop\n // the current chunk and invalidate `entityStartPos`.\n this.preprocessor.pos = this.entityStartPos + consumed - 1;\n this._flushCodePointConsumedAsCharacterReference(cp);\n }, handler.onParseError\n ? {\n missingSemicolonAfterCharacterReference: () => {\n this._err(ERR.missingSemicolonAfterCharacterReference, 1);\n },\n absenceOfDigitsInNumericCharacterReference: (consumed) => {\n this._err(ERR.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + consumed);\n },\n validateNumericCharacterReference: (code) => {\n const error = getErrorForNumericCharacterReference(code);\n if (error)\n this._err(error, 1);\n },\n }\n : undefined);\n }\n //Errors\n _err(code, cpOffset = 0) {\n var _a, _b;\n (_b = (_a = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a, this.preprocessor.getError(code, cpOffset));\n }\n // NOTE: `offset` may never run across line boundaries.\n getCurrentLocation(offset) {\n if (!this.options.sourceCodeLocationInfo) {\n return null;\n }\n return {\n startLine: this.preprocessor.line,\n startCol: this.preprocessor.col - offset,\n startOffset: this.preprocessor.offset - offset,\n endLine: -1,\n endCol: -1,\n endOffset: -1,\n };\n }\n _runParsingLoop() {\n if (this.inLoop)\n return;\n this.inLoop = true;\n while (this.active && !this.paused) {\n this.consumedAfterSnapshot = 0;\n const cp = this._consume();\n if (!this._ensureHibernation()) {\n this._callState(cp);\n }\n }\n this.inLoop = false;\n }\n //API\n pause() {\n this.paused = true;\n }\n resume(writeCallback) {\n if (!this.paused) {\n throw new Error('Parser was already resumed');\n }\n this.paused = false;\n // Necessary for synchronous resume.\n if (this.inLoop)\n return;\n this._runParsingLoop();\n if (!this.paused) {\n writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();\n }\n }\n write(chunk, isLastChunk, writeCallback) {\n this.active = true;\n this.preprocessor.write(chunk, isLastChunk);\n this._runParsingLoop();\n if (!this.paused) {\n writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();\n }\n }\n insertHtmlAtCurrentPos(chunk) {\n this.active = true;\n this.preprocessor.insertHtmlAtCurrentPos(chunk);\n this._runParsingLoop();\n }\n //Hibernation\n _ensureHibernation() {\n if (this.preprocessor.endOfChunkHit) {\n this.preprocessor.retreat(this.consumedAfterSnapshot);\n this.consumedAfterSnapshot = 0;\n this.active = false;\n return true;\n }\n return false;\n }\n //Consumption\n _consume() {\n this.consumedAfterSnapshot++;\n return this.preprocessor.advance();\n }\n _advanceBy(count) {\n this.consumedAfterSnapshot += count;\n for (let i = 0; i < count; i++) {\n this.preprocessor.advance();\n }\n }\n _consumeSequenceIfMatch(pattern, caseSensitive) {\n if (this.preprocessor.startsWith(pattern, caseSensitive)) {\n // We will already have consumed one character before calling this method.\n this._advanceBy(pattern.length - 1);\n return true;\n }\n return false;\n }\n //Token creation\n _createStartTagToken() {\n this.currentToken = {\n type: TokenType.START_TAG,\n tagName: '',\n tagID: TAG_ID.UNKNOWN,\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: this.getCurrentLocation(1),\n };\n }\n _createEndTagToken() {\n this.currentToken = {\n type: TokenType.END_TAG,\n tagName: '',\n tagID: TAG_ID.UNKNOWN,\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: this.getCurrentLocation(2),\n };\n }\n _createCommentToken(offset) {\n this.currentToken = {\n type: TokenType.COMMENT,\n data: '',\n location: this.getCurrentLocation(offset),\n };\n }\n _createDoctypeToken(initialName) {\n this.currentToken = {\n type: TokenType.DOCTYPE,\n name: initialName,\n forceQuirks: false,\n publicId: null,\n systemId: null,\n location: this.currentLocation,\n };\n }\n _createCharacterToken(type, chars) {\n this.currentCharacterToken = {\n type,\n chars,\n location: this.currentLocation,\n };\n }\n //Tag attributes\n _createAttr(attrNameFirstCh) {\n this.currentAttr = {\n name: attrNameFirstCh,\n value: '',\n };\n this.currentLocation = this.getCurrentLocation(0);\n }\n _leaveAttrName() {\n var _a;\n var _b;\n const token = this.currentToken;\n if (getTokenAttr(token, this.currentAttr.name) === null) {\n token.attrs.push(this.currentAttr);\n if (token.location && this.currentLocation) {\n const attrLocations = ((_a = (_b = token.location).attrs) !== null && _a !== void 0 ? _a : (_b.attrs = Object.create(null)));\n attrLocations[this.currentAttr.name] = this.currentLocation;\n // Set end location\n this._leaveAttrValue();\n }\n }\n else {\n this._err(ERR.duplicateAttribute);\n }\n }\n _leaveAttrValue() {\n if (this.currentLocation) {\n this.currentLocation.endLine = this.preprocessor.line;\n this.currentLocation.endCol = this.preprocessor.col;\n this.currentLocation.endOffset = this.preprocessor.offset;\n }\n }\n //Token emission\n prepareToken(ct) {\n this._emitCurrentCharacterToken(ct.location);\n this.currentToken = null;\n if (ct.location) {\n ct.location.endLine = this.preprocessor.line;\n ct.location.endCol = this.preprocessor.col + 1;\n ct.location.endOffset = this.preprocessor.offset + 1;\n }\n this.currentLocation = this.getCurrentLocation(-1);\n }\n emitCurrentTagToken() {\n const ct = this.currentToken;\n this.prepareToken(ct);\n ct.tagID = getTagID(ct.tagName);\n if (ct.type === TokenType.START_TAG) {\n this.lastStartTagName = ct.tagName;\n this.handler.onStartTag(ct);\n }\n else {\n if (ct.attrs.length > 0) {\n this._err(ERR.endTagWithAttributes);\n }\n if (ct.selfClosing) {\n this._err(ERR.endTagWithTrailingSolidus);\n }\n this.handler.onEndTag(ct);\n }\n this.preprocessor.dropParsedChunk();\n }\n emitCurrentComment(ct) {\n this.prepareToken(ct);\n this.handler.onComment(ct);\n this.preprocessor.dropParsedChunk();\n }\n emitCurrentDoctype(ct) {\n this.prepareToken(ct);\n this.handler.onDoctype(ct);\n this.preprocessor.dropParsedChunk();\n }\n _emitCurrentCharacterToken(nextLocation) {\n if (this.currentCharacterToken) {\n //NOTE: if we have a pending character token, make it's end location equal to the\n //current token's start location.\n if (nextLocation && this.currentCharacterToken.location) {\n this.currentCharacterToken.location.endLine = nextLocation.startLine;\n this.currentCharacterToken.location.endCol = nextLocation.startCol;\n this.currentCharacterToken.location.endOffset = nextLocation.startOffset;\n }\n switch (this.currentCharacterToken.type) {\n case TokenType.CHARACTER: {\n this.handler.onCharacter(this.currentCharacterToken);\n break;\n }\n case TokenType.NULL_CHARACTER: {\n this.handler.onNullCharacter(this.currentCharacterToken);\n break;\n }\n case TokenType.WHITESPACE_CHARACTER: {\n this.handler.onWhitespaceCharacter(this.currentCharacterToken);\n break;\n }\n }\n this.currentCharacterToken = null;\n }\n }\n _emitEOFToken() {\n const location = this.getCurrentLocation(0);\n if (location) {\n location.endLine = location.startLine;\n location.endCol = location.startCol;\n location.endOffset = location.startOffset;\n }\n this._emitCurrentCharacterToken(location);\n this.handler.onEof({ type: TokenType.EOF, location });\n this.active = false;\n }\n //Characters emission\n //OPTIMIZATION: The specification uses only one type of character token (one token per character).\n //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.\n //If we have a sequence of characters that belong to the same group, the parser can process it\n //as a single solid character token.\n //So, there are 3 types of character tokens in parse5:\n //1)TokenType.NULL_CHARACTER - \\u0000-character sequences (e.g. '\\u0000\\u0000\\u0000')\n //2)TokenType.WHITESPACE_CHARACTER - any whitespace/new-line character sequences (e.g. '\\n \\r\\t \\f')\n //3)TokenType.CHARACTER - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')\n _appendCharToCurrentCharacterToken(type, ch) {\n if (this.currentCharacterToken) {\n if (this.currentCharacterToken.type === type) {\n this.currentCharacterToken.chars += ch;\n return;\n }\n else {\n this.currentLocation = this.getCurrentLocation(0);\n this._emitCurrentCharacterToken(this.currentLocation);\n this.preprocessor.dropParsedChunk();\n }\n }\n this._createCharacterToken(type, ch);\n }\n _emitCodePoint(cp) {\n const type = isWhitespace(cp)\n ? TokenType.WHITESPACE_CHARACTER\n : cp === $.NULL\n ? TokenType.NULL_CHARACTER\n : TokenType.CHARACTER;\n this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));\n }\n //NOTE: used when we emit characters explicitly.\n //This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.\n _emitChars(ch) {\n this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);\n }\n // Character reference helpers\n _startCharacterReference() {\n this.returnState = this.state;\n this.state = State.CHARACTER_REFERENCE;\n this.entityStartPos = this.preprocessor.pos;\n this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute() ? DecodingMode.Attribute : DecodingMode.Legacy);\n }\n _isCharacterReferenceInAttribute() {\n return (this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED ||\n this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED ||\n this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED);\n }\n _flushCodePointConsumedAsCharacterReference(cp) {\n if (this._isCharacterReferenceInAttribute()) {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n else {\n this._emitCodePoint(cp);\n }\n }\n // Calling states this way turns out to be much faster than any other approach.\n _callState(cp) {\n switch (this.state) {\n case State.DATA: {\n this._stateData(cp);\n break;\n }\n case State.RCDATA: {\n this._stateRcdata(cp);\n break;\n }\n case State.RAWTEXT: {\n this._stateRawtext(cp);\n break;\n }\n case State.SCRIPT_DATA: {\n this._stateScriptData(cp);\n break;\n }\n case State.PLAINTEXT: {\n this._statePlaintext(cp);\n break;\n }\n case State.TAG_OPEN: {\n this._stateTagOpen(cp);\n break;\n }\n case State.END_TAG_OPEN: {\n this._stateEndTagOpen(cp);\n break;\n }\n case State.TAG_NAME: {\n this._stateTagName(cp);\n break;\n }\n case State.RCDATA_LESS_THAN_SIGN: {\n this._stateRcdataLessThanSign(cp);\n break;\n }\n case State.RCDATA_END_TAG_OPEN: {\n this._stateRcdataEndTagOpen(cp);\n break;\n }\n case State.RCDATA_END_TAG_NAME: {\n this._stateRcdataEndTagName(cp);\n break;\n }\n case State.RAWTEXT_LESS_THAN_SIGN: {\n this._stateRawtextLessThanSign(cp);\n break;\n }\n case State.RAWTEXT_END_TAG_OPEN: {\n this._stateRawtextEndTagOpen(cp);\n break;\n }\n case State.RAWTEXT_END_TAG_NAME: {\n this._stateRawtextEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_LESS_THAN_SIGN: {\n this._stateScriptDataLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_END_TAG_OPEN: {\n this._stateScriptDataEndTagOpen(cp);\n break;\n }\n case State.SCRIPT_DATA_END_TAG_NAME: {\n this._stateScriptDataEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPE_START: {\n this._stateScriptDataEscapeStart(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPE_START_DASH: {\n this._stateScriptDataEscapeStartDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED: {\n this._stateScriptDataEscaped(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_DASH: {\n this._stateScriptDataEscapedDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_DASH_DASH: {\n this._stateScriptDataEscapedDashDash(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {\n this._stateScriptDataEscapedLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: {\n this._stateScriptDataEscapedEndTagOpen(cp);\n break;\n }\n case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: {\n this._stateScriptDataEscapedEndTagName(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: {\n this._stateScriptDataDoubleEscapeStart(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED: {\n this._stateScriptDataDoubleEscaped(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {\n this._stateScriptDataDoubleEscapedDash(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {\n this._stateScriptDataDoubleEscapedDashDash(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {\n this._stateScriptDataDoubleEscapedLessThanSign(cp);\n break;\n }\n case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: {\n this._stateScriptDataDoubleEscapeEnd(cp);\n break;\n }\n case State.BEFORE_ATTRIBUTE_NAME: {\n this._stateBeforeAttributeName(cp);\n break;\n }\n case State.ATTRIBUTE_NAME: {\n this._stateAttributeName(cp);\n break;\n }\n case State.AFTER_ATTRIBUTE_NAME: {\n this._stateAfterAttributeName(cp);\n break;\n }\n case State.BEFORE_ATTRIBUTE_VALUE: {\n this._stateBeforeAttributeValue(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: {\n this._stateAttributeValueDoubleQuoted(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: {\n this._stateAttributeValueSingleQuoted(cp);\n break;\n }\n case State.ATTRIBUTE_VALUE_UNQUOTED: {\n this._stateAttributeValueUnquoted(cp);\n break;\n }\n case State.AFTER_ATTRIBUTE_VALUE_QUOTED: {\n this._stateAfterAttributeValueQuoted(cp);\n break;\n }\n case State.SELF_CLOSING_START_TAG: {\n this._stateSelfClosingStartTag(cp);\n break;\n }\n case State.BOGUS_COMMENT: {\n this._stateBogusComment(cp);\n break;\n }\n case State.MARKUP_DECLARATION_OPEN: {\n this._stateMarkupDeclarationOpen(cp);\n break;\n }\n case State.COMMENT_START: {\n this._stateCommentStart(cp);\n break;\n }\n case State.COMMENT_START_DASH: {\n this._stateCommentStartDash(cp);\n break;\n }\n case State.COMMENT: {\n this._stateComment(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN: {\n this._stateCommentLessThanSign(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG: {\n this._stateCommentLessThanSignBang(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: {\n this._stateCommentLessThanSignBangDash(cp);\n break;\n }\n case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: {\n this._stateCommentLessThanSignBangDashDash(cp);\n break;\n }\n case State.COMMENT_END_DASH: {\n this._stateCommentEndDash(cp);\n break;\n }\n case State.COMMENT_END: {\n this._stateCommentEnd(cp);\n break;\n }\n case State.COMMENT_END_BANG: {\n this._stateCommentEndBang(cp);\n break;\n }\n case State.DOCTYPE: {\n this._stateDoctype(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_NAME: {\n this._stateBeforeDoctypeName(cp);\n break;\n }\n case State.DOCTYPE_NAME: {\n this._stateDoctypeName(cp);\n break;\n }\n case State.AFTER_DOCTYPE_NAME: {\n this._stateAfterDoctypeName(cp);\n break;\n }\n case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: {\n this._stateAfterDoctypePublicKeyword(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {\n this._stateBeforeDoctypePublicIdentifier(cp);\n break;\n }\n case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {\n this._stateDoctypePublicIdentifierDoubleQuoted(cp);\n break;\n }\n case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {\n this._stateDoctypePublicIdentifierSingleQuoted(cp);\n break;\n }\n case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {\n this._stateAfterDoctypePublicIdentifier(cp);\n break;\n }\n case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {\n this._stateBetweenDoctypePublicAndSystemIdentifiers(cp);\n break;\n }\n case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: {\n this._stateAfterDoctypeSystemKeyword(cp);\n break;\n }\n case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {\n this._stateBeforeDoctypeSystemIdentifier(cp);\n break;\n }\n case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {\n this._stateDoctypeSystemIdentifierDoubleQuoted(cp);\n break;\n }\n case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {\n this._stateDoctypeSystemIdentifierSingleQuoted(cp);\n break;\n }\n case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {\n this._stateAfterDoctypeSystemIdentifier(cp);\n break;\n }\n case State.BOGUS_DOCTYPE: {\n this._stateBogusDoctype(cp);\n break;\n }\n case State.CDATA_SECTION: {\n this._stateCdataSection(cp);\n break;\n }\n case State.CDATA_SECTION_BRACKET: {\n this._stateCdataSectionBracket(cp);\n break;\n }\n case State.CDATA_SECTION_END: {\n this._stateCdataSectionEnd(cp);\n break;\n }\n case State.CHARACTER_REFERENCE: {\n this._stateCharacterReference();\n break;\n }\n case State.AMBIGUOUS_AMPERSAND: {\n this._stateAmbiguousAmpersand(cp);\n break;\n }\n default: {\n throw new Error('Unknown state');\n }\n }\n }\n // State machine\n // Data state\n //------------------------------------------------------------------\n _stateData(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.TAG_OPEN;\n break;\n }\n case $.AMPERSAND: {\n this._startCharacterReference();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitCodePoint(cp);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // RCDATA state\n //------------------------------------------------------------------\n _stateRcdata(cp) {\n switch (cp) {\n case $.AMPERSAND: {\n this._startCharacterReference();\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.RCDATA_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // RAWTEXT state\n //------------------------------------------------------------------\n _stateRawtext(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.RAWTEXT_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data state\n //------------------------------------------------------------------\n _stateScriptData(cp) {\n switch (cp) {\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // PLAINTEXT state\n //------------------------------------------------------------------\n _statePlaintext(cp) {\n switch (cp) {\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // Tag open state\n //------------------------------------------------------------------\n _stateTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this._createStartTagToken();\n this.state = State.TAG_NAME;\n this._stateTagName(cp);\n }\n else\n switch (cp) {\n case $.EXCLAMATION_MARK: {\n this.state = State.MARKUP_DECLARATION_OPEN;\n break;\n }\n case $.SOLIDUS: {\n this.state = State.END_TAG_OPEN;\n break;\n }\n case $.QUESTION_MARK: {\n this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);\n this._createCommentToken(1);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofBeforeTagName);\n this._emitChars('<');\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.invalidFirstCharacterOfTagName);\n this._emitChars('<');\n this.state = State.DATA;\n this._stateData(cp);\n }\n }\n }\n // End tag open state\n //------------------------------------------------------------------\n _stateEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this._createEndTagToken();\n this.state = State.TAG_NAME;\n this._stateTagName(cp);\n }\n else\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingEndTagName);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofBeforeTagName);\n this._emitChars('</');\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.invalidFirstCharacterOfTagName);\n this._createCommentToken(2);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n }\n }\n }\n // Tag name state\n //------------------------------------------------------------------\n _stateTagName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n }\n case $.SOLIDUS: {\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.tagName += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n token.tagName += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n }\n // RCDATA less-than sign state\n //------------------------------------------------------------------\n _stateRcdataLessThanSign(cp) {\n if (cp === $.SOLIDUS) {\n this.state = State.RCDATA_END_TAG_OPEN;\n }\n else {\n this._emitChars('<');\n this.state = State.RCDATA;\n this._stateRcdata(cp);\n }\n }\n // RCDATA end tag open state\n //------------------------------------------------------------------\n _stateRcdataEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.RCDATA_END_TAG_NAME;\n this._stateRcdataEndTagName(cp);\n }\n else {\n this._emitChars('</');\n this.state = State.RCDATA;\n this._stateRcdata(cp);\n }\n }\n handleSpecialEndTag(_cp) {\n if (!this.preprocessor.startsWith(this.lastStartTagName, false)) {\n return !this._ensureHibernation();\n }\n this._createEndTagToken();\n const token = this.currentToken;\n token.tagName = this.lastStartTagName;\n const cp = this.preprocessor.peek(this.lastStartTagName.length);\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this._advanceBy(this.lastStartTagName.length);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n return false;\n }\n case $.SOLIDUS: {\n this._advanceBy(this.lastStartTagName.length);\n this.state = State.SELF_CLOSING_START_TAG;\n return false;\n }\n case $.GREATER_THAN_SIGN: {\n this._advanceBy(this.lastStartTagName.length);\n this.emitCurrentTagToken();\n this.state = State.DATA;\n return false;\n }\n default: {\n return !this._ensureHibernation();\n }\n }\n }\n // RCDATA end tag name state\n //------------------------------------------------------------------\n _stateRcdataEndTagName(cp) {\n if (this.handleSpecialEndTag(cp)) {\n this._emitChars('</');\n this.state = State.RCDATA;\n this._stateRcdata(cp);\n }\n }\n // RAWTEXT less-than sign state\n //------------------------------------------------------------------\n _stateRawtextLessThanSign(cp) {\n if (cp === $.SOLIDUS) {\n this.state = State.RAWTEXT_END_TAG_OPEN;\n }\n else {\n this._emitChars('<');\n this.state = State.RAWTEXT;\n this._stateRawtext(cp);\n }\n }\n // RAWTEXT end tag open state\n //------------------------------------------------------------------\n _stateRawtextEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.RAWTEXT_END_TAG_NAME;\n this._stateRawtextEndTagName(cp);\n }\n else {\n this._emitChars('</');\n this.state = State.RAWTEXT;\n this._stateRawtext(cp);\n }\n }\n // RAWTEXT end tag name state\n //------------------------------------------------------------------\n _stateRawtextEndTagName(cp) {\n if (this.handleSpecialEndTag(cp)) {\n this._emitChars('</');\n this.state = State.RAWTEXT;\n this._stateRawtext(cp);\n }\n }\n // Script data less-than sign state\n //------------------------------------------------------------------\n _stateScriptDataLessThanSign(cp) {\n switch (cp) {\n case $.SOLIDUS: {\n this.state = State.SCRIPT_DATA_END_TAG_OPEN;\n break;\n }\n case $.EXCLAMATION_MARK: {\n this.state = State.SCRIPT_DATA_ESCAPE_START;\n this._emitChars('<!');\n break;\n }\n default: {\n this._emitChars('<');\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n }\n // Script data end tag open state\n //------------------------------------------------------------------\n _stateScriptDataEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.SCRIPT_DATA_END_TAG_NAME;\n this._stateScriptDataEndTagName(cp);\n }\n else {\n this._emitChars('</');\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n // Script data end tag name state\n //------------------------------------------------------------------\n _stateScriptDataEndTagName(cp) {\n if (this.handleSpecialEndTag(cp)) {\n this._emitChars('</');\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n // Script data escape start state\n //------------------------------------------------------------------\n _stateScriptDataEscapeStart(cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = State.SCRIPT_DATA_ESCAPE_START_DASH;\n this._emitChars('-');\n }\n else {\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n // Script data escape start dash state\n //------------------------------------------------------------------\n _stateScriptDataEscapeStartDash(cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;\n this._emitChars('-');\n }\n else {\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n // Script data escaped state\n //------------------------------------------------------------------\n _stateScriptDataEscaped(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.SCRIPT_DATA_ESCAPED_DASH;\n this._emitChars('-');\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data escaped dash state\n //------------------------------------------------------------------\n _stateScriptDataEscapedDash(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;\n this._emitChars('-');\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data escaped dash dash state\n //------------------------------------------------------------------\n _stateScriptDataEscapedDashDash(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this._emitChars('-');\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.SCRIPT_DATA;\n this._emitChars('>');\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data escaped less-than sign state\n //------------------------------------------------------------------\n _stateScriptDataEscapedLessThanSign(cp) {\n if (cp === $.SOLIDUS) {\n this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;\n }\n else if (isAsciiLetter(cp)) {\n this._emitChars('<');\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;\n this._stateScriptDataDoubleEscapeStart(cp);\n }\n else {\n this._emitChars('<');\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n // Script data escaped end tag open state\n //------------------------------------------------------------------\n _stateScriptDataEscapedEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;\n this._stateScriptDataEscapedEndTagName(cp);\n }\n else {\n this._emitChars('</');\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n // Script data escaped end tag name state\n //------------------------------------------------------------------\n _stateScriptDataEscapedEndTagName(cp) {\n if (this.handleSpecialEndTag(cp)) {\n this._emitChars('</');\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n // Script data double escape start state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapeStart(cp) {\n if (this.preprocessor.startsWith($$.SCRIPT, false) &&\n isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek($$.SCRIPT.length))) {\n this._emitCodePoint(cp);\n for (let i = 0; i < $$.SCRIPT.length; i++) {\n this._emitCodePoint(this._consume());\n }\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n }\n else if (!this._ensureHibernation()) {\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n // Script data double escaped state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscaped(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH;\n this._emitChars('-');\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n this._emitChars('<');\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data double escaped dash state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapedDash(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH;\n this._emitChars('-');\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n this._emitChars('<');\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data double escaped dash dash state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapedDashDash(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this._emitChars('-');\n break;\n }\n case $.LESS_THAN_SIGN: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n this._emitChars('<');\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.SCRIPT_DATA;\n this._emitChars('>');\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n }\n default: {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n }\n // Script data double escaped less-than sign state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapedLessThanSign(cp) {\n if (cp === $.SOLIDUS) {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END;\n this._emitChars('/');\n }\n else {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._stateScriptDataDoubleEscaped(cp);\n }\n }\n // Script data double escape end state\n //------------------------------------------------------------------\n _stateScriptDataDoubleEscapeEnd(cp) {\n if (this.preprocessor.startsWith($$.SCRIPT, false) &&\n isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek($$.SCRIPT.length))) {\n this._emitCodePoint(cp);\n for (let i = 0; i < $$.SCRIPT.length; i++) {\n this._emitCodePoint(this._consume());\n }\n this.state = State.SCRIPT_DATA_ESCAPED;\n }\n else if (!this._ensureHibernation()) {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._stateScriptDataDoubleEscaped(cp);\n }\n }\n // Before attribute name state\n //------------------------------------------------------------------\n _stateBeforeAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.SOLIDUS:\n case $.GREATER_THAN_SIGN:\n case $.EOF: {\n this.state = State.AFTER_ATTRIBUTE_NAME;\n this._stateAfterAttributeName(cp);\n break;\n }\n case $.EQUALS_SIGN: {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr('=');\n this.state = State.ATTRIBUTE_NAME;\n break;\n }\n default: {\n this._createAttr('');\n this.state = State.ATTRIBUTE_NAME;\n this._stateAttributeName(cp);\n }\n }\n }\n // Attribute name state\n //------------------------------------------------------------------\n _stateAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED:\n case $.SOLIDUS:\n case $.GREATER_THAN_SIGN:\n case $.EOF: {\n this._leaveAttrName();\n this.state = State.AFTER_ATTRIBUTE_NAME;\n this._stateAfterAttributeName(cp);\n break;\n }\n case $.EQUALS_SIGN: {\n this._leaveAttrName();\n this.state = State.BEFORE_ATTRIBUTE_VALUE;\n break;\n }\n case $.QUOTATION_MARK:\n case $.APOSTROPHE:\n case $.LESS_THAN_SIGN: {\n this._err(ERR.unexpectedCharacterInAttributeName);\n this.currentAttr.name += String.fromCodePoint(cp);\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.name += REPLACEMENT_CHARACTER;\n break;\n }\n default: {\n this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n }\n // After attribute name state\n //------------------------------------------------------------------\n _stateAfterAttributeName(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.SOLIDUS: {\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n }\n case $.EQUALS_SIGN: {\n this.state = State.BEFORE_ATTRIBUTE_VALUE;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._createAttr('');\n this.state = State.ATTRIBUTE_NAME;\n this._stateAttributeName(cp);\n }\n }\n }\n // Before attribute value state\n //------------------------------------------------------------------\n _stateBeforeAttributeValue(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingAttributeValue);\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n default: {\n this.state = State.ATTRIBUTE_VALUE_UNQUOTED;\n this._stateAttributeValueUnquoted(cp);\n }\n }\n }\n // Attribute value (double-quoted) state\n //------------------------------------------------------------------\n _stateAttributeValueDoubleQuoted(cp) {\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n break;\n }\n case $.AMPERSAND: {\n this._startCharacterReference();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // Attribute value (single-quoted) state\n //------------------------------------------------------------------\n _stateAttributeValueSingleQuoted(cp) {\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n break;\n }\n case $.AMPERSAND: {\n this._startCharacterReference();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // Attribute value (unquoted) state\n //------------------------------------------------------------------\n _stateAttributeValueUnquoted(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this._leaveAttrValue();\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n }\n case $.AMPERSAND: {\n this._startCharacterReference();\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._leaveAttrValue();\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n }\n case $.QUOTATION_MARK:\n case $.APOSTROPHE:\n case $.LESS_THAN_SIGN:\n case $.EQUALS_SIGN:\n case $.GRAVE_ACCENT: {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += String.fromCodePoint(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n }\n // After attribute value (quoted) state\n //------------------------------------------------------------------\n _stateAfterAttributeValueQuoted(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this._leaveAttrValue();\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n }\n case $.SOLIDUS: {\n this._leaveAttrValue();\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._leaveAttrValue();\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingWhitespaceBetweenAttributes);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n this._stateBeforeAttributeName(cp);\n }\n }\n }\n // Self-closing start tag state\n //------------------------------------------------------------------\n _stateSelfClosingStartTag(cp) {\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n const token = this.currentToken;\n token.selfClosing = true;\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.unexpectedSolidusInTag);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n this._stateBeforeAttributeName(cp);\n }\n }\n }\n // Bogus comment state\n //------------------------------------------------------------------\n _stateBogusComment(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.data += REPLACEMENT_CHARACTER;\n break;\n }\n default: {\n token.data += String.fromCodePoint(cp);\n }\n }\n }\n // Markup declaration open state\n //------------------------------------------------------------------\n _stateMarkupDeclarationOpen(cp) {\n if (this._consumeSequenceIfMatch($$.DASH_DASH, true)) {\n this._createCommentToken($$.DASH_DASH.length + 1);\n this.state = State.COMMENT_START;\n }\n else if (this._consumeSequenceIfMatch($$.DOCTYPE, false)) {\n // NOTE: Doctypes tokens are created without fixed offsets. We keep track of the moment a doctype *might* start here.\n this.currentLocation = this.getCurrentLocation($$.DOCTYPE.length + 1);\n this.state = State.DOCTYPE;\n }\n else if (this._consumeSequenceIfMatch($$.CDATA_START, true)) {\n if (this.inForeignNode) {\n this.state = State.CDATA_SECTION;\n }\n else {\n this._err(ERR.cdataInHtmlContent);\n this._createCommentToken($$.CDATA_START.length + 1);\n this.currentToken.data = '[CDATA[';\n this.state = State.BOGUS_COMMENT;\n }\n }\n //NOTE: Sequence lookups can be abrupted by hibernation. In that case, lookup\n //results are no longer valid and we will need to start over.\n else if (!this._ensureHibernation()) {\n this._err(ERR.incorrectlyOpenedComment);\n this._createCommentToken(2);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n }\n }\n // Comment start state\n //------------------------------------------------------------------\n _stateCommentStart(cp) {\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_START_DASH;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = State.DATA;\n const token = this.currentToken;\n this.emitCurrentComment(token);\n break;\n }\n default: {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment start dash state\n //------------------------------------------------------------------\n _stateCommentStartDash(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '-';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment state\n //------------------------------------------------------------------\n _stateComment(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END_DASH;\n break;\n }\n case $.LESS_THAN_SIGN: {\n token.data += '<';\n this.state = State.COMMENT_LESS_THAN_SIGN;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.data += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += String.fromCodePoint(cp);\n }\n }\n }\n // Comment less-than sign state\n //------------------------------------------------------------------\n _stateCommentLessThanSign(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.EXCLAMATION_MARK: {\n token.data += '!';\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG;\n break;\n }\n case $.LESS_THAN_SIGN: {\n token.data += '<';\n break;\n }\n default: {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment less-than sign bang state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBang(cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH;\n }\n else {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n // Comment less-than sign bang dash state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBangDash(cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;\n }\n else {\n this.state = State.COMMENT_END_DASH;\n this._stateCommentEndDash(cp);\n }\n }\n // Comment less-than sign bang dash dash state\n //------------------------------------------------------------------\n _stateCommentLessThanSignBangDashDash(cp) {\n if (cp !== $.GREATER_THAN_SIGN && cp !== $.EOF) {\n this._err(ERR.nestedComment);\n }\n this.state = State.COMMENT_END;\n this._stateCommentEnd(cp);\n }\n // Comment end dash state\n //------------------------------------------------------------------\n _stateCommentEndDash(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n this.state = State.COMMENT_END;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '-';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment end state\n //------------------------------------------------------------------\n _stateCommentEnd(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EXCLAMATION_MARK: {\n this.state = State.COMMENT_END_BANG;\n break;\n }\n case $.HYPHEN_MINUS: {\n token.data += '-';\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '--';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // Comment end bang state\n //------------------------------------------------------------------\n _stateCommentEndBang(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.HYPHEN_MINUS: {\n token.data += '--!';\n this.state = State.COMMENT_END_DASH;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.incorrectlyClosedComment);\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.data += '--!';\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n }\n // DOCTYPE state\n //------------------------------------------------------------------\n _stateDoctype(cp) {\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.BEFORE_DOCTYPE_NAME;\n this._stateBeforeDoctypeName(cp);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingWhitespaceBeforeDoctypeName);\n this.state = State.BEFORE_DOCTYPE_NAME;\n this._stateBeforeDoctypeName(cp);\n }\n }\n }\n // Before DOCTYPE name state\n //------------------------------------------------------------------\n _stateBeforeDoctypeName(cp) {\n if (isAsciiUpper(cp)) {\n this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp)));\n this.state = State.DOCTYPE_NAME;\n }\n else\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n this._createDoctypeToken(REPLACEMENT_CHARACTER);\n this.state = State.DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeName);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._createDoctypeToken(String.fromCodePoint(cp));\n this.state = State.DOCTYPE_NAME;\n }\n }\n }\n // DOCTYPE name state\n //------------------------------------------------------------------\n _stateDoctypeName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.AFTER_DOCTYPE_NAME;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.name += REPLACEMENT_CHARACTER;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n }\n // After DOCTYPE name state\n //------------------------------------------------------------------\n _stateAfterDoctypeName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n if (this._consumeSequenceIfMatch($$.PUBLIC, false)) {\n this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD;\n }\n else if (this._consumeSequenceIfMatch($$.SYSTEM, false)) {\n this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD;\n }\n //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup\n //results are no longer valid and we will need to start over.\n else if (!this._ensureHibernation()) {\n this._err(ERR.invalidCharacterSequenceAfterDoctypeName);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n }\n // After DOCTYPE public keyword state\n //------------------------------------------------------------------\n _stateAfterDoctypePublicKeyword(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Before DOCTYPE public identifier state\n //------------------------------------------------------------------\n _stateBeforeDoctypePublicIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.publicId = '';\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // DOCTYPE public identifier (double-quoted) state\n //------------------------------------------------------------------\n _stateDoctypePublicIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.publicId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.publicId += String.fromCodePoint(cp);\n }\n }\n }\n // DOCTYPE public identifier (single-quoted) state\n //------------------------------------------------------------------\n _stateDoctypePublicIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.publicId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.publicId += String.fromCodePoint(cp);\n }\n }\n }\n // After DOCTYPE public identifier state\n //------------------------------------------------------------------\n _stateAfterDoctypePublicIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Between DOCTYPE public and system identifiers state\n //------------------------------------------------------------------\n _stateBetweenDoctypePublicAndSystemIdentifiers(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.QUOTATION_MARK: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // After DOCTYPE system keyword state\n //------------------------------------------------------------------\n _stateAfterDoctypeSystemKeyword(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.QUOTATION_MARK: {\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Before DOCTYPE system identifier state\n //------------------------------------------------------------------\n _stateBeforeDoctypeSystemIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.QUOTATION_MARK: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n }\n case $.APOSTROPHE: {\n token.systemId = '';\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // DOCTYPE system identifier (double-quoted) state\n //------------------------------------------------------------------\n _stateDoctypeSystemIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.QUOTATION_MARK: {\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.systemId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.systemId += String.fromCodePoint(cp);\n }\n }\n }\n // DOCTYPE system identifier (single-quoted) state\n //------------------------------------------------------------------\n _stateDoctypeSystemIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.APOSTROPHE: {\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n token.systemId += REPLACEMENT_CHARACTER;\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this._err(ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.systemId += String.fromCodePoint(cp);\n }\n }\n }\n // After DOCTYPE system identifier state\n //------------------------------------------------------------------\n _stateAfterDoctypeSystemIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.SPACE:\n case $.LINE_FEED:\n case $.TABULATION:\n case $.FORM_FEED: {\n // Ignore whitespace\n break;\n }\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n // Bogus DOCTYPE state\n //------------------------------------------------------------------\n _stateBogusDoctype(cp) {\n const token = this.currentToken;\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case $.NULL: {\n this._err(ERR.unexpectedNullCharacter);\n break;\n }\n case $.EOF: {\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default:\n // Do nothing\n }\n }\n // CDATA section state\n //------------------------------------------------------------------\n _stateCdataSection(cp) {\n switch (cp) {\n case $.RIGHT_SQUARE_BRACKET: {\n this.state = State.CDATA_SECTION_BRACKET;\n break;\n }\n case $.EOF: {\n this._err(ERR.eofInCdata);\n this._emitEOFToken();\n break;\n }\n default: {\n this._emitCodePoint(cp);\n }\n }\n }\n // CDATA section bracket state\n //------------------------------------------------------------------\n _stateCdataSectionBracket(cp) {\n if (cp === $.RIGHT_SQUARE_BRACKET) {\n this.state = State.CDATA_SECTION_END;\n }\n else {\n this._emitChars(']');\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }\n // CDATA section end state\n //------------------------------------------------------------------\n _stateCdataSectionEnd(cp) {\n switch (cp) {\n case $.GREATER_THAN_SIGN: {\n this.state = State.DATA;\n break;\n }\n case $.RIGHT_SQUARE_BRACKET: {\n this._emitChars(']');\n break;\n }\n default: {\n this._emitChars(']]');\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }\n }\n // Character reference state\n //------------------------------------------------------------------\n _stateCharacterReference() {\n let length = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos);\n if (length < 0) {\n if (this.preprocessor.lastChunkWritten) {\n length = this.entityDecoder.end();\n }\n else {\n // Wait for the rest of the entity.\n this.active = false;\n // Mark the entire buffer as read.\n this.preprocessor.pos = this.preprocessor.html.length - 1;\n this.consumedAfterSnapshot = 0;\n this.preprocessor.endOfChunkHit = true;\n return;\n }\n }\n if (length === 0) {\n // This was not a valid entity. Go back to the beginning, and\n // figure out what to do.\n this.preprocessor.pos = this.entityStartPos;\n this._flushCodePointConsumedAsCharacterReference($.AMPERSAND);\n this.state =\n !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric(this.preprocessor.peek(1))\n ? State.AMBIGUOUS_AMPERSAND\n : this.returnState;\n }\n else {\n // We successfully parsed an entity. Switch to the return state.\n this.state = this.returnState;\n }\n }\n // Ambiguos ampersand state\n //------------------------------------------------------------------\n _stateAmbiguousAmpersand(cp) {\n if (isAsciiAlphaNumeric(cp)) {\n this._flushCodePointConsumedAsCharacterReference(cp);\n }\n else {\n if (cp === $.SEMICOLON) {\n this._err(ERR.unknownNamedCharacterReference);\n }\n this.state = this.returnState;\n this._callState(cp);\n }\n }\n}\n","import { TAG_ID as $, NS, NUMBERED_HEADERS } from '../common/html.js';\n//Element utils\nconst IMPLICIT_END_TAG_REQUIRED = new Set([$.DD, $.DT, $.LI, $.OPTGROUP, $.OPTION, $.P, $.RB, $.RP, $.RT, $.RTC]);\nconst IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = new Set([\n ...IMPLICIT_END_TAG_REQUIRED,\n $.CAPTION,\n $.COLGROUP,\n $.TBODY,\n $.TD,\n $.TFOOT,\n $.TH,\n $.THEAD,\n $.TR,\n]);\nconst SCOPING_ELEMENTS_HTML = new Set([\n $.APPLET,\n $.CAPTION,\n $.HTML,\n $.MARQUEE,\n $.OBJECT,\n $.TABLE,\n $.TD,\n $.TEMPLATE,\n $.TH,\n]);\nconst SCOPING_ELEMENTS_HTML_LIST = new Set([...SCOPING_ELEMENTS_HTML, $.OL, $.UL]);\nconst SCOPING_ELEMENTS_HTML_BUTTON = new Set([...SCOPING_ELEMENTS_HTML, $.BUTTON]);\nconst SCOPING_ELEMENTS_MATHML = new Set([$.ANNOTATION_XML, $.MI, $.MN, $.MO, $.MS, $.MTEXT]);\nconst SCOPING_ELEMENTS_SVG = new Set([$.DESC, $.FOREIGN_OBJECT, $.TITLE]);\nconst TABLE_ROW_CONTEXT = new Set([$.TR, $.TEMPLATE, $.HTML]);\nconst TABLE_BODY_CONTEXT = new Set([$.TBODY, $.TFOOT, $.THEAD, $.TEMPLATE, $.HTML]);\nconst TABLE_CONTEXT = new Set([$.TABLE, $.TEMPLATE, $.HTML]);\nconst TABLE_CELLS = new Set([$.TD, $.TH]);\n//Stack of open elements\nexport class OpenElementStack {\n get currentTmplContentOrNode() {\n return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;\n }\n constructor(document, treeAdapter, handler) {\n this.treeAdapter = treeAdapter;\n this.handler = handler;\n this.items = [];\n this.tagIDs = [];\n this.stackTop = -1;\n this.tmplCount = 0;\n this.currentTagId = $.UNKNOWN;\n this.current = document;\n }\n //Index of element\n _indexOf(element) {\n return this.items.lastIndexOf(element, this.stackTop);\n }\n //Update current element\n _isInTemplate() {\n return this.currentTagId === $.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;\n }\n _updateCurrentElement() {\n this.current = this.items[this.stackTop];\n this.currentTagId = this.tagIDs[this.stackTop];\n }\n //Mutations\n push(element, tagID) {\n this.stackTop++;\n this.items[this.stackTop] = element;\n this.current = element;\n this.tagIDs[this.stackTop] = tagID;\n this.currentTagId = tagID;\n if (this._isInTemplate()) {\n this.tmplCount++;\n }\n this.handler.onItemPush(element, tagID, true);\n }\n pop() {\n const popped = this.current;\n if (this.tmplCount > 0 && this._isInTemplate()) {\n this.tmplCount--;\n }\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(popped, true);\n }\n replace(oldElement, newElement) {\n const idx = this._indexOf(oldElement);\n this.items[idx] = newElement;\n if (idx === this.stackTop) {\n this.current = newElement;\n }\n }\n insertAfter(referenceElement, newElement, newElementID) {\n const insertionIdx = this._indexOf(referenceElement) + 1;\n this.items.splice(insertionIdx, 0, newElement);\n this.tagIDs.splice(insertionIdx, 0, newElementID);\n this.stackTop++;\n if (insertionIdx === this.stackTop) {\n this._updateCurrentElement();\n }\n if (this.current && this.currentTagId !== undefined) {\n this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);\n }\n }\n popUntilTagNamePopped(tagName) {\n let targetIdx = this.stackTop + 1;\n do {\n targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);\n } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);\n this.shortenToLength(Math.max(targetIdx, 0));\n }\n shortenToLength(idx) {\n while (this.stackTop >= idx) {\n const popped = this.current;\n if (this.tmplCount > 0 && this._isInTemplate()) {\n this.tmplCount -= 1;\n }\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(popped, this.stackTop < idx);\n }\n }\n popUntilElementPopped(element) {\n const idx = this._indexOf(element);\n this.shortenToLength(Math.max(idx, 0));\n }\n popUntilPopped(tagNames, targetNS) {\n const idx = this._indexOfTagNames(tagNames, targetNS);\n this.shortenToLength(Math.max(idx, 0));\n }\n popUntilNumberedHeaderPopped() {\n this.popUntilPopped(NUMBERED_HEADERS, NS.HTML);\n }\n popUntilTableCellPopped() {\n this.popUntilPopped(TABLE_CELLS, NS.HTML);\n }\n popAllUpToHtmlElement() {\n //NOTE: here we assume that the root <html> element is always first in the open element stack, so\n //we perform this fast stack clean up.\n this.tmplCount = 0;\n this.shortenToLength(1);\n }\n _indexOfTagNames(tagNames, namespace) {\n for (let i = this.stackTop; i >= 0; i--) {\n if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {\n return i;\n }\n }\n return -1;\n }\n clearBackTo(tagNames, targetNS) {\n const idx = this._indexOfTagNames(tagNames, targetNS);\n this.shortenToLength(idx + 1);\n }\n clearBackToTableContext() {\n this.clearBackTo(TABLE_CONTEXT, NS.HTML);\n }\n clearBackToTableBodyContext() {\n this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);\n }\n clearBackToTableRowContext() {\n this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);\n }\n remove(element) {\n const idx = this._indexOf(element);\n if (idx >= 0) {\n if (idx === this.stackTop) {\n this.pop();\n }\n else {\n this.items.splice(idx, 1);\n this.tagIDs.splice(idx, 1);\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(element, false);\n }\n }\n }\n //Search\n tryPeekProperlyNestedBodyElement() {\n //Properly nested <body> element (should be second element in stack).\n return this.stackTop >= 1 && this.tagIDs[1] === $.BODY ? this.items[1] : null;\n }\n contains(element) {\n return this._indexOf(element) > -1;\n }\n getCommonAncestor(element) {\n const elementIdx = this._indexOf(element) - 1;\n return elementIdx >= 0 ? this.items[elementIdx] : null;\n }\n isRootHtmlElementCurrent() {\n return this.stackTop === 0 && this.tagIDs[0] === $.HTML;\n }\n //Element in scope\n hasInDynamicScope(tagName, htmlScope) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n switch (this.treeAdapter.getNamespaceURI(this.items[i])) {\n case NS.HTML: {\n if (tn === tagName)\n return true;\n if (htmlScope.has(tn))\n return false;\n break;\n }\n case NS.SVG: {\n if (SCOPING_ELEMENTS_SVG.has(tn))\n return false;\n break;\n }\n case NS.MATHML: {\n if (SCOPING_ELEMENTS_MATHML.has(tn))\n return false;\n break;\n }\n }\n }\n return true;\n }\n hasInScope(tagName) {\n return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML);\n }\n hasInListItemScope(tagName) {\n return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_LIST);\n }\n hasInButtonScope(tagName) {\n return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_BUTTON);\n }\n hasNumberedHeaderInScope() {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n switch (this.treeAdapter.getNamespaceURI(this.items[i])) {\n case NS.HTML: {\n if (NUMBERED_HEADERS.has(tn))\n return true;\n if (SCOPING_ELEMENTS_HTML.has(tn))\n return false;\n break;\n }\n case NS.SVG: {\n if (SCOPING_ELEMENTS_SVG.has(tn))\n return false;\n break;\n }\n case NS.MATHML: {\n if (SCOPING_ELEMENTS_MATHML.has(tn))\n return false;\n break;\n }\n }\n }\n return true;\n }\n hasInTableScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {\n continue;\n }\n switch (this.tagIDs[i]) {\n case tagName: {\n return true;\n }\n case $.TABLE:\n case $.HTML: {\n return false;\n }\n }\n }\n return true;\n }\n hasTableBodyContextInTableScope() {\n for (let i = this.stackTop; i >= 0; i--) {\n if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {\n continue;\n }\n switch (this.tagIDs[i]) {\n case $.TBODY:\n case $.THEAD:\n case $.TFOOT: {\n return true;\n }\n case $.TABLE:\n case $.HTML: {\n return false;\n }\n }\n }\n return true;\n }\n hasInSelectScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) {\n continue;\n }\n switch (this.tagIDs[i]) {\n case tagName: {\n return true;\n }\n case $.OPTION:\n case $.OPTGROUP: {\n break;\n }\n default: {\n return false;\n }\n }\n }\n return true;\n }\n //Implied end tags\n generateImpliedEndTags() {\n while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {\n this.pop();\n }\n }\n generateImpliedEndTagsThoroughly() {\n while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {\n this.pop();\n }\n }\n generateImpliedEndTagsWithExclusion(exclusionId) {\n while (this.currentTagId !== undefined &&\n this.currentTagId !== exclusionId &&\n IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {\n this.pop();\n }\n }\n}\n","//Const\nconst NOAH_ARK_CAPACITY = 3;\nexport var EntryType;\n(function (EntryType) {\n EntryType[EntryType[\"Marker\"] = 0] = \"Marker\";\n EntryType[EntryType[\"Element\"] = 1] = \"Element\";\n})(EntryType || (EntryType = {}));\nconst MARKER = { type: EntryType.Marker };\n//List of formatting elements\nexport class FormattingElementList {\n constructor(treeAdapter) {\n this.treeAdapter = treeAdapter;\n this.entries = [];\n this.bookmark = null;\n }\n //Noah Ark's condition\n //OPTIMIZATION: at first we try to find possible candidates for exclusion using\n //lightweight heuristics without thorough attributes check.\n _getNoahArkConditionCandidates(newElement, neAttrs) {\n const candidates = [];\n const neAttrsLength = neAttrs.length;\n const neTagName = this.treeAdapter.getTagName(newElement);\n const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);\n for (let i = 0; i < this.entries.length; i++) {\n const entry = this.entries[i];\n if (entry.type === EntryType.Marker) {\n break;\n }\n const { element } = entry;\n if (this.treeAdapter.getTagName(element) === neTagName &&\n this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) {\n const elementAttrs = this.treeAdapter.getAttrList(element);\n if (elementAttrs.length === neAttrsLength) {\n candidates.push({ idx: i, attrs: elementAttrs });\n }\n }\n }\n return candidates;\n }\n _ensureNoahArkCondition(newElement) {\n if (this.entries.length < NOAH_ARK_CAPACITY)\n return;\n const neAttrs = this.treeAdapter.getAttrList(newElement);\n const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);\n if (candidates.length < NOAH_ARK_CAPACITY)\n return;\n //NOTE: build attrs map for the new element, so we can perform fast lookups\n const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));\n let validCandidates = 0;\n //NOTE: remove bottommost candidates, until Noah's Ark condition will not be met\n for (let i = 0; i < candidates.length; i++) {\n const candidate = candidates[i];\n // We know that `candidate.attrs.length === neAttrs.length`\n if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {\n validCandidates += 1;\n if (validCandidates >= NOAH_ARK_CAPACITY) {\n this.entries.splice(candidate.idx, 1);\n }\n }\n }\n }\n //Mutations\n insertMarker() {\n this.entries.unshift(MARKER);\n }\n pushElement(element, token) {\n this._ensureNoahArkCondition(element);\n this.entries.unshift({\n type: EntryType.Element,\n element,\n token,\n });\n }\n insertElementAfterBookmark(element, token) {\n const bookmarkIdx = this.entries.indexOf(this.bookmark);\n this.entries.splice(bookmarkIdx, 0, {\n type: EntryType.Element,\n element,\n token,\n });\n }\n removeEntry(entry) {\n const entryIndex = this.entries.indexOf(entry);\n if (entryIndex !== -1) {\n this.entries.splice(entryIndex, 1);\n }\n }\n /**\n * Clears the list of formatting elements up to the last marker.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker\n */\n clearToLastMarker() {\n const markerIdx = this.entries.indexOf(MARKER);\n if (markerIdx === -1) {\n this.entries.length = 0;\n }\n else {\n this.entries.splice(0, markerIdx + 1);\n }\n }\n //Search\n getElementEntryInScopeWithTagName(tagName) {\n const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName);\n return entry && entry.type === EntryType.Element ? entry : null;\n }\n getElementEntry(element) {\n return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element);\n }\n}\n","import { DOCUMENT_MODE } from '../common/html.js';\nexport const defaultTreeAdapter = {\n //Node construction\n createDocument() {\n return {\n nodeName: '#document',\n mode: DOCUMENT_MODE.NO_QUIRKS,\n childNodes: [],\n };\n },\n createDocumentFragment() {\n return {\n nodeName: '#document-fragment',\n childNodes: [],\n };\n },\n createElement(tagName, namespaceURI, attrs) {\n return {\n nodeName: tagName,\n tagName,\n attrs,\n namespaceURI,\n childNodes: [],\n parentNode: null,\n };\n },\n createCommentNode(data) {\n return {\n nodeName: '#comment',\n data,\n parentNode: null,\n };\n },\n createTextNode(value) {\n return {\n nodeName: '#text',\n value,\n parentNode: null,\n };\n },\n //Tree mutation\n appendChild(parentNode, newNode) {\n parentNode.childNodes.push(newNode);\n newNode.parentNode = parentNode;\n },\n insertBefore(parentNode, newNode, referenceNode) {\n const insertionIdx = parentNode.childNodes.indexOf(referenceNode);\n parentNode.childNodes.splice(insertionIdx, 0, newNode);\n newNode.parentNode = parentNode;\n },\n setTemplateContent(templateElement, contentElement) {\n templateElement.content = contentElement;\n },\n getTemplateContent(templateElement) {\n return templateElement.content;\n },\n setDocumentType(document, name, publicId, systemId) {\n const doctypeNode = document.childNodes.find((node) => node.nodeName === '#documentType');\n if (doctypeNode) {\n doctypeNode.name = name;\n doctypeNode.publicId = publicId;\n doctypeNode.systemId = systemId;\n }\n else {\n const node = {\n nodeName: '#documentType',\n name,\n publicId,\n systemId,\n parentNode: null,\n };\n defaultTreeAdapter.appendChild(document, node);\n }\n },\n setDocumentMode(document, mode) {\n document.mode = mode;\n },\n getDocumentMode(document) {\n return document.mode;\n },\n detachNode(node) {\n if (node.parentNode) {\n const idx = node.parentNode.childNodes.indexOf(node);\n node.parentNode.childNodes.splice(idx, 1);\n node.parentNode = null;\n }\n },\n insertText(parentNode, text) {\n if (parentNode.childNodes.length > 0) {\n const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];\n if (defaultTreeAdapter.isTextNode(prevNode)) {\n prevNode.value += text;\n return;\n }\n }\n defaultTreeAdapter.appendChild(parentNode, defaultTreeAdapter.createTextNode(text));\n },\n insertTextBefore(parentNode, text, referenceNode) {\n const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];\n if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {\n prevNode.value += text;\n }\n else {\n defaultTreeAdapter.insertBefore(parentNode, defaultTreeAdapter.createTextNode(text), referenceNode);\n }\n },\n adoptAttributes(recipient, attrs) {\n const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));\n for (let j = 0; j < attrs.length; j++) {\n if (!recipientAttrsMap.has(attrs[j].name)) {\n recipient.attrs.push(attrs[j]);\n }\n }\n },\n //Tree traversing\n getFirstChild(node) {\n return node.childNodes[0];\n },\n getChildNodes(node) {\n return node.childNodes;\n },\n getParentNode(node) {\n return node.parentNode;\n },\n getAttrList(element) {\n return element.attrs;\n },\n //Node data\n getTagName(element) {\n return element.tagName;\n },\n getNamespaceURI(element) {\n return element.namespaceURI;\n },\n getTextNodeContent(textNode) {\n return textNode.value;\n },\n getCommentNodeContent(commentNode) {\n return commentNode.data;\n },\n getDocumentTypeNodeName(doctypeNode) {\n return doctypeNode.name;\n },\n getDocumentTypeNodePublicId(doctypeNode) {\n return doctypeNode.publicId;\n },\n getDocumentTypeNodeSystemId(doctypeNode) {\n return doctypeNode.systemId;\n },\n //Node types\n isTextNode(node) {\n return node.nodeName === '#text';\n },\n isCommentNode(node) {\n return node.nodeName === '#comment';\n },\n isDocumentTypeNode(node) {\n return node.nodeName === '#documentType';\n },\n isElementNode(node) {\n return Object.prototype.hasOwnProperty.call(node, 'tagName');\n },\n // Source code location\n setNodeSourceCodeLocation(node, location) {\n node.sourceCodeLocation = location;\n },\n getNodeSourceCodeLocation(node) {\n return node.sourceCodeLocation;\n },\n updateNodeSourceCodeLocation(node, endLocation) {\n node.sourceCodeLocation = { ...node.sourceCodeLocation, ...endLocation };\n },\n};\n","import { DOCUMENT_MODE } from './html.js';\n//Const\nconst VALID_DOCTYPE_NAME = 'html';\nconst VALID_SYSTEM_ID = 'about:legacy-compat';\nconst QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd';\nconst QUIRKS_MODE_PUBLIC_ID_PREFIXES = [\n '+//silmaril//dtd html pro v0r11 19970101//',\n '-//as//dtd html 3.0 aswedit + extensions//',\n '-//advasoft ltd//dtd html 3.0 aswedit + extensions//',\n '-//ietf//dtd html 2.0 level 1//',\n '-//ietf//dtd html 2.0 level 2//',\n '-//ietf//dtd html 2.0 strict level 1//',\n '-//ietf//dtd html 2.0 strict level 2//',\n '-//ietf//dtd html 2.0 strict//',\n '-//ietf//dtd html 2.0//',\n '-//ietf//dtd html 2.1e//',\n '-//ietf//dtd html 3.0//',\n '-//ietf//dtd html 3.2 final//',\n '-//ietf//dtd html 3.2//',\n '-//ietf//dtd html 3//',\n '-//ietf//dtd html level 0//',\n '-//ietf//dtd html level 1//',\n '-//ietf//dtd html level 2//',\n '-//ietf//dtd html level 3//',\n '-//ietf//dtd html strict level 0//',\n '-//ietf//dtd html strict level 1//',\n '-//ietf//dtd html strict level 2//',\n '-//ietf//dtd html strict level 3//',\n '-//ietf//dtd html strict//',\n '-//ietf//dtd html//',\n '-//metrius//dtd metrius presentational//',\n '-//microsoft//dtd internet explorer 2.0 html strict//',\n '-//microsoft//dtd internet explorer 2.0 html//',\n '-//microsoft//dtd internet explorer 2.0 tables//',\n '-//microsoft//dtd internet explorer 3.0 html strict//',\n '-//microsoft//dtd internet explorer 3.0 html//',\n '-//microsoft//dtd internet explorer 3.0 tables//',\n '-//netscape comm. corp.//dtd html//',\n '-//netscape comm. corp.//dtd strict html//',\n \"-//o'reilly and associates//dtd html 2.0//\",\n \"-//o'reilly and associates//dtd html extended 1.0//\",\n \"-//o'reilly and associates//dtd html extended relaxed 1.0//\",\n '-//sq//dtd html 2.0 hotmetal + extensions//',\n '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//',\n '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//',\n '-//spyglass//dtd html 2.0 extended//',\n '-//sun microsystems corp.//dtd hotjava html//',\n '-//sun microsystems corp.//dtd hotjava strict html//',\n '-//w3c//dtd html 3 1995-03-24//',\n '-//w3c//dtd html 3.2 draft//',\n '-//w3c//dtd html 3.2 final//',\n '-//w3c//dtd html 3.2//',\n '-//w3c//dtd html 3.2s draft//',\n '-//w3c//dtd html 4.0 frameset//',\n '-//w3c//dtd html 4.0 transitional//',\n '-//w3c//dtd html experimental 19960712//',\n '-//w3c//dtd html experimental 970421//',\n '-//w3c//dtd w3 html//',\n '-//w3o//dtd w3 html 3.0//',\n '-//webtechs//dtd mozilla html 2.0//',\n '-//webtechs//dtd mozilla html//',\n];\nconst QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...QUIRKS_MODE_PUBLIC_ID_PREFIXES,\n '-//w3c//dtd html 4.01 frameset//',\n '-//w3c//dtd html 4.01 transitional//',\n];\nconst QUIRKS_MODE_PUBLIC_IDS = new Set([\n '-//w3o//dtd w3 html strict 3.0//en//',\n '-/w3c/dtd html 4.0 transitional/en',\n 'html',\n]);\nconst LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//'];\nconst LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,\n '-//w3c//dtd html 4.01 frameset//',\n '-//w3c//dtd html 4.01 transitional//',\n];\n//Utils\nfunction hasPrefix(publicId, prefixes) {\n return prefixes.some((prefix) => publicId.startsWith(prefix));\n}\n//API\nexport function isConforming(token) {\n return (token.name === VALID_DOCTYPE_NAME &&\n token.publicId === null &&\n (token.systemId === null || token.systemId === VALID_SYSTEM_ID));\n}\nexport function getDocumentMode(token) {\n if (token.name !== VALID_DOCTYPE_NAME) {\n return DOCUMENT_MODE.QUIRKS;\n }\n const { systemId } = token;\n if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {\n return DOCUMENT_MODE.QUIRKS;\n }\n let { publicId } = token;\n if (publicId !== null) {\n publicId = publicId.toLowerCase();\n if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) {\n return DOCUMENT_MODE.QUIRKS;\n }\n let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) {\n return DOCUMENT_MODE.QUIRKS;\n }\n prefixes =\n systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) {\n return DOCUMENT_MODE.LIMITED_QUIRKS;\n }\n }\n return DOCUMENT_MODE.NO_QUIRKS;\n}\n","import { TAG_ID as $, NS, ATTRS, getTagID } from './html.js';\n//MIME types\nconst MIME_TYPES = {\n TEXT_HTML: 'text/html',\n APPLICATION_XML: 'application/xhtml+xml',\n};\n//Attributes\nconst DEFINITION_URL_ATTR = 'definitionurl';\nconst ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL';\nconst SVG_ATTRS_ADJUSTMENT_MAP = new Map([\n 'attributeName',\n 'attributeType',\n 'baseFrequency',\n 'baseProfile',\n 'calcMode',\n 'clipPathUnits',\n 'diffuseConstant',\n 'edgeMode',\n 'filterUnits',\n 'glyphRef',\n 'gradientTransform',\n 'gradientUnits',\n 'kernelMatrix',\n 'kernelUnitLength',\n 'keyPoints',\n 'keySplines',\n 'keyTimes',\n 'lengthAdjust',\n 'limitingConeAngle',\n 'markerHeight',\n 'markerUnits',\n 'markerWidth',\n 'maskContentUnits',\n 'maskUnits',\n 'numOctaves',\n 'pathLength',\n 'patternContentUnits',\n 'patternTransform',\n 'patternUnits',\n 'pointsAtX',\n 'pointsAtY',\n 'pointsAtZ',\n 'preserveAlpha',\n 'preserveAspectRatio',\n 'primitiveUnits',\n 'refX',\n 'refY',\n 'repeatCount',\n 'repeatDur',\n 'requiredExtensions',\n 'requiredFeatures',\n 'specularConstant',\n 'specularExponent',\n 'spreadMethod',\n 'startOffset',\n 'stdDeviation',\n 'stitchTiles',\n 'surfaceScale',\n 'systemLanguage',\n 'tableValues',\n 'targetX',\n 'targetY',\n 'textLength',\n 'viewBox',\n 'viewTarget',\n 'xChannelSelector',\n 'yChannelSelector',\n 'zoomAndPan',\n].map((attr) => [attr.toLowerCase(), attr]));\nconst XML_ATTRS_ADJUSTMENT_MAP = new Map([\n ['xlink:actuate', { prefix: 'xlink', name: 'actuate', namespace: NS.XLINK }],\n ['xlink:arcrole', { prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK }],\n ['xlink:href', { prefix: 'xlink', name: 'href', namespace: NS.XLINK }],\n ['xlink:role', { prefix: 'xlink', name: 'role', namespace: NS.XLINK }],\n ['xlink:show', { prefix: 'xlink', name: 'show', namespace: NS.XLINK }],\n ['xlink:title', { prefix: 'xlink', name: 'title', namespace: NS.XLINK }],\n ['xlink:type', { prefix: 'xlink', name: 'type', namespace: NS.XLINK }],\n ['xml:lang', { prefix: 'xml', name: 'lang', namespace: NS.XML }],\n ['xml:space', { prefix: 'xml', name: 'space', namespace: NS.XML }],\n ['xmlns', { prefix: '', name: 'xmlns', namespace: NS.XMLNS }],\n ['xmlns:xlink', { prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS }],\n]);\n//SVG tag names adjustment map\nexport const SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([\n 'altGlyph',\n 'altGlyphDef',\n 'altGlyphItem',\n 'animateColor',\n 'animateMotion',\n 'animateTransform',\n 'clipPath',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'foreignObject',\n 'glyphRef',\n 'linearGradient',\n 'radialGradient',\n 'textPath',\n].map((tn) => [tn.toLowerCase(), tn]));\n//Tags that causes exit from foreign content\nconst EXITS_FOREIGN_CONTENT = new Set([\n $.B,\n $.BIG,\n $.BLOCKQUOTE,\n $.BODY,\n $.BR,\n $.CENTER,\n $.CODE,\n $.DD,\n $.DIV,\n $.DL,\n $.DT,\n $.EM,\n $.EMBED,\n $.H1,\n $.H2,\n $.H3,\n $.H4,\n $.H5,\n $.H6,\n $.HEAD,\n $.HR,\n $.I,\n $.IMG,\n $.LI,\n $.LISTING,\n $.MENU,\n $.META,\n $.NOBR,\n $.OL,\n $.P,\n $.PRE,\n $.RUBY,\n $.S,\n $.SMALL,\n $.SPAN,\n $.STRONG,\n $.STRIKE,\n $.SUB,\n $.SUP,\n $.TABLE,\n $.TT,\n $.U,\n $.UL,\n $.VAR,\n]);\n//Check exit from foreign content\nexport function causesExit(startTagToken) {\n const tn = startTagToken.tagID;\n const isFontWithAttrs = tn === $.FONT &&\n startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE);\n return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);\n}\n//Token adjustments\nexport function adjustTokenMathMLAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n if (token.attrs[i].name === DEFINITION_URL_ATTR) {\n token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;\n break;\n }\n }\n}\nexport function adjustTokenSVGAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n if (adjustedAttrName != null) {\n token.attrs[i].name = adjustedAttrName;\n }\n }\n}\nexport function adjustTokenXMLAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n if (adjustedAttrEntry) {\n token.attrs[i].prefix = adjustedAttrEntry.prefix;\n token.attrs[i].name = adjustedAttrEntry.name;\n token.attrs[i].namespace = adjustedAttrEntry.namespace;\n }\n }\n}\nexport function adjustTokenSVGTagName(token) {\n const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);\n if (adjustedTagName != null) {\n token.tagName = adjustedTagName;\n token.tagID = getTagID(token.tagName);\n }\n}\n//Integration points\nfunction isMathMLTextIntegrationPoint(tn, ns) {\n return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT);\n}\nfunction isHtmlIntegrationPoint(tn, ns, attrs) {\n if (ns === NS.MATHML && tn === $.ANNOTATION_XML) {\n for (let i = 0; i < attrs.length; i++) {\n if (attrs[i].name === ATTRS.ENCODING) {\n const value = attrs[i].value.toLowerCase();\n return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;\n }\n }\n }\n return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE);\n}\nexport function isIntegrationPoint(tn, ns, attrs, foreignNS) {\n return (((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) ||\n ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)));\n}\n","import { Tokenizer, TokenizerMode } from '../tokenizer/index.js';\nimport { OpenElementStack } from './open-element-stack.js';\nimport { FormattingElementList, EntryType } from './formatting-element-list.js';\nimport { defaultTreeAdapter } from '../tree-adapters/default.js';\nimport * as doctype from '../common/doctype.js';\nimport * as foreignContent from '../common/foreign-content.js';\nimport { ERR } from '../common/error-codes.js';\nimport * as unicode from '../common/unicode.js';\nimport { TAG_ID as $, TAG_NAMES as TN, NS, ATTRS, SPECIAL_ELEMENTS, DOCUMENT_MODE, NUMBERED_HEADERS, getTagID, } from '../common/html.js';\nimport { TokenType, getTokenAttr, } from '../common/token.js';\n//Misc constants\nconst HIDDEN_INPUT_TYPE = 'hidden';\n//Adoption agency loops iteration count\nconst AA_OUTER_LOOP_ITER = 8;\nconst AA_INNER_LOOP_ITER = 3;\n//Insertion modes\nvar InsertionMode;\n(function (InsertionMode) {\n InsertionMode[InsertionMode[\"INITIAL\"] = 0] = \"INITIAL\";\n InsertionMode[InsertionMode[\"BEFORE_HTML\"] = 1] = \"BEFORE_HTML\";\n InsertionMode[InsertionMode[\"BEFORE_HEAD\"] = 2] = \"BEFORE_HEAD\";\n InsertionMode[InsertionMode[\"IN_HEAD\"] = 3] = \"IN_HEAD\";\n InsertionMode[InsertionMode[\"IN_HEAD_NO_SCRIPT\"] = 4] = \"IN_HEAD_NO_SCRIPT\";\n InsertionMode[InsertionMode[\"AFTER_HEAD\"] = 5] = \"AFTER_HEAD\";\n InsertionMode[InsertionMode[\"IN_BODY\"] = 6] = \"IN_BODY\";\n InsertionMode[InsertionMode[\"TEXT\"] = 7] = \"TEXT\";\n InsertionMode[InsertionMode[\"IN_TABLE\"] = 8] = \"IN_TABLE\";\n InsertionMode[InsertionMode[\"IN_TABLE_TEXT\"] = 9] = \"IN_TABLE_TEXT\";\n InsertionMode[InsertionMode[\"IN_CAPTION\"] = 10] = \"IN_CAPTION\";\n InsertionMode[InsertionMode[\"IN_COLUMN_GROUP\"] = 11] = \"IN_COLUMN_GROUP\";\n InsertionMode[InsertionMode[\"IN_TABLE_BODY\"] = 12] = \"IN_TABLE_BODY\";\n InsertionMode[InsertionMode[\"IN_ROW\"] = 13] = \"IN_ROW\";\n InsertionMode[InsertionMode[\"IN_CELL\"] = 14] = \"IN_CELL\";\n InsertionMode[InsertionMode[\"IN_SELECT\"] = 15] = \"IN_SELECT\";\n InsertionMode[InsertionMode[\"IN_SELECT_IN_TABLE\"] = 16] = \"IN_SELECT_IN_TABLE\";\n InsertionMode[InsertionMode[\"IN_TEMPLATE\"] = 17] = \"IN_TEMPLATE\";\n InsertionMode[InsertionMode[\"AFTER_BODY\"] = 18] = \"AFTER_BODY\";\n InsertionMode[InsertionMode[\"IN_FRAMESET\"] = 19] = \"IN_FRAMESET\";\n InsertionMode[InsertionMode[\"AFTER_FRAMESET\"] = 20] = \"AFTER_FRAMESET\";\n InsertionMode[InsertionMode[\"AFTER_AFTER_BODY\"] = 21] = \"AFTER_AFTER_BODY\";\n InsertionMode[InsertionMode[\"AFTER_AFTER_FRAMESET\"] = 22] = \"AFTER_AFTER_FRAMESET\";\n})(InsertionMode || (InsertionMode = {}));\nconst BASE_LOC = {\n startLine: -1,\n startCol: -1,\n startOffset: -1,\n endLine: -1,\n endCol: -1,\n endOffset: -1,\n};\nconst TABLE_STRUCTURE_TAGS = new Set([$.TABLE, $.TBODY, $.TFOOT, $.THEAD, $.TR]);\nconst defaultParserOptions = {\n scriptingEnabled: true,\n sourceCodeLocationInfo: false,\n treeAdapter: defaultTreeAdapter,\n onParseError: null,\n};\n//Parser\nexport class Parser {\n constructor(options, document, \n /** @internal */\n fragmentContext = null, \n /** @internal */\n scriptHandler = null) {\n this.fragmentContext = fragmentContext;\n this.scriptHandler = scriptHandler;\n this.currentToken = null;\n this.stopped = false;\n /** @internal */\n this.insertionMode = InsertionMode.INITIAL;\n /** @internal */\n this.originalInsertionMode = InsertionMode.INITIAL;\n /** @internal */\n this.headElement = null;\n /** @internal */\n this.formElement = null;\n /** Indicates that the current node is not an element in the HTML namespace */\n this.currentNotInHTML = false;\n /**\n * The template insertion mode stack is maintained from the left.\n * Ie. the topmost element will always have index 0.\n *\n * @internal\n */\n this.tmplInsertionModeStack = [];\n /** @internal */\n this.pendingCharacterTokens = [];\n /** @internal */\n this.hasNonWhitespacePendingCharacterToken = false;\n /** @internal */\n this.framesetOk = true;\n /** @internal */\n this.skipNextNewLine = false;\n /** @internal */\n this.fosterParentingEnabled = false;\n this.options = {\n ...defaultParserOptions,\n ...options,\n };\n this.treeAdapter = this.options.treeAdapter;\n this.onParseError = this.options.onParseError;\n // Always enable location info if we report parse errors.\n if (this.onParseError) {\n this.options.sourceCodeLocationInfo = true;\n }\n this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();\n this.tokenizer = new Tokenizer(this.options, this);\n this.activeFormattingElements = new FormattingElementList(this.treeAdapter);\n this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : $.UNKNOWN;\n this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID);\n this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);\n }\n // API\n static parse(html, options) {\n const parser = new this(options);\n parser.tokenizer.write(html, true);\n return parser.document;\n }\n static getFragmentParser(fragmentContext, options) {\n const opts = {\n ...defaultParserOptions,\n ...options,\n };\n //NOTE: use a <template> element as the fragment context if no context element was provided,\n //so we will parse in a \"forgiving\" manner\n fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : (fragmentContext = opts.treeAdapter.createElement(TN.TEMPLATE, NS.HTML, []));\n //NOTE: create a fake element which will be used as the `document` for fragment parsing.\n //This is important for jsdom, where a new `document` cannot be created. This led to\n //fragment parsing messing with the main `document`.\n const documentMock = opts.treeAdapter.createElement('documentmock', NS.HTML, []);\n const parser = new this(opts, documentMock, fragmentContext);\n if (parser.fragmentContextID === $.TEMPLATE) {\n parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);\n }\n parser._initTokenizerForFragmentParsing();\n parser._insertFakeRootElement();\n parser._resetInsertionMode();\n parser._findFormInFragmentContext();\n return parser;\n }\n getFragment() {\n const rootElement = this.treeAdapter.getFirstChild(this.document);\n const fragment = this.treeAdapter.createDocumentFragment();\n this._adoptNodes(rootElement, fragment);\n return fragment;\n }\n //Errors\n /** @internal */\n _err(token, code, beforeToken) {\n var _a;\n if (!this.onParseError)\n return;\n const loc = (_a = token.location) !== null && _a !== void 0 ? _a : BASE_LOC;\n const err = {\n code,\n startLine: loc.startLine,\n startCol: loc.startCol,\n startOffset: loc.startOffset,\n endLine: beforeToken ? loc.startLine : loc.endLine,\n endCol: beforeToken ? loc.startCol : loc.endCol,\n endOffset: beforeToken ? loc.startOffset : loc.endOffset,\n };\n this.onParseError(err);\n }\n //Stack events\n /** @internal */\n onItemPush(node, tid, isTop) {\n var _a, _b;\n (_b = (_a = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a, node);\n if (isTop && this.openElements.stackTop > 0)\n this._setContextModes(node, tid);\n }\n /** @internal */\n onItemPop(node, isTop) {\n var _a, _b;\n if (this.options.sourceCodeLocationInfo) {\n this._setEndLocation(node, this.currentToken);\n }\n (_b = (_a = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a, node, this.openElements.current);\n if (isTop) {\n let current;\n let currentTagId;\n if (this.openElements.stackTop === 0 && this.fragmentContext) {\n current = this.fragmentContext;\n currentTagId = this.fragmentContextID;\n }\n else {\n ({ current, currentTagId } = this.openElements);\n }\n this._setContextModes(current, currentTagId);\n }\n }\n _setContextModes(current, tid) {\n const isHTML = current === this.document || (current && this.treeAdapter.getNamespaceURI(current) === NS.HTML);\n this.currentNotInHTML = !isHTML;\n this.tokenizer.inForeignNode =\n !isHTML && current !== undefined && tid !== undefined && !this._isIntegrationPoint(tid, current);\n }\n /** @protected */\n _switchToTextParsing(currentToken, nextTokenizerState) {\n this._insertElement(currentToken, NS.HTML);\n this.tokenizer.state = nextTokenizerState;\n this.originalInsertionMode = this.insertionMode;\n this.insertionMode = InsertionMode.TEXT;\n }\n switchToPlaintextParsing() {\n this.insertionMode = InsertionMode.TEXT;\n this.originalInsertionMode = InsertionMode.IN_BODY;\n this.tokenizer.state = TokenizerMode.PLAINTEXT;\n }\n //Fragment parsing\n /** @protected */\n _getAdjustedCurrentElement() {\n return this.openElements.stackTop === 0 && this.fragmentContext\n ? this.fragmentContext\n : this.openElements.current;\n }\n /** @protected */\n _findFormInFragmentContext() {\n let node = this.fragmentContext;\n while (node) {\n if (this.treeAdapter.getTagName(node) === TN.FORM) {\n this.formElement = node;\n break;\n }\n node = this.treeAdapter.getParentNode(node);\n }\n }\n _initTokenizerForFragmentParsing() {\n if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) {\n return;\n }\n switch (this.fragmentContextID) {\n case $.TITLE:\n case $.TEXTAREA: {\n this.tokenizer.state = TokenizerMode.RCDATA;\n break;\n }\n case $.STYLE:\n case $.XMP:\n case $.IFRAME:\n case $.NOEMBED:\n case $.NOFRAMES:\n case $.NOSCRIPT: {\n this.tokenizer.state = TokenizerMode.RAWTEXT;\n break;\n }\n case $.SCRIPT: {\n this.tokenizer.state = TokenizerMode.SCRIPT_DATA;\n break;\n }\n case $.PLAINTEXT: {\n this.tokenizer.state = TokenizerMode.PLAINTEXT;\n break;\n }\n default:\n // Do nothing\n }\n }\n //Tree mutation\n /** @protected */\n _setDocumentType(token) {\n const name = token.name || '';\n const publicId = token.publicId || '';\n const systemId = token.systemId || '';\n this.treeAdapter.setDocumentType(this.document, name, publicId, systemId);\n if (token.location) {\n const documentChildren = this.treeAdapter.getChildNodes(this.document);\n const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node));\n if (docTypeNode) {\n this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location);\n }\n }\n }\n /** @protected */\n _attachElementToTree(element, location) {\n if (this.options.sourceCodeLocationInfo) {\n const loc = location && {\n ...location,\n startTag: location,\n };\n this.treeAdapter.setNodeSourceCodeLocation(element, loc);\n }\n if (this._shouldFosterParentOnInsertion()) {\n this._fosterParentElement(element);\n }\n else {\n const parent = this.openElements.currentTmplContentOrNode;\n this.treeAdapter.appendChild(parent !== null && parent !== void 0 ? parent : this.document, element);\n }\n }\n /**\n * For self-closing tags. Add an element to the tree, but skip adding it\n * to the stack.\n */\n /** @protected */\n _appendElement(token, namespaceURI) {\n const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);\n this._attachElementToTree(element, token.location);\n }\n /** @protected */\n _insertElement(token, namespaceURI) {\n const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);\n this._attachElementToTree(element, token.location);\n this.openElements.push(element, token.tagID);\n }\n /** @protected */\n _insertFakeElement(tagName, tagID) {\n const element = this.treeAdapter.createElement(tagName, NS.HTML, []);\n this._attachElementToTree(element, null);\n this.openElements.push(element, tagID);\n }\n /** @protected */\n _insertTemplate(token) {\n const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);\n const content = this.treeAdapter.createDocumentFragment();\n this.treeAdapter.setTemplateContent(tmpl, content);\n this._attachElementToTree(tmpl, token.location);\n this.openElements.push(tmpl, token.tagID);\n if (this.options.sourceCodeLocationInfo)\n this.treeAdapter.setNodeSourceCodeLocation(content, null);\n }\n /** @protected */\n _insertFakeRootElement() {\n const element = this.treeAdapter.createElement(TN.HTML, NS.HTML, []);\n if (this.options.sourceCodeLocationInfo)\n this.treeAdapter.setNodeSourceCodeLocation(element, null);\n this.treeAdapter.appendChild(this.openElements.current, element);\n this.openElements.push(element, $.HTML);\n }\n /** @protected */\n _appendCommentNode(token, parent) {\n const commentNode = this.treeAdapter.createCommentNode(token.data);\n this.treeAdapter.appendChild(parent, commentNode);\n if (this.options.sourceCodeLocationInfo) {\n this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location);\n }\n }\n /** @protected */\n _insertCharacters(token) {\n let parent;\n let beforeElement;\n if (this._shouldFosterParentOnInsertion()) {\n ({ parent, beforeElement } = this._findFosterParentingLocation());\n if (beforeElement) {\n this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement);\n }\n else {\n this.treeAdapter.insertText(parent, token.chars);\n }\n }\n else {\n parent = this.openElements.currentTmplContentOrNode;\n this.treeAdapter.insertText(parent, token.chars);\n }\n if (!token.location)\n return;\n const siblings = this.treeAdapter.getChildNodes(parent);\n const textNodeIdx = beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length;\n const textNode = siblings[textNodeIdx - 1];\n //NOTE: if we have a location assigned by another token, then just update the end position\n const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode);\n if (tnLoc) {\n const { endLine, endCol, endOffset } = token.location;\n this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset });\n }\n else if (this.options.sourceCodeLocationInfo) {\n this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location);\n }\n }\n /** @protected */\n _adoptNodes(donor, recipient) {\n for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) {\n this.treeAdapter.detachNode(child);\n this.treeAdapter.appendChild(recipient, child);\n }\n }\n /** @protected */\n _setEndLocation(element, closingToken) {\n if (this.treeAdapter.getNodeSourceCodeLocation(element) && closingToken.location) {\n const ctLoc = closingToken.location;\n const tn = this.treeAdapter.getTagName(element);\n const endLoc = \n // NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing\n // tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.\n closingToken.type === TokenType.END_TAG && tn === closingToken.tagName\n ? {\n endTag: { ...ctLoc },\n endLine: ctLoc.endLine,\n endCol: ctLoc.endCol,\n endOffset: ctLoc.endOffset,\n }\n : {\n endLine: ctLoc.startLine,\n endCol: ctLoc.startCol,\n endOffset: ctLoc.startOffset,\n };\n this.treeAdapter.updateNodeSourceCodeLocation(element, endLoc);\n }\n }\n //Token processing\n shouldProcessStartTagTokenInForeignContent(token) {\n // Check that neither current === document, or ns === NS.HTML\n if (!this.currentNotInHTML)\n return false;\n let current;\n let currentTagId;\n if (this.openElements.stackTop === 0 && this.fragmentContext) {\n current = this.fragmentContext;\n currentTagId = this.fragmentContextID;\n }\n else {\n ({ current, currentTagId } = this.openElements);\n }\n if (token.tagID === $.SVG &&\n this.treeAdapter.getTagName(current) === TN.ANNOTATION_XML &&\n this.treeAdapter.getNamespaceURI(current) === NS.MATHML) {\n return false;\n }\n return (\n // Check that `current` is not an integration point for HTML or MathML elements.\n this.tokenizer.inForeignNode ||\n // If it _is_ an integration point, then we might have to check that it is not an HTML\n // integration point.\n ((token.tagID === $.MGLYPH || token.tagID === $.MALIGNMARK) &&\n currentTagId !== undefined &&\n !this._isIntegrationPoint(currentTagId, current, NS.HTML)));\n }\n /** @protected */\n _processToken(token) {\n switch (token.type) {\n case TokenType.CHARACTER: {\n this.onCharacter(token);\n break;\n }\n case TokenType.NULL_CHARACTER: {\n this.onNullCharacter(token);\n break;\n }\n case TokenType.COMMENT: {\n this.onComment(token);\n break;\n }\n case TokenType.DOCTYPE: {\n this.onDoctype(token);\n break;\n }\n case TokenType.START_TAG: {\n this._processStartTag(token);\n break;\n }\n case TokenType.END_TAG: {\n this.onEndTag(token);\n break;\n }\n case TokenType.EOF: {\n this.onEof(token);\n break;\n }\n case TokenType.WHITESPACE_CHARACTER: {\n this.onWhitespaceCharacter(token);\n break;\n }\n }\n }\n //Integration points\n /** @protected */\n _isIntegrationPoint(tid, element, foreignNS) {\n const ns = this.treeAdapter.getNamespaceURI(element);\n const attrs = this.treeAdapter.getAttrList(element);\n return foreignContent.isIntegrationPoint(tid, ns, attrs, foreignNS);\n }\n //Active formatting elements reconstruction\n /** @protected */\n _reconstructActiveFormattingElements() {\n const listLength = this.activeFormattingElements.entries.length;\n if (listLength) {\n const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element));\n const unopenIdx = endIndex === -1 ? listLength - 1 : endIndex - 1;\n for (let i = unopenIdx; i >= 0; i--) {\n const entry = this.activeFormattingElements.entries[i];\n this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));\n entry.element = this.openElements.current;\n }\n }\n }\n //Close elements\n /** @protected */\n _closeTableCell() {\n this.openElements.generateImpliedEndTags();\n this.openElements.popUntilTableCellPopped();\n this.activeFormattingElements.clearToLastMarker();\n this.insertionMode = InsertionMode.IN_ROW;\n }\n /** @protected */\n _closePElement() {\n this.openElements.generateImpliedEndTagsWithExclusion($.P);\n this.openElements.popUntilTagNamePopped($.P);\n }\n //Insertion modes\n /** @protected */\n _resetInsertionMode() {\n for (let i = this.openElements.stackTop; i >= 0; i--) {\n //Insertion mode reset map\n switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {\n case $.TR: {\n this.insertionMode = InsertionMode.IN_ROW;\n return;\n }\n case $.TBODY:\n case $.THEAD:\n case $.TFOOT: {\n this.insertionMode = InsertionMode.IN_TABLE_BODY;\n return;\n }\n case $.CAPTION: {\n this.insertionMode = InsertionMode.IN_CAPTION;\n return;\n }\n case $.COLGROUP: {\n this.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n return;\n }\n case $.TABLE: {\n this.insertionMode = InsertionMode.IN_TABLE;\n return;\n }\n case $.BODY: {\n this.insertionMode = InsertionMode.IN_BODY;\n return;\n }\n case $.FRAMESET: {\n this.insertionMode = InsertionMode.IN_FRAMESET;\n return;\n }\n case $.SELECT: {\n this._resetInsertionModeForSelect(i);\n return;\n }\n case $.TEMPLATE: {\n this.insertionMode = this.tmplInsertionModeStack[0];\n return;\n }\n case $.HTML: {\n this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD;\n return;\n }\n case $.TD:\n case $.TH: {\n if (i > 0) {\n this.insertionMode = InsertionMode.IN_CELL;\n return;\n }\n break;\n }\n case $.HEAD: {\n if (i > 0) {\n this.insertionMode = InsertionMode.IN_HEAD;\n return;\n }\n break;\n }\n }\n }\n this.insertionMode = InsertionMode.IN_BODY;\n }\n /** @protected */\n _resetInsertionModeForSelect(selectIdx) {\n if (selectIdx > 0) {\n for (let i = selectIdx - 1; i > 0; i--) {\n const tn = this.openElements.tagIDs[i];\n if (tn === $.TEMPLATE) {\n break;\n }\n else if (tn === $.TABLE) {\n this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;\n return;\n }\n }\n }\n this.insertionMode = InsertionMode.IN_SELECT;\n }\n //Foster parenting\n /** @protected */\n _isElementCausesFosterParenting(tn) {\n return TABLE_STRUCTURE_TAGS.has(tn);\n }\n /** @protected */\n _shouldFosterParentOnInsertion() {\n return (this.fosterParentingEnabled &&\n this.openElements.currentTagId !== undefined &&\n this._isElementCausesFosterParenting(this.openElements.currentTagId));\n }\n /** @protected */\n _findFosterParentingLocation() {\n for (let i = this.openElements.stackTop; i >= 0; i--) {\n const openElement = this.openElements.items[i];\n switch (this.openElements.tagIDs[i]) {\n case $.TEMPLATE: {\n if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) {\n return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null };\n }\n break;\n }\n case $.TABLE: {\n const parent = this.treeAdapter.getParentNode(openElement);\n if (parent) {\n return { parent, beforeElement: openElement };\n }\n return { parent: this.openElements.items[i - 1], beforeElement: null };\n }\n default:\n // Do nothing\n }\n }\n return { parent: this.openElements.items[0], beforeElement: null };\n }\n /** @protected */\n _fosterParentElement(element) {\n const location = this._findFosterParentingLocation();\n if (location.beforeElement) {\n this.treeAdapter.insertBefore(location.parent, element, location.beforeElement);\n }\n else {\n this.treeAdapter.appendChild(location.parent, element);\n }\n }\n //Special elements\n /** @protected */\n _isSpecialElement(element, id) {\n const ns = this.treeAdapter.getNamespaceURI(element);\n return SPECIAL_ELEMENTS[ns].has(id);\n }\n /** @internal */\n onCharacter(token) {\n this.skipNextNewLine = false;\n if (this.tokenizer.inForeignNode) {\n characterInForeignContent(this, token);\n return;\n }\n switch (this.insertionMode) {\n case InsertionMode.INITIAL: {\n tokenInInitialMode(this, token);\n break;\n }\n case InsertionMode.BEFORE_HTML: {\n tokenBeforeHtml(this, token);\n break;\n }\n case InsertionMode.BEFORE_HEAD: {\n tokenBeforeHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD: {\n tokenInHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD_NO_SCRIPT: {\n tokenInHeadNoScript(this, token);\n break;\n }\n case InsertionMode.AFTER_HEAD: {\n tokenAfterHead(this, token);\n break;\n }\n case InsertionMode.IN_BODY:\n case InsertionMode.IN_CAPTION:\n case InsertionMode.IN_CELL:\n case InsertionMode.IN_TEMPLATE: {\n characterInBody(this, token);\n break;\n }\n case InsertionMode.TEXT:\n case InsertionMode.IN_SELECT:\n case InsertionMode.IN_SELECT_IN_TABLE: {\n this._insertCharacters(token);\n break;\n }\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW: {\n characterInTable(this, token);\n break;\n }\n case InsertionMode.IN_TABLE_TEXT: {\n characterInTableText(this, token);\n break;\n }\n case InsertionMode.IN_COLUMN_GROUP: {\n tokenInColumnGroup(this, token);\n break;\n }\n case InsertionMode.AFTER_BODY: {\n tokenAfterBody(this, token);\n break;\n }\n case InsertionMode.AFTER_AFTER_BODY: {\n tokenAfterAfterBody(this, token);\n break;\n }\n default:\n // Do nothing\n }\n }\n /** @internal */\n onNullCharacter(token) {\n this.skipNextNewLine = false;\n if (this.tokenizer.inForeignNode) {\n nullCharacterInForeignContent(this, token);\n return;\n }\n switch (this.insertionMode) {\n case InsertionMode.INITIAL: {\n tokenInInitialMode(this, token);\n break;\n }\n case InsertionMode.BEFORE_HTML: {\n tokenBeforeHtml(this, token);\n break;\n }\n case InsertionMode.BEFORE_HEAD: {\n tokenBeforeHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD: {\n tokenInHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD_NO_SCRIPT: {\n tokenInHeadNoScript(this, token);\n break;\n }\n case InsertionMode.AFTER_HEAD: {\n tokenAfterHead(this, token);\n break;\n }\n case InsertionMode.TEXT: {\n this._insertCharacters(token);\n break;\n }\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW: {\n characterInTable(this, token);\n break;\n }\n case InsertionMode.IN_COLUMN_GROUP: {\n tokenInColumnGroup(this, token);\n break;\n }\n case InsertionMode.AFTER_BODY: {\n tokenAfterBody(this, token);\n break;\n }\n case InsertionMode.AFTER_AFTER_BODY: {\n tokenAfterAfterBody(this, token);\n break;\n }\n default:\n // Do nothing\n }\n }\n /** @internal */\n onComment(token) {\n this.skipNextNewLine = false;\n if (this.currentNotInHTML) {\n appendComment(this, token);\n return;\n }\n switch (this.insertionMode) {\n case InsertionMode.INITIAL:\n case InsertionMode.BEFORE_HTML:\n case InsertionMode.BEFORE_HEAD:\n case InsertionMode.IN_HEAD:\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n case InsertionMode.AFTER_HEAD:\n case InsertionMode.IN_BODY:\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_CAPTION:\n case InsertionMode.IN_COLUMN_GROUP:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW:\n case InsertionMode.IN_CELL:\n case InsertionMode.IN_SELECT:\n case InsertionMode.IN_SELECT_IN_TABLE:\n case InsertionMode.IN_TEMPLATE:\n case InsertionMode.IN_FRAMESET:\n case InsertionMode.AFTER_FRAMESET: {\n appendComment(this, token);\n break;\n }\n case InsertionMode.IN_TABLE_TEXT: {\n tokenInTableText(this, token);\n break;\n }\n case InsertionMode.AFTER_BODY: {\n appendCommentToRootHtmlElement(this, token);\n break;\n }\n case InsertionMode.AFTER_AFTER_BODY:\n case InsertionMode.AFTER_AFTER_FRAMESET: {\n appendCommentToDocument(this, token);\n break;\n }\n default:\n // Do nothing\n }\n }\n /** @internal */\n onDoctype(token) {\n this.skipNextNewLine = false;\n switch (this.insertionMode) {\n case InsertionMode.INITIAL: {\n doctypeInInitialMode(this, token);\n break;\n }\n case InsertionMode.BEFORE_HEAD:\n case InsertionMode.IN_HEAD:\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n case InsertionMode.AFTER_HEAD: {\n this._err(token, ERR.misplacedDoctype);\n break;\n }\n case InsertionMode.IN_TABLE_TEXT: {\n tokenInTableText(this, token);\n break;\n }\n default:\n // Do nothing\n }\n }\n /** @internal */\n onStartTag(token) {\n this.skipNextNewLine = false;\n this.currentToken = token;\n this._processStartTag(token);\n if (token.selfClosing && !token.ackSelfClosing) {\n this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus);\n }\n }\n /**\n * Processes a given start tag.\n *\n * `onStartTag` checks if a self-closing tag was recognized. When a token\n * is moved inbetween multiple insertion modes, this check for self-closing\n * could lead to false positives. To avoid this, `_processStartTag` is used\n * for nested calls.\n *\n * @param token The token to process.\n * @protected\n */\n _processStartTag(token) {\n if (this.shouldProcessStartTagTokenInForeignContent(token)) {\n startTagInForeignContent(this, token);\n }\n else {\n this._startTagOutsideForeignContent(token);\n }\n }\n /** @protected */\n _startTagOutsideForeignContent(token) {\n switch (this.insertionMode) {\n case InsertionMode.INITIAL: {\n tokenInInitialMode(this, token);\n break;\n }\n case InsertionMode.BEFORE_HTML: {\n startTagBeforeHtml(this, token);\n break;\n }\n case InsertionMode.BEFORE_HEAD: {\n startTagBeforeHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD: {\n startTagInHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD_NO_SCRIPT: {\n startTagInHeadNoScript(this, token);\n break;\n }\n case InsertionMode.AFTER_HEAD: {\n startTagAfterHead(this, token);\n break;\n }\n case InsertionMode.IN_BODY: {\n startTagInBody(this, token);\n break;\n }\n case InsertionMode.IN_TABLE: {\n startTagInTable(this, token);\n break;\n }\n case InsertionMode.IN_TABLE_TEXT: {\n tokenInTableText(this, token);\n break;\n }\n case InsertionMode.IN_CAPTION: {\n startTagInCaption(this, token);\n break;\n }\n case InsertionMode.IN_COLUMN_GROUP: {\n startTagInColumnGroup(this, token);\n break;\n }\n case InsertionMode.IN_TABLE_BODY: {\n startTagInTableBody(this, token);\n break;\n }\n case InsertionMode.IN_ROW: {\n startTagInRow(this, token);\n break;\n }\n case InsertionMode.IN_CELL: {\n startTagInCell(this, token);\n break;\n }\n case InsertionMode.IN_SELECT: {\n startTagInSelect(this, token);\n break;\n }\n case InsertionMode.IN_SELECT_IN_TABLE: {\n startTagInSelectInTable(this, token);\n break;\n }\n case InsertionMode.IN_TEMPLATE: {\n startTagInTemplate(this, token);\n break;\n }\n case InsertionMode.AFTER_BODY: {\n startTagAfterBody(this, token);\n break;\n }\n case InsertionMode.IN_FRAMESET: {\n startTagInFrameset(this, token);\n break;\n }\n case InsertionMode.AFTER_FRAMESET: {\n startTagAfterFrameset(this, token);\n break;\n }\n case InsertionMode.AFTER_AFTER_BODY: {\n startTagAfterAfterBody(this, token);\n break;\n }\n case InsertionMode.AFTER_AFTER_FRAMESET: {\n startTagAfterAfterFrameset(this, token);\n break;\n }\n default:\n // Do nothing\n }\n }\n /** @internal */\n onEndTag(token) {\n this.skipNextNewLine = false;\n this.currentToken = token;\n if (this.currentNotInHTML) {\n endTagInForeignContent(this, token);\n }\n else {\n this._endTagOutsideForeignContent(token);\n }\n }\n /** @protected */\n _endTagOutsideForeignContent(token) {\n switch (this.insertionMode) {\n case InsertionMode.INITIAL: {\n tokenInInitialMode(this, token);\n break;\n }\n case InsertionMode.BEFORE_HTML: {\n endTagBeforeHtml(this, token);\n break;\n }\n case InsertionMode.BEFORE_HEAD: {\n endTagBeforeHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD: {\n endTagInHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD_NO_SCRIPT: {\n endTagInHeadNoScript(this, token);\n break;\n }\n case InsertionMode.AFTER_HEAD: {\n endTagAfterHead(this, token);\n break;\n }\n case InsertionMode.IN_BODY: {\n endTagInBody(this, token);\n break;\n }\n case InsertionMode.TEXT: {\n endTagInText(this, token);\n break;\n }\n case InsertionMode.IN_TABLE: {\n endTagInTable(this, token);\n break;\n }\n case InsertionMode.IN_TABLE_TEXT: {\n tokenInTableText(this, token);\n break;\n }\n case InsertionMode.IN_CAPTION: {\n endTagInCaption(this, token);\n break;\n }\n case InsertionMode.IN_COLUMN_GROUP: {\n endTagInColumnGroup(this, token);\n break;\n }\n case InsertionMode.IN_TABLE_BODY: {\n endTagInTableBody(this, token);\n break;\n }\n case InsertionMode.IN_ROW: {\n endTagInRow(this, token);\n break;\n }\n case InsertionMode.IN_CELL: {\n endTagInCell(this, token);\n break;\n }\n case InsertionMode.IN_SELECT: {\n endTagInSelect(this, token);\n break;\n }\n case InsertionMode.IN_SELECT_IN_TABLE: {\n endTagInSelectInTable(this, token);\n break;\n }\n case InsertionMode.IN_TEMPLATE: {\n endTagInTemplate(this, token);\n break;\n }\n case InsertionMode.AFTER_BODY: {\n endTagAfterBody(this, token);\n break;\n }\n case InsertionMode.IN_FRAMESET: {\n endTagInFrameset(this, token);\n break;\n }\n case InsertionMode.AFTER_FRAMESET: {\n endTagAfterFrameset(this, token);\n break;\n }\n case InsertionMode.AFTER_AFTER_BODY: {\n tokenAfterAfterBody(this, token);\n break;\n }\n default:\n // Do nothing\n }\n }\n /** @internal */\n onEof(token) {\n switch (this.insertionMode) {\n case InsertionMode.INITIAL: {\n tokenInInitialMode(this, token);\n break;\n }\n case InsertionMode.BEFORE_HTML: {\n tokenBeforeHtml(this, token);\n break;\n }\n case InsertionMode.BEFORE_HEAD: {\n tokenBeforeHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD: {\n tokenInHead(this, token);\n break;\n }\n case InsertionMode.IN_HEAD_NO_SCRIPT: {\n tokenInHeadNoScript(this, token);\n break;\n }\n case InsertionMode.AFTER_HEAD: {\n tokenAfterHead(this, token);\n break;\n }\n case InsertionMode.IN_BODY:\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_CAPTION:\n case InsertionMode.IN_COLUMN_GROUP:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW:\n case InsertionMode.IN_CELL:\n case InsertionMode.IN_SELECT:\n case InsertionMode.IN_SELECT_IN_TABLE: {\n eofInBody(this, token);\n break;\n }\n case InsertionMode.TEXT: {\n eofInText(this, token);\n break;\n }\n case InsertionMode.IN_TABLE_TEXT: {\n tokenInTableText(this, token);\n break;\n }\n case InsertionMode.IN_TEMPLATE: {\n eofInTemplate(this, token);\n break;\n }\n case InsertionMode.AFTER_BODY:\n case InsertionMode.IN_FRAMESET:\n case InsertionMode.AFTER_FRAMESET:\n case InsertionMode.AFTER_AFTER_BODY:\n case InsertionMode.AFTER_AFTER_FRAMESET: {\n stopParsing(this, token);\n break;\n }\n default:\n // Do nothing\n }\n }\n /** @internal */\n onWhitespaceCharacter(token) {\n if (this.skipNextNewLine) {\n this.skipNextNewLine = false;\n if (token.chars.charCodeAt(0) === unicode.CODE_POINTS.LINE_FEED) {\n if (token.chars.length === 1) {\n return;\n }\n token.chars = token.chars.substr(1);\n }\n }\n if (this.tokenizer.inForeignNode) {\n this._insertCharacters(token);\n return;\n }\n switch (this.insertionMode) {\n case InsertionMode.IN_HEAD:\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n case InsertionMode.AFTER_HEAD:\n case InsertionMode.TEXT:\n case InsertionMode.IN_COLUMN_GROUP:\n case InsertionMode.IN_SELECT:\n case InsertionMode.IN_SELECT_IN_TABLE:\n case InsertionMode.IN_FRAMESET:\n case InsertionMode.AFTER_FRAMESET: {\n this._insertCharacters(token);\n break;\n }\n case InsertionMode.IN_BODY:\n case InsertionMode.IN_CAPTION:\n case InsertionMode.IN_CELL:\n case InsertionMode.IN_TEMPLATE:\n case InsertionMode.AFTER_BODY:\n case InsertionMode.AFTER_AFTER_BODY:\n case InsertionMode.AFTER_AFTER_FRAMESET: {\n whitespaceCharacterInBody(this, token);\n break;\n }\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW: {\n characterInTable(this, token);\n break;\n }\n case InsertionMode.IN_TABLE_TEXT: {\n whitespaceCharacterInTableText(this, token);\n break;\n }\n default:\n // Do nothing\n }\n }\n}\n//Adoption agency algorithm\n//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adoptionAgency)\n//------------------------------------------------------------------\n//Steps 5-8 of the algorithm\nfunction aaObtainFormattingElementEntry(p, token) {\n let formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);\n if (formattingElementEntry) {\n if (!p.openElements.contains(formattingElementEntry.element)) {\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n formattingElementEntry = null;\n }\n else if (!p.openElements.hasInScope(token.tagID)) {\n formattingElementEntry = null;\n }\n }\n else {\n genericEndTagInBody(p, token);\n }\n return formattingElementEntry;\n}\n//Steps 9 and 10 of the algorithm\nfunction aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n let idx = p.openElements.stackTop;\n for (; idx >= 0; idx--) {\n const element = p.openElements.items[idx];\n if (element === formattingElementEntry.element) {\n break;\n }\n if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) {\n furthestBlock = element;\n }\n }\n if (!furthestBlock) {\n p.openElements.shortenToLength(Math.max(idx, 0));\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n return furthestBlock;\n}\n//Step 13 of the algorithm\nfunction aaInnerLoop(p, furthestBlock, formattingElement) {\n let lastElement = furthestBlock;\n let nextElement = p.openElements.getCommonAncestor(furthestBlock);\n for (let i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) {\n //NOTE: store the next element for the next loop iteration (it may be deleted from the stack by step 9.5)\n nextElement = p.openElements.getCommonAncestor(element);\n const elementEntry = p.activeFormattingElements.getElementEntry(element);\n const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;\n const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;\n if (shouldRemoveFromOpenElements) {\n if (counterOverflow) {\n p.activeFormattingElements.removeEntry(elementEntry);\n }\n p.openElements.remove(element);\n }\n else {\n element = aaRecreateElementFromEntry(p, elementEntry);\n if (lastElement === furthestBlock) {\n p.activeFormattingElements.bookmark = elementEntry;\n }\n p.treeAdapter.detachNode(lastElement);\n p.treeAdapter.appendChild(element, lastElement);\n lastElement = element;\n }\n }\n return lastElement;\n}\n//Step 13.7 of the algorithm\nfunction aaRecreateElementFromEntry(p, elementEntry) {\n const ns = p.treeAdapter.getNamespaceURI(elementEntry.element);\n const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);\n p.openElements.replace(elementEntry.element, newElement);\n elementEntry.element = newElement;\n return newElement;\n}\n//Step 14 of the algorithm\nfunction aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {\n const tn = p.treeAdapter.getTagName(commonAncestor);\n const tid = getTagID(tn);\n if (p._isElementCausesFosterParenting(tid)) {\n p._fosterParentElement(lastElement);\n }\n else {\n const ns = p.treeAdapter.getNamespaceURI(commonAncestor);\n if (tid === $.TEMPLATE && ns === NS.HTML) {\n commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor);\n }\n p.treeAdapter.appendChild(commonAncestor, lastElement);\n }\n}\n//Steps 15-19 of the algorithm\nfunction aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {\n const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);\n const { token } = formattingElementEntry;\n const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);\n p._adoptNodes(furthestBlock, newElement);\n p.treeAdapter.appendChild(furthestBlock, newElement);\n p.activeFormattingElements.insertElementAfterBookmark(newElement, token);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n p.openElements.remove(formattingElementEntry.element);\n p.openElements.insertAfter(furthestBlock, newElement, token.tagID);\n}\n//Algorithm entry point\nfunction callAdoptionAgency(p, token) {\n for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) {\n const formattingElementEntry = aaObtainFormattingElementEntry(p, token);\n if (!formattingElementEntry) {\n break;\n }\n const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);\n if (!furthestBlock) {\n break;\n }\n p.activeFormattingElements.bookmark = formattingElementEntry;\n const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element);\n const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);\n p.treeAdapter.detachNode(lastElement);\n if (commonAncestor)\n aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement);\n aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry);\n }\n}\n//Generic token handlers\n//------------------------------------------------------------------\nfunction appendComment(p, token) {\n p._appendCommentNode(token, p.openElements.currentTmplContentOrNode);\n}\nfunction appendCommentToRootHtmlElement(p, token) {\n p._appendCommentNode(token, p.openElements.items[0]);\n}\nfunction appendCommentToDocument(p, token) {\n p._appendCommentNode(token, p.document);\n}\nfunction stopParsing(p, token) {\n p.stopped = true;\n // NOTE: Set end locations for elements that remain on the open element stack.\n if (token.location) {\n // NOTE: If we are not in a fragment, `html` and `body` will stay on the stack.\n // This is a problem, as we might overwrite their end position here.\n const target = p.fragmentContext ? 0 : 2;\n for (let i = p.openElements.stackTop; i >= target; i--) {\n p._setEndLocation(p.openElements.items[i], token);\n }\n // Handle `html` and `body`\n if (!p.fragmentContext && p.openElements.stackTop >= 0) {\n const htmlElement = p.openElements.items[0];\n const htmlLocation = p.treeAdapter.getNodeSourceCodeLocation(htmlElement);\n if (htmlLocation && !htmlLocation.endTag) {\n p._setEndLocation(htmlElement, token);\n if (p.openElements.stackTop >= 1) {\n const bodyElement = p.openElements.items[1];\n const bodyLocation = p.treeAdapter.getNodeSourceCodeLocation(bodyElement);\n if (bodyLocation && !bodyLocation.endTag) {\n p._setEndLocation(bodyElement, token);\n }\n }\n }\n }\n }\n}\n// The \"initial\" insertion mode\n//------------------------------------------------------------------\nfunction doctypeInInitialMode(p, token) {\n p._setDocumentType(token);\n const mode = token.forceQuirks ? DOCUMENT_MODE.QUIRKS : doctype.getDocumentMode(token);\n if (!doctype.isConforming(token)) {\n p._err(token, ERR.nonConformingDoctype);\n }\n p.treeAdapter.setDocumentMode(p.document, mode);\n p.insertionMode = InsertionMode.BEFORE_HTML;\n}\nfunction tokenInInitialMode(p, token) {\n p._err(token, ERR.missingDoctype, true);\n p.treeAdapter.setDocumentMode(p.document, DOCUMENT_MODE.QUIRKS);\n p.insertionMode = InsertionMode.BEFORE_HTML;\n p._processToken(token);\n}\n// The \"before html\" insertion mode\n//------------------------------------------------------------------\nfunction startTagBeforeHtml(p, token) {\n if (token.tagID === $.HTML) {\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.BEFORE_HEAD;\n }\n else {\n tokenBeforeHtml(p, token);\n }\n}\nfunction endTagBeforeHtml(p, token) {\n const tn = token.tagID;\n if (tn === $.HTML || tn === $.HEAD || tn === $.BODY || tn === $.BR) {\n tokenBeforeHtml(p, token);\n }\n}\nfunction tokenBeforeHtml(p, token) {\n p._insertFakeRootElement();\n p.insertionMode = InsertionMode.BEFORE_HEAD;\n p._processToken(token);\n}\n// The \"before head\" insertion mode\n//------------------------------------------------------------------\nfunction startTagBeforeHead(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.HEAD: {\n p._insertElement(token, NS.HTML);\n p.headElement = p.openElements.current;\n p.insertionMode = InsertionMode.IN_HEAD;\n break;\n }\n default: {\n tokenBeforeHead(p, token);\n }\n }\n}\nfunction endTagBeforeHead(p, token) {\n const tn = token.tagID;\n if (tn === $.HEAD || tn === $.BODY || tn === $.HTML || tn === $.BR) {\n tokenBeforeHead(p, token);\n }\n else {\n p._err(token, ERR.endTagWithoutMatchingOpenElement);\n }\n}\nfunction tokenBeforeHead(p, token) {\n p._insertFakeElement(TN.HEAD, $.HEAD);\n p.headElement = p.openElements.current;\n p.insertionMode = InsertionMode.IN_HEAD;\n p._processToken(token);\n}\n// The \"in head\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInHead(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.BASE:\n case $.BASEFONT:\n case $.BGSOUND:\n case $.LINK:\n case $.META: {\n p._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n break;\n }\n case $.TITLE: {\n p._switchToTextParsing(token, TokenizerMode.RCDATA);\n break;\n }\n case $.NOSCRIPT: {\n if (p.options.scriptingEnabled) {\n p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n }\n else {\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT;\n }\n break;\n }\n case $.NOFRAMES:\n case $.STYLE: {\n p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n break;\n }\n case $.SCRIPT: {\n p._switchToTextParsing(token, TokenizerMode.SCRIPT_DATA);\n break;\n }\n case $.TEMPLATE: {\n p._insertTemplate(token);\n p.activeFormattingElements.insertMarker();\n p.framesetOk = false;\n p.insertionMode = InsertionMode.IN_TEMPLATE;\n p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);\n break;\n }\n case $.HEAD: {\n p._err(token, ERR.misplacedStartTagForHeadElement);\n break;\n }\n default: {\n tokenInHead(p, token);\n }\n }\n}\nfunction endTagInHead(p, token) {\n switch (token.tagID) {\n case $.HEAD: {\n p.openElements.pop();\n p.insertionMode = InsertionMode.AFTER_HEAD;\n break;\n }\n case $.BODY:\n case $.BR:\n case $.HTML: {\n tokenInHead(p, token);\n break;\n }\n case $.TEMPLATE: {\n templateEndTagInHead(p, token);\n break;\n }\n default: {\n p._err(token, ERR.endTagWithoutMatchingOpenElement);\n }\n }\n}\nfunction templateEndTagInHead(p, token) {\n if (p.openElements.tmplCount > 0) {\n p.openElements.generateImpliedEndTagsThoroughly();\n if (p.openElements.currentTagId !== $.TEMPLATE) {\n p._err(token, ERR.closingOfElementWithOpenChildElements);\n }\n p.openElements.popUntilTagNamePopped($.TEMPLATE);\n p.activeFormattingElements.clearToLastMarker();\n p.tmplInsertionModeStack.shift();\n p._resetInsertionMode();\n }\n else {\n p._err(token, ERR.endTagWithoutMatchingOpenElement);\n }\n}\nfunction tokenInHead(p, token) {\n p.openElements.pop();\n p.insertionMode = InsertionMode.AFTER_HEAD;\n p._processToken(token);\n}\n// The \"in head no script\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInHeadNoScript(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.BASEFONT:\n case $.BGSOUND:\n case $.HEAD:\n case $.LINK:\n case $.META:\n case $.NOFRAMES:\n case $.STYLE: {\n startTagInHead(p, token);\n break;\n }\n case $.NOSCRIPT: {\n p._err(token, ERR.nestedNoscriptInHead);\n break;\n }\n default: {\n tokenInHeadNoScript(p, token);\n }\n }\n}\nfunction endTagInHeadNoScript(p, token) {\n switch (token.tagID) {\n case $.NOSCRIPT: {\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_HEAD;\n break;\n }\n case $.BR: {\n tokenInHeadNoScript(p, token);\n break;\n }\n default: {\n p._err(token, ERR.endTagWithoutMatchingOpenElement);\n }\n }\n}\nfunction tokenInHeadNoScript(p, token) {\n const errCode = token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead;\n p._err(token, errCode);\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_HEAD;\n p._processToken(token);\n}\n// The \"after head\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterHead(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.BODY: {\n p._insertElement(token, NS.HTML);\n p.framesetOk = false;\n p.insertionMode = InsertionMode.IN_BODY;\n break;\n }\n case $.FRAMESET: {\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.IN_FRAMESET;\n break;\n }\n case $.BASE:\n case $.BASEFONT:\n case $.BGSOUND:\n case $.LINK:\n case $.META:\n case $.NOFRAMES:\n case $.SCRIPT:\n case $.STYLE:\n case $.TEMPLATE:\n case $.TITLE: {\n p._err(token, ERR.abandonedHeadElementChild);\n p.openElements.push(p.headElement, $.HEAD);\n startTagInHead(p, token);\n p.openElements.remove(p.headElement);\n break;\n }\n case $.HEAD: {\n p._err(token, ERR.misplacedStartTagForHeadElement);\n break;\n }\n default: {\n tokenAfterHead(p, token);\n }\n }\n}\nfunction endTagAfterHead(p, token) {\n switch (token.tagID) {\n case $.BODY:\n case $.HTML:\n case $.BR: {\n tokenAfterHead(p, token);\n break;\n }\n case $.TEMPLATE: {\n templateEndTagInHead(p, token);\n break;\n }\n default: {\n p._err(token, ERR.endTagWithoutMatchingOpenElement);\n }\n }\n}\nfunction tokenAfterHead(p, token) {\n p._insertFakeElement(TN.BODY, $.BODY);\n p.insertionMode = InsertionMode.IN_BODY;\n modeInBody(p, token);\n}\n// The \"in body\" insertion mode\n//------------------------------------------------------------------\nfunction modeInBody(p, token) {\n switch (token.type) {\n case TokenType.CHARACTER: {\n characterInBody(p, token);\n break;\n }\n case TokenType.WHITESPACE_CHARACTER: {\n whitespaceCharacterInBody(p, token);\n break;\n }\n case TokenType.COMMENT: {\n appendComment(p, token);\n break;\n }\n case TokenType.START_TAG: {\n startTagInBody(p, token);\n break;\n }\n case TokenType.END_TAG: {\n endTagInBody(p, token);\n break;\n }\n case TokenType.EOF: {\n eofInBody(p, token);\n break;\n }\n default:\n // Do nothing\n }\n}\nfunction whitespaceCharacterInBody(p, token) {\n p._reconstructActiveFormattingElements();\n p._insertCharacters(token);\n}\nfunction characterInBody(p, token) {\n p._reconstructActiveFormattingElements();\n p._insertCharacters(token);\n p.framesetOk = false;\n}\nfunction htmlStartTagInBody(p, token) {\n if (p.openElements.tmplCount === 0) {\n p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs);\n }\n}\nfunction bodyStartTagInBody(p, token) {\n const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();\n if (bodyElement && p.openElements.tmplCount === 0) {\n p.framesetOk = false;\n p.treeAdapter.adoptAttributes(bodyElement, token.attrs);\n }\n}\nfunction framesetStartTagInBody(p, token) {\n const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();\n if (p.framesetOk && bodyElement) {\n p.treeAdapter.detachNode(bodyElement);\n p.openElements.popAllUpToHtmlElement();\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.IN_FRAMESET;\n }\n}\nfunction addressStartTagInBody(p, token) {\n if (p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n p._insertElement(token, NS.HTML);\n}\nfunction numberedHeaderStartTagInBody(p, token) {\n if (p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n if (p.openElements.currentTagId !== undefined && NUMBERED_HEADERS.has(p.openElements.currentTagId)) {\n p.openElements.pop();\n }\n p._insertElement(token, NS.HTML);\n}\nfunction preStartTagInBody(p, token) {\n if (p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n p._insertElement(token, NS.HTML);\n //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move\n //on to the next one. (Newlines at the start of pre blocks are ignored as an authoring convenience.)\n p.skipNextNewLine = true;\n p.framesetOk = false;\n}\nfunction formStartTagInBody(p, token) {\n const inTemplate = p.openElements.tmplCount > 0;\n if (!p.formElement || inTemplate) {\n if (p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n p._insertElement(token, NS.HTML);\n if (!inTemplate) {\n p.formElement = p.openElements.current;\n }\n }\n}\nfunction listItemStartTagInBody(p, token) {\n p.framesetOk = false;\n const tn = token.tagID;\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const elementId = p.openElements.tagIDs[i];\n if ((tn === $.LI && elementId === $.LI) ||\n ((tn === $.DD || tn === $.DT) && (elementId === $.DD || elementId === $.DT))) {\n p.openElements.generateImpliedEndTagsWithExclusion(elementId);\n p.openElements.popUntilTagNamePopped(elementId);\n break;\n }\n if (elementId !== $.ADDRESS &&\n elementId !== $.DIV &&\n elementId !== $.P &&\n p._isSpecialElement(p.openElements.items[i], elementId)) {\n break;\n }\n }\n if (p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n p._insertElement(token, NS.HTML);\n}\nfunction plaintextStartTagInBody(p, token) {\n if (p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n p._insertElement(token, NS.HTML);\n p.tokenizer.state = TokenizerMode.PLAINTEXT;\n}\nfunction buttonStartTagInBody(p, token) {\n if (p.openElements.hasInScope($.BUTTON)) {\n p.openElements.generateImpliedEndTags();\n p.openElements.popUntilTagNamePopped($.BUTTON);\n }\n p._reconstructActiveFormattingElements();\n p._insertElement(token, NS.HTML);\n p.framesetOk = false;\n}\nfunction aStartTagInBody(p, token) {\n const activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(TN.A);\n if (activeElementEntry) {\n callAdoptionAgency(p, token);\n p.openElements.remove(activeElementEntry.element);\n p.activeFormattingElements.removeEntry(activeElementEntry);\n }\n p._reconstructActiveFormattingElements();\n p._insertElement(token, NS.HTML);\n p.activeFormattingElements.pushElement(p.openElements.current, token);\n}\nfunction bStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n p._insertElement(token, NS.HTML);\n p.activeFormattingElements.pushElement(p.openElements.current, token);\n}\nfunction nobrStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n if (p.openElements.hasInScope($.NOBR)) {\n callAdoptionAgency(p, token);\n p._reconstructActiveFormattingElements();\n }\n p._insertElement(token, NS.HTML);\n p.activeFormattingElements.pushElement(p.openElements.current, token);\n}\nfunction appletStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n p._insertElement(token, NS.HTML);\n p.activeFormattingElements.insertMarker();\n p.framesetOk = false;\n}\nfunction tableStartTagInBody(p, token) {\n if (p.treeAdapter.getDocumentMode(p.document) !== DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n p._insertElement(token, NS.HTML);\n p.framesetOk = false;\n p.insertionMode = InsertionMode.IN_TABLE;\n}\nfunction areaStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n p._appendElement(token, NS.HTML);\n p.framesetOk = false;\n token.ackSelfClosing = true;\n}\nfunction isHiddenInput(token) {\n const inputType = getTokenAttr(token, ATTRS.TYPE);\n return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE;\n}\nfunction inputStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n p._appendElement(token, NS.HTML);\n if (!isHiddenInput(token)) {\n p.framesetOk = false;\n }\n token.ackSelfClosing = true;\n}\nfunction paramStartTagInBody(p, token) {\n p._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n}\nfunction hrStartTagInBody(p, token) {\n if (p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n p._appendElement(token, NS.HTML);\n p.framesetOk = false;\n token.ackSelfClosing = true;\n}\nfunction imageStartTagInBody(p, token) {\n token.tagName = TN.IMG;\n token.tagID = $.IMG;\n areaStartTagInBody(p, token);\n}\nfunction textareaStartTagInBody(p, token) {\n p._insertElement(token, NS.HTML);\n //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move\n //on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)\n p.skipNextNewLine = true;\n p.tokenizer.state = TokenizerMode.RCDATA;\n p.originalInsertionMode = p.insertionMode;\n p.framesetOk = false;\n p.insertionMode = InsertionMode.TEXT;\n}\nfunction xmpStartTagInBody(p, token) {\n if (p.openElements.hasInButtonScope($.P)) {\n p._closePElement();\n }\n p._reconstructActiveFormattingElements();\n p.framesetOk = false;\n p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n}\nfunction iframeStartTagInBody(p, token) {\n p.framesetOk = false;\n p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n}\n//NOTE: here we assume that we always act as a user agent with enabled plugins/frames, so we parse\n//<noembed>/<noframes> as rawtext.\nfunction rawTextStartTagInBody(p, token) {\n p._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n}\nfunction selectStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n p._insertElement(token, NS.HTML);\n p.framesetOk = false;\n p.insertionMode =\n p.insertionMode === InsertionMode.IN_TABLE ||\n p.insertionMode === InsertionMode.IN_CAPTION ||\n p.insertionMode === InsertionMode.IN_TABLE_BODY ||\n p.insertionMode === InsertionMode.IN_ROW ||\n p.insertionMode === InsertionMode.IN_CELL\n ? InsertionMode.IN_SELECT_IN_TABLE\n : InsertionMode.IN_SELECT;\n}\nfunction optgroupStartTagInBody(p, token) {\n if (p.openElements.currentTagId === $.OPTION) {\n p.openElements.pop();\n }\n p._reconstructActiveFormattingElements();\n p._insertElement(token, NS.HTML);\n}\nfunction rbStartTagInBody(p, token) {\n if (p.openElements.hasInScope($.RUBY)) {\n p.openElements.generateImpliedEndTags();\n }\n p._insertElement(token, NS.HTML);\n}\nfunction rtStartTagInBody(p, token) {\n if (p.openElements.hasInScope($.RUBY)) {\n p.openElements.generateImpliedEndTagsWithExclusion($.RTC);\n }\n p._insertElement(token, NS.HTML);\n}\nfunction mathStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n foreignContent.adjustTokenMathMLAttrs(token);\n foreignContent.adjustTokenXMLAttrs(token);\n if (token.selfClosing) {\n p._appendElement(token, NS.MATHML);\n }\n else {\n p._insertElement(token, NS.MATHML);\n }\n token.ackSelfClosing = true;\n}\nfunction svgStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n foreignContent.adjustTokenSVGAttrs(token);\n foreignContent.adjustTokenXMLAttrs(token);\n if (token.selfClosing) {\n p._appendElement(token, NS.SVG);\n }\n else {\n p._insertElement(token, NS.SVG);\n }\n token.ackSelfClosing = true;\n}\nfunction genericStartTagInBody(p, token) {\n p._reconstructActiveFormattingElements();\n p._insertElement(token, NS.HTML);\n}\nfunction startTagInBody(p, token) {\n switch (token.tagID) {\n case $.I:\n case $.S:\n case $.B:\n case $.U:\n case $.EM:\n case $.TT:\n case $.BIG:\n case $.CODE:\n case $.FONT:\n case $.SMALL:\n case $.STRIKE:\n case $.STRONG: {\n bStartTagInBody(p, token);\n break;\n }\n case $.A: {\n aStartTagInBody(p, token);\n break;\n }\n case $.H1:\n case $.H2:\n case $.H3:\n case $.H4:\n case $.H5:\n case $.H6: {\n numberedHeaderStartTagInBody(p, token);\n break;\n }\n case $.P:\n case $.DL:\n case $.OL:\n case $.UL:\n case $.DIV:\n case $.DIR:\n case $.NAV:\n case $.MAIN:\n case $.MENU:\n case $.ASIDE:\n case $.CENTER:\n case $.FIGURE:\n case $.FOOTER:\n case $.HEADER:\n case $.HGROUP:\n case $.DIALOG:\n case $.DETAILS:\n case $.ADDRESS:\n case $.ARTICLE:\n case $.SEARCH:\n case $.SECTION:\n case $.SUMMARY:\n case $.FIELDSET:\n case $.BLOCKQUOTE:\n case $.FIGCAPTION: {\n addressStartTagInBody(p, token);\n break;\n }\n case $.LI:\n case $.DD:\n case $.DT: {\n listItemStartTagInBody(p, token);\n break;\n }\n case $.BR:\n case $.IMG:\n case $.WBR:\n case $.AREA:\n case $.EMBED:\n case $.KEYGEN: {\n areaStartTagInBody(p, token);\n break;\n }\n case $.HR: {\n hrStartTagInBody(p, token);\n break;\n }\n case $.RB:\n case $.RTC: {\n rbStartTagInBody(p, token);\n break;\n }\n case $.RT:\n case $.RP: {\n rtStartTagInBody(p, token);\n break;\n }\n case $.PRE:\n case $.LISTING: {\n preStartTagInBody(p, token);\n break;\n }\n case $.XMP: {\n xmpStartTagInBody(p, token);\n break;\n }\n case $.SVG: {\n svgStartTagInBody(p, token);\n break;\n }\n case $.HTML: {\n htmlStartTagInBody(p, token);\n break;\n }\n case $.BASE:\n case $.LINK:\n case $.META:\n case $.STYLE:\n case $.TITLE:\n case $.SCRIPT:\n case $.BGSOUND:\n case $.BASEFONT:\n case $.TEMPLATE: {\n startTagInHead(p, token);\n break;\n }\n case $.BODY: {\n bodyStartTagInBody(p, token);\n break;\n }\n case $.FORM: {\n formStartTagInBody(p, token);\n break;\n }\n case $.NOBR: {\n nobrStartTagInBody(p, token);\n break;\n }\n case $.MATH: {\n mathStartTagInBody(p, token);\n break;\n }\n case $.TABLE: {\n tableStartTagInBody(p, token);\n break;\n }\n case $.INPUT: {\n inputStartTagInBody(p, token);\n break;\n }\n case $.PARAM:\n case $.TRACK:\n case $.SOURCE: {\n paramStartTagInBody(p, token);\n break;\n }\n case $.IMAGE: {\n imageStartTagInBody(p, token);\n break;\n }\n case $.BUTTON: {\n buttonStartTagInBody(p, token);\n break;\n }\n case $.APPLET:\n case $.OBJECT:\n case $.MARQUEE: {\n appletStartTagInBody(p, token);\n break;\n }\n case $.IFRAME: {\n iframeStartTagInBody(p, token);\n break;\n }\n case $.SELECT: {\n selectStartTagInBody(p, token);\n break;\n }\n case $.OPTION:\n case $.OPTGROUP: {\n optgroupStartTagInBody(p, token);\n break;\n }\n case $.NOEMBED:\n case $.NOFRAMES: {\n rawTextStartTagInBody(p, token);\n break;\n }\n case $.FRAMESET: {\n framesetStartTagInBody(p, token);\n break;\n }\n case $.TEXTAREA: {\n textareaStartTagInBody(p, token);\n break;\n }\n case $.NOSCRIPT: {\n if (p.options.scriptingEnabled) {\n rawTextStartTagInBody(p, token);\n }\n else {\n genericStartTagInBody(p, token);\n }\n break;\n }\n case $.PLAINTEXT: {\n plaintextStartTagInBody(p, token);\n break;\n }\n case $.COL:\n case $.TH:\n case $.TD:\n case $.TR:\n case $.HEAD:\n case $.FRAME:\n case $.TBODY:\n case $.TFOOT:\n case $.THEAD:\n case $.CAPTION:\n case $.COLGROUP: {\n // Ignore token\n break;\n }\n default: {\n genericStartTagInBody(p, token);\n }\n }\n}\nfunction bodyEndTagInBody(p, token) {\n if (p.openElements.hasInScope($.BODY)) {\n p.insertionMode = InsertionMode.AFTER_BODY;\n //NOTE: <body> is never popped from the stack, so we need to updated\n //the end location explicitly.\n if (p.options.sourceCodeLocationInfo) {\n const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();\n if (bodyElement) {\n p._setEndLocation(bodyElement, token);\n }\n }\n }\n}\nfunction htmlEndTagInBody(p, token) {\n if (p.openElements.hasInScope($.BODY)) {\n p.insertionMode = InsertionMode.AFTER_BODY;\n endTagAfterBody(p, token);\n }\n}\nfunction addressEndTagInBody(p, token) {\n const tn = token.tagID;\n if (p.openElements.hasInScope(tn)) {\n p.openElements.generateImpliedEndTags();\n p.openElements.popUntilTagNamePopped(tn);\n }\n}\nfunction formEndTagInBody(p) {\n const inTemplate = p.openElements.tmplCount > 0;\n const { formElement } = p;\n if (!inTemplate) {\n p.formElement = null;\n }\n if ((formElement || inTemplate) && p.openElements.hasInScope($.FORM)) {\n p.openElements.generateImpliedEndTags();\n if (inTemplate) {\n p.openElements.popUntilTagNamePopped($.FORM);\n }\n else if (formElement) {\n p.openElements.remove(formElement);\n }\n }\n}\nfunction pEndTagInBody(p) {\n if (!p.openElements.hasInButtonScope($.P)) {\n p._insertFakeElement(TN.P, $.P);\n }\n p._closePElement();\n}\nfunction liEndTagInBody(p) {\n if (p.openElements.hasInListItemScope($.LI)) {\n p.openElements.generateImpliedEndTagsWithExclusion($.LI);\n p.openElements.popUntilTagNamePopped($.LI);\n }\n}\nfunction ddEndTagInBody(p, token) {\n const tn = token.tagID;\n if (p.openElements.hasInScope(tn)) {\n p.openElements.generateImpliedEndTagsWithExclusion(tn);\n p.openElements.popUntilTagNamePopped(tn);\n }\n}\nfunction numberedHeaderEndTagInBody(p) {\n if (p.openElements.hasNumberedHeaderInScope()) {\n p.openElements.generateImpliedEndTags();\n p.openElements.popUntilNumberedHeaderPopped();\n }\n}\nfunction appletEndTagInBody(p, token) {\n const tn = token.tagID;\n if (p.openElements.hasInScope(tn)) {\n p.openElements.generateImpliedEndTags();\n p.openElements.popUntilTagNamePopped(tn);\n p.activeFormattingElements.clearToLastMarker();\n }\n}\nfunction brEndTagInBody(p) {\n p._reconstructActiveFormattingElements();\n p._insertFakeElement(TN.BR, $.BR);\n p.openElements.pop();\n p.framesetOk = false;\n}\nfunction genericEndTagInBody(p, token) {\n const tn = token.tagName;\n const tid = token.tagID;\n for (let i = p.openElements.stackTop; i > 0; i--) {\n const element = p.openElements.items[i];\n const elementId = p.openElements.tagIDs[i];\n // Compare the tag name here, as the tag might not be a known tag with an ID.\n if (tid === elementId && (tid !== $.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) {\n p.openElements.generateImpliedEndTagsWithExclusion(tid);\n if (p.openElements.stackTop >= i)\n p.openElements.shortenToLength(i);\n break;\n }\n if (p._isSpecialElement(element, elementId)) {\n break;\n }\n }\n}\nfunction endTagInBody(p, token) {\n switch (token.tagID) {\n case $.A:\n case $.B:\n case $.I:\n case $.S:\n case $.U:\n case $.EM:\n case $.TT:\n case $.BIG:\n case $.CODE:\n case $.FONT:\n case $.NOBR:\n case $.SMALL:\n case $.STRIKE:\n case $.STRONG: {\n callAdoptionAgency(p, token);\n break;\n }\n case $.P: {\n pEndTagInBody(p);\n break;\n }\n case $.DL:\n case $.UL:\n case $.OL:\n case $.DIR:\n case $.DIV:\n case $.NAV:\n case $.PRE:\n case $.MAIN:\n case $.MENU:\n case $.ASIDE:\n case $.BUTTON:\n case $.CENTER:\n case $.FIGURE:\n case $.FOOTER:\n case $.HEADER:\n case $.HGROUP:\n case $.DIALOG:\n case $.ADDRESS:\n case $.ARTICLE:\n case $.DETAILS:\n case $.SEARCH:\n case $.SECTION:\n case $.SUMMARY:\n case $.LISTING:\n case $.FIELDSET:\n case $.BLOCKQUOTE:\n case $.FIGCAPTION: {\n addressEndTagInBody(p, token);\n break;\n }\n case $.LI: {\n liEndTagInBody(p);\n break;\n }\n case $.DD:\n case $.DT: {\n ddEndTagInBody(p, token);\n break;\n }\n case $.H1:\n case $.H2:\n case $.H3:\n case $.H4:\n case $.H5:\n case $.H6: {\n numberedHeaderEndTagInBody(p);\n break;\n }\n case $.BR: {\n brEndTagInBody(p);\n break;\n }\n case $.BODY: {\n bodyEndTagInBody(p, token);\n break;\n }\n case $.HTML: {\n htmlEndTagInBody(p, token);\n break;\n }\n case $.FORM: {\n formEndTagInBody(p);\n break;\n }\n case $.APPLET:\n case $.OBJECT:\n case $.MARQUEE: {\n appletEndTagInBody(p, token);\n break;\n }\n case $.TEMPLATE: {\n templateEndTagInHead(p, token);\n break;\n }\n default: {\n genericEndTagInBody(p, token);\n }\n }\n}\nfunction eofInBody(p, token) {\n if (p.tmplInsertionModeStack.length > 0) {\n eofInTemplate(p, token);\n }\n else {\n stopParsing(p, token);\n }\n}\n// The \"text\" insertion mode\n//------------------------------------------------------------------\nfunction endTagInText(p, token) {\n var _a;\n if (token.tagID === $.SCRIPT) {\n (_a = p.scriptHandler) === null || _a === void 0 ? void 0 : _a.call(p, p.openElements.current);\n }\n p.openElements.pop();\n p.insertionMode = p.originalInsertionMode;\n}\nfunction eofInText(p, token) {\n p._err(token, ERR.eofInElementThatCanContainOnlyText);\n p.openElements.pop();\n p.insertionMode = p.originalInsertionMode;\n p.onEof(token);\n}\n// The \"in table\" insertion mode\n//------------------------------------------------------------------\nfunction characterInTable(p, token) {\n if (p.openElements.currentTagId !== undefined && TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) {\n p.pendingCharacterTokens.length = 0;\n p.hasNonWhitespacePendingCharacterToken = false;\n p.originalInsertionMode = p.insertionMode;\n p.insertionMode = InsertionMode.IN_TABLE_TEXT;\n switch (token.type) {\n case TokenType.CHARACTER: {\n characterInTableText(p, token);\n break;\n }\n case TokenType.WHITESPACE_CHARACTER: {\n whitespaceCharacterInTableText(p, token);\n break;\n }\n // Ignore null\n }\n }\n else {\n tokenInTable(p, token);\n }\n}\nfunction captionStartTagInTable(p, token) {\n p.openElements.clearBackToTableContext();\n p.activeFormattingElements.insertMarker();\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.IN_CAPTION;\n}\nfunction colgroupStartTagInTable(p, token) {\n p.openElements.clearBackToTableContext();\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n}\nfunction colStartTagInTable(p, token) {\n p.openElements.clearBackToTableContext();\n p._insertFakeElement(TN.COLGROUP, $.COLGROUP);\n p.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n startTagInColumnGroup(p, token);\n}\nfunction tbodyStartTagInTable(p, token) {\n p.openElements.clearBackToTableContext();\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.IN_TABLE_BODY;\n}\nfunction tdStartTagInTable(p, token) {\n p.openElements.clearBackToTableContext();\n p._insertFakeElement(TN.TBODY, $.TBODY);\n p.insertionMode = InsertionMode.IN_TABLE_BODY;\n startTagInTableBody(p, token);\n}\nfunction tableStartTagInTable(p, token) {\n if (p.openElements.hasInTableScope($.TABLE)) {\n p.openElements.popUntilTagNamePopped($.TABLE);\n p._resetInsertionMode();\n p._processStartTag(token);\n }\n}\nfunction inputStartTagInTable(p, token) {\n if (isHiddenInput(token)) {\n p._appendElement(token, NS.HTML);\n }\n else {\n tokenInTable(p, token);\n }\n token.ackSelfClosing = true;\n}\nfunction formStartTagInTable(p, token) {\n if (!p.formElement && p.openElements.tmplCount === 0) {\n p._insertElement(token, NS.HTML);\n p.formElement = p.openElements.current;\n p.openElements.pop();\n }\n}\nfunction startTagInTable(p, token) {\n switch (token.tagID) {\n case $.TD:\n case $.TH:\n case $.TR: {\n tdStartTagInTable(p, token);\n break;\n }\n case $.STYLE:\n case $.SCRIPT:\n case $.TEMPLATE: {\n startTagInHead(p, token);\n break;\n }\n case $.COL: {\n colStartTagInTable(p, token);\n break;\n }\n case $.FORM: {\n formStartTagInTable(p, token);\n break;\n }\n case $.TABLE: {\n tableStartTagInTable(p, token);\n break;\n }\n case $.TBODY:\n case $.TFOOT:\n case $.THEAD: {\n tbodyStartTagInTable(p, token);\n break;\n }\n case $.INPUT: {\n inputStartTagInTable(p, token);\n break;\n }\n case $.CAPTION: {\n captionStartTagInTable(p, token);\n break;\n }\n case $.COLGROUP: {\n colgroupStartTagInTable(p, token);\n break;\n }\n default: {\n tokenInTable(p, token);\n }\n }\n}\nfunction endTagInTable(p, token) {\n switch (token.tagID) {\n case $.TABLE: {\n if (p.openElements.hasInTableScope($.TABLE)) {\n p.openElements.popUntilTagNamePopped($.TABLE);\n p._resetInsertionMode();\n }\n break;\n }\n case $.TEMPLATE: {\n templateEndTagInHead(p, token);\n break;\n }\n case $.BODY:\n case $.CAPTION:\n case $.COL:\n case $.COLGROUP:\n case $.HTML:\n case $.TBODY:\n case $.TD:\n case $.TFOOT:\n case $.TH:\n case $.THEAD:\n case $.TR: {\n // Ignore token\n break;\n }\n default: {\n tokenInTable(p, token);\n }\n }\n}\nfunction tokenInTable(p, token) {\n const savedFosterParentingState = p.fosterParentingEnabled;\n p.fosterParentingEnabled = true;\n // Process token in `In Body` mode\n modeInBody(p, token);\n p.fosterParentingEnabled = savedFosterParentingState;\n}\n// The \"in table text\" insertion mode\n//------------------------------------------------------------------\nfunction whitespaceCharacterInTableText(p, token) {\n p.pendingCharacterTokens.push(token);\n}\nfunction characterInTableText(p, token) {\n p.pendingCharacterTokens.push(token);\n p.hasNonWhitespacePendingCharacterToken = true;\n}\nfunction tokenInTableText(p, token) {\n let i = 0;\n if (p.hasNonWhitespacePendingCharacterToken) {\n for (; i < p.pendingCharacterTokens.length; i++) {\n tokenInTable(p, p.pendingCharacterTokens[i]);\n }\n }\n else {\n for (; i < p.pendingCharacterTokens.length; i++) {\n p._insertCharacters(p.pendingCharacterTokens[i]);\n }\n }\n p.insertionMode = p.originalInsertionMode;\n p._processToken(token);\n}\n// The \"in caption\" insertion mode\n//------------------------------------------------------------------\nconst TABLE_VOID_ELEMENTS = new Set([$.CAPTION, $.COL, $.COLGROUP, $.TBODY, $.TD, $.TFOOT, $.TH, $.THEAD, $.TR]);\nfunction startTagInCaption(p, token) {\n const tn = token.tagID;\n if (TABLE_VOID_ELEMENTS.has(tn)) {\n if (p.openElements.hasInTableScope($.CAPTION)) {\n p.openElements.generateImpliedEndTags();\n p.openElements.popUntilTagNamePopped($.CAPTION);\n p.activeFormattingElements.clearToLastMarker();\n p.insertionMode = InsertionMode.IN_TABLE;\n startTagInTable(p, token);\n }\n }\n else {\n startTagInBody(p, token);\n }\n}\nfunction endTagInCaption(p, token) {\n const tn = token.tagID;\n switch (tn) {\n case $.CAPTION:\n case $.TABLE: {\n if (p.openElements.hasInTableScope($.CAPTION)) {\n p.openElements.generateImpliedEndTags();\n p.openElements.popUntilTagNamePopped($.CAPTION);\n p.activeFormattingElements.clearToLastMarker();\n p.insertionMode = InsertionMode.IN_TABLE;\n if (tn === $.TABLE) {\n endTagInTable(p, token);\n }\n }\n break;\n }\n case $.BODY:\n case $.COL:\n case $.COLGROUP:\n case $.HTML:\n case $.TBODY:\n case $.TD:\n case $.TFOOT:\n case $.TH:\n case $.THEAD:\n case $.TR: {\n // Ignore token\n break;\n }\n default: {\n endTagInBody(p, token);\n }\n }\n}\n// The \"in column group\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInColumnGroup(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.COL: {\n p._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n break;\n }\n case $.TEMPLATE: {\n startTagInHead(p, token);\n break;\n }\n default: {\n tokenInColumnGroup(p, token);\n }\n }\n}\nfunction endTagInColumnGroup(p, token) {\n switch (token.tagID) {\n case $.COLGROUP: {\n if (p.openElements.currentTagId === $.COLGROUP) {\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE;\n }\n break;\n }\n case $.TEMPLATE: {\n templateEndTagInHead(p, token);\n break;\n }\n case $.COL: {\n // Ignore token\n break;\n }\n default: {\n tokenInColumnGroup(p, token);\n }\n }\n}\nfunction tokenInColumnGroup(p, token) {\n if (p.openElements.currentTagId === $.COLGROUP) {\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE;\n p._processToken(token);\n }\n}\n// The \"in table body\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInTableBody(p, token) {\n switch (token.tagID) {\n case $.TR: {\n p.openElements.clearBackToTableBodyContext();\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.IN_ROW;\n break;\n }\n case $.TH:\n case $.TD: {\n p.openElements.clearBackToTableBodyContext();\n p._insertFakeElement(TN.TR, $.TR);\n p.insertionMode = InsertionMode.IN_ROW;\n startTagInRow(p, token);\n break;\n }\n case $.CAPTION:\n case $.COL:\n case $.COLGROUP:\n case $.TBODY:\n case $.TFOOT:\n case $.THEAD: {\n if (p.openElements.hasTableBodyContextInTableScope()) {\n p.openElements.clearBackToTableBodyContext();\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE;\n startTagInTable(p, token);\n }\n break;\n }\n default: {\n startTagInTable(p, token);\n }\n }\n}\nfunction endTagInTableBody(p, token) {\n const tn = token.tagID;\n switch (token.tagID) {\n case $.TBODY:\n case $.TFOOT:\n case $.THEAD: {\n if (p.openElements.hasInTableScope(tn)) {\n p.openElements.clearBackToTableBodyContext();\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE;\n }\n break;\n }\n case $.TABLE: {\n if (p.openElements.hasTableBodyContextInTableScope()) {\n p.openElements.clearBackToTableBodyContext();\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE;\n endTagInTable(p, token);\n }\n break;\n }\n case $.BODY:\n case $.CAPTION:\n case $.COL:\n case $.COLGROUP:\n case $.HTML:\n case $.TD:\n case $.TH:\n case $.TR: {\n // Ignore token\n break;\n }\n default: {\n endTagInTable(p, token);\n }\n }\n}\n// The \"in row\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInRow(p, token) {\n switch (token.tagID) {\n case $.TH:\n case $.TD: {\n p.openElements.clearBackToTableRowContext();\n p._insertElement(token, NS.HTML);\n p.insertionMode = InsertionMode.IN_CELL;\n p.activeFormattingElements.insertMarker();\n break;\n }\n case $.CAPTION:\n case $.COL:\n case $.COLGROUP:\n case $.TBODY:\n case $.TFOOT:\n case $.THEAD:\n case $.TR: {\n if (p.openElements.hasInTableScope($.TR)) {\n p.openElements.clearBackToTableRowContext();\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE_BODY;\n startTagInTableBody(p, token);\n }\n break;\n }\n default: {\n startTagInTable(p, token);\n }\n }\n}\nfunction endTagInRow(p, token) {\n switch (token.tagID) {\n case $.TR: {\n if (p.openElements.hasInTableScope($.TR)) {\n p.openElements.clearBackToTableRowContext();\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE_BODY;\n }\n break;\n }\n case $.TABLE: {\n if (p.openElements.hasInTableScope($.TR)) {\n p.openElements.clearBackToTableRowContext();\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE_BODY;\n endTagInTableBody(p, token);\n }\n break;\n }\n case $.TBODY:\n case $.TFOOT:\n case $.THEAD: {\n if (p.openElements.hasInTableScope(token.tagID) || p.openElements.hasInTableScope($.TR)) {\n p.openElements.clearBackToTableRowContext();\n p.openElements.pop();\n p.insertionMode = InsertionMode.IN_TABLE_BODY;\n endTagInTableBody(p, token);\n }\n break;\n }\n case $.BODY:\n case $.CAPTION:\n case $.COL:\n case $.COLGROUP:\n case $.HTML:\n case $.TD:\n case $.TH: {\n // Ignore end tag\n break;\n }\n default: {\n endTagInTable(p, token);\n }\n }\n}\n// The \"in cell\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInCell(p, token) {\n const tn = token.tagID;\n if (TABLE_VOID_ELEMENTS.has(tn)) {\n if (p.openElements.hasInTableScope($.TD) || p.openElements.hasInTableScope($.TH)) {\n p._closeTableCell();\n startTagInRow(p, token);\n }\n }\n else {\n startTagInBody(p, token);\n }\n}\nfunction endTagInCell(p, token) {\n const tn = token.tagID;\n switch (tn) {\n case $.TD:\n case $.TH: {\n if (p.openElements.hasInTableScope(tn)) {\n p.openElements.generateImpliedEndTags();\n p.openElements.popUntilTagNamePopped(tn);\n p.activeFormattingElements.clearToLastMarker();\n p.insertionMode = InsertionMode.IN_ROW;\n }\n break;\n }\n case $.TABLE:\n case $.TBODY:\n case $.TFOOT:\n case $.THEAD:\n case $.TR: {\n if (p.openElements.hasInTableScope(tn)) {\n p._closeTableCell();\n endTagInRow(p, token);\n }\n break;\n }\n case $.BODY:\n case $.CAPTION:\n case $.COL:\n case $.COLGROUP:\n case $.HTML: {\n // Ignore token\n break;\n }\n default: {\n endTagInBody(p, token);\n }\n }\n}\n// The \"in select\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInSelect(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.OPTION: {\n if (p.openElements.currentTagId === $.OPTION) {\n p.openElements.pop();\n }\n p._insertElement(token, NS.HTML);\n break;\n }\n case $.OPTGROUP: {\n if (p.openElements.currentTagId === $.OPTION) {\n p.openElements.pop();\n }\n if (p.openElements.currentTagId === $.OPTGROUP) {\n p.openElements.pop();\n }\n p._insertElement(token, NS.HTML);\n break;\n }\n case $.HR: {\n if (p.openElements.currentTagId === $.OPTION) {\n p.openElements.pop();\n }\n if (p.openElements.currentTagId === $.OPTGROUP) {\n p.openElements.pop();\n }\n p._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n break;\n }\n case $.INPUT:\n case $.KEYGEN:\n case $.TEXTAREA:\n case $.SELECT: {\n if (p.openElements.hasInSelectScope($.SELECT)) {\n p.openElements.popUntilTagNamePopped($.SELECT);\n p._resetInsertionMode();\n if (token.tagID !== $.SELECT) {\n p._processStartTag(token);\n }\n }\n break;\n }\n case $.SCRIPT:\n case $.TEMPLATE: {\n startTagInHead(p, token);\n break;\n }\n default:\n // Do nothing\n }\n}\nfunction endTagInSelect(p, token) {\n switch (token.tagID) {\n case $.OPTGROUP: {\n if (p.openElements.stackTop > 0 &&\n p.openElements.currentTagId === $.OPTION &&\n p.openElements.tagIDs[p.openElements.stackTop - 1] === $.OPTGROUP) {\n p.openElements.pop();\n }\n if (p.openElements.currentTagId === $.OPTGROUP) {\n p.openElements.pop();\n }\n break;\n }\n case $.OPTION: {\n if (p.openElements.currentTagId === $.OPTION) {\n p.openElements.pop();\n }\n break;\n }\n case $.SELECT: {\n if (p.openElements.hasInSelectScope($.SELECT)) {\n p.openElements.popUntilTagNamePopped($.SELECT);\n p._resetInsertionMode();\n }\n break;\n }\n case $.TEMPLATE: {\n templateEndTagInHead(p, token);\n break;\n }\n default:\n // Do nothing\n }\n}\n// The \"in select in table\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInSelectInTable(p, token) {\n const tn = token.tagID;\n if (tn === $.CAPTION ||\n tn === $.TABLE ||\n tn === $.TBODY ||\n tn === $.TFOOT ||\n tn === $.THEAD ||\n tn === $.TR ||\n tn === $.TD ||\n tn === $.TH) {\n p.openElements.popUntilTagNamePopped($.SELECT);\n p._resetInsertionMode();\n p._processStartTag(token);\n }\n else {\n startTagInSelect(p, token);\n }\n}\nfunction endTagInSelectInTable(p, token) {\n const tn = token.tagID;\n if (tn === $.CAPTION ||\n tn === $.TABLE ||\n tn === $.TBODY ||\n tn === $.TFOOT ||\n tn === $.THEAD ||\n tn === $.TR ||\n tn === $.TD ||\n tn === $.TH) {\n if (p.openElements.hasInTableScope(tn)) {\n p.openElements.popUntilTagNamePopped($.SELECT);\n p._resetInsertionMode();\n p.onEndTag(token);\n }\n }\n else {\n endTagInSelect(p, token);\n }\n}\n// The \"in template\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInTemplate(p, token) {\n switch (token.tagID) {\n // First, handle tags that can start without a mode change\n case $.BASE:\n case $.BASEFONT:\n case $.BGSOUND:\n case $.LINK:\n case $.META:\n case $.NOFRAMES:\n case $.SCRIPT:\n case $.STYLE:\n case $.TEMPLATE:\n case $.TITLE: {\n startTagInHead(p, token);\n break;\n }\n // Re-process the token in the appropriate mode\n case $.CAPTION:\n case $.COLGROUP:\n case $.TBODY:\n case $.TFOOT:\n case $.THEAD: {\n p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;\n p.insertionMode = InsertionMode.IN_TABLE;\n startTagInTable(p, token);\n break;\n }\n case $.COL: {\n p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;\n p.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n startTagInColumnGroup(p, token);\n break;\n }\n case $.TR: {\n p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;\n p.insertionMode = InsertionMode.IN_TABLE_BODY;\n startTagInTableBody(p, token);\n break;\n }\n case $.TD:\n case $.TH: {\n p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;\n p.insertionMode = InsertionMode.IN_ROW;\n startTagInRow(p, token);\n break;\n }\n default: {\n p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;\n p.insertionMode = InsertionMode.IN_BODY;\n startTagInBody(p, token);\n }\n }\n}\nfunction endTagInTemplate(p, token) {\n if (token.tagID === $.TEMPLATE) {\n templateEndTagInHead(p, token);\n }\n}\nfunction eofInTemplate(p, token) {\n if (p.openElements.tmplCount > 0) {\n p.openElements.popUntilTagNamePopped($.TEMPLATE);\n p.activeFormattingElements.clearToLastMarker();\n p.tmplInsertionModeStack.shift();\n p._resetInsertionMode();\n p.onEof(token);\n }\n else {\n stopParsing(p, token);\n }\n}\n// The \"after body\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterBody(p, token) {\n if (token.tagID === $.HTML) {\n startTagInBody(p, token);\n }\n else {\n tokenAfterBody(p, token);\n }\n}\nfunction endTagAfterBody(p, token) {\n var _a;\n if (token.tagID === $.HTML) {\n if (!p.fragmentContext) {\n p.insertionMode = InsertionMode.AFTER_AFTER_BODY;\n }\n //NOTE: <html> is never popped from the stack, so we need to updated\n //the end location explicitly.\n if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === $.HTML) {\n p._setEndLocation(p.openElements.items[0], token);\n // Update the body element, if it doesn't have an end tag\n const bodyElement = p.openElements.items[1];\n if (bodyElement && !((_a = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a === void 0 ? void 0 : _a.endTag)) {\n p._setEndLocation(bodyElement, token);\n }\n }\n }\n else {\n tokenAfterBody(p, token);\n }\n}\nfunction tokenAfterBody(p, token) {\n p.insertionMode = InsertionMode.IN_BODY;\n modeInBody(p, token);\n}\n// The \"in frameset\" insertion mode\n//------------------------------------------------------------------\nfunction startTagInFrameset(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.FRAMESET: {\n p._insertElement(token, NS.HTML);\n break;\n }\n case $.FRAME: {\n p._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n break;\n }\n case $.NOFRAMES: {\n startTagInHead(p, token);\n break;\n }\n default:\n // Do nothing\n }\n}\nfunction endTagInFrameset(p, token) {\n if (token.tagID === $.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) {\n p.openElements.pop();\n if (!p.fragmentContext && p.openElements.currentTagId !== $.FRAMESET) {\n p.insertionMode = InsertionMode.AFTER_FRAMESET;\n }\n }\n}\n// The \"after frameset\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterFrameset(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.NOFRAMES: {\n startTagInHead(p, token);\n break;\n }\n default:\n // Do nothing\n }\n}\nfunction endTagAfterFrameset(p, token) {\n if (token.tagID === $.HTML) {\n p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET;\n }\n}\n// The \"after after body\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterAfterBody(p, token) {\n if (token.tagID === $.HTML) {\n startTagInBody(p, token);\n }\n else {\n tokenAfterAfterBody(p, token);\n }\n}\nfunction tokenAfterAfterBody(p, token) {\n p.insertionMode = InsertionMode.IN_BODY;\n modeInBody(p, token);\n}\n// The \"after after frameset\" insertion mode\n//------------------------------------------------------------------\nfunction startTagAfterAfterFrameset(p, token) {\n switch (token.tagID) {\n case $.HTML: {\n startTagInBody(p, token);\n break;\n }\n case $.NOFRAMES: {\n startTagInHead(p, token);\n break;\n }\n default:\n // Do nothing\n }\n}\n// The rules for parsing tokens in foreign content\n//------------------------------------------------------------------\nfunction nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}\nfunction characterInForeignContent(p, token) {\n p._insertCharacters(token);\n p.framesetOk = false;\n}\nfunction popUntilHtmlOrIntegrationPoint(p) {\n while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML &&\n p.openElements.currentTagId !== undefined &&\n !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) {\n p.openElements.pop();\n }\n}\nfunction startTagInForeignContent(p, token) {\n if (foreignContent.causesExit(token)) {\n popUntilHtmlOrIntegrationPoint(p);\n p._startTagOutsideForeignContent(token);\n }\n else {\n const current = p._getAdjustedCurrentElement();\n const currentNs = p.treeAdapter.getNamespaceURI(current);\n if (currentNs === NS.MATHML) {\n foreignContent.adjustTokenMathMLAttrs(token);\n }\n else if (currentNs === NS.SVG) {\n foreignContent.adjustTokenSVGTagName(token);\n foreignContent.adjustTokenSVGAttrs(token);\n }\n foreignContent.adjustTokenXMLAttrs(token);\n if (token.selfClosing) {\n p._appendElement(token, currentNs);\n }\n else {\n p._insertElement(token, currentNs);\n }\n token.ackSelfClosing = true;\n }\n}\nfunction endTagInForeignContent(p, token) {\n if (token.tagID === $.P || token.tagID === $.BR) {\n popUntilHtmlOrIntegrationPoint(p);\n p._endTagOutsideForeignContent(token);\n return;\n }\n for (let i = p.openElements.stackTop; i > 0; i--) {\n const element = p.openElements.items[i];\n if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) {\n p._endTagOutsideForeignContent(token);\n break;\n }\n const tagName = p.treeAdapter.getTagName(element);\n if (tagName.toLowerCase() === token.tagName) {\n //NOTE: update the token tag name for `_setEndLocation`.\n token.tagName = tagName;\n p.openElements.shortenToLength(i);\n break;\n }\n }\n}\n","import { TAG_NAMES as $, NS, hasUnescapedText } from '../common/html.js';\nimport { escapeText, escapeAttribute } from 'entities/escape';\nimport { defaultTreeAdapter } from '../tree-adapters/default.js';\n// Sets\nconst VOID_ELEMENTS = new Set([\n $.AREA,\n $.BASE,\n $.BASEFONT,\n $.BGSOUND,\n $.BR,\n $.COL,\n $.EMBED,\n $.FRAME,\n $.HR,\n $.IMG,\n $.INPUT,\n $.KEYGEN,\n $.LINK,\n $.META,\n $.PARAM,\n $.SOURCE,\n $.TRACK,\n $.WBR,\n]);\nfunction isVoidElement(node, options) {\n return (options.treeAdapter.isElementNode(node) &&\n options.treeAdapter.getNamespaceURI(node) === NS.HTML &&\n VOID_ELEMENTS.has(options.treeAdapter.getTagName(node)));\n}\nconst defaultOpts = { treeAdapter: defaultTreeAdapter, scriptingEnabled: true };\n/**\n * Serializes an AST node to an HTML string.\n *\n * @example\n *\n * ```js\n * const parse5 = require('parse5');\n *\n * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>');\n *\n * // Serializes a document.\n * const html = parse5.serialize(document);\n *\n * // Serializes the <html> element content.\n * const str = parse5.serialize(document.childNodes[1]);\n *\n * console.log(str); //> '<head></head><body>Hi there!</body>'\n * ```\n *\n * @param node Node to serialize.\n * @param options Serialization options.\n */\nexport function serialize(node, options) {\n const opts = { ...defaultOpts, ...options };\n if (isVoidElement(node, opts)) {\n return '';\n }\n return serializeChildNodes(node, opts);\n}\n/**\n * Serializes an AST element node to an HTML string, including the element node.\n *\n * @example\n *\n * ```js\n * const parse5 = require('parse5');\n *\n * const document = parse5.parseFragment('<div>Hello, <b>world</b>!</div>');\n *\n * // Serializes the <div> element.\n * const str = parse5.serializeOuter(document.childNodes[0]);\n *\n * console.log(str); //> '<div>Hello, <b>world</b>!</div>'\n * ```\n *\n * @param node Node to serialize.\n * @param options Serialization options.\n */\nexport function serializeOuter(node, options) {\n const opts = { ...defaultOpts, ...options };\n return serializeNode(node, opts);\n}\nfunction serializeChildNodes(parentNode, options) {\n let html = '';\n // Get container of the child nodes\n const container = options.treeAdapter.isElementNode(parentNode) &&\n options.treeAdapter.getTagName(parentNode) === $.TEMPLATE &&\n options.treeAdapter.getNamespaceURI(parentNode) === NS.HTML\n ? options.treeAdapter.getTemplateContent(parentNode)\n : parentNode;\n const childNodes = options.treeAdapter.getChildNodes(container);\n if (childNodes) {\n for (const currentNode of childNodes) {\n html += serializeNode(currentNode, options);\n }\n }\n return html;\n}\nfunction serializeNode(node, options) {\n if (options.treeAdapter.isElementNode(node)) {\n return serializeElement(node, options);\n }\n if (options.treeAdapter.isTextNode(node)) {\n return serializeTextNode(node, options);\n }\n if (options.treeAdapter.isCommentNode(node)) {\n return serializeCommentNode(node, options);\n }\n if (options.treeAdapter.isDocumentTypeNode(node)) {\n return serializeDocumentTypeNode(node, options);\n }\n // Return an empty string for unknown nodes\n return '';\n}\nfunction serializeElement(node, options) {\n const tn = options.treeAdapter.getTagName(node);\n return `<${tn}${serializeAttributes(node, options)}>${isVoidElement(node, options) ? '' : `${serializeChildNodes(node, options)}</${tn}>`}`;\n}\nfunction serializeAttributes(node, { treeAdapter }) {\n let html = '';\n for (const attr of treeAdapter.getAttrList(node)) {\n html += ' ';\n if (attr.namespace) {\n switch (attr.namespace) {\n case NS.XML: {\n html += `xml:${attr.name}`;\n break;\n }\n case NS.XMLNS: {\n if (attr.name !== 'xmlns') {\n html += 'xmlns:';\n }\n html += attr.name;\n break;\n }\n case NS.XLINK: {\n html += `xlink:${attr.name}`;\n break;\n }\n default: {\n html += `${attr.prefix}:${attr.name}`;\n }\n }\n }\n else {\n html += attr.name;\n }\n html += `=\"${escapeAttribute(attr.value)}\"`;\n }\n return html;\n}\nfunction serializeTextNode(node, options) {\n const { treeAdapter } = options;\n const content = treeAdapter.getTextNodeContent(node);\n const parent = treeAdapter.getParentNode(node);\n const parentTn = parent && treeAdapter.isElementNode(parent) && treeAdapter.getTagName(parent);\n return parentTn &&\n treeAdapter.getNamespaceURI(parent) === NS.HTML &&\n hasUnescapedText(parentTn, options.scriptingEnabled)\n ? content\n : escapeText(content);\n}\nfunction serializeCommentNode(node, { treeAdapter }) {\n return `<!--${treeAdapter.getCommentNodeContent(node)}-->`;\n}\nfunction serializeDocumentTypeNode(node, { treeAdapter }) {\n return `<!DOCTYPE ${treeAdapter.getDocumentTypeNodeName(node)}>`;\n}\n","/**\n * @import {Options} from 'hast-util-raw'\n * @import {Comment, Doctype, Element, Nodes, RootContent, Root, Text} from 'hast'\n * @import {Raw} from 'mdast-util-to-hast'\n * @import {DefaultTreeAdapterMap, ParserOptions} from 'parse5'\n * @import {Point} from 'unist'\n */\n\n/**\n * @typedef State\n * Info passed around about the current state.\n * @property {(node: Nodes) => undefined} handle\n * Add a hast node to the parser.\n * @property {Options} options\n * User configuration.\n * @property {Parser<DefaultTreeAdapterMap>} parser\n * Current parser.\n * @property {boolean} stitches\n * Whether there are stitches.\n */\n\n/**\n * @typedef Stitch\n * Custom comment-like value we pass through parse5, which contains a\n * replacement node that we’ll swap back in afterwards.\n * @property {'comment'} type\n * Node type.\n * @property {{stitch: Nodes}} value\n * Replacement value.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {fromParse5} from 'hast-util-from-parse5'\nimport {toParse5} from 'hast-util-to-parse5'\nimport {htmlVoidElements} from 'html-void-elements'\nimport {Parser, Token, TokenizerMode, html} from 'parse5'\nimport {pointEnd, pointStart} from 'unist-util-position'\nimport {visit} from 'unist-util-visit'\nimport {webNamespaces} from 'web-namespaces'\nimport {zwitch} from 'zwitch'\n\nconst gfmTagfilterExpression =\n /<(\\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\\t\\n\\f\\r />])/gi\n\n// Node types associated with MDX.\n// <https://github.com/mdx-js/mdx/blob/8a56312/packages/mdx/lib/node-types.js>\nconst knownMdxNames = new Set([\n 'mdxFlowExpression',\n 'mdxJsxFlowElement',\n 'mdxJsxTextElement',\n 'mdxTextExpression',\n 'mdxjsEsm'\n])\n\n/** @type {ParserOptions<DefaultTreeAdapterMap>} */\nconst parseOptions = {sourceCodeLocationInfo: true, scriptingEnabled: false}\n\n/**\n * Pass a hast tree through an HTML parser, which will fix nesting, and turn\n * raw nodes into actual nodes.\n *\n * @param {Nodes} tree\n * Original hast tree to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Nodes}\n * Parsed again tree.\n */\nexport function raw(tree, options) {\n const document = documentMode(tree)\n /** @type {(node: Nodes, state: State) => undefined} */\n const one = zwitch('type', {\n handlers: {root, element, text, comment, doctype, raw: handleRaw},\n unknown\n })\n\n /** @type {State} */\n const state = {\n parser: document\n ? new Parser(parseOptions)\n : Parser.getFragmentParser(undefined, parseOptions),\n handle(node) {\n one(node, state)\n },\n stitches: false,\n options: options || {}\n }\n\n one(tree, state)\n resetTokenizer(state, pointStart())\n\n const p5 = document ? state.parser.document : state.parser.getFragment()\n const result = fromParse5(p5, {\n // To do: support `space`?\n file: state.options.file\n })\n\n if (state.stitches) {\n visit(result, 'comment', function (node, index, parent) {\n const stitch = /** @type {Stitch} */ (/** @type {unknown} */ (node))\n if (stitch.value.stitch && parent && index !== undefined) {\n /** @type {Array<RootContent>} */\n const siblings = parent.children\n // @ts-expect-error: assume the stitch is allowed.\n siblings[index] = stitch.value.stitch\n return index\n }\n })\n }\n\n // Unpack if possible and when not given a `root`.\n if (\n result.type === 'root' &&\n result.children.length === 1 &&\n result.children[0].type === tree.type\n ) {\n return result.children[0]\n }\n\n return result\n}\n\n/**\n * Transform all nodes\n *\n * @param {Array<RootContent>} nodes\n * hast content.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction all(nodes, state) {\n let index = -1\n\n /* istanbul ignore else - invalid nodes, see rehypejs/rehype-raw#7. */\n if (nodes) {\n while (++index < nodes.length) {\n state.handle(nodes[index])\n }\n }\n}\n\n/**\n * Transform a root.\n *\n * @param {Root} node\n * hast root node.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction root(node, state) {\n all(node.children, state)\n}\n\n/**\n * Transform an element.\n *\n * @param {Element} node\n * hast element node.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction element(node, state) {\n startTag(node, state)\n\n all(node.children, state)\n\n endTag(node, state)\n}\n\n/**\n * Transform a text.\n *\n * @param {Text} node\n * hast text node.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction text(node, state) {\n // Allow `DATA` through `PLAINTEXT`,\n // but when hanging in a tag for example,\n // switch back to `DATA`.\n // Note: `State` is not exposed by `parse5`, so these numbers are fragile.\n // See: <https://github.com/inikulin/parse5/blob/46cba43/packages/parse5/lib/tokenizer/index.ts#L58>\n if (state.parser.tokenizer.state > 4) {\n state.parser.tokenizer.state = 0\n }\n\n /** @type {Token.CharacterToken} */\n const token = {\n type: Token.TokenType.CHARACTER,\n chars: node.value,\n location: createParse5Location(node)\n }\n\n resetTokenizer(state, pointStart(node))\n // @ts-expect-error: private.\n state.parser.currentToken = token\n // @ts-expect-error: private.\n state.parser._processToken(state.parser.currentToken)\n}\n\n/**\n * Transform a doctype.\n *\n * @param {Doctype} node\n * hast doctype node.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction doctype(node, state) {\n /** @type {Token.DoctypeToken} */\n const token = {\n type: Token.TokenType.DOCTYPE,\n name: 'html',\n forceQuirks: false,\n publicId: '',\n systemId: '',\n location: createParse5Location(node)\n }\n\n resetTokenizer(state, pointStart(node))\n // @ts-expect-error: private.\n state.parser.currentToken = token\n // @ts-expect-error: private.\n state.parser._processToken(state.parser.currentToken)\n}\n\n/**\n * Transform a stitch.\n *\n * @param {Nodes} node\n * unknown node.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction stitch(node, state) {\n // Mark that there are stitches, so we need to walk the tree and revert them.\n state.stitches = true\n\n /** @type {Nodes} */\n const clone = cloneWithoutChildren(node)\n\n // Recurse, because to somewhat handle `[<x>]</x>` (where `[]` denotes the\n // passed through node).\n if ('children' in node && 'children' in clone) {\n // Root in root out.\n const fakeRoot = /** @type {Root} */ (\n raw({type: 'root', children: node.children}, state.options)\n )\n clone.children = fakeRoot.children\n }\n\n // Hack: `value` is supposed to be a string, but as none of the tools\n // (`parse5` or `hast-util-from-parse5`) looks at it, we can pass nodes\n // through.\n comment({type: 'comment', value: {stitch: clone}}, state)\n}\n\n/**\n * Transform a comment (or stitch).\n *\n * @param {Comment | Stitch} node\n * hast comment node.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction comment(node, state) {\n /** @type {string} */\n // @ts-expect-error: we pass stitches through.\n const data = node.value\n\n /** @type {Token.CommentToken} */\n const token = {\n type: Token.TokenType.COMMENT,\n data,\n location: createParse5Location(node)\n }\n resetTokenizer(state, pointStart(node))\n // @ts-expect-error: private.\n state.parser.currentToken = token\n // @ts-expect-error: private.\n state.parser._processToken(state.parser.currentToken)\n}\n\n/**\n * Transform a raw node.\n *\n * @param {Raw} node\n * hast raw node.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction handleRaw(node, state) {\n // Reset preprocessor:\n // See: <https://github.com/inikulin/parse5/blob/6f7ca60/packages/parse5/lib/tokenizer/preprocessor.ts#L18-L31>.\n state.parser.tokenizer.preprocessor.html = ''\n state.parser.tokenizer.preprocessor.pos = -1\n // @ts-expect-error: private.\n // type-coverage:ignore-next-line\n state.parser.tokenizer.preprocessor.lastGapPos = -2\n // @ts-expect-error: private.\n // type-coverage:ignore-next-line\n state.parser.tokenizer.preprocessor.gapStack = []\n // @ts-expect-error: private.\n // type-coverage:ignore-next-line\n state.parser.tokenizer.preprocessor.skipNextNewLine = false\n state.parser.tokenizer.preprocessor.lastChunkWritten = false\n state.parser.tokenizer.preprocessor.endOfChunkHit = false\n // @ts-expect-error: private.\n // type-coverage:ignore-next-line\n state.parser.tokenizer.preprocessor.isEol = false\n\n // Now pass `node.value`.\n setPoint(state, pointStart(node))\n\n state.parser.tokenizer.write(\n state.options.tagfilter\n ? node.value.replace(gfmTagfilterExpression, '&lt;$1$2')\n : node.value,\n false\n )\n // @ts-expect-error: private.\n state.parser.tokenizer._runParsingLoop()\n\n // Character references hang, so if we ended there, we need to flush\n // those too.\n // We reset the preprocessor as if the document ends here.\n // Then one single call to the relevant state does the trick, parse5\n // consumes the whole token.\n\n // Note: `State` is not exposed by `parse5`, so these numbers are fragile.\n // See: <https://github.com/inikulin/parse5/blob/46cba43/packages/parse5/lib/tokenizer/index.ts#L58>\n // Note: a change to `parse5`, which breaks this, was merged but not released.\n // Investigate when it is.\n // To do: remove next major.\n /* c8 ignore next 12 -- removed in <https://github.com/inikulin/parse5/pull/897> */\n if (\n state.parser.tokenizer.state === 72 /* NAMED_CHARACTER_REFERENCE */ ||\n // @ts-expect-error: removed.\n state.parser.tokenizer.state === 78 /* NUMERIC_CHARACTER_REFERENCE_END */\n ) {\n state.parser.tokenizer.preprocessor.lastChunkWritten = true\n /** @type {number} */\n // @ts-expect-error: private.\n const cp = state.parser.tokenizer._consume()\n // @ts-expect-error: private.\n state.parser.tokenizer._callState(cp)\n }\n}\n\n/**\n * Crash on an unknown node.\n *\n * @param {unknown} node_\n * unknown node.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Never.\n */\nfunction unknown(node_, state) {\n const node = /** @type {Nodes} */ (node_)\n\n if (\n state.options.passThrough &&\n state.options.passThrough.includes(node.type)\n ) {\n stitch(node, state)\n } else {\n let extra = ''\n\n if (knownMdxNames.has(node.type)) {\n extra =\n \". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax\"\n }\n\n throw new Error('Cannot compile `' + node.type + '` node' + extra)\n }\n}\n\n/**\n * Reset the tokenizer of a parser.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Point | undefined} point\n * Point.\n * @returns {undefined}\n * Nothing.\n */\nfunction resetTokenizer(state, point) {\n setPoint(state, point)\n\n // Process final characters if they’re still there after hibernating.\n /** @type {Token.CharacterToken} */\n // @ts-expect-error: private.\n const token = state.parser.tokenizer.currentCharacterToken\n\n if (token && token.location) {\n token.location.endLine = state.parser.tokenizer.preprocessor.line\n token.location.endCol = state.parser.tokenizer.preprocessor.col + 1\n token.location.endOffset = state.parser.tokenizer.preprocessor.offset + 1\n // @ts-expect-error: private.\n state.parser.currentToken = token\n // @ts-expect-error: private.\n state.parser._processToken(state.parser.currentToken)\n }\n\n // Reset tokenizer:\n // See: <https://github.com/inikulin/parse5/blob/6f7ca60/packages/parse5/lib/tokenizer/index.ts#L187-L223>.\n // Especially putting it back in the `data` state is useful: some elements,\n // like textareas and iframes, change the state.\n // See GH-7.\n // But also if broken HTML is in `raw`, and then a correct element is given.\n // See GH-11.\n // @ts-expect-error: private.\n state.parser.tokenizer.paused = false\n // @ts-expect-error: private.\n state.parser.tokenizer.inLoop = false\n\n // Note: don’t reset `state`, `inForeignNode`, or `lastStartTagName`, we\n // manually update those when needed.\n state.parser.tokenizer.active = false\n // @ts-expect-error: private.\n state.parser.tokenizer.returnState = TokenizerMode.DATA\n // @ts-expect-error: private.\n state.parser.tokenizer.charRefCode = -1\n // @ts-expect-error: private.\n state.parser.tokenizer.consumedAfterSnapshot = -1\n // @ts-expect-error: private.\n state.parser.tokenizer.currentLocation = null\n // @ts-expect-error: private.\n state.parser.tokenizer.currentCharacterToken = null\n // @ts-expect-error: private.\n state.parser.tokenizer.currentToken = null\n // @ts-expect-error: private.\n state.parser.tokenizer.currentAttr = {name: '', value: ''}\n}\n\n/**\n * Set current location.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Point | undefined} point\n * Point.\n * @returns {undefined}\n * Nothing.\n */\nfunction setPoint(state, point) {\n if (point && point.offset !== undefined) {\n /** @type {Token.Location} */\n const location = {\n startLine: point.line,\n startCol: point.column,\n startOffset: point.offset,\n endLine: -1,\n endCol: -1,\n endOffset: -1\n }\n\n // @ts-expect-error: private.\n // type-coverage:ignore-next-line\n state.parser.tokenizer.preprocessor.lineStartPos = -point.column + 1 // Looks weird, but ensures we get correct positional info.\n state.parser.tokenizer.preprocessor.droppedBufferSize = point.offset\n state.parser.tokenizer.preprocessor.line = point.line\n // @ts-expect-error: private.\n state.parser.tokenizer.currentLocation = location\n }\n}\n\n/**\n * Emit a start tag.\n *\n * @param {Element} node\n * Element.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction startTag(node, state) {\n const tagName = node.tagName.toLowerCase()\n\n // Ignore tags if we’re in plain text.\n if (state.parser.tokenizer.state === TokenizerMode.PLAINTEXT) return\n\n resetTokenizer(state, pointStart(node))\n\n const current = state.parser.openElements.current\n let ns = 'namespaceURI' in current ? current.namespaceURI : webNamespaces.html\n\n if (ns === webNamespaces.html && tagName === 'svg') {\n ns = webNamespaces.svg\n }\n\n const result = toParse5(\n // Shallow clone to not delve into `children`: we only need the attributes.\n {...node, children: []},\n {space: ns === webNamespaces.svg ? 'svg' : 'html'}\n )\n\n /** @type {Token.TagToken} */\n const tag = {\n type: Token.TokenType.START_TAG,\n tagName,\n tagID: html.getTagID(tagName),\n // We always send start and end tags.\n selfClosing: false,\n ackSelfClosing: false,\n // Always element.\n /* c8 ignore next */\n attrs: 'attrs' in result ? result.attrs : [],\n location: createParse5Location(node)\n }\n\n // The HTML parsing algorithm works by doing half of the state management in\n // the tokenizer and half in the parser.\n // We can’t use the tokenizer here, as we don’t have strings.\n // So we act *as if* the tokenizer emits tokens:\n\n // @ts-expect-error: private.\n state.parser.currentToken = tag\n // @ts-expect-error: private.\n state.parser._processToken(state.parser.currentToken)\n\n // …but then we still need a bunch of work that the tokenizer would normally\n // do, such as:\n\n // Set a tag name, similar to how the tokenizer would do it.\n state.parser.tokenizer.lastStartTagName = tagName\n\n // `inForeignNode` is correctly set by the parser.\n}\n\n/**\n * Emit an end tag.\n *\n * @param {Element} node\n * Element.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {undefined}\n * Nothing.\n */\nfunction endTag(node, state) {\n const tagName = node.tagName.toLowerCase()\n // Do not emit closing tags for HTML void elements.\n if (\n !state.parser.tokenizer.inForeignNode &&\n htmlVoidElements.includes(tagName)\n ) {\n return\n }\n\n // Ignore tags if we’re in plain text.\n if (state.parser.tokenizer.state === TokenizerMode.PLAINTEXT) return\n\n resetTokenizer(state, pointEnd(node))\n\n /** @type {Token.TagToken} */\n const tag = {\n type: Token.TokenType.END_TAG,\n tagName,\n tagID: html.getTagID(tagName),\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: createParse5Location(node)\n }\n\n // The HTML parsing algorithm works by doing half of the state management in\n // the tokenizer and half in the parser.\n // We can’t use the tokenizer here, as we don’t have strings.\n // So we act *as if* the tokenizer emits tokens:\n\n // @ts-expect-error: private.\n state.parser.currentToken = tag\n // @ts-expect-error: private.\n state.parser._processToken(state.parser.currentToken)\n\n // …but then we still need a bunch of work that the tokenizer would normally\n // do, such as:\n\n // Switch back to the data state after alternative states that don’t accept\n // tags:\n if (\n // Current element is closed.\n tagName === state.parser.tokenizer.lastStartTagName &&\n // `<textarea>` and `<title>`\n (state.parser.tokenizer.state === TokenizerMode.RCDATA ||\n // `<iframe>`, `<noembed>`, `<noframes>`, `<style>`, `<xmp>`\n state.parser.tokenizer.state === TokenizerMode.RAWTEXT ||\n // `<script>`\n state.parser.tokenizer.state === TokenizerMode.SCRIPT_DATA)\n // Note: `<plaintext>` not needed, as it’s the last element.\n ) {\n state.parser.tokenizer.state = TokenizerMode.DATA\n }\n}\n\n/**\n * Check if `node` represents a whole document or a fragment.\n *\n * @param {Nodes} node\n * hast node.\n * @returns {boolean}\n * Whether this represents a whole document or a fragment.\n */\nfunction documentMode(node) {\n const head = node.type === 'root' ? node.children[0] : node\n return Boolean(\n head &&\n (head.type === 'doctype' ||\n (head.type === 'element' && head.tagName.toLowerCase() === 'html'))\n )\n}\n\n/**\n * Get a `parse5` location from a node.\n *\n * @param {Nodes | Stitch} node\n * hast node.\n * @returns {Token.Location}\n * `parse5` location.\n */\nfunction createParse5Location(node) {\n const start = pointStart(node) || {\n line: undefined,\n column: undefined,\n offset: undefined\n }\n const end = pointEnd(node) || {\n line: undefined,\n column: undefined,\n offset: undefined\n }\n\n /** @type {Record<keyof Token.Location, number | undefined>} */\n const location = {\n startLine: start.line,\n startCol: start.column,\n startOffset: start.offset,\n endLine: end.line,\n endCol: end.column,\n endOffset: end.offset\n }\n\n // @ts-expect-error: unist point values can be `undefined` in hast, which\n // `parse5` types don’t want.\n return location\n}\n\n/**\n * @template {Nodes} NodeType\n * Node type.\n * @param {NodeType} node\n * Node to clone.\n * @returns {NodeType}\n * Cloned node, without children.\n */\nfunction cloneWithoutChildren(node) {\n return 'children' in node\n ? structuredClone({...node, children: []})\n : structuredClone(node)\n}\n","/**\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast-util-raw').Options} RawOptions\n * @typedef {import('vfile').VFile} VFile\n */\n\n/**\n * @typedef {Omit<RawOptions, 'file'>} Options\n * Configuration.\n */\n\nimport {raw} from 'hast-util-raw'\n\n/**\n * Parse the tree (and raw nodes) again, keeping positional info okay.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns\n * Transform.\n */\nexport default function rehypeRaw(options) {\n /**\n * @param {Root} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {Root}\n * New tree.\n */\n return function (tree, file) {\n // Assume root in -> root out.\n const result = /** @type {Root} */ (raw(tree, {...options, file}))\n return result\n }\n}\n","import { createContext, useContext } from \"react\";\n\n/** Common text file extensions that PPM can open as editor tabs */\nconst FILE_EXTS = \"ts|tsx|js|jsx|mjs|cjs|py|json|md|mdx|yaml|yml|toml|css|scss|less|html|htm|sh|bash|zsh|go|rs|sql|rb|java|kt|swift|c|cpp|h|hpp|cs|vue|svelte|txt|env|cfg|conf|ini|xml|csv|log|dockerfile|makefile|gradle\";\nexport const FILE_EXT_RE = new RegExp(`\\\\.(${FILE_EXTS})$`, \"i\");\n/** Glob/regex chars that indicate a pattern, not a real file */\nexport const GLOB_CHARS_RE = /[*?{}\\[\\]]/;\n/** Detect local absolute file paths (Unix or Windows) */\nexport const LOCAL_PATH_RE = /^(\\/|[A-Za-z]:[/\\\\])/;\n\nexport interface MdContextValue {\n projectName?: string;\n codeActions: boolean;\n openFileOrSearch: (path: string) => void;\n openImageOverlay: (url: string, alt: string) => void;\n openDiagramOverlay: (svg: string) => void;\n}\n\nexport const MdContext = createContext<MdContextValue>(null!);\nexport const useMdContext = () => useContext(MdContext);\n","import { useState, useEffect, useRef, type ReactNode } from \"react\";\nimport { useMdContext, FILE_EXT_RE, GLOB_CHARS_RE } from \"./markdown-context\";\nimport { useTabStore } from \"@/stores/tab-store\";\n\nconst MERMAID_KEYWORDS = /^(sequenceDiagram|flowchart|graph\\s|classDiagram|stateDiagram|erDiagram|journey|gantt|pie|quadrantChart|requirementDiagram|gitGraph|mindmap|timeline|sankey|xychart|block-beta|packet-beta|architecture-beta|kanban)\\b/;\n\nlet mermaidPromise: Promise<typeof import(\"mermaid\")[\"default\"]> | null = null;\nfunction getMermaid() {\n if (!mermaidPromise) {\n mermaidPromise = import(\"mermaid\").then((mod) => {\n mod.default.initialize({ startOnLoad: false, theme: \"default\", securityLevel: \"loose\", fontFamily: \"ui-sans-serif, system-ui, sans-serif\" });\n return mod.default;\n });\n }\n return mermaidPromise;\n}\n\n/** Extract plain text from a hast node tree */\nfunction hastToText(node: any): string {\n if (!node) return \"\";\n if (node.type === \"text\") return node.value ?? \"\";\n if (node.children) return node.children.map(hastToText).join(\"\");\n return \"\";\n}\n\n/** Pre — code block wrapper with mermaid detection and action buttons */\nexport function MdPre({ children, node, ...rest }: any) {\n const { codeActions, projectName, openDiagramOverlay } = useMdContext();\n const openTab = useTabStore((s) => s.openTab);\n\n const codeNode = node?.children?.[0];\n const langClass = (codeNode?.properties?.className ?? []).find((c: string) => c.startsWith(\"language-\"));\n const lang = langClass?.replace(\"language-\", \"\");\n const text = hastToText(codeNode);\n\n // Mermaid detection\n if (lang === \"mermaid\" || (!lang && MERMAID_KEYWORDS.test(text.trim()))) {\n return <MermaidDiagram source={text.trim()} />;\n }\n\n const isBash = /^(bash|sh|shell|zsh)$/.test(lang || \"\") || (!lang && text.startsWith(\"$\"));\n\n return (\n <div className=\"relative group\">\n <pre {...rest}>\n {children}\n </pre>\n {codeActions && (\n <div className=\"code-actions absolute top-1 right-1 flex gap-1\">\n <ActionBtn title=\"Copy\" icon={<CopyIcon />} activeIcon={<CheckIcon />} onClick={() => navigator.clipboard.writeText(text)} />\n {isBash && projectName && (\n <ActionBtn\n title=\"Run in terminal\"\n icon={<PlayIcon />}\n onClick={() => {\n navigator.clipboard.writeText(text.replace(/^\\$\\s*/gm, \"\"));\n openTab({ type: \"terminal\", title: \"Terminal\", metadata: { projectName }, projectId: projectName, closable: true });\n }}\n />\n )}\n </div>\n )}\n </div>\n );\n}\n\n/** Code — inline code with file clicking; block code passes through */\nexport function MdCode({ className, children, node, ...rest }: any) {\n const { openFileOrSearch } = useMdContext();\n\n // Block code (has language/hljs class from rehype-highlight) — render as-is\n if (className) return <code className={className} {...rest}>{children}</code>;\n\n // Inline code — check for clickable file paths\n const text = String(children ?? \"\").trim();\n if (text && !text.includes(\" \") && !GLOB_CHARS_RE.test(text) && FILE_EXT_RE.test(text)) {\n return (\n <code\n onClick={() => openFileOrSearch(text)}\n style={{ cursor: \"pointer\", textDecoration: \"underline\", textDecorationStyle: \"dotted\" as const }}\n {...rest}\n >\n {children}\n </code>\n );\n }\n\n return <code {...rest}>{children}</code>;\n}\n\n/** Mermaid diagram renderer with click-to-expand */\nfunction MermaidDiagram({ source }: { source: string }) {\n const { openDiagramOverlay } = useMdContext();\n const [svg, setSvg] = useState<string | null>(null);\n\n useEffect(() => {\n const id = `mermaid-${Math.random().toString(36).slice(2, 9)}`;\n getMermaid().then((m) => m.render(id, source)).then(({ svg }) => setSvg(svg)).catch(() => {});\n }, [source]);\n\n if (!svg) return <pre><code>{source}</code></pre>;\n\n return (\n <div\n className=\"mermaid-diagram group relative cursor-pointer rounded-lg border border-border bg-white dark:bg-zinc-50 p-3 overflow-x-auto my-2\"\n onClick={() => openDiagramOverlay(svg)}\n >\n <div dangerouslySetInnerHTML={{ __html: svg }} />\n <div className=\"absolute top-2 right-2 flex items-center gap-1 px-2 py-1 rounded bg-black/60 text-white text-xs can-hover:opacity-0 can-hover:group-hover:opacity-100 transition-opacity pointer-events-none\">\n Click to expand\n </div>\n </div>\n );\n}\n\n/** Reusable code-block action button with optional active state */\nfunction ActionBtn({ title, icon, activeIcon, onClick }: { title: string; icon: ReactNode; activeIcon?: ReactNode; onClick: () => void }) {\n const [active, setActive] = useState(false);\n return (\n <button\n className=\"flex items-center justify-center size-6 rounded bg-surface-elevated/80 hover:bg-surface-elevated text-text-secondary hover:text-text-primary transition-colors border border-border/50\"\n title={title}\n onClick={() => { onClick(); if (activeIcon) { setActive(true); setTimeout(() => setActive(false), 2000); } }}\n >\n {active && activeIcon ? activeIcon : icon}\n </button>\n );\n}\n\nconst CopyIcon = () => (\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" /><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </svg>\n);\n\nconst CheckIcon = () => (\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n);\n\nconst PlayIcon = () => (\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"4 17 10 11 4 5\" /><line x1=\"12\" y1=\"19\" x2=\"20\" y2=\"19\" />\n </svg>\n);\n","import { useMemo, useCallback, useState, useEffect } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport remarkMath from \"remark-math\";\nimport remarkBreaks from \"remark-breaks\";\nimport rehypeRaw from \"rehype-raw\";\nimport rehypeKatex from \"rehype-katex\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport { useTabStore } from \"@/stores/tab-store\";\nimport { useFileStore, type FileNode } from \"@/stores/file-store\";\nimport { useImageOverlay } from \"@/stores/image-overlay-store\";\nimport { useDiagramOverlay } from \"@/stores/diagram-overlay-store\";\nimport { openCommandPalette } from \"@/hooks/use-global-keybindings\";\nimport { api, projectUrl, getAuthToken } from \"@/lib/api-client\";\nimport { basename } from \"@/lib/utils\";\nimport { MdContext, useMdContext, FILE_EXT_RE, GLOB_CHARS_RE, LOCAL_PATH_RE } from \"./markdown-context\";\nimport { MdPre, MdCode } from \"./markdown-code-block\";\n\ninterface MarkdownRendererProps {\n content: string;\n projectName?: string;\n className?: string;\n codeActions?: boolean;\n isStreaming?: boolean;\n}\n\n/** Plugin arrays — stable references to avoid re-creating on each render */\nconst remarkPlugins = [remarkGfm, remarkMath, remarkBreaks] as any;\nconst rehypePlugins = [rehypeRaw, rehypeKatex, rehypeHighlight] as any;\n\n/** Component map — stable references; dynamic state flows through MdContext */\nconst mdComponents = { a: MdLink, img: MdImage, pre: MdPre, code: MdCode, table: MdTable };\n\nfunction findInTree(nodes: FileNode[], name: string): string[] {\n const results: string[] = [];\n for (const n of nodes) {\n if (n.type === \"file\" && n.name === name) results.push(n.path);\n if (n.children) results.push(...findInTree(n.children, name));\n }\n return results;\n}\n\nexport function MarkdownRenderer({ content, projectName, className = \"\", codeActions = false, isStreaming = false }: MarkdownRendererProps) {\n const openTab = useTabStore((s) => s.openTab);\n const fileTree = useFileStore((s) => s.tree);\n const openImageOverlayFn = useImageOverlay((s) => s.open);\n const openDiagramOverlayFn = useDiagramOverlay((s) => s.open);\n\n const openFileOrSearch = useCallback((filePath: string) => {\n if (!filePath) return;\n const isAbsolute = /^(\\/|[A-Za-z]:[/\\\\])/.test(filePath);\n const isRelative = /^(\\.\\/|\\.\\.\\/)/.test(filePath);\n const fileName = basename(filePath);\n\n const searchAndOpen = (fp: string) => {\n const matches = findInTree(fileTree, basename(fp));\n if (matches.length === 1) {\n openTab({ type: \"editor\", title: basename(fp), metadata: { filePath: matches[0], projectName }, projectId: projectName ?? null, closable: true });\n } else {\n openCommandPalette(fp);\n }\n };\n\n if (isAbsolute) {\n const meta: Record<string, unknown> = { filePath };\n if (projectName) meta.projectName = projectName;\n api.get(`/api/fs/read?path=${encodeURIComponent(filePath)}`).then(() => {\n openTab({ type: \"editor\", title: fileName, metadata: meta, projectId: null, closable: true });\n }).catch(() => openCommandPalette(filePath));\n return;\n }\n\n if (isRelative && projectName) {\n api.get(`${projectUrl(projectName)}/files/read?path=${encodeURIComponent(filePath)}`)\n .then(() => openTab({ type: \"editor\", title: fileName, metadata: { filePath, projectName }, projectId: projectName, closable: true }))\n .catch(() => searchAndOpen(filePath));\n return;\n }\n\n searchAndOpen(filePath);\n }, [openTab, fileTree, projectName]);\n\n const ctx = useMemo(() => ({\n projectName, codeActions, openFileOrSearch,\n openImageOverlay: openImageOverlayFn,\n openDiagramOverlay: openDiagramOverlayFn,\n }), [projectName, codeActions, openFileOrSearch, openImageOverlayFn, openDiagramOverlayFn]);\n\n return (\n <MdContext.Provider value={ctx}>\n <div className={`markdown-content prose-sm ${isStreaming ? \"is-streaming\" : \"\"} ${className}`}>\n <ReactMarkdown remarkPlugins={remarkPlugins} rehypePlugins={rehypePlugins} components={mdComponents}>\n {content}\n </ReactMarkdown>\n </div>\n </MdContext.Provider>\n );\n}\n\n/** Link — external links open in new tab; file paths open in editor */\nfunction MdLink({ href, children, node, ...props }: any) {\n const { openFileOrSearch } = useMdContext();\n if (href?.match(/^https?:\\/\\//)) {\n return <a href={href} target=\"_blank\" rel=\"noopener noreferrer\" {...props}>{children}</a>;\n }\n if (href && !GLOB_CHARS_RE.test(href) && FILE_EXT_RE.test(href)) {\n return <a href={href} onClick={(e: React.MouseEvent) => { e.preventDefault(); openFileOrSearch(href); }} {...props}>{children}</a>;\n }\n return <a href={href} {...props}>{children}</a>;\n}\n\n/** Image — auth-loads local file paths via API, click to open overlay */\nfunction MdImage({ src, alt, node, ...props }: any) {\n const { openImageOverlay } = useMdContext();\n const [blobUrl, setBlobUrl] = useState<string | null>(null);\n const [loading, setLoading] = useState(false);\n\n useEffect(() => {\n if (!src || !LOCAL_PATH_RE.test(src)) return;\n setLoading(true);\n let cancelled = false;\n let url: string | null = null;\n const token = getAuthToken();\n fetch(`/api/fs/raw?path=${encodeURIComponent(src)}`, {\n headers: token ? { Authorization: `Bearer ${token}` } : {},\n })\n .then((r) => { if (!r.ok) throw new Error(); return r.blob(); })\n .then((blob) => {\n if (cancelled) return;\n url = URL.createObjectURL(blob);\n setBlobUrl(url);\n setLoading(false);\n })\n .catch(() => { if (!cancelled) setLoading(false); });\n return () => { cancelled = true; if (url) URL.revokeObjectURL(url); };\n }, [src]);\n\n const displaySrc = blobUrl || src || \"\";\n const name = alt || (src ? basename(src) : \"\");\n\n return (\n <img\n src={displaySrc}\n alt={name}\n onClick={() => displaySrc && openImageOverlay(displaySrc, name)}\n className=\"max-h-[400px] max-w-full object-contain rounded-md border border-border cursor-pointer\"\n style={{ opacity: loading ? 0.3 : 1, minHeight: loading ? 48 : undefined, minWidth: loading ? 48 : undefined }}\n {...props}\n />\n );\n}\n\n/** Table — wrap in scrollable container */\nfunction MdTable({ children, node, ...props }: any) {\n return <div className=\"table-scroll-wrapper overflow-x-auto\"><table {...props}>{children}</table></div>;\n}\n"],"file":"markdown-renderer-CNQ8I0Dk.js"}