@arcadeai/design-system 3.39.1 → 3.39.2

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 (414) hide show
  1. package/dist/CompositeItem-CniPsjzP.js +30 -0
  2. package/dist/CompositeList-yq5K_yj6.js +81 -0
  3. package/dist/CompositeRoot-Dy-5A-Je.js +206 -0
  4. package/dist/DialogRoot-DDokfJcO.js +57 -0
  5. package/dist/DialogTrigger-CFUE8YsM.js +402 -0
  6. package/dist/DirectionContext-BSOheMwC.js +10 -0
  7. package/dist/FieldItemContext-CF2fRwBC.js +12 -0
  8. package/dist/FloatingPortalLite-BHsRx4XN.js +29 -0
  9. package/dist/InternalBackdrop-BVEfe6O1.js +610 -0
  10. package/dist/LabelableContext-Dzw1DWuj.js +171 -0
  11. package/dist/Separator-CswSYAXX.js +25 -0
  12. package/dist/ToolbarRootContext-D7EsmJ5f.js +10 -0
  13. package/dist/andromeeda-B-gfN00q.js +4 -0
  14. package/dist/angular-html-dA1qUKRV.js +32 -0
  15. package/dist/angular-ts-CXyBC0vY.js +21 -0
  16. package/dist/apl-CjNiDgad.js +3 -3
  17. package/dist/assets/images/arcade-grid.d.ts.map +1 -1
  18. package/dist/assets/images/arcade-grid.js +1 -0
  19. package/dist/assets/index.css +1 -1
  20. package/dist/assets/tokens.css +1 -1
  21. package/dist/assets/variables.css +1 -1
  22. package/dist/astro--3ZkKqYU.js +18 -0
  23. package/dist/astro-CFFExE8Q.js +5 -5
  24. package/dist/aurora-x-B56eICma.js +4 -0
  25. package/dist/ayu-dark-DJSOaKig.js +4 -0
  26. package/dist/ayu-light-BPfFt4v-.js +4 -0
  27. package/dist/ayu-mirage-DmPLRBj7.js +4 -0
  28. package/dist/blade-BoRuQEEj.js +20 -0
  29. package/dist/blade-D0HyNvCw.js +4 -4
  30. package/dist/c-C4SM8H98.js +6 -0
  31. package/dist/cairo-DM6WF2e3.js +1 -1
  32. package/dist/{calendar-DreAgQKY.js → calendar-CLEnvrbp.js} +483 -482
  33. package/dist/catppuccin-frappe-CA5k7W3u.js +4 -0
  34. package/dist/catppuccin-latte-CYfkUW5v.js +4 -0
  35. package/dist/catppuccin-macchiato-BOj_4I3g.js +4 -0
  36. package/dist/catppuccin-mocha-BXpUXme4.js +4 -0
  37. package/dist/clamp-BxE4ZAuA.js +17 -0
  38. package/dist/cobol-HihOMwht.js +1 -1
  39. package/dist/coffee-D8Swy5yR.js +8 -0
  40. package/dist/components/index.js +665 -646
  41. package/dist/components/ui/atoms/accordion.d.ts +9 -7
  42. package/dist/components/ui/atoms/accordion.d.ts.map +1 -1
  43. package/dist/components/ui/atoms/accordion.js +454 -243
  44. package/dist/components/ui/atoms/alert-dialog.d.ts +13 -9
  45. package/dist/components/ui/atoms/alert-dialog.d.ts.map +1 -1
  46. package/dist/components/ui/atoms/alert-dialog.js +149 -183
  47. package/dist/components/ui/atoms/alert.d.ts +2 -1
  48. package/dist/components/ui/atoms/alert.d.ts.map +1 -1
  49. package/dist/components/ui/atoms/alert.js +36 -25
  50. package/dist/components/ui/atoms/avatar.d.ts +10 -5
  51. package/dist/components/ui/atoms/avatar.d.ts.map +1 -1
  52. package/dist/components/ui/atoms/avatar.js +198 -205
  53. package/dist/components/ui/atoms/badge.d.ts +4 -5
  54. package/dist/components/ui/atoms/badge.d.ts.map +1 -1
  55. package/dist/components/ui/atoms/badge.js +31 -22
  56. package/dist/components/ui/atoms/breadcrumb.d.ts +4 -5
  57. package/dist/components/ui/atoms/breadcrumb.d.ts.map +1 -1
  58. package/dist/components/ui/atoms/breadcrumb.js +46 -29
  59. package/dist/components/ui/atoms/button.d.ts +4 -6
  60. package/dist/components/ui/atoms/button.d.ts.map +1 -1
  61. package/dist/components/ui/atoms/button.js +59 -28
  62. package/dist/components/ui/atoms/byoc-badge.d.ts +2 -2
  63. package/dist/components/ui/atoms/byoc-badge.d.ts.map +1 -1
  64. package/dist/components/ui/atoms/byoc-badge.js +14 -8
  65. package/dist/components/ui/atoms/calendar.d.ts +6 -16
  66. package/dist/components/ui/atoms/calendar.d.ts.map +1 -1
  67. package/dist/components/ui/atoms/calendar.js +1 -1
  68. package/dist/components/ui/atoms/card.d.ts +4 -2
  69. package/dist/components/ui/atoms/card.d.ts.map +1 -1
  70. package/dist/components/ui/atoms/card.js +46 -35
  71. package/dist/components/ui/atoms/chart.d.ts +24 -48
  72. package/dist/components/ui/atoms/chart.d.ts.map +1 -1
  73. package/dist/components/ui/atoms/chart.js +179 -148
  74. package/dist/components/ui/atoms/checkbox.d.ts +2 -3
  75. package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
  76. package/dist/components/ui/atoms/checkbox.js +269 -249
  77. package/dist/components/ui/atoms/code-block.js +1 -1
  78. package/dist/components/ui/atoms/collapsible.d.ts +5 -5
  79. package/dist/components/ui/atoms/collapsible.d.ts.map +1 -1
  80. package/dist/components/ui/atoms/collapsible.js +208 -23
  81. package/dist/components/ui/atoms/command.d.ts +4 -3
  82. package/dist/components/ui/atoms/command.d.ts.map +1 -1
  83. package/dist/components/ui/atoms/command.js +1655 -348
  84. package/dist/components/ui/atoms/dialog.d.ts +12 -10
  85. package/dist/components/ui/atoms/dialog.d.ts.map +1 -1
  86. package/dist/components/ui/atoms/dialog.js +91 -80
  87. package/dist/components/ui/atoms/dropdown-menu.d.ts +21 -17
  88. package/dist/components/ui/atoms/dropdown-menu.d.ts.map +1 -1
  89. package/dist/components/ui/atoms/dropdown-menu.js +1507 -899
  90. package/dist/components/ui/atoms/form.d.ts +5 -3
  91. package/dist/components/ui/atoms/form.d.ts.map +1 -1
  92. package/dist/components/ui/atoms/form.js +36 -42
  93. package/dist/components/ui/atoms/hover-card.d.ts +5 -6
  94. package/dist/components/ui/atoms/hover-card.d.ts.map +1 -1
  95. package/dist/components/ui/atoms/hover-card.js +355 -193
  96. package/dist/components/ui/atoms/index.d.ts +1 -0
  97. package/dist/components/ui/atoms/index.d.ts.map +1 -1
  98. package/dist/components/ui/atoms/index.js +566 -547
  99. package/dist/components/ui/atoms/input-group.d.ts +20 -0
  100. package/dist/components/ui/atoms/input-group.d.ts.map +1 -0
  101. package/dist/components/ui/atoms/input-group.js +136 -0
  102. package/dist/components/ui/atoms/input.d.ts.map +1 -1
  103. package/dist/components/ui/atoms/input.js +113 -13
  104. package/dist/components/ui/atoms/label.d.ts +1 -2
  105. package/dist/components/ui/atoms/label.d.ts.map +1 -1
  106. package/dist/components/ui/atoms/label.js +18 -31
  107. package/dist/components/ui/atoms/markdown.js +1 -1
  108. package/dist/components/ui/atoms/mobile-tooltip.js +4 -3
  109. package/dist/components/ui/atoms/popover.d.ts +8 -6
  110. package/dist/components/ui/atoms/popover.d.ts.map +1 -1
  111. package/dist/components/ui/atoms/popover.js +617 -245
  112. package/dist/components/ui/atoms/pro-badge.js +1 -1
  113. package/dist/components/ui/atoms/progress.d.ts +7 -4
  114. package/dist/components/ui/atoms/progress.d.ts.map +1 -1
  115. package/dist/components/ui/atoms/progress.js +236 -92
  116. package/dist/components/ui/atoms/radio-group.d.ts +4 -4
  117. package/dist/components/ui/atoms/radio-group.d.ts.map +1 -1
  118. package/dist/components/ui/atoms/radio-group.js +355 -251
  119. package/dist/components/ui/atoms/resizable.d.ts +3 -4
  120. package/dist/components/ui/atoms/resizable.d.ts.map +1 -1
  121. package/dist/components/ui/atoms/resizable.js +25 -27
  122. package/dist/components/ui/atoms/scroll-area.d.ts +5 -5
  123. package/dist/components/ui/atoms/scroll-area.d.ts.map +1 -1
  124. package/dist/components/ui/atoms/scroll-area.js +611 -526
  125. package/dist/components/ui/atoms/scroll-button.d.ts.map +1 -1
  126. package/dist/components/ui/atoms/scroll-button.js +27 -22
  127. package/dist/components/ui/atoms/select.d.ts +11 -11
  128. package/dist/components/ui/atoms/select.d.ts.map +1 -1
  129. package/dist/components/ui/atoms/select.js +1525 -889
  130. package/dist/components/ui/atoms/separator.d.ts +2 -3
  131. package/dist/components/ui/atoms/separator.d.ts.map +1 -1
  132. package/dist/components/ui/atoms/separator.js +16 -35
  133. package/dist/components/ui/atoms/sheet.d.ts +9 -9
  134. package/dist/components/ui/atoms/sheet.d.ts.map +1 -1
  135. package/dist/components/ui/atoms/sheet.js +65 -64
  136. package/dist/components/ui/atoms/sidebar.d.ts +9 -15
  137. package/dist/components/ui/atoms/sidebar.d.ts.map +1 -1
  138. package/dist/components/ui/atoms/sidebar.js +288 -283
  139. package/dist/components/ui/atoms/skeleton.js +4 -4
  140. package/dist/components/ui/atoms/slider.d.ts +2 -3
  141. package/dist/components/ui/atoms/slider.d.ts.map +1 -1
  142. package/dist/components/ui/atoms/slider.js +886 -440
  143. package/dist/components/ui/atoms/switch.d.ts +4 -5
  144. package/dist/components/ui/atoms/switch.d.ts.map +1 -1
  145. package/dist/components/ui/atoms/switch.js +218 -151
  146. package/dist/components/ui/atoms/table.d.ts +2 -4
  147. package/dist/components/ui/atoms/table.d.ts.map +1 -1
  148. package/dist/components/ui/atoms/table.js +35 -36
  149. package/dist/components/ui/atoms/tabs.d.ts +11 -7
  150. package/dist/components/ui/atoms/tabs.d.ts.map +1 -1
  151. package/dist/components/ui/atoms/tabs.js +492 -186
  152. package/dist/components/ui/atoms/textarea.d.ts.map +1 -1
  153. package/dist/components/ui/atoms/textarea.js +7 -7
  154. package/dist/components/ui/atoms/toggle.d.ts +2 -3
  155. package/dist/components/ui/atoms/toggle.d.ts.map +1 -1
  156. package/dist/components/ui/atoms/toggle.js +92 -45
  157. package/dist/components/ui/atoms/tooltip.d.ts +6 -9
  158. package/dist/components/ui/atoms/tooltip.d.ts.map +1 -1
  159. package/dist/components/ui/atoms/tooltip.js +625 -343
  160. package/dist/components/ui/atoms/view-tools-control.js +16 -15
  161. package/dist/components/ui/atoms/virtualized-grid.d.ts +11 -4
  162. package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
  163. package/dist/components/ui/atoms/virtualized-grid.js +365 -333
  164. package/dist/components/ui/index.js +665 -646
  165. package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -1
  166. package/dist/components/ui/molecules/chat-history-item.js +47 -40
  167. package/dist/components/ui/molecules/command-bar.js +1 -1
  168. package/dist/components/ui/molecules/confirm-popover.d.ts +2 -2
  169. package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -1
  170. package/dist/components/ui/molecules/confirm-popover.js +26 -24
  171. package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -1
  172. package/dist/components/ui/molecules/date-time-picker.js +17 -11
  173. package/dist/components/ui/molecules/index.js +1 -1
  174. package/dist/components/ui/molecules/message.d.ts +2 -3
  175. package/dist/components/ui/molecules/message.d.ts.map +1 -1
  176. package/dist/components/ui/molecules/message.js +10 -16
  177. package/dist/components/ui/molecules/prompt-input.d.ts +1 -1
  178. package/dist/components/ui/molecules/prompt-input.d.ts.map +1 -1
  179. package/dist/components/ui/molecules/prompt-input.js +21 -22
  180. package/dist/components/ui/molecules/requirement-badges.d.ts.map +1 -1
  181. package/dist/components/ui/molecules/requirement-badges.js +3 -3
  182. package/dist/components/ui/molecules/steps-progress.js +1 -0
  183. package/dist/components/ui/molecules/tool-call-accordion.js +1 -0
  184. package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
  185. package/dist/components/ui/molecules/tool-card.js +60 -47
  186. package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
  187. package/dist/components/ui/molecules/toolkit-card.js +1 -1
  188. package/dist/components/ui/molecules/user-nav.d.ts.map +1 -1
  189. package/dist/components/ui/molecules/user-nav.js +62 -57
  190. package/dist/components/ui/templates/auth-template.js +5 -5
  191. package/dist/composite-BASdnlNo.js +220 -0
  192. package/dist/composite-BSpUD7nI.js +66 -0
  193. package/dist/cpp-CA4iM_wM.js +18 -0
  194. package/dist/createBaseUIEventDetails-CqidROtw.js +55 -0
  195. package/dist/crystal-CRJyc4G-.js +4 -4
  196. package/dist/css-M7EaDHN_.js +6 -0
  197. package/dist/csv-B7yqA61e.js +6 -0
  198. package/dist/dark-plus-B4vfALTw.js +4 -0
  199. package/dist/detectBrowser-Dn2N72k1.js +42 -0
  200. package/dist/dracula-Cb59ZzY3.js +4 -0
  201. package/dist/dracula-soft-aaEmszbU.js +4 -0
  202. package/dist/edge-BYQkOzbF.js +1 -1
  203. package/dist/element-DSo91iOi.js +88 -0
  204. package/dist/elm-BtNbw_Cd.js +1 -1
  205. package/dist/erlang-DNcDT8Hi.js +1 -1
  206. package/dist/event-BCa0Un_3.js +30 -0
  207. package/dist/everforest-dark-CLp_21RJ.js +4 -0
  208. package/dist/everforest-light-CZ0NCAAv.js +4 -0
  209. package/dist/floating-ui.utils-48URp89E.js +126 -0
  210. package/dist/floating-ui.utils.dom-jr2suqy2.js +135 -0
  211. package/dist/fsharp-CYOiIVNx.js +1 -1
  212. package/dist/getDisabledMountTransitionStyles-fmnaQYVj.js +1539 -0
  213. package/dist/getPseudoElementBounds-B4_miSEJ.js +364 -0
  214. package/dist/git-rebase-ZWUFO_T4.js +1 -1
  215. package/dist/github-dark-BD3lImVS.js +4 -0
  216. package/dist/github-dark-default-ID_nBUwl.js +4 -0
  217. package/dist/github-dark-dimmed-Cw4rFgde.js +4 -0
  218. package/dist/github-dark-high-contrast-DSby9de8.js +4 -0
  219. package/dist/github-light-W396yAFe.js +4 -0
  220. package/dist/github-light-default-DCAQ2px1.js +4 -0
  221. package/dist/github-light-high-contrast-ChWJGEvx.js +4 -0
  222. package/dist/glimmer-js-DkxNrfPT.js +2 -2
  223. package/dist/glimmer-ts-D6YZEmK_.js +2 -2
  224. package/dist/glsl-CgdqkyFp.js +8 -0
  225. package/dist/graphql-Bv26LTzG.js +14 -0
  226. package/dist/gruvbox-dark-hard-BC1GRqFa.js +4 -0
  227. package/dist/gruvbox-dark-medium-COLy2cDY.js +4 -0
  228. package/dist/gruvbox-dark-soft-B8MALL4f.js +4 -0
  229. package/dist/gruvbox-light-hard-Bzxr_AnB.js +4 -0
  230. package/dist/gruvbox-light-medium-D2fqu3Kj.js +4 -0
  231. package/dist/gruvbox-light-soft-atzRH3-n.js +4 -0
  232. package/dist/hack-ItRNKiEb.js +1 -1
  233. package/dist/haml-B1t5q1Sv.js +10 -0
  234. package/dist/haml-NZLVzu_R.js +1 -1
  235. package/dist/handlebars-B2fb61mr.js +14 -0
  236. package/dist/handlebars-mxStpSE7.js +2 -2
  237. package/dist/highlighted-body-OFNGDK62-Df6AJMbs.js +20 -0
  238. package/dist/hooks/use-mobile.d.ts.map +1 -1
  239. package/dist/hooks/use-mobile.js +11 -12
  240. package/dist/horizon-PFtq58ZB.js +4 -0
  241. package/dist/horizon-bright-2WzHy-Vo.js +4 -0
  242. package/dist/houston-BEqUWhHr.js +4 -0
  243. package/dist/html-B50bmoVb.js +1 -1
  244. package/dist/html-CPZ3oZQ7.js +10 -0
  245. package/dist/html-derivative-B2qv7eyt.js +8 -0
  246. package/dist/http-BQ2t9cn1.js +14 -0
  247. package/dist/hurl-RyCMCa80.js +12 -0
  248. package/dist/imba-DpB-wtPB.js +6 -0
  249. package/dist/index-3rscXtm3.js +4708 -0
  250. package/dist/inertValue-kpZZDBEy.js +7 -0
  251. package/dist/integrations/rhf/index.js +6 -5
  252. package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
  253. package/dist/java-CbphP4lz.js +6 -0
  254. package/dist/javascript-CgYd5l7W.js +6 -0
  255. package/dist/jinja-DFCUirAg.js +11 -0
  256. package/dist/jison-CTEI_s6O.js +8 -0
  257. package/dist/json-B5-prx4F.js +6 -0
  258. package/dist/json5-CZ8R1oUY.js +6 -0
  259. package/dist/jsonc-DMboCKBJ.js +6 -0
  260. package/dist/jsonl-YgIUi4Dg.js +6 -0
  261. package/dist/jsx-D4q4E1UD.js +6 -0
  262. package/dist/julia-2ubi2n9a.js +16 -0
  263. package/dist/just-CEK2SJ_k.js +4 -4
  264. package/dist/kanagawa-dragon-DuYaOBBk.js +4 -0
  265. package/dist/kanagawa-lotus-CyjAihYC.js +4 -0
  266. package/dist/kanagawa-wave-BVdXUMj5.js +4 -0
  267. package/dist/laserwave-B_2VVKNJ.js +4 -0
  268. package/dist/less-MoGo8xoS.js +6 -0
  269. package/dist/light-plus-IB4fPeJj.js +4 -0
  270. package/dist/liquid-CHzkx3jT.js +2 -2
  271. package/dist/lua-Bp3IRv7I.js +1 -1
  272. package/dist/main.js +691 -672
  273. package/dist/markdown-B-zRtm0x.js +6 -0
  274. package/dist/{markdown-D0xxRbwP.js → markdown-B71Eurda.js} +10329 -8108
  275. package/dist/marko-BlmC3dqW.js +14 -0
  276. package/dist/marko-CJBA24Ri.js +2 -2
  277. package/dist/material-theme-CjsSdYF2.js +4 -0
  278. package/dist/material-theme-darker-DEk0vgdS.js +4 -0
  279. package/dist/material-theme-lighter-DEVB_7K5.js +4 -0
  280. package/dist/material-theme-ocean-DK6jm24j.js +4 -0
  281. package/dist/material-theme-palenight-CNkXNpHv.js +4 -0
  282. package/dist/mdc-C9YSUwVC.js +2 -2
  283. package/dist/mdc-CLNk3q28.js +12 -0
  284. package/dist/mdx-CiUWpBB_.js +6 -0
  285. package/dist/mermaid-GHXKKRXX-BkplG-MI.js +5 -0
  286. package/dist/min-dark-CJcHUHwu.js +4 -0
  287. package/dist/min-light-BAN2UR75.js +4 -0
  288. package/dist/monokai-BbXwpjKl.js +4 -0
  289. package/dist/night-owl-csViJ7u4.js +4 -0
  290. package/dist/night-owl-light-BC-NuMC3.js +4 -0
  291. package/dist/nim-QAjRdh9w.js +5 -5
  292. package/dist/nord-B8Sq-VQ0.js +4 -0
  293. package/dist/one-dark-pro-DTdrcl-J.js +4 -0
  294. package/dist/one-light-kPHTChCU.js +4 -0
  295. package/dist/owner-rKN292Q9.js +6 -0
  296. package/dist/perl-DkVrgJBg.js +3 -3
  297. package/dist/php-BIzsF_5x.js +4 -4
  298. package/dist/php-Kn-vgdBD.js +18 -0
  299. package/dist/plastic-DDweBgVs.js +4 -0
  300. package/dist/poimandres-Dqvs16BQ.js +4 -0
  301. package/dist/popupStateMapping-BT9Y_jIq.js +1849 -0
  302. package/dist/postcss-CwL8bLZI.js +6 -0
  303. package/dist/pug-CTOOvSEH.js +12 -0
  304. package/dist/pug-XOw9Q1Ho.js +1 -1
  305. package/dist/python-jjYlTiSH.js +6 -0
  306. package/dist/qml-rTNXsquU.js +1 -1
  307. package/dist/r-C8zl4zMO.js +6 -0
  308. package/dist/react-resizable-panels-BqIpIFl2.js +2017 -0
  309. package/dist/red-DBDwQkX-.js +4 -0
  310. package/dist/regexp-Dpy_RgoJ.js +6 -0
  311. package/dist/resolveAriaLabelledBy-B5vw-szP.js +11 -0
  312. package/dist/rose-pine-DGHrTu7e.js +4 -0
  313. package/dist/rose-pine-dawn-DfRVdapG.js +4 -0
  314. package/dist/rose-pine-moon-DFpJm5Rd.js +4 -0
  315. package/dist/rst-DM32Wy3O.js +5 -5
  316. package/dist/ruby-BeqCs27h.js +8 -8
  317. package/dist/safePolygon-CJcmMc0u.js +389 -0
  318. package/dist/safeReact-DKq-628G.js +7 -0
  319. package/dist/sas-fpEvgATw.js +1 -1
  320. package/dist/sass-BmupNt-w.js +6 -0
  321. package/dist/scss-BZYVIVaN.js +8 -0
  322. package/dist/serializeValue-BebmSzW3.js +14 -0
  323. package/dist/shellscript-fMxXshxv.js +6 -0
  324. package/dist/shellsession-DiDJNQdy.js +1 -1
  325. package/dist/slack-dark-noeC6QPl.js +4 -0
  326. package/dist/slack-ochin-3_2idqLR.js +4 -0
  327. package/dist/snazzy-light-B9cV359v.js +4 -0
  328. package/dist/solarized-dark-B6X0ILWr.js +4 -0
  329. package/dist/solarized-light-LxOemn3c.js +4 -0
  330. package/dist/sql-D30Zid36.js +6 -0
  331. package/dist/stata-B8c5fTjX.js +1 -1
  332. package/dist/styles-DU5BO7fS.js +16 -0
  333. package/dist/stylus-BoBcEBjx.js +6 -0
  334. package/dist/surrealql-CQi7GQN7.js +1 -1
  335. package/dist/svelte-b9PAcyUe.js +14 -0
  336. package/dist/svelte-rYri41WT.js +3 -3
  337. package/dist/synthwave-84-DzQeMpV0.js +4 -0
  338. package/dist/templ-Crs9Ui8q.js +1 -1
  339. package/dist/tex-AHxmLTL0.js +1 -1
  340. package/dist/tokyo-night-CLM-V_Re.js +4 -0
  341. package/dist/{toolkit-card-CB1oiaei.js → toolkit-card-DhpOY80l.js} +56 -36
  342. package/dist/ts-tags-CP1b-4Z2.js +41 -0
  343. package/dist/ts-tags-ioVe2PKw.js +5 -5
  344. package/dist/tsx-QNpb2qLW.js +6 -0
  345. package/dist/twig-DwV2Fi4L.js +2 -2
  346. package/dist/typescript-AhniRyfZ.js +6 -0
  347. package/dist/useAnimationFrame-DIc6eFHa.js +69 -0
  348. package/dist/useAriaLabelledBy-VklrCmKp.js +34 -0
  349. package/dist/useBaseUiId-C8Dq0BQq.js +25 -0
  350. package/dist/useButton-JYPKQKj4.js +150 -0
  351. package/dist/useCollapsiblePanel-9pDlDh3R.js +257 -0
  352. package/dist/useCompositeItem-D00ALGkT.js +35 -0
  353. package/dist/useCompositeListItem-CYQrZg5-.js +74 -0
  354. package/dist/useControlled-Sx-_x7Sz.js +32 -0
  355. package/dist/useFocus-Aj9ShMQu.js +97 -0
  356. package/dist/useIsoLayoutEffect-DpJo20by.js +7 -0
  357. package/dist/useLabelableId-DF_d91GP.js +44 -0
  358. package/dist/useOnFirstRender-B4aruaIA.js +9 -0
  359. package/dist/useOnMount-JHtE6teb.js +9 -0
  360. package/dist/useOpenChangeComplete-DkeH9FGJ.js +130 -0
  361. package/dist/useRender-BNXBkp2o.js +7 -0
  362. package/dist/useRenderElement-DNB2vtF1.js +274 -0
  363. package/dist/useRole-N-RCRzo1.js +76 -0
  364. package/dist/useStableCallback-CudqoENs.js +33 -0
  365. package/dist/useSyncedFloatingRootContext-Bc90zSTy.js +185 -0
  366. package/dist/useTimeout-DAqPwigF.js +33 -0
  367. package/dist/useValueAsRef-LhoZc6As.js +20 -0
  368. package/dist/useValueChanged-Bissqjjn.js +15 -0
  369. package/dist/valueToPercent-BBgE4D3L.js +27 -0
  370. package/dist/vesper-BmV7KiQ0.js +4 -0
  371. package/dist/visuallyHidden-PuyyGHVF.js +22 -0
  372. package/dist/vitesse-black-CxZz3C4s.js +4 -0
  373. package/dist/vitesse-dark-DVUJ0sy2.js +4 -0
  374. package/dist/vitesse-light-BDJohtUr.js +4 -0
  375. package/dist/vue-CY6W2ID0.js +31 -0
  376. package/dist/vue-DXEmyXn9.js +3 -3
  377. package/dist/vue-html-DYXHAJ2G.js +8 -0
  378. package/dist/vue-vine-D41-N99t.js +4 -4
  379. package/dist/vue-vine-DiWTpMwZ.js +18 -0
  380. package/dist/wasm-3y0A1Y71.js +6 -0
  381. package/dist/wasm-Dm9SFfrx.js +7 -0
  382. package/dist/web-BbvN_Lei.js +2846 -0
  383. package/dist/wgsl-SXl3EZUN.js +6 -0
  384. package/dist/wit-Cw0CTVY0.js +6 -0
  385. package/dist/xml-CNXGTZ6Z.js +8 -0
  386. package/dist/xsl-BmSZphgC.js +1 -1
  387. package/dist/yaml-DZqZ2PBD.js +6 -0
  388. package/package.json +37 -34
  389. package/dist/highlighted-body-TPN3WLV5-D6UnKGod.js +0 -19
  390. package/dist/index-0ioNhtNM.js +0 -10
  391. package/dist/index-437EL2iq.js +0 -52
  392. package/dist/index-B695uy69.js +0 -9
  393. package/dist/index-BEZCAdXQ.js +0 -1568
  394. package/dist/index-BGQepRFJ.js +0 -27
  395. package/dist/index-BZPx6jYI.js +0 -8
  396. package/dist/index-BaLuVb4t.js +0 -70
  397. package/dist/index-Bw62B28F.js +0 -31
  398. package/dist/index-By-GFSsC.js +0 -245
  399. package/dist/index-ByaXH_ih.js +0 -10
  400. package/dist/index-CCKe-Mpx.js +0 -6
  401. package/dist/index-Cv867SGx.js +0 -13
  402. package/dist/index-CvA4FcaC.js +0 -677
  403. package/dist/index-D2LZVjSn.js +0 -82
  404. package/dist/index-DFZozV_h.js +0 -68
  405. package/dist/index-DJQkmo5O.js +0 -49
  406. package/dist/index-DLohNuco.js +0 -36
  407. package/dist/index-DrFfdHac.js +0 -144
  408. package/dist/index-DrlYGDRT.js +0 -119
  409. package/dist/index-Dz8CQngS.js +0 -181
  410. package/dist/index-cd1ceFJg.js +0 -6973
  411. package/dist/index-rKs9bXHr.js +0 -6
  412. package/dist/mermaid-O7DHMXV3-gUrB-Xs1.js +0 -4
  413. package/dist/react-resizable-panels.browser-DYl0LXfw.js +0 -1510
  414. package/dist/web-BwFNdl01.js +0 -697
@@ -0,0 +1,4708 @@
1
+ function Yt(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ function ks(t) {
5
+ const e = [], n = String(t || "");
6
+ let r = n.indexOf(","), s = 0, i = !1;
7
+ for (; !i; ) {
8
+ r === -1 && (r = n.length, i = !0);
9
+ const l = n.slice(s, r).trim();
10
+ (l || !i) && e.push(l), s = r + 1, r = n.indexOf(",", s);
11
+ }
12
+ return e;
13
+ }
14
+ function ct(t, e) {
15
+ const n = e || {};
16
+ return (t[t.length - 1] === "" ? [...t, ""] : t).join(
17
+ (n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
18
+ ).trim();
19
+ }
20
+ function Es() {
21
+ }
22
+ const Jt = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Qt = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Zt = {};
23
+ function $e(t, e) {
24
+ return (Zt.jsx ? Qt : Jt).test(t);
25
+ }
26
+ const en = /[ \t\n\f\r]/g;
27
+ function pe(t) {
28
+ return typeof t == "object" ? t.type === "text" ? Ue(t.value) : !1 : Ue(t);
29
+ }
30
+ function Ue(t) {
31
+ return t.replace(en, "") === "";
32
+ }
33
+ class Z {
34
+ /**
35
+ * @param {SchemaType['property']} property
36
+ * Property.
37
+ * @param {SchemaType['normal']} normal
38
+ * Normal.
39
+ * @param {Space | undefined} [space]
40
+ * Space.
41
+ * @returns
42
+ * Schema.
43
+ */
44
+ constructor(e, n, r) {
45
+ this.normal = n, this.property = e, r && (this.space = r);
46
+ }
47
+ }
48
+ Z.prototype.normal = {};
49
+ Z.prototype.property = {};
50
+ Z.prototype.space = void 0;
51
+ function ht(t, e) {
52
+ const n = {}, r = {};
53
+ for (const s of t)
54
+ Object.assign(n, s.property), Object.assign(r, s.normal);
55
+ return new Z(n, r, e);
56
+ }
57
+ function Se(t) {
58
+ return t.toLowerCase();
59
+ }
60
+ class A {
61
+ /**
62
+ * @param {string} property
63
+ * Property.
64
+ * @param {string} attribute
65
+ * Attribute.
66
+ * @returns
67
+ * Info.
68
+ */
69
+ constructor(e, n) {
70
+ this.attribute = n, this.property = e;
71
+ }
72
+ }
73
+ A.prototype.attribute = "";
74
+ A.prototype.booleanish = !1;
75
+ A.prototype.boolean = !1;
76
+ A.prototype.commaOrSpaceSeparated = !1;
77
+ A.prototype.commaSeparated = !1;
78
+ A.prototype.defined = !1;
79
+ A.prototype.mustUseProperty = !1;
80
+ A.prototype.number = !1;
81
+ A.prototype.overloadedBoolean = !1;
82
+ A.prototype.property = "";
83
+ A.prototype.spaceSeparated = !1;
84
+ A.prototype.space = void 0;
85
+ let tn = 0;
86
+ const m = G(), b = G(), be = G(), c = G(), S = G(), $ = G(), I = G();
87
+ function G() {
88
+ return 2 ** ++tn;
89
+ }
90
+ const ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
91
+ __proto__: null,
92
+ boolean: m,
93
+ booleanish: b,
94
+ commaOrSpaceSeparated: I,
95
+ commaSeparated: $,
96
+ number: c,
97
+ overloadedBoolean: be,
98
+ spaceSeparated: S
99
+ }, Symbol.toStringTag, { value: "Module" })), de = (
100
+ /** @type {ReadonlyArray<keyof typeof types>} */
101
+ Object.keys(ve)
102
+ );
103
+ class Le extends A {
104
+ /**
105
+ * @constructor
106
+ * @param {string} property
107
+ * Property.
108
+ * @param {string} attribute
109
+ * Attribute.
110
+ * @param {number | null | undefined} [mask]
111
+ * Mask.
112
+ * @param {Space | undefined} [space]
113
+ * Space.
114
+ * @returns
115
+ * Info.
116
+ */
117
+ constructor(e, n, r, s) {
118
+ let i = -1;
119
+ if (super(e, n), ze(this, "space", s), typeof r == "number")
120
+ for (; ++i < de.length; ) {
121
+ const l = de[i];
122
+ ze(this, de[i], (r & ve[l]) === ve[l]);
123
+ }
124
+ }
125
+ }
126
+ Le.prototype.defined = !0;
127
+ function ze(t, e, n) {
128
+ n && (t[e] = n);
129
+ }
130
+ function z(t) {
131
+ const e = {}, n = {};
132
+ for (const [r, s] of Object.entries(t.properties)) {
133
+ const i = new Le(
134
+ r,
135
+ t.transform(t.attributes || {}, r),
136
+ s,
137
+ t.space
138
+ );
139
+ t.mustUseProperty && t.mustUseProperty.includes(r) && (i.mustUseProperty = !0), e[r] = i, n[Se(r)] = r, n[Se(i.attribute)] = r;
140
+ }
141
+ return new Z(e, n, t.space);
142
+ }
143
+ const pt = z({
144
+ properties: {
145
+ ariaActiveDescendant: null,
146
+ ariaAtomic: b,
147
+ ariaAutoComplete: null,
148
+ ariaBusy: b,
149
+ ariaChecked: b,
150
+ ariaColCount: c,
151
+ ariaColIndex: c,
152
+ ariaColSpan: c,
153
+ ariaControls: S,
154
+ ariaCurrent: null,
155
+ ariaDescribedBy: S,
156
+ ariaDetails: null,
157
+ ariaDisabled: b,
158
+ ariaDropEffect: S,
159
+ ariaErrorMessage: null,
160
+ ariaExpanded: b,
161
+ ariaFlowTo: S,
162
+ ariaGrabbed: b,
163
+ ariaHasPopup: null,
164
+ ariaHidden: b,
165
+ ariaInvalid: null,
166
+ ariaKeyShortcuts: null,
167
+ ariaLabel: null,
168
+ ariaLabelledBy: S,
169
+ ariaLevel: c,
170
+ ariaLive: null,
171
+ ariaModal: b,
172
+ ariaMultiLine: b,
173
+ ariaMultiSelectable: b,
174
+ ariaOrientation: null,
175
+ ariaOwns: S,
176
+ ariaPlaceholder: null,
177
+ ariaPosInSet: c,
178
+ ariaPressed: b,
179
+ ariaReadOnly: b,
180
+ ariaRelevant: null,
181
+ ariaRequired: b,
182
+ ariaRoleDescription: S,
183
+ ariaRowCount: c,
184
+ ariaRowIndex: c,
185
+ ariaRowSpan: c,
186
+ ariaSelected: b,
187
+ ariaSetSize: c,
188
+ ariaSort: null,
189
+ ariaValueMax: c,
190
+ ariaValueMin: c,
191
+ ariaValueNow: c,
192
+ ariaValueText: null,
193
+ role: null
194
+ },
195
+ transform(t, e) {
196
+ return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
197
+ }
198
+ });
199
+ function dt(t, e) {
200
+ return e in t ? t[e] : e;
201
+ }
202
+ function ft(t, e) {
203
+ return dt(t, e.toLowerCase());
204
+ }
205
+ const nn = z({
206
+ attributes: {
207
+ acceptcharset: "accept-charset",
208
+ classname: "class",
209
+ htmlfor: "for",
210
+ httpequiv: "http-equiv"
211
+ },
212
+ mustUseProperty: ["checked", "multiple", "muted", "selected"],
213
+ properties: {
214
+ // Standard Properties.
215
+ abbr: null,
216
+ accept: $,
217
+ acceptCharset: S,
218
+ accessKey: S,
219
+ action: null,
220
+ allow: null,
221
+ allowFullScreen: m,
222
+ allowPaymentRequest: m,
223
+ allowUserMedia: m,
224
+ alt: null,
225
+ as: null,
226
+ async: m,
227
+ autoCapitalize: null,
228
+ autoComplete: S,
229
+ autoFocus: m,
230
+ autoPlay: m,
231
+ blocking: S,
232
+ capture: null,
233
+ charSet: null,
234
+ checked: m,
235
+ cite: null,
236
+ className: S,
237
+ cols: c,
238
+ colSpan: null,
239
+ content: null,
240
+ contentEditable: b,
241
+ controls: m,
242
+ controlsList: S,
243
+ coords: c | $,
244
+ crossOrigin: null,
245
+ data: null,
246
+ dateTime: null,
247
+ decoding: null,
248
+ default: m,
249
+ defer: m,
250
+ dir: null,
251
+ dirName: null,
252
+ disabled: m,
253
+ download: be,
254
+ draggable: b,
255
+ encType: null,
256
+ enterKeyHint: null,
257
+ fetchPriority: null,
258
+ form: null,
259
+ formAction: null,
260
+ formEncType: null,
261
+ formMethod: null,
262
+ formNoValidate: m,
263
+ formTarget: null,
264
+ headers: S,
265
+ height: c,
266
+ hidden: be,
267
+ high: c,
268
+ href: null,
269
+ hrefLang: null,
270
+ htmlFor: S,
271
+ httpEquiv: S,
272
+ id: null,
273
+ imageSizes: null,
274
+ imageSrcSet: null,
275
+ inert: m,
276
+ inputMode: null,
277
+ integrity: null,
278
+ is: null,
279
+ isMap: m,
280
+ itemId: null,
281
+ itemProp: S,
282
+ itemRef: S,
283
+ itemScope: m,
284
+ itemType: S,
285
+ kind: null,
286
+ label: null,
287
+ lang: null,
288
+ language: null,
289
+ list: null,
290
+ loading: null,
291
+ loop: m,
292
+ low: c,
293
+ manifest: null,
294
+ max: null,
295
+ maxLength: c,
296
+ media: null,
297
+ method: null,
298
+ min: null,
299
+ minLength: c,
300
+ multiple: m,
301
+ muted: m,
302
+ name: null,
303
+ nonce: null,
304
+ noModule: m,
305
+ noValidate: m,
306
+ onAbort: null,
307
+ onAfterPrint: null,
308
+ onAuxClick: null,
309
+ onBeforeMatch: null,
310
+ onBeforePrint: null,
311
+ onBeforeToggle: null,
312
+ onBeforeUnload: null,
313
+ onBlur: null,
314
+ onCancel: null,
315
+ onCanPlay: null,
316
+ onCanPlayThrough: null,
317
+ onChange: null,
318
+ onClick: null,
319
+ onClose: null,
320
+ onContextLost: null,
321
+ onContextMenu: null,
322
+ onContextRestored: null,
323
+ onCopy: null,
324
+ onCueChange: null,
325
+ onCut: null,
326
+ onDblClick: null,
327
+ onDrag: null,
328
+ onDragEnd: null,
329
+ onDragEnter: null,
330
+ onDragExit: null,
331
+ onDragLeave: null,
332
+ onDragOver: null,
333
+ onDragStart: null,
334
+ onDrop: null,
335
+ onDurationChange: null,
336
+ onEmptied: null,
337
+ onEnded: null,
338
+ onError: null,
339
+ onFocus: null,
340
+ onFormData: null,
341
+ onHashChange: null,
342
+ onInput: null,
343
+ onInvalid: null,
344
+ onKeyDown: null,
345
+ onKeyPress: null,
346
+ onKeyUp: null,
347
+ onLanguageChange: null,
348
+ onLoad: null,
349
+ onLoadedData: null,
350
+ onLoadedMetadata: null,
351
+ onLoadEnd: null,
352
+ onLoadStart: null,
353
+ onMessage: null,
354
+ onMessageError: null,
355
+ onMouseDown: null,
356
+ onMouseEnter: null,
357
+ onMouseLeave: null,
358
+ onMouseMove: null,
359
+ onMouseOut: null,
360
+ onMouseOver: null,
361
+ onMouseUp: null,
362
+ onOffline: null,
363
+ onOnline: null,
364
+ onPageHide: null,
365
+ onPageShow: null,
366
+ onPaste: null,
367
+ onPause: null,
368
+ onPlay: null,
369
+ onPlaying: null,
370
+ onPopState: null,
371
+ onProgress: null,
372
+ onRateChange: null,
373
+ onRejectionHandled: null,
374
+ onReset: null,
375
+ onResize: null,
376
+ onScroll: null,
377
+ onScrollEnd: null,
378
+ onSecurityPolicyViolation: null,
379
+ onSeeked: null,
380
+ onSeeking: null,
381
+ onSelect: null,
382
+ onSlotChange: null,
383
+ onStalled: null,
384
+ onStorage: null,
385
+ onSubmit: null,
386
+ onSuspend: null,
387
+ onTimeUpdate: null,
388
+ onToggle: null,
389
+ onUnhandledRejection: null,
390
+ onUnload: null,
391
+ onVolumeChange: null,
392
+ onWaiting: null,
393
+ onWheel: null,
394
+ open: m,
395
+ optimum: c,
396
+ pattern: null,
397
+ ping: S,
398
+ placeholder: null,
399
+ playsInline: m,
400
+ popover: null,
401
+ popoverTarget: null,
402
+ popoverTargetAction: null,
403
+ poster: null,
404
+ preload: null,
405
+ readOnly: m,
406
+ referrerPolicy: null,
407
+ rel: S,
408
+ required: m,
409
+ reversed: m,
410
+ rows: c,
411
+ rowSpan: c,
412
+ sandbox: S,
413
+ scope: null,
414
+ scoped: m,
415
+ seamless: m,
416
+ selected: m,
417
+ shadowRootClonable: m,
418
+ shadowRootDelegatesFocus: m,
419
+ shadowRootMode: null,
420
+ shape: null,
421
+ size: c,
422
+ sizes: null,
423
+ slot: null,
424
+ span: c,
425
+ spellCheck: b,
426
+ src: null,
427
+ srcDoc: null,
428
+ srcLang: null,
429
+ srcSet: null,
430
+ start: c,
431
+ step: null,
432
+ style: null,
433
+ tabIndex: c,
434
+ target: null,
435
+ title: null,
436
+ translate: null,
437
+ type: null,
438
+ typeMustMatch: m,
439
+ useMap: null,
440
+ value: b,
441
+ width: c,
442
+ wrap: null,
443
+ writingSuggestions: null,
444
+ // Legacy.
445
+ // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
446
+ align: null,
447
+ // Several. Use CSS `text-align` instead,
448
+ aLink: null,
449
+ // `<body>`. Use CSS `a:active {color}` instead
450
+ archive: S,
451
+ // `<object>`. List of URIs to archives
452
+ axis: null,
453
+ // `<td>` and `<th>`. Use `scope` on `<th>`
454
+ background: null,
455
+ // `<body>`. Use CSS `background-image` instead
456
+ bgColor: null,
457
+ // `<body>` and table elements. Use CSS `background-color` instead
458
+ border: c,
459
+ // `<table>`. Use CSS `border-width` instead,
460
+ borderColor: null,
461
+ // `<table>`. Use CSS `border-color` instead,
462
+ bottomMargin: c,
463
+ // `<body>`
464
+ cellPadding: null,
465
+ // `<table>`
466
+ cellSpacing: null,
467
+ // `<table>`
468
+ char: null,
469
+ // Several table elements. When `align=char`, sets the character to align on
470
+ charOff: null,
471
+ // Several table elements. When `char`, offsets the alignment
472
+ classId: null,
473
+ // `<object>`
474
+ clear: null,
475
+ // `<br>`. Use CSS `clear` instead
476
+ code: null,
477
+ // `<object>`
478
+ codeBase: null,
479
+ // `<object>`
480
+ codeType: null,
481
+ // `<object>`
482
+ color: null,
483
+ // `<font>` and `<hr>`. Use CSS instead
484
+ compact: m,
485
+ // Lists. Use CSS to reduce space between items instead
486
+ declare: m,
487
+ // `<object>`
488
+ event: null,
489
+ // `<script>`
490
+ face: null,
491
+ // `<font>`. Use CSS instead
492
+ frame: null,
493
+ // `<table>`
494
+ frameBorder: null,
495
+ // `<iframe>`. Use CSS `border` instead
496
+ hSpace: c,
497
+ // `<img>` and `<object>`
498
+ leftMargin: c,
499
+ // `<body>`
500
+ link: null,
501
+ // `<body>`. Use CSS `a:link {color: *}` instead
502
+ longDesc: null,
503
+ // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
504
+ lowSrc: null,
505
+ // `<img>`. Use a `<picture>`
506
+ marginHeight: c,
507
+ // `<body>`
508
+ marginWidth: c,
509
+ // `<body>`
510
+ noResize: m,
511
+ // `<frame>`
512
+ noHref: m,
513
+ // `<area>`. Use no href instead of an explicit `nohref`
514
+ noShade: m,
515
+ // `<hr>`. Use background-color and height instead of borders
516
+ noWrap: m,
517
+ // `<td>` and `<th>`
518
+ object: null,
519
+ // `<applet>`
520
+ profile: null,
521
+ // `<head>`
522
+ prompt: null,
523
+ // `<isindex>`
524
+ rev: null,
525
+ // `<link>`
526
+ rightMargin: c,
527
+ // `<body>`
528
+ rules: null,
529
+ // `<table>`
530
+ scheme: null,
531
+ // `<meta>`
532
+ scrolling: b,
533
+ // `<frame>`. Use overflow in the child context
534
+ standby: null,
535
+ // `<object>`
536
+ summary: null,
537
+ // `<table>`
538
+ text: null,
539
+ // `<body>`. Use CSS `color` instead
540
+ topMargin: c,
541
+ // `<body>`
542
+ valueType: null,
543
+ // `<param>`
544
+ version: null,
545
+ // `<html>`. Use a doctype.
546
+ vAlign: null,
547
+ // Several. Use CSS `vertical-align` instead
548
+ vLink: null,
549
+ // `<body>`. Use CSS `a:visited {color}` instead
550
+ vSpace: c,
551
+ // `<img>` and `<object>`
552
+ // Non-standard Properties.
553
+ allowTransparency: null,
554
+ autoCorrect: null,
555
+ autoSave: null,
556
+ disablePictureInPicture: m,
557
+ disableRemotePlayback: m,
558
+ prefix: null,
559
+ property: null,
560
+ results: c,
561
+ security: null,
562
+ unselectable: null
563
+ },
564
+ space: "html",
565
+ transform: ft
566
+ }), rn = z({
567
+ attributes: {
568
+ accentHeight: "accent-height",
569
+ alignmentBaseline: "alignment-baseline",
570
+ arabicForm: "arabic-form",
571
+ baselineShift: "baseline-shift",
572
+ capHeight: "cap-height",
573
+ className: "class",
574
+ clipPath: "clip-path",
575
+ clipRule: "clip-rule",
576
+ colorInterpolation: "color-interpolation",
577
+ colorInterpolationFilters: "color-interpolation-filters",
578
+ colorProfile: "color-profile",
579
+ colorRendering: "color-rendering",
580
+ crossOrigin: "crossorigin",
581
+ dataType: "datatype",
582
+ dominantBaseline: "dominant-baseline",
583
+ enableBackground: "enable-background",
584
+ fillOpacity: "fill-opacity",
585
+ fillRule: "fill-rule",
586
+ floodColor: "flood-color",
587
+ floodOpacity: "flood-opacity",
588
+ fontFamily: "font-family",
589
+ fontSize: "font-size",
590
+ fontSizeAdjust: "font-size-adjust",
591
+ fontStretch: "font-stretch",
592
+ fontStyle: "font-style",
593
+ fontVariant: "font-variant",
594
+ fontWeight: "font-weight",
595
+ glyphName: "glyph-name",
596
+ glyphOrientationHorizontal: "glyph-orientation-horizontal",
597
+ glyphOrientationVertical: "glyph-orientation-vertical",
598
+ hrefLang: "hreflang",
599
+ horizAdvX: "horiz-adv-x",
600
+ horizOriginX: "horiz-origin-x",
601
+ horizOriginY: "horiz-origin-y",
602
+ imageRendering: "image-rendering",
603
+ letterSpacing: "letter-spacing",
604
+ lightingColor: "lighting-color",
605
+ markerEnd: "marker-end",
606
+ markerMid: "marker-mid",
607
+ markerStart: "marker-start",
608
+ navDown: "nav-down",
609
+ navDownLeft: "nav-down-left",
610
+ navDownRight: "nav-down-right",
611
+ navLeft: "nav-left",
612
+ navNext: "nav-next",
613
+ navPrev: "nav-prev",
614
+ navRight: "nav-right",
615
+ navUp: "nav-up",
616
+ navUpLeft: "nav-up-left",
617
+ navUpRight: "nav-up-right",
618
+ onAbort: "onabort",
619
+ onActivate: "onactivate",
620
+ onAfterPrint: "onafterprint",
621
+ onBeforePrint: "onbeforeprint",
622
+ onBegin: "onbegin",
623
+ onCancel: "oncancel",
624
+ onCanPlay: "oncanplay",
625
+ onCanPlayThrough: "oncanplaythrough",
626
+ onChange: "onchange",
627
+ onClick: "onclick",
628
+ onClose: "onclose",
629
+ onCopy: "oncopy",
630
+ onCueChange: "oncuechange",
631
+ onCut: "oncut",
632
+ onDblClick: "ondblclick",
633
+ onDrag: "ondrag",
634
+ onDragEnd: "ondragend",
635
+ onDragEnter: "ondragenter",
636
+ onDragExit: "ondragexit",
637
+ onDragLeave: "ondragleave",
638
+ onDragOver: "ondragover",
639
+ onDragStart: "ondragstart",
640
+ onDrop: "ondrop",
641
+ onDurationChange: "ondurationchange",
642
+ onEmptied: "onemptied",
643
+ onEnd: "onend",
644
+ onEnded: "onended",
645
+ onError: "onerror",
646
+ onFocus: "onfocus",
647
+ onFocusIn: "onfocusin",
648
+ onFocusOut: "onfocusout",
649
+ onHashChange: "onhashchange",
650
+ onInput: "oninput",
651
+ onInvalid: "oninvalid",
652
+ onKeyDown: "onkeydown",
653
+ onKeyPress: "onkeypress",
654
+ onKeyUp: "onkeyup",
655
+ onLoad: "onload",
656
+ onLoadedData: "onloadeddata",
657
+ onLoadedMetadata: "onloadedmetadata",
658
+ onLoadStart: "onloadstart",
659
+ onMessage: "onmessage",
660
+ onMouseDown: "onmousedown",
661
+ onMouseEnter: "onmouseenter",
662
+ onMouseLeave: "onmouseleave",
663
+ onMouseMove: "onmousemove",
664
+ onMouseOut: "onmouseout",
665
+ onMouseOver: "onmouseover",
666
+ onMouseUp: "onmouseup",
667
+ onMouseWheel: "onmousewheel",
668
+ onOffline: "onoffline",
669
+ onOnline: "ononline",
670
+ onPageHide: "onpagehide",
671
+ onPageShow: "onpageshow",
672
+ onPaste: "onpaste",
673
+ onPause: "onpause",
674
+ onPlay: "onplay",
675
+ onPlaying: "onplaying",
676
+ onPopState: "onpopstate",
677
+ onProgress: "onprogress",
678
+ onRateChange: "onratechange",
679
+ onRepeat: "onrepeat",
680
+ onReset: "onreset",
681
+ onResize: "onresize",
682
+ onScroll: "onscroll",
683
+ onSeeked: "onseeked",
684
+ onSeeking: "onseeking",
685
+ onSelect: "onselect",
686
+ onShow: "onshow",
687
+ onStalled: "onstalled",
688
+ onStorage: "onstorage",
689
+ onSubmit: "onsubmit",
690
+ onSuspend: "onsuspend",
691
+ onTimeUpdate: "ontimeupdate",
692
+ onToggle: "ontoggle",
693
+ onUnload: "onunload",
694
+ onVolumeChange: "onvolumechange",
695
+ onWaiting: "onwaiting",
696
+ onZoom: "onzoom",
697
+ overlinePosition: "overline-position",
698
+ overlineThickness: "overline-thickness",
699
+ paintOrder: "paint-order",
700
+ panose1: "panose-1",
701
+ pointerEvents: "pointer-events",
702
+ referrerPolicy: "referrerpolicy",
703
+ renderingIntent: "rendering-intent",
704
+ shapeRendering: "shape-rendering",
705
+ stopColor: "stop-color",
706
+ stopOpacity: "stop-opacity",
707
+ strikethroughPosition: "strikethrough-position",
708
+ strikethroughThickness: "strikethrough-thickness",
709
+ strokeDashArray: "stroke-dasharray",
710
+ strokeDashOffset: "stroke-dashoffset",
711
+ strokeLineCap: "stroke-linecap",
712
+ strokeLineJoin: "stroke-linejoin",
713
+ strokeMiterLimit: "stroke-miterlimit",
714
+ strokeOpacity: "stroke-opacity",
715
+ strokeWidth: "stroke-width",
716
+ tabIndex: "tabindex",
717
+ textAnchor: "text-anchor",
718
+ textDecoration: "text-decoration",
719
+ textRendering: "text-rendering",
720
+ transformOrigin: "transform-origin",
721
+ typeOf: "typeof",
722
+ underlinePosition: "underline-position",
723
+ underlineThickness: "underline-thickness",
724
+ unicodeBidi: "unicode-bidi",
725
+ unicodeRange: "unicode-range",
726
+ unitsPerEm: "units-per-em",
727
+ vAlphabetic: "v-alphabetic",
728
+ vHanging: "v-hanging",
729
+ vIdeographic: "v-ideographic",
730
+ vMathematical: "v-mathematical",
731
+ vectorEffect: "vector-effect",
732
+ vertAdvY: "vert-adv-y",
733
+ vertOriginX: "vert-origin-x",
734
+ vertOriginY: "vert-origin-y",
735
+ wordSpacing: "word-spacing",
736
+ writingMode: "writing-mode",
737
+ xHeight: "x-height",
738
+ // These were camelcased in Tiny. Now lowercased in SVG 2
739
+ playbackOrder: "playbackorder",
740
+ timelineBegin: "timelinebegin"
741
+ },
742
+ properties: {
743
+ about: I,
744
+ accentHeight: c,
745
+ accumulate: null,
746
+ additive: null,
747
+ alignmentBaseline: null,
748
+ alphabetic: c,
749
+ amplitude: c,
750
+ arabicForm: null,
751
+ ascent: c,
752
+ attributeName: null,
753
+ attributeType: null,
754
+ azimuth: c,
755
+ bandwidth: null,
756
+ baselineShift: null,
757
+ baseFrequency: null,
758
+ baseProfile: null,
759
+ bbox: null,
760
+ begin: null,
761
+ bias: c,
762
+ by: null,
763
+ calcMode: null,
764
+ capHeight: c,
765
+ className: S,
766
+ clip: null,
767
+ clipPath: null,
768
+ clipPathUnits: null,
769
+ clipRule: null,
770
+ color: null,
771
+ colorInterpolation: null,
772
+ colorInterpolationFilters: null,
773
+ colorProfile: null,
774
+ colorRendering: null,
775
+ content: null,
776
+ contentScriptType: null,
777
+ contentStyleType: null,
778
+ crossOrigin: null,
779
+ cursor: null,
780
+ cx: null,
781
+ cy: null,
782
+ d: null,
783
+ dataType: null,
784
+ defaultAction: null,
785
+ descent: c,
786
+ diffuseConstant: c,
787
+ direction: null,
788
+ display: null,
789
+ dur: null,
790
+ divisor: c,
791
+ dominantBaseline: null,
792
+ download: m,
793
+ dx: null,
794
+ dy: null,
795
+ edgeMode: null,
796
+ editable: null,
797
+ elevation: c,
798
+ enableBackground: null,
799
+ end: null,
800
+ event: null,
801
+ exponent: c,
802
+ externalResourcesRequired: null,
803
+ fill: null,
804
+ fillOpacity: c,
805
+ fillRule: null,
806
+ filter: null,
807
+ filterRes: null,
808
+ filterUnits: null,
809
+ floodColor: null,
810
+ floodOpacity: null,
811
+ focusable: null,
812
+ focusHighlight: null,
813
+ fontFamily: null,
814
+ fontSize: null,
815
+ fontSizeAdjust: null,
816
+ fontStretch: null,
817
+ fontStyle: null,
818
+ fontVariant: null,
819
+ fontWeight: null,
820
+ format: null,
821
+ fr: null,
822
+ from: null,
823
+ fx: null,
824
+ fy: null,
825
+ g1: $,
826
+ g2: $,
827
+ glyphName: $,
828
+ glyphOrientationHorizontal: null,
829
+ glyphOrientationVertical: null,
830
+ glyphRef: null,
831
+ gradientTransform: null,
832
+ gradientUnits: null,
833
+ handler: null,
834
+ hanging: c,
835
+ hatchContentUnits: null,
836
+ hatchUnits: null,
837
+ height: null,
838
+ href: null,
839
+ hrefLang: null,
840
+ horizAdvX: c,
841
+ horizOriginX: c,
842
+ horizOriginY: c,
843
+ id: null,
844
+ ideographic: c,
845
+ imageRendering: null,
846
+ initialVisibility: null,
847
+ in: null,
848
+ in2: null,
849
+ intercept: c,
850
+ k: c,
851
+ k1: c,
852
+ k2: c,
853
+ k3: c,
854
+ k4: c,
855
+ kernelMatrix: I,
856
+ kernelUnitLength: null,
857
+ keyPoints: null,
858
+ // SEMI_COLON_SEPARATED
859
+ keySplines: null,
860
+ // SEMI_COLON_SEPARATED
861
+ keyTimes: null,
862
+ // SEMI_COLON_SEPARATED
863
+ kerning: null,
864
+ lang: null,
865
+ lengthAdjust: null,
866
+ letterSpacing: null,
867
+ lightingColor: null,
868
+ limitingConeAngle: c,
869
+ local: null,
870
+ markerEnd: null,
871
+ markerMid: null,
872
+ markerStart: null,
873
+ markerHeight: null,
874
+ markerUnits: null,
875
+ markerWidth: null,
876
+ mask: null,
877
+ maskContentUnits: null,
878
+ maskUnits: null,
879
+ mathematical: null,
880
+ max: null,
881
+ media: null,
882
+ mediaCharacterEncoding: null,
883
+ mediaContentEncodings: null,
884
+ mediaSize: c,
885
+ mediaTime: null,
886
+ method: null,
887
+ min: null,
888
+ mode: null,
889
+ name: null,
890
+ navDown: null,
891
+ navDownLeft: null,
892
+ navDownRight: null,
893
+ navLeft: null,
894
+ navNext: null,
895
+ navPrev: null,
896
+ navRight: null,
897
+ navUp: null,
898
+ navUpLeft: null,
899
+ navUpRight: null,
900
+ numOctaves: null,
901
+ observer: null,
902
+ offset: null,
903
+ onAbort: null,
904
+ onActivate: null,
905
+ onAfterPrint: null,
906
+ onBeforePrint: null,
907
+ onBegin: null,
908
+ onCancel: null,
909
+ onCanPlay: null,
910
+ onCanPlayThrough: null,
911
+ onChange: null,
912
+ onClick: null,
913
+ onClose: null,
914
+ onCopy: null,
915
+ onCueChange: null,
916
+ onCut: null,
917
+ onDblClick: null,
918
+ onDrag: null,
919
+ onDragEnd: null,
920
+ onDragEnter: null,
921
+ onDragExit: null,
922
+ onDragLeave: null,
923
+ onDragOver: null,
924
+ onDragStart: null,
925
+ onDrop: null,
926
+ onDurationChange: null,
927
+ onEmptied: null,
928
+ onEnd: null,
929
+ onEnded: null,
930
+ onError: null,
931
+ onFocus: null,
932
+ onFocusIn: null,
933
+ onFocusOut: null,
934
+ onHashChange: null,
935
+ onInput: null,
936
+ onInvalid: null,
937
+ onKeyDown: null,
938
+ onKeyPress: null,
939
+ onKeyUp: null,
940
+ onLoad: null,
941
+ onLoadedData: null,
942
+ onLoadedMetadata: null,
943
+ onLoadStart: null,
944
+ onMessage: null,
945
+ onMouseDown: null,
946
+ onMouseEnter: null,
947
+ onMouseLeave: null,
948
+ onMouseMove: null,
949
+ onMouseOut: null,
950
+ onMouseOver: null,
951
+ onMouseUp: null,
952
+ onMouseWheel: null,
953
+ onOffline: null,
954
+ onOnline: null,
955
+ onPageHide: null,
956
+ onPageShow: null,
957
+ onPaste: null,
958
+ onPause: null,
959
+ onPlay: null,
960
+ onPlaying: null,
961
+ onPopState: null,
962
+ onProgress: null,
963
+ onRateChange: null,
964
+ onRepeat: null,
965
+ onReset: null,
966
+ onResize: null,
967
+ onScroll: null,
968
+ onSeeked: null,
969
+ onSeeking: null,
970
+ onSelect: null,
971
+ onShow: null,
972
+ onStalled: null,
973
+ onStorage: null,
974
+ onSubmit: null,
975
+ onSuspend: null,
976
+ onTimeUpdate: null,
977
+ onToggle: null,
978
+ onUnload: null,
979
+ onVolumeChange: null,
980
+ onWaiting: null,
981
+ onZoom: null,
982
+ opacity: null,
983
+ operator: null,
984
+ order: null,
985
+ orient: null,
986
+ orientation: null,
987
+ origin: null,
988
+ overflow: null,
989
+ overlay: null,
990
+ overlinePosition: c,
991
+ overlineThickness: c,
992
+ paintOrder: null,
993
+ panose1: null,
994
+ path: null,
995
+ pathLength: c,
996
+ patternContentUnits: null,
997
+ patternTransform: null,
998
+ patternUnits: null,
999
+ phase: null,
1000
+ ping: S,
1001
+ pitch: null,
1002
+ playbackOrder: null,
1003
+ pointerEvents: null,
1004
+ points: null,
1005
+ pointsAtX: c,
1006
+ pointsAtY: c,
1007
+ pointsAtZ: c,
1008
+ preserveAlpha: null,
1009
+ preserveAspectRatio: null,
1010
+ primitiveUnits: null,
1011
+ propagate: null,
1012
+ property: I,
1013
+ r: null,
1014
+ radius: null,
1015
+ referrerPolicy: null,
1016
+ refX: null,
1017
+ refY: null,
1018
+ rel: I,
1019
+ rev: I,
1020
+ renderingIntent: null,
1021
+ repeatCount: null,
1022
+ repeatDur: null,
1023
+ requiredExtensions: I,
1024
+ requiredFeatures: I,
1025
+ requiredFonts: I,
1026
+ requiredFormats: I,
1027
+ resource: null,
1028
+ restart: null,
1029
+ result: null,
1030
+ rotate: null,
1031
+ rx: null,
1032
+ ry: null,
1033
+ scale: null,
1034
+ seed: null,
1035
+ shapeRendering: null,
1036
+ side: null,
1037
+ slope: null,
1038
+ snapshotTime: null,
1039
+ specularConstant: c,
1040
+ specularExponent: c,
1041
+ spreadMethod: null,
1042
+ spacing: null,
1043
+ startOffset: null,
1044
+ stdDeviation: null,
1045
+ stemh: null,
1046
+ stemv: null,
1047
+ stitchTiles: null,
1048
+ stopColor: null,
1049
+ stopOpacity: null,
1050
+ strikethroughPosition: c,
1051
+ strikethroughThickness: c,
1052
+ string: null,
1053
+ stroke: null,
1054
+ strokeDashArray: I,
1055
+ strokeDashOffset: null,
1056
+ strokeLineCap: null,
1057
+ strokeLineJoin: null,
1058
+ strokeMiterLimit: c,
1059
+ strokeOpacity: c,
1060
+ strokeWidth: null,
1061
+ style: null,
1062
+ surfaceScale: c,
1063
+ syncBehavior: null,
1064
+ syncBehaviorDefault: null,
1065
+ syncMaster: null,
1066
+ syncTolerance: null,
1067
+ syncToleranceDefault: null,
1068
+ systemLanguage: I,
1069
+ tabIndex: c,
1070
+ tableValues: null,
1071
+ target: null,
1072
+ targetX: c,
1073
+ targetY: c,
1074
+ textAnchor: null,
1075
+ textDecoration: null,
1076
+ textRendering: null,
1077
+ textLength: null,
1078
+ timelineBegin: null,
1079
+ title: null,
1080
+ transformBehavior: null,
1081
+ type: null,
1082
+ typeOf: I,
1083
+ to: null,
1084
+ transform: null,
1085
+ transformOrigin: null,
1086
+ u1: null,
1087
+ u2: null,
1088
+ underlinePosition: c,
1089
+ underlineThickness: c,
1090
+ unicode: null,
1091
+ unicodeBidi: null,
1092
+ unicodeRange: null,
1093
+ unitsPerEm: c,
1094
+ values: null,
1095
+ vAlphabetic: c,
1096
+ vMathematical: c,
1097
+ vectorEffect: null,
1098
+ vHanging: c,
1099
+ vIdeographic: c,
1100
+ version: null,
1101
+ vertAdvY: c,
1102
+ vertOriginX: c,
1103
+ vertOriginY: c,
1104
+ viewBox: null,
1105
+ viewTarget: null,
1106
+ visibility: null,
1107
+ width: null,
1108
+ widths: null,
1109
+ wordSpacing: null,
1110
+ writingMode: null,
1111
+ x: null,
1112
+ x1: null,
1113
+ x2: null,
1114
+ xChannelSelector: null,
1115
+ xHeight: c,
1116
+ y: null,
1117
+ y1: null,
1118
+ y2: null,
1119
+ yChannelSelector: null,
1120
+ z: null,
1121
+ zoomAndPan: null
1122
+ },
1123
+ space: "svg",
1124
+ transform: dt
1125
+ }), mt = z({
1126
+ properties: {
1127
+ xLinkActuate: null,
1128
+ xLinkArcRole: null,
1129
+ xLinkHref: null,
1130
+ xLinkRole: null,
1131
+ xLinkShow: null,
1132
+ xLinkTitle: null,
1133
+ xLinkType: null
1134
+ },
1135
+ space: "xlink",
1136
+ transform(t, e) {
1137
+ return "xlink:" + e.slice(5).toLowerCase();
1138
+ }
1139
+ }), gt = z({
1140
+ attributes: { xmlnsxlink: "xmlns:xlink" },
1141
+ properties: { xmlnsXLink: null, xmlns: null },
1142
+ space: "xmlns",
1143
+ transform: ft
1144
+ }), yt = z({
1145
+ properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
1146
+ space: "xml",
1147
+ transform(t, e) {
1148
+ return "xml:" + e.slice(3).toLowerCase();
1149
+ }
1150
+ }), sn = {
1151
+ classId: "classID",
1152
+ dataType: "datatype",
1153
+ itemId: "itemID",
1154
+ strokeDashArray: "strokeDasharray",
1155
+ strokeDashOffset: "strokeDashoffset",
1156
+ strokeLineCap: "strokeLinecap",
1157
+ strokeLineJoin: "strokeLinejoin",
1158
+ strokeMiterLimit: "strokeMiterlimit",
1159
+ typeOf: "typeof",
1160
+ xLinkActuate: "xlinkActuate",
1161
+ xLinkArcRole: "xlinkArcrole",
1162
+ xLinkHref: "xlinkHref",
1163
+ xLinkRole: "xlinkRole",
1164
+ xLinkShow: "xlinkShow",
1165
+ xLinkTitle: "xlinkTitle",
1166
+ xLinkType: "xlinkType",
1167
+ xmlnsXLink: "xmlnsXlink"
1168
+ }, ln = /[A-Z]/g, qe = /-[a-z]/g, on = /^data[-\w.:]+$/i;
1169
+ function _t(t, e) {
1170
+ const n = Se(e);
1171
+ let r = e, s = A;
1172
+ if (n in t.normal)
1173
+ return t.property[t.normal[n]];
1174
+ if (n.length > 4 && n.slice(0, 4) === "data" && on.test(e)) {
1175
+ if (e.charAt(4) === "-") {
1176
+ const i = e.slice(5).replace(qe, un);
1177
+ r = "data" + i.charAt(0).toUpperCase() + i.slice(1);
1178
+ } else {
1179
+ const i = e.slice(4);
1180
+ if (!qe.test(i)) {
1181
+ let l = i.replace(ln, an);
1182
+ l.charAt(0) !== "-" && (l = "-" + l), e = "data" + l;
1183
+ }
1184
+ }
1185
+ s = Le;
1186
+ }
1187
+ return new s(r, e);
1188
+ }
1189
+ function an(t) {
1190
+ return "-" + t.toLowerCase();
1191
+ }
1192
+ function un(t) {
1193
+ return t.charAt(1).toUpperCase();
1194
+ }
1195
+ const Ct = ht([pt, nn, mt, gt, yt], "html"), ee = ht([pt, rn, mt, gt, yt], "svg");
1196
+ function As(t) {
1197
+ const e = String(t || "").trim();
1198
+ return e ? e.split(/[ \t\n\r\f]+/g) : [];
1199
+ }
1200
+ function St(t) {
1201
+ return t.join(" ").trim();
1202
+ }
1203
+ var F = {}, fe, We;
1204
+ function cn() {
1205
+ if (We) return fe;
1206
+ We = 1;
1207
+ var t = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, e = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, s = /^:\s*/, i = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, l = /^[;\s]*/, a = /^\s+|\s+$/g, o = `
1208
+ `, u = "/", h = "*", p = "", _ = "comment", f = "declaration";
1209
+ function d(y, v) {
1210
+ if (typeof y != "string")
1211
+ throw new TypeError("First argument must be a string");
1212
+ if (!y) return [];
1213
+ v = v || {};
1214
+ var R = 1, k = 1;
1215
+ function M(C) {
1216
+ var g = C.match(e);
1217
+ g && (R += g.length);
1218
+ var T = C.lastIndexOf(o);
1219
+ k = ~T ? C.length - T : k + C.length;
1220
+ }
1221
+ function P() {
1222
+ var C = { line: R, column: k };
1223
+ return function(g) {
1224
+ return g.position = new j(C), je(), g;
1225
+ };
1226
+ }
1227
+ function j(C) {
1228
+ this.start = C, this.end = { line: R, column: k }, this.source = v.source;
1229
+ }
1230
+ j.prototype.content = y;
1231
+ function B(C) {
1232
+ var g = new Error(
1233
+ v.source + ":" + R + ":" + k + ": " + C
1234
+ );
1235
+ if (g.reason = C, g.filename = v.source, g.line = R, g.column = k, g.source = y, !v.silent) throw g;
1236
+ }
1237
+ function q(C) {
1238
+ var g = C.exec(y);
1239
+ if (g) {
1240
+ var T = g[0];
1241
+ return M(T), y = y.slice(T.length), g;
1242
+ }
1243
+ }
1244
+ function je() {
1245
+ q(n);
1246
+ }
1247
+ function Be(C) {
1248
+ var g;
1249
+ for (C = C || []; g = Fe(); )
1250
+ g !== !1 && C.push(g);
1251
+ return C;
1252
+ }
1253
+ function Fe() {
1254
+ var C = P();
1255
+ if (!(u != y.charAt(0) || h != y.charAt(1))) {
1256
+ for (var g = 2; p != y.charAt(g) && (h != y.charAt(g) || u != y.charAt(g + 1)); )
1257
+ ++g;
1258
+ if (g += 2, p === y.charAt(g - 1))
1259
+ return B("End of comment missing");
1260
+ var T = y.slice(2, g - 2);
1261
+ return k += 2, M(T), y = y.slice(g), k += 2, C({
1262
+ type: _,
1263
+ comment: T
1264
+ });
1265
+ }
1266
+ }
1267
+ function Xt() {
1268
+ var C = P(), g = q(r);
1269
+ if (g) {
1270
+ if (Fe(), !q(s)) return B("property missing ':'");
1271
+ var T = q(i), Vt = C({
1272
+ type: f,
1273
+ property: N(g[0].replace(t, p)),
1274
+ value: T ? N(T[0].replace(t, p)) : p
1275
+ });
1276
+ return q(l), Vt;
1277
+ }
1278
+ }
1279
+ function Kt() {
1280
+ var C = [];
1281
+ Be(C);
1282
+ for (var g; g = Xt(); )
1283
+ g !== !1 && (C.push(g), Be(C));
1284
+ return C;
1285
+ }
1286
+ return je(), Kt();
1287
+ }
1288
+ function N(y) {
1289
+ return y ? y.replace(a, p) : p;
1290
+ }
1291
+ return fe = d, fe;
1292
+ }
1293
+ var He;
1294
+ function hn() {
1295
+ if (He) return F;
1296
+ He = 1;
1297
+ var t = F && F.__importDefault || function(r) {
1298
+ return r && r.__esModule ? r : { default: r };
1299
+ };
1300
+ Object.defineProperty(F, "__esModule", { value: !0 }), F.default = n;
1301
+ const e = t(cn());
1302
+ function n(r, s) {
1303
+ let i = null;
1304
+ if (!r || typeof r != "string")
1305
+ return i;
1306
+ const l = (0, e.default)(r), a = typeof s == "function";
1307
+ return l.forEach((o) => {
1308
+ if (o.type !== "declaration")
1309
+ return;
1310
+ const { property: u, value: h } = o;
1311
+ a ? s(u, h, o) : h && (i = i || {}, i[u] = h);
1312
+ }), i;
1313
+ }
1314
+ return F;
1315
+ }
1316
+ var W = {}, Xe;
1317
+ function pn() {
1318
+ if (Xe) return W;
1319
+ Xe = 1, Object.defineProperty(W, "__esModule", { value: !0 }), W.camelCase = void 0;
1320
+ var t = /^--[a-zA-Z0-9_-]+$/, e = /-([a-z])/g, n = /^[^-]+$/, r = /^-(webkit|moz|ms|o|khtml)-/, s = /^-(ms)-/, i = function(u) {
1321
+ return !u || n.test(u) || t.test(u);
1322
+ }, l = function(u, h) {
1323
+ return h.toUpperCase();
1324
+ }, a = function(u, h) {
1325
+ return "".concat(h, "-");
1326
+ }, o = function(u, h) {
1327
+ return h === void 0 && (h = {}), i(u) ? u : (u = u.toLowerCase(), h.reactCompat ? u = u.replace(s, a) : u = u.replace(r, a), u.replace(e, l));
1328
+ };
1329
+ return W.camelCase = o, W;
1330
+ }
1331
+ var H, Ke;
1332
+ function dn() {
1333
+ if (Ke) return H;
1334
+ Ke = 1;
1335
+ var t = H && H.__importDefault || function(s) {
1336
+ return s && s.__esModule ? s : { default: s };
1337
+ }, e = t(hn()), n = pn();
1338
+ function r(s, i) {
1339
+ var l = {};
1340
+ return !s || typeof s != "string" || (0, e.default)(s, function(a, o) {
1341
+ a && o && (l[(0, n.camelCase)(a, i)] = o);
1342
+ }), l;
1343
+ }
1344
+ return r.default = r, H = r, H;
1345
+ }
1346
+ var fn = dn();
1347
+ const mn = /* @__PURE__ */ Yt(fn), gn = vt("end"), bt = vt("start");
1348
+ function vt(t) {
1349
+ return e;
1350
+ function e(n) {
1351
+ const r = n && n.position && n.position[t] || {};
1352
+ if (typeof r.line == "number" && r.line > 0 && typeof r.column == "number" && r.column > 0)
1353
+ return {
1354
+ line: r.line,
1355
+ column: r.column,
1356
+ offset: typeof r.offset == "number" && r.offset > -1 ? r.offset : void 0
1357
+ };
1358
+ }
1359
+ }
1360
+ function Ns(t) {
1361
+ const e = bt(t), n = gn(t);
1362
+ if (e && n)
1363
+ return { start: e, end: n };
1364
+ }
1365
+ function yn(t) {
1366
+ return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? Ve(t.position) : "start" in t || "end" in t ? Ve(t) : "line" in t || "column" in t ? Re(t) : "";
1367
+ }
1368
+ function Re(t) {
1369
+ return Ye(t && t.line) + ":" + Ye(t && t.column);
1370
+ }
1371
+ function Ve(t) {
1372
+ return Re(t && t.start) + "-" + Re(t && t.end);
1373
+ }
1374
+ function Ye(t) {
1375
+ return t && typeof t == "number" ? t : 1;
1376
+ }
1377
+ class E extends Error {
1378
+ /**
1379
+ * Create a message for `reason`.
1380
+ *
1381
+ * > 🪦 **Note**: also has obsolete signatures.
1382
+ *
1383
+ * @overload
1384
+ * @param {string} reason
1385
+ * @param {Options | null | undefined} [options]
1386
+ * @returns
1387
+ *
1388
+ * @overload
1389
+ * @param {string} reason
1390
+ * @param {Node | NodeLike | null | undefined} parent
1391
+ * @param {string | null | undefined} [origin]
1392
+ * @returns
1393
+ *
1394
+ * @overload
1395
+ * @param {string} reason
1396
+ * @param {Point | Position | null | undefined} place
1397
+ * @param {string | null | undefined} [origin]
1398
+ * @returns
1399
+ *
1400
+ * @overload
1401
+ * @param {string} reason
1402
+ * @param {string | null | undefined} [origin]
1403
+ * @returns
1404
+ *
1405
+ * @overload
1406
+ * @param {Error | VFileMessage} cause
1407
+ * @param {Node | NodeLike | null | undefined} parent
1408
+ * @param {string | null | undefined} [origin]
1409
+ * @returns
1410
+ *
1411
+ * @overload
1412
+ * @param {Error | VFileMessage} cause
1413
+ * @param {Point | Position | null | undefined} place
1414
+ * @param {string | null | undefined} [origin]
1415
+ * @returns
1416
+ *
1417
+ * @overload
1418
+ * @param {Error | VFileMessage} cause
1419
+ * @param {string | null | undefined} [origin]
1420
+ * @returns
1421
+ *
1422
+ * @param {Error | VFileMessage | string} causeOrReason
1423
+ * Reason for message, should use markdown.
1424
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1425
+ * Configuration (optional).
1426
+ * @param {string | null | undefined} [origin]
1427
+ * Place in code where the message originates (example:
1428
+ * `'my-package:my-rule'` or `'my-rule'`).
1429
+ * @returns
1430
+ * Instance of `VFileMessage`.
1431
+ */
1432
+ // eslint-disable-next-line complexity
1433
+ constructor(e, n, r) {
1434
+ super(), typeof n == "string" && (r = n, n = void 0);
1435
+ let s = "", i = {}, l = !1;
1436
+ if (n && ("line" in n && "column" in n ? i = { place: n } : "start" in n && "end" in n ? i = { place: n } : "type" in n ? i = {
1437
+ ancestors: [n],
1438
+ place: n.position
1439
+ } : i = { ...n }), typeof e == "string" ? s = e : !i.cause && e && (l = !0, s = e.message, i.cause = e), !i.ruleId && !i.source && typeof r == "string") {
1440
+ const o = r.indexOf(":");
1441
+ o === -1 ? i.ruleId = r : (i.source = r.slice(0, o), i.ruleId = r.slice(o + 1));
1442
+ }
1443
+ if (!i.place && i.ancestors && i.ancestors) {
1444
+ const o = i.ancestors[i.ancestors.length - 1];
1445
+ o && (i.place = o.position);
1446
+ }
1447
+ const a = i.place && "start" in i.place ? i.place.start : i.place;
1448
+ this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = a ? a.column : void 0, this.fatal = void 0, this.file = "", this.message = s, this.line = a ? a.line : void 0, this.name = yn(i.place) || "1:1", this.place = i.place || void 0, this.reason = this.message, this.ruleId = i.ruleId || void 0, this.source = i.source || void 0, this.stack = l && i.cause && typeof i.cause.stack == "string" ? i.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
1449
+ }
1450
+ }
1451
+ E.prototype.file = "";
1452
+ E.prototype.name = "";
1453
+ E.prototype.reason = "";
1454
+ E.prototype.message = "";
1455
+ E.prototype.stack = "";
1456
+ E.prototype.column = void 0;
1457
+ E.prototype.line = void 0;
1458
+ E.prototype.ancestors = void 0;
1459
+ E.prototype.cause = void 0;
1460
+ E.prototype.fatal = void 0;
1461
+ E.prototype.place = void 0;
1462
+ E.prototype.ruleId = void 0;
1463
+ E.prototype.source = void 0;
1464
+ const Te = {}.hasOwnProperty, _n = /* @__PURE__ */ new Map(), Cn = /[A-Z]/g, Sn = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), bn = /* @__PURE__ */ new Set(["td", "th"]), Rt = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
1465
+ function Ps(t, e) {
1466
+ if (!e || e.Fragment === void 0)
1467
+ throw new TypeError("Expected `Fragment` in options");
1468
+ const n = e.filePath || void 0;
1469
+ let r;
1470
+ if (e.development) {
1471
+ if (typeof e.jsxDEV != "function")
1472
+ throw new TypeError(
1473
+ "Expected `jsxDEV` in options when `development: true`"
1474
+ );
1475
+ r = Nn(n, e.jsxDEV);
1476
+ } else {
1477
+ if (typeof e.jsx != "function")
1478
+ throw new TypeError("Expected `jsx` in production options");
1479
+ if (typeof e.jsxs != "function")
1480
+ throw new TypeError("Expected `jsxs` in production options");
1481
+ r = An(n, e.jsx, e.jsxs);
1482
+ }
1483
+ const s = {
1484
+ Fragment: e.Fragment,
1485
+ ancestors: [],
1486
+ components: e.components || {},
1487
+ create: r,
1488
+ elementAttributeNameCase: e.elementAttributeNameCase || "react",
1489
+ evaluater: e.createEvaluater ? e.createEvaluater() : void 0,
1490
+ filePath: n,
1491
+ ignoreInvalidStyle: e.ignoreInvalidStyle || !1,
1492
+ passKeys: e.passKeys !== !1,
1493
+ passNode: e.passNode || !1,
1494
+ schema: e.space === "svg" ? ee : Ct,
1495
+ stylePropertyNameCase: e.stylePropertyNameCase || "dom",
1496
+ tableCellAlignToStyle: e.tableCellAlignToStyle !== !1
1497
+ }, i = wt(s, t, void 0);
1498
+ return i && typeof i != "string" ? i : s.create(
1499
+ t,
1500
+ s.Fragment,
1501
+ { children: i || void 0 },
1502
+ void 0
1503
+ );
1504
+ }
1505
+ function wt(t, e, n) {
1506
+ if (e.type === "element")
1507
+ return vn(t, e, n);
1508
+ if (e.type === "mdxFlowExpression" || e.type === "mdxTextExpression")
1509
+ return Rn(t, e);
1510
+ if (e.type === "mdxJsxFlowElement" || e.type === "mdxJsxTextElement")
1511
+ return xn(t, e, n);
1512
+ if (e.type === "mdxjsEsm")
1513
+ return wn(t, e);
1514
+ if (e.type === "root")
1515
+ return kn(t, e, n);
1516
+ if (e.type === "text")
1517
+ return En(t, e);
1518
+ }
1519
+ function vn(t, e, n) {
1520
+ const r = t.schema;
1521
+ let s = r;
1522
+ e.tagName.toLowerCase() === "svg" && r.space === "html" && (s = ee, t.schema = s), t.ancestors.push(e);
1523
+ const i = kt(t, e.tagName, !1), l = Pn(t, e);
1524
+ let a = Oe(t, e);
1525
+ return Sn.has(e.tagName) && (a = a.filter(function(o) {
1526
+ return typeof o == "string" ? !pe(o) : !0;
1527
+ })), xt(t, l, i, e), Me(l, a), t.ancestors.pop(), t.schema = r, t.create(e, i, l, n);
1528
+ }
1529
+ function Rn(t, e) {
1530
+ if (e.data && e.data.estree && t.evaluater) {
1531
+ const r = e.data.estree.body[0];
1532
+ return r.type, /** @type {Child | undefined} */
1533
+ t.evaluater.evaluateExpression(r.expression);
1534
+ }
1535
+ V(t, e.position);
1536
+ }
1537
+ function wn(t, e) {
1538
+ if (e.data && e.data.estree && t.evaluater)
1539
+ return (
1540
+ /** @type {Child | undefined} */
1541
+ t.evaluater.evaluateProgram(e.data.estree)
1542
+ );
1543
+ V(t, e.position);
1544
+ }
1545
+ function xn(t, e, n) {
1546
+ const r = t.schema;
1547
+ let s = r;
1548
+ e.name === "svg" && r.space === "html" && (s = ee, t.schema = s), t.ancestors.push(e);
1549
+ const i = e.name === null ? t.Fragment : kt(t, e.name, !0), l = In(t, e), a = Oe(t, e);
1550
+ return xt(t, l, i, e), Me(l, a), t.ancestors.pop(), t.schema = r, t.create(e, i, l, n);
1551
+ }
1552
+ function kn(t, e, n) {
1553
+ const r = {};
1554
+ return Me(r, Oe(t, e)), t.create(e, t.Fragment, r, n);
1555
+ }
1556
+ function En(t, e) {
1557
+ return e.value;
1558
+ }
1559
+ function xt(t, e, n, r) {
1560
+ typeof n != "string" && n !== t.Fragment && t.passNode && (e.node = r);
1561
+ }
1562
+ function Me(t, e) {
1563
+ if (e.length > 0) {
1564
+ const n = e.length > 1 ? e : e[0];
1565
+ n && (t.children = n);
1566
+ }
1567
+ }
1568
+ function An(t, e, n) {
1569
+ return r;
1570
+ function r(s, i, l, a) {
1571
+ const u = Array.isArray(l.children) ? n : e;
1572
+ return a ? u(i, l, a) : u(i, l);
1573
+ }
1574
+ }
1575
+ function Nn(t, e) {
1576
+ return n;
1577
+ function n(r, s, i, l) {
1578
+ const a = Array.isArray(i.children), o = bt(r);
1579
+ return e(
1580
+ s,
1581
+ i,
1582
+ l,
1583
+ a,
1584
+ {
1585
+ columnNumber: o ? o.column - 1 : void 0,
1586
+ fileName: t,
1587
+ lineNumber: o ? o.line : void 0
1588
+ },
1589
+ void 0
1590
+ );
1591
+ }
1592
+ }
1593
+ function Pn(t, e) {
1594
+ const n = {};
1595
+ let r, s;
1596
+ for (s in e.properties)
1597
+ if (s !== "children" && Te.call(e.properties, s)) {
1598
+ const i = Ln(t, s, e.properties[s]);
1599
+ if (i) {
1600
+ const [l, a] = i;
1601
+ t.tableCellAlignToStyle && l === "align" && typeof a == "string" && bn.has(e.tagName) ? r = a : n[l] = a;
1602
+ }
1603
+ }
1604
+ if (r) {
1605
+ const i = (
1606
+ /** @type {Style} */
1607
+ n.style || (n.style = {})
1608
+ );
1609
+ i[t.stylePropertyNameCase === "css" ? "text-align" : "textAlign"] = r;
1610
+ }
1611
+ return n;
1612
+ }
1613
+ function In(t, e) {
1614
+ const n = {};
1615
+ for (const r of e.attributes)
1616
+ if (r.type === "mdxJsxExpressionAttribute")
1617
+ if (r.data && r.data.estree && t.evaluater) {
1618
+ const i = r.data.estree.body[0];
1619
+ i.type;
1620
+ const l = i.expression;
1621
+ l.type;
1622
+ const a = l.properties[0];
1623
+ a.type, Object.assign(
1624
+ n,
1625
+ t.evaluater.evaluateExpression(a.argument)
1626
+ );
1627
+ } else
1628
+ V(t, e.position);
1629
+ else {
1630
+ const s = r.name;
1631
+ let i;
1632
+ if (r.value && typeof r.value == "object")
1633
+ if (r.value.data && r.value.data.estree && t.evaluater) {
1634
+ const a = r.value.data.estree.body[0];
1635
+ a.type, i = t.evaluater.evaluateExpression(a.expression);
1636
+ } else
1637
+ V(t, e.position);
1638
+ else
1639
+ i = r.value === null ? !0 : r.value;
1640
+ n[s] = /** @type {Props[keyof Props]} */
1641
+ i;
1642
+ }
1643
+ return n;
1644
+ }
1645
+ function Oe(t, e) {
1646
+ const n = [];
1647
+ let r = -1;
1648
+ const s = t.passKeys ? /* @__PURE__ */ new Map() : _n;
1649
+ for (; ++r < e.children.length; ) {
1650
+ const i = e.children[r];
1651
+ let l;
1652
+ if (t.passKeys) {
1653
+ const o = i.type === "element" ? i.tagName : i.type === "mdxJsxFlowElement" || i.type === "mdxJsxTextElement" ? i.name : void 0;
1654
+ if (o) {
1655
+ const u = s.get(o) || 0;
1656
+ l = o + "-" + u, s.set(o, u + 1);
1657
+ }
1658
+ }
1659
+ const a = wt(t, i, l);
1660
+ a !== void 0 && n.push(a);
1661
+ }
1662
+ return n;
1663
+ }
1664
+ function Ln(t, e, n) {
1665
+ const r = _t(t.schema, e);
1666
+ if (!(n == null || typeof n == "number" && Number.isNaN(n))) {
1667
+ if (Array.isArray(n) && (n = r.commaSeparated ? ct(n) : St(n)), r.property === "style") {
1668
+ let s = typeof n == "object" ? n : Tn(t, String(n));
1669
+ return t.stylePropertyNameCase === "css" && (s = Mn(s)), ["style", s];
1670
+ }
1671
+ return [
1672
+ t.elementAttributeNameCase === "react" && r.space ? sn[r.property] || r.property : r.attribute,
1673
+ n
1674
+ ];
1675
+ }
1676
+ }
1677
+ function Tn(t, e) {
1678
+ try {
1679
+ return mn(e, { reactCompat: !0 });
1680
+ } catch (n) {
1681
+ if (t.ignoreInvalidStyle)
1682
+ return {};
1683
+ const r = (
1684
+ /** @type {Error} */
1685
+ n
1686
+ ), s = new E("Cannot parse `style` attribute", {
1687
+ ancestors: t.ancestors,
1688
+ cause: r,
1689
+ ruleId: "style",
1690
+ source: "hast-util-to-jsx-runtime"
1691
+ });
1692
+ throw s.file = t.filePath || void 0, s.url = Rt + "#cannot-parse-style-attribute", s;
1693
+ }
1694
+ }
1695
+ function kt(t, e, n) {
1696
+ let r;
1697
+ if (!n)
1698
+ r = { type: "Literal", value: e };
1699
+ else if (e.includes(".")) {
1700
+ const s = e.split(".");
1701
+ let i = -1, l;
1702
+ for (; ++i < s.length; ) {
1703
+ const a = $e(s[i]) ? { type: "Identifier", name: s[i] } : { type: "Literal", value: s[i] };
1704
+ l = l ? {
1705
+ type: "MemberExpression",
1706
+ object: l,
1707
+ property: a,
1708
+ computed: !!(i && a.type === "Literal"),
1709
+ optional: !1
1710
+ } : a;
1711
+ }
1712
+ r = l;
1713
+ } else
1714
+ r = $e(e) && !/^[a-z]/.test(e) ? { type: "Identifier", name: e } : { type: "Literal", value: e };
1715
+ if (r.type === "Literal") {
1716
+ const s = (
1717
+ /** @type {string | number} */
1718
+ r.value
1719
+ );
1720
+ return Te.call(t.components, s) ? t.components[s] : s;
1721
+ }
1722
+ if (t.evaluater)
1723
+ return t.evaluater.evaluateExpression(r);
1724
+ V(t);
1725
+ }
1726
+ function V(t, e) {
1727
+ const n = new E(
1728
+ "Cannot handle MDX estrees without `createEvaluater`",
1729
+ {
1730
+ ancestors: t.ancestors,
1731
+ place: e,
1732
+ ruleId: "mdx-estree",
1733
+ source: "hast-util-to-jsx-runtime"
1734
+ }
1735
+ );
1736
+ throw n.file = t.filePath || void 0, n.url = Rt + "#cannot-handle-mdx-estrees-without-createevaluater", n;
1737
+ }
1738
+ function Mn(t) {
1739
+ const e = {};
1740
+ let n;
1741
+ for (n in t)
1742
+ Te.call(t, n) && (e[On(n)] = t[n]);
1743
+ return e;
1744
+ }
1745
+ function On(t) {
1746
+ let e = t.replace(Cn, Dn);
1747
+ return e.slice(0, 3) === "ms-" && (e = "-" + e), e;
1748
+ }
1749
+ function Dn(t) {
1750
+ return "-" + t.toLowerCase();
1751
+ }
1752
+ function Gn(t) {
1753
+ return De(t);
1754
+ }
1755
+ function De(t) {
1756
+ return Array.isArray(t) ? jn(t) : t instanceof RegExp ? t : typeof t == "object" ? Bn(t) : t;
1757
+ }
1758
+ function jn(t) {
1759
+ let e = [];
1760
+ for (let n = 0, r = t.length; n < r; n++)
1761
+ e[n] = De(t[n]);
1762
+ return e;
1763
+ }
1764
+ function Bn(t) {
1765
+ let e = {};
1766
+ for (let n in t)
1767
+ e[n] = De(t[n]);
1768
+ return e;
1769
+ }
1770
+ function Et(t, ...e) {
1771
+ return e.forEach((n) => {
1772
+ for (let r in n)
1773
+ t[r] = n[r];
1774
+ }), t;
1775
+ }
1776
+ function At(t) {
1777
+ const e = ~t.lastIndexOf("/") || ~t.lastIndexOf("\\");
1778
+ return e === 0 ? t : ~e === t.length - 1 ? At(t.substring(0, t.length - 1)) : t.substr(~e + 1);
1779
+ }
1780
+ var me = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, ne = class {
1781
+ static hasCaptures(t) {
1782
+ return t === null ? !1 : (me.lastIndex = 0, me.test(t));
1783
+ }
1784
+ static replaceCaptures(t, e, n) {
1785
+ return t.replace(me, (r, s, i, l) => {
1786
+ let a = n[parseInt(s || i, 10)];
1787
+ if (a) {
1788
+ let o = e.substring(a.start, a.end);
1789
+ for (; o[0] === "."; )
1790
+ o = o.substring(1);
1791
+ switch (l) {
1792
+ case "downcase":
1793
+ return o.toLowerCase();
1794
+ case "upcase":
1795
+ return o.toUpperCase();
1796
+ default:
1797
+ return o;
1798
+ }
1799
+ } else
1800
+ return r;
1801
+ });
1802
+ }
1803
+ };
1804
+ function Nt(t, e) {
1805
+ return t < e ? -1 : t > e ? 1 : 0;
1806
+ }
1807
+ function Pt(t, e) {
1808
+ if (t === null && e === null)
1809
+ return 0;
1810
+ if (!t)
1811
+ return -1;
1812
+ if (!e)
1813
+ return 1;
1814
+ let n = t.length, r = e.length;
1815
+ if (n === r) {
1816
+ for (let s = 0; s < n; s++) {
1817
+ let i = Nt(t[s], e[s]);
1818
+ if (i !== 0)
1819
+ return i;
1820
+ }
1821
+ return 0;
1822
+ }
1823
+ return n - r;
1824
+ }
1825
+ function Je(t) {
1826
+ return !!(/^#[0-9a-f]{6}$/i.test(t) || /^#[0-9a-f]{8}$/i.test(t) || /^#[0-9a-f]{3}$/i.test(t) || /^#[0-9a-f]{4}$/i.test(t));
1827
+ }
1828
+ function It(t) {
1829
+ return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
1830
+ }
1831
+ var Lt = class {
1832
+ constructor(t) {
1833
+ this.fn = t;
1834
+ }
1835
+ cache = /* @__PURE__ */ new Map();
1836
+ get(t) {
1837
+ if (this.cache.has(t))
1838
+ return this.cache.get(t);
1839
+ const e = this.fn(t);
1840
+ return this.cache.set(t, e), e;
1841
+ }
1842
+ }, we = class {
1843
+ constructor(t, e, n) {
1844
+ this._colorMap = t, this._defaults = e, this._root = n;
1845
+ }
1846
+ static createFromRawTheme(t, e) {
1847
+ return this.createFromParsedTheme(Un(t), e);
1848
+ }
1849
+ static createFromParsedTheme(t, e) {
1850
+ return Wn(t, e);
1851
+ }
1852
+ _cachedMatchRoot = new Lt(
1853
+ (t) => this._root.match(t)
1854
+ );
1855
+ getColorMap() {
1856
+ return this._colorMap.getColorMap();
1857
+ }
1858
+ getDefaults() {
1859
+ return this._defaults;
1860
+ }
1861
+ match(t) {
1862
+ if (t === null)
1863
+ return this._defaults;
1864
+ const e = t.scopeName, r = this._cachedMatchRoot.get(e).find(
1865
+ (s) => Fn(t.parent, s.parentScopes)
1866
+ );
1867
+ return r ? new Tt(
1868
+ r.fontStyle,
1869
+ r.foreground,
1870
+ r.background
1871
+ ) : null;
1872
+ }
1873
+ }, ge = class ie {
1874
+ constructor(e, n) {
1875
+ this.parent = e, this.scopeName = n;
1876
+ }
1877
+ static push(e, n) {
1878
+ for (const r of n)
1879
+ e = new ie(e, r);
1880
+ return e;
1881
+ }
1882
+ static from(...e) {
1883
+ let n = null;
1884
+ for (let r = 0; r < e.length; r++)
1885
+ n = new ie(n, e[r]);
1886
+ return n;
1887
+ }
1888
+ push(e) {
1889
+ return new ie(this, e);
1890
+ }
1891
+ getSegments() {
1892
+ let e = this;
1893
+ const n = [];
1894
+ for (; e; )
1895
+ n.push(e.scopeName), e = e.parent;
1896
+ return n.reverse(), n;
1897
+ }
1898
+ toString() {
1899
+ return this.getSegments().join(" ");
1900
+ }
1901
+ extends(e) {
1902
+ return this === e ? !0 : this.parent === null ? !1 : this.parent.extends(e);
1903
+ }
1904
+ getExtensionIfDefined(e) {
1905
+ const n = [];
1906
+ let r = this;
1907
+ for (; r && r !== e; )
1908
+ n.push(r.scopeName), r = r.parent;
1909
+ return r === e ? n.reverse() : void 0;
1910
+ }
1911
+ };
1912
+ function Fn(t, e) {
1913
+ if (e.length === 0)
1914
+ return !0;
1915
+ for (let n = 0; n < e.length; n++) {
1916
+ let r = e[n], s = !1;
1917
+ if (r === ">") {
1918
+ if (n === e.length - 1)
1919
+ return !1;
1920
+ r = e[++n], s = !0;
1921
+ }
1922
+ for (; t && !$n(t.scopeName, r); ) {
1923
+ if (s)
1924
+ return !1;
1925
+ t = t.parent;
1926
+ }
1927
+ if (!t)
1928
+ return !1;
1929
+ t = t.parent;
1930
+ }
1931
+ return !0;
1932
+ }
1933
+ function $n(t, e) {
1934
+ return e === t || t.startsWith(e) && t[e.length] === ".";
1935
+ }
1936
+ var Tt = class {
1937
+ constructor(t, e, n) {
1938
+ this.fontStyle = t, this.foregroundId = e, this.backgroundId = n;
1939
+ }
1940
+ };
1941
+ function Un(t) {
1942
+ if (!t)
1943
+ return [];
1944
+ if (!t.settings || !Array.isArray(t.settings))
1945
+ return [];
1946
+ let e = t.settings, n = [], r = 0;
1947
+ for (let s = 0, i = e.length; s < i; s++) {
1948
+ let l = e[s];
1949
+ if (!l.settings)
1950
+ continue;
1951
+ let a;
1952
+ if (typeof l.scope == "string") {
1953
+ let p = l.scope;
1954
+ p = p.replace(/^[,]+/, ""), p = p.replace(/[,]+$/, ""), a = p.split(",");
1955
+ } else Array.isArray(l.scope) ? a = l.scope : a = [""];
1956
+ let o = -1;
1957
+ if (typeof l.settings.fontStyle == "string") {
1958
+ o = 0;
1959
+ let p = l.settings.fontStyle.split(" ");
1960
+ for (let _ = 0, f = p.length; _ < f; _++)
1961
+ switch (p[_]) {
1962
+ case "italic":
1963
+ o = o | 1;
1964
+ break;
1965
+ case "bold":
1966
+ o = o | 2;
1967
+ break;
1968
+ case "underline":
1969
+ o = o | 4;
1970
+ break;
1971
+ case "strikethrough":
1972
+ o = o | 8;
1973
+ break;
1974
+ }
1975
+ }
1976
+ let u = null;
1977
+ typeof l.settings.foreground == "string" && Je(l.settings.foreground) && (u = l.settings.foreground);
1978
+ let h = null;
1979
+ typeof l.settings.background == "string" && Je(l.settings.background) && (h = l.settings.background);
1980
+ for (let p = 0, _ = a.length; p < _; p++) {
1981
+ let d = a[p].trim().split(" "), N = d[d.length - 1], y = null;
1982
+ d.length > 1 && (y = d.slice(0, d.length - 1), y.reverse()), n[r++] = new zn(
1983
+ N,
1984
+ y,
1985
+ s,
1986
+ o,
1987
+ u,
1988
+ h
1989
+ );
1990
+ }
1991
+ }
1992
+ return n;
1993
+ }
1994
+ var zn = class {
1995
+ constructor(t, e, n, r, s, i) {
1996
+ this.scope = t, this.parentScopes = e, this.index = n, this.fontStyle = r, this.foreground = s, this.background = i;
1997
+ }
1998
+ }, qn = /* @__PURE__ */ ((t) => (t[t.NotSet = -1] = "NotSet", t[t.None = 0] = "None", t[t.Italic = 1] = "Italic", t[t.Bold = 2] = "Bold", t[t.Underline = 4] = "Underline", t[t.Strikethrough = 8] = "Strikethrough", t))(qn || {});
1999
+ function Wn(t, e) {
2000
+ t.sort((o, u) => {
2001
+ let h = Nt(o.scope, u.scope);
2002
+ return h !== 0 || (h = Pt(o.parentScopes, u.parentScopes), h !== 0) ? h : o.index - u.index;
2003
+ });
2004
+ let n = 0, r = "#000000", s = "#ffffff";
2005
+ for (; t.length >= 1 && t[0].scope === ""; ) {
2006
+ let o = t.shift();
2007
+ o.fontStyle !== -1 && (n = o.fontStyle), o.foreground !== null && (r = o.foreground), o.background !== null && (s = o.background);
2008
+ }
2009
+ let i = new Hn(e), l = new Tt(n, i.getId(r), i.getId(s)), a = new Kn(new xe(0, null, -1, 0, 0), []);
2010
+ for (let o = 0, u = t.length; o < u; o++) {
2011
+ let h = t[o];
2012
+ a.insert(0, h.scope, h.parentScopes, h.fontStyle, i.getId(h.foreground), i.getId(h.background));
2013
+ }
2014
+ return new we(i, l, a);
2015
+ }
2016
+ var Hn = class {
2017
+ _isFrozen;
2018
+ _lastColorId;
2019
+ _id2color;
2020
+ _color2id;
2021
+ constructor(t) {
2022
+ if (this._lastColorId = 0, this._id2color = [], this._color2id = /* @__PURE__ */ Object.create(null), Array.isArray(t)) {
2023
+ this._isFrozen = !0;
2024
+ for (let e = 0, n = t.length; e < n; e++)
2025
+ this._color2id[t[e]] = e, this._id2color[e] = t[e];
2026
+ } else
2027
+ this._isFrozen = !1;
2028
+ }
2029
+ getId(t) {
2030
+ if (t === null)
2031
+ return 0;
2032
+ t = t.toUpperCase();
2033
+ let e = this._color2id[t];
2034
+ if (e)
2035
+ return e;
2036
+ if (this._isFrozen)
2037
+ throw new Error(`Missing color in color map - ${t}`);
2038
+ return e = ++this._lastColorId, this._color2id[t] = e, this._id2color[e] = t, e;
2039
+ }
2040
+ getColorMap() {
2041
+ return this._id2color.slice(0);
2042
+ }
2043
+ }, Xn = Object.freeze([]), xe = class Mt {
2044
+ scopeDepth;
2045
+ parentScopes;
2046
+ fontStyle;
2047
+ foreground;
2048
+ background;
2049
+ constructor(e, n, r, s, i) {
2050
+ this.scopeDepth = e, this.parentScopes = n || Xn, this.fontStyle = r, this.foreground = s, this.background = i;
2051
+ }
2052
+ clone() {
2053
+ return new Mt(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
2054
+ }
2055
+ static cloneArr(e) {
2056
+ let n = [];
2057
+ for (let r = 0, s = e.length; r < s; r++)
2058
+ n[r] = e[r].clone();
2059
+ return n;
2060
+ }
2061
+ acceptOverwrite(e, n, r, s) {
2062
+ this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, n !== -1 && (this.fontStyle = n), r !== 0 && (this.foreground = r), s !== 0 && (this.background = s);
2063
+ }
2064
+ }, Kn = class ke {
2065
+ constructor(e, n = [], r = {}) {
2066
+ this._mainRule = e, this._children = r, this._rulesWithParentScopes = n;
2067
+ }
2068
+ _rulesWithParentScopes;
2069
+ static _cmpBySpecificity(e, n) {
2070
+ if (e.scopeDepth !== n.scopeDepth)
2071
+ return n.scopeDepth - e.scopeDepth;
2072
+ let r = 0, s = 0;
2073
+ for (; e.parentScopes[r] === ">" && r++, n.parentScopes[s] === ">" && s++, !(r >= e.parentScopes.length || s >= n.parentScopes.length); ) {
2074
+ const i = n.parentScopes[s].length - e.parentScopes[r].length;
2075
+ if (i !== 0)
2076
+ return i;
2077
+ r++, s++;
2078
+ }
2079
+ return n.parentScopes.length - e.parentScopes.length;
2080
+ }
2081
+ match(e) {
2082
+ if (e !== "") {
2083
+ let r = e.indexOf("."), s, i;
2084
+ if (r === -1 ? (s = e, i = "") : (s = e.substring(0, r), i = e.substring(r + 1)), this._children.hasOwnProperty(s))
2085
+ return this._children[s].match(i);
2086
+ }
2087
+ const n = this._rulesWithParentScopes.concat(this._mainRule);
2088
+ return n.sort(ke._cmpBySpecificity), n;
2089
+ }
2090
+ insert(e, n, r, s, i, l) {
2091
+ if (n === "") {
2092
+ this._doInsertHere(e, r, s, i, l);
2093
+ return;
2094
+ }
2095
+ let a = n.indexOf("."), o, u;
2096
+ a === -1 ? (o = n, u = "") : (o = n.substring(0, a), u = n.substring(a + 1));
2097
+ let h;
2098
+ this._children.hasOwnProperty(o) ? h = this._children[o] : (h = new ke(this._mainRule.clone(), xe.cloneArr(this._rulesWithParentScopes)), this._children[o] = h), h.insert(e + 1, u, r, s, i, l);
2099
+ }
2100
+ _doInsertHere(e, n, r, s, i) {
2101
+ if (n === null) {
2102
+ this._mainRule.acceptOverwrite(e, r, s, i);
2103
+ return;
2104
+ }
2105
+ for (let l = 0, a = this._rulesWithParentScopes.length; l < a; l++) {
2106
+ let o = this._rulesWithParentScopes[l];
2107
+ if (Pt(o.parentScopes, n) === 0) {
2108
+ o.acceptOverwrite(e, r, s, i);
2109
+ return;
2110
+ }
2111
+ }
2112
+ r === -1 && (r = this._mainRule.fontStyle), s === 0 && (s = this._mainRule.foreground), i === 0 && (i = this._mainRule.background), this._rulesWithParentScopes.push(new xe(e, n, r, s, i));
2113
+ }
2114
+ }, oe = class L {
2115
+ static toBinaryStr(e) {
2116
+ return e.toString(2).padStart(32, "0");
2117
+ }
2118
+ static print(e) {
2119
+ const n = L.getLanguageId(e), r = L.getTokenType(e), s = L.getFontStyle(e), i = L.getForeground(e), l = L.getBackground(e);
2120
+ console.log({
2121
+ languageId: n,
2122
+ tokenType: r,
2123
+ fontStyle: s,
2124
+ foreground: i,
2125
+ background: l
2126
+ });
2127
+ }
2128
+ static getLanguageId(e) {
2129
+ return (e & 255) >>> 0;
2130
+ }
2131
+ static getTokenType(e) {
2132
+ return (e & 768) >>> 8;
2133
+ }
2134
+ static containsBalancedBrackets(e) {
2135
+ return (e & 1024) !== 0;
2136
+ }
2137
+ static getFontStyle(e) {
2138
+ return (e & 30720) >>> 11;
2139
+ }
2140
+ static getForeground(e) {
2141
+ return (e & 16744448) >>> 15;
2142
+ }
2143
+ static getBackground(e) {
2144
+ return (e & 4278190080) >>> 24;
2145
+ }
2146
+ /**
2147
+ * Updates the fields in `metadata`.
2148
+ * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.
2149
+ */
2150
+ static set(e, n, r, s, i, l, a) {
2151
+ let o = L.getLanguageId(e), u = L.getTokenType(e), h = L.containsBalancedBrackets(e) ? 1 : 0, p = L.getFontStyle(e), _ = L.getForeground(e), f = L.getBackground(e);
2152
+ return n !== 0 && (o = n), r !== 8 && (u = r), s !== null && (h = s ? 1 : 0), i !== -1 && (p = i), l !== 0 && (_ = l), a !== 0 && (f = a), (o << 0 | u << 8 | h << 10 | p << 11 | _ << 15 | f << 24) >>> 0;
2153
+ }
2154
+ };
2155
+ function ae(t, e) {
2156
+ const n = [], r = Vn(t);
2157
+ let s = r.next();
2158
+ for (; s !== null; ) {
2159
+ let o = 0;
2160
+ if (s.length === 2 && s.charAt(1) === ":") {
2161
+ switch (s.charAt(0)) {
2162
+ case "R":
2163
+ o = 1;
2164
+ break;
2165
+ case "L":
2166
+ o = -1;
2167
+ break;
2168
+ default:
2169
+ console.log(`Unknown priority ${s} in scope selector`);
2170
+ }
2171
+ s = r.next();
2172
+ }
2173
+ let u = l();
2174
+ if (n.push({ matcher: u, priority: o }), s !== ",")
2175
+ break;
2176
+ s = r.next();
2177
+ }
2178
+ return n;
2179
+ function i() {
2180
+ if (s === "-") {
2181
+ s = r.next();
2182
+ const o = i();
2183
+ return (u) => !!o && !o(u);
2184
+ }
2185
+ if (s === "(") {
2186
+ s = r.next();
2187
+ const o = a();
2188
+ return s === ")" && (s = r.next()), o;
2189
+ }
2190
+ if (Qe(s)) {
2191
+ const o = [];
2192
+ do
2193
+ o.push(s), s = r.next();
2194
+ while (Qe(s));
2195
+ return (u) => e(o, u);
2196
+ }
2197
+ return null;
2198
+ }
2199
+ function l() {
2200
+ const o = [];
2201
+ let u = i();
2202
+ for (; u; )
2203
+ o.push(u), u = i();
2204
+ return (h) => o.every((p) => p(h));
2205
+ }
2206
+ function a() {
2207
+ const o = [];
2208
+ let u = l();
2209
+ for (; u && (o.push(u), s === "|" || s === ","); ) {
2210
+ do
2211
+ s = r.next();
2212
+ while (s === "|" || s === ",");
2213
+ u = l();
2214
+ }
2215
+ return (h) => o.some((p) => p(h));
2216
+ }
2217
+ }
2218
+ function Qe(t) {
2219
+ return !!t && !!t.match(/[\w\.:]+/);
2220
+ }
2221
+ function Vn(t) {
2222
+ let e = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g, n = e.exec(t);
2223
+ return {
2224
+ next: () => {
2225
+ if (!n)
2226
+ return null;
2227
+ const r = n[0];
2228
+ return n = e.exec(t), r;
2229
+ }
2230
+ };
2231
+ }
2232
+ function Ot(t) {
2233
+ typeof t.dispose == "function" && t.dispose();
2234
+ }
2235
+ var Y = class {
2236
+ constructor(t) {
2237
+ this.scopeName = t;
2238
+ }
2239
+ toKey() {
2240
+ return this.scopeName;
2241
+ }
2242
+ }, Yn = class {
2243
+ constructor(t, e) {
2244
+ this.scopeName = t, this.ruleName = e;
2245
+ }
2246
+ toKey() {
2247
+ return `${this.scopeName}#${this.ruleName}`;
2248
+ }
2249
+ }, Jn = class {
2250
+ _references = [];
2251
+ _seenReferenceKeys = /* @__PURE__ */ new Set();
2252
+ get references() {
2253
+ return this._references;
2254
+ }
2255
+ visitedRule = /* @__PURE__ */ new Set();
2256
+ add(t) {
2257
+ const e = t.toKey();
2258
+ this._seenReferenceKeys.has(e) || (this._seenReferenceKeys.add(e), this._references.push(t));
2259
+ }
2260
+ }, Qn = class {
2261
+ constructor(t, e) {
2262
+ this.repo = t, this.initialScopeName = e, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new Y(this.initialScopeName)];
2263
+ }
2264
+ seenFullScopeRequests = /* @__PURE__ */ new Set();
2265
+ seenPartialScopeRequests = /* @__PURE__ */ new Set();
2266
+ Q;
2267
+ processQueue() {
2268
+ const t = this.Q;
2269
+ this.Q = [];
2270
+ const e = new Jn();
2271
+ for (const n of t)
2272
+ Zn(n, this.initialScopeName, this.repo, e);
2273
+ for (const n of e.references)
2274
+ if (n instanceof Y) {
2275
+ if (this.seenFullScopeRequests.has(n.scopeName))
2276
+ continue;
2277
+ this.seenFullScopeRequests.add(n.scopeName), this.Q.push(n);
2278
+ } else {
2279
+ if (this.seenFullScopeRequests.has(n.scopeName) || this.seenPartialScopeRequests.has(n.toKey()))
2280
+ continue;
2281
+ this.seenPartialScopeRequests.add(n.toKey()), this.Q.push(n);
2282
+ }
2283
+ }
2284
+ };
2285
+ function Zn(t, e, n, r) {
2286
+ const s = n.lookup(t.scopeName);
2287
+ if (!s) {
2288
+ if (t.scopeName === e)
2289
+ throw new Error(`No grammar provided for <${e}>`);
2290
+ return;
2291
+ }
2292
+ const i = n.lookup(e);
2293
+ t instanceof Y ? le({ baseGrammar: i, selfGrammar: s }, r) : Ee(
2294
+ t.ruleName,
2295
+ { baseGrammar: i, selfGrammar: s, repository: s.repository },
2296
+ r
2297
+ );
2298
+ const l = n.injections(t.scopeName);
2299
+ if (l)
2300
+ for (const a of l)
2301
+ r.add(new Y(a));
2302
+ }
2303
+ function Ee(t, e, n) {
2304
+ if (e.repository && e.repository[t]) {
2305
+ const r = e.repository[t];
2306
+ ue([r], e, n);
2307
+ }
2308
+ }
2309
+ function le(t, e) {
2310
+ t.selfGrammar.patterns && Array.isArray(t.selfGrammar.patterns) && ue(
2311
+ t.selfGrammar.patterns,
2312
+ { ...t, repository: t.selfGrammar.repository },
2313
+ e
2314
+ ), t.selfGrammar.injections && ue(
2315
+ Object.values(t.selfGrammar.injections),
2316
+ { ...t, repository: t.selfGrammar.repository },
2317
+ e
2318
+ );
2319
+ }
2320
+ function ue(t, e, n) {
2321
+ for (const r of t) {
2322
+ if (n.visitedRule.has(r))
2323
+ continue;
2324
+ n.visitedRule.add(r);
2325
+ const s = r.repository ? Et({}, e.repository, r.repository) : e.repository;
2326
+ Array.isArray(r.patterns) && ue(r.patterns, { ...e, repository: s }, n);
2327
+ const i = r.include;
2328
+ if (!i)
2329
+ continue;
2330
+ const l = Dt(i);
2331
+ switch (l.kind) {
2332
+ case 0:
2333
+ le({ ...e, selfGrammar: e.baseGrammar }, n);
2334
+ break;
2335
+ case 1:
2336
+ le(e, n);
2337
+ break;
2338
+ case 2:
2339
+ Ee(l.ruleName, { ...e, repository: s }, n);
2340
+ break;
2341
+ case 3:
2342
+ case 4:
2343
+ const a = l.scopeName === e.selfGrammar.scopeName ? e.selfGrammar : l.scopeName === e.baseGrammar.scopeName ? e.baseGrammar : void 0;
2344
+ if (a) {
2345
+ const o = { baseGrammar: e.baseGrammar, selfGrammar: a, repository: s };
2346
+ l.kind === 4 ? Ee(l.ruleName, o, n) : le(o, n);
2347
+ } else
2348
+ l.kind === 4 ? n.add(new Yn(l.scopeName, l.ruleName)) : n.add(new Y(l.scopeName));
2349
+ break;
2350
+ }
2351
+ }
2352
+ }
2353
+ var er = class {
2354
+ kind = 0;
2355
+ }, tr = class {
2356
+ kind = 1;
2357
+ }, nr = class {
2358
+ constructor(t) {
2359
+ this.ruleName = t;
2360
+ }
2361
+ kind = 2;
2362
+ }, rr = class {
2363
+ constructor(t) {
2364
+ this.scopeName = t;
2365
+ }
2366
+ kind = 3;
2367
+ }, sr = class {
2368
+ constructor(t, e) {
2369
+ this.scopeName = t, this.ruleName = e;
2370
+ }
2371
+ kind = 4;
2372
+ };
2373
+ function Dt(t) {
2374
+ if (t === "$base")
2375
+ return new er();
2376
+ if (t === "$self")
2377
+ return new tr();
2378
+ const e = t.indexOf("#");
2379
+ if (e === -1)
2380
+ return new rr(t);
2381
+ if (e === 0)
2382
+ return new nr(t.substring(1));
2383
+ {
2384
+ const n = t.substring(0, e), r = t.substring(e + 1);
2385
+ return new sr(n, r);
2386
+ }
2387
+ }
2388
+ var ir = /\\(\d+)/, Ze = /\\(\d+)/g, lr = -1, Gt = -2;
2389
+ var te = class {
2390
+ $location;
2391
+ id;
2392
+ _nameIsCapturing;
2393
+ _name;
2394
+ _contentNameIsCapturing;
2395
+ _contentName;
2396
+ constructor(t, e, n, r) {
2397
+ this.$location = t, this.id = e, this._name = n || null, this._nameIsCapturing = ne.hasCaptures(this._name), this._contentName = r || null, this._contentNameIsCapturing = ne.hasCaptures(this._contentName);
2398
+ }
2399
+ get debugName() {
2400
+ const t = this.$location ? `${At(this.$location.filename)}:${this.$location.line}` : "unknown";
2401
+ return `${this.constructor.name}#${this.id} @ ${t}`;
2402
+ }
2403
+ getName(t, e) {
2404
+ return !this._nameIsCapturing || this._name === null || t === null || e === null ? this._name : ne.replaceCaptures(this._name, t, e);
2405
+ }
2406
+ getContentName(t, e) {
2407
+ return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : ne.replaceCaptures(this._contentName, t, e);
2408
+ }
2409
+ }, or = class extends te {
2410
+ retokenizeCapturedWithRuleId;
2411
+ constructor(t, e, n, r, s) {
2412
+ super(t, e, n, r), this.retokenizeCapturedWithRuleId = s;
2413
+ }
2414
+ dispose() {
2415
+ }
2416
+ collectPatterns(t, e) {
2417
+ throw new Error("Not supported!");
2418
+ }
2419
+ compile(t, e) {
2420
+ throw new Error("Not supported!");
2421
+ }
2422
+ compileAG(t, e, n, r) {
2423
+ throw new Error("Not supported!");
2424
+ }
2425
+ }, ar = class extends te {
2426
+ _match;
2427
+ captures;
2428
+ _cachedCompiledPatterns;
2429
+ constructor(t, e, n, r, s) {
2430
+ super(t, e, n, null), this._match = new J(r, this.id), this.captures = s, this._cachedCompiledPatterns = null;
2431
+ }
2432
+ dispose() {
2433
+ this._cachedCompiledPatterns && (this._cachedCompiledPatterns.dispose(), this._cachedCompiledPatterns = null);
2434
+ }
2435
+ get debugMatchRegExp() {
2436
+ return `${this._match.source}`;
2437
+ }
2438
+ collectPatterns(t, e) {
2439
+ e.push(this._match);
2440
+ }
2441
+ compile(t, e) {
2442
+ return this._getCachedCompiledPatterns(t).compile(t);
2443
+ }
2444
+ compileAG(t, e, n, r) {
2445
+ return this._getCachedCompiledPatterns(t).compileAG(t, n, r);
2446
+ }
2447
+ _getCachedCompiledPatterns(t) {
2448
+ return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new Q(), this.collectPatterns(t, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
2449
+ }
2450
+ }, et = class extends te {
2451
+ hasMissingPatterns;
2452
+ patterns;
2453
+ _cachedCompiledPatterns;
2454
+ constructor(t, e, n, r, s) {
2455
+ super(t, e, n, r), this.patterns = s.patterns, this.hasMissingPatterns = s.hasMissingPatterns, this._cachedCompiledPatterns = null;
2456
+ }
2457
+ dispose() {
2458
+ this._cachedCompiledPatterns && (this._cachedCompiledPatterns.dispose(), this._cachedCompiledPatterns = null);
2459
+ }
2460
+ collectPatterns(t, e) {
2461
+ for (const n of this.patterns)
2462
+ t.getRule(n).collectPatterns(t, e);
2463
+ }
2464
+ compile(t, e) {
2465
+ return this._getCachedCompiledPatterns(t).compile(t);
2466
+ }
2467
+ compileAG(t, e, n, r) {
2468
+ return this._getCachedCompiledPatterns(t).compileAG(t, n, r);
2469
+ }
2470
+ _getCachedCompiledPatterns(t) {
2471
+ return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new Q(), this.collectPatterns(t, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
2472
+ }
2473
+ }, Ae = class extends te {
2474
+ _begin;
2475
+ beginCaptures;
2476
+ _end;
2477
+ endHasBackReferences;
2478
+ endCaptures;
2479
+ applyEndPatternLast;
2480
+ hasMissingPatterns;
2481
+ patterns;
2482
+ _cachedCompiledPatterns;
2483
+ constructor(t, e, n, r, s, i, l, a, o, u) {
2484
+ super(t, e, n, r), this._begin = new J(s, this.id), this.beginCaptures = i, this._end = new J(l || "￿", -1), this.endHasBackReferences = this._end.hasBackReferences, this.endCaptures = a, this.applyEndPatternLast = o || !1, this.patterns = u.patterns, this.hasMissingPatterns = u.hasMissingPatterns, this._cachedCompiledPatterns = null;
2485
+ }
2486
+ dispose() {
2487
+ this._cachedCompiledPatterns && (this._cachedCompiledPatterns.dispose(), this._cachedCompiledPatterns = null);
2488
+ }
2489
+ get debugBeginRegExp() {
2490
+ return `${this._begin.source}`;
2491
+ }
2492
+ get debugEndRegExp() {
2493
+ return `${this._end.source}`;
2494
+ }
2495
+ getEndWithResolvedBackReferences(t, e) {
2496
+ return this._end.resolveBackReferences(t, e);
2497
+ }
2498
+ collectPatterns(t, e) {
2499
+ e.push(this._begin);
2500
+ }
2501
+ compile(t, e) {
2502
+ return this._getCachedCompiledPatterns(t, e).compile(t);
2503
+ }
2504
+ compileAG(t, e, n, r) {
2505
+ return this._getCachedCompiledPatterns(t, e).compileAG(t, n, r);
2506
+ }
2507
+ _getCachedCompiledPatterns(t, e) {
2508
+ if (!this._cachedCompiledPatterns) {
2509
+ this._cachedCompiledPatterns = new Q();
2510
+ for (const n of this.patterns)
2511
+ t.getRule(n).collectPatterns(t, this._cachedCompiledPatterns);
2512
+ this.applyEndPatternLast ? this._cachedCompiledPatterns.push(this._end.hasBackReferences ? this._end.clone() : this._end) : this._cachedCompiledPatterns.unshift(this._end.hasBackReferences ? this._end.clone() : this._end);
2513
+ }
2514
+ return this._end.hasBackReferences && (this.applyEndPatternLast ? this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, e) : this._cachedCompiledPatterns.setSource(0, e)), this._cachedCompiledPatterns;
2515
+ }
2516
+ }, ce = class extends te {
2517
+ _begin;
2518
+ beginCaptures;
2519
+ whileCaptures;
2520
+ _while;
2521
+ whileHasBackReferences;
2522
+ hasMissingPatterns;
2523
+ patterns;
2524
+ _cachedCompiledPatterns;
2525
+ _cachedCompiledWhilePatterns;
2526
+ constructor(t, e, n, r, s, i, l, a, o) {
2527
+ super(t, e, n, r), this._begin = new J(s, this.id), this.beginCaptures = i, this.whileCaptures = a, this._while = new J(l, Gt), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = o.patterns, this.hasMissingPatterns = o.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
2528
+ }
2529
+ dispose() {
2530
+ this._cachedCompiledPatterns && (this._cachedCompiledPatterns.dispose(), this._cachedCompiledPatterns = null), this._cachedCompiledWhilePatterns && (this._cachedCompiledWhilePatterns.dispose(), this._cachedCompiledWhilePatterns = null);
2531
+ }
2532
+ get debugBeginRegExp() {
2533
+ return `${this._begin.source}`;
2534
+ }
2535
+ get debugWhileRegExp() {
2536
+ return `${this._while.source}`;
2537
+ }
2538
+ getWhileWithResolvedBackReferences(t, e) {
2539
+ return this._while.resolveBackReferences(t, e);
2540
+ }
2541
+ collectPatterns(t, e) {
2542
+ e.push(this._begin);
2543
+ }
2544
+ compile(t, e) {
2545
+ return this._getCachedCompiledPatterns(t).compile(t);
2546
+ }
2547
+ compileAG(t, e, n, r) {
2548
+ return this._getCachedCompiledPatterns(t).compileAG(t, n, r);
2549
+ }
2550
+ _getCachedCompiledPatterns(t) {
2551
+ if (!this._cachedCompiledPatterns) {
2552
+ this._cachedCompiledPatterns = new Q();
2553
+ for (const e of this.patterns)
2554
+ t.getRule(e).collectPatterns(t, this._cachedCompiledPatterns);
2555
+ }
2556
+ return this._cachedCompiledPatterns;
2557
+ }
2558
+ compileWhile(t, e) {
2559
+ return this._getCachedCompiledWhilePatterns(t, e).compile(t);
2560
+ }
2561
+ compileWhileAG(t, e, n, r) {
2562
+ return this._getCachedCompiledWhilePatterns(t, e).compileAG(t, n, r);
2563
+ }
2564
+ _getCachedCompiledWhilePatterns(t, e) {
2565
+ return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new Q(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, e || "￿"), this._cachedCompiledWhilePatterns;
2566
+ }
2567
+ }, jt = class x {
2568
+ static createCaptureRule(e, n, r, s, i) {
2569
+ return e.registerRule((l) => new or(n, l, r, s, i));
2570
+ }
2571
+ static getCompiledRuleId(e, n, r) {
2572
+ return e.id || n.registerRule((s) => {
2573
+ if (e.id = s, e.match)
2574
+ return new ar(
2575
+ e.$vscodeTextmateLocation,
2576
+ e.id,
2577
+ e.name,
2578
+ e.match,
2579
+ x._compileCaptures(e.captures, n, r)
2580
+ );
2581
+ if (typeof e.begin > "u") {
2582
+ e.repository && (r = Et({}, r, e.repository));
2583
+ let i = e.patterns;
2584
+ return typeof i > "u" && e.include && (i = [{ include: e.include }]), new et(
2585
+ e.$vscodeTextmateLocation,
2586
+ e.id,
2587
+ e.name,
2588
+ e.contentName,
2589
+ x._compilePatterns(i, n, r)
2590
+ );
2591
+ }
2592
+ return e.while ? new ce(
2593
+ e.$vscodeTextmateLocation,
2594
+ e.id,
2595
+ e.name,
2596
+ e.contentName,
2597
+ e.begin,
2598
+ x._compileCaptures(e.beginCaptures || e.captures, n, r),
2599
+ e.while,
2600
+ x._compileCaptures(e.whileCaptures || e.captures, n, r),
2601
+ x._compilePatterns(e.patterns, n, r)
2602
+ ) : new Ae(
2603
+ e.$vscodeTextmateLocation,
2604
+ e.id,
2605
+ e.name,
2606
+ e.contentName,
2607
+ e.begin,
2608
+ x._compileCaptures(e.beginCaptures || e.captures, n, r),
2609
+ e.end,
2610
+ x._compileCaptures(e.endCaptures || e.captures, n, r),
2611
+ e.applyEndPatternLast,
2612
+ x._compilePatterns(e.patterns, n, r)
2613
+ );
2614
+ }), e.id;
2615
+ }
2616
+ static _compileCaptures(e, n, r) {
2617
+ let s = [];
2618
+ if (e) {
2619
+ let i = 0;
2620
+ for (const l in e) {
2621
+ if (l === "$vscodeTextmateLocation")
2622
+ continue;
2623
+ const a = parseInt(l, 10);
2624
+ a > i && (i = a);
2625
+ }
2626
+ for (let l = 0; l <= i; l++)
2627
+ s[l] = null;
2628
+ for (const l in e) {
2629
+ if (l === "$vscodeTextmateLocation")
2630
+ continue;
2631
+ const a = parseInt(l, 10);
2632
+ let o = 0;
2633
+ e[l].patterns && (o = x.getCompiledRuleId(e[l], n, r)), s[a] = x.createCaptureRule(n, e[l].$vscodeTextmateLocation, e[l].name, e[l].contentName, o);
2634
+ }
2635
+ }
2636
+ return s;
2637
+ }
2638
+ static _compilePatterns(e, n, r) {
2639
+ let s = [];
2640
+ if (e)
2641
+ for (let i = 0, l = e.length; i < l; i++) {
2642
+ const a = e[i];
2643
+ let o = -1;
2644
+ if (a.include) {
2645
+ const u = Dt(a.include);
2646
+ switch (u.kind) {
2647
+ case 0:
2648
+ case 1:
2649
+ o = x.getCompiledRuleId(r[a.include], n, r);
2650
+ break;
2651
+ case 2:
2652
+ let h = r[u.ruleName];
2653
+ h && (o = x.getCompiledRuleId(h, n, r));
2654
+ break;
2655
+ case 3:
2656
+ case 4:
2657
+ const p = u.scopeName, _ = u.kind === 4 ? u.ruleName : null, f = n.getExternalGrammar(p, r);
2658
+ if (f)
2659
+ if (_) {
2660
+ let d = f.repository[_];
2661
+ d && (o = x.getCompiledRuleId(d, n, f.repository));
2662
+ } else
2663
+ o = x.getCompiledRuleId(f.repository.$self, n, f.repository);
2664
+ break;
2665
+ }
2666
+ } else
2667
+ o = x.getCompiledRuleId(a, n, r);
2668
+ if (o !== -1) {
2669
+ const u = n.getRule(o);
2670
+ let h = !1;
2671
+ if ((u instanceof et || u instanceof Ae || u instanceof ce) && u.hasMissingPatterns && u.patterns.length === 0 && (h = !0), h)
2672
+ continue;
2673
+ s.push(o);
2674
+ }
2675
+ }
2676
+ return {
2677
+ patterns: s,
2678
+ hasMissingPatterns: (e ? e.length : 0) !== s.length
2679
+ };
2680
+ }
2681
+ }, J = class Bt {
2682
+ source;
2683
+ ruleId;
2684
+ hasAnchor;
2685
+ hasBackReferences;
2686
+ _anchorCache;
2687
+ constructor(e, n) {
2688
+ if (e && typeof e == "string") {
2689
+ const r = e.length;
2690
+ let s = 0, i = [], l = !1;
2691
+ for (let a = 0; a < r; a++)
2692
+ if (e.charAt(a) === "\\" && a + 1 < r) {
2693
+ const u = e.charAt(a + 1);
2694
+ u === "z" ? (i.push(e.substring(s, a)), i.push("$(?!\\n)(?<!\\n)"), s = a + 2) : (u === "A" || u === "G") && (l = !0), a++;
2695
+ }
2696
+ this.hasAnchor = l, s === 0 ? this.source = e : (i.push(e.substring(s, r)), this.source = i.join(""));
2697
+ } else
2698
+ this.hasAnchor = !1, this.source = e;
2699
+ this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = ir.test(this.source) : this.hasBackReferences = !1;
2700
+ }
2701
+ clone() {
2702
+ return new Bt(this.source, this.ruleId);
2703
+ }
2704
+ setSource(e) {
2705
+ this.source !== e && (this.source = e, this.hasAnchor && (this._anchorCache = this._buildAnchorCache()));
2706
+ }
2707
+ resolveBackReferences(e, n) {
2708
+ if (typeof this.source != "string")
2709
+ throw new Error("This method should only be called if the source is a string");
2710
+ let r = n.map((s) => e.substring(s.start, s.end));
2711
+ return Ze.lastIndex = 0, this.source.replace(Ze, (s, i) => It(r[parseInt(i, 10)] || ""));
2712
+ }
2713
+ _buildAnchorCache() {
2714
+ if (typeof this.source != "string")
2715
+ throw new Error("This method should only be called if the source is a string");
2716
+ let e = [], n = [], r = [], s = [], i, l, a, o;
2717
+ for (i = 0, l = this.source.length; i < l; i++)
2718
+ a = this.source.charAt(i), e[i] = a, n[i] = a, r[i] = a, s[i] = a, a === "\\" && i + 1 < l && (o = this.source.charAt(i + 1), o === "A" ? (e[i + 1] = "￿", n[i + 1] = "￿", r[i + 1] = "A", s[i + 1] = "A") : o === "G" ? (e[i + 1] = "￿", n[i + 1] = "G", r[i + 1] = "￿", s[i + 1] = "G") : (e[i + 1] = o, n[i + 1] = o, r[i + 1] = o, s[i + 1] = o), i++);
2719
+ return {
2720
+ A0_G0: e.join(""),
2721
+ A0_G1: n.join(""),
2722
+ A1_G0: r.join(""),
2723
+ A1_G1: s.join("")
2724
+ };
2725
+ }
2726
+ resolveAnchors(e, n) {
2727
+ return !this.hasAnchor || !this._anchorCache || typeof this.source != "string" ? this.source : e ? n ? this._anchorCache.A1_G1 : this._anchorCache.A1_G0 : n ? this._anchorCache.A0_G1 : this._anchorCache.A0_G0;
2728
+ }
2729
+ }, Q = class {
2730
+ _items;
2731
+ _hasAnchors;
2732
+ _cached;
2733
+ _anchorCache;
2734
+ constructor() {
2735
+ this._items = [], this._hasAnchors = !1, this._cached = null, this._anchorCache = {
2736
+ A0_G0: null,
2737
+ A0_G1: null,
2738
+ A1_G0: null,
2739
+ A1_G1: null
2740
+ };
2741
+ }
2742
+ dispose() {
2743
+ this._disposeCaches();
2744
+ }
2745
+ _disposeCaches() {
2746
+ this._cached && (this._cached.dispose(), this._cached = null), this._anchorCache.A0_G0 && (this._anchorCache.A0_G0.dispose(), this._anchorCache.A0_G0 = null), this._anchorCache.A0_G1 && (this._anchorCache.A0_G1.dispose(), this._anchorCache.A0_G1 = null), this._anchorCache.A1_G0 && (this._anchorCache.A1_G0.dispose(), this._anchorCache.A1_G0 = null), this._anchorCache.A1_G1 && (this._anchorCache.A1_G1.dispose(), this._anchorCache.A1_G1 = null);
2747
+ }
2748
+ push(t) {
2749
+ this._items.push(t), this._hasAnchors = this._hasAnchors || t.hasAnchor;
2750
+ }
2751
+ unshift(t) {
2752
+ this._items.unshift(t), this._hasAnchors = this._hasAnchors || t.hasAnchor;
2753
+ }
2754
+ length() {
2755
+ return this._items.length;
2756
+ }
2757
+ setSource(t, e) {
2758
+ this._items[t].source !== e && (this._disposeCaches(), this._items[t].setSource(e));
2759
+ }
2760
+ compile(t) {
2761
+ if (!this._cached) {
2762
+ let e = this._items.map((n) => n.source);
2763
+ this._cached = new tt(t, e, this._items.map((n) => n.ruleId));
2764
+ }
2765
+ return this._cached;
2766
+ }
2767
+ compileAG(t, e, n) {
2768
+ return this._hasAnchors ? e ? n ? (this._anchorCache.A1_G1 || (this._anchorCache.A1_G1 = this._resolveAnchors(t, e, n)), this._anchorCache.A1_G1) : (this._anchorCache.A1_G0 || (this._anchorCache.A1_G0 = this._resolveAnchors(t, e, n)), this._anchorCache.A1_G0) : n ? (this._anchorCache.A0_G1 || (this._anchorCache.A0_G1 = this._resolveAnchors(t, e, n)), this._anchorCache.A0_G1) : (this._anchorCache.A0_G0 || (this._anchorCache.A0_G0 = this._resolveAnchors(t, e, n)), this._anchorCache.A0_G0) : this.compile(t);
2769
+ }
2770
+ _resolveAnchors(t, e, n) {
2771
+ let r = this._items.map((s) => s.resolveAnchors(e, n));
2772
+ return new tt(t, r, this._items.map((s) => s.ruleId));
2773
+ }
2774
+ }, tt = class {
2775
+ constructor(t, e, n) {
2776
+ this.regExps = e, this.rules = n, this.scanner = t.createOnigScanner(e);
2777
+ }
2778
+ scanner;
2779
+ dispose() {
2780
+ typeof this.scanner.dispose == "function" && this.scanner.dispose();
2781
+ }
2782
+ toString() {
2783
+ const t = [];
2784
+ for (let e = 0, n = this.rules.length; e < n; e++)
2785
+ t.push(" - " + this.rules[e] + ": " + this.regExps[e]);
2786
+ return t.join(`
2787
+ `);
2788
+ }
2789
+ findNextMatchSync(t, e, n) {
2790
+ const r = this.scanner.findNextMatchSync(t, e, n);
2791
+ return r ? {
2792
+ ruleId: this.rules[r.index],
2793
+ captureIndices: r.captureIndices
2794
+ } : null;
2795
+ }
2796
+ }, ye = class {
2797
+ constructor(t, e) {
2798
+ this.languageId = t, this.tokenType = e;
2799
+ }
2800
+ }, ur = class Ne {
2801
+ _defaultAttributes;
2802
+ _embeddedLanguagesMatcher;
2803
+ constructor(e, n) {
2804
+ this._defaultAttributes = new ye(
2805
+ e,
2806
+ 8
2807
+ /* NotSet */
2808
+ ), this._embeddedLanguagesMatcher = new cr(Object.entries(n || {}));
2809
+ }
2810
+ getDefaultAttributes() {
2811
+ return this._defaultAttributes;
2812
+ }
2813
+ getBasicScopeAttributes(e) {
2814
+ return e === null ? Ne._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(e);
2815
+ }
2816
+ static _NULL_SCOPE_METADATA = new ye(0, 0);
2817
+ _getBasicScopeAttributes = new Lt((e) => {
2818
+ const n = this._scopeToLanguage(e), r = this._toStandardTokenType(e);
2819
+ return new ye(n, r);
2820
+ });
2821
+ /**
2822
+ * Given a produced TM scope, return the language that token describes or null if unknown.
2823
+ * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null
2824
+ */
2825
+ _scopeToLanguage(e) {
2826
+ return this._embeddedLanguagesMatcher.match(e) || 0;
2827
+ }
2828
+ _toStandardTokenType(e) {
2829
+ const n = e.match(Ne.STANDARD_TOKEN_TYPE_REGEXP);
2830
+ if (!n)
2831
+ return 8;
2832
+ switch (n[1]) {
2833
+ case "comment":
2834
+ return 1;
2835
+ case "string":
2836
+ return 2;
2837
+ case "regex":
2838
+ return 3;
2839
+ case "meta.embedded":
2840
+ return 0;
2841
+ }
2842
+ throw new Error("Unexpected match for standard token type!");
2843
+ }
2844
+ static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
2845
+ }, cr = class {
2846
+ values;
2847
+ scopesRegExp;
2848
+ constructor(t) {
2849
+ if (t.length === 0)
2850
+ this.values = null, this.scopesRegExp = null;
2851
+ else {
2852
+ this.values = new Map(t);
2853
+ const e = t.map(
2854
+ ([n, r]) => It(n)
2855
+ );
2856
+ e.sort(), e.reverse(), this.scopesRegExp = new RegExp(
2857
+ `^((${e.join(")|(")}))($|\\.)`,
2858
+ ""
2859
+ );
2860
+ }
2861
+ }
2862
+ match(t) {
2863
+ if (!this.scopesRegExp)
2864
+ return;
2865
+ const e = t.match(this.scopesRegExp);
2866
+ if (e)
2867
+ return this.values.get(e[1]);
2868
+ }
2869
+ };
2870
+ typeof process < "u" && process.env.VSCODE_TEXTMATE_DEBUG;
2871
+ var nt = class {
2872
+ constructor(t, e) {
2873
+ this.stack = t, this.stoppedEarly = e;
2874
+ }
2875
+ };
2876
+ function Ft(t, e, n, r, s, i, l, a) {
2877
+ const o = e.content.length;
2878
+ let u = !1, h = -1;
2879
+ if (l) {
2880
+ const f = hr(
2881
+ t,
2882
+ e,
2883
+ n,
2884
+ r,
2885
+ s,
2886
+ i
2887
+ );
2888
+ s = f.stack, r = f.linePos, n = f.isFirstLine, h = f.anchorPosition;
2889
+ }
2890
+ const p = Date.now();
2891
+ for (; !u; ) {
2892
+ if (a !== 0 && Date.now() - p > a)
2893
+ return new nt(s, !0);
2894
+ _();
2895
+ }
2896
+ return new nt(s, !1);
2897
+ function _() {
2898
+ const f = pr(
2899
+ t,
2900
+ e,
2901
+ n,
2902
+ r,
2903
+ s,
2904
+ h
2905
+ );
2906
+ if (!f) {
2907
+ i.produce(s, o), u = !0;
2908
+ return;
2909
+ }
2910
+ const d = f.captureIndices, N = f.matchedRuleId, y = d && d.length > 0 ? d[0].end > r : !1;
2911
+ if (N === lr) {
2912
+ const v = s.getRule(t);
2913
+ i.produce(s, d[0].start), s = s.withContentNameScopesList(s.nameScopesList), X(
2914
+ t,
2915
+ e,
2916
+ n,
2917
+ s,
2918
+ i,
2919
+ v.endCaptures,
2920
+ d
2921
+ ), i.produce(s, d[0].end);
2922
+ const R = s;
2923
+ if (s = s.parent, h = R.getAnchorPos(), !y && R.getEnterPos() === r) {
2924
+ s = R, i.produce(s, o), u = !0;
2925
+ return;
2926
+ }
2927
+ } else {
2928
+ const v = t.getRule(N);
2929
+ i.produce(s, d[0].start);
2930
+ const R = s, k = v.getName(e.content, d), M = s.contentNameScopesList.pushAttributed(
2931
+ k,
2932
+ t
2933
+ );
2934
+ if (s = s.push(
2935
+ N,
2936
+ r,
2937
+ h,
2938
+ d[0].end === o,
2939
+ null,
2940
+ M,
2941
+ M
2942
+ ), v instanceof Ae) {
2943
+ const P = v;
2944
+ X(
2945
+ t,
2946
+ e,
2947
+ n,
2948
+ s,
2949
+ i,
2950
+ P.beginCaptures,
2951
+ d
2952
+ ), i.produce(s, d[0].end), h = d[0].end;
2953
+ const j = P.getContentName(
2954
+ e.content,
2955
+ d
2956
+ ), B = M.pushAttributed(
2957
+ j,
2958
+ t
2959
+ );
2960
+ if (s = s.withContentNameScopesList(B), P.endHasBackReferences && (s = s.withEndRule(
2961
+ P.getEndWithResolvedBackReferences(
2962
+ e.content,
2963
+ d
2964
+ )
2965
+ )), !y && R.hasSameRuleAs(s)) {
2966
+ s = s.pop(), i.produce(s, o), u = !0;
2967
+ return;
2968
+ }
2969
+ } else if (v instanceof ce) {
2970
+ const P = v;
2971
+ X(
2972
+ t,
2973
+ e,
2974
+ n,
2975
+ s,
2976
+ i,
2977
+ P.beginCaptures,
2978
+ d
2979
+ ), i.produce(s, d[0].end), h = d[0].end;
2980
+ const j = P.getContentName(
2981
+ e.content,
2982
+ d
2983
+ ), B = M.pushAttributed(
2984
+ j,
2985
+ t
2986
+ );
2987
+ if (s = s.withContentNameScopesList(B), P.whileHasBackReferences && (s = s.withEndRule(
2988
+ P.getWhileWithResolvedBackReferences(
2989
+ e.content,
2990
+ d
2991
+ )
2992
+ )), !y && R.hasSameRuleAs(s)) {
2993
+ s = s.pop(), i.produce(s, o), u = !0;
2994
+ return;
2995
+ }
2996
+ } else if (X(
2997
+ t,
2998
+ e,
2999
+ n,
3000
+ s,
3001
+ i,
3002
+ v.captures,
3003
+ d
3004
+ ), i.produce(s, d[0].end), s = s.pop(), !y) {
3005
+ s = s.safePop(), i.produce(s, o), u = !0;
3006
+ return;
3007
+ }
3008
+ }
3009
+ d[0].end > r && (r = d[0].end, n = !1);
3010
+ }
3011
+ }
3012
+ function hr(t, e, n, r, s, i) {
3013
+ let l = s.beginRuleCapturedEOL ? 0 : -1;
3014
+ const a = [];
3015
+ for (let o = s; o; o = o.pop()) {
3016
+ const u = o.getRule(t);
3017
+ u instanceof ce && a.push({
3018
+ rule: u,
3019
+ stack: o
3020
+ });
3021
+ }
3022
+ for (let o = a.pop(); o; o = a.pop()) {
3023
+ const { ruleScanner: u, findOptions: h } = mr(o.rule, t, o.stack.endRule, n, r === l), p = u.findNextMatchSync(e, r, h);
3024
+ if (p) {
3025
+ if (p.ruleId !== Gt) {
3026
+ s = o.stack.pop();
3027
+ break;
3028
+ }
3029
+ p.captureIndices && p.captureIndices.length && (i.produce(o.stack, p.captureIndices[0].start), X(t, e, n, o.stack, i, o.rule.whileCaptures, p.captureIndices), i.produce(o.stack, p.captureIndices[0].end), l = p.captureIndices[0].end, p.captureIndices[0].end > r && (r = p.captureIndices[0].end, n = !1));
3030
+ } else {
3031
+ s = o.stack.pop();
3032
+ break;
3033
+ }
3034
+ }
3035
+ return { stack: s, linePos: r, anchorPosition: l, isFirstLine: n };
3036
+ }
3037
+ function pr(t, e, n, r, s, i) {
3038
+ const l = dr(t, e, n, r, s, i), a = t.getInjections();
3039
+ if (a.length === 0)
3040
+ return l;
3041
+ const o = fr(a, t, e, n, r, s, i);
3042
+ if (!o)
3043
+ return l;
3044
+ if (!l)
3045
+ return o;
3046
+ const u = l.captureIndices[0].start, h = o.captureIndices[0].start;
3047
+ return h < u || o.priorityMatch && h === u ? o : l;
3048
+ }
3049
+ function dr(t, e, n, r, s, i) {
3050
+ const l = s.getRule(t), { ruleScanner: a, findOptions: o } = $t(l, t, s.endRule, n, r === i), u = a.findNextMatchSync(e, r, o);
3051
+ return u ? {
3052
+ captureIndices: u.captureIndices,
3053
+ matchedRuleId: u.ruleId
3054
+ } : null;
3055
+ }
3056
+ function fr(t, e, n, r, s, i, l) {
3057
+ let a = Number.MAX_VALUE, o = null, u, h = 0;
3058
+ const p = i.contentNameScopesList.getScopeNames();
3059
+ for (let _ = 0, f = t.length; _ < f; _++) {
3060
+ const d = t[_];
3061
+ if (!d.matcher(p))
3062
+ continue;
3063
+ const N = e.getRule(d.ruleId), { ruleScanner: y, findOptions: v } = $t(N, e, null, r, s === l), R = y.findNextMatchSync(n, s, v);
3064
+ if (!R)
3065
+ continue;
3066
+ const k = R.captureIndices[0].start;
3067
+ if (!(k >= a) && (a = k, o = R.captureIndices, u = R.ruleId, h = d.priority, a === s))
3068
+ break;
3069
+ }
3070
+ return o ? {
3071
+ priorityMatch: h === -1,
3072
+ captureIndices: o,
3073
+ matchedRuleId: u
3074
+ } : null;
3075
+ }
3076
+ function $t(t, e, n, r, s) {
3077
+ return {
3078
+ ruleScanner: t.compileAG(e, n, r, s),
3079
+ findOptions: 0
3080
+ /* None */
3081
+ };
3082
+ }
3083
+ function mr(t, e, n, r, s) {
3084
+ return {
3085
+ ruleScanner: t.compileWhileAG(e, n, r, s),
3086
+ findOptions: 0
3087
+ /* None */
3088
+ };
3089
+ }
3090
+ function X(t, e, n, r, s, i, l) {
3091
+ if (i.length === 0)
3092
+ return;
3093
+ const a = e.content, o = Math.min(i.length, l.length), u = [], h = l[0].end;
3094
+ for (let p = 0; p < o; p++) {
3095
+ const _ = i[p];
3096
+ if (_ === null)
3097
+ continue;
3098
+ const f = l[p];
3099
+ if (f.length === 0)
3100
+ continue;
3101
+ if (f.start > h)
3102
+ break;
3103
+ for (; u.length > 0 && u[u.length - 1].endPos <= f.start; )
3104
+ s.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
3105
+ if (u.length > 0 ? s.produceFromScopes(u[u.length - 1].scopes, f.start) : s.produce(r, f.start), _.retokenizeCapturedWithRuleId) {
3106
+ const N = _.getName(a, l), y = r.contentNameScopesList.pushAttributed(N, t), v = _.getContentName(a, l), R = y.pushAttributed(v, t), k = r.push(_.retokenizeCapturedWithRuleId, f.start, -1, !1, null, y, R), M = t.createOnigString(a.substring(0, f.end));
3107
+ Ft(
3108
+ t,
3109
+ M,
3110
+ n && f.start === 0,
3111
+ f.start,
3112
+ k,
3113
+ s,
3114
+ !1,
3115
+ /* no time limit */
3116
+ 0
3117
+ ), Ot(M);
3118
+ continue;
3119
+ }
3120
+ const d = _.getName(a, l);
3121
+ if (d !== null) {
3122
+ const y = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(d, t);
3123
+ u.push(new gr(y, f.end));
3124
+ }
3125
+ }
3126
+ for (; u.length > 0; )
3127
+ s.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
3128
+ }
3129
+ var gr = class {
3130
+ scopes;
3131
+ endPos;
3132
+ constructor(t, e) {
3133
+ this.scopes = t, this.endPos = e;
3134
+ }
3135
+ };
3136
+ function yr(t, e, n, r, s, i, l, a) {
3137
+ return new Cr(
3138
+ t,
3139
+ e,
3140
+ n,
3141
+ r,
3142
+ s,
3143
+ i,
3144
+ l,
3145
+ a
3146
+ );
3147
+ }
3148
+ function rt(t, e, n, r, s) {
3149
+ const i = ae(e, he), l = jt.getCompiledRuleId(n, r, s.repository);
3150
+ for (const a of i)
3151
+ t.push({
3152
+ debugSelector: e,
3153
+ matcher: a.matcher,
3154
+ ruleId: l,
3155
+ grammar: s,
3156
+ priority: a.priority
3157
+ });
3158
+ }
3159
+ function he(t, e) {
3160
+ if (e.length < t.length)
3161
+ return !1;
3162
+ let n = 0;
3163
+ return t.every((r) => {
3164
+ for (let s = n; s < e.length; s++)
3165
+ if (_r(e[s], r))
3166
+ return n = s + 1, !0;
3167
+ return !1;
3168
+ });
3169
+ }
3170
+ function _r(t, e) {
3171
+ if (!t)
3172
+ return !1;
3173
+ if (t === e)
3174
+ return !0;
3175
+ const n = e.length;
3176
+ return t.length > n && t.substr(0, n) === e && t[n] === ".";
3177
+ }
3178
+ var Cr = class {
3179
+ constructor(t, e, n, r, s, i, l, a) {
3180
+ if (this._rootScopeName = t, this.balancedBracketSelectors = i, this._onigLib = a, this._basicScopeAttributesProvider = new ur(
3181
+ n,
3182
+ r
3183
+ ), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = l, this._grammar = st(e, null), this._injections = null, this._tokenTypeMatchers = [], s)
3184
+ for (const o of Object.keys(s)) {
3185
+ const u = ae(o, he);
3186
+ for (const h of u)
3187
+ this._tokenTypeMatchers.push({
3188
+ matcher: h.matcher,
3189
+ type: s[o]
3190
+ });
3191
+ }
3192
+ }
3193
+ _rootId;
3194
+ _lastRuleId;
3195
+ _ruleId2desc;
3196
+ _includedGrammars;
3197
+ _grammarRepository;
3198
+ _grammar;
3199
+ _injections;
3200
+ _basicScopeAttributesProvider;
3201
+ _tokenTypeMatchers;
3202
+ get themeProvider() {
3203
+ return this._grammarRepository;
3204
+ }
3205
+ dispose() {
3206
+ for (const t of this._ruleId2desc)
3207
+ t && t.dispose();
3208
+ }
3209
+ createOnigScanner(t) {
3210
+ return this._onigLib.createOnigScanner(t);
3211
+ }
3212
+ createOnigString(t) {
3213
+ return this._onigLib.createOnigString(t);
3214
+ }
3215
+ getMetadataForScope(t) {
3216
+ return this._basicScopeAttributesProvider.getBasicScopeAttributes(t);
3217
+ }
3218
+ _collectInjections() {
3219
+ const t = {
3220
+ lookup: (s) => s === this._rootScopeName ? this._grammar : this.getExternalGrammar(s),
3221
+ injections: (s) => this._grammarRepository.injections(s)
3222
+ }, e = [], n = this._rootScopeName, r = t.lookup(n);
3223
+ if (r) {
3224
+ const s = r.injections;
3225
+ if (s)
3226
+ for (let l in s)
3227
+ rt(
3228
+ e,
3229
+ l,
3230
+ s[l],
3231
+ this,
3232
+ r
3233
+ );
3234
+ const i = this._grammarRepository.injections(n);
3235
+ i && i.forEach((l) => {
3236
+ const a = this.getExternalGrammar(l);
3237
+ if (a) {
3238
+ const o = a.injectionSelector;
3239
+ o && rt(
3240
+ e,
3241
+ o,
3242
+ a,
3243
+ this,
3244
+ a
3245
+ );
3246
+ }
3247
+ });
3248
+ }
3249
+ return e.sort((s, i) => s.priority - i.priority), e;
3250
+ }
3251
+ getInjections() {
3252
+ return this._injections === null && (this._injections = this._collectInjections()), this._injections;
3253
+ }
3254
+ registerRule(t) {
3255
+ const e = ++this._lastRuleId, n = t(e);
3256
+ return this._ruleId2desc[e] = n, n;
3257
+ }
3258
+ getRule(t) {
3259
+ return this._ruleId2desc[t];
3260
+ }
3261
+ getExternalGrammar(t, e) {
3262
+ if (this._includedGrammars[t])
3263
+ return this._includedGrammars[t];
3264
+ if (this._grammarRepository) {
3265
+ const n = this._grammarRepository.lookup(t);
3266
+ if (n)
3267
+ return this._includedGrammars[t] = st(
3268
+ n,
3269
+ e && e.$base
3270
+ ), this._includedGrammars[t];
3271
+ }
3272
+ }
3273
+ tokenizeLine(t, e, n = 0) {
3274
+ const r = this._tokenize(t, e, !1, n);
3275
+ return {
3276
+ tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),
3277
+ ruleStack: r.ruleStack,
3278
+ stoppedEarly: r.stoppedEarly
3279
+ };
3280
+ }
3281
+ tokenizeLine2(t, e, n = 0) {
3282
+ const r = this._tokenize(t, e, !0, n);
3283
+ return {
3284
+ tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),
3285
+ ruleStack: r.ruleStack,
3286
+ stoppedEarly: r.stoppedEarly
3287
+ };
3288
+ }
3289
+ _tokenize(t, e, n, r) {
3290
+ this._rootId === -1 && (this._rootId = jt.getCompiledRuleId(
3291
+ this._grammar.repository.$self,
3292
+ this,
3293
+ this._grammar.repository
3294
+ ), this.getInjections());
3295
+ let s;
3296
+ if (!e || e === Pe.NULL) {
3297
+ s = !0;
3298
+ const u = this._basicScopeAttributesProvider.getDefaultAttributes(), h = this.themeProvider.getDefaults(), p = oe.set(
3299
+ 0,
3300
+ u.languageId,
3301
+ u.tokenType,
3302
+ null,
3303
+ h.fontStyle,
3304
+ h.foregroundId,
3305
+ h.backgroundId
3306
+ ), _ = this.getRule(this._rootId).getName(
3307
+ null,
3308
+ null
3309
+ );
3310
+ let f;
3311
+ _ ? f = K.createRootAndLookUpScopeName(
3312
+ _,
3313
+ p,
3314
+ this
3315
+ ) : f = K.createRoot(
3316
+ "unknown",
3317
+ p
3318
+ ), e = new Pe(
3319
+ null,
3320
+ this._rootId,
3321
+ -1,
3322
+ -1,
3323
+ !1,
3324
+ null,
3325
+ f,
3326
+ f
3327
+ );
3328
+ } else
3329
+ s = !1, e.reset();
3330
+ t = t + `
3331
+ `;
3332
+ const i = this.createOnigString(t), l = i.content.length, a = new br(
3333
+ n,
3334
+ t,
3335
+ this._tokenTypeMatchers,
3336
+ this.balancedBracketSelectors
3337
+ ), o = Ft(
3338
+ this,
3339
+ i,
3340
+ s,
3341
+ 0,
3342
+ e,
3343
+ a,
3344
+ !0,
3345
+ r
3346
+ );
3347
+ return Ot(i), {
3348
+ lineLength: l,
3349
+ lineTokens: a,
3350
+ ruleStack: o.stack,
3351
+ stoppedEarly: o.stoppedEarly
3352
+ };
3353
+ }
3354
+ };
3355
+ function st(t, e) {
3356
+ return t = Gn(t), t.repository = t.repository || {}, t.repository.$self = {
3357
+ $vscodeTextmateLocation: t.$vscodeTextmateLocation,
3358
+ patterns: t.patterns,
3359
+ name: t.scopeName
3360
+ }, t.repository.$base = e || t.repository.$self, t;
3361
+ }
3362
+ var K = class O {
3363
+ /**
3364
+ * Invariant:
3365
+ * ```
3366
+ * if (parent && !scopePath.extends(parent.scopePath)) {
3367
+ * throw new Error();
3368
+ * }
3369
+ * ```
3370
+ */
3371
+ constructor(e, n, r) {
3372
+ this.parent = e, this.scopePath = n, this.tokenAttributes = r;
3373
+ }
3374
+ static fromExtension(e, n) {
3375
+ let r = e, s = e?.scopePath ?? null;
3376
+ for (const i of n)
3377
+ s = ge.push(s, i.scopeNames), r = new O(r, s, i.encodedTokenAttributes);
3378
+ return r;
3379
+ }
3380
+ static createRoot(e, n) {
3381
+ return new O(null, new ge(null, e), n);
3382
+ }
3383
+ static createRootAndLookUpScopeName(e, n, r) {
3384
+ const s = r.getMetadataForScope(e), i = new ge(null, e), l = r.themeProvider.themeMatch(i), a = O.mergeAttributes(
3385
+ n,
3386
+ s,
3387
+ l
3388
+ );
3389
+ return new O(null, i, a);
3390
+ }
3391
+ get scopeName() {
3392
+ return this.scopePath.scopeName;
3393
+ }
3394
+ toString() {
3395
+ return this.getScopeNames().join(" ");
3396
+ }
3397
+ equals(e) {
3398
+ return O.equals(this, e);
3399
+ }
3400
+ static equals(e, n) {
3401
+ do {
3402
+ if (e === n || !e && !n)
3403
+ return !0;
3404
+ if (!e || !n || e.scopeName !== n.scopeName || e.tokenAttributes !== n.tokenAttributes)
3405
+ return !1;
3406
+ e = e.parent, n = n.parent;
3407
+ } while (!0);
3408
+ }
3409
+ static mergeAttributes(e, n, r) {
3410
+ let s = -1, i = 0, l = 0;
3411
+ return r !== null && (s = r.fontStyle, i = r.foregroundId, l = r.backgroundId), oe.set(
3412
+ e,
3413
+ n.languageId,
3414
+ n.tokenType,
3415
+ null,
3416
+ s,
3417
+ i,
3418
+ l
3419
+ );
3420
+ }
3421
+ pushAttributed(e, n) {
3422
+ if (e === null)
3423
+ return this;
3424
+ if (e.indexOf(" ") === -1)
3425
+ return O._pushAttributed(this, e, n);
3426
+ const r = e.split(/ /g);
3427
+ let s = this;
3428
+ for (const i of r)
3429
+ s = O._pushAttributed(s, i, n);
3430
+ return s;
3431
+ }
3432
+ static _pushAttributed(e, n, r) {
3433
+ const s = r.getMetadataForScope(n), i = e.scopePath.push(n), l = r.themeProvider.themeMatch(i), a = O.mergeAttributes(
3434
+ e.tokenAttributes,
3435
+ s,
3436
+ l
3437
+ );
3438
+ return new O(e, i, a);
3439
+ }
3440
+ getScopeNames() {
3441
+ return this.scopePath.getSegments();
3442
+ }
3443
+ getExtensionIfDefined(e) {
3444
+ const n = [];
3445
+ let r = this;
3446
+ for (; r && r !== e; )
3447
+ n.push({
3448
+ encodedTokenAttributes: r.tokenAttributes,
3449
+ scopeNames: r.scopePath.getExtensionIfDefined(r.parent?.scopePath ?? null)
3450
+ }), r = r.parent;
3451
+ return r === e ? n.reverse() : void 0;
3452
+ }
3453
+ }, Pe = class D {
3454
+ /**
3455
+ * Invariant:
3456
+ * ```
3457
+ * if (contentNameScopesList !== nameScopesList && contentNameScopesList?.parent !== nameScopesList) {
3458
+ * throw new Error();
3459
+ * }
3460
+ * if (this.parent && !nameScopesList.extends(this.parent.contentNameScopesList)) {
3461
+ * throw new Error();
3462
+ * }
3463
+ * ```
3464
+ */
3465
+ constructor(e, n, r, s, i, l, a, o) {
3466
+ this.parent = e, this.ruleId = n, this.beginRuleCapturedEOL = i, this.endRule = l, this.nameScopesList = a, this.contentNameScopesList = o, this.depth = this.parent ? this.parent.depth + 1 : 1, this._enterPos = r, this._anchorPos = s;
3467
+ }
3468
+ _stackElementBrand = void 0;
3469
+ // TODO remove me
3470
+ static NULL = new D(
3471
+ null,
3472
+ 0,
3473
+ 0,
3474
+ 0,
3475
+ !1,
3476
+ null,
3477
+ null,
3478
+ null
3479
+ );
3480
+ /**
3481
+ * The position on the current line where this state was pushed.
3482
+ * This is relevant only while tokenizing a line, to detect endless loops.
3483
+ * Its value is meaningless across lines.
3484
+ */
3485
+ _enterPos;
3486
+ /**
3487
+ * The captured anchor position when this stack element was pushed.
3488
+ * This is relevant only while tokenizing a line, to restore the anchor position when popping.
3489
+ * Its value is meaningless across lines.
3490
+ */
3491
+ _anchorPos;
3492
+ /**
3493
+ * The depth of the stack.
3494
+ */
3495
+ depth;
3496
+ equals(e) {
3497
+ return e === null ? !1 : D._equals(this, e);
3498
+ }
3499
+ static _equals(e, n) {
3500
+ return e === n ? !0 : this._structuralEquals(e, n) ? K.equals(e.contentNameScopesList, n.contentNameScopesList) : !1;
3501
+ }
3502
+ /**
3503
+ * A structural equals check. Does not take into account `scopes`.
3504
+ */
3505
+ static _structuralEquals(e, n) {
3506
+ do {
3507
+ if (e === n || !e && !n)
3508
+ return !0;
3509
+ if (!e || !n || e.depth !== n.depth || e.ruleId !== n.ruleId || e.endRule !== n.endRule)
3510
+ return !1;
3511
+ e = e.parent, n = n.parent;
3512
+ } while (!0);
3513
+ }
3514
+ clone() {
3515
+ return this;
3516
+ }
3517
+ static _reset(e) {
3518
+ for (; e; )
3519
+ e._enterPos = -1, e._anchorPos = -1, e = e.parent;
3520
+ }
3521
+ reset() {
3522
+ D._reset(this);
3523
+ }
3524
+ pop() {
3525
+ return this.parent;
3526
+ }
3527
+ safePop() {
3528
+ return this.parent ? this.parent : this;
3529
+ }
3530
+ push(e, n, r, s, i, l, a) {
3531
+ return new D(
3532
+ this,
3533
+ e,
3534
+ n,
3535
+ r,
3536
+ s,
3537
+ i,
3538
+ l,
3539
+ a
3540
+ );
3541
+ }
3542
+ getEnterPos() {
3543
+ return this._enterPos;
3544
+ }
3545
+ getAnchorPos() {
3546
+ return this._anchorPos;
3547
+ }
3548
+ getRule(e) {
3549
+ return e.getRule(this.ruleId);
3550
+ }
3551
+ toString() {
3552
+ const e = [];
3553
+ return this._writeString(e, 0), "[" + e.join(",") + "]";
3554
+ }
3555
+ _writeString(e, n) {
3556
+ return this.parent && (n = this.parent._writeString(e, n)), e[n++] = `(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`, n;
3557
+ }
3558
+ withContentNameScopesList(e) {
3559
+ return this.contentNameScopesList === e ? this : this.parent.push(
3560
+ this.ruleId,
3561
+ this._enterPos,
3562
+ this._anchorPos,
3563
+ this.beginRuleCapturedEOL,
3564
+ this.endRule,
3565
+ this.nameScopesList,
3566
+ e
3567
+ );
3568
+ }
3569
+ withEndRule(e) {
3570
+ return this.endRule === e ? this : new D(
3571
+ this.parent,
3572
+ this.ruleId,
3573
+ this._enterPos,
3574
+ this._anchorPos,
3575
+ this.beginRuleCapturedEOL,
3576
+ e,
3577
+ this.nameScopesList,
3578
+ this.contentNameScopesList
3579
+ );
3580
+ }
3581
+ // Used to warn of endless loops
3582
+ hasSameRuleAs(e) {
3583
+ let n = this;
3584
+ for (; n && n._enterPos === e._enterPos; ) {
3585
+ if (n.ruleId === e.ruleId)
3586
+ return !0;
3587
+ n = n.parent;
3588
+ }
3589
+ return !1;
3590
+ }
3591
+ toStateStackFrame() {
3592
+ return {
3593
+ ruleId: this.ruleId,
3594
+ beginRuleCapturedEOL: this.beginRuleCapturedEOL,
3595
+ endRule: this.endRule,
3596
+ nameScopesList: this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList ?? null) ?? [],
3597
+ contentNameScopesList: this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList) ?? []
3598
+ };
3599
+ }
3600
+ static pushFrame(e, n) {
3601
+ const r = K.fromExtension(e?.nameScopesList ?? null, n.nameScopesList);
3602
+ return new D(
3603
+ e,
3604
+ n.ruleId,
3605
+ n.enterPos ?? -1,
3606
+ n.anchorPos ?? -1,
3607
+ n.beginRuleCapturedEOL,
3608
+ n.endRule,
3609
+ r,
3610
+ K.fromExtension(r, n.contentNameScopesList)
3611
+ );
3612
+ }
3613
+ }, Sr = class {
3614
+ balancedBracketScopes;
3615
+ unbalancedBracketScopes;
3616
+ allowAny = !1;
3617
+ constructor(t, e) {
3618
+ this.balancedBracketScopes = t.flatMap(
3619
+ (n) => n === "*" ? (this.allowAny = !0, []) : ae(n, he).map((r) => r.matcher)
3620
+ ), this.unbalancedBracketScopes = e.flatMap(
3621
+ (n) => ae(n, he).map((r) => r.matcher)
3622
+ );
3623
+ }
3624
+ get matchesAlways() {
3625
+ return this.allowAny && this.unbalancedBracketScopes.length === 0;
3626
+ }
3627
+ get matchesNever() {
3628
+ return this.balancedBracketScopes.length === 0 && !this.allowAny;
3629
+ }
3630
+ match(t) {
3631
+ for (const e of this.unbalancedBracketScopes)
3632
+ if (e(t))
3633
+ return !1;
3634
+ for (const e of this.balancedBracketScopes)
3635
+ if (e(t))
3636
+ return !0;
3637
+ return this.allowAny;
3638
+ }
3639
+ }, br = class {
3640
+ constructor(t, e, n, r) {
3641
+ this.balancedBracketSelectors = r, this._emitBinaryTokens = t, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
3642
+ }
3643
+ _emitBinaryTokens;
3644
+ /**
3645
+ * defined only if `false`.
3646
+ */
3647
+ _lineText;
3648
+ /**
3649
+ * used only if `_emitBinaryTokens` is false.
3650
+ */
3651
+ _tokens;
3652
+ /**
3653
+ * used only if `_emitBinaryTokens` is true.
3654
+ */
3655
+ _binaryTokens;
3656
+ _lastTokenEndIndex;
3657
+ _tokenTypeOverrides;
3658
+ produce(t, e) {
3659
+ this.produceFromScopes(t.contentNameScopesList, e);
3660
+ }
3661
+ produceFromScopes(t, e) {
3662
+ if (this._lastTokenEndIndex >= e)
3663
+ return;
3664
+ if (this._emitBinaryTokens) {
3665
+ let r = t?.tokenAttributes ?? 0, s = !1;
3666
+ if (this.balancedBracketSelectors?.matchesAlways && (s = !0), this._tokenTypeOverrides.length > 0 || this.balancedBracketSelectors && !this.balancedBracketSelectors.matchesAlways && !this.balancedBracketSelectors.matchesNever) {
3667
+ const i = t?.getScopeNames() ?? [];
3668
+ for (const l of this._tokenTypeOverrides)
3669
+ l.matcher(i) && (r = oe.set(
3670
+ r,
3671
+ 0,
3672
+ l.type,
3673
+ null,
3674
+ -1,
3675
+ 0,
3676
+ 0
3677
+ ));
3678
+ this.balancedBracketSelectors && (s = this.balancedBracketSelectors.match(i));
3679
+ }
3680
+ if (s && (r = oe.set(
3681
+ r,
3682
+ 0,
3683
+ 8,
3684
+ s,
3685
+ -1,
3686
+ 0,
3687
+ 0
3688
+ )), this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === r) {
3689
+ this._lastTokenEndIndex = e;
3690
+ return;
3691
+ }
3692
+ this._binaryTokens.push(this._lastTokenEndIndex), this._binaryTokens.push(r), this._lastTokenEndIndex = e;
3693
+ return;
3694
+ }
3695
+ const n = t?.getScopeNames() ?? [];
3696
+ this._tokens.push({
3697
+ startIndex: this._lastTokenEndIndex,
3698
+ endIndex: e,
3699
+ // value: lineText.substring(lastTokenEndIndex, endIndex),
3700
+ scopes: n
3701
+ }), this._lastTokenEndIndex = e;
3702
+ }
3703
+ getResult(t, e) {
3704
+ return this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === e - 1 && this._tokens.pop(), this._tokens.length === 0 && (this._lastTokenEndIndex = -1, this.produce(t, e), this._tokens[this._tokens.length - 1].startIndex = 0), this._tokens;
3705
+ }
3706
+ getBinaryResult(t, e) {
3707
+ this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === e - 1 && (this._binaryTokens.pop(), this._binaryTokens.pop()), this._binaryTokens.length === 0 && (this._lastTokenEndIndex = -1, this.produce(t, e), this._binaryTokens[this._binaryTokens.length - 2] = 0);
3708
+ const n = new Uint32Array(this._binaryTokens.length);
3709
+ for (let r = 0, s = this._binaryTokens.length; r < s; r++)
3710
+ n[r] = this._binaryTokens[r];
3711
+ return n;
3712
+ }
3713
+ }, vr = class {
3714
+ constructor(t, e) {
3715
+ this._onigLib = e, this._theme = t;
3716
+ }
3717
+ _grammars = /* @__PURE__ */ new Map();
3718
+ _rawGrammars = /* @__PURE__ */ new Map();
3719
+ _injectionGrammars = /* @__PURE__ */ new Map();
3720
+ _theme;
3721
+ dispose() {
3722
+ for (const t of this._grammars.values())
3723
+ t.dispose();
3724
+ }
3725
+ setTheme(t) {
3726
+ this._theme = t;
3727
+ }
3728
+ getColorMap() {
3729
+ return this._theme.getColorMap();
3730
+ }
3731
+ /**
3732
+ * Add `grammar` to registry and return a list of referenced scope names
3733
+ */
3734
+ addGrammar(t, e) {
3735
+ this._rawGrammars.set(t.scopeName, t), e && this._injectionGrammars.set(t.scopeName, e);
3736
+ }
3737
+ /**
3738
+ * Lookup a raw grammar.
3739
+ */
3740
+ lookup(t) {
3741
+ return this._rawGrammars.get(t);
3742
+ }
3743
+ /**
3744
+ * Returns the injections for the given grammar
3745
+ */
3746
+ injections(t) {
3747
+ return this._injectionGrammars.get(t);
3748
+ }
3749
+ /**
3750
+ * Get the default theme settings
3751
+ */
3752
+ getDefaults() {
3753
+ return this._theme.getDefaults();
3754
+ }
3755
+ /**
3756
+ * Match a scope in the theme.
3757
+ */
3758
+ themeMatch(t) {
3759
+ return this._theme.match(t);
3760
+ }
3761
+ /**
3762
+ * Lookup a grammar.
3763
+ */
3764
+ grammarForScopeName(t, e, n, r, s) {
3765
+ if (!this._grammars.has(t)) {
3766
+ let i = this._rawGrammars.get(t);
3767
+ if (!i)
3768
+ return null;
3769
+ this._grammars.set(t, yr(
3770
+ t,
3771
+ i,
3772
+ e,
3773
+ n,
3774
+ r,
3775
+ s,
3776
+ this,
3777
+ this._onigLib
3778
+ ));
3779
+ }
3780
+ return this._grammars.get(t);
3781
+ }
3782
+ }, Is = class {
3783
+ _options;
3784
+ _syncRegistry;
3785
+ _ensureGrammarCache;
3786
+ constructor(e) {
3787
+ this._options = e, this._syncRegistry = new vr(
3788
+ we.createFromRawTheme(e.theme, e.colorMap),
3789
+ e.onigLib
3790
+ ), this._ensureGrammarCache = /* @__PURE__ */ new Map();
3791
+ }
3792
+ dispose() {
3793
+ this._syncRegistry.dispose();
3794
+ }
3795
+ /**
3796
+ * Change the theme. Once called, no previous `ruleStack` should be used anymore.
3797
+ */
3798
+ setTheme(e, n) {
3799
+ this._syncRegistry.setTheme(we.createFromRawTheme(e, n));
3800
+ }
3801
+ /**
3802
+ * Returns a lookup array for color ids.
3803
+ */
3804
+ getColorMap() {
3805
+ return this._syncRegistry.getColorMap();
3806
+ }
3807
+ /**
3808
+ * Load the grammar for `scopeName` and all referenced included grammars asynchronously.
3809
+ * Please do not use language id 0.
3810
+ */
3811
+ loadGrammarWithEmbeddedLanguages(e, n, r) {
3812
+ return this.loadGrammarWithConfiguration(e, n, { embeddedLanguages: r });
3813
+ }
3814
+ /**
3815
+ * Load the grammar for `scopeName` and all referenced included grammars asynchronously.
3816
+ * Please do not use language id 0.
3817
+ */
3818
+ loadGrammarWithConfiguration(e, n, r) {
3819
+ return this._loadGrammar(
3820
+ e,
3821
+ n,
3822
+ r.embeddedLanguages,
3823
+ r.tokenTypes,
3824
+ new Sr(
3825
+ r.balancedBracketSelectors || [],
3826
+ r.unbalancedBracketSelectors || []
3827
+ )
3828
+ );
3829
+ }
3830
+ /**
3831
+ * Load the grammar for `scopeName` and all referenced included grammars asynchronously.
3832
+ */
3833
+ loadGrammar(e) {
3834
+ return this._loadGrammar(e, 0, null, null, null);
3835
+ }
3836
+ _loadGrammar(e, n, r, s, i) {
3837
+ const l = new Qn(this._syncRegistry, e);
3838
+ for (; l.Q.length > 0; )
3839
+ l.Q.map((a) => this._loadSingleGrammar(a.scopeName)), l.processQueue();
3840
+ return this._grammarForScopeName(
3841
+ e,
3842
+ n,
3843
+ r,
3844
+ s,
3845
+ i
3846
+ );
3847
+ }
3848
+ _loadSingleGrammar(e) {
3849
+ this._ensureGrammarCache.has(e) || (this._doLoadSingleGrammar(e), this._ensureGrammarCache.set(e, !0));
3850
+ }
3851
+ _doLoadSingleGrammar(e) {
3852
+ const n = this._options.loadGrammar(e);
3853
+ if (n) {
3854
+ const r = typeof this._options.getInjections == "function" ? this._options.getInjections(e) : void 0;
3855
+ this._syncRegistry.addGrammar(n, r);
3856
+ }
3857
+ }
3858
+ /**
3859
+ * Adds a rawGrammar.
3860
+ */
3861
+ addGrammar(e, n = [], r = 0, s = null) {
3862
+ return this._syncRegistry.addGrammar(e, n), this._grammarForScopeName(e.scopeName, r, s);
3863
+ }
3864
+ /**
3865
+ * Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `addGrammar`.
3866
+ */
3867
+ _grammarForScopeName(e, n = 0, r = null, s = null, i = null) {
3868
+ return this._syncRegistry.grammarForScopeName(
3869
+ e,
3870
+ n,
3871
+ r,
3872
+ s,
3873
+ i
3874
+ );
3875
+ }
3876
+ }, Ts = Pe.NULL;
3877
+ const Rr = [
3878
+ "area",
3879
+ "base",
3880
+ "basefont",
3881
+ "bgsound",
3882
+ "br",
3883
+ "col",
3884
+ "command",
3885
+ "embed",
3886
+ "frame",
3887
+ "hr",
3888
+ "image",
3889
+ "img",
3890
+ "input",
3891
+ "keygen",
3892
+ "link",
3893
+ "meta",
3894
+ "param",
3895
+ "source",
3896
+ "track",
3897
+ "wbr"
3898
+ ], it = {}.hasOwnProperty;
3899
+ function wr(t, e) {
3900
+ const n = e || {};
3901
+ function r(s, ...i) {
3902
+ let l = r.invalid;
3903
+ const a = r.handlers;
3904
+ if (s && it.call(s, t)) {
3905
+ const o = String(s[t]);
3906
+ l = it.call(a, o) ? a[o] : r.unknown;
3907
+ }
3908
+ if (l)
3909
+ return l.call(this, s, ...i);
3910
+ }
3911
+ return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
3912
+ }
3913
+ const xr = /["&'<>`]/g, kr = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, Er = (
3914
+ // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
3915
+ /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
3916
+ ), Ar = /[|\\{}()[\]^$+*?.]/g, lt = /* @__PURE__ */ new WeakMap();
3917
+ function Nr(t, e) {
3918
+ if (t = t.replace(
3919
+ e.subset ? Pr(e.subset) : xr,
3920
+ r
3921
+ ), e.subset || e.escapeOnly)
3922
+ return t;
3923
+ return t.replace(kr, n).replace(Er, r);
3924
+ function n(s, i, l) {
3925
+ return e.format(
3926
+ (s.charCodeAt(0) - 55296) * 1024 + s.charCodeAt(1) - 56320 + 65536,
3927
+ l.charCodeAt(i + 2),
3928
+ e
3929
+ );
3930
+ }
3931
+ function r(s, i, l) {
3932
+ return e.format(
3933
+ s.charCodeAt(0),
3934
+ l.charCodeAt(i + 1),
3935
+ e
3936
+ );
3937
+ }
3938
+ }
3939
+ function Pr(t) {
3940
+ let e = lt.get(t);
3941
+ return e || (e = Ir(t), lt.set(t, e)), e;
3942
+ }
3943
+ function Ir(t) {
3944
+ const e = [];
3945
+ let n = -1;
3946
+ for (; ++n < t.length; )
3947
+ e.push(t[n].replace(Ar, "\\$&"));
3948
+ return new RegExp("(?:" + e.join("|") + ")", "g");
3949
+ }
3950
+ const Lr = /[\dA-Fa-f]/;
3951
+ function Tr(t, e, n) {
3952
+ const r = "&#x" + t.toString(16).toUpperCase();
3953
+ return n && e && !Lr.test(String.fromCharCode(e)) ? r : r + ";";
3954
+ }
3955
+ const Mr = /\d/;
3956
+ function Or(t, e, n) {
3957
+ const r = "&#" + String(t);
3958
+ return n && e && !Mr.test(String.fromCharCode(e)) ? r : r + ";";
3959
+ }
3960
+ const Dr = [
3961
+ "AElig",
3962
+ "AMP",
3963
+ "Aacute",
3964
+ "Acirc",
3965
+ "Agrave",
3966
+ "Aring",
3967
+ "Atilde",
3968
+ "Auml",
3969
+ "COPY",
3970
+ "Ccedil",
3971
+ "ETH",
3972
+ "Eacute",
3973
+ "Ecirc",
3974
+ "Egrave",
3975
+ "Euml",
3976
+ "GT",
3977
+ "Iacute",
3978
+ "Icirc",
3979
+ "Igrave",
3980
+ "Iuml",
3981
+ "LT",
3982
+ "Ntilde",
3983
+ "Oacute",
3984
+ "Ocirc",
3985
+ "Ograve",
3986
+ "Oslash",
3987
+ "Otilde",
3988
+ "Ouml",
3989
+ "QUOT",
3990
+ "REG",
3991
+ "THORN",
3992
+ "Uacute",
3993
+ "Ucirc",
3994
+ "Ugrave",
3995
+ "Uuml",
3996
+ "Yacute",
3997
+ "aacute",
3998
+ "acirc",
3999
+ "acute",
4000
+ "aelig",
4001
+ "agrave",
4002
+ "amp",
4003
+ "aring",
4004
+ "atilde",
4005
+ "auml",
4006
+ "brvbar",
4007
+ "ccedil",
4008
+ "cedil",
4009
+ "cent",
4010
+ "copy",
4011
+ "curren",
4012
+ "deg",
4013
+ "divide",
4014
+ "eacute",
4015
+ "ecirc",
4016
+ "egrave",
4017
+ "eth",
4018
+ "euml",
4019
+ "frac12",
4020
+ "frac14",
4021
+ "frac34",
4022
+ "gt",
4023
+ "iacute",
4024
+ "icirc",
4025
+ "iexcl",
4026
+ "igrave",
4027
+ "iquest",
4028
+ "iuml",
4029
+ "laquo",
4030
+ "lt",
4031
+ "macr",
4032
+ "micro",
4033
+ "middot",
4034
+ "nbsp",
4035
+ "not",
4036
+ "ntilde",
4037
+ "oacute",
4038
+ "ocirc",
4039
+ "ograve",
4040
+ "ordf",
4041
+ "ordm",
4042
+ "oslash",
4043
+ "otilde",
4044
+ "ouml",
4045
+ "para",
4046
+ "plusmn",
4047
+ "pound",
4048
+ "quot",
4049
+ "raquo",
4050
+ "reg",
4051
+ "sect",
4052
+ "shy",
4053
+ "sup1",
4054
+ "sup2",
4055
+ "sup3",
4056
+ "szlig",
4057
+ "thorn",
4058
+ "times",
4059
+ "uacute",
4060
+ "ucirc",
4061
+ "ugrave",
4062
+ "uml",
4063
+ "uuml",
4064
+ "yacute",
4065
+ "yen",
4066
+ "yuml"
4067
+ ], _e = {
4068
+ nbsp: " ",
4069
+ iexcl: "¡",
4070
+ cent: "¢",
4071
+ pound: "£",
4072
+ curren: "¤",
4073
+ yen: "¥",
4074
+ brvbar: "¦",
4075
+ sect: "§",
4076
+ uml: "¨",
4077
+ copy: "©",
4078
+ ordf: "ª",
4079
+ laquo: "«",
4080
+ not: "¬",
4081
+ shy: "­",
4082
+ reg: "®",
4083
+ macr: "¯",
4084
+ deg: "°",
4085
+ plusmn: "±",
4086
+ sup2: "²",
4087
+ sup3: "³",
4088
+ acute: "´",
4089
+ micro: "µ",
4090
+ para: "¶",
4091
+ middot: "·",
4092
+ cedil: "¸",
4093
+ sup1: "¹",
4094
+ ordm: "º",
4095
+ raquo: "»",
4096
+ frac14: "¼",
4097
+ frac12: "½",
4098
+ frac34: "¾",
4099
+ iquest: "¿",
4100
+ Agrave: "À",
4101
+ Aacute: "Á",
4102
+ Acirc: "Â",
4103
+ Atilde: "Ã",
4104
+ Auml: "Ä",
4105
+ Aring: "Å",
4106
+ AElig: "Æ",
4107
+ Ccedil: "Ç",
4108
+ Egrave: "È",
4109
+ Eacute: "É",
4110
+ Ecirc: "Ê",
4111
+ Euml: "Ë",
4112
+ Igrave: "Ì",
4113
+ Iacute: "Í",
4114
+ Icirc: "Î",
4115
+ Iuml: "Ï",
4116
+ ETH: "Ð",
4117
+ Ntilde: "Ñ",
4118
+ Ograve: "Ò",
4119
+ Oacute: "Ó",
4120
+ Ocirc: "Ô",
4121
+ Otilde: "Õ",
4122
+ Ouml: "Ö",
4123
+ times: "×",
4124
+ Oslash: "Ø",
4125
+ Ugrave: "Ù",
4126
+ Uacute: "Ú",
4127
+ Ucirc: "Û",
4128
+ Uuml: "Ü",
4129
+ Yacute: "Ý",
4130
+ THORN: "Þ",
4131
+ szlig: "ß",
4132
+ agrave: "à",
4133
+ aacute: "á",
4134
+ acirc: "â",
4135
+ atilde: "ã",
4136
+ auml: "ä",
4137
+ aring: "å",
4138
+ aelig: "æ",
4139
+ ccedil: "ç",
4140
+ egrave: "è",
4141
+ eacute: "é",
4142
+ ecirc: "ê",
4143
+ euml: "ë",
4144
+ igrave: "ì",
4145
+ iacute: "í",
4146
+ icirc: "î",
4147
+ iuml: "ï",
4148
+ eth: "ð",
4149
+ ntilde: "ñ",
4150
+ ograve: "ò",
4151
+ oacute: "ó",
4152
+ ocirc: "ô",
4153
+ otilde: "õ",
4154
+ ouml: "ö",
4155
+ divide: "÷",
4156
+ oslash: "ø",
4157
+ ugrave: "ù",
4158
+ uacute: "ú",
4159
+ ucirc: "û",
4160
+ uuml: "ü",
4161
+ yacute: "ý",
4162
+ thorn: "þ",
4163
+ yuml: "ÿ",
4164
+ fnof: "ƒ",
4165
+ Alpha: "Α",
4166
+ Beta: "Β",
4167
+ Gamma: "Γ",
4168
+ Delta: "Δ",
4169
+ Epsilon: "Ε",
4170
+ Zeta: "Ζ",
4171
+ Eta: "Η",
4172
+ Theta: "Θ",
4173
+ Iota: "Ι",
4174
+ Kappa: "Κ",
4175
+ Lambda: "Λ",
4176
+ Mu: "Μ",
4177
+ Nu: "Ν",
4178
+ Xi: "Ξ",
4179
+ Omicron: "Ο",
4180
+ Pi: "Π",
4181
+ Rho: "Ρ",
4182
+ Sigma: "Σ",
4183
+ Tau: "Τ",
4184
+ Upsilon: "Υ",
4185
+ Phi: "Φ",
4186
+ Chi: "Χ",
4187
+ Psi: "Ψ",
4188
+ Omega: "Ω",
4189
+ alpha: "α",
4190
+ beta: "β",
4191
+ gamma: "γ",
4192
+ delta: "δ",
4193
+ epsilon: "ε",
4194
+ zeta: "ζ",
4195
+ eta: "η",
4196
+ theta: "θ",
4197
+ iota: "ι",
4198
+ kappa: "κ",
4199
+ lambda: "λ",
4200
+ mu: "μ",
4201
+ nu: "ν",
4202
+ xi: "ξ",
4203
+ omicron: "ο",
4204
+ pi: "π",
4205
+ rho: "ρ",
4206
+ sigmaf: "ς",
4207
+ sigma: "σ",
4208
+ tau: "τ",
4209
+ upsilon: "υ",
4210
+ phi: "φ",
4211
+ chi: "χ",
4212
+ psi: "ψ",
4213
+ omega: "ω",
4214
+ thetasym: "ϑ",
4215
+ upsih: "ϒ",
4216
+ piv: "ϖ",
4217
+ bull: "•",
4218
+ hellip: "…",
4219
+ prime: "′",
4220
+ Prime: "″",
4221
+ oline: "‾",
4222
+ frasl: "⁄",
4223
+ weierp: "℘",
4224
+ image: "ℑ",
4225
+ real: "ℜ",
4226
+ trade: "™",
4227
+ alefsym: "ℵ",
4228
+ larr: "←",
4229
+ uarr: "↑",
4230
+ rarr: "→",
4231
+ darr: "↓",
4232
+ harr: "↔",
4233
+ crarr: "↵",
4234
+ lArr: "⇐",
4235
+ uArr: "⇑",
4236
+ rArr: "⇒",
4237
+ dArr: "⇓",
4238
+ hArr: "⇔",
4239
+ forall: "∀",
4240
+ part: "∂",
4241
+ exist: "∃",
4242
+ empty: "∅",
4243
+ nabla: "∇",
4244
+ isin: "∈",
4245
+ notin: "∉",
4246
+ ni: "∋",
4247
+ prod: "∏",
4248
+ sum: "∑",
4249
+ minus: "−",
4250
+ lowast: "∗",
4251
+ radic: "√",
4252
+ prop: "∝",
4253
+ infin: "∞",
4254
+ ang: "∠",
4255
+ and: "∧",
4256
+ or: "∨",
4257
+ cap: "∩",
4258
+ cup: "∪",
4259
+ int: "∫",
4260
+ there4: "∴",
4261
+ sim: "∼",
4262
+ cong: "≅",
4263
+ asymp: "≈",
4264
+ ne: "≠",
4265
+ equiv: "≡",
4266
+ le: "≤",
4267
+ ge: "≥",
4268
+ sub: "⊂",
4269
+ sup: "⊃",
4270
+ nsub: "⊄",
4271
+ sube: "⊆",
4272
+ supe: "⊇",
4273
+ oplus: "⊕",
4274
+ otimes: "⊗",
4275
+ perp: "⊥",
4276
+ sdot: "⋅",
4277
+ lceil: "⌈",
4278
+ rceil: "⌉",
4279
+ lfloor: "⌊",
4280
+ rfloor: "⌋",
4281
+ lang: "〈",
4282
+ rang: "〉",
4283
+ loz: "◊",
4284
+ spades: "♠",
4285
+ clubs: "♣",
4286
+ hearts: "♥",
4287
+ diams: "♦",
4288
+ quot: '"',
4289
+ amp: "&",
4290
+ lt: "<",
4291
+ gt: ">",
4292
+ OElig: "Œ",
4293
+ oelig: "œ",
4294
+ Scaron: "Š",
4295
+ scaron: "š",
4296
+ Yuml: "Ÿ",
4297
+ circ: "ˆ",
4298
+ tilde: "˜",
4299
+ ensp: " ",
4300
+ emsp: " ",
4301
+ thinsp: " ",
4302
+ zwnj: "‌",
4303
+ zwj: "‍",
4304
+ lrm: "‎",
4305
+ rlm: "‏",
4306
+ ndash: "–",
4307
+ mdash: "—",
4308
+ lsquo: "‘",
4309
+ rsquo: "’",
4310
+ sbquo: "‚",
4311
+ ldquo: "“",
4312
+ rdquo: "”",
4313
+ bdquo: "„",
4314
+ dagger: "†",
4315
+ Dagger: "‡",
4316
+ permil: "‰",
4317
+ lsaquo: "‹",
4318
+ rsaquo: "›",
4319
+ euro: "€"
4320
+ }, Gr = [
4321
+ "cent",
4322
+ "copy",
4323
+ "divide",
4324
+ "gt",
4325
+ "lt",
4326
+ "not",
4327
+ "para",
4328
+ "times"
4329
+ ], Ut = {}.hasOwnProperty, Ie = {};
4330
+ let re;
4331
+ for (re in _e)
4332
+ Ut.call(_e, re) && (Ie[_e[re]] = re);
4333
+ const jr = /[^\dA-Za-z]/;
4334
+ function Br(t, e, n, r) {
4335
+ const s = String.fromCharCode(t);
4336
+ if (Ut.call(Ie, s)) {
4337
+ const i = Ie[s], l = "&" + i;
4338
+ return n && Dr.includes(i) && !Gr.includes(i) && (!r || e && e !== 61 && jr.test(String.fromCharCode(e))) ? l : l + ";";
4339
+ }
4340
+ return "";
4341
+ }
4342
+ function Fr(t, e, n) {
4343
+ let r = Tr(t, e, n.omitOptionalSemicolons), s;
4344
+ if ((n.useNamedReferences || n.useShortestReferences) && (s = Br(
4345
+ t,
4346
+ e,
4347
+ n.omitOptionalSemicolons,
4348
+ n.attribute
4349
+ )), (n.useShortestReferences || !s) && n.useShortestReferences) {
4350
+ const i = Or(t, e, n.omitOptionalSemicolons);
4351
+ i.length < r.length && (r = i);
4352
+ }
4353
+ return s && (!n.useShortestReferences || s.length < r.length) ? s : r;
4354
+ }
4355
+ function U(t, e) {
4356
+ return Nr(t, Object.assign({ format: Fr }, e));
4357
+ }
4358
+ const $r = /^>|^->|<!--|-->|--!>|<!-$/g, Ur = [">"], zr = ["<", ">"];
4359
+ function qr(t, e, n, r) {
4360
+ return r.settings.bogusComments ? "<?" + U(
4361
+ t.value,
4362
+ Object.assign({}, r.settings.characterReferences, {
4363
+ subset: Ur
4364
+ })
4365
+ ) + ">" : "<!--" + t.value.replace($r, s) + "-->";
4366
+ function s(i) {
4367
+ return U(
4368
+ i,
4369
+ Object.assign({}, r.settings.characterReferences, {
4370
+ subset: zr
4371
+ })
4372
+ );
4373
+ }
4374
+ }
4375
+ function Wr(t, e, n, r) {
4376
+ return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
4377
+ }
4378
+ function ot(t, e) {
4379
+ const n = String(t);
4380
+ if (typeof e != "string")
4381
+ throw new TypeError("Expected character");
4382
+ let r = 0, s = n.indexOf(e);
4383
+ for (; s !== -1; )
4384
+ r++, s = n.indexOf(e, s + e.length);
4385
+ return r;
4386
+ }
4387
+ const w = qt(1), zt = qt(-1), Hr = [];
4388
+ function qt(t) {
4389
+ return e;
4390
+ function e(n, r, s) {
4391
+ const i = n ? n.children : Hr;
4392
+ let l = (r || 0) + t, a = i[l];
4393
+ if (!s)
4394
+ for (; a && pe(a); )
4395
+ l += t, a = i[l];
4396
+ return a;
4397
+ }
4398
+ }
4399
+ const Xr = {}.hasOwnProperty;
4400
+ function Wt(t) {
4401
+ return e;
4402
+ function e(n, r, s) {
4403
+ return Xr.call(t, n.tagName) && t[n.tagName](n, r, s);
4404
+ }
4405
+ }
4406
+ const Ge = Wt({
4407
+ body: Vr,
4408
+ caption: Ce,
4409
+ colgroup: Ce,
4410
+ dd: Zr,
4411
+ dt: Qr,
4412
+ head: Ce,
4413
+ html: Kr,
4414
+ li: Jr,
4415
+ optgroup: es,
4416
+ option: ts,
4417
+ p: Yr,
4418
+ rp: at,
4419
+ rt: at,
4420
+ tbody: rs,
4421
+ td: ut,
4422
+ tfoot: ss,
4423
+ th: ut,
4424
+ thead: ns,
4425
+ tr: is
4426
+ });
4427
+ function Ce(t, e, n) {
4428
+ const r = w(n, e, !0);
4429
+ return !r || r.type !== "comment" && !(r.type === "text" && pe(r.value.charAt(0)));
4430
+ }
4431
+ function Kr(t, e, n) {
4432
+ const r = w(n, e);
4433
+ return !r || r.type !== "comment";
4434
+ }
4435
+ function Vr(t, e, n) {
4436
+ const r = w(n, e);
4437
+ return !r || r.type !== "comment";
4438
+ }
4439
+ function Yr(t, e, n) {
4440
+ const r = w(n, e);
4441
+ return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || // Confusing parent.
4442
+ !(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
4443
+ }
4444
+ function Jr(t, e, n) {
4445
+ const r = w(n, e);
4446
+ return !r || r.type === "element" && r.tagName === "li";
4447
+ }
4448
+ function Qr(t, e, n) {
4449
+ const r = w(n, e);
4450
+ return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
4451
+ }
4452
+ function Zr(t, e, n) {
4453
+ const r = w(n, e);
4454
+ return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
4455
+ }
4456
+ function at(t, e, n) {
4457
+ const r = w(n, e);
4458
+ return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
4459
+ }
4460
+ function es(t, e, n) {
4461
+ const r = w(n, e);
4462
+ return !r || r.type === "element" && r.tagName === "optgroup";
4463
+ }
4464
+ function ts(t, e, n) {
4465
+ const r = w(n, e);
4466
+ return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
4467
+ }
4468
+ function ns(t, e, n) {
4469
+ const r = w(n, e);
4470
+ return !!(r && r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot"));
4471
+ }
4472
+ function rs(t, e, n) {
4473
+ const r = w(n, e);
4474
+ return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
4475
+ }
4476
+ function ss(t, e, n) {
4477
+ return !w(n, e);
4478
+ }
4479
+ function is(t, e, n) {
4480
+ const r = w(n, e);
4481
+ return !r || r.type === "element" && r.tagName === "tr";
4482
+ }
4483
+ function ut(t, e, n) {
4484
+ const r = w(n, e);
4485
+ return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
4486
+ }
4487
+ const ls = Wt({
4488
+ body: us,
4489
+ colgroup: cs,
4490
+ head: as,
4491
+ html: os,
4492
+ tbody: hs
4493
+ });
4494
+ function os(t) {
4495
+ const e = w(t, -1);
4496
+ return !e || e.type !== "comment";
4497
+ }
4498
+ function as(t) {
4499
+ const e = /* @__PURE__ */ new Set();
4500
+ for (const r of t.children)
4501
+ if (r.type === "element" && (r.tagName === "base" || r.tagName === "title")) {
4502
+ if (e.has(r.tagName)) return !1;
4503
+ e.add(r.tagName);
4504
+ }
4505
+ const n = t.children[0];
4506
+ return !n || n.type === "element";
4507
+ }
4508
+ function us(t) {
4509
+ const e = w(t, -1, !0);
4510
+ return !e || e.type !== "comment" && !(e.type === "text" && pe(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
4511
+ }
4512
+ function cs(t, e, n) {
4513
+ const r = zt(n, e), s = w(t, -1, !0);
4514
+ return n && r && r.type === "element" && r.tagName === "colgroup" && Ge(r, n.children.indexOf(r), n) ? !1 : !!(s && s.type === "element" && s.tagName === "col");
4515
+ }
4516
+ function hs(t, e, n) {
4517
+ const r = zt(n, e), s = w(t, -1);
4518
+ return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && Ge(r, n.children.indexOf(r), n) ? !1 : !!(s && s.type === "element" && s.tagName === "tr");
4519
+ }
4520
+ const se = {
4521
+ // See: <https://html.spec.whatwg.org/#attribute-name-state>.
4522
+ name: [
4523
+ [`
4524
+ \f\r &/=>`.split(""), `
4525
+ \f\r "&'/=>\``.split("")],
4526
+ [`\0
4527
+ \f\r "&'/<=>`.split(""), `\0
4528
+ \f\r "&'/<=>\``.split("")]
4529
+ ],
4530
+ // See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.
4531
+ unquoted: [
4532
+ [`
4533
+ \f\r &>`.split(""), `\0
4534
+ \f\r "&'<=>\``.split("")],
4535
+ [`\0
4536
+ \f\r "&'<=>\``.split(""), `\0
4537
+ \f\r "&'<=>\``.split("")]
4538
+ ],
4539
+ // See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.
4540
+ single: [
4541
+ ["&'".split(""), "\"&'`".split("")],
4542
+ ["\0&'".split(""), "\0\"&'`".split("")]
4543
+ ],
4544
+ // See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.
4545
+ double: [
4546
+ ['"&'.split(""), "\"&'`".split("")],
4547
+ ['\0"&'.split(""), "\0\"&'`".split("")]
4548
+ ]
4549
+ };
4550
+ function ps(t, e, n, r) {
4551
+ const s = r.schema, i = s.space === "svg" ? !1 : r.settings.omitOptionalTags;
4552
+ let l = s.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(t.tagName.toLowerCase());
4553
+ const a = [];
4554
+ let o;
4555
+ s.space === "html" && t.tagName === "svg" && (r.schema = ee);
4556
+ const u = ds(r, t.properties), h = r.all(
4557
+ s.space === "html" && t.tagName === "template" ? t.content : t
4558
+ );
4559
+ return r.schema = s, h && (l = !1), (u || !i || !ls(t, e, n)) && (a.push("<", t.tagName, u ? " " + u : ""), l && (s.space === "svg" || r.settings.closeSelfClosing) && (o = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || o === "/" || o && o !== '"' && o !== "'") && a.push(" "), a.push("/")), a.push(">")), a.push(h), !l && (!i || !Ge(t, e, n)) && a.push("</" + t.tagName + ">"), a.join("");
4560
+ }
4561
+ function ds(t, e) {
4562
+ const n = [];
4563
+ let r = -1, s;
4564
+ if (e) {
4565
+ for (s in e)
4566
+ if (e[s] !== null && e[s] !== void 0) {
4567
+ const i = fs(t, s, e[s]);
4568
+ i && n.push(i);
4569
+ }
4570
+ }
4571
+ for (; ++r < n.length; ) {
4572
+ const i = t.settings.tightAttributes ? n[r].charAt(n[r].length - 1) : void 0;
4573
+ r !== n.length - 1 && i !== '"' && i !== "'" && (n[r] += " ");
4574
+ }
4575
+ return n.join("");
4576
+ }
4577
+ function fs(t, e, n) {
4578
+ const r = _t(t.schema, e), s = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, i = t.settings.allowDangerousCharacters ? 0 : 1;
4579
+ let l = t.quote, a;
4580
+ if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n))
4581
+ return "";
4582
+ const o = U(
4583
+ r.attribute,
4584
+ Object.assign({}, t.settings.characterReferences, {
4585
+ // Always encode without parse errors in non-HTML.
4586
+ subset: se.name[s][i]
4587
+ })
4588
+ );
4589
+ return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? ct : St)(n, {
4590
+ padLeft: !t.settings.tightCommaSeparatedLists
4591
+ }) : String(n), t.settings.collapseEmptyAttributes && !n) ? o : (t.settings.preferUnquoted && (a = U(
4592
+ n,
4593
+ Object.assign({}, t.settings.characterReferences, {
4594
+ attribute: !0,
4595
+ subset: se.unquoted[s][i]
4596
+ })
4597
+ )), a !== n && (t.settings.quoteSmart && ot(n, l) > ot(n, t.alternative) && (l = t.alternative), a = l + U(
4598
+ n,
4599
+ Object.assign({}, t.settings.characterReferences, {
4600
+ // Always encode without parse errors in non-HTML.
4601
+ subset: (l === "'" ? se.single : se.double)[s][i],
4602
+ attribute: !0
4603
+ })
4604
+ ) + l), o + (a && "=" + a));
4605
+ }
4606
+ const ms = ["<", "&"];
4607
+ function Ht(t, e, n, r) {
4608
+ return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? t.value : U(
4609
+ t.value,
4610
+ Object.assign({}, r.settings.characterReferences, {
4611
+ subset: ms
4612
+ })
4613
+ );
4614
+ }
4615
+ function gs(t, e, n, r) {
4616
+ return r.settings.allowDangerousHtml ? t.value : Ht(t, e, n, r);
4617
+ }
4618
+ function ys(t, e, n, r) {
4619
+ return r.all(t);
4620
+ }
4621
+ const _s = wr("type", {
4622
+ invalid: Cs,
4623
+ unknown: Ss,
4624
+ handlers: { comment: qr, doctype: Wr, element: ps, raw: gs, root: ys, text: Ht }
4625
+ });
4626
+ function Cs(t) {
4627
+ throw new Error("Expected node, not `" + t + "`");
4628
+ }
4629
+ function Ss(t) {
4630
+ const e = (
4631
+ /** @type {Nodes} */
4632
+ t
4633
+ );
4634
+ throw new Error("Cannot compile unknown node `" + e.type + "`");
4635
+ }
4636
+ const bs = {}, vs = {}, Rs = [];
4637
+ function Ms(t, e) {
4638
+ const n = e || bs, r = n.quote || '"', s = r === '"' ? "'" : '"';
4639
+ if (r !== '"' && r !== "'")
4640
+ throw new Error("Invalid quote `" + r + "`, expected `'` or `\"`");
4641
+ return {
4642
+ one: ws,
4643
+ all: xs,
4644
+ settings: {
4645
+ omitOptionalTags: n.omitOptionalTags || !1,
4646
+ allowParseErrors: n.allowParseErrors || !1,
4647
+ allowDangerousCharacters: n.allowDangerousCharacters || !1,
4648
+ quoteSmart: n.quoteSmart || !1,
4649
+ preferUnquoted: n.preferUnquoted || !1,
4650
+ tightAttributes: n.tightAttributes || !1,
4651
+ upperDoctype: n.upperDoctype || !1,
4652
+ tightDoctype: n.tightDoctype || !1,
4653
+ bogusComments: n.bogusComments || !1,
4654
+ tightCommaSeparatedLists: n.tightCommaSeparatedLists || !1,
4655
+ tightSelfClosing: n.tightSelfClosing || !1,
4656
+ collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
4657
+ allowDangerousHtml: n.allowDangerousHtml || !1,
4658
+ voids: n.voids || Rr,
4659
+ characterReferences: n.characterReferences || vs,
4660
+ closeSelfClosing: n.closeSelfClosing || !1,
4661
+ closeEmptyElements: n.closeEmptyElements || !1
4662
+ },
4663
+ schema: n.space === "svg" ? ee : Ct,
4664
+ quote: r,
4665
+ alternative: s
4666
+ }.one(
4667
+ Array.isArray(t) ? { type: "root", children: t } : t,
4668
+ void 0,
4669
+ void 0
4670
+ );
4671
+ }
4672
+ function ws(t, e, n) {
4673
+ return _s(t, e, n, this);
4674
+ }
4675
+ function xs(t) {
4676
+ const e = [], n = t && t.children || Rs;
4677
+ let r = -1;
4678
+ for (; ++r < n.length; )
4679
+ e[r] = this.one(n[r], r, t);
4680
+ return e.join("");
4681
+ }
4682
+ export {
4683
+ oe as E,
4684
+ qn as F,
4685
+ Ts as I,
4686
+ Is as R,
4687
+ we as T,
4688
+ E as V,
4689
+ Ps as a,
4690
+ ks as b,
4691
+ ot as c,
4692
+ ct as d,
4693
+ St as e,
4694
+ _t as f,
4695
+ bt as g,
4696
+ Ct as h,
4697
+ Rr as i,
4698
+ gn as j,
4699
+ Ns as k,
4700
+ yn as l,
4701
+ Yt as m,
4702
+ Se as n,
4703
+ Es as o,
4704
+ As as p,
4705
+ ee as s,
4706
+ Ms as t,
4707
+ wr as z
4708
+ };