@rankingcoach/vanguard 1.3.1 → 1.4.1

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 (368) hide show
  1. package/dist/index-AMPMMidnightParser.js +1 -1
  2. package/dist/index-AMPMParser.js +1 -1
  3. package/dist/index-Accordion2.js +1 -1
  4. package/dist/index-AccordionDetails.js +1 -1
  5. package/dist/index-AccordionSummary.js +1 -1
  6. package/dist/index-AiGlow.js +1 -1
  7. package/dist/index-AppBar2.js +1 -1
  8. package/dist/index-Autocomplete.js +2 -2
  9. package/dist/index-Autocomplete2.js +1 -1
  10. package/dist/index-Backdrop.js +1 -1
  11. package/dist/index-BasePopper.js +1 -1
  12. package/dist/index-Box.js +1 -1
  13. package/dist/index-Button2.js +1 -1
  14. package/dist/index-ButtonBase.js +1 -1
  15. package/dist/index-CSSTransition.js +1 -1
  16. package/dist/index-Calendar.js +20 -20
  17. package/dist/index-CalendarPicker.js +1 -1
  18. package/dist/index-Chip.js +1 -1
  19. package/dist/index-ClickAwayListener.js +1 -1
  20. package/dist/index-ClockPicker.js +1 -1
  21. package/dist/index-Collapse2.js +1 -1
  22. package/dist/index-ControlledValuePlugin.js +1 -1
  23. package/dist/index-CreditCard.js +1 -1
  24. package/dist/index-DateInput.js +5 -5
  25. package/dist/index-DateParser.js +1 -1
  26. package/dist/index-DatePicker2.js +1 -1
  27. package/dist/index-DateRange2.js +7 -7
  28. package/dist/index-DateRangePicker2.js +1 -1
  29. package/dist/index-DayCell.js +5 -5
  30. package/dist/index-DayOfYearParser.js +1 -1
  31. package/dist/index-DayParser.js +1 -1
  32. package/dist/index-DayPeriodParser.js +1 -1
  33. package/dist/index-DefaultPropsProvider.js +1 -1
  34. package/dist/index-DefaultPropsProvider2.js +1 -1
  35. package/dist/index-DefaultValuePlugin.js +1 -1
  36. package/dist/index-DefinedRange.js +1 -1
  37. package/dist/index-DesktopDatePicker.js +1 -1
  38. package/dist/index-Dialog.js +1 -1
  39. package/dist/index-DialogActions.js +1 -1
  40. package/dist/index-DialogContent.js +1 -1
  41. package/dist/index-Drawer.js +1 -1
  42. package/dist/index-Drawer2.js +1 -1
  43. package/dist/index-EraParser.js +1 -1
  44. package/dist/index-ExtendedYearParser.js +1 -1
  45. package/dist/index-Fade.js +1 -1
  46. package/dist/index-FilledInput.js +1 -1
  47. package/dist/index-FocusTrap.js +1 -1
  48. package/dist/index-FormControl2.js +1 -1
  49. package/dist/index-FormHelperText.js +1 -1
  50. package/dist/index-FormLabel.js +1 -1
  51. package/dist/index-FractionOfSecondParser.js +1 -1
  52. package/dist/index-GlobalStyles.js +1 -1
  53. package/dist/index-GlobalStyles2.js +1 -1
  54. package/dist/index-GlobalStyles3.js +1 -1
  55. package/dist/index-Grid.js +1 -1
  56. package/dist/index-Grow.js +1 -1
  57. package/dist/index-Header.js +1 -1
  58. package/dist/index-Hour0To11Parser.js +1 -1
  59. package/dist/index-Hour0to23Parser.js +1 -1
  60. package/dist/index-Hour1To24Parser.js +1 -1
  61. package/dist/index-Hour1to12Parser.js +1 -1
  62. package/dist/index-HyperlinkPlugin.js +1 -1
  63. package/dist/index-ISODayParser.js +1 -1
  64. package/dist/index-ISOTimezoneParser.js +1 -1
  65. package/dist/index-ISOTimezoneWithZParser.js +1 -1
  66. package/dist/index-ISOWeekParser.js +1 -1
  67. package/dist/index-ISOWeekYearParser.js +1 -1
  68. package/dist/index-IconButton2.js +1 -1
  69. package/dist/index-Input2.js +1 -1
  70. package/dist/index-InputAdornment.js +1 -1
  71. package/dist/index-InputBase.js +48 -43
  72. package/dist/index-InputBase2.js +1 -1
  73. package/dist/index-InputLabel.js +1 -1
  74. package/dist/index-InputRangeField.js +1 -1
  75. package/dist/index-KeywordNode.js +1 -1
  76. package/dist/index-KeywordPlugin.js +1 -1
  77. package/dist/index-LinearProgress.js +1 -1
  78. package/dist/index-List2.js +1 -1
  79. package/dist/index-ListSubheader.js +1 -1
  80. package/dist/index-LocalDayParser.js +1 -1
  81. package/dist/index-LocalWeekParser.js +1 -1
  82. package/dist/index-LocalWeekYearParser.js +1 -1
  83. package/dist/index-LocalizationProvider.js +1 -1
  84. package/dist/index-LoginButton.js +1 -1
  85. package/dist/index-Menu.js +1 -1
  86. package/dist/index-MenuItem.js +1 -1
  87. package/dist/index-MenuList.js +1 -1
  88. package/dist/index-MinuteParser.js +1 -1
  89. package/dist/index-MobileDatePicker.js +1 -1
  90. package/dist/index-Modal2.js +1 -1
  91. package/dist/index-Month.js +11 -11
  92. package/dist/index-MonthParser.js +1 -1
  93. package/dist/index-MonthPicker.js +1 -1
  94. package/dist/index-NativeSelectInput.js +1 -1
  95. package/dist/index-NotchedOutline.js +1 -1
  96. package/dist/index-OnChangeContentPlugin.js +1 -1
  97. package/dist/index-OnFocusOnBlurPlugin.js +1 -1
  98. package/dist/index-OutlinedInput.js +1 -1
  99. package/dist/index-Paper.js +1 -1
  100. package/dist/index-Parser2.js +314 -255
  101. package/dist/index-Parser3.js +129 -2
  102. package/dist/index-PickersDay.js +1 -1
  103. package/dist/index-Popover2.js +1 -1
  104. package/dist/index-Popper.js +1 -1
  105. package/dist/index-Portal.js +1 -1
  106. package/dist/index-PropTypes.js +1 -1
  107. package/dist/index-QuarterParser.js +1 -1
  108. package/dist/index-QuoteContainer.js +1 -1
  109. package/dist/index-Ripple.js +1 -1
  110. package/dist/index-RtlProvider.js +1 -1
  111. package/dist/index-ScrollbarSize.js +1 -1
  112. package/dist/index-SecondParser.js +1 -1
  113. package/dist/index-Select2.js +1 -1
  114. package/dist/index-SelectInput2.js +1 -1
  115. package/dist/index-Skeleton2.js +1 -1
  116. package/dist/index-Slide.js +1 -1
  117. package/dist/index-Slider2.js +1 -1
  118. package/dist/index-SliderValueLabel.js +1 -1
  119. package/dist/index-Snackbar2.js +1 -1
  120. package/dist/index-SnackbarContent.js +1 -1
  121. package/dist/index-StandAloneLocalDayParser.js +1 -1
  122. package/dist/index-StandAloneMonthParser.js +1 -1
  123. package/dist/index-StandAloneQuarterParser.js +1 -1
  124. package/dist/index-StyledEngineProvider.js +1 -1
  125. package/dist/index-StyledSVG2.js +1 -1
  126. package/dist/index-SvgIcon.js +1 -1
  127. package/dist/index-Tab2.js +1 -1
  128. package/dist/index-TabScrollButton.js +1 -1
  129. package/dist/index-Tabs2.js +1 -1
  130. package/dist/index-Text.js +18 -18
  131. package/dist/index-TextField.js +1 -1
  132. package/dist/index-TextHighlighted.js +23 -19
  133. package/dist/index-TextareaAutosize.js +1 -1
  134. package/dist/index-TimestampMillisecondsParser.js +1 -1
  135. package/dist/index-TimestampSecondsParser.js +1 -1
  136. package/dist/index-ToggleButton2.js +1 -1
  137. package/dist/index-ToggleButtonGroup2.js +1 -1
  138. package/dist/index-Tokenizer.js +411 -334
  139. package/dist/index-Tokenizer2.js +139 -2
  140. package/dist/index-Toolbar2.js +1 -1
  141. package/dist/index-Tooltip.js +1 -1
  142. package/dist/index-TouchRipple.js +1 -1
  143. package/dist/index-Transition.js +1 -1
  144. package/dist/index-TransitionGroup.js +1 -1
  145. package/dist/index-Typography.js +1 -1
  146. package/dist/index-YearParser.js +1 -1
  147. package/dist/index-YearPicker.js +1 -1
  148. package/dist/index-_virtual12.js +1 -1
  149. package/dist/index-_virtual15.js +2 -5
  150. package/dist/index-_virtual16.js +5 -3
  151. package/dist/index-_virtual17.js +5 -2
  152. package/dist/index-_virtual18.js +2 -7
  153. package/dist/index-_virtual19.js +5 -2
  154. package/dist/index-_virtual2.js +5 -5
  155. package/dist/index-_virtual20.js +2 -5
  156. package/dist/index-_virtual21.js +2 -2
  157. package/dist/index-_virtual22.js +2 -2
  158. package/dist/index-_virtual23.js +2 -3
  159. package/dist/index-_virtual24.js +2 -2
  160. package/dist/index-_virtual25.js +2 -2
  161. package/dist/index-_virtual26.js +2 -2
  162. package/dist/index-_virtual27.js +2 -2
  163. package/dist/index-_virtual28.js +2 -2
  164. package/dist/index-_virtual3.js +4 -4
  165. package/dist/index-_virtual30.js +2 -2
  166. package/dist/index-_virtual31.js +2 -2
  167. package/dist/index-_virtual32.js +3 -2
  168. package/dist/index-_virtual34.js +2 -2
  169. package/dist/index-_virtual35.js +2 -4
  170. package/dist/index-_virtual36.js +1 -1
  171. package/dist/index-_virtual37.js +1 -1
  172. package/dist/index-_virtual38.js +1 -1
  173. package/dist/index-_virtual39.js +1 -1
  174. package/dist/index-_virtual4.js +5 -5
  175. package/dist/index-_virtual40.js +1 -1
  176. package/dist/index-_virtual41.js +4 -2
  177. package/dist/index-_virtual42.js +2 -4
  178. package/dist/index-_virtual43.js +1 -1
  179. package/dist/index-_virtual44.js +1 -1
  180. package/dist/index-_virtual45.js +1 -1
  181. package/dist/index-_virtual46.js +1 -1
  182. package/dist/index-_virtual47.js +1 -1
  183. package/dist/index-_virtual48.js +1 -1
  184. package/dist/index-_virtual49.js +1 -1
  185. package/dist/index-_virtual50.js +1 -1
  186. package/dist/index-_virtual51.js +1 -1
  187. package/dist/index-_virtual52.js +1 -1
  188. package/dist/index-_virtual53.js +1 -1
  189. package/dist/index-_virtual54.js +1 -1
  190. package/dist/index-_virtual55.js +1 -1
  191. package/dist/index-_virtual56.js +1 -1
  192. package/dist/index-_virtual57.js +1 -1
  193. package/dist/index-_virtual58.js +4 -2
  194. package/dist/index-_virtual60.js +2 -4
  195. package/dist/index-_virtual61.js +1 -1
  196. package/dist/index-_virtual62.js +4 -2
  197. package/dist/index-_virtual63.js +2 -2
  198. package/dist/index-_virtual69.js +2 -2
  199. package/dist/index-_virtual70.js +4 -2
  200. package/dist/index-_virtual71.js +2 -4
  201. package/dist/index-_virtual72.js +4 -2
  202. package/dist/index-_virtual73.js +1 -1
  203. package/dist/index-_virtual74.js +1 -1
  204. package/dist/index-_virtual75.js +2 -4
  205. package/dist/index-_virtual76.js +2 -2
  206. package/dist/index-_virtual77.js +4 -2
  207. package/dist/index-_virtual78.js +1 -1
  208. package/dist/index-_virtual79.js +1 -1
  209. package/dist/index-_virtual80.js +1 -1
  210. package/dist/index-_virtual81.js +1 -1
  211. package/dist/index-_virtual82.js +1 -1
  212. package/dist/index-_virtual83.js +1 -1
  213. package/dist/index-_virtual84.js +1 -1
  214. package/dist/index-_virtual85.js +2 -4
  215. package/dist/index-_virtual86.js +2 -2
  216. package/dist/index-accessibility.js +1 -1
  217. package/dist/index-applyInternationalSeparatorStyle.js +1 -1
  218. package/dist/index-attributes-to-props.js +1 -1
  219. package/dist/index-cjs.js +19 -75
  220. package/dist/index-colorManipulator3.js +2 -2
  221. package/dist/index-constants.js +38 -8
  222. package/dist/index-constants2.js +8 -38
  223. package/dist/index-createExtensionPattern.js +1 -1
  224. package/dist/index-createStyled2.js +6 -6
  225. package/dist/index-decode-data-html.js +5 -11
  226. package/dist/index-decode-data-xml.js +5 -11
  227. package/dist/index-decode.js +263 -216
  228. package/dist/index-decode_codepoint.js +43 -53
  229. package/dist/index-defaultRanges.js +10 -10
  230. package/dist/index-dist4.js +1 -1
  231. package/dist/index-dist5.js +1 -1
  232. package/dist/index-elementAcceptingRef.js +1 -1
  233. package/dist/index-elementTypeAcceptingRef.js +1 -1
  234. package/dist/index-emotion-cache.browser.esm.js +2 -2
  235. package/dist/index-escape.js +43 -48
  236. package/dist/index-esm2.js +108 -129
  237. package/dist/index-esm3.js +12 -301
  238. package/dist/index-esm4.js +135 -17
  239. package/dist/index-esm5.js +303 -0
  240. package/dist/index-esm6.js +21 -0
  241. package/dist/index-esm7.js +102 -0
  242. package/dist/index-exenv.js +1 -1
  243. package/dist/index-extractCountryCallingCode.js +1 -1
  244. package/dist/index-extractPhoneContext.js +1 -1
  245. package/dist/index-foreignNames.js +101 -108
  246. package/dist/index-helpers3.js +1 -1
  247. package/dist/index-http.store.js +1 -1
  248. package/dist/index-isViablePhoneNumber.js +1 -1
  249. package/dist/index-keycode.js +1 -1
  250. package/dist/index-lib.js +2 -2
  251. package/dist/index-lib2.js +424 -111
  252. package/dist/index-lib3.js +14 -433
  253. package/dist/index-lib4.js +120 -14
  254. package/dist/index-lib5.js +10 -69
  255. package/dist/index-mpd-parser.es.js +1 -1
  256. package/dist/index-node.js +1 -1
  257. package/dist/index-node2.js +1 -1
  258. package/dist/index-parse2.js +1 -1
  259. package/dist/index-parse3.js +122 -20
  260. package/dist/index-refType.js +1 -1
  261. package/dist/index-responsivePropType.js +1 -1
  262. package/dist/index-sanitize-html.js +91 -48
  263. package/dist/index-stripIddPrefix.js +1 -1
  264. package/dist/index-style-to-object.js +1 -1
  265. package/dist/index-text-animate-words-style.js +12 -12
  266. package/dist/index-tiny-emitter.js +1 -1
  267. package/dist/index-useHyperlinkEditor.js +1 -1
  268. package/dist/index-useLexicalToolbar.js +1 -1
  269. package/dist/index-useRteAiAssistant-selection.js +5 -5
  270. package/dist/index-useThemeWithoutDefault3.js +1 -1
  271. package/dist/index-utilities.js +1 -1
  272. package/dist/index-utilities2.js +1 -1
  273. package/dist/index-utils2.js +1 -1
  274. package/dist/index-utils6.js +7 -7
  275. package/dist/index.js +428 -426
  276. package/dist/types/core/RichTextEditor/stories/RichTextEditorStory.story.d.ts +2 -0
  277. package/dist/types/core/RichTextEditor/stories/RichTextEditorWithXSSAttackStory.story.d.ts +2 -0
  278. package/dist/types/core/RichTextEditor/stories/_RichTextEditor.default.d.ts +4 -0
  279. package/dist/types/core/RichTextEditor/stories/bootstrap/richtexteditor.test.slice.d.ts +1 -0
  280. package/dist/types/core/TextHighlighted/stories/TextHighlightedStory.story.d.ts +2 -0
  281. package/dist/types/core/TextHighlighted/stories/TextHighlightedStory2.story.d.ts +2 -0
  282. package/dist/types/core/TextHighlighted/stories/TextHighlightedWithEmphasisStory.story.d.ts +2 -0
  283. package/dist/types/core/TextHighlighted/stories/TextHighlightedWithXSSAttackStory.story.d.ts +2 -0
  284. package/dist/types/core/TextHighlighted/stories/_TextHighlighted.default.d.ts +7 -0
  285. package/dist/types/core/_internal/InputBase/stories/HighlightLengthExceededTest.story.d.ts +2 -0
  286. package/dist/types/core/_internal/InputBase/stories/HighlightUrlTest.story.d.ts +2 -0
  287. package/dist/types/core/_internal/InputBase/stories/HighlightWordsTest.story.d.ts +2 -0
  288. package/dist/types/helpers/sanitize-html.d.ts +18 -3
  289. package/dist/types/index.d.ts +2 -0
  290. package/dist/vanguard-asset-analysis.json +1 -1
  291. package/dist-wordpress/index.js +23651 -22245
  292. package/package.json +5 -2
  293. package/scripts/check-meta-coverage.js +117 -0
  294. package/scripts/generate-exports-props.js +855 -0
  295. package/dist/index-Parser5.js +0 -131
  296. package/dist/index-Tokenizer3.js +0 -141
  297. package/dist/index-_virtual87.js +0 -4
  298. package/dist/index-_virtual88.js +0 -4
  299. package/dist/index-_virtual89.js +0 -4
  300. package/dist/index-_virtual90.js +0 -4
  301. package/dist/index-_virtual91.js +0 -4
  302. package/dist/index-at-rule.js +0 -22
  303. package/dist/index-cjs2.js +0 -23
  304. package/dist/index-comment.js +0 -16
  305. package/dist/index-container.js +0 -223
  306. package/dist/index-css-syntax-error.js +0 -56
  307. package/dist/index-declaration.js +0 -19
  308. package/dist/index-decode-data-html2.js +0 -4
  309. package/dist/index-decode-data-xml2.js +0 -4
  310. package/dist/index-decode2.js +0 -4
  311. package/dist/index-decode_codepoint2.js +0 -4
  312. package/dist/index-document3.js +0 -23
  313. package/dist/index-encode-html.js +0 -15
  314. package/dist/index-encode-html2.js +0 -4
  315. package/dist/index-encode.js +0 -49
  316. package/dist/index-encode2.js +0 -4
  317. package/dist/index-escape-string-regexp.js +0 -11
  318. package/dist/index-escape2.js +0 -4
  319. package/dist/index-feeds.js +0 -92
  320. package/dist/index-feeds2.js +0 -4
  321. package/dist/index-foreignNames2.js +0 -4
  322. package/dist/index-fromJSON.js +0 -46
  323. package/dist/index-helpers4.js +0 -54
  324. package/dist/index-helpers5.js +0 -4
  325. package/dist/index-input3.js +0 -139
  326. package/dist/index-is-plain-object.js +0 -17
  327. package/dist/index-is-plain-object2.js +0 -4
  328. package/dist/index-lazy-result.js +0 -343
  329. package/dist/index-legacy.js +0 -75
  330. package/dist/index-legacy2.js +0 -4
  331. package/dist/index-lib6.js +0 -13
  332. package/dist/index-lib7.js +0 -43
  333. package/dist/index-lib8.js +0 -147
  334. package/dist/index-lib9.js +0 -90
  335. package/dist/index-list3.js +0 -25
  336. package/dist/index-manipulation.js +0 -61
  337. package/dist/index-manipulation2.js +0 -4
  338. package/dist/index-map-generator.js +0 -171
  339. package/dist/index-no-work-result.js +0 -94
  340. package/dist/index-node4.js +0 -259
  341. package/dist/index-non-secure.js +0 -20
  342. package/dist/index-parse-srcset.js +0 -71
  343. package/dist/index-parse-srcset2.js +0 -4
  344. package/dist/index-parse4.js +0 -127
  345. package/dist/index-parser4.js +0 -322
  346. package/dist/index-picocolors.browser.js +0 -13
  347. package/dist/index-picocolors.browser2.js +0 -4
  348. package/dist/index-postcss.js +0 -46
  349. package/dist/index-previous-map.js +0 -92
  350. package/dist/index-processor.js +0 -43
  351. package/dist/index-querying.js +0 -63
  352. package/dist/index-querying2.js +0 -4
  353. package/dist/index-result.js +0 -30
  354. package/dist/index-root.js +0 -38
  355. package/dist/index-rule.js +0 -24
  356. package/dist/index-sanitize-html2.js +0 -672
  357. package/dist/index-stringifier.js +0 -196
  358. package/dist/index-stringify.js +0 -14
  359. package/dist/index-stringify2.js +0 -36
  360. package/dist/index-stringify3.js +0 -4
  361. package/dist/index-symbols.js +0 -8
  362. package/dist/index-symbols2.js +0 -4
  363. package/dist/index-tokenize.js +0 -114
  364. package/dist/index-traversal.js +0 -48
  365. package/dist/index-traversal2.js +0 -4
  366. package/dist/index-warn-once.js +0 -12
  367. package/dist/index-warning2.js +0 -25
  368. /package/dist/{index-Parser6.js → index-Parser4.js} +0 -0
@@ -1,343 +1,420 @@
1
- import { __exports as m } from "./index-Tokenizer2.js";
2
- import { __require as g } from "./index-decode.js";
3
- var p;
4
- function A() {
5
- return p ? m : (p = 1, (function(c) {
6
- Object.defineProperty(c, "__esModule", { value: !0 }), c.QuoteType = void 0;
7
- var h = /* @__PURE__ */ g(), s;
8
- (function(t) {
9
- t[t.Tab = 9] = "Tab", t[t.NewLine = 10] = "NewLine", t[t.FormFeed = 12] = "FormFeed", t[t.CarriageReturn = 13] = "CarriageReturn", t[t.Space = 32] = "Space", t[t.ExclamationMark = 33] = "ExclamationMark", t[t.Number = 35] = "Number", t[t.Amp = 38] = "Amp", t[t.SingleQuote = 39] = "SingleQuote", t[t.DoubleQuote = 34] = "DoubleQuote", t[t.Dash = 45] = "Dash", t[t.Slash = 47] = "Slash", t[t.Zero = 48] = "Zero", t[t.Nine = 57] = "Nine", t[t.Semi = 59] = "Semi", t[t.Lt = 60] = "Lt", t[t.Eq = 61] = "Eq", t[t.Gt = 62] = "Gt", t[t.Questionmark = 63] = "Questionmark", t[t.UpperA = 65] = "UpperA", t[t.LowerA = 97] = "LowerA", t[t.UpperF = 70] = "UpperF", t[t.LowerF = 102] = "LowerF", t[t.UpperZ = 90] = "UpperZ", t[t.LowerZ = 122] = "LowerZ", t[t.LowerX = 120] = "LowerX", t[t.OpeningSquareBracket = 91] = "OpeningSquareBracket";
10
- })(s || (s = {}));
11
- var i;
12
- (function(t) {
13
- t[t.Text = 1] = "Text", t[t.BeforeTagName = 2] = "BeforeTagName", t[t.InTagName = 3] = "InTagName", t[t.InSelfClosingTag = 4] = "InSelfClosingTag", t[t.BeforeClosingTagName = 5] = "BeforeClosingTagName", t[t.InClosingTagName = 6] = "InClosingTagName", t[t.AfterClosingTagName = 7] = "AfterClosingTagName", t[t.BeforeAttributeName = 8] = "BeforeAttributeName", t[t.InAttributeName = 9] = "InAttributeName", t[t.AfterAttributeName = 10] = "AfterAttributeName", t[t.BeforeAttributeValue = 11] = "BeforeAttributeValue", t[t.InAttributeValueDq = 12] = "InAttributeValueDq", t[t.InAttributeValueSq = 13] = "InAttributeValueSq", t[t.InAttributeValueNq = 14] = "InAttributeValueNq", t[t.BeforeDeclaration = 15] = "BeforeDeclaration", t[t.InDeclaration = 16] = "InDeclaration", t[t.InProcessingInstruction = 17] = "InProcessingInstruction", t[t.BeforeComment = 18] = "BeforeComment", t[t.CDATASequence = 19] = "CDATASequence", t[t.InSpecialComment = 20] = "InSpecialComment", t[t.InCommentLike = 21] = "InCommentLike", t[t.BeforeSpecialS = 22] = "BeforeSpecialS", t[t.SpecialStartSequence = 23] = "SpecialStartSequence", t[t.InSpecialTag = 24] = "InSpecialTag", t[t.BeforeEntity = 25] = "BeforeEntity", t[t.BeforeNumericEntity = 26] = "BeforeNumericEntity", t[t.InNamedEntity = 27] = "InNamedEntity", t[t.InNumericEntity = 28] = "InNumericEntity", t[t.InHexEntity = 29] = "InHexEntity";
14
- })(i || (i = {}));
15
- function o(t) {
16
- return t === s.Space || t === s.NewLine || t === s.Tab || t === s.FormFeed || t === s.CarriageReturn;
1
+ import { determineBranch as m, BinTrieFlags as c } from "./index-decode.js";
2
+ import x from "./index-decode-data-xml.js";
3
+ import b from "./index-decode-data-html.js";
4
+ import { replaceCodePoint as I } from "./index-decode_codepoint.js";
5
+ var s;
6
+ (function(e) {
7
+ e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
8
+ })(s || (s = {}));
9
+ var i;
10
+ (function(e) {
11
+ e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.SpecialStartSequence = 23] = "SpecialStartSequence", e[e.InSpecialTag = 24] = "InSpecialTag", e[e.BeforeEntity = 25] = "BeforeEntity", e[e.BeforeNumericEntity = 26] = "BeforeNumericEntity", e[e.InNamedEntity = 27] = "InNamedEntity", e[e.InNumericEntity = 28] = "InNumericEntity", e[e.InHexEntity = 29] = "InHexEntity";
12
+ })(i || (i = {}));
13
+ function h(e) {
14
+ return e === s.Space || e === s.NewLine || e === s.Tab || e === s.FormFeed || e === s.CarriageReturn;
15
+ }
16
+ function u(e) {
17
+ return e === s.Slash || e === s.Gt || h(e);
18
+ }
19
+ function f(e) {
20
+ return e >= s.Zero && e <= s.Nine;
21
+ }
22
+ function d(e) {
23
+ return e >= s.LowerA && e <= s.LowerZ || e >= s.UpperA && e <= s.UpperZ;
24
+ }
25
+ function S(e) {
26
+ return e >= s.UpperA && e <= s.UpperF || e >= s.LowerA && e <= s.LowerF;
27
+ }
28
+ var o;
29
+ (function(e) {
30
+ e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
31
+ })(o || (o = {}));
32
+ const a = {
33
+ Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
34
+ CdataEnd: new Uint8Array([93, 93, 62]),
35
+ CommentEnd: new Uint8Array([45, 45, 62]),
36
+ ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
37
+ StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
38
+ TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101])
39
+ // `</title`
40
+ };
41
+ class E {
42
+ constructor({ xmlMode: t = !1, decodeEntities: n = !0 }, r) {
43
+ this.cbs = r, this.state = i.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = i.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.trieIndex = 0, this.trieCurrent = 0, this.entityResult = 0, this.entityExcess = 0, this.xmlMode = t, this.decodeEntities = n, this.entityTrie = t ? x : b;
44
+ }
45
+ reset() {
46
+ this.state = i.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = i.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
47
+ }
48
+ write(t) {
49
+ this.offset += this.buffer.length, this.buffer = t, this.parse();
50
+ }
51
+ end() {
52
+ this.running && this.finish();
53
+ }
54
+ pause() {
55
+ this.running = !1;
56
+ }
57
+ resume() {
58
+ this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
59
+ }
60
+ /**
61
+ * The current index within all of the written data.
62
+ */
63
+ getIndex() {
64
+ return this.index;
65
+ }
66
+ /**
67
+ * The start of the current section.
68
+ */
69
+ getSectionStart() {
70
+ return this.sectionStart;
71
+ }
72
+ stateText(t) {
73
+ t === s.Lt || !this.decodeEntities && this.fastForwardTo(s.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = i.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === s.Amp && (this.state = i.BeforeEntity);
74
+ }
75
+ stateSpecialStartSequence(t) {
76
+ const n = this.sequenceIndex === this.currentSequence.length;
77
+ if (!(n ? (
78
+ // If we are at the end of the sequence, make sure the tag name has ended
79
+ u(t)
80
+ ) : (
81
+ // Otherwise, do a case-insensitive comparison
82
+ (t | 32) === this.currentSequence[this.sequenceIndex]
83
+ )))
84
+ this.isSpecial = !1;
85
+ else if (!n) {
86
+ this.sequenceIndex++;
87
+ return;
17
88
  }
18
- function l(t) {
19
- return t === s.Slash || t === s.Gt || o(t);
89
+ this.sequenceIndex = 0, this.state = i.InTagName, this.stateInTagName(t);
90
+ }
91
+ /** Look for an end tag. For <title> tags, also decode entities. */
92
+ stateInSpecialTag(t) {
93
+ if (this.sequenceIndex === this.currentSequence.length) {
94
+ if (t === s.Gt || h(t)) {
95
+ const n = this.index - this.currentSequence.length;
96
+ if (this.sectionStart < n) {
97
+ const r = this.index;
98
+ this.index = n, this.cbs.ontext(this.sectionStart, n), this.index = r;
99
+ }
100
+ this.isSpecial = !1, this.sectionStart = n + 2, this.stateInClosingTagName(t);
101
+ return;
102
+ }
103
+ this.sequenceIndex = 0;
20
104
  }
21
- function x(t) {
22
- return t >= s.Zero && t <= s.Nine;
105
+ (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === a.TitleEnd ? this.decodeEntities && t === s.Amp && (this.state = i.BeforeEntity) : this.fastForwardTo(s.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === s.Lt);
106
+ }
107
+ stateCDATASequence(t) {
108
+ t === a.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === a.Cdata.length && (this.state = i.InCommentLike, this.currentSequence = a.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = i.InDeclaration, this.stateInDeclaration(t));
109
+ }
110
+ /**
111
+ * When we wait for one specific character, we can speed things up
112
+ * by skipping through the buffer until we find it.
113
+ *
114
+ * @returns Whether the character was found.
115
+ */
116
+ fastForwardTo(t) {
117
+ for (; ++this.index < this.buffer.length + this.offset; )
118
+ if (this.buffer.charCodeAt(this.index - this.offset) === t)
119
+ return !0;
120
+ return this.index = this.buffer.length + this.offset - 1, !1;
121
+ }
122
+ /**
123
+ * Comments and CDATA end with `-->` and `]]>`.
124
+ *
125
+ * Their common qualities are:
126
+ * - Their end sequences have a distinct character they start with.
127
+ * - That character is then repeated, so we have to check multiple repeats.
128
+ * - All characters but the start character of the sequence can be skipped.
129
+ */
130
+ stateInCommentLike(t) {
131
+ t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === a.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = i.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
132
+ }
133
+ /**
134
+ * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
135
+ *
136
+ * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
137
+ * We allow anything that wouldn't end the tag.
138
+ */
139
+ isTagStartChar(t) {
140
+ return this.xmlMode ? !u(t) : d(t);
141
+ }
142
+ startSpecial(t, n) {
143
+ this.isSpecial = !0, this.currentSequence = t, this.sequenceIndex = n, this.state = i.SpecialStartSequence;
144
+ }
145
+ stateBeforeTagName(t) {
146
+ if (t === s.ExclamationMark)
147
+ this.state = i.BeforeDeclaration, this.sectionStart = this.index + 1;
148
+ else if (t === s.Questionmark)
149
+ this.state = i.InProcessingInstruction, this.sectionStart = this.index + 1;
150
+ else if (this.isTagStartChar(t)) {
151
+ const n = t | 32;
152
+ this.sectionStart = this.index, !this.xmlMode && n === a.TitleEnd[2] ? this.startSpecial(a.TitleEnd, 3) : this.state = !this.xmlMode && n === a.ScriptEnd[2] ? i.BeforeSpecialS : i.InTagName;
153
+ } else t === s.Slash ? this.state = i.BeforeClosingTagName : (this.state = i.Text, this.stateText(t));
154
+ }
155
+ stateInTagName(t) {
156
+ u(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = i.BeforeAttributeName, this.stateBeforeAttributeName(t));
157
+ }
158
+ stateBeforeClosingTagName(t) {
159
+ h(t) || (t === s.Gt ? this.state = i.Text : (this.state = this.isTagStartChar(t) ? i.InClosingTagName : i.InSpecialComment, this.sectionStart = this.index));
160
+ }
161
+ stateInClosingTagName(t) {
162
+ (t === s.Gt || h(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = i.AfterClosingTagName, this.stateAfterClosingTagName(t));
163
+ }
164
+ stateAfterClosingTagName(t) {
165
+ (t === s.Gt || this.fastForwardTo(s.Gt)) && (this.state = i.Text, this.baseState = i.Text, this.sectionStart = this.index + 1);
166
+ }
167
+ stateBeforeAttributeName(t) {
168
+ t === s.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = i.InSpecialTag, this.sequenceIndex = 0) : this.state = i.Text, this.baseState = this.state, this.sectionStart = this.index + 1) : t === s.Slash ? this.state = i.InSelfClosingTag : h(t) || (this.state = i.InAttributeName, this.sectionStart = this.index);
169
+ }
170
+ stateInSelfClosingTag(t) {
171
+ t === s.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = i.Text, this.baseState = i.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : h(t) || (this.state = i.BeforeAttributeName, this.stateBeforeAttributeName(t));
172
+ }
173
+ stateInAttributeName(t) {
174
+ (t === s.Eq || u(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = -1, this.state = i.AfterAttributeName, this.stateAfterAttributeName(t));
175
+ }
176
+ stateAfterAttributeName(t) {
177
+ t === s.Eq ? this.state = i.BeforeAttributeValue : t === s.Slash || t === s.Gt ? (this.cbs.onattribend(o.NoValue, this.index), this.state = i.BeforeAttributeName, this.stateBeforeAttributeName(t)) : h(t) || (this.cbs.onattribend(o.NoValue, this.index), this.state = i.InAttributeName, this.sectionStart = this.index);
178
+ }
179
+ stateBeforeAttributeValue(t) {
180
+ t === s.DoubleQuote ? (this.state = i.InAttributeValueDq, this.sectionStart = this.index + 1) : t === s.SingleQuote ? (this.state = i.InAttributeValueSq, this.sectionStart = this.index + 1) : h(t) || (this.sectionStart = this.index, this.state = i.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
181
+ }
182
+ handleInAttributeValue(t, n) {
183
+ t === n || !this.decodeEntities && this.fastForwardTo(n) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(n === s.DoubleQuote ? o.Double : o.Single, this.index), this.state = i.BeforeAttributeName) : this.decodeEntities && t === s.Amp && (this.baseState = this.state, this.state = i.BeforeEntity);
184
+ }
185
+ stateInAttributeValueDoubleQuotes(t) {
186
+ this.handleInAttributeValue(t, s.DoubleQuote);
187
+ }
188
+ stateInAttributeValueSingleQuotes(t) {
189
+ this.handleInAttributeValue(t, s.SingleQuote);
190
+ }
191
+ stateInAttributeValueNoQuotes(t) {
192
+ h(t) || t === s.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(o.Unquoted, this.index), this.state = i.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === s.Amp && (this.baseState = this.state, this.state = i.BeforeEntity);
193
+ }
194
+ stateBeforeDeclaration(t) {
195
+ t === s.OpeningSquareBracket ? (this.state = i.CDATASequence, this.sequenceIndex = 0) : this.state = t === s.Dash ? i.BeforeComment : i.InDeclaration;
196
+ }
197
+ stateInDeclaration(t) {
198
+ (t === s.Gt || this.fastForwardTo(s.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = i.Text, this.sectionStart = this.index + 1);
199
+ }
200
+ stateInProcessingInstruction(t) {
201
+ (t === s.Gt || this.fastForwardTo(s.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = i.Text, this.sectionStart = this.index + 1);
202
+ }
203
+ stateBeforeComment(t) {
204
+ t === s.Dash ? (this.state = i.InCommentLike, this.currentSequence = a.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = i.InDeclaration;
205
+ }
206
+ stateInSpecialComment(t) {
207
+ (t === s.Gt || this.fastForwardTo(s.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = i.Text, this.sectionStart = this.index + 1);
208
+ }
209
+ stateBeforeSpecialS(t) {
210
+ const n = t | 32;
211
+ n === a.ScriptEnd[3] ? this.startSpecial(a.ScriptEnd, 4) : n === a.StyleEnd[3] ? this.startSpecial(a.StyleEnd, 4) : (this.state = i.InTagName, this.stateInTagName(t));
212
+ }
213
+ stateBeforeEntity(t) {
214
+ this.entityExcess = 1, this.entityResult = 0, t === s.Number ? this.state = i.BeforeNumericEntity : t === s.Amp || (this.trieIndex = 0, this.trieCurrent = this.entityTrie[0], this.state = i.InNamedEntity, this.stateInNamedEntity(t));
215
+ }
216
+ stateInNamedEntity(t) {
217
+ if (this.entityExcess += 1, this.trieIndex = m(this.entityTrie, this.trieCurrent, this.trieIndex + 1, t), this.trieIndex < 0) {
218
+ this.emitNamedEntity(), this.index--;
219
+ return;
23
220
  }
24
- function d(t) {
25
- return t >= s.LowerA && t <= s.LowerZ || t >= s.UpperA && t <= s.UpperZ;
221
+ this.trieCurrent = this.entityTrie[this.trieIndex];
222
+ const n = this.trieCurrent & c.VALUE_LENGTH;
223
+ if (n) {
224
+ const r = (n >> 14) - 1;
225
+ if (!this.allowLegacyEntity() && t !== s.Semi)
226
+ this.trieIndex += r;
227
+ else {
228
+ const l = this.index - this.entityExcess + 1;
229
+ l > this.sectionStart && this.emitPartial(this.sectionStart, l), this.entityResult = this.trieIndex, this.trieIndex += r, this.entityExcess = 0, this.sectionStart = this.index + 1, r === 0 && this.emitNamedEntity();
230
+ }
26
231
  }
27
- function I(t) {
28
- return t >= s.UpperA && t <= s.UpperF || t >= s.LowerA && t <= s.LowerF;
232
+ }
233
+ emitNamedEntity() {
234
+ if (this.state = this.baseState, this.entityResult === 0)
235
+ return;
236
+ switch ((this.entityTrie[this.entityResult] & c.VALUE_LENGTH) >> 14) {
237
+ case 1: {
238
+ this.emitCodePoint(this.entityTrie[this.entityResult] & ~c.VALUE_LENGTH);
239
+ break;
240
+ }
241
+ case 2: {
242
+ this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
243
+ break;
244
+ }
245
+ case 3:
246
+ this.emitCodePoint(this.entityTrie[this.entityResult + 1]), this.emitCodePoint(this.entityTrie[this.entityResult + 2]);
29
247
  }
30
- var u;
31
- (function(t) {
32
- t[t.NoValue = 0] = "NoValue", t[t.Unquoted = 1] = "Unquoted", t[t.Single = 2] = "Single", t[t.Double = 3] = "Double";
33
- })(u = c.QuoteType || (c.QuoteType = {}));
34
- var a = {
35
- Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
36
- CdataEnd: new Uint8Array([93, 93, 62]),
37
- CommentEnd: new Uint8Array([45, 45, 62]),
38
- ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
39
- StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
40
- TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101])
41
- // `</title`
42
- }, y = (
43
- /** @class */
44
- (function() {
45
- function t(e, n) {
46
- var r = e.xmlMode, f = r === void 0 ? !1 : r, b = e.decodeEntities, S = b === void 0 ? !0 : b;
47
- this.cbs = n, this.state = i.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = i.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.trieIndex = 0, this.trieCurrent = 0, this.entityResult = 0, this.entityExcess = 0, this.xmlMode = f, this.decodeEntities = S, this.entityTrie = f ? h.xmlDecodeTree : h.htmlDecodeTree;
248
+ }
249
+ stateBeforeNumericEntity(t) {
250
+ (t | 32) === s.LowerX ? (this.entityExcess++, this.state = i.InHexEntity) : (this.state = i.InNumericEntity, this.stateInNumericEntity(t));
251
+ }
252
+ emitNumericEntity(t) {
253
+ const n = this.index - this.entityExcess - 1;
254
+ n + 2 + +(this.state === i.InHexEntity) !== this.index && (n > this.sectionStart && this.emitPartial(this.sectionStart, n), this.sectionStart = this.index + Number(t), this.emitCodePoint(I(this.entityResult))), this.state = this.baseState;
255
+ }
256
+ stateInNumericEntity(t) {
257
+ t === s.Semi ? this.emitNumericEntity(!0) : f(t) ? (this.entityResult = this.entityResult * 10 + (t - s.Zero), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--);
258
+ }
259
+ stateInHexEntity(t) {
260
+ t === s.Semi ? this.emitNumericEntity(!0) : f(t) ? (this.entityResult = this.entityResult * 16 + (t - s.Zero), this.entityExcess++) : S(t) ? (this.entityResult = this.entityResult * 16 + ((t | 32) - s.LowerA + 10), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--);
261
+ }
262
+ allowLegacyEntity() {
263
+ return !this.xmlMode && (this.baseState === i.Text || this.baseState === i.InSpecialTag);
264
+ }
265
+ /**
266
+ * Remove data that has already been consumed from the buffer.
267
+ */
268
+ cleanup() {
269
+ this.running && this.sectionStart !== this.index && (this.state === i.Text || this.state === i.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === i.InAttributeValueDq || this.state === i.InAttributeValueSq || this.state === i.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
270
+ }
271
+ shouldContinue() {
272
+ return this.index < this.buffer.length + this.offset && this.running;
273
+ }
274
+ /**
275
+ * Iterates through the buffer, calling the function corresponding to the current state.
276
+ *
277
+ * States that are more likely to be hit are higher up, as a performance improvement.
278
+ */
279
+ parse() {
280
+ for (; this.shouldContinue(); ) {
281
+ const t = this.buffer.charCodeAt(this.index - this.offset);
282
+ switch (this.state) {
283
+ case i.Text: {
284
+ this.stateText(t);
285
+ break;
286
+ }
287
+ case i.SpecialStartSequence: {
288
+ this.stateSpecialStartSequence(t);
289
+ break;
290
+ }
291
+ case i.InSpecialTag: {
292
+ this.stateInSpecialTag(t);
293
+ break;
294
+ }
295
+ case i.CDATASequence: {
296
+ this.stateCDATASequence(t);
297
+ break;
298
+ }
299
+ case i.InAttributeValueDq: {
300
+ this.stateInAttributeValueDoubleQuotes(t);
301
+ break;
302
+ }
303
+ case i.InAttributeName: {
304
+ this.stateInAttributeName(t);
305
+ break;
306
+ }
307
+ case i.InCommentLike: {
308
+ this.stateInCommentLike(t);
309
+ break;
310
+ }
311
+ case i.InSpecialComment: {
312
+ this.stateInSpecialComment(t);
313
+ break;
314
+ }
315
+ case i.BeforeAttributeName: {
316
+ this.stateBeforeAttributeName(t);
317
+ break;
318
+ }
319
+ case i.InTagName: {
320
+ this.stateInTagName(t);
321
+ break;
322
+ }
323
+ case i.InClosingTagName: {
324
+ this.stateInClosingTagName(t);
325
+ break;
326
+ }
327
+ case i.BeforeTagName: {
328
+ this.stateBeforeTagName(t);
329
+ break;
48
330
  }
49
- return t.prototype.reset = function() {
50
- this.state = i.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = i.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
51
- }, t.prototype.write = function(e) {
52
- this.offset += this.buffer.length, this.buffer = e, this.parse();
53
- }, t.prototype.end = function() {
54
- this.running && this.finish();
55
- }, t.prototype.pause = function() {
56
- this.running = !1;
57
- }, t.prototype.resume = function() {
58
- this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
59
- }, t.prototype.getIndex = function() {
60
- return this.index;
61
- }, t.prototype.getSectionStart = function() {
62
- return this.sectionStart;
63
- }, t.prototype.stateText = function(e) {
64
- e === s.Lt || !this.decodeEntities && this.fastForwardTo(s.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = i.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && e === s.Amp && (this.state = i.BeforeEntity);
65
- }, t.prototype.stateSpecialStartSequence = function(e) {
66
- var n = this.sequenceIndex === this.currentSequence.length, r = n ? (
67
- // If we are at the end of the sequence, make sure the tag name has ended
68
- l(e)
69
- ) : (
70
- // Otherwise, do a case-insensitive comparison
71
- (e | 32) === this.currentSequence[this.sequenceIndex]
72
- );
73
- if (!r)
74
- this.isSpecial = !1;
75
- else if (!n) {
76
- this.sequenceIndex++;
77
- return;
78
- }
79
- this.sequenceIndex = 0, this.state = i.InTagName, this.stateInTagName(e);
80
- }, t.prototype.stateInSpecialTag = function(e) {
81
- if (this.sequenceIndex === this.currentSequence.length) {
82
- if (e === s.Gt || o(e)) {
83
- var n = this.index - this.currentSequence.length;
84
- if (this.sectionStart < n) {
85
- var r = this.index;
86
- this.index = n, this.cbs.ontext(this.sectionStart, n), this.index = r;
87
- }
88
- this.isSpecial = !1, this.sectionStart = n + 2, this.stateInClosingTagName(e);
89
- return;
90
- }
91
- this.sequenceIndex = 0;
92
- }
93
- (e | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === a.TitleEnd ? this.decodeEntities && e === s.Amp && (this.state = i.BeforeEntity) : this.fastForwardTo(s.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(e === s.Lt);
94
- }, t.prototype.stateCDATASequence = function(e) {
95
- e === a.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === a.Cdata.length && (this.state = i.InCommentLike, this.currentSequence = a.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = i.InDeclaration, this.stateInDeclaration(e));
96
- }, t.prototype.fastForwardTo = function(e) {
97
- for (; ++this.index < this.buffer.length + this.offset; )
98
- if (this.buffer.charCodeAt(this.index - this.offset) === e)
99
- return !0;
100
- return this.index = this.buffer.length + this.offset - 1, !1;
101
- }, t.prototype.stateInCommentLike = function(e) {
102
- e === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === a.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = i.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : e !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
103
- }, t.prototype.isTagStartChar = function(e) {
104
- return this.xmlMode ? !l(e) : d(e);
105
- }, t.prototype.startSpecial = function(e, n) {
106
- this.isSpecial = !0, this.currentSequence = e, this.sequenceIndex = n, this.state = i.SpecialStartSequence;
107
- }, t.prototype.stateBeforeTagName = function(e) {
108
- if (e === s.ExclamationMark)
109
- this.state = i.BeforeDeclaration, this.sectionStart = this.index + 1;
110
- else if (e === s.Questionmark)
111
- this.state = i.InProcessingInstruction, this.sectionStart = this.index + 1;
112
- else if (this.isTagStartChar(e)) {
113
- var n = e | 32;
114
- this.sectionStart = this.index, !this.xmlMode && n === a.TitleEnd[2] ? this.startSpecial(a.TitleEnd, 3) : this.state = !this.xmlMode && n === a.ScriptEnd[2] ? i.BeforeSpecialS : i.InTagName;
115
- } else e === s.Slash ? this.state = i.BeforeClosingTagName : (this.state = i.Text, this.stateText(e));
116
- }, t.prototype.stateInTagName = function(e) {
117
- l(e) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = i.BeforeAttributeName, this.stateBeforeAttributeName(e));
118
- }, t.prototype.stateBeforeClosingTagName = function(e) {
119
- o(e) || (e === s.Gt ? this.state = i.Text : (this.state = this.isTagStartChar(e) ? i.InClosingTagName : i.InSpecialComment, this.sectionStart = this.index));
120
- }, t.prototype.stateInClosingTagName = function(e) {
121
- (e === s.Gt || o(e)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = i.AfterClosingTagName, this.stateAfterClosingTagName(e));
122
- }, t.prototype.stateAfterClosingTagName = function(e) {
123
- (e === s.Gt || this.fastForwardTo(s.Gt)) && (this.state = i.Text, this.baseState = i.Text, this.sectionStart = this.index + 1);
124
- }, t.prototype.stateBeforeAttributeName = function(e) {
125
- e === s.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = i.InSpecialTag, this.sequenceIndex = 0) : this.state = i.Text, this.baseState = this.state, this.sectionStart = this.index + 1) : e === s.Slash ? this.state = i.InSelfClosingTag : o(e) || (this.state = i.InAttributeName, this.sectionStart = this.index);
126
- }, t.prototype.stateInSelfClosingTag = function(e) {
127
- e === s.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = i.Text, this.baseState = i.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : o(e) || (this.state = i.BeforeAttributeName, this.stateBeforeAttributeName(e));
128
- }, t.prototype.stateInAttributeName = function(e) {
129
- (e === s.Eq || l(e)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = -1, this.state = i.AfterAttributeName, this.stateAfterAttributeName(e));
130
- }, t.prototype.stateAfterAttributeName = function(e) {
131
- e === s.Eq ? this.state = i.BeforeAttributeValue : e === s.Slash || e === s.Gt ? (this.cbs.onattribend(u.NoValue, this.index), this.state = i.BeforeAttributeName, this.stateBeforeAttributeName(e)) : o(e) || (this.cbs.onattribend(u.NoValue, this.index), this.state = i.InAttributeName, this.sectionStart = this.index);
132
- }, t.prototype.stateBeforeAttributeValue = function(e) {
133
- e === s.DoubleQuote ? (this.state = i.InAttributeValueDq, this.sectionStart = this.index + 1) : e === s.SingleQuote ? (this.state = i.InAttributeValueSq, this.sectionStart = this.index + 1) : o(e) || (this.sectionStart = this.index, this.state = i.InAttributeValueNq, this.stateInAttributeValueNoQuotes(e));
134
- }, t.prototype.handleInAttributeValue = function(e, n) {
135
- e === n || !this.decodeEntities && this.fastForwardTo(n) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(n === s.DoubleQuote ? u.Double : u.Single, this.index), this.state = i.BeforeAttributeName) : this.decodeEntities && e === s.Amp && (this.baseState = this.state, this.state = i.BeforeEntity);
136
- }, t.prototype.stateInAttributeValueDoubleQuotes = function(e) {
137
- this.handleInAttributeValue(e, s.DoubleQuote);
138
- }, t.prototype.stateInAttributeValueSingleQuotes = function(e) {
139
- this.handleInAttributeValue(e, s.SingleQuote);
140
- }, t.prototype.stateInAttributeValueNoQuotes = function(e) {
141
- o(e) || e === s.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u.Unquoted, this.index), this.state = i.BeforeAttributeName, this.stateBeforeAttributeName(e)) : this.decodeEntities && e === s.Amp && (this.baseState = this.state, this.state = i.BeforeEntity);
142
- }, t.prototype.stateBeforeDeclaration = function(e) {
143
- e === s.OpeningSquareBracket ? (this.state = i.CDATASequence, this.sequenceIndex = 0) : this.state = e === s.Dash ? i.BeforeComment : i.InDeclaration;
144
- }, t.prototype.stateInDeclaration = function(e) {
145
- (e === s.Gt || this.fastForwardTo(s.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = i.Text, this.sectionStart = this.index + 1);
146
- }, t.prototype.stateInProcessingInstruction = function(e) {
147
- (e === s.Gt || this.fastForwardTo(s.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = i.Text, this.sectionStart = this.index + 1);
148
- }, t.prototype.stateBeforeComment = function(e) {
149
- e === s.Dash ? (this.state = i.InCommentLike, this.currentSequence = a.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = i.InDeclaration;
150
- }, t.prototype.stateInSpecialComment = function(e) {
151
- (e === s.Gt || this.fastForwardTo(s.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = i.Text, this.sectionStart = this.index + 1);
152
- }, t.prototype.stateBeforeSpecialS = function(e) {
153
- var n = e | 32;
154
- n === a.ScriptEnd[3] ? this.startSpecial(a.ScriptEnd, 4) : n === a.StyleEnd[3] ? this.startSpecial(a.StyleEnd, 4) : (this.state = i.InTagName, this.stateInTagName(e));
155
- }, t.prototype.stateBeforeEntity = function(e) {
156
- this.entityExcess = 1, this.entityResult = 0, e === s.Number ? this.state = i.BeforeNumericEntity : e === s.Amp || (this.trieIndex = 0, this.trieCurrent = this.entityTrie[0], this.state = i.InNamedEntity, this.stateInNamedEntity(e));
157
- }, t.prototype.stateInNamedEntity = function(e) {
158
- if (this.entityExcess += 1, this.trieIndex = (0, h.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, e), this.trieIndex < 0) {
159
- this.emitNamedEntity(), this.index--;
160
- return;
161
- }
162
- this.trieCurrent = this.entityTrie[this.trieIndex];
163
- var n = this.trieCurrent & h.BinTrieFlags.VALUE_LENGTH;
164
- if (n) {
165
- var r = (n >> 14) - 1;
166
- if (!this.allowLegacyEntity() && e !== s.Semi)
167
- this.trieIndex += r;
168
- else {
169
- var f = this.index - this.entityExcess + 1;
170
- f > this.sectionStart && this.emitPartial(this.sectionStart, f), this.entityResult = this.trieIndex, this.trieIndex += r, this.entityExcess = 0, this.sectionStart = this.index + 1, r === 0 && this.emitNamedEntity();
171
- }
172
- }
173
- }, t.prototype.emitNamedEntity = function() {
174
- if (this.state = this.baseState, this.entityResult !== 0) {
175
- var e = (this.entityTrie[this.entityResult] & h.BinTrieFlags.VALUE_LENGTH) >> 14;
176
- switch (e) {
177
- case 1: {
178
- this.emitCodePoint(this.entityTrie[this.entityResult] & ~h.BinTrieFlags.VALUE_LENGTH);
179
- break;
180
- }
181
- case 2: {
182
- this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
183
- break;
184
- }
185
- case 3:
186
- this.emitCodePoint(this.entityTrie[this.entityResult + 1]), this.emitCodePoint(this.entityTrie[this.entityResult + 2]);
187
- }
188
- }
189
- }, t.prototype.stateBeforeNumericEntity = function(e) {
190
- (e | 32) === s.LowerX ? (this.entityExcess++, this.state = i.InHexEntity) : (this.state = i.InNumericEntity, this.stateInNumericEntity(e));
191
- }, t.prototype.emitNumericEntity = function(e) {
192
- var n = this.index - this.entityExcess - 1, r = n + 2 + +(this.state === i.InHexEntity);
193
- r !== this.index && (n > this.sectionStart && this.emitPartial(this.sectionStart, n), this.sectionStart = this.index + Number(e), this.emitCodePoint((0, h.replaceCodePoint)(this.entityResult))), this.state = this.baseState;
194
- }, t.prototype.stateInNumericEntity = function(e) {
195
- e === s.Semi ? this.emitNumericEntity(!0) : x(e) ? (this.entityResult = this.entityResult * 10 + (e - s.Zero), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--);
196
- }, t.prototype.stateInHexEntity = function(e) {
197
- e === s.Semi ? this.emitNumericEntity(!0) : x(e) ? (this.entityResult = this.entityResult * 16 + (e - s.Zero), this.entityExcess++) : I(e) ? (this.entityResult = this.entityResult * 16 + ((e | 32) - s.LowerA + 10), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--);
198
- }, t.prototype.allowLegacyEntity = function() {
199
- return !this.xmlMode && (this.baseState === i.Text || this.baseState === i.InSpecialTag);
200
- }, t.prototype.cleanup = function() {
201
- this.running && this.sectionStart !== this.index && (this.state === i.Text || this.state === i.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === i.InAttributeValueDq || this.state === i.InAttributeValueSq || this.state === i.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
202
- }, t.prototype.shouldContinue = function() {
203
- return this.index < this.buffer.length + this.offset && this.running;
204
- }, t.prototype.parse = function() {
205
- for (; this.shouldContinue(); ) {
206
- var e = this.buffer.charCodeAt(this.index - this.offset);
207
- switch (this.state) {
208
- case i.Text: {
209
- this.stateText(e);
210
- break;
211
- }
212
- case i.SpecialStartSequence: {
213
- this.stateSpecialStartSequence(e);
214
- break;
215
- }
216
- case i.InSpecialTag: {
217
- this.stateInSpecialTag(e);
218
- break;
219
- }
220
- case i.CDATASequence: {
221
- this.stateCDATASequence(e);
222
- break;
223
- }
224
- case i.InAttributeValueDq: {
225
- this.stateInAttributeValueDoubleQuotes(e);
226
- break;
227
- }
228
- case i.InAttributeName: {
229
- this.stateInAttributeName(e);
230
- break;
231
- }
232
- case i.InCommentLike: {
233
- this.stateInCommentLike(e);
234
- break;
235
- }
236
- case i.InSpecialComment: {
237
- this.stateInSpecialComment(e);
238
- break;
239
- }
240
- case i.BeforeAttributeName: {
241
- this.stateBeforeAttributeName(e);
242
- break;
243
- }
244
- case i.InTagName: {
245
- this.stateInTagName(e);
246
- break;
247
- }
248
- case i.InClosingTagName: {
249
- this.stateInClosingTagName(e);
250
- break;
251
- }
252
- case i.BeforeTagName: {
253
- this.stateBeforeTagName(e);
254
- break;
255
- }
256
- case i.AfterAttributeName: {
257
- this.stateAfterAttributeName(e);
258
- break;
259
- }
260
- case i.InAttributeValueSq: {
261
- this.stateInAttributeValueSingleQuotes(e);
262
- break;
263
- }
264
- case i.BeforeAttributeValue: {
265
- this.stateBeforeAttributeValue(e);
266
- break;
267
- }
268
- case i.BeforeClosingTagName: {
269
- this.stateBeforeClosingTagName(e);
270
- break;
271
- }
272
- case i.AfterClosingTagName: {
273
- this.stateAfterClosingTagName(e);
274
- break;
275
- }
276
- case i.BeforeSpecialS: {
277
- this.stateBeforeSpecialS(e);
278
- break;
279
- }
280
- case i.InAttributeValueNq: {
281
- this.stateInAttributeValueNoQuotes(e);
282
- break;
283
- }
284
- case i.InSelfClosingTag: {
285
- this.stateInSelfClosingTag(e);
286
- break;
287
- }
288
- case i.InDeclaration: {
289
- this.stateInDeclaration(e);
290
- break;
291
- }
292
- case i.BeforeDeclaration: {
293
- this.stateBeforeDeclaration(e);
294
- break;
295
- }
296
- case i.BeforeComment: {
297
- this.stateBeforeComment(e);
298
- break;
299
- }
300
- case i.InProcessingInstruction: {
301
- this.stateInProcessingInstruction(e);
302
- break;
303
- }
304
- case i.InNamedEntity: {
305
- this.stateInNamedEntity(e);
306
- break;
307
- }
308
- case i.BeforeEntity: {
309
- this.stateBeforeEntity(e);
310
- break;
311
- }
312
- case i.InHexEntity: {
313
- this.stateInHexEntity(e);
314
- break;
315
- }
316
- case i.InNumericEntity: {
317
- this.stateInNumericEntity(e);
318
- break;
319
- }
320
- default:
321
- this.stateBeforeNumericEntity(e);
322
- }
323
- this.index++;
324
- }
325
- this.cleanup();
326
- }, t.prototype.finish = function() {
327
- this.state === i.InNamedEntity && this.emitNamedEntity(), this.sectionStart < this.index && this.handleTrailingData(), this.cbs.onend();
328
- }, t.prototype.handleTrailingData = function() {
329
- var e = this.buffer.length + this.offset;
330
- this.state === i.InCommentLike ? this.currentSequence === a.CdataEnd ? this.cbs.oncdata(this.sectionStart, e, 0) : this.cbs.oncomment(this.sectionStart, e, 0) : this.state === i.InNumericEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === i.InHexEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === i.InTagName || this.state === i.BeforeAttributeName || this.state === i.BeforeAttributeValue || this.state === i.AfterAttributeName || this.state === i.InAttributeName || this.state === i.InAttributeValueSq || this.state === i.InAttributeValueDq || this.state === i.InAttributeValueNq || this.state === i.InClosingTagName || this.cbs.ontext(this.sectionStart, e);
331
- }, t.prototype.emitPartial = function(e, n) {
332
- this.baseState !== i.Text && this.baseState !== i.InSpecialTag ? this.cbs.onattribdata(e, n) : this.cbs.ontext(e, n);
333
- }, t.prototype.emitCodePoint = function(e) {
334
- this.baseState !== i.Text && this.baseState !== i.InSpecialTag ? this.cbs.onattribentity(e) : this.cbs.ontextentity(e);
335
- }, t;
336
- })()
337
- );
338
- c.default = y;
339
- })(m), m);
331
+ case i.AfterAttributeName: {
332
+ this.stateAfterAttributeName(t);
333
+ break;
334
+ }
335
+ case i.InAttributeValueSq: {
336
+ this.stateInAttributeValueSingleQuotes(t);
337
+ break;
338
+ }
339
+ case i.BeforeAttributeValue: {
340
+ this.stateBeforeAttributeValue(t);
341
+ break;
342
+ }
343
+ case i.BeforeClosingTagName: {
344
+ this.stateBeforeClosingTagName(t);
345
+ break;
346
+ }
347
+ case i.AfterClosingTagName: {
348
+ this.stateAfterClosingTagName(t);
349
+ break;
350
+ }
351
+ case i.BeforeSpecialS: {
352
+ this.stateBeforeSpecialS(t);
353
+ break;
354
+ }
355
+ case i.InAttributeValueNq: {
356
+ this.stateInAttributeValueNoQuotes(t);
357
+ break;
358
+ }
359
+ case i.InSelfClosingTag: {
360
+ this.stateInSelfClosingTag(t);
361
+ break;
362
+ }
363
+ case i.InDeclaration: {
364
+ this.stateInDeclaration(t);
365
+ break;
366
+ }
367
+ case i.BeforeDeclaration: {
368
+ this.stateBeforeDeclaration(t);
369
+ break;
370
+ }
371
+ case i.BeforeComment: {
372
+ this.stateBeforeComment(t);
373
+ break;
374
+ }
375
+ case i.InProcessingInstruction: {
376
+ this.stateInProcessingInstruction(t);
377
+ break;
378
+ }
379
+ case i.InNamedEntity: {
380
+ this.stateInNamedEntity(t);
381
+ break;
382
+ }
383
+ case i.BeforeEntity: {
384
+ this.stateBeforeEntity(t);
385
+ break;
386
+ }
387
+ case i.InHexEntity: {
388
+ this.stateInHexEntity(t);
389
+ break;
390
+ }
391
+ case i.InNumericEntity: {
392
+ this.stateInNumericEntity(t);
393
+ break;
394
+ }
395
+ default:
396
+ this.stateBeforeNumericEntity(t);
397
+ }
398
+ this.index++;
399
+ }
400
+ this.cleanup();
401
+ }
402
+ finish() {
403
+ this.state === i.InNamedEntity && this.emitNamedEntity(), this.sectionStart < this.index && this.handleTrailingData(), this.cbs.onend();
404
+ }
405
+ /** Handle any trailing data. */
406
+ handleTrailingData() {
407
+ const t = this.buffer.length + this.offset;
408
+ this.state === i.InCommentLike ? this.currentSequence === a.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === i.InNumericEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === i.InHexEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === i.InTagName || this.state === i.BeforeAttributeName || this.state === i.BeforeAttributeValue || this.state === i.AfterAttributeName || this.state === i.InAttributeName || this.state === i.InAttributeValueSq || this.state === i.InAttributeValueDq || this.state === i.InAttributeValueNq || this.state === i.InClosingTagName || this.cbs.ontext(this.sectionStart, t);
409
+ }
410
+ emitPartial(t, n) {
411
+ this.baseState !== i.Text && this.baseState !== i.InSpecialTag ? this.cbs.onattribdata(t, n) : this.cbs.ontext(t, n);
412
+ }
413
+ emitCodePoint(t) {
414
+ this.baseState !== i.Text && this.baseState !== i.InSpecialTag ? this.cbs.onattribentity(t) : this.cbs.ontextentity(t);
415
+ }
340
416
  }
341
417
  export {
342
- A as __require
418
+ o as QuoteType,
419
+ E as default
343
420
  };