@rankingcoach/vanguard 1.3.0 → 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 (361) hide show
  1. package/dist/icons/Icon-tools-active-1.svg +3 -0
  2. package/dist/icons/Icon-tools-active.svg +3 -0
  3. package/dist/index-AMPMMidnightParser.js +1 -1
  4. package/dist/index-AMPMParser.js +1 -1
  5. package/dist/index-Accordion2.js +1 -1
  6. package/dist/index-AccordionDetails.js +1 -1
  7. package/dist/index-AccordionSummary.js +1 -1
  8. package/dist/index-AppBar2.js +1 -1
  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 +1 -1
  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 +7 -7
  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-Drawer2.js +1 -1
  42. package/dist/index-EraParser.js +1 -1
  43. package/dist/index-ExtendedYearParser.js +1 -1
  44. package/dist/index-Fade.js +1 -1
  45. package/dist/index-FilledInput.js +1 -1
  46. package/dist/index-FocusTrap.js +1 -1
  47. package/dist/index-FormControl2.js +1 -1
  48. package/dist/index-FormHelperText.js +1 -1
  49. package/dist/index-FormLabel.js +1 -1
  50. package/dist/index-FractionOfSecondParser.js +1 -1
  51. package/dist/index-GlobalStyles.js +1 -1
  52. package/dist/index-GlobalStyles2.js +1 -1
  53. package/dist/index-GlobalStyles3.js +1 -1
  54. package/dist/index-Grid.js +1 -1
  55. package/dist/index-Grow.js +1 -1
  56. package/dist/index-Hour0To11Parser.js +1 -1
  57. package/dist/index-Hour0to23Parser.js +1 -1
  58. package/dist/index-Hour1To24Parser.js +1 -1
  59. package/dist/index-Hour1to12Parser.js +1 -1
  60. package/dist/index-HyperlinkPlugin.js +1 -1
  61. package/dist/index-ISODayParser.js +1 -1
  62. package/dist/index-ISOTimezoneParser.js +1 -1
  63. package/dist/index-ISOTimezoneWithZParser.js +1 -1
  64. package/dist/index-ISOWeekParser.js +1 -1
  65. package/dist/index-ISOWeekYearParser.js +1 -1
  66. package/dist/index-Icon-tools-active-1.svg.js +4 -0
  67. package/dist/index-Icon-tools-active.svg.js +4 -0
  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 +10 -10
  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-Ripple.js +1 -1
  109. package/dist/index-RtlProvider.js +1 -1
  110. package/dist/index-ScrollbarSize.js +1 -1
  111. package/dist/index-SecondParser.js +1 -1
  112. package/dist/index-Select2.js +1 -1
  113. package/dist/index-SelectInput2.js +1 -1
  114. package/dist/index-Skeleton2.js +1 -1
  115. package/dist/index-Slide.js +1 -1
  116. package/dist/index-Slider2.js +1 -1
  117. package/dist/index-SliderValueLabel.js +1 -1
  118. package/dist/index-Snackbar2.js +1 -1
  119. package/dist/index-SnackbarContent.js +1 -1
  120. package/dist/index-StandAloneLocalDayParser.js +1 -1
  121. package/dist/index-StandAloneMonthParser.js +1 -1
  122. package/dist/index-StandAloneQuarterParser.js +1 -1
  123. package/dist/index-StyledEngineProvider.js +1 -1
  124. package/dist/index-StyledSVG2.js +1 -1
  125. package/dist/index-SvgIcon.js +1 -1
  126. package/dist/index-Tab2.js +1 -1
  127. package/dist/index-TabScrollButton.js +1 -1
  128. package/dist/index-Tabs2.js +1 -1
  129. package/dist/index-Text.js +18 -18
  130. package/dist/index-TextField.js +1 -1
  131. package/dist/index-TextHighlighted.js +23 -19
  132. package/dist/index-TextareaAutosize.js +1 -1
  133. package/dist/index-TimestampMillisecondsParser.js +1 -1
  134. package/dist/index-TimestampSecondsParser.js +1 -1
  135. package/dist/index-ToggleButton2.js +1 -1
  136. package/dist/index-ToggleButtonGroup2.js +1 -1
  137. package/dist/index-Tokenizer.js +411 -334
  138. package/dist/index-Tokenizer2.js +139 -2
  139. package/dist/index-Toolbar2.js +1 -1
  140. package/dist/index-Tooltip.js +1 -1
  141. package/dist/index-TouchRipple.js +1 -1
  142. package/dist/index-Transition.js +1 -1
  143. package/dist/index-TransitionGroup.js +1 -1
  144. package/dist/index-Typography.js +1 -1
  145. package/dist/index-YearParser.js +1 -1
  146. package/dist/index-YearPicker.js +1 -1
  147. package/dist/index-_virtual12.js +1 -1
  148. package/dist/index-_virtual15.js +2 -5
  149. package/dist/index-_virtual16.js +5 -3
  150. package/dist/index-_virtual17.js +5 -2
  151. package/dist/index-_virtual18.js +2 -7
  152. package/dist/index-_virtual19.js +4 -4
  153. package/dist/index-_virtual21.js +2 -2
  154. package/dist/index-_virtual22.js +2 -2
  155. package/dist/index-_virtual23.js +2 -3
  156. package/dist/index-_virtual24.js +2 -2
  157. package/dist/index-_virtual25.js +2 -2
  158. package/dist/index-_virtual26.js +2 -2
  159. package/dist/index-_virtual27.js +2 -2
  160. package/dist/index-_virtual28.js +2 -2
  161. package/dist/index-_virtual30.js +2 -2
  162. package/dist/index-_virtual31.js +2 -2
  163. package/dist/index-_virtual32.js +3 -2
  164. package/dist/index-_virtual34.js +2 -2
  165. package/dist/index-_virtual35.js +2 -4
  166. package/dist/index-_virtual36.js +1 -1
  167. package/dist/index-_virtual37.js +1 -1
  168. package/dist/index-_virtual38.js +1 -1
  169. package/dist/index-_virtual39.js +1 -1
  170. package/dist/index-_virtual40.js +1 -1
  171. package/dist/index-_virtual41.js +4 -2
  172. package/dist/index-_virtual42.js +2 -4
  173. package/dist/index-_virtual43.js +1 -1
  174. package/dist/index-_virtual44.js +1 -1
  175. package/dist/index-_virtual45.js +1 -1
  176. package/dist/index-_virtual46.js +1 -1
  177. package/dist/index-_virtual47.js +1 -1
  178. package/dist/index-_virtual48.js +1 -1
  179. package/dist/index-_virtual49.js +1 -1
  180. package/dist/index-_virtual50.js +1 -1
  181. package/dist/index-_virtual51.js +1 -1
  182. package/dist/index-_virtual52.js +1 -1
  183. package/dist/index-_virtual53.js +1 -1
  184. package/dist/index-_virtual54.js +1 -1
  185. package/dist/index-_virtual55.js +1 -1
  186. package/dist/index-_virtual56.js +1 -1
  187. package/dist/index-_virtual57.js +1 -1
  188. package/dist/index-_virtual58.js +4 -2
  189. package/dist/index-_virtual60.js +2 -4
  190. package/dist/index-_virtual61.js +1 -1
  191. package/dist/index-_virtual62.js +4 -2
  192. package/dist/index-_virtual63.js +2 -2
  193. package/dist/index-_virtual66.js +2 -2
  194. package/dist/index-_virtual67.js +2 -4
  195. package/dist/index-_virtual68.js +4 -2
  196. package/dist/index-_virtual74.js +1 -1
  197. package/dist/index-_virtual76.js +2 -2
  198. package/dist/index-_virtual77.js +4 -2
  199. package/dist/index-_virtual78.js +1 -1
  200. package/dist/index-_virtual79.js +1 -1
  201. package/dist/index-_virtual80.js +1 -1
  202. package/dist/index-_virtual81.js +1 -1
  203. package/dist/index-_virtual82.js +1 -1
  204. package/dist/index-_virtual83.js +1 -1
  205. package/dist/index-_virtual84.js +1 -1
  206. package/dist/index-_virtual85.js +2 -4
  207. package/dist/index-_virtual86.js +2 -2
  208. package/dist/index-applyInternationalSeparatorStyle.js +1 -1
  209. package/dist/index-attributes-to-props.js +1 -1
  210. package/dist/index-cjs.js +19 -75
  211. package/dist/index-colorManipulator3.js +2 -2
  212. package/dist/index-constants.js +38 -8
  213. package/dist/index-constants2.js +8 -38
  214. package/dist/index-createExtensionPattern.js +1 -1
  215. package/dist/index-createStyled2.js +6 -6
  216. package/dist/index-decode-data-html.js +5 -11
  217. package/dist/index-decode-data-xml.js +5 -11
  218. package/dist/index-decode.js +263 -216
  219. package/dist/index-decode_codepoint.js +43 -53
  220. package/dist/index-defaultRanges.js +10 -10
  221. package/dist/index-dist5.js +1 -1
  222. package/dist/index-elementAcceptingRef.js +1 -1
  223. package/dist/index-elementTypeAcceptingRef.js +1 -1
  224. package/dist/index-emotion-cache.browser.esm.js +2 -2
  225. package/dist/index-escape.js +43 -48
  226. package/dist/index-esm2.js +108 -129
  227. package/dist/index-esm3.js +12 -301
  228. package/dist/index-esm4.js +135 -17
  229. package/dist/index-esm5.js +303 -0
  230. package/dist/index-esm6.js +21 -0
  231. package/dist/index-esm7.js +102 -0
  232. package/dist/index-exenv.js +1 -1
  233. package/dist/index-extractCountryCallingCode.js +1 -1
  234. package/dist/index-extractPhoneContext.js +1 -1
  235. package/dist/index-foreignNames.js +101 -108
  236. package/dist/index-helpers3.js +1 -1
  237. package/dist/index-http.store.js +1 -1
  238. package/dist/index-isViablePhoneNumber.js +1 -1
  239. package/dist/index-keycode.js +1 -1
  240. package/dist/index-lib.js +2 -2
  241. package/dist/index-lib2.js +424 -111
  242. package/dist/index-lib3.js +14 -433
  243. package/dist/index-lib4.js +120 -14
  244. package/dist/index-lib5.js +10 -69
  245. package/dist/index-mpd-parser.es.js +1 -1
  246. package/dist/index-node.js +1 -1
  247. package/dist/index-node2.js +1 -1
  248. package/dist/index-parse2.js +1 -1
  249. package/dist/index-parse3.js +122 -20
  250. package/dist/index-refType.js +1 -1
  251. package/dist/index-responsivePropType.js +1 -1
  252. package/dist/index-sanitize-html.js +91 -48
  253. package/dist/index-stripIddPrefix.js +1 -1
  254. package/dist/index-style-to-object.js +1 -1
  255. package/dist/index-text-animate-words-style.js +12 -12
  256. package/dist/index-tiny-emitter.js +1 -1
  257. package/dist/index-use-dynamic-import.js +2 -0
  258. package/dist/index-useHyperlinkEditor.js +1 -1
  259. package/dist/index-useLexicalToolbar.js +1 -1
  260. package/dist/index-useRteAiAssistant-selection.js +5 -5
  261. package/dist/index-useThemeWithoutDefault3.js +1 -1
  262. package/dist/index-utilities.js +1 -1
  263. package/dist/index-utilities2.js +1 -1
  264. package/dist/index-utils2.js +1 -1
  265. package/dist/index-utils6.js +7 -7
  266. package/dist/index.js +428 -426
  267. package/dist/types/core/RichTextEditor/stories/RichTextEditorStory.story.d.ts +2 -0
  268. package/dist/types/core/RichTextEditor/stories/RichTextEditorWithXSSAttackStory.story.d.ts +2 -0
  269. package/dist/types/core/RichTextEditor/stories/_RichTextEditor.default.d.ts +4 -0
  270. package/dist/types/core/RichTextEditor/stories/bootstrap/richtexteditor.test.slice.d.ts +1 -0
  271. package/dist/types/core/TextHighlighted/stories/TextHighlightedStory.story.d.ts +2 -0
  272. package/dist/types/core/TextHighlighted/stories/TextHighlightedStory2.story.d.ts +2 -0
  273. package/dist/types/core/TextHighlighted/stories/TextHighlightedWithEmphasisStory.story.d.ts +2 -0
  274. package/dist/types/core/TextHighlighted/stories/TextHighlightedWithXSSAttackStory.story.d.ts +2 -0
  275. package/dist/types/core/TextHighlighted/stories/_TextHighlighted.default.d.ts +7 -0
  276. package/dist/types/core/_internal/InputBase/stories/HighlightLengthExceededTest.story.d.ts +2 -0
  277. package/dist/types/core/_internal/InputBase/stories/HighlightUrlTest.story.d.ts +2 -0
  278. package/dist/types/core/_internal/InputBase/stories/HighlightWordsTest.story.d.ts +2 -0
  279. package/dist/types/helpers/sanitize-html.d.ts +18 -3
  280. package/dist/types/index.d.ts +2 -0
  281. package/dist/vanguard-asset-analysis.json +1 -1
  282. package/dist-wordpress/Icon-tools-active-1-B-9tOuX0.mjs +4 -0
  283. package/dist-wordpress/Icon-tools-active-t9IjG2pg.mjs +4 -0
  284. package/dist-wordpress/index.js +23653 -22245
  285. package/package.json +5 -2
  286. package/scripts/check-meta-coverage.js +117 -0
  287. package/scripts/generate-exports-props.js +855 -0
  288. package/dist/index-Parser5.js +0 -131
  289. package/dist/index-Tokenizer3.js +0 -141
  290. package/dist/index-_virtual87.js +0 -4
  291. package/dist/index-_virtual88.js +0 -4
  292. package/dist/index-_virtual89.js +0 -4
  293. package/dist/index-_virtual90.js +0 -4
  294. package/dist/index-_virtual91.js +0 -4
  295. package/dist/index-at-rule.js +0 -22
  296. package/dist/index-cjs2.js +0 -23
  297. package/dist/index-comment.js +0 -16
  298. package/dist/index-container.js +0 -223
  299. package/dist/index-css-syntax-error.js +0 -56
  300. package/dist/index-declaration.js +0 -19
  301. package/dist/index-decode-data-html2.js +0 -4
  302. package/dist/index-decode-data-xml2.js +0 -4
  303. package/dist/index-decode2.js +0 -4
  304. package/dist/index-decode_codepoint2.js +0 -4
  305. package/dist/index-document3.js +0 -23
  306. package/dist/index-encode-html.js +0 -15
  307. package/dist/index-encode-html2.js +0 -4
  308. package/dist/index-encode.js +0 -49
  309. package/dist/index-encode2.js +0 -4
  310. package/dist/index-escape-string-regexp.js +0 -11
  311. package/dist/index-escape2.js +0 -4
  312. package/dist/index-feeds.js +0 -92
  313. package/dist/index-feeds2.js +0 -4
  314. package/dist/index-foreignNames2.js +0 -4
  315. package/dist/index-fromJSON.js +0 -46
  316. package/dist/index-helpers4.js +0 -54
  317. package/dist/index-helpers5.js +0 -4
  318. package/dist/index-input3.js +0 -139
  319. package/dist/index-is-plain-object.js +0 -17
  320. package/dist/index-is-plain-object2.js +0 -4
  321. package/dist/index-lazy-result.js +0 -343
  322. package/dist/index-legacy.js +0 -75
  323. package/dist/index-legacy2.js +0 -4
  324. package/dist/index-lib6.js +0 -13
  325. package/dist/index-lib7.js +0 -43
  326. package/dist/index-lib8.js +0 -147
  327. package/dist/index-lib9.js +0 -90
  328. package/dist/index-list3.js +0 -25
  329. package/dist/index-manipulation.js +0 -61
  330. package/dist/index-manipulation2.js +0 -4
  331. package/dist/index-map-generator.js +0 -171
  332. package/dist/index-no-work-result.js +0 -94
  333. package/dist/index-node4.js +0 -259
  334. package/dist/index-non-secure.js +0 -20
  335. package/dist/index-parse-srcset.js +0 -71
  336. package/dist/index-parse-srcset2.js +0 -4
  337. package/dist/index-parse4.js +0 -127
  338. package/dist/index-parser4.js +0 -322
  339. package/dist/index-picocolors.browser.js +0 -13
  340. package/dist/index-picocolors.browser2.js +0 -4
  341. package/dist/index-postcss.js +0 -46
  342. package/dist/index-previous-map.js +0 -92
  343. package/dist/index-processor.js +0 -43
  344. package/dist/index-querying.js +0 -63
  345. package/dist/index-querying2.js +0 -4
  346. package/dist/index-result.js +0 -30
  347. package/dist/index-root.js +0 -38
  348. package/dist/index-rule.js +0 -24
  349. package/dist/index-sanitize-html2.js +0 -672
  350. package/dist/index-stringifier.js +0 -196
  351. package/dist/index-stringify.js +0 -14
  352. package/dist/index-stringify2.js +0 -36
  353. package/dist/index-stringify3.js +0 -4
  354. package/dist/index-symbols.js +0 -8
  355. package/dist/index-symbols2.js +0 -4
  356. package/dist/index-tokenize.js +0 -114
  357. package/dist/index-traversal.js +0 -48
  358. package/dist/index-traversal2.js +0 -4
  359. package/dist/index-warn-once.js +0 -12
  360. package/dist/index-warning2.js +0 -25
  361. /package/dist/{index-Parser6.js → index-Parser4.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import R from "./index-objectWithoutPropertiesLoose.js";
2
2
  import a from "./index-extends.js";
3
3
  import * as m from "react";
4
- import r from "./index-_virtual15.js";
4
+ import r from "./index-_virtual16.js";
5
5
  import { clsx as N } from "./index-clsx.js";
6
6
  import p, { getNativeSelectUtilityClasses as C } from "./index-nativeSelectClasses.js";
7
7
  import b from "./index-styled.js";
@@ -1,7 +1,7 @@
1
1
  import u from "./index-objectWithoutPropertiesLoose.js";
2
2
  import n from "./index-extends.js";
3
3
  import "react";
4
- import e from "./index-_virtual15.js";
4
+ import e from "./index-_virtual16.js";
5
5
  import l from "./index-styled.js";
6
6
  import { jsx as o } from "react/jsx-runtime";
7
7
  import c from "./index-rootShouldForwardProp.js";
@@ -1,4 +1,4 @@
1
- import { __exports as e } from "./index-_virtual31.js";
1
+ import { __exports as e } from "./index-_virtual28.js";
2
2
  import p from "react";
3
3
  import { __require as P } from "./index-LexicalComposerContext2.js";
4
4
  import { __require as O } from "./index-LexicalOnChangePlugin.js";
@@ -1,4 +1,4 @@
1
- import { __exports as e } from "./index-_virtual32.js";
1
+ import { __exports as e } from "./index-_virtual29.js";
2
2
  import O from "react";
3
3
  import { __require as a } from "./index-LexicalComposerContext2.js";
4
4
  import { __require as m } from "./index-Lexical.js";
@@ -1,7 +1,7 @@
1
1
  import j from "./index-objectWithoutPropertiesLoose.js";
2
2
  import l from "./index-extends.js";
3
3
  import * as I from "react";
4
- import o from "./index-_virtual15.js";
4
+ import o from "./index-_virtual16.js";
5
5
  import A from "./index-NotchedOutline.js";
6
6
  import N from "./index-useFormControl.js";
7
7
  import w from "./index-formControlState.js";
@@ -1,7 +1,7 @@
1
1
  import b from "./index-objectWithoutPropertiesLoose.js";
2
2
  import s from "./index-extends.js";
3
3
  import * as g from "react";
4
- import r from "./index-_virtual15.js";
4
+ import r from "./index-_virtual16.js";
5
5
  import { clsx as y } from "./index-clsx.js";
6
6
  import { c as v } from "./index-colorManipulator2.js";
7
7
  import P from "./index-styled.js";
@@ -1,260 +1,319 @@
1
- import { __exports as c } from "./index-Parser3.js";
2
- import { __require as N } from "./index-Tokenizer.js";
3
- import { __require as E } from "./index-decode.js";
4
- var T;
5
- function B() {
6
- if (T) return c;
7
- T = 1;
8
- var k = c && c.__createBinding || (Object.create ? (function(s, t, e, i) {
9
- i === void 0 && (i = e);
10
- var n = Object.getOwnPropertyDescriptor(t, e);
11
- (!n || ("get" in n ? !t.__esModule : n.writable || n.configurable)) && (n = { enumerable: !0, get: function() {
12
- return t[e];
13
- } }), Object.defineProperty(s, i, n);
14
- }) : (function(s, t, e, i) {
15
- i === void 0 && (i = e), s[i] = t[e];
16
- })), O = c && c.__setModuleDefault || (Object.create ? (function(s, t) {
17
- Object.defineProperty(s, "default", { enumerable: !0, value: t });
18
- }) : function(s, t) {
19
- s.default = t;
20
- }), I = c && c.__importStar || function(s) {
21
- if (s && s.__esModule) return s;
22
- var t = {};
23
- if (s != null) for (var e in s) e !== "default" && Object.prototype.hasOwnProperty.call(s, e) && k(t, s, e);
24
- return O(t, s), t;
25
- };
26
- Object.defineProperty(c, "__esModule", { value: !0 }), c.Parser = void 0;
27
- var b = I(/* @__PURE__ */ N()), g = /* @__PURE__ */ E(), f = /* @__PURE__ */ new Set([
28
- "input",
29
- "option",
30
- "optgroup",
31
- "select",
32
- "button",
33
- "datalist",
34
- "textarea"
35
- ]), o = /* @__PURE__ */ new Set(["p"]), m = /* @__PURE__ */ new Set(["thead", "tbody"]), _ = /* @__PURE__ */ new Set(["dd", "dt"]), w = /* @__PURE__ */ new Set(["rt", "rp"]), z = /* @__PURE__ */ new Map([
36
- ["tr", /* @__PURE__ */ new Set(["tr", "th", "td"])],
37
- ["th", /* @__PURE__ */ new Set(["th"])],
38
- ["td", /* @__PURE__ */ new Set(["thead", "th", "td"])],
39
- ["body", /* @__PURE__ */ new Set(["head", "link", "script"])],
40
- ["li", /* @__PURE__ */ new Set(["li"])],
41
- ["p", o],
42
- ["h1", o],
43
- ["h2", o],
44
- ["h3", o],
45
- ["h4", o],
46
- ["h5", o],
47
- ["h6", o],
48
- ["select", f],
49
- ["input", f],
50
- ["output", f],
51
- ["button", f],
52
- ["datalist", f],
53
- ["textarea", f],
54
- ["option", /* @__PURE__ */ new Set(["option"])],
55
- ["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
56
- ["dd", _],
57
- ["dt", _],
58
- ["address", o],
59
- ["article", o],
60
- ["aside", o],
61
- ["blockquote", o],
62
- ["details", o],
63
- ["div", o],
64
- ["dl", o],
65
- ["fieldset", o],
66
- ["figcaption", o],
67
- ["figure", o],
68
- ["footer", o],
69
- ["form", o],
70
- ["header", o],
71
- ["hr", o],
72
- ["main", o],
73
- ["nav", o],
74
- ["ol", o],
75
- ["pre", o],
76
- ["section", o],
77
- ["table", o],
78
- ["ul", o],
79
- ["rt", w],
80
- ["rp", w],
81
- ["tbody", m],
82
- ["tfoot", m]
83
- ]), P = /* @__PURE__ */ new Set([
84
- "area",
85
- "base",
86
- "basefont",
87
- "br",
88
- "col",
89
- "command",
90
- "embed",
91
- "frame",
92
- "hr",
93
- "img",
94
- "input",
95
- "isindex",
96
- "keygen",
97
- "link",
98
- "meta",
99
- "param",
100
- "source",
101
- "track",
102
- "wbr"
103
- ]), x = /* @__PURE__ */ new Set(["math", "svg"]), y = /* @__PURE__ */ new Set([
104
- "mi",
105
- "mo",
106
- "mn",
107
- "ms",
108
- "mtext",
109
- "annotation-xml",
110
- "foreignobject",
111
- "desc",
112
- "title"
113
- ]), M = /\s|\//, j = (
114
- /** @class */
115
- (function() {
116
- function s(t, e) {
117
- e === void 0 && (e = {});
118
- var i, n, r, h, a;
119
- this.options = e, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.foreignContext = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = t ?? {}, this.lowerCaseTagNames = (i = e.lowerCaseTags) !== null && i !== void 0 ? i : !e.xmlMode, this.lowerCaseAttributeNames = (n = e.lowerCaseAttributeNames) !== null && n !== void 0 ? n : !e.xmlMode, this.tokenizer = new ((r = e.Tokenizer) !== null && r !== void 0 ? r : b.default)(this.options, this), (a = (h = this.cbs).onparserinit) === null || a === void 0 || a.call(h, this);
1
+ import S, { QuoteType as u } from "./index-Tokenizer.js";
2
+ import { fromCodePoint as p } from "./index-decode_codepoint.js";
3
+ const f = /* @__PURE__ */ new Set([
4
+ "input",
5
+ "option",
6
+ "optgroup",
7
+ "select",
8
+ "button",
9
+ "datalist",
10
+ "textarea"
11
+ ]), n = /* @__PURE__ */ new Set(["p"]), v = /* @__PURE__ */ new Set(["thead", "tbody"]), w = /* @__PURE__ */ new Set(["dd", "dt"]), x = /* @__PURE__ */ new Set(["rt", "rp"]), C = /* @__PURE__ */ new Map([
12
+ ["tr", /* @__PURE__ */ new Set(["tr", "th", "td"])],
13
+ ["th", /* @__PURE__ */ new Set(["th"])],
14
+ ["td", /* @__PURE__ */ new Set(["thead", "th", "td"])],
15
+ ["body", /* @__PURE__ */ new Set(["head", "link", "script"])],
16
+ ["li", /* @__PURE__ */ new Set(["li"])],
17
+ ["p", n],
18
+ ["h1", n],
19
+ ["h2", n],
20
+ ["h3", n],
21
+ ["h4", n],
22
+ ["h5", n],
23
+ ["h6", n],
24
+ ["select", f],
25
+ ["input", f],
26
+ ["output", f],
27
+ ["button", f],
28
+ ["datalist", f],
29
+ ["textarea", f],
30
+ ["option", /* @__PURE__ */ new Set(["option"])],
31
+ ["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
32
+ ["dd", w],
33
+ ["dt", w],
34
+ ["address", n],
35
+ ["article", n],
36
+ ["aside", n],
37
+ ["blockquote", n],
38
+ ["details", n],
39
+ ["div", n],
40
+ ["dl", n],
41
+ ["fieldset", n],
42
+ ["figcaption", n],
43
+ ["figure", n],
44
+ ["footer", n],
45
+ ["form", n],
46
+ ["header", n],
47
+ ["hr", n],
48
+ ["main", n],
49
+ ["nav", n],
50
+ ["ol", n],
51
+ ["pre", n],
52
+ ["section", n],
53
+ ["table", n],
54
+ ["ul", n],
55
+ ["rt", x],
56
+ ["rp", x],
57
+ ["tbody", v],
58
+ ["tfoot", v]
59
+ ]), T = /* @__PURE__ */ new Set([
60
+ "area",
61
+ "base",
62
+ "basefont",
63
+ "br",
64
+ "col",
65
+ "command",
66
+ "embed",
67
+ "frame",
68
+ "hr",
69
+ "img",
70
+ "input",
71
+ "isindex",
72
+ "keygen",
73
+ "link",
74
+ "meta",
75
+ "param",
76
+ "source",
77
+ "track",
78
+ "wbr"
79
+ ]), _ = /* @__PURE__ */ new Set(["math", "svg"]), k = /* @__PURE__ */ new Set([
80
+ "mi",
81
+ "mo",
82
+ "mn",
83
+ "ms",
84
+ "mtext",
85
+ "annotation-xml",
86
+ "foreignobject",
87
+ "desc",
88
+ "title"
89
+ ]), I = /\s|\//;
90
+ class E {
91
+ constructor(t, e = {}) {
92
+ var s, i, o, h, a;
93
+ this.options = e, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.foreignContext = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = t ?? {}, this.lowerCaseTagNames = (s = e.lowerCaseTags) !== null && s !== void 0 ? s : !e.xmlMode, this.lowerCaseAttributeNames = (i = e.lowerCaseAttributeNames) !== null && i !== void 0 ? i : !e.xmlMode, this.tokenizer = new ((o = e.Tokenizer) !== null && o !== void 0 ? o : S)(this.options, this), (a = (h = this.cbs).onparserinit) === null || a === void 0 || a.call(h, this);
94
+ }
95
+ // Tokenizer event handlers
96
+ /** @internal */
97
+ ontext(t, e) {
98
+ var s, i;
99
+ const o = this.getSlice(t, e);
100
+ this.endIndex = e - 1, (i = (s = this.cbs).ontext) === null || i === void 0 || i.call(s, o), this.startIndex = e;
101
+ }
102
+ /** @internal */
103
+ ontextentity(t) {
104
+ var e, s;
105
+ const i = this.tokenizer.getSectionStart();
106
+ this.endIndex = i - 1, (s = (e = this.cbs).ontext) === null || s === void 0 || s.call(e, p(t)), this.startIndex = i;
107
+ }
108
+ isVoidElement(t) {
109
+ return !this.options.xmlMode && T.has(t);
110
+ }
111
+ /** @internal */
112
+ onopentagname(t, e) {
113
+ this.endIndex = e;
114
+ let s = this.getSlice(t, e);
115
+ this.lowerCaseTagNames && (s = s.toLowerCase()), this.emitOpenTag(s);
116
+ }
117
+ emitOpenTag(t) {
118
+ var e, s, i, o;
119
+ this.openTagStart = this.startIndex, this.tagname = t;
120
+ const h = !this.options.xmlMode && C.get(t);
121
+ if (h)
122
+ for (; this.stack.length > 0 && h.has(this.stack[this.stack.length - 1]); ) {
123
+ const a = this.stack.pop();
124
+ (s = (e = this.cbs).onclosetag) === null || s === void 0 || s.call(e, a, !0);
120
125
  }
121
- return s.prototype.ontext = function(t, e) {
122
- var i, n, r = this.getSlice(t, e);
123
- this.endIndex = e - 1, (n = (i = this.cbs).ontext) === null || n === void 0 || n.call(i, r), this.startIndex = e;
124
- }, s.prototype.ontextentity = function(t) {
125
- var e, i, n = this.tokenizer.getSectionStart();
126
- this.endIndex = n - 1, (i = (e = this.cbs).ontext) === null || i === void 0 || i.call(e, (0, g.fromCodePoint)(t)), this.startIndex = n;
127
- }, s.prototype.isVoidElement = function(t) {
128
- return !this.options.xmlMode && P.has(t);
129
- }, s.prototype.onopentagname = function(t, e) {
130
- this.endIndex = e;
131
- var i = this.getSlice(t, e);
132
- this.lowerCaseTagNames && (i = i.toLowerCase()), this.emitOpenTag(i);
133
- }, s.prototype.emitOpenTag = function(t) {
134
- var e, i, n, r;
135
- this.openTagStart = this.startIndex, this.tagname = t;
136
- var h = !this.options.xmlMode && z.get(t);
137
- if (h)
138
- for (; this.stack.length > 0 && h.has(this.stack[this.stack.length - 1]); ) {
139
- var a = this.stack.pop();
140
- (i = (e = this.cbs).onclosetag) === null || i === void 0 || i.call(e, a, !0);
141
- }
142
- this.isVoidElement(t) || (this.stack.push(t), x.has(t) ? this.foreignContext.push(!0) : y.has(t) && this.foreignContext.push(!1)), (r = (n = this.cbs).onopentagname) === null || r === void 0 || r.call(n, t), this.cbs.onopentag && (this.attribs = {});
143
- }, s.prototype.endOpenTag = function(t) {
144
- var e, i;
145
- this.startIndex = this.openTagStart, this.attribs && ((i = (e = this.cbs).onopentag) === null || i === void 0 || i.call(e, this.tagname, this.attribs, t), this.attribs = null), this.cbs.onclosetag && this.isVoidElement(this.tagname) && this.cbs.onclosetag(this.tagname, !0), this.tagname = "";
146
- }, s.prototype.onopentagend = function(t) {
147
- this.endIndex = t, this.endOpenTag(!1), this.startIndex = t + 1;
148
- }, s.prototype.onclosetag = function(t, e) {
149
- var i, n, r, h, a, u;
150
- this.endIndex = e;
151
- var l = this.getSlice(t, e);
152
- if (this.lowerCaseTagNames && (l = l.toLowerCase()), (x.has(l) || y.has(l)) && this.foreignContext.pop(), this.isVoidElement(l))
153
- !this.options.xmlMode && l === "br" && ((n = (i = this.cbs).onopentagname) === null || n === void 0 || n.call(i, "br"), (h = (r = this.cbs).onopentag) === null || h === void 0 || h.call(r, "br", {}, !0), (u = (a = this.cbs).onclosetag) === null || u === void 0 || u.call(a, "br", !1));
154
- else {
155
- var d = this.stack.lastIndexOf(l);
156
- if (d !== -1)
157
- if (this.cbs.onclosetag)
158
- for (var p = this.stack.length - d; p--; )
159
- this.cbs.onclosetag(this.stack.pop(), p !== 0);
160
- else
161
- this.stack.length = d;
162
- else !this.options.xmlMode && l === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
163
- }
164
- this.startIndex = e + 1;
165
- }, s.prototype.onselfclosingtag = function(t) {
166
- this.endIndex = t, this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1] ? (this.closeCurrentTag(!1), this.startIndex = t + 1) : this.onopentagend(t);
167
- }, s.prototype.closeCurrentTag = function(t) {
168
- var e, i, n = this.tagname;
169
- this.endOpenTag(t), this.stack[this.stack.length - 1] === n && ((i = (e = this.cbs).onclosetag) === null || i === void 0 || i.call(e, n, !t), this.stack.pop());
170
- }, s.prototype.onattribname = function(t, e) {
171
- this.startIndex = t;
172
- var i = this.getSlice(t, e);
173
- this.attribname = this.lowerCaseAttributeNames ? i.toLowerCase() : i;
174
- }, s.prototype.onattribdata = function(t, e) {
175
- this.attribvalue += this.getSlice(t, e);
176
- }, s.prototype.onattribentity = function(t) {
177
- this.attribvalue += (0, g.fromCodePoint)(t);
178
- }, s.prototype.onattribend = function(t, e) {
179
- var i, n;
180
- this.endIndex = e, (n = (i = this.cbs).onattribute) === null || n === void 0 || n.call(i, this.attribname, this.attribvalue, t === b.QuoteType.Double ? '"' : t === b.QuoteType.Single ? "'" : t === b.QuoteType.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
181
- }, s.prototype.getInstructionName = function(t) {
182
- var e = t.search(M), i = e < 0 ? t : t.substr(0, e);
183
- return this.lowerCaseTagNames && (i = i.toLowerCase()), i;
184
- }, s.prototype.ondeclaration = function(t, e) {
185
- this.endIndex = e;
186
- var i = this.getSlice(t, e);
187
- if (this.cbs.onprocessinginstruction) {
188
- var n = this.getInstructionName(i);
189
- this.cbs.onprocessinginstruction("!".concat(n), "!".concat(i));
190
- }
191
- this.startIndex = e + 1;
192
- }, s.prototype.onprocessinginstruction = function(t, e) {
193
- this.endIndex = e;
194
- var i = this.getSlice(t, e);
195
- if (this.cbs.onprocessinginstruction) {
196
- var n = this.getInstructionName(i);
197
- this.cbs.onprocessinginstruction("?".concat(n), "?".concat(i));
198
- }
199
- this.startIndex = e + 1;
200
- }, s.prototype.oncomment = function(t, e, i) {
201
- var n, r, h, a;
202
- this.endIndex = e, (r = (n = this.cbs).oncomment) === null || r === void 0 || r.call(n, this.getSlice(t, e - i)), (a = (h = this.cbs).oncommentend) === null || a === void 0 || a.call(h), this.startIndex = e + 1;
203
- }, s.prototype.oncdata = function(t, e, i) {
204
- var n, r, h, a, u, l, d, p, S, v;
205
- this.endIndex = e;
206
- var C = this.getSlice(t, e - i);
207
- this.options.xmlMode || this.options.recognizeCDATA ? ((r = (n = this.cbs).oncdatastart) === null || r === void 0 || r.call(n), (a = (h = this.cbs).ontext) === null || a === void 0 || a.call(h, C), (l = (u = this.cbs).oncdataend) === null || l === void 0 || l.call(u)) : ((p = (d = this.cbs).oncomment) === null || p === void 0 || p.call(d, "[CDATA[".concat(C, "]]")), (v = (S = this.cbs).oncommentend) === null || v === void 0 || v.call(S)), this.startIndex = e + 1;
208
- }, s.prototype.onend = function() {
209
- var t, e;
126
+ this.isVoidElement(t) || (this.stack.push(t), _.has(t) ? this.foreignContext.push(!0) : k.has(t) && this.foreignContext.push(!1)), (o = (i = this.cbs).onopentagname) === null || o === void 0 || o.call(i, t), this.cbs.onopentag && (this.attribs = {});
127
+ }
128
+ endOpenTag(t) {
129
+ var e, s;
130
+ this.startIndex = this.openTagStart, this.attribs && ((s = (e = this.cbs).onopentag) === null || s === void 0 || s.call(e, this.tagname, this.attribs, t), this.attribs = null), this.cbs.onclosetag && this.isVoidElement(this.tagname) && this.cbs.onclosetag(this.tagname, !0), this.tagname = "";
131
+ }
132
+ /** @internal */
133
+ onopentagend(t) {
134
+ this.endIndex = t, this.endOpenTag(!1), this.startIndex = t + 1;
135
+ }
136
+ /** @internal */
137
+ onclosetag(t, e) {
138
+ var s, i, o, h, a, l;
139
+ this.endIndex = e;
140
+ let r = this.getSlice(t, e);
141
+ if (this.lowerCaseTagNames && (r = r.toLowerCase()), (_.has(r) || k.has(r)) && this.foreignContext.pop(), this.isVoidElement(r))
142
+ !this.options.xmlMode && r === "br" && ((i = (s = this.cbs).onopentagname) === null || i === void 0 || i.call(s, "br"), (h = (o = this.cbs).onopentag) === null || h === void 0 || h.call(o, "br", {}, !0), (l = (a = this.cbs).onclosetag) === null || l === void 0 || l.call(a, "br", !1));
143
+ else {
144
+ const c = this.stack.lastIndexOf(r);
145
+ if (c !== -1)
210
146
  if (this.cbs.onclosetag) {
211
- this.endIndex = this.startIndex;
212
- for (var i = this.stack.length; i > 0; this.cbs.onclosetag(this.stack[--i], !0))
213
- ;
214
- }
215
- (e = (t = this.cbs).onend) === null || e === void 0 || e.call(t);
216
- }, s.prototype.reset = function() {
217
- var t, e, i, n;
218
- (e = (t = this.cbs).onreset) === null || e === void 0 || e.call(t), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, (n = (i = this.cbs).onparserinit) === null || n === void 0 || n.call(i, this), this.buffers.length = 0, this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1;
219
- }, s.prototype.parseComplete = function(t) {
220
- this.reset(), this.end(t);
221
- }, s.prototype.getSlice = function(t, e) {
222
- for (; t - this.bufferOffset >= this.buffers[0].length; )
223
- this.shiftBuffer();
224
- for (var i = this.buffers[0].slice(t - this.bufferOffset, e - this.bufferOffset); e - this.bufferOffset > this.buffers[0].length; )
225
- this.shiftBuffer(), i += this.buffers[0].slice(0, e - this.bufferOffset);
226
- return i;
227
- }, s.prototype.shiftBuffer = function() {
228
- this.bufferOffset += this.buffers[0].length, this.writeIndex--, this.buffers.shift();
229
- }, s.prototype.write = function(t) {
230
- var e, i;
231
- if (this.ended) {
232
- (i = (e = this.cbs).onerror) === null || i === void 0 || i.call(e, new Error(".write() after done!"));
233
- return;
234
- }
235
- this.buffers.push(t), this.tokenizer.running && (this.tokenizer.write(t), this.writeIndex++);
236
- }, s.prototype.end = function(t) {
237
- var e, i;
238
- if (this.ended) {
239
- (i = (e = this.cbs).onerror) === null || i === void 0 || i.call(e, new Error(".end() after done!"));
240
- return;
241
- }
242
- t && this.write(t), this.ended = !0, this.tokenizer.end();
243
- }, s.prototype.pause = function() {
244
- this.tokenizer.pause();
245
- }, s.prototype.resume = function() {
246
- for (this.tokenizer.resume(); this.tokenizer.running && this.writeIndex < this.buffers.length; )
247
- this.tokenizer.write(this.buffers[this.writeIndex++]);
248
- this.ended && this.tokenizer.end();
249
- }, s.prototype.parseChunk = function(t) {
250
- this.write(t);
251
- }, s.prototype.done = function(t) {
252
- this.end(t);
253
- }, s;
254
- })()
255
- );
256
- return c.Parser = j, c;
147
+ let d = this.stack.length - c;
148
+ for (; d--; )
149
+ this.cbs.onclosetag(this.stack.pop(), d !== 0);
150
+ } else
151
+ this.stack.length = c;
152
+ else !this.options.xmlMode && r === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
153
+ }
154
+ this.startIndex = e + 1;
155
+ }
156
+ /** @internal */
157
+ onselfclosingtag(t) {
158
+ this.endIndex = t, this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1] ? (this.closeCurrentTag(!1), this.startIndex = t + 1) : this.onopentagend(t);
159
+ }
160
+ closeCurrentTag(t) {
161
+ var e, s;
162
+ const i = this.tagname;
163
+ this.endOpenTag(t), this.stack[this.stack.length - 1] === i && ((s = (e = this.cbs).onclosetag) === null || s === void 0 || s.call(e, i, !t), this.stack.pop());
164
+ }
165
+ /** @internal */
166
+ onattribname(t, e) {
167
+ this.startIndex = t;
168
+ const s = this.getSlice(t, e);
169
+ this.attribname = this.lowerCaseAttributeNames ? s.toLowerCase() : s;
170
+ }
171
+ /** @internal */
172
+ onattribdata(t, e) {
173
+ this.attribvalue += this.getSlice(t, e);
174
+ }
175
+ /** @internal */
176
+ onattribentity(t) {
177
+ this.attribvalue += p(t);
178
+ }
179
+ /** @internal */
180
+ onattribend(t, e) {
181
+ var s, i;
182
+ this.endIndex = e, (i = (s = this.cbs).onattribute) === null || i === void 0 || i.call(s, this.attribname, this.attribvalue, t === u.Double ? '"' : t === u.Single ? "'" : t === u.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
183
+ }
184
+ getInstructionName(t) {
185
+ const e = t.search(I);
186
+ let s = e < 0 ? t : t.substr(0, e);
187
+ return this.lowerCaseTagNames && (s = s.toLowerCase()), s;
188
+ }
189
+ /** @internal */
190
+ ondeclaration(t, e) {
191
+ this.endIndex = e;
192
+ const s = this.getSlice(t, e);
193
+ if (this.cbs.onprocessinginstruction) {
194
+ const i = this.getInstructionName(s);
195
+ this.cbs.onprocessinginstruction(`!${i}`, `!${s}`);
196
+ }
197
+ this.startIndex = e + 1;
198
+ }
199
+ /** @internal */
200
+ onprocessinginstruction(t, e) {
201
+ this.endIndex = e;
202
+ const s = this.getSlice(t, e);
203
+ if (this.cbs.onprocessinginstruction) {
204
+ const i = this.getInstructionName(s);
205
+ this.cbs.onprocessinginstruction(`?${i}`, `?${s}`);
206
+ }
207
+ this.startIndex = e + 1;
208
+ }
209
+ /** @internal */
210
+ oncomment(t, e, s) {
211
+ var i, o, h, a;
212
+ this.endIndex = e, (o = (i = this.cbs).oncomment) === null || o === void 0 || o.call(i, this.getSlice(t, e - s)), (a = (h = this.cbs).oncommentend) === null || a === void 0 || a.call(h), this.startIndex = e + 1;
213
+ }
214
+ /** @internal */
215
+ oncdata(t, e, s) {
216
+ var i, o, h, a, l, r, c, d, g, b;
217
+ this.endIndex = e;
218
+ const m = this.getSlice(t, e - s);
219
+ this.options.xmlMode || this.options.recognizeCDATA ? ((o = (i = this.cbs).oncdatastart) === null || o === void 0 || o.call(i), (a = (h = this.cbs).ontext) === null || a === void 0 || a.call(h, m), (r = (l = this.cbs).oncdataend) === null || r === void 0 || r.call(l)) : ((d = (c = this.cbs).oncomment) === null || d === void 0 || d.call(c, `[CDATA[${m}]]`), (b = (g = this.cbs).oncommentend) === null || b === void 0 || b.call(g)), this.startIndex = e + 1;
220
+ }
221
+ /** @internal */
222
+ onend() {
223
+ var t, e;
224
+ if (this.cbs.onclosetag) {
225
+ this.endIndex = this.startIndex;
226
+ for (let s = this.stack.length; s > 0; this.cbs.onclosetag(this.stack[--s], !0))
227
+ ;
228
+ }
229
+ (e = (t = this.cbs).onend) === null || e === void 0 || e.call(t);
230
+ }
231
+ /**
232
+ * Resets the parser to a blank state, ready to parse a new HTML document
233
+ */
234
+ reset() {
235
+ var t, e, s, i;
236
+ (e = (t = this.cbs).onreset) === null || e === void 0 || e.call(t), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, (i = (s = this.cbs).onparserinit) === null || i === void 0 || i.call(s, this), this.buffers.length = 0, this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1;
237
+ }
238
+ /**
239
+ * Resets the parser, then parses a complete document and
240
+ * pushes it to the handler.
241
+ *
242
+ * @param data Document to parse.
243
+ */
244
+ parseComplete(t) {
245
+ this.reset(), this.end(t);
246
+ }
247
+ getSlice(t, e) {
248
+ for (; t - this.bufferOffset >= this.buffers[0].length; )
249
+ this.shiftBuffer();
250
+ let s = this.buffers[0].slice(t - this.bufferOffset, e - this.bufferOffset);
251
+ for (; e - this.bufferOffset > this.buffers[0].length; )
252
+ this.shiftBuffer(), s += this.buffers[0].slice(0, e - this.bufferOffset);
253
+ return s;
254
+ }
255
+ shiftBuffer() {
256
+ this.bufferOffset += this.buffers[0].length, this.writeIndex--, this.buffers.shift();
257
+ }
258
+ /**
259
+ * Parses a chunk of data and calls the corresponding callbacks.
260
+ *
261
+ * @param chunk Chunk to parse.
262
+ */
263
+ write(t) {
264
+ var e, s;
265
+ if (this.ended) {
266
+ (s = (e = this.cbs).onerror) === null || s === void 0 || s.call(e, new Error(".write() after done!"));
267
+ return;
268
+ }
269
+ this.buffers.push(t), this.tokenizer.running && (this.tokenizer.write(t), this.writeIndex++);
270
+ }
271
+ /**
272
+ * Parses the end of the buffer and clears the stack, calls onend.
273
+ *
274
+ * @param chunk Optional final chunk to parse.
275
+ */
276
+ end(t) {
277
+ var e, s;
278
+ if (this.ended) {
279
+ (s = (e = this.cbs).onerror) === null || s === void 0 || s.call(e, new Error(".end() after done!"));
280
+ return;
281
+ }
282
+ t && this.write(t), this.ended = !0, this.tokenizer.end();
283
+ }
284
+ /**
285
+ * Pauses parsing. The parser won't emit events until `resume` is called.
286
+ */
287
+ pause() {
288
+ this.tokenizer.pause();
289
+ }
290
+ /**
291
+ * Resumes parsing after `pause` was called.
292
+ */
293
+ resume() {
294
+ for (this.tokenizer.resume(); this.tokenizer.running && this.writeIndex < this.buffers.length; )
295
+ this.tokenizer.write(this.buffers[this.writeIndex++]);
296
+ this.ended && this.tokenizer.end();
297
+ }
298
+ /**
299
+ * Alias of `write`, for backwards compatibility.
300
+ *
301
+ * @param chunk Chunk to parse.
302
+ * @deprecated
303
+ */
304
+ parseChunk(t) {
305
+ this.write(t);
306
+ }
307
+ /**
308
+ * Alias of `end`, for backwards compatibility.
309
+ *
310
+ * @param chunk Optional final chunk to parse.
311
+ * @deprecated
312
+ */
313
+ done(t) {
314
+ this.end(t);
315
+ }
257
316
  }
258
317
  export {
259
- B as __require
318
+ E as Parser
260
319
  };