@rynx-ai/server 0.1.11-beta.3 → 0.1.11-beta.30

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 (448) hide show
  1. package/dist/control-api.d.ts +16 -4
  2. package/dist/control-api.js +676 -83
  3. package/dist/control-web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  4. package/dist/control-web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  5. package/dist/control-web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  6. package/dist/control-web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  7. package/dist/control-web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  8. package/dist/control-web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  9. package/dist/control-web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  10. package/dist/control-web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  11. package/dist/control-web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  12. package/dist/control-web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  13. package/dist/control-web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  14. package/dist/control-web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  15. package/dist/control-web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  16. package/dist/control-web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  17. package/dist/control-web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  18. package/dist/control-web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  19. package/dist/control-web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  20. package/dist/control-web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  21. package/dist/control-web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  22. package/dist/control-web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  23. package/dist/control-web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  24. package/dist/control-web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  25. package/dist/control-web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  26. package/dist/control-web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  27. package/dist/control-web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  28. package/dist/control-web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  29. package/dist/control-web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  30. package/dist/control-web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  31. package/dist/control-web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  32. package/dist/control-web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  33. package/dist/control-web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  34. package/dist/control-web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  35. package/dist/control-web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  36. package/dist/control-web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  37. package/dist/control-web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  38. package/dist/control-web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  39. package/dist/control-web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  40. package/dist/control-web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  41. package/dist/control-web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  42. package/dist/control-web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  43. package/dist/control-web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  44. package/dist/control-web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  45. package/dist/control-web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  46. package/dist/control-web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  47. package/dist/control-web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  48. package/dist/control-web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  49. package/dist/control-web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  50. package/dist/control-web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  51. package/dist/control-web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  52. package/dist/control-web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  53. package/dist/control-web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  54. package/dist/control-web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  55. package/dist/control-web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  56. package/dist/control-web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  57. package/dist/control-web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  58. package/dist/control-web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  59. package/dist/control-web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  60. package/dist/control-web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  61. package/dist/control-web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  62. package/dist/control-web/assets/abap-BdImnpbu.js +1 -0
  63. package/dist/control-web/assets/abnfDiagram-VRR7QNED-COu02MlJ.js +1 -0
  64. package/dist/control-web/assets/actionscript-3-CoDkCxhg.js +1 -0
  65. package/dist/control-web/assets/ada-bCR0ucgS.js +1 -0
  66. package/dist/control-web/assets/andromeeda-C4gqWexZ.js +1 -0
  67. package/dist/control-web/assets/angular-html-CU67Zn6k.js +1 -0
  68. package/dist/control-web/assets/angular-ts-BwZT4LLn.js +1 -0
  69. package/dist/control-web/assets/apache-Pmp26Uib.js +1 -0
  70. package/dist/control-web/assets/apex-D8_7TLub.js +1 -0
  71. package/dist/control-web/assets/apl-dKokRX4l.js +1 -0
  72. package/dist/control-web/assets/applescript-Co6uUVPk.js +1 -0
  73. package/dist/control-web/assets/ara-BRHolxvo.js +1 -0
  74. package/dist/control-web/assets/arc-DqiFeYAM.js +1 -0
  75. package/dist/control-web/assets/architectureDiagram-ZJ3FMSHR-BWFGgUV4.js +36 -0
  76. package/dist/control-web/assets/asciidoc-Ve4PFQV2.js +1 -0
  77. package/dist/control-web/assets/asm-D_Q5rh1f.js +1 -0
  78. package/dist/control-web/assets/astro-CbQHKStN.js +1 -0
  79. package/dist/control-web/assets/aurora-x-D-2ljcwZ.js +1 -0
  80. package/dist/control-web/assets/awk-DMzUqQB5.js +1 -0
  81. package/dist/control-web/assets/ayu-dark-DYE7WIF3.js +1 -0
  82. package/dist/control-web/assets/ayu-light-BA47KaF1.js +1 -0
  83. package/dist/control-web/assets/ayu-mirage-32ctXXKs.js +1 -0
  84. package/dist/control-web/assets/ballerina-BFfxhgS-.js +1 -0
  85. package/dist/control-web/assets/bat-BkioyH1T.js +1 -0
  86. package/dist/control-web/assets/beancount-k_qm7-4y.js +1 -0
  87. package/dist/control-web/assets/berry-uYugtg8r.js +1 -0
  88. package/dist/control-web/assets/bibtex-CHM0blh-.js +1 -0
  89. package/dist/control-web/assets/bicep-Bmn6On1c.js +1 -0
  90. package/dist/control-web/assets/bird2-DPOp833l.js +1 -0
  91. package/dist/control-web/assets/blade-D4QpJJKB.js +1 -0
  92. package/dist/control-web/assets/blockDiagram-677ZJIJ3-ZC0bXDzB.js +132 -0
  93. package/dist/control-web/assets/bsl-BO_Y6i37.js +1 -0
  94. package/dist/control-web/assets/c-BIGW1oBm.js +1 -0
  95. package/dist/control-web/assets/c3-eo99z4R2.js +1 -0
  96. package/dist/control-web/assets/c4Diagram-LMCZKHZV-Uupq5I-s.js +10 -0
  97. package/dist/control-web/assets/cadence-Bv_4Rxtq.js +1 -0
  98. package/dist/control-web/assets/cairo-KRGpt6FW.js +1 -0
  99. package/dist/control-web/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  100. package/dist/control-web/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  101. package/dist/control-web/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  102. package/dist/control-web/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  103. package/dist/control-web/assets/channel-3HG15wfa.js +1 -0
  104. package/dist/control-web/assets/chunk-2Q5K7J3B-C77vwuDM.js +1 -0
  105. package/dist/control-web/assets/chunk-32BRIVSS-BkfLE_TX.js +1 -0
  106. package/dist/control-web/assets/chunk-5VM5RSS4-By6zfDWW.js +15 -0
  107. package/dist/control-web/assets/chunk-EX3LRPZG-CO439p_3.js +231 -0
  108. package/dist/control-web/assets/chunk-JWPE2WC7-B9BPEwug.js +1 -0
  109. package/dist/control-web/assets/chunk-MOJQB5TN-CYKygWZz.js +88 -0
  110. package/dist/control-web/assets/chunk-RYQCIY6F-ug-An4HG.js +1 -0
  111. package/dist/control-web/assets/chunk-V7JOEXUC-3UFQGnKX.js +206 -0
  112. package/dist/control-web/assets/chunk-VR4S4FIN-DjspjYUb.js +1 -0
  113. package/dist/control-web/assets/chunk-XXDRQBXY-3znnutie.js +1 -0
  114. package/dist/control-web/assets/clarity-D53aC0YG.js +1 -0
  115. package/dist/control-web/assets/classDiagram-OUVF2IWQ-WmU4L9YT.js +1 -0
  116. package/dist/control-web/assets/classDiagram-v2-EOCWNBFH-WmU4L9YT.js +1 -0
  117. package/dist/control-web/assets/clojure-P80f7IUj.js +1 -0
  118. package/dist/control-web/assets/cmake-D1j8_8rp.js +1 -0
  119. package/dist/control-web/assets/cobol-nwyudZeR.js +1 -0
  120. package/dist/control-web/assets/codeowners-Bp6g37R7.js +1 -0
  121. package/dist/control-web/assets/codeql-DsOJ9woJ.js +1 -0
  122. package/dist/control-web/assets/coffee-Ch7k5sss.js +1 -0
  123. package/dist/control-web/assets/common-lisp-Cg-RD9OK.js +1 -0
  124. package/dist/control-web/assets/coq-DkFqJrB1.js +1 -0
  125. package/dist/control-web/assets/cose-bilkent-JH36ORCC-Dr28goCd.js +1 -0
  126. package/dist/control-web/assets/cpp-CofmeUqb.js +1 -0
  127. package/dist/control-web/assets/crystal-tKQVLTB8.js +1 -0
  128. package/dist/control-web/assets/csharp-COcwbKMJ.js +1 -0
  129. package/dist/control-web/assets/css-DPfMkruS.js +1 -0
  130. package/dist/control-web/assets/csv-fuZLfV_i.js +1 -0
  131. package/dist/control-web/assets/cue-D82EKSYY.js +1 -0
  132. package/dist/control-web/assets/cynefin-VYW2F7L2-Be5uJhnw.js +178 -0
  133. package/dist/control-web/assets/cynefinDiagram-TSTJHNR4-BLxtSvL6.js +62 -0
  134. package/dist/control-web/assets/cypher-COkxafJQ.js +1 -0
  135. package/dist/control-web/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
  136. package/dist/control-web/assets/d-85-TOEBH.js +1 -0
  137. package/dist/control-web/assets/dagre-VKFMJZFB-DPRuDV5p.js +4 -0
  138. package/dist/control-web/assets/dark-plus-C3mMm8J8.js +1 -0
  139. package/dist/control-web/assets/dart-CF10PKvl.js +1 -0
  140. package/dist/control-web/assets/dax-CEL-wOlO.js +1 -0
  141. package/dist/control-web/assets/defaultLocale-DX6XiGOO.js +1 -0
  142. package/dist/control-web/assets/desktop-BmXAJ9_W.js +1 -0
  143. package/dist/control-web/assets/diagram-FQU43EPY-Cybg22U0.js +3 -0
  144. package/dist/control-web/assets/diagram-G47NLZAW-CGeIKUfW.js +24 -0
  145. package/dist/control-web/assets/diagram-NH7WQ7WH-BJq5MBRm.js +24 -0
  146. package/dist/control-web/assets/diagram-OA4YK3LP-DquOQGwg.js +30 -0
  147. package/dist/control-web/assets/diagram-WEI45ONY-Cblb4xP2.js +41 -0
  148. package/dist/control-web/assets/diff-D97Zzqfu.js +1 -0
  149. package/dist/control-web/assets/docker-BcOcwvcX.js +1 -0
  150. package/dist/control-web/assets/dotenv-Da5cRb03.js +1 -0
  151. package/dist/control-web/assets/dracula-BzJJZx-M.js +1 -0
  152. package/dist/control-web/assets/dracula-soft-BXkSAIEj.js +1 -0
  153. package/dist/control-web/assets/dream-maker-BtqSS_iP.js +1 -0
  154. package/dist/control-web/assets/ebnfDiagram-CCIWWBDH-CQjHiOqj.js +1 -0
  155. package/dist/control-web/assets/edge-BkV0erSs.js +1 -0
  156. package/dist/control-web/assets/elixir-CDX3lj18.js +1 -0
  157. package/dist/control-web/assets/elm-DbKCFpqz.js +1 -0
  158. package/dist/control-web/assets/emacs-lisp-C9XAeP06.js +1 -0
  159. package/dist/control-web/assets/erDiagram-Q63AITRT-Bspr3uKJ.js +85 -0
  160. package/dist/control-web/assets/erb-B12qg9BL.js +1 -0
  161. package/dist/control-web/assets/erlang-DsQrWhSR.js +1 -0
  162. package/dist/control-web/assets/everforest-dark-BgDCqdQA.js +1 -0
  163. package/dist/control-web/assets/everforest-light-C8M2exoo.js +1 -0
  164. package/dist/control-web/assets/fennel-BYunw83y.js +1 -0
  165. package/dist/control-web/assets/fish-BvzEVeQv.js +1 -0
  166. package/dist/control-web/assets/flowDiagram-23GEKE2U-CxcZyBA-.js +156 -0
  167. package/dist/control-web/assets/fluent-C4IJs8-o.js +1 -0
  168. package/dist/control-web/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
  169. package/dist/control-web/assets/fortran-free-form-BxgE0vQu.js +1 -0
  170. package/dist/control-web/assets/fsharp-CXgrBDvD.js +1 -0
  171. package/dist/control-web/assets/ganttDiagram-NO4QXBWP-qBdh7A-P.js +292 -0
  172. package/dist/control-web/assets/gdresource-BOOCDP_w.js +1 -0
  173. package/dist/control-web/assets/gdscript-C5YyOfLZ.js +1 -0
  174. package/dist/control-web/assets/gdshader-DkwncUOv.js +1 -0
  175. package/dist/control-web/assets/genie-D0YGMca9.js +1 -0
  176. package/dist/control-web/assets/gherkin-DyxjwDmM.js +1 -0
  177. package/dist/control-web/assets/git-commit-F4YmCXRG.js +1 -0
  178. package/dist/control-web/assets/git-rebase-r7XF79zn.js +1 -0
  179. package/dist/control-web/assets/gitGraphDiagram-IHSO6WYX-BTYub2KT.js +106 -0
  180. package/dist/control-web/assets/github-dark-DHJKELXO.js +1 -0
  181. package/dist/control-web/assets/github-dark-default-Cuk6v7N8.js +1 -0
  182. package/dist/control-web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  183. package/dist/control-web/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  184. package/dist/control-web/assets/github-light-DAi9KRSo.js +1 -0
  185. package/dist/control-web/assets/github-light-default-D7oLnXFd.js +1 -0
  186. package/dist/control-web/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  187. package/dist/control-web/assets/gleam-BspZqrRM.js +1 -0
  188. package/dist/control-web/assets/glimmer-js-Rg0-pVw9.js +1 -0
  189. package/dist/control-web/assets/glimmer-ts-U6CK756n.js +1 -0
  190. package/dist/control-web/assets/glsl-DplSGwfg.js +1 -0
  191. package/dist/control-web/assets/gn-n2N0HUVH.js +1 -0
  192. package/dist/control-web/assets/gnuplot-DdkO51Og.js +1 -0
  193. package/dist/control-web/assets/go-CxLEBnE3.js +1 -0
  194. package/dist/control-web/assets/graph-C9eacEi8.js +1 -0
  195. package/dist/control-web/assets/graphql-ChdNCCLP.js +1 -0
  196. package/dist/control-web/assets/groovy-gcz8RCvz.js +1 -0
  197. package/dist/control-web/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  198. package/dist/control-web/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  199. package/dist/control-web/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  200. package/dist/control-web/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  201. package/dist/control-web/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  202. package/dist/control-web/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  203. package/dist/control-web/assets/hack-CaT9iCJl.js +1 -0
  204. package/dist/control-web/assets/haml-B8DHNrY2.js +1 -0
  205. package/dist/control-web/assets/handlebars-BL8al0AC.js +1 -0
  206. package/dist/control-web/assets/haskell-Df6bDoY_.js +1 -0
  207. package/dist/control-web/assets/haxe-CzTSHFRz.js +1 -0
  208. package/dist/control-web/assets/hcl-BWvSN4gD.js +1 -0
  209. package/dist/control-web/assets/{highlighted-body-OFNGDK62-DWWsUtHF.js → highlighted-body-OFNGDK62-DyksUrwu.js} +1 -1
  210. package/dist/control-web/assets/hjson-D5-asLiD.js +1 -0
  211. package/dist/control-web/assets/hlsl-D3lLCCz7.js +1 -0
  212. package/dist/control-web/assets/horizon-BUw7H-hv.js +1 -0
  213. package/dist/control-web/assets/horizon-bright-Cn-bp-IR.js +1 -0
  214. package/dist/control-web/assets/houston-DnULxvSX.js +1 -0
  215. package/dist/control-web/assets/html-GMplVEZG.js +1 -0
  216. package/dist/control-web/assets/html-derivative-BFtXZ54Q.js +1 -0
  217. package/dist/control-web/assets/http-jrhK8wxY.js +1 -0
  218. package/dist/control-web/assets/hurl-irOxFIW8.js +1 -0
  219. package/dist/control-web/assets/hxml-Bvhsp5Yf.js +1 -0
  220. package/dist/control-web/assets/hy-DFXneXwc.js +1 -0
  221. package/dist/control-web/assets/imba-DGztddWO.js +1 -0
  222. package/dist/control-web/assets/index-B9SAq_63.js +718 -0
  223. package/dist/control-web/assets/index-BDaSctIT.js +153 -0
  224. package/dist/control-web/assets/index-CtaYRNgJ.css +32 -0
  225. package/dist/control-web/assets/infoDiagram-FWYZ7A6U-ChbQR3Zo.js +2 -0
  226. package/dist/control-web/assets/ini-BEwlwnbL.js +1 -0
  227. package/dist/control-web/assets/init-Gi6I4Gst.js +1 -0
  228. package/dist/control-web/assets/ishikawaDiagram-FXEZZL3T-C-4_qGzn.js +70 -0
  229. package/dist/control-web/assets/java-CylS5w8V.js +1 -0
  230. package/dist/control-web/assets/javascript-wDzz0qaB.js +1 -0
  231. package/dist/control-web/assets/jinja-4LBKfQ-Z.js +1 -0
  232. package/dist/control-web/assets/jison-wvAkD_A8.js +1 -0
  233. package/dist/control-web/assets/journeyDiagram-5HDEW3XC-B090zN18.js +139 -0
  234. package/dist/control-web/assets/json-Cp-IABpG.js +1 -0
  235. package/dist/control-web/assets/json5-C9tS-k6U.js +1 -0
  236. package/dist/control-web/assets/jsonc-Des-eS-w.js +1 -0
  237. package/dist/control-web/assets/jsonl-DcaNXYhu.js +1 -0
  238. package/dist/control-web/assets/jsonnet-DFQXde-d.js +1 -0
  239. package/dist/control-web/assets/jssm-C2t-YnRu.js +1 -0
  240. package/dist/control-web/assets/jsx-g9-lgVsj.js +1 -0
  241. package/dist/control-web/assets/julia-CxzCAyBv.js +1 -0
  242. package/dist/control-web/assets/just-Cw27pwNe.js +1 -0
  243. package/dist/control-web/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  244. package/dist/control-web/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  245. package/dist/control-web/assets/kanagawa-wave-DWedfzmr.js +1 -0
  246. package/dist/control-web/assets/kanban-definition-HUTT4EX6-RlTcRbPs.js +89 -0
  247. package/dist/control-web/assets/kdl-DV7GczEv.js +1 -0
  248. package/dist/control-web/assets/kotlin-BdnUsdx6.js +1 -0
  249. package/dist/control-web/assets/kusto-DZf3V79B.js +1 -0
  250. package/dist/control-web/assets/laserwave-DUszq2jm.js +1 -0
  251. package/dist/control-web/assets/latex-CWtU0Tv5.js +1 -0
  252. package/dist/control-web/assets/layout-DEXfKzaS.js +1 -0
  253. package/dist/control-web/assets/lean-BZvkOJ9d.js +1 -0
  254. package/dist/control-web/assets/less-B1dDrJ26.js +1 -0
  255. package/dist/control-web/assets/light-plus-B7mTdjB0.js +1 -0
  256. package/dist/control-web/assets/linear-DTuNxDqu.js +1 -0
  257. package/dist/control-web/assets/liquid-DYVedYrR.js +1 -0
  258. package/dist/control-web/assets/llvm-DjAJT7YJ.js +1 -0
  259. package/dist/control-web/assets/log-2UxHyX5q.js +1 -0
  260. package/dist/control-web/assets/logo-BtOb2qkB.js +1 -0
  261. package/dist/control-web/assets/lua-BaeVxFsk.js +1 -0
  262. package/dist/control-web/assets/luau-C-HG3fhB.js +1 -0
  263. package/dist/control-web/assets/make-CHLpvVh8.js +1 -0
  264. package/dist/control-web/assets/map-Czzmt4hB.js +1 -0
  265. package/dist/control-web/assets/markdown-Cvjx9yec.js +1 -0
  266. package/dist/control-web/assets/marko-CnJfTvn9.js +1 -0
  267. package/dist/control-web/assets/material-theme-D5KoaKCx.js +1 -0
  268. package/dist/control-web/assets/material-theme-darker-BfHTSMKl.js +1 -0
  269. package/dist/control-web/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  270. package/dist/control-web/assets/material-theme-ocean-CyktbL80.js +1 -0
  271. package/dist/control-web/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  272. package/dist/control-web/assets/matlab-D7o27uSR.js +1 -0
  273. package/dist/control-web/assets/mdc-BMNejdWA.js +1 -0
  274. package/dist/control-web/assets/mdx-Cmh6b_Ma.js +1 -0
  275. package/dist/control-web/assets/mermaid-GHXKKRXX-BYZTj3zW.css +1 -0
  276. package/dist/control-web/assets/mermaid-GHXKKRXX-BkcV3dgg.js +710 -0
  277. package/dist/control-web/assets/mermaid-mWjccvbQ.js +1 -0
  278. package/dist/control-web/assets/min-dark-CafNBF8u.js +1 -0
  279. package/dist/control-web/assets/min-light-CTRr51gU.js +1 -0
  280. package/dist/control-web/assets/mindmap-definition-LN4V7U3C-DYby41E9.js +96 -0
  281. package/dist/control-web/assets/mipsasm-CKIfxQSi.js +1 -0
  282. package/dist/control-web/assets/mojo-rZm6bMo-.js +1 -0
  283. package/dist/control-web/assets/monokai-D4h5O-jR.js +1 -0
  284. package/dist/control-web/assets/moonbit-_H4v1dQx.js +1 -0
  285. package/dist/control-web/assets/move-IF9eRakj.js +1 -0
  286. package/dist/control-web/assets/narrat-DRg8JJMk.js +1 -0
  287. package/dist/control-web/assets/nextflow-Zz6hmt5N.js +1 -0
  288. package/dist/control-web/assets/nextflow-groovy-BeH2EWoN.js +1 -0
  289. package/dist/control-web/assets/nginx-BpAMiNFr.js +1 -0
  290. package/dist/control-web/assets/night-owl-C39BiMTA.js +1 -0
  291. package/dist/control-web/assets/night-owl-light-CMTm3GFP.js +1 -0
  292. package/dist/control-web/assets/nim-CVrawwO9.js +1 -0
  293. package/dist/control-web/assets/nix-CwoSXNpI.js +1 -0
  294. package/dist/control-web/assets/nord-Ddv68eIx.js +1 -0
  295. package/dist/control-web/assets/nushell-Cz2AlsmD.js +1 -0
  296. package/dist/control-web/assets/objective-c-DXmwc3jG.js +1 -0
  297. package/dist/control-web/assets/objective-cpp-CLxacb5B.js +1 -0
  298. package/dist/control-web/assets/ocaml-C0hk2d4L.js +1 -0
  299. package/dist/control-web/assets/odin-BBf5iR-q.js +1 -0
  300. package/dist/control-web/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  301. package/dist/control-web/assets/one-light-C3Wv6jpd.js +1 -0
  302. package/dist/control-web/assets/openscad-C4EeE6gA.js +1 -0
  303. package/dist/control-web/assets/ordinal-Cboi1Yqb.js +1 -0
  304. package/dist/control-web/assets/pascal-D93ZcfNL.js +1 -0
  305. package/dist/control-web/assets/pegDiagram-2B236MQR-CPK6GaEv.js +1 -0
  306. package/dist/control-web/assets/perl-C0TMdlhV.js +1 -0
  307. package/dist/control-web/assets/php-Dhbhpdrm.js +1 -0
  308. package/dist/control-web/assets/pieDiagram-ENE6RG2P-DLCmXuji.js +39 -0
  309. package/dist/control-web/assets/pkl-u5AG7uiY.js +1 -0
  310. package/dist/control-web/assets/plastic-3e1v2bzS.js +1 -0
  311. package/dist/control-web/assets/plsql-ChMvpjG-.js +1 -0
  312. package/dist/control-web/assets/po-BTJTHyun.js +1 -0
  313. package/dist/control-web/assets/poimandres-CS3Unz2-.js +1 -0
  314. package/dist/control-web/assets/polar-C0HS_06l.js +1 -0
  315. package/dist/control-web/assets/postcss-CXtECtnM.js +1 -0
  316. package/dist/control-web/assets/powerquery-CEu0bR-o.js +1 -0
  317. package/dist/control-web/assets/powershell-Dpen1YoG.js +1 -0
  318. package/dist/control-web/assets/prisma-Dd19v3D-.js +1 -0
  319. package/dist/control-web/assets/prolog-CbFg5uaA.js +1 -0
  320. package/dist/control-web/assets/proto-C7zT0LnQ.js +1 -0
  321. package/dist/control-web/assets/pug-CGlum2m_.js +1 -0
  322. package/dist/control-web/assets/puppet-BMWR74SV.js +1 -0
  323. package/dist/control-web/assets/purescript-CklMAg4u.js +1 -0
  324. package/dist/control-web/assets/python-B6aJPvgy.js +1 -0
  325. package/dist/control-web/assets/qml-3beO22l8.js +1 -0
  326. package/dist/control-web/assets/qmldir-C8lEn-DE.js +1 -0
  327. package/dist/control-web/assets/qss-IeuSbFQv.js +1 -0
  328. package/dist/control-web/assets/quadrantDiagram-ABIIQ3AL-RIS8r7CA.js +7 -0
  329. package/dist/control-web/assets/r-Dspwwk_N.js +1 -0
  330. package/dist/control-web/assets/racket-BqYA7rlc.js +1 -0
  331. package/dist/control-web/assets/railroadDiagram-RFXS5EU6-B1HB7xsg.js +1 -0
  332. package/dist/control-web/assets/raku-DXvB9xmW.js +1 -0
  333. package/dist/control-web/assets/razor-Uh8Bk_45.js +1 -0
  334. package/dist/control-web/assets/red-bN70gL4F.js +1 -0
  335. package/dist/control-web/assets/reg-C-SQnVFl.js +1 -0
  336. package/dist/control-web/assets/regexp-CDVJQ6XC.js +1 -0
  337. package/dist/control-web/assets/rel-C3B-1QV4.js +1 -0
  338. package/dist/control-web/assets/requirementDiagram-TGXJPOKE-Inh_4hU0.js +84 -0
  339. package/dist/control-web/assets/riscv-BM1_JUlF.js +1 -0
  340. package/dist/control-web/assets/ron-D8l8udqQ.js +1 -0
  341. package/dist/control-web/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  342. package/dist/control-web/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  343. package/dist/control-web/assets/rose-pine-qdsjHGoJ.js +1 -0
  344. package/dist/control-web/assets/rosmsg-BJDFO7_C.js +1 -0
  345. package/dist/control-web/assets/rst-BrH8l1NY.js +1 -0
  346. package/dist/control-web/assets/ruby-Dw2BHqvy.js +1 -0
  347. package/dist/control-web/assets/rust-B1yitclQ.js +1 -0
  348. package/dist/control-web/assets/sankeyDiagram-HTMAVEWB-DPF33kPB.js +40 -0
  349. package/dist/control-web/assets/sas-cz2c8ADy.js +1 -0
  350. package/dist/control-web/assets/sass-Cj5Yp3dK.js +1 -0
  351. package/dist/control-web/assets/scala-C151Ov-r.js +1 -0
  352. package/dist/control-web/assets/scheme-C98Dy4si.js +1 -0
  353. package/dist/control-web/assets/scss-OYdSNvt2.js +1 -0
  354. package/dist/control-web/assets/sdbl-DVxCFoDh.js +1 -0
  355. package/dist/control-web/assets/sequenceDiagram-DBY2YBRQ-iywKWoYc.js +162 -0
  356. package/dist/control-web/assets/shaderlab-Dg9Lc6iA.js +1 -0
  357. package/dist/control-web/assets/shellscript-Yzrsuije.js +1 -0
  358. package/dist/control-web/assets/shellsession-BADoaaVG.js +1 -0
  359. package/dist/control-web/assets/sizeCapture-X5ZJPWSS-DlnHubz9.js +1 -0
  360. package/dist/control-web/assets/slack-dark-BthQWCQV.js +1 -0
  361. package/dist/control-web/assets/slack-ochin-DqwNpetd.js +1 -0
  362. package/dist/control-web/assets/smalltalk-BERRCDM3.js +1 -0
  363. package/dist/control-web/assets/snazzy-light-Bw305WKR.js +1 -0
  364. package/dist/control-web/assets/solarized-dark-DXbdFlpD.js +1 -0
  365. package/dist/control-web/assets/solarized-light-L9t79GZl.js +1 -0
  366. package/dist/control-web/assets/solidity-rGO070M0.js +1 -0
  367. package/dist/control-web/assets/soy-Brmx7dQM.js +1 -0
  368. package/dist/control-web/assets/sparql-rVzFXLq3.js +1 -0
  369. package/dist/control-web/assets/splunk-BtCnVYZw.js +1 -0
  370. package/dist/control-web/assets/sql-BLtJtn59.js +1 -0
  371. package/dist/control-web/assets/ssh-config-_ykCGR6B.js +1 -0
  372. package/dist/control-web/assets/stata-BH5u7GGu.js +1 -0
  373. package/dist/control-web/assets/stateDiagram-2N3HPSRC-CShzll2N.js +1 -0
  374. package/dist/control-web/assets/stateDiagram-v2-6OUMAXLB-Cdx0fWna.js +1 -0
  375. package/dist/control-web/assets/stylus-BEDo0Tqx.js +1 -0
  376. package/dist/control-web/assets/surrealql-Bq5Q-fJD.js +1 -0
  377. package/dist/control-web/assets/svelte-C_ipcX3V.js +1 -0
  378. package/dist/control-web/assets/swift-D82vCrfD.js +1 -0
  379. package/dist/control-web/assets/swimlanes-5IMT3BWC-CxlQpFBv.js +2 -0
  380. package/dist/control-web/assets/swimlanesDiagram-G3AALYLV-CoX0jnUu.js +8 -0
  381. package/dist/control-web/assets/synthwave-84-CbfX1IO0.js +1 -0
  382. package/dist/control-web/assets/system-verilog-CnnmHF94.js +1 -0
  383. package/dist/control-web/assets/systemd-4A_iFExJ.js +1 -0
  384. package/dist/control-web/assets/talonscript-CkByrt1z.js +1 -0
  385. package/dist/control-web/assets/tasl-QIJgUcNo.js +1 -0
  386. package/dist/control-web/assets/tcl-dwOrl1Do.js +1 -0
  387. package/dist/control-web/assets/templ-P3uqSqPl.js +1 -0
  388. package/dist/control-web/assets/terraform-BETggiCN.js +1 -0
  389. package/dist/control-web/assets/tex-idrVyKtj.js +1 -0
  390. package/dist/control-web/assets/timeline-definition-FHXFAJF6-Dlx59Xc3.js +120 -0
  391. package/dist/control-web/assets/tokyo-night-hegEt444.js +1 -0
  392. package/dist/control-web/assets/toml-vGWfd6FD.js +1 -0
  393. package/dist/control-web/assets/ts-tags-zn1MmPIZ.js +1 -0
  394. package/dist/control-web/assets/tsv-B_m7g4N7.js +1 -0
  395. package/dist/control-web/assets/tsx-COt5Ahok.js +1 -0
  396. package/dist/control-web/assets/turtle-BsS91CYL.js +1 -0
  397. package/dist/control-web/assets/twig-DNn4PbVi.js +1 -0
  398. package/dist/control-web/assets/typescript-BPQ3VLAy.js +1 -0
  399. package/dist/control-web/assets/typespec-BGHnOYBU.js +1 -0
  400. package/dist/control-web/assets/typst-DHCkPAjA.js +1 -0
  401. package/dist/control-web/assets/v-BcVCzyr7.js +1 -0
  402. package/dist/control-web/assets/vala-CsfeWuGM.js +1 -0
  403. package/dist/control-web/assets/vb-D17OF-Vu.js +1 -0
  404. package/dist/control-web/assets/vennDiagram-L72KCM5P-DLsv4i_t.js +34 -0
  405. package/dist/control-web/assets/verilog-BQ8w6xss.js +1 -0
  406. package/dist/control-web/assets/vesper-DU1UobuO.js +1 -0
  407. package/dist/control-web/assets/vhdl-CeAyd5Ju.js +1 -0
  408. package/dist/control-web/assets/viml-CJc9bBzg.js +1 -0
  409. package/dist/control-web/assets/vitesse-black-Bkuqu6BP.js +1 -0
  410. package/dist/control-web/assets/vitesse-dark-D0r3Knsf.js +1 -0
  411. package/dist/control-web/assets/vitesse-light-CVO1_9PV.js +1 -0
  412. package/dist/control-web/assets/vue-DN_0RTcg.js +1 -0
  413. package/dist/control-web/assets/vue-html-AaS7Mt5G.js +1 -0
  414. package/dist/control-web/assets/vue-vine-CQOfvN7w.js +1 -0
  415. package/dist/control-web/assets/vyper-CDx5xZoG.js +1 -0
  416. package/dist/control-web/assets/wardleyDiagram-EHGQE667-BazV8fpH.js +78 -0
  417. package/dist/control-web/assets/wasm-CG6Dc4jp.js +1 -0
  418. package/dist/control-web/assets/wasm-MzD3tlZU.js +1 -0
  419. package/dist/control-web/assets/wenyan-BV7otONQ.js +1 -0
  420. package/dist/control-web/assets/wgsl-Dx-B1_4e.js +1 -0
  421. package/dist/control-web/assets/wikitext-BhOHFoWU.js +1 -0
  422. package/dist/control-web/assets/wit-5i3qLPDT.js +1 -0
  423. package/dist/control-web/assets/wolfram-lXgVvXCa.js +1 -0
  424. package/dist/control-web/assets/xml-sdJ4AIDG.js +1 -0
  425. package/dist/control-web/assets/xsl-CtQFsRM5.js +1 -0
  426. package/dist/control-web/assets/xychartDiagram-FW5EYKEG-Bx9uDlYu.js +7 -0
  427. package/dist/control-web/assets/yaml-Buea-lGh.js +1 -0
  428. package/dist/control-web/assets/zenscript-DVFEvuxE.js +1 -0
  429. package/dist/control-web/assets/zig-VOosw3JB.js +1 -0
  430. package/dist/control-web/index.html +2 -2
  431. package/dist/control-web-dist.d.ts +1 -1
  432. package/dist/control-web-dist.js +4 -2
  433. package/dist/machine-session-service.d.ts +82 -15
  434. package/dist/machine-session-service.js +670 -80
  435. package/dist/remote-runtime-dispatcher.d.ts +1 -1
  436. package/dist/remote-runtime-dispatcher.js +16 -1
  437. package/dist/remote-runtime-session-projection.js +5 -0
  438. package/dist/server.d.ts +24 -7
  439. package/dist/server.js +207 -46
  440. package/dist/session-portal.d.ts +42 -0
  441. package/dist/session-portal.js +746 -0
  442. package/dist/session-runtime-index.d.ts +2 -6
  443. package/dist/session-runtime-index.js +70 -38
  444. package/dist/terminal-ws.js +8 -6
  445. package/package.json +7 -7
  446. package/dist/control-web/assets/index-BnX7NWJX.js +0 -689
  447. package/dist/control-web/assets/index-CUoWRX2i.css +0 -32
  448. package/dist/control-web/assets/mermaid-GHXKKRXX-C1fxAgiw.js +0 -131
@@ -0,0 +1,153 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
+ var si=Object.defineProperty;var oi=Object.getPrototypeOf;var ai=Reflect.get;var fr=t=>{throw TypeError(t)};var ci=(t,e,r)=>e in t?si(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var g=(t,e,r)=>ci(t,typeof e!="symbol"?e+"":e,r),Et=(t,e,r)=>e.has(t)||fr("Cannot "+r);var M=(t,e,r)=>(Et(t,e,"read from private field"),r?r.call(t):e.get(t)),le=(t,e,r)=>e.has(t)?fr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),W=(t,e,r,n)=>(Et(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),bt=(t,e,r)=>(Et(t,e,"access private method"),r);var mr=(t,e,r)=>ai(oi(t),r,e);import{_ as u}from"./index-B9SAq_63.js";import{br as Kt,bs as tn,bt as li,bu as ui,bv as di,bw as gr,bx as pi,by as hi,bz as fi}from"./mermaid-GHXKKRXX-BkcV3dgg.js";let L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mi(t){return Zt(t)}function Zt(t){return Array.isArray(t)?gi(t):t instanceof RegExp?t:typeof t=="object"?_i(t):t}function gi(t){let e=[];for(let r=0,n=t.length;r<n;r++)e[r]=Zt(t[r]);return e}function _i(t){let e={};for(let r in t)e[r]=Zt(t[r]);return e}function rn(t,...e){return e.forEach(r=>{for(let n in r)t[n]=r[n]}),t}function nn(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?nn(t.substring(0,t.length-1)):t.substr(~e+1)}var wt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(t){return t===null?!1:(wt.lastIndex=0,wt.test(t))}static replaceCaptures(t,e,r){return t.replace(wt,(n,i,s,o)=>{let a=r[parseInt(i||s,10)];if(a){let c=e.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return n})}};function sn(t,e){return t<e?-1:t>e?1:0}function on(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let r=t.length,n=e.length;if(r===n){for(let i=0;i<r;i++){let s=sn(t[i],e[i]);if(s!==0)return s}return 0}return r-n}function _r(t){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))}function an(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var cn=class{constructor(t){g(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Ze=class{constructor(t,e,r){g(this,"_cachedMatchRoot",new cn(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=r}static createFromRawTheme(t,e){return this.createFromParsedTheme(bi(t),e)}static createFromParsedTheme(t,e){return Ai(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find(i=>yi(t.parent,i.parentScopes));return n?new ln(n.fontStyle,n.foreground,n.background):null}},At=class Xe{constructor(e,r){this.parent=e,this.scopeName=r}static push(e,r){for(const n of r)e=new Xe(e,n);return e}static from(...e){let r=null;for(let n=0;n<e.length;n++)r=new Xe(r,e[n]);return r}push(e){return new Xe(this,e)}getSegments(){let e=this;const r=[];for(;e;)r.push(e.scopeName),e=e.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push(n.scopeName),n=n.parent;return n===e?r.reverse():void 0}};function yi(t,e){if(e.length===0)return!0;for(let r=0;r<e.length;r++){let n=e[r],i=!1;if(n===">"){if(r===e.length-1)return!1;n=e[++r],i=!0}for(;t&&!Ei(t.scopeName,n);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Ei(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var ln=class{constructor(t,e,r){this.fontStyle=t,this.foregroundId=e,this.backgroundId=r}};function bi(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,r=[],n=0;for(let i=0,s=e.length;i<s;i++){let o=e[i];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let d=o.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let d=o.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;typeof o.settings.foreground=="string"&&_r(o.settings.foreground)&&(l=o.settings.foreground);let p=null;typeof o.settings.background=="string"&&_r(o.settings.background)&&(p=o.settings.background);for(let d=0,h=a.length;d<h;d++){let m=a[d].trim().split(" "),y=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),r[n++]=new wi(y,b,i,c,l,p)}}return r}var wi=class{constructor(t,e,r,n,i,s){this.scope=t,this.parentScopes=e,this.index=r,this.fontStyle=n,this.foreground=i,this.background=s}},N=(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))(N||{});function Ai(t,e){t.sort((c,l)=>{let p=sn(c.scope,l.scope);return p!==0||(p=on(c.parentScopes,l.parentScopes),p!==0)?p:c.index-l.index});let r=0,n="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(r=c.fontStyle),c.foreground!==null&&(n=c.foreground),c.background!==null&&(i=c.background)}let s=new vi(e),o=new ln(r,s.getId(n),s.getId(i)),a=new Ii(new Vt(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let p=t[c];a.insert(0,p.scope,p.parentScopes,p.fontStyle,s.getId(p.foreground),s.getId(p.background))}return new Ze(s,o,a)}var vi=class{constructor(t){g(this,"_isFrozen");g(this,"_lastColorId");g(this,"_id2color");g(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,r=t.length;e<r;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Ci=Object.freeze([]),Vt=class un{constructor(e,r,n,i,s){g(this,"scopeDepth");g(this,"parentScopes");g(this,"fontStyle");g(this,"foreground");g(this,"background");this.scopeDepth=e,this.parentScopes=r||Ci,this.fontStyle=n,this.foreground=i,this.background=s}clone(){return new un(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let r=[];for(let n=0,i=e.length;n<i;n++)r[n]=e[n].clone();return r}acceptOverwrite(e,r,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Ii=class Mt{constructor(e,r=[],n={}){g(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=r}static _cmpBySpecificity(e,r){if(e.scopeDepth!==r.scopeDepth)return r.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=r.parentScopes.length);){const s=r.parentScopes[i].length-e.parentScopes[n].length;if(s!==0)return s;n++,i++}return r.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,s;if(n===-1?(i=e,s=""):(i=e.substring(0,n),s=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(Mt._cmpBySpecificity),r}insert(e,r,n,i,s,o){if(r===""){this._doInsertHere(e,n,i,s,o);return}let a=r.indexOf("."),c,l;a===-1?(c=r,l=""):(c=r.substring(0,a),l=r.substring(a+1));let p;this._children.hasOwnProperty(c)?p=this._children[c]:(p=new Mt(this._mainRule.clone(),Vt.cloneArr(this._rulesWithParentScopes)),this._children[c]=p),p.insert(e+1,l,n,i,s,o)}_doInsertHere(e,r,n,i,s){if(r===null){this._mainRule.acceptOverwrite(e,n,i,s);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(on(c.parentScopes,r)===0){c.acceptOverwrite(e,n,i,s);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Vt(e,r,n,i,s))}},Ie=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const r=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),s=B.getForeground(e),o=B.getBackground(e);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:s,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,r,n,i,s,o,a){let c=B.getLanguageId(e),l=B.getTokenType(e),p=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),f=B.getBackground(e);return r!==0&&(c=r),n!==8&&(l=n),i!==null&&(p=i?1:0),s!==-1&&(d=s),o!==0&&(h=o),a!==0&&(f=a),(c<<0|l<<8|p<<10|d<<11|h<<15|f<<24)>>>0}};function Ye(t,e){const r=[],n=Ri(t);let i=n.next();for(;i!==null;){let c=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let l=o();if(r.push({matcher:l,priority:c}),i!==",")break;i=n.next()}return r;function s(){if(i==="-"){i=n.next();const c=s();return l=>!!c&&!c(l)}if(i==="("){i=n.next();const c=a();return i===")"&&(i=n.next()),c}if(yr(i)){const c=[];do c.push(i),i=n.next();while(yr(i));return l=>e(c,l)}return null}function o(){const c=[];let l=s();for(;l;)c.push(l),l=s();return p=>c.every(d=>d(p))}function a(){const c=[];let l=o();for(;l&&(c.push(l),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");l=o()}return p=>c.some(d=>d(p))}}function yr(t){return!!t&&!!t.match(/[\w\.:]+/)}function Ri(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=e.exec(t);return{next:()=>{if(!r)return null;const n=r[0];return r=e.exec(t),n}}}function dn(t){typeof t.dispose=="function"&&t.dispose()}var xe=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Si=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Li=class{constructor(){g(this,"_references",[]);g(this,"_seenReferenceKeys",new Set);g(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Ti=class{constructor(t,e){g(this,"seenFullScopeRequests",new Set);g(this,"seenPartialScopeRequests",new Set);g(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new xe(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new Li;for(const r of t)Pi(r,this.initialScopeName,this.repo,e);for(const r of e.references)if(r instanceof xe){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function Pi(t,e,r,n){const i=r.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=r.lookup(e);t instanceof xe?Qe({baseGrammar:s,selfGrammar:i},n):Gt(t.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},n);const o=r.injections(t.scopeName);if(o)for(const a of o)n.add(new xe(a))}function Gt(t,e,r){if(e.repository&&e.repository[t]){const n=e.repository[t];et([n],e,r)}}function Qe(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&et(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&et(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function et(t,e,r){for(const n of t){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?rn({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&et(n.patterns,{...e,repository:i},r);const s=n.include;if(!s)continue;const o=pn(s);switch(o.kind){case 0:Qe({...e,selfGrammar:e.baseGrammar},r);break;case 1:Qe(e,r);break;case 2:Gt(o.ruleName,{...e,repository:i},r);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};o.kind===4?Gt(o.ruleName,c,r):Qe(c,r)}else o.kind===4?r.add(new Si(o.scopeName,o.ruleName)):r.add(new xe(o.scopeName));break}}}var ki=class{constructor(){g(this,"kind",0)}},Oi=class{constructor(){g(this,"kind",1)}},xi=class{constructor(t){g(this,"kind",2);this.ruleName=t}},Di=class{constructor(t){g(this,"kind",3);this.scopeName=t}},Ni=class{constructor(t,e){g(this,"kind",4);this.scopeName=t,this.ruleName=e}};function pn(t){if(t==="$base")return new ki;if(t==="$self")return new Oi;const e=t.indexOf("#");if(e===-1)return new Di(t);if(e===0)return new xi(t.substring(1));{const r=t.substring(0,e),n=t.substring(e+1);return new Ni(r,n)}}var $i=/\\(\d+)/,Er=/\\(\d+)/g,Vi=-1,hn=-2;var Ge=class{constructor(t,e,r,n){g(this,"$location");g(this,"id");g(this,"_nameIsCapturing");g(this,"_name");g(this,"_contentNameIsCapturing");g(this,"_contentName");this.$location=t,this.id=e,this._name=r||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${nn(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Fe.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,t,e)}},Mi=class extends Ge{constructor(e,r,n,i,s){super(e,r,n,i);g(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,r){throw new Error("Not supported!")}compile(e,r){throw new Error("Not supported!")}compileAG(e,r,n,i){throw new Error("Not supported!")}},Gi=class extends Ge{constructor(e,r,n,i,s){super(e,r,n,null);g(this,"_match");g(this,"captures");g(this,"_cachedCompiledPatterns");this._match=new De(i,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,r){r.push(this._match)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ne,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},br=class extends Ge{constructor(e,r,n,i,s){super(e,r,n,i);g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,r){for(const n of this.patterns)e.getRule(n).collectPatterns(e,r)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ne,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bt=class extends Ge{constructor(e,r,n,i,s,o,a,c,l,p){super(e,r,n,i);g(this,"_begin");g(this,"beginCaptures");g(this,"_end");g(this,"endHasBackReferences");g(this,"endCaptures");g(this,"applyEndPatternLast");g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");this._begin=new De(s,this.id),this.beginCaptures=o,this._end=new De(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=l||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,r){return this._end.resolveBackReferences(e,r)}collectPatterns(e,r){r.push(this._begin)}compile(e,r){return this._getCachedCompiledPatterns(e,r).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e,r).compileAG(e,n,i)}_getCachedCompiledPatterns(e,r){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ne;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,r):this._cachedCompiledPatterns.setSource(0,r)),this._cachedCompiledPatterns}},tt=class extends Ge{constructor(e,r,n,i,s,o,a,c,l){super(e,r,n,i);g(this,"_begin");g(this,"beginCaptures");g(this,"whileCaptures");g(this,"_while");g(this,"whileHasBackReferences");g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");g(this,"_cachedCompiledWhilePatterns");this._begin=new De(s,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new De(a,hn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,r){return this._while.resolveBackReferences(e,r)}collectPatterns(e,r){r.push(this._begin)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ne;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,r){return this._getCachedCompiledWhilePatterns(e,r).compile(e)}compileWhileAG(e,r,n,i){return this._getCachedCompiledWhilePatterns(e,r).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,r){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ne,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,r||"￿"),this._cachedCompiledWhilePatterns}},fn=class D{static createCaptureRule(e,r,n,i,s){return e.registerRule(o=>new Mi(r,o,n,i,s))}static getCompiledRuleId(e,r,n){return e.id||r.registerRule(i=>{if(e.id=i,e.match)return new Gi(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,r,n));if(typeof e.begin>"u"){e.repository&&(n=rn({},n,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new br(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(s,r,n))}return e.while?new tt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,r,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,r,n),D._compilePatterns(e.patterns,r,n)):new Bt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,r,n),e.end,D._compileCaptures(e.endCaptures||e.captures,r,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,r,n))}),e.id}static _compileCaptures(e,r,n){let i=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>s&&(s=a)}for(let o=0;o<=s;o++)i[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let c=0;e[o].patterns&&(c=D.getCompiledRuleId(e[o],r,n)),i[a]=D.createCaptureRule(r,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return i}static _compilePatterns(e,r,n){let i=[];if(e)for(let s=0,o=e.length;s<o;s++){const a=e[s];let c=-1;if(a.include){const l=pn(a.include);switch(l.kind){case 0:case 1:c=D.getCompiledRuleId(n[a.include],r,n);break;case 2:let p=n[l.ruleName];p&&(c=D.getCompiledRuleId(p,r,n));break;case 3:case 4:const d=l.scopeName,h=l.kind===4?l.ruleName:null,f=r.getExternalGrammar(d,n);if(f)if(h){let m=f.repository[h];m&&(c=D.getCompiledRuleId(m,r,f.repository))}else c=D.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else c=D.getCompiledRuleId(a,r,n);if(c!==-1){const l=r.getRule(c);let p=!1;if((l instanceof br||l instanceof Bt||l instanceof tt)&&l.hasMissingPatterns&&l.patterns.length===0&&(p=!0),p)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},De=class mn{constructor(e,r){g(this,"source");g(this,"ruleId");g(this,"hasAnchor");g(this,"hasBackReferences");g(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,s=[],o=!1;for(let a=0;a<n;a++)if(e.charAt(a)==="\\"&&a+1<n){const l=e.charAt(a+1);l==="z"?(s.push(e.substring(i,a)),s.push("$(?!\\n)(?<!\\n)"),i=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,i===0?this.source=e:(s.push(e.substring(i,n)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=$i.test(this.source):this.hasBackReferences=!1}clone(){return new mn(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>e.substring(i.start,i.end));return Er.lastIndex=0,this.source.replace(Er,(i,s)=>an(n[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],r=[],n=[],i=[],s,o,a,c;for(s=0,o=this.source.length;s<o;s++)a=this.source.charAt(s),e[s]=a,r[s]=a,n[s]=a,i[s]=a,a==="\\"&&s+1<o&&(c=this.source.charAt(s+1),c==="A"?(e[s+1]="￿",r[s+1]="￿",n[s+1]="A",i[s+1]="A"):c==="G"?(e[s+1]="￿",r[s+1]="G",n[s+1]="￿",i[s+1]="G"):(e[s+1]=c,r[s+1]=c,n[s+1]=c,i[s+1]=c),s++);return{A0_G0:e.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ne=class{constructor(){g(this,"_items");g(this,"_hasAnchors");g(this,"_cached");g(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){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)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(r=>r.source);this._cached=new wr(t,e,this._items.map(r=>r.ruleId))}return this._cached}compileAG(t,e,r){return this._hasAnchors?e?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,r){let n=this._items.map(i=>i.resolveAnchors(e,r));return new wr(t,n,this._items.map(i=>i.ruleId))}},wr=class{constructor(t,e,r){g(this,"scanner");this.regExps=e,this.rules=r,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,r=this.rules.length;e<r;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
3
+ `)}findNextMatchSync(t,e,r){const n=this.scanner.findNextMatchSync(t,e,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},vt=class{constructor(t,e){this.languageId=t,this.tokenType=e}},ee,Bi=(ee=class{constructor(e,r){g(this,"_defaultAttributes");g(this,"_embeddedLanguagesMatcher");g(this,"_getBasicScopeAttributes",new cn(e=>{const r=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new vt(r,n)}));this._defaultAttributes=new vt(e,8),this._embeddedLanguagesMatcher=new Fi(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?ee._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const r=e.match(ee.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},g(ee,"_NULL_SCOPE_METADATA",new vt(0,0)),g(ee,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),ee),Fi=class{constructor(t){g(this,"values");g(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([r,n])=>an(r));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Ar=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function gn(t,e,r,n,i,s,o,a){const c=e.content.length;let l=!1,p=-1;if(o){const f=Ui(t,e,r,n,i,s);i=f.stack,n=f.linePos,r=f.isFirstLine,p=f.anchorPosition}const d=Date.now();for(;!l;){if(a!==0&&Date.now()-d>a)return new Ar(i,!0);h()}return new Ar(i,!1);function h(){const f=ji(t,e,r,n,i,p);if(!f){s.produce(i,c),l=!0;return}const m=f.captureIndices,y=f.matchedRuleId,b=m&&m.length>0?m[0].end>n:!1;if(y===Vi){const E=i.getRule(t);s.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Pe(t,e,r,i,s,E.endCaptures,m),s.produce(i,m[0].end);const w=i;if(i=i.parent,p=w.getAnchorPos(),!b&&w.getEnterPos()===n){i=w,s.produce(i,c),l=!0;return}}else{const E=t.getRule(y);s.produce(i,m[0].start);const w=i,_=E.getName(e.content,m),A=i.contentNameScopesList.pushAttributed(_,t);if(i=i.push(y,n,p,m[0].end===c,null,A,A),E instanceof Bt){const v=E;Pe(t,e,r,i,s,v.beginCaptures,m),s.produce(i,m[0].end),p=m[0].end;const R=v.getContentName(e.content,m),I=A.pushAttributed(R,t);if(i=i.withContentNameScopesList(I),v.endHasBackReferences&&(i=i.withEndRule(v.getEndWithResolvedBackReferences(e.content,m))),!b&&w.hasSameRuleAs(i)){i=i.pop(),s.produce(i,c),l=!0;return}}else if(E instanceof tt){const v=E;Pe(t,e,r,i,s,v.beginCaptures,m),s.produce(i,m[0].end),p=m[0].end;const R=v.getContentName(e.content,m),I=A.pushAttributed(R,t);if(i=i.withContentNameScopesList(I),v.whileHasBackReferences&&(i=i.withEndRule(v.getWhileWithResolvedBackReferences(e.content,m))),!b&&w.hasSameRuleAs(i)){i=i.pop(),s.produce(i,c),l=!0;return}}else if(Pe(t,e,r,i,s,E.captures,m),s.produce(i,m[0].end),i=i.pop(),!b){i=i.safePop(),s.produce(i,c),l=!0;return}}m[0].end>n&&(n=m[0].end,r=!1)}}function Ui(t,e,r,n,i,s){let o=i.beginRuleCapturedEOL?0:-1;const a=[];for(let c=i;c;c=c.pop()){const l=c.getRule(t);l instanceof tt&&a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:l,findOptions:p}=zi(c.rule,t,c.stack.endRule,r,n===o),d=l.findNextMatchSync(e,n,p);if(d){if(d.ruleId!==hn){i=c.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(c.stack,d.captureIndices[0].start),Pe(t,e,r,c.stack,s,c.rule.whileCaptures,d.captureIndices),s.produce(c.stack,d.captureIndices[0].end),o=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,r=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:o,isFirstLine:r}}function ji(t,e,r,n,i,s){const o=Wi(t,e,r,n,i,s),a=t.getInjections();if(a.length===0)return o;const c=Hi(a,t,e,r,n,i,s);if(!c)return o;if(!o)return c;const l=o.captureIndices[0].start,p=c.captureIndices[0].start;return p<l||c.priorityMatch&&p===l?c:o}function Wi(t,e,r,n,i,s){const o=i.getRule(t),{ruleScanner:a,findOptions:c}=_n(o,t,i.endRule,r,n===s),l=a.findNextMatchSync(e,n,c);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function Hi(t,e,r,n,i,s,o){let a=Number.MAX_VALUE,c=null,l,p=0;const d=s.contentNameScopesList.getScopeNames();for(let h=0,f=t.length;h<f;h++){const m=t[h];if(!m.matcher(d))continue;const y=e.getRule(m.ruleId),{ruleScanner:b,findOptions:E}=_n(y,e,null,n,i===o),w=b.findNextMatchSync(r,i,E);if(!w)continue;const _=w.captureIndices[0].start;if(!(_>=a)&&(a=_,c=w.captureIndices,l=w.ruleId,p=m.priority,a===i))break}return c?{priorityMatch:p===-1,captureIndices:c,matchedRuleId:l}:null}function _n(t,e,r,n,i){return{ruleScanner:t.compileAG(e,r,n,i),findOptions:0}}function zi(t,e,r,n,i){return{ruleScanner:t.compileWhileAG(e,r,n,i),findOptions:0}}function Pe(t,e,r,n,i,s,o){if(s.length===0)return;const a=e.content,c=Math.min(s.length,o.length),l=[],p=o[0].end;for(let d=0;d<c;d++){const h=s[d];if(h===null)continue;const f=o[d];if(f.length===0)continue;if(f.start>p)break;for(;l.length>0&&l[l.length-1].endPos<=f.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,f.start):i.produce(n,f.start),h.retokenizeCapturedWithRuleId){const y=h.getName(a,o),b=n.contentNameScopesList.pushAttributed(y,t),E=h.getContentName(a,o),w=b.pushAttributed(E,t),_=n.push(h.retokenizeCapturedWithRuleId,f.start,-1,!1,null,b,w),A=t.createOnigString(a.substring(0,f.end));gn(t,A,r&&f.start===0,f.start,_,i,!1,0),dn(A);continue}const m=h.getName(a,o);if(m!==null){const b=(l.length>0?l[l.length-1].scopes:n.contentNameScopesList).pushAttributed(m,t);l.push(new qi(b,f.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var qi=class{constructor(t,e){g(this,"scopes");g(this,"endPos");this.scopes=t,this.endPos=e}};function Xi(t,e,r,n,i,s,o,a){return new Ji(t,e,r,n,i,s,o,a)}function vr(t,e,r,n,i){const s=Ye(e,rt),o=fn.getCompiledRuleId(r,n,i.repository);for(const a of s)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:i,priority:a.priority})}function rt(t,e){if(e.length<t.length)return!1;let r=0;return t.every(n=>{for(let i=r;i<e.length;i++)if(Qi(e[i],n))return r=i+1,!0;return!1})}function Qi(t,e){if(!t)return!1;if(t===e)return!0;const r=e.length;return t.length>r&&t.substr(0,r)===e&&t[r]==="."}var Ji=class{constructor(t,e,r,n,i,s,o,a){g(this,"_rootId");g(this,"_lastRuleId");g(this,"_ruleId2desc");g(this,"_includedGrammars");g(this,"_grammarRepository");g(this,"_grammar");g(this,"_injections");g(this,"_basicScopeAttributesProvider");g(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new Bi(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Cr(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const l=Ye(c,rt);for(const p of l)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],r=this._rootScopeName,n=t.lookup(r);if(n){const i=n.injections;if(i)for(let o in i)vr(e,o,i[o],this,n);const s=this._grammarRepository.injections(r);s&&s.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const c=a.injectionSelector;c&&vr(e,c,a,this,a)}})}return e.sort((i,s)=>i.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,r=t(e);return this._ruleId2desc[e]=r,r}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const r=this._grammarRepository.lookup(t);if(r)return this._includedGrammars[t]=Cr(r,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,r=0){const n=this._tokenize(t,e,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(t,e,r=0){const n=this._tokenize(t,e,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(t,e,r,n){this._rootId===-1&&(this._rootId=fn.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Ft.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=Ie.set(0,l.languageId,l.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),h=this.getRule(this._rootId).getName(null,null);let f;h?f=ke.createRootAndLookUpScopeName(h,d,this):f=ke.createRoot("unknown",d),e=new Ft(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,e.reset();t=t+`
4
+ `;const s=this.createOnigString(t),o=s.content.length,a=new Zi(r,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=gn(this,s,i,0,e,a,!0,n);return dn(s),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Cr(t,e){return t=mi(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ke=class X{constructor(e,r,n){this.parent=e,this.scopePath=r,this.tokenAttributes=n}static fromExtension(e,r){let n=e,i=(e==null?void 0:e.scopePath)??null;for(const s of r)i=At.push(i,s.scopeNames),n=new X(n,i,s.encodedTokenAttributes);return n}static createRoot(e,r){return new X(null,new At(null,e),r)}static createRootAndLookUpScopeName(e,r,n){const i=n.getMetadataForScope(e),s=new At(null,e),o=n.themeProvider.themeMatch(s),a=X.mergeAttributes(r,i,o);return new X(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return X.equals(this,e)}static equals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.scopeName!==r.scopeName||e.tokenAttributes!==r.tokenAttributes)return!1;e=e.parent,r=r.parent}while(!0)}static mergeAttributes(e,r,n){let i=-1,s=0,o=0;return n!==null&&(i=n.fontStyle,s=n.foregroundId,o=n.backgroundId),Ie.set(e,r.languageId,r.tokenType,null,i,s,o)}pushAttributed(e,r){if(e===null)return this;if(e.indexOf(" ")===-1)return X._pushAttributed(this,e,r);const n=e.split(/ /g);let i=this;for(const s of n)i=X._pushAttributed(i,s,r);return i}static _pushAttributed(e,r,n){const i=n.getMetadataForScope(r),s=e.scopePath.push(r),o=n.themeProvider.themeMatch(s),a=X.mergeAttributes(e.tokenAttributes,i,o);return new X(e,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const r=[];let n=this;for(;n&&n!==e;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(((i=n.parent)==null?void 0:i.scopePath)??null)}),n=n.parent;return n===e?r.reverse():void 0}},F,Ft=(F=class{constructor(e,r,n,i,s,o,a,c){g(this,"_stackElementBrand");g(this,"_enterPos");g(this,"_anchorPos");g(this,"depth");this.parent=e,this.ruleId=r,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return e===null?!1:F._equals(this,e)}static _equals(e,r){return e===r?!0:this._structuralEquals(e,r)?ke.equals(e.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.depth!==r.depth||e.ruleId!==r.ruleId||e.endRule!==r.endRule)return!1;e=e.parent,r=r.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){F._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,r,n,i,s,o,a){return new F(this,e,r,n,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,r){var n,i;return this.parent&&(r=this.parent._writeString(e,r)),e[r++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,r}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new F(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let r=this;for(;r&&r._enterPos===e._enterPos;){if(r.ruleId===e.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){var e,r,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((r=this.nameScopesList)==null?void 0:r.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,r){const n=ke.fromExtension((e==null?void 0:e.nameScopesList)??null,r.nameScopesList);return new F(e,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,ke.fromExtension(n,r.contentNameScopesList))}},g(F,"NULL",new F(null,0,0,0,!1,null,null,null)),F),Ki=class{constructor(t,e){g(this,"balancedBracketScopes");g(this,"unbalancedBracketScopes");g(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(r=>r==="*"?(this.allowAny=!0,[]):Ye(r,rt).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(r=>Ye(r,rt).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Zi=class{constructor(t,e,r,n){g(this,"_emitBinaryTokens");g(this,"_lineText");g(this,"_tokens");g(this,"_binaryTokens");g(this,"_lastTokenEndIndex");g(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=t,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var n;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(t==null?void 0:t.tokenAttributes)??0,s=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=(t==null?void 0:t.getScopeNames())??[];for(const a of this._tokenTypeOverrides)a.matcher(o)&&(i=Ie.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(i=Ie.set(i,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const r=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:r}),this._lastTokenEndIndex=e}getResult(t,e){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}getBinaryResult(t,e){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);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)r[n]=this._binaryTokens[n];return r}},Yi=class{constructor(t,e){g(this,"_grammars",new Map);g(this,"_rawGrammars",new Map);g(this,"_injectionGrammars",new Map);g(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,r,n,i){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,Xi(t,s,e,r,n,i,this,this._onigLib))}return this._grammars.get(t)}},es=class{constructor(e){g(this,"_options");g(this,"_syncRegistry");g(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new Yi(Ze.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,r){this._syncRegistry.setTheme(Ze.createFromRawTheme(e,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,r,n){return this.loadGrammarWithConfiguration(e,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,r,n){return this._loadGrammar(e,r,n.embeddedLanguages,n.tokenTypes,new Ki(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,r,n,i,s){const o=new Ti(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(e,r,n,i,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const r=this._options.loadGrammar(e);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(e,r=[],n=0,i=null){return this._syncRegistry.addGrammar(e,r),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,r=0,n=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(e,r,n,i,s)}},Ut=Ft.NULL;const ts=/["&'<>`]/g,rs=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ns=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,is=/[|\\{}()[\]^$+*?.]/g,Ir=new WeakMap;function ss(t,e){if(t=t.replace(e.subset?os(e.subset):ts,n),e.subset||e.escapeOnly)return t;return t.replace(rs,r).replace(ns,n);function r(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function n(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function os(t){let e=Ir.get(t);return e||(e=as(t),Ir.set(t,e)),e}function as(t){const e=[];let r=-1;for(;++r<t.length;)e.push(t[r].replace(is,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const cs=/[\dA-Fa-f]/;function ls(t,e,r){const n="&#x"+t.toString(16).toUpperCase();return r&&e&&!cs.test(String.fromCharCode(e))?n:n+";"}const us=/\d/;function ds(t,e,r){const n="&#"+String(t);return r&&e&&!us.test(String.fromCharCode(e))?n:n+";"}const ps=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ct={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},hs=["cent","copy","divide","gt","lt","not","para","times"],yn={}.hasOwnProperty,jt={};let Ue;for(Ue in Ct)yn.call(Ct,Ue)&&(jt[Ct[Ue]]=Ue);const fs=/[^\dA-Za-z]/;function ms(t,e,r,n){const i=String.fromCharCode(t);if(yn.call(jt,i)){const s=jt[i],o="&"+s;return r&&ps.includes(s)&&!hs.includes(s)&&(!n||e&&e!==61&&fs.test(String.fromCharCode(e)))?o:o+";"}return""}function gs(t,e,r){let n=ls(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=ms(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){const s=ds(t,e,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}function Ce(t,e){return ss(t,Object.assign({format:gs},e))}const _s=/^>|^->|<!--|-->|--!>|<!-$/g,ys=[">"],Es=["<",">"];function bs(t,e,r,n){return n.settings.bogusComments?"<?"+Ce(t.value,Object.assign({},n.settings.characterReferences,{subset:ys}))+">":"<!--"+t.value.replace(_s,i)+"-->";function i(s){return Ce(s,Object.assign({},n.settings.characterReferences,{subset:Es}))}}function ws(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}const k=bn(1),En=bn(-1),As=[];function bn(t){return e;function e(r,n,i){const s=r?r.children:As;let o=(n||0)+t,a=s[o];if(!i)for(;a&&Kt(a);)o+=t,a=s[o];return a}}const vs={}.hasOwnProperty;function wn(t){return e;function e(r,n,i){return vs.call(t,r.tagName)&&t[r.tagName](r,n,i)}}const Yt=wn({body:Is,caption:It,colgroup:It,dd:Ts,dt:Ls,head:It,html:Cs,li:Ss,optgroup:Ps,option:ks,p:Rs,rp:Rr,rt:Rr,tbody:xs,td:Sr,tfoot:Ds,th:Sr,thead:Os,tr:Ns});function It(t,e,r){const n=k(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Kt(n.value.charAt(0)))}function Cs(t,e,r){const n=k(r,e);return!n||n.type!=="comment"}function Is(t,e,r){const n=k(r,e);return!n||n.type!=="comment"}function Rs(t,e,r){const n=k(r,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function Ss(t,e,r){const n=k(r,e);return!n||n.type==="element"&&n.tagName==="li"}function Ls(t,e,r){const n=k(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function Ts(t,e,r){const n=k(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function Rr(t,e,r){const n=k(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function Ps(t,e,r){const n=k(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function ks(t,e,r){const n=k(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function Os(t,e,r){const n=k(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function xs(t,e,r){const n=k(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function Ds(t,e,r){return!k(r,e)}function Ns(t,e,r){const n=k(r,e);return!n||n.type==="element"&&n.tagName==="tr"}function Sr(t,e,r){const n=k(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const $s=wn({body:Gs,colgroup:Bs,head:Ms,html:Vs,tbody:Fs});function Vs(t){const e=k(t,-1);return!e||e.type!=="comment"}function Ms(t){const e=new Set;for(const n of t.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const r=t.children[0];return!r||r.type==="element"}function Gs(t){const e=k(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Kt(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Bs(t,e,r){const n=En(r,e),i=k(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&Yt(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Fs(t,e,r){const n=En(r,e),i=k(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&Yt(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const je={name:[[`
5
+ \f\r &/=>`.split(""),`
6
+ \f\r "&'/=>\``.split("")],[`\0
7
+ \f\r "&'/<=>`.split(""),`\0
8
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
9
+ \f\r &>`.split(""),`\0
10
+ \f\r "&'<=>\``.split("")],[`\0
11
+ \f\r "&'<=>\``.split(""),`\0
12
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Us(t,e,r,n){const i=n.schema,s=i.space==="svg"?!1:n.settings.omitOptionalTags;let o=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(t.tagName.toLowerCase());const a=[];let c;i.space==="html"&&t.tagName==="svg"&&(n.schema=tn);const l=js(n,t.properties),p=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);return n.schema=i,p&&(o=!1),(l||!s||!$s(t,e,r))&&(a.push("<",t.tagName,l?" "+l:""),o&&(i.space==="svg"||n.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!n.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(p),!o&&(!s||!Yt(t,e,r))&&a.push("</"+t.tagName+">"),a.join("")}function js(t,e){const r=[];let n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const s=Ws(t,i,e[i]);s&&r.push(s)}}for(;++n<r.length;){const s=t.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&s!=='"'&&s!=="'"&&(r[n]+=" ")}return r.join("")}function Ws(t,e,r){const n=li(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1;let o=t.quote,a;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const c=Ce(n.attribute,Object.assign({},t.settings.characterReferences,{subset:je.name[i][s]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?ui:di)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r)?c:(t.settings.preferUnquoted&&(a=Ce(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:je.unquoted[i][s]}))),a!==r&&(t.settings.quoteSmart&&gr(r,o)>gr(r,t.alternative)&&(o=t.alternative),a=o+Ce(r,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?je.single:je.double)[i][s],attribute:!0}))+o),c+(a&&"="+a))}const Hs=["<","&"];function An(t,e,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:Ce(t.value,Object.assign({},n.settings.characterReferences,{subset:Hs}))}function zs(t,e,r,n){return n.settings.allowDangerousHtml?t.value:An(t,e,r,n)}function qs(t,e,r,n){return n.all(t)}const Xs=pi("type",{invalid:Qs,unknown:Js,handlers:{comment:bs,doctype:ws,element:Us,raw:zs,root:qs,text:An}});function Qs(t){throw new Error("Expected node, not `"+t+"`")}function Js(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Ks={},Zs={},Ys=[];function eo(t,e){const r=e||Ks,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:to,all:ro,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||fi,characterReferences:r.characterReferences||Zs,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?tn:hi,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function to(t,e,r){return Xs(t,e,r,this)}function ro(t){const e=[],r=t&&t.children||Ys;let n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}function nt(t,e){const r=typeof t=="string"?{}:{...t.colorReplacements},n=typeof t=="string"?t:t.name;for(const[i,s]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof s=="string"?r[i]=s:i===n&&Object.assign(r,s);return r}function ae(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function no(t){return Array.isArray(t)?t:[t]}async function vn(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function er(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Cn(t){return t==="ansi"||er(t)}function tr(t){return t==="none"}function In(t){return tr(t)}function Rn(t,e){var n;if(!e)return t;t.properties||(t.properties={}),(n=t.properties).class||(n.class=[]),typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const r=Array.isArray(e)?e:e.split(/\s+/g);for(const i of r)i&&!t.properties.class.includes(i)&&t.properties.class.push(i);return t}function ut(t,e=!1){var s;if(t.length===0)return[["",0]];const r=t.split(/(\r?\n)/g);let n=0;const i=[];for(let o=0;o<r.length;o+=2){const a=e?r[o]+(r[o+1]||""):r[o];i.push([a,n]),n+=r[o].length,n+=((s=r[o+1])==null?void 0:s.length)||0}return i}function io(t){const e=ut(t,!0).map(([i])=>i);function r(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let s=i,o=0;for(const a of e){if(s<a.length)break;s-=a.length,o++}return{line:o,character:s}}function n(i,s){let o=0;for(let a=0;a<i;a++)o+=e[a].length;return o+=s,o}return{lines:e,indexToPos:r,posToIndex:n}}const rr="light-dark()",so=["color","background-color"];function oo(t,e){let r=0;const n=[];for(const i of e)i>r&&n.push({...t,content:t.content.slice(r,i),offset:t.offset+r}),r=i;return r<t.content.length&&n.push({...t,content:t.content.slice(r),offset:t.offset+r}),n}function ao(t,e){const r=Array.from(e instanceof Set?e:new Set(e)).sort((n,i)=>n-i);return r.length?t.map(n=>n.flatMap(i=>{const s=r.filter(o=>i.offset<o&&o<i.offset+i.content.length).map(o=>o-i.offset).sort((o,a)=>o-a);return s.length?oo(i,s):i})):t}function co(t,e,r,n,i="css-vars"){const s={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(p=>it(t.variants[p])),a=new Set(o.flatMap(p=>Object.keys(p))),c={},l=(p,d)=>{const h=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return r+e[p]+(d==="color"?"":h)};return o.forEach((p,d)=>{for(const h of a){const f=p[h]||"inherit";if(d===0&&n&&so.includes(h))if(n===rr&&o.length>1){const m=e.findIndex(w=>w==="light"),y=e.findIndex(w=>w==="dark");if(m===-1||y===-1)throw new L('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=o[m][h]||"inherit",E=o[y][h]||"inherit";c[h]=`light-dark(${b}, ${E})`,i==="css-vars"&&(c[l(d,h)]=f)}else c[h]=f;else i==="css-vars"&&(c[l(d,h)]=f)}}),s.htmlStyle=c,s}function it(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&N.Italic&&(e["font-style"]="italic"),t.fontStyle&N.Bold&&(e["font-weight"]="bold");const r=[];t.fontStyle&N.Underline&&r.push("underline"),t.fontStyle&N.Strikethrough&&r.push("line-through"),r.length&&(e["text-decoration"]=r.join(" "))}return e}function Wt(t){return typeof t=="string"?t:Object.entries(t).map(([e,r])=>`${e}:${r}`).join(";")}const Sn=new WeakMap;function dt(t,e){Sn.set(t,e)}function $e(t){return Sn.get(t)}class Re{constructor(...e){g(this,"_stacks",{});g(this,"lang");if(e.length===2){const[r,n]=e;this.lang=n,this._stacks=r}else{const[r,n,i]=e;this.lang=n,this._stacks={[i]:r}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,r){return new Re(Object.fromEntries(no(r).map(n=>[n,Ut])),e)}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return lo(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function lo(t){const e=[],r=new Set;function n(i){var o;if(r.has(i))return;r.add(i);const s=(o=i==null?void 0:i.nameScopesList)==null?void 0:o.scopeName;s&&e.push(s),i.parent&&n(i.parent)}return n(t),e}function uo(t,e){if(!(t instanceof Re))throw new L("Invalid grammar state");return t.getInternalStack(e)}function po(){const t=new WeakMap;function e(r){if(!t.has(r.meta)){let n=function(o){if(typeof o=="number"){if(o<0||o>r.source.length)throw new L(`Invalid decoration offset: ${o}. Code length: ${r.source.length}`);return{...i.indexToPos(o),offset:o}}else{const a=i.lines[o.line];if(a===void 0)throw new L(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${i.lines.length}`);let c=o.character;if(c<0&&(c=a.length+c),c<0||c>a.length)throw new L(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:c,offset:i.posToIndex(o.line,c)}}};const i=io(r.source),s=(r.options.decorations||[]).map(o=>({...o,start:n(o.start),end:n(o.end)}));ho(s),t.set(r.meta,{decorations:s,converter:i,source:r.source})}return t.get(r.meta)}return{name:"shiki:decorations",tokens(r){var o;if(!((o=this.options.decorations)!=null&&o.length))return;const i=e(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return ao(r,i)},code(r){var p;if(!((p=this.options.decorations)!=null&&p.length))return;const n=e(this),i=Array.from(r.children).filter(d=>d.type==="element"&&d.tagName==="span");if(i.length!==n.converter.lines.length)throw new L(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function s(d,h,f,m){const y=i[d];let b="",E=-1,w=-1;if(h===0&&(E=0),f===0&&(w=0),f===Number.POSITIVE_INFINITY&&(w=y.children.length),E===-1||w===-1)for(let A=0;A<y.children.length;A++)b+=Ln(y.children[A]),E===-1&&b.length===h&&(E=A+1),w===-1&&b.length===f&&(w=A+1);if(E===-1)throw new L(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(w===-1)throw new L(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const _=y.children.slice(E,w);if(!m.alwaysWrap&&_.length===y.children.length)a(y,m,"line");else if(!m.alwaysWrap&&_.length===1&&_[0].type==="element")a(_[0],m,"token");else{const A={type:"element",tagName:"span",properties:{},children:_};a(A,m,"wrapper"),y.children.splice(E,_.length,A)}}function o(d,h){i[d]=a(i[d],h,"line")}function a(d,h,f){var b;const m=h.properties||{},y=h.transform||(E=>E);return d.tagName=h.tagName||"span",d.properties={...d.properties,...m,class:d.properties.class},(b=h.properties)!=null&&b.class&&Rn(d,h.properties.class),d=y(d,f)||d,d}const c=[],l=n.decorations.sort((d,h)=>h.start.offset-d.start.offset||d.end.offset-h.end.offset);for(const d of l){const{start:h,end:f}=d;if(h.line===f.line)s(h.line,h.character,f.character,d);else if(h.line<f.line){s(h.line,h.character,Number.POSITIVE_INFINITY,d);for(let m=h.line+1;m<f.line;m++)c.unshift(()=>o(m,d));s(f.line,0,f.character,d)}}c.forEach(d=>d())}}}function ho(t){for(let e=0;e<t.length;e++){const r=t[e];if(r.start.offset>r.end.offset)throw new L(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=e+1;n<t.length;n++){const i=t[n],s=r.start.offset<=i.start.offset&&i.start.offset<r.end.offset,o=r.start.offset<i.end.offset&&i.end.offset<=r.end.offset,a=i.start.offset<=r.start.offset&&r.start.offset<i.end.offset,c=i.start.offset<r.end.offset&&r.end.offset<=i.end.offset;if(s||o||a||c){if(s&&o||a&&c||a&&r.start.offset===r.end.offset||o&&i.start.offset===i.end.offset)continue;throw new L(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function Ln(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(Ln).join(""):""}const fo=[po()];function st(t){const e=mo(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...fo]}function mo(t){const e=[],r=[],n=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:e,post:r,normal:n}}var pe=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Rt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function go(t,e){const r=t.indexOf("\x1B",e);if(r!==-1&&t[r+1]==="["){const n=t.indexOf("m",r);if(n!==-1)return{sequence:t.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:t.length}}function Lr(t){const e=t.shift();if(e==="2"){const r=t.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(e==="5"){const r=t.shift();if(r)return{type:"table",index:Number(r)}}}function _o(t){const e=[];for(;t.length>0;){const r=t.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)e.push({type:"resetAll"});else if(n<=9)Rt[n]&&e.push({type:"setDecoration",value:Rt[n]});else if(n<=29){const i=Rt[n-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)e.push({type:"setForegroundColor",value:{type:"named",name:pe[n-30]}});else if(n===38){const i=Lr(t);i&&e.push({type:"setForegroundColor",value:i})}else if(n===39)e.push({type:"resetForegroundColor"});else if(n<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:pe[n-40]}});else if(n===48){const i=Lr(t);i&&e.push({type:"setBackgroundColor",value:i})}else n===49?e.push({type:"resetBackgroundColor"}):n===53?e.push({type:"setDecoration",value:"overline"}):n===55?e.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?e.push({type:"setForegroundColor",value:{type:"named",name:pe[n-90+8]}}):n>=100&&n<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:pe[n-100+8]}})}return e}function yo(){let t=null,e=null,r=new Set;return{parse(n){const i=[];let s=0;do{const o=go(n,s),a=o.sequence?n.substring(s,o.startPosition):n.substring(s);if(a.length>0&&i.push({value:a,foreground:t,background:e,decorations:new Set(r)}),o.sequence){const c=_o(o.sequence);for(const l of c)l.type==="resetAll"?(t=null,e=null,r.clear()):l.type==="resetForegroundColor"?t=null:l.type==="resetBackgroundColor"?e=null:l.type==="resetDecoration"&&r.delete(l.value);for(const l of c)l.type==="setForegroundColor"?t=l.value:l.type==="setBackgroundColor"?e=l.value:l.type==="setDecoration"&&r.add(l.value)}s=o.position}while(s<n.length);return i}}}var Eo={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function bo(t=Eo){function e(a){return t[a]}function r(a){return`#${a.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let n;function i(){if(n)return n;n=[];for(let l=0;l<pe.length;l++)n.push(e(pe[l]));let a=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let p=0;p<6;p++)for(let d=0;d<6;d++)n.push(r([a[l],a[p],a[d]]));let c=8;for(let l=0;l<24;l++,c+=10)n.push(r([c,c,c]));return n}function s(a){return i()[a]}function o(a){switch(a.type){case"named":return e(a.name);case"rgb":return r(a.rgb);case"table":return s(a.index)}}return{value:o}}const wo={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Ao(t,e,r){const n=nt(t,r),i=ut(e),s=Object.fromEntries(pe.map(c=>{var d;const l=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,p=(d=t.colors)==null?void 0:d[l];return[c,p||wo[c]]})),o=bo(s),a=yo();return i.map(c=>a.parse(c[0]).map(l=>{let p,d;l.decorations.has("reverse")?(p=l.background?o.value(l.background):t.bg,d=l.foreground?o.value(l.foreground):t.fg):(p=l.foreground?o.value(l.foreground):t.fg,d=l.background?o.value(l.background):void 0),p=ae(p,n),d=ae(d,n),l.decorations.has("dim")&&(p=vo(p));let h=N.None;return l.decorations.has("bold")&&(h|=N.Bold),l.decorations.has("italic")&&(h|=N.Italic),l.decorations.has("underline")&&(h|=N.Underline),l.decorations.has("strikethrough")&&(h|=N.Strikethrough),{content:l.value,offset:c[1],color:p,bgColor:d,fontStyle:h}}))}function vo(t){const e=t.match(/#([0-9a-f]{3,8})/i);if(e){const n=e[1];if(n.length===8){const i=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${i}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const i=n[0],s=n[1],o=n[2],a=n[3],c=Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${s}${s}${o}${o}${c}`}else if(n.length===3){const i=n[0],s=n[1],o=n[2];return`#${i}${i}${s}${s}${o}${o}80`}}}const r=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:t}function nr(t,e,r={}){const{theme:n=t.getLoadedThemes()[0]}=r,i=t.resolveLangAlias(r.lang||"text");if(er(i)||tr(n))return ut(e).map(c=>[{content:c[0],offset:c[1]}]);const{theme:s,colorMap:o}=t.setTheme(n);if(i==="ansi")return Ao(s,e,r);const a=t.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==a.name)throw new L(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${a.name}"`);if(!r.grammarState.themes.includes(s.name))throw new L(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Io(e,a,s,o,r)}function Co(...t){if(t.length===2)return $e(t[1]);const[e,r,n={}]=t,{lang:i="text",theme:s=e.getLoadedThemes()[0]}=n;if(er(i)||tr(s))throw new L("Plain language does not have grammar state");if(i==="ansi")throw new L("ANSI language does not have grammar state");const{theme:o,colorMap:a}=e.setTheme(s),c=e.getLanguage(i);return new Re(ir(r,c,o,a,n).stateStack,c.name,o.name)}function Io(t,e,r,n,i){const s=ir(t,e,r,n,i),o=new Re(s.stateStack,e.name,r.name);return dt(s.tokens,o),s.tokens}function ir(t,e,r,n,i){const s=nt(r,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,c=ut(t);let l=i.grammarState?uo(i.grammarState,r.name)??Ut:i.grammarContextCode!=null?ir(i.grammarContextCode,e,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ut,p=[];const d=[];for(let h=0,f=c.length;h<f;h++){const[m,y]=c[h];if(m===""){p=[],d.push([]);continue}if(o>0&&m.length>=o){p=[],d.push([{content:m,offset:y,color:"",fontStyle:0}]);continue}let b,E,w;i.includeExplanation&&(b=e.tokenizeLine(m,l,a),E=b.tokens,w=0);const _=e.tokenizeLine2(m,l,a),A=_.tokens.length/2;for(let v=0;v<A;v++){const R=_.tokens[2*v],I=v+1<A?_.tokens[2*v+2]:m.length;if(R===I)continue;const $=_.tokens[2*v+1],V=ae(n[Ie.getForeground($)],s),q=Ie.getFontStyle($),re={content:m.substring(R,I),offset:y+R,color:V,fontStyle:q};if(i.includeExplanation){const G=[];if(i.includeExplanation!=="scopeName")for(const J of r.settings){let _e;switch(typeof J.scope){case"string":_e=J.scope.split(/,/).map(yt=>yt.trim());break;case"object":_e=J.scope;break;default:continue}G.push({settings:J,selectors:_e.map(yt=>yt.split(/ /))})}re.explanation=[];let hr=0;for(;R+hr<I;){const J=E[w],_e=m.substring(J.startIndex,J.endIndex);hr+=_e.length,re.explanation.push({content:_e,scopes:i.includeExplanation==="scopeName"?Ro(J.scopes):So(G,J.scopes)}),w+=1}}p.push(re)}d.push(p),p=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Ro(t){return t.map(e=>({scopeName:e}))}function So(t,e){const r=[];for(let n=0,i=e.length;n<i;n++){const s=e[n];r[n]={scopeName:s,themeMatches:To(t,s,e.slice(0,n))}}return r}function Tr(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Lo(t,e,r){if(!Tr(t[t.length-1],e))return!1;let n=t.length-2,i=r.length-1;for(;n>=0&&i>=0;)Tr(t[n],r[i])&&(n-=1),i-=1;return n===-1}function To(t,e,r){const n=[];for(const{selectors:i,settings:s}of t)for(const o of i)if(Lo(o,e,r)){n.push(s);break}return n}function Tn(t,e,r){const n=Object.entries(r.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),i=n.map(c=>{const l=nr(t,e,{...r,theme:c.theme}),p=$e(l),d=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:l,state:p,theme:d}}),s=Po(...i.map(c=>c.tokens)),o=s[0].map((c,l)=>c.map((p,d)=>{const h={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in r&&r.includeExplanation&&(h.explanation=p.explanation),s.forEach((f,m)=>{const{content:y,explanation:b,offset:E,...w}=f[l][d];h.variants[n[m].color]=w}),h})),a=i[0].state?new Re(Object.fromEntries(i.map(c=>{var l;return[c.theme,(l=c.state)==null?void 0:l.getInternalStack(c.theme)]})),i[0].state.lang):void 0;return a&&dt(o,a),o}function Po(...t){const e=t.map(()=>[]),r=t.length;for(let n=0;n<t[0].length;n++){const i=t.map(c=>c[n]),s=e.map(()=>[]);e.forEach((c,l)=>c.push(s[l]));const o=i.map(()=>0),a=i.map(c=>c[0]);for(;a.every(c=>c);){const c=Math.min(...a.map(l=>l.content.length));for(let l=0;l<r;l++){const p=a[l];p.content.length===c?(s[l].push(p),o[l]+=1,a[l]=i[l][o[l]]):(s[l].push({...p,content:p.content.slice(0,c)}),a[l]={...p,content:p.content.slice(c),offset:p.offset+c})}}}return e}function ot(t,e,r){let n,i,s,o,a,c;if("themes"in r){const{defaultColor:l="light",cssVariablePrefix:p="--shiki-",colorsRendering:d="css-vars"}=r,h=Object.entries(r.themes).filter(E=>E[1]).map(E=>({color:E[0],theme:E[1]})).sort((E,w)=>E.color===l?-1:w.color===l?1:0);if(h.length===0)throw new L("`themes` option must not be empty");const f=Tn(t,e,r);if(c=$e(f),l&&rr!==l&&!h.find(E=>E.color===l))throw new L(`\`themes\` option must contain the defaultColor key \`${l}\``);const m=h.map(E=>t.getTheme(E.theme)),y=h.map(E=>E.color);s=f.map(E=>E.map(w=>co(w,y,p,l,d))),c&&dt(s,c);const b=h.map(E=>nt(E.theme,r));i=Pr(h,m,b,p,l,"fg",d),n=Pr(h,m,b,p,l,"bg",d),o=`shiki-themes ${m.map(E=>E.name).join(" ")}`,a=l?void 0:[i,n].join(";")}else if("theme"in r){const l=nt(r.theme,r);s=nr(t,e,r);const p=t.getTheme(r.theme);n=ae(p.bg,l),i=ae(p.fg,l),o=p.name,c=$e(s)}else throw new L("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:n,themeName:o,rootStyle:a,grammarState:c}}function Pr(t,e,r,n,i,s,o){return t.map((a,c)=>{const l=ae(e[c][s],r[c])||"inherit",p=`${n+a.color}${s==="bg"?"-bg":""}:${l}`;if(c===0&&i){if(i===rr&&t.length>1){const d=t.findIndex(y=>y.color==="light"),h=t.findIndex(y=>y.color==="dark");if(d===-1||h===-1)throw new L('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const f=ae(e[d][s],r[d])||"inherit",m=ae(e[h][s],r[h])||"inherit";return`light-dark(${f}, ${m});${p}`}return l}return o==="css-vars"?p:null}).filter(a=>!!a).join(";")}function at(t,e,r,n={meta:{},options:r,codeToHast:(i,s)=>at(t,i,s),codeToTokens:(i,s)=>ot(t,i,s)}){var m,y;let i=e;for(const b of st(r))i=((m=b.preprocess)==null?void 0:m.call(n,i,r))||i;let{tokens:s,fg:o,bg:a,themeName:c,rootStyle:l,grammarState:p}=ot(t,i,r);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=r;d===!0?s=Oo(s):d==="never"&&(s=xo(s)),h&&(s=Do(s));const f={...n,get source(){return i}};for(const b of st(r))s=((y=b.tokens)==null?void 0:y.call(f,s))||s;return ko(s,{...r,fg:o,bg:a,themeName:c,rootStyle:r.rootStyle===!1?!1:r.rootStyle??l},f,p)}function ko(t,e,r,n=$e(t)){var y,b,E,w;const i=st(e),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:c="0"}=e,l={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?l.style=e.rootStyle:l.style=`background-color:${e.bg};color:${e.fg}`),c!==!1&&c!=null&&(l.tabindex=c.toString());for(const[_,A]of Object.entries(e.meta||{}))_.startsWith("_")||(l[_]=A);let p={type:"element",tagName:"pre",properties:l,children:[],data:e.data},d={type:"element",tagName:"code",properties:{},children:s};const h=[],f={...r,structure:a,addClassToHast:Rn,get source(){return r.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return p},get code(){return d},get lines(){return h}};if(t.forEach((_,A)=>{var I,$;A&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
13
+ `}));let v={type:"element",tagName:"span",properties:{class:"line"},children:[]},R=0;for(const V of _){let q={type:"element",tagName:"span",properties:{...V.htmlAttrs},children:[{type:"text",value:V.content}]};const re=Wt(V.htmlStyle||it(V));re&&(q.properties.style=re);for(const G of i)q=((I=G==null?void 0:G.span)==null?void 0:I.call(f,q,A+1,R,v,V))||q;a==="inline"?o.children.push(q):a==="classic"&&v.children.push(q),R+=V.content.length}if(a==="classic"){for(const V of i)v=(($=V==null?void 0:V.line)==null?void 0:$.call(f,v,A+1))||v;h.push(v),s.push(v)}else a==="inline"&&h.push(v)}),a==="classic"){for(const _ of i)d=((y=_==null?void 0:_.code)==null?void 0:y.call(f,d))||d;p.children.push(d);for(const _ of i)p=((b=_==null?void 0:_.pre)==null?void 0:b.call(f,p))||p;o.children.push(p)}else if(a==="inline"){const _=[];let A={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const I of o.children)I.type==="element"&&I.tagName==="br"?(_.push(A),A={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(I.type==="element"||I.type==="text")&&A.children.push(I);_.push(A);let R={type:"element",tagName:"code",properties:{},children:_};for(const I of i)R=((E=I==null?void 0:I.code)==null?void 0:E.call(f,R))||R;o.children=[];for(let I=0;I<R.children.length;I++){I>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const $=R.children[I];$.type==="element"&&o.children.push(...$.children)}}let m=o;for(const _ of i)m=((w=_==null?void 0:_.root)==null?void 0:w.call(f,m))||m;return n&&dt(m,n),m}function Oo(t){return t.map(e=>{const r=[];let n="",i;return e.forEach((s,o)=>{const c=!(s.fontStyle&&(s.fontStyle&N.Underline||s.fontStyle&N.Strikethrough));c&&s.content.match(/^\s+$/)&&e[o+1]?(i===void 0&&(i=s.offset),n+=s.content):n?(c?r.push({...s,offset:i,content:n+s.content}):r.push({content:n,offset:i},s),i=void 0,n=""):r.push(s)}),r})}function xo(t){return t.map(e=>e.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const n=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return r;const[,i,s,o]=n;if(!i&&!o)return r;const a=[{...r,offset:r.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:r.offset}),o&&a.push({content:o,offset:r.offset+i.length+s.length}),a}))}function Do(t){return t.map(e=>{const r=[];for(const n of e){if(r.length===0){r.push({...n});continue}const i=r[r.length-1],s=Wt(i.htmlStyle||it(i)),o=Wt(n.htmlStyle||it(n)),a=i.fontStyle&&(i.fontStyle&N.Underline||i.fontStyle&N.Strikethrough),c=n.fontStyle&&(n.fontStyle&N.Underline||n.fontStyle&N.Strikethrough);!a&&!c&&s===o?i.content+=n.content:r.push({...n})}return r})}const No=eo;function $o(t,e,r){var s;const n={meta:{},options:r,codeToHast:(o,a)=>at(t,o,a),codeToTokens:(o,a)=>ot(t,o,a)};let i=No(at(t,e,r,n));for(const o of st(r))i=((s=o.postprocess)==null?void 0:s.call(n,i,r))||i;return i}const kr={light:"#333333",dark:"#bbbbbb"},Or={light:"#fffffe",dark:"#1e1e1e"},xr="__shiki_resolved";function sr(t){var a,c,l,p,d;if(t!=null&&t[xr])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:r,fg:n}=e;if(!r||!n){const h=e.settings?e.settings.find(f=>!f.name&&!f.scope):void 0;(a=h==null?void 0:h.settings)!=null&&a.foreground&&(n=h.settings.foreground),(c=h==null?void 0:h.settings)!=null&&c.background&&(r=h.settings.background),!n&&((l=e==null?void 0:e.colors)!=null&&l["editor.foreground"])&&(n=e.colors["editor.foreground"]),!r&&((p=e==null?void 0:e.colors)!=null&&p["editor.background"])&&(r=e.colors["editor.background"]),n||(n=e.type==="light"?kr.light:kr.dark),r||(r=e.type==="light"?Or.light:Or.dark),e.fg=n,e.bg=r}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const s=new Map;function o(h){var m;if(s.has(h))return s.get(h);i+=1;const f=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(m=e.colorReplacements)!=null&&m[`#${f}`]?o(h):(s.set(h,f),f)}e.settings=e.settings.map(h=>{var b,E;const f=((b=h.settings)==null?void 0:b.foreground)&&!h.settings.foreground.startsWith("#"),m=((E=h.settings)==null?void 0:E.background)&&!h.settings.background.startsWith("#");if(!f&&!m)return h;const y={...h,settings:{...h.settings}};if(f){const w=o(h.settings.foreground);e.colorReplacements[w]=h.settings.foreground,y.settings.foreground=w}if(m){const w=o(h.settings.background);e.colorReplacements[w]=h.settings.background,y.settings.background=w}return y});for(const h of Object.keys(e.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!((d=e.colors[h])!=null&&d.startsWith("#"))){const f=o(e.colors[h]);e.colorReplacements[f]=e.colors[h],e.colors[h]=f}return Object.defineProperty(e,xr,{enumerable:!1,writable:!1,value:!0}),e}async function Pn(t){return Array.from(new Set((await Promise.all(t.filter(e=>!Cn(e)).map(async e=>await vn(e).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function kn(t){return(await Promise.all(t.map(async r=>In(r)?null:sr(await vn(r))))).filter(r=>!!r)}let Vo=3;function Mo(t,e=3){e>Vo||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let ve=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function On(t,e){if(!e)return t;if(e[t]){const r=new Set([t]);for(;e[t];){if(t=e[t],r.has(t))throw new ve(`Circular alias \`${Array.from(r).join(" -> ")} -> ${t}\``);r.add(t)}}return t}class Go extends es{constructor(r,n,i,s={}){super(r);g(this,"_resolvedThemes",new Map);g(this,"_resolvedGrammars",new Map);g(this,"_langMap",new Map);g(this,"_langGraph",new Map);g(this,"_textmateThemeCache",new WeakMap);g(this,"_loadedThemesCache",null);g(this,"_loadedLanguagesCache",null);this._resolver=r,this._themes=n,this._langs=i,this._alias=s,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(r){return typeof r=="string"?this._resolvedThemes.get(r):this.loadTheme(r)}loadTheme(r){const n=sr(r);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(r){let n=this._textmateThemeCache.get(r);n||(n=Ze.createFromRawTheme(r),this._textmateThemeCache.set(r,n)),this._syncRegistry.setTheme(n)}getGrammar(r){return r=On(r,this._alias),this._resolvedGrammars.get(r)}loadLanguage(r){var o,a,c,l;if(this.getGrammar(r.name))return;const n=new Set([...this._langMap.values()].filter(p=>{var d;return(d=p.embeddedLangsLazy)==null?void 0:d.includes(r.name)}));this._resolver.addLanguage(r);const i={balancedBracketSelectors:r.balancedBracketSelectors||["*"],unbalancedBracketSelectors:r.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(r.scopeName,r);const s=this.loadGrammarWithConfiguration(r.scopeName,1,i);if(s.name=r.name,this._resolvedGrammars.set(r.name,s),r.aliases&&r.aliases.forEach(p=>{this._alias[p]=r.name}),this._loadedLanguagesCache=null,n.size)for(const p of n)this._resolvedGrammars.delete(p.name),this._loadedLanguagesCache=null,(a=(o=this._syncRegistry)==null?void 0:o._injectionGrammars)==null||a.delete(p.scopeName),(l=(c=this._syncRegistry)==null?void 0:c._grammars)==null||l.delete(p.scopeName),this.loadLanguage(this._langMap.get(p.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(r){for(const s of r)this.resolveEmbeddedLanguages(s);const n=Array.from(this._langGraph.entries()),i=n.filter(([s,o])=>!o);if(i.length){const s=n.filter(([o,a])=>{if(!a)return!1;const c=a.embeddedLanguages||a.embeddedLangs;return c==null?void 0:c.some(l=>i.map(([p])=>p).includes(l))}).filter(o=>!i.includes(o));throw new ve(`Missing languages ${i.map(([o])=>`\`${o}\``).join(", ")}, required by ${s.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[s,o]of n)this._resolver.addLanguage(o);for(const[s,o]of n)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(r){this._langMap.set(r.name,r),this._langGraph.set(r.name,r);const n=r.embeddedLanguages??r.embeddedLangs;if(n)for(const i of n)this._langGraph.set(i,this._langMap.get(i))}}class Bo{constructor(e,r){g(this,"_langs",new Map);g(this,"_scopeToLang",new Map);g(this,"_injections",new Map);g(this,"_onigLib");this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(r=>{this._langs.set(r,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(e.scopeName)})}getInjections(e){const r=e.split(".");let n=[];for(let i=1;i<=r.length;i++){const s=r.slice(0,i).join(".");n=[...n,...this._injections.get(s)||[]]}return n}}let Te=0;function Fo(t){Te+=1,t.warnings!==!1&&Te>=10&&Te%10===0&&console.warn(`[Shiki] ${Te} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new ve("`engine` option is required for synchronous mode");const r=(t.langs||[]).flat(1),n=(t.themes||[]).flat(1).map(sr),i=new Bo(t.engine,r),s=new Go(i,n,r,t.langAlias);let o;function a(_){return On(_,t.langAlias)}function c(_){E();const A=s.getGrammar(typeof _=="string"?_:_.name);if(!A)throw new ve(`Language \`${_}\` not found, you may need to load it first`);return A}function l(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};E();const A=s.getTheme(_);if(!A)throw new ve(`Theme \`${_}\` not found, you may need to load it first`);return A}function p(_){E();const A=l(_);o!==_&&(s.setTheme(A),o=_);const v=s.getColorMap();return{theme:A,colorMap:v}}function d(){return E(),s.getLoadedThemes()}function h(){return E(),s.getLoadedLanguages()}function f(..._){E(),s.loadLanguages(_.flat(1))}async function m(..._){return f(await Pn(_))}function y(..._){E();for(const A of _.flat(1))s.loadTheme(A)}async function b(..._){return E(),y(await kn(_))}function E(){if(e)throw new ve("Shiki instance has been disposed")}function w(){e||(e=!0,s.dispose(),Te-=1)}return{setTheme:p,getTheme:l,getLanguage:c,getLoadedThemes:d,getLoadedLanguages:h,resolveLangAlias:a,loadLanguage:m,loadLanguageSync:f,loadTheme:b,loadThemeSync:y,dispose:w,[Symbol.dispose]:w}}async function Uo(t){t.engine||Mo("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,r,n]=await Promise.all([kn(t.themes||[]),Pn(t.langs||[]),t.engine]);return Fo({...t,themes:e,langs:r,engine:n})}async function jo(t){const e=await Uo(t);return{getLastGrammarState:(...r)=>Co(e,...r),codeToTokensBase:(r,n)=>nr(e,r,n),codeToTokensWithThemes:(r,n)=>Tn(e,r,n),codeToTokens:(r,n)=>ot(e,r,n),codeToHast:(r,n)=>at(e,r,n),codeToHtml:(r,n)=>$o(e,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Wo(t){const e=t.langs,r=t.themes,n=t.engine;async function i(s){function o(d){var h;if(typeof d=="string"){if(d=((h=s.langAlias)==null?void 0:h[d])||d,Cn(d))return[];const f=e[d];if(!f)throw new L(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function a(d){if(In(d))return"none";if(typeof d=="string"){const h=r[d];if(!h)throw new L(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return h}return d}const c=(s.themes??[]).map(d=>a(d)),l=(s.langs??[]).map(d=>o(d)),p=await jo({engine:s.engine??n(),...s,themes:c,langs:l});return{...p,loadLanguage(...d){return p.loadLanguage(...d.map(o))},loadTheme(...d){return p.loadTheme(...d.map(a))},getBundledLanguages(){return e},getBundledThemes(){return r}}}return i}const or=[{id:"abap",name:"ABAP",import:(()=>u(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>u(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>u(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>u(()=>import("./angular-html-CU67Zn6k.js").then(t=>t.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>u(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>u(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>u(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>u(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>u(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>u(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>u(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>u(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>u(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>u(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>u(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>u(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>u(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>u(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>u(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>u(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>u(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>u(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>u(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>u(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>u(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>u(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>u(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>u(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>u(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>u(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>u(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>u(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>u(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>u(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>u(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>u(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>u(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>u(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>u(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>u(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>u(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>u(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>u(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>u(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>u(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>u(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>u(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>u(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>u(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>u(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>u(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>u(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>u(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>u(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>u(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>u(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>u(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>u(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>u(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>u(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>u(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>u(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>u(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>u(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>u(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>u(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>u(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>u(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>u(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>u(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>u(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>u(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>u(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>u(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>u(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>u(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>u(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>u(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>u(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>u(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>u(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>u(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>u(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>u(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>u(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>u(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>u(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>u(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>u(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>u(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>u(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>u(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>u(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>u(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>u(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>u(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>u(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>u(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>u(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>u(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>u(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>u(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>u(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>u(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>u(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>u(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>u(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>u(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>u(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>u(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>u(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>u(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>u(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>u(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>u(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>u(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>u(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>u(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>u(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>u(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>u(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>u(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>u(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>u(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>u(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>u(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>u(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>u(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>u(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>u(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>u(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>u(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>u(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>u(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>u(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>u(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>u(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>u(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>u(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>u(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>u(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>u(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>u(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>u(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>u(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>u(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>u(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>u(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>u(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>u(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>u(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>u(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>u(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>u(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>u(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>u(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>u(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>u(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>u(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>u(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>u(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>u(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>u(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>u(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>u(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>u(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>u(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>u(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>u(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>u(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>u(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>u(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>u(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>u(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>u(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>u(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>u(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>u(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>u(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>u(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>u(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>u(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>u(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>u(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>u(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>u(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>u(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>u(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>u(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>u(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>u(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>u(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>u(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>u(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>u(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>u(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>u(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>u(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>u(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>u(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>u(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>u(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>u(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>u(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>u(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>u(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>u(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>u(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>u(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>u(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>u(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>u(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>u(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>u(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>u(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>u(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>u(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>u(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>u(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>u(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>u(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>u(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>u(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>u(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>u(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>u(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>u(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>u(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>u(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>u(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>u(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>u(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>u(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>u(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>u(()=>import("./zig-VOosw3JB.js"),[]))}],Ho=Object.fromEntries(or.map(t=>[t.id,t.import])),zo=Object.fromEntries(or.flatMap(t=>{var e;return((e=t.aliases)==null?void 0:e.map(r=>[r,t.import]))||[]})),xn={...Ho,...zo},qo=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>u(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>u(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>u(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>u(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>u(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>u(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>u(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>u(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>u(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>u(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>u(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>u(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>u(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>u(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>u(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>u(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>u(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>u(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>u(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>u(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>u(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>u(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>u(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>u(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>u(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>u(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>u(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>u(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>u(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>u(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>u(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>u(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>u(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>u(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>u(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>u(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>u(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>u(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>u(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>u(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>u(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>u(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>u(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>u(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>u(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>u(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>u(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>u(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>u(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>u(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>u(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>u(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>u(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>u(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>u(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>u(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>u(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>u(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>u(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>u(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>u(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>u(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],Xo=Object.fromEntries(qo.map(t=>[t.id,t.import]));class ar extends Error{constructor(e){super(e),this.name="ShikiError"}}function Qo(){return 2147483648}function Jo(){return typeof performance<"u"?performance.now():Date.now()}const Ko=(t,e)=>t+(e-t%e)%e;async function Zo(t){let e,r;const n={};function i(f){r=f,n.HEAPU8=new Uint8Array(f),n.HEAPU32=new Uint32Array(f)}function s(f,m,y){n.HEAPU8.copyWithin(f,m,m+y)}function o(f){try{return e.grow(f-r.byteLength+65535>>>16),i(e.buffer),1}catch{}}function a(f){const m=n.HEAPU8.length;f=f>>>0;const y=Qo();if(f>y)return!1;for(let b=1;b<=4;b*=2){let E=m*(1+.2/b);E=Math.min(E,f+100663296);const w=Math.min(y,Ko(Math.max(f,E),65536));if(o(w))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(f,m,y=1024){const b=m+y;let E=m;for(;f[E]&&!(E>=b);)++E;if(E-m>16&&f.buffer&&c)return c.decode(f.subarray(m,E));let w="";for(;m<E;){let _=f[m++];if(!(_&128)){w+=String.fromCharCode(_);continue}const A=f[m++]&63;if((_&224)===192){w+=String.fromCharCode((_&31)<<6|A);continue}const v=f[m++]&63;if((_&240)===224?_=(_&15)<<12|A<<6|v:_=(_&7)<<18|A<<12|v<<6|f[m++]&63,_<65536)w+=String.fromCharCode(_);else{const R=_-65536;w+=String.fromCharCode(55296|R>>10,56320|R&1023)}}return w}function p(f,m){return f?l(n.HEAPU8,f,m):""}const d={emscripten_get_now:Jo,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function h(){const m=await t({env:d,wasi_snapshot_preview1:d});e=m.memory,i(e.buffer),Object.assign(n,m),n.UTF8ToString=p}return await h(),n}var Yo=Object.defineProperty,ea=(t,e,r)=>e in t?Yo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T=(t,e,r)=>ea(t,typeof e!="symbol"?e+"":e,r);let O=null;function ta(t){throw new ar(t.UTF8ToString(t.getLastOnigError()))}class pt{constructor(e){T(this,"utf16Length"),T(this,"utf8Length"),T(this,"utf16Value"),T(this,"utf8Value"),T(this,"utf16OffsetToUtf8"),T(this,"utf8OffsetToUtf16");const r=e.length,n=pt._utf8ByteLength(e),i=n!==r,s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const a=new Uint8Array(n);let c=0;for(let l=0;l<r;l++){const p=e.charCodeAt(l);let d=p,h=!1;if(p>=55296&&p<=56319&&l+1<r){const f=e.charCodeAt(l+1);f>=56320&&f<=57343&&(d=(p-55296<<10)+65536|f-56320,h=!0)}i&&(s[l]=c,h&&(s[l+1]=c),d<=127?o[c+0]=l:d<=2047?(o[c+0]=l,o[c+1]=l):d<=65535?(o[c+0]=l,o[c+1]=l,o[c+2]=l):(o[c+0]=l,o[c+1]=l,o[c+2]=l,o[c+3]=l)),d<=127?a[c++]=d:d<=2047?(a[c++]=192|(d&1984)>>>6,a[c++]=128|(d&63)>>>0):d<=65535?(a[c++]=224|(d&61440)>>>12,a[c++]=128|(d&4032)>>>6,a[c++]=128|(d&63)>>>0):(a[c++]=240|(d&1835008)>>>18,a[c++]=128|(d&258048)>>>12,a[c++]=128|(d&4032)>>>6,a[c++]=128|(d&63)>>>0),h&&l++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let r=0;for(let n=0,i=e.length;n<i;n++){const s=e.charCodeAt(n);let o=s,a=!1;if(s>=55296&&s<=56319&&n+1<i){const c=e.charCodeAt(n+1);c>=56320&&c<=57343&&(o=(s-55296<<10)+65536|c-56320,a=!0)}o<=127?r+=1:o<=2047?r+=2:o<=65535?r+=3:r+=4,a&&n++}return r}createString(e){const r=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,r),r}}const ht=class Q{constructor(e){if(T(this,"id",++Q.LAST_ID),T(this,"_onigBinding"),T(this,"content"),T(this,"utf16Length"),T(this,"utf8Length"),T(this,"utf16OffsetToUtf8"),T(this,"utf8OffsetToUtf16"),T(this,"ptr"),!O)throw new ar("Must invoke loadWasm first.");this._onigBinding=O,this.content=e;const r=new pt(e);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!Q._sharedPtrInUse?(Q._sharedPtr||(Q._sharedPtr=O.omalloc(1e4)),Q._sharedPtrInUse=!0,O.HEAPU8.set(r.utf8Value,Q._sharedPtr),this.ptr=Q._sharedPtr):this.ptr=r.createString(O)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===Q._sharedPtr?Q._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};T(ht,"LAST_ID",0);T(ht,"_sharedPtr",0);T(ht,"_sharedPtrInUse",!1);let Dn=ht;class ra{constructor(e){if(T(this,"_onigBinding"),T(this,"_ptr"),!O)throw new ar("Must invoke loadWasm first.");const r=[],n=[];for(let a=0,c=e.length;a<c;a++){const l=new pt(e[a]);r[a]=l.createString(O),n[a]=l.utf8Length}const i=O.omalloc(4*e.length);O.HEAPU32.set(r,i/4);const s=O.omalloc(4*e.length);O.HEAPU32.set(n,s/4);const o=O.createOnigScanner(i,s,e.length);for(let a=0,c=e.length;a<c;a++)O.ofree(r[a]);O.ofree(s),O.ofree(i),o===0&&ta(O),this._onigBinding=O,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,r,n){let i=0;if(typeof n=="number"&&(i=n),typeof e=="string"){e=new Dn(e);const s=this._findNextMatchSync(e,r,!1,i);return e.dispose(),s}return this._findNextMatchSync(e,r,!1,i)}_findNextMatchSync(e,r,n,i){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(r),i);if(o===0)return null;const a=s.HEAPU32;let c=o/4;const l=a[c++],p=a[c++],d=[];for(let h=0;h<p;h++){const f=e.convertUtf8OffsetToUtf16(a[c++]),m=e.convertUtf8OffsetToUtf16(a[c++]);d[h]={start:f,end:m,length:m-f}}return{index:l,captureIndices:d}}}function na(t){return typeof t.instantiator=="function"}function ia(t){return typeof t.default=="function"}function sa(t){return typeof t.data<"u"}function oa(t){return typeof Response<"u"&&t instanceof Response}function aa(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let We;function ca(t){if(We)return We;async function e(){O=await Zo(async r=>{let n=t;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),na(n)?n=await n.instantiator(r):ia(n)?n=await n.default(r):(sa(n)&&(n=n.data),oa(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await la(n)(r):n=await ua(n)(r):aa(n)?n=await St(n)(r):n instanceof WebAssembly.Module?n=await St(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await St(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return We=e(),We}function St(t){return e=>WebAssembly.instantiate(t,e)}function la(t){return e=>WebAssembly.instantiateStreaming(t,e)}function ua(t){return async e=>{const r=await t.arrayBuffer();return WebAssembly.instantiate(r,e)}}async function da(t){return t&&await ca(t),{createScanner(e){return new ra(e.map(r=>typeof r=="string"?r:r.source))},createString(e){return new Dn(e)}}}const pa=Wo({langs:xn,themes:Xo,engine:()=>da(u(()=>import("./wasm-CG6Dc4jp.js"),[]))});function Se(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function ha(t,e,r){return t.has(e)||t.set(e,r),t.get(e)}const cr=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),x=String.raw;function Le(t,e){if(t==null)throw new Error(e??"Value expected");return t}const Nn=x`\[\^?`,$n=`c.? | C(?:-.?)?|${x`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${x`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${x`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${x`o\{[^\}]*\}?`}|${x`\d{1,3}`}`,lr=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,He=new RegExp(x`
14
+ \\ (?:
15
+ ${$n}
16
+ | [gk]<[^>]*>?
17
+ | [gk]'[^']*'?
18
+ | .
19
+ )
20
+ | \( (?:
21
+ \? (?:
22
+ [:=!>({]
23
+ | <[=!]
24
+ | <[^>]*>
25
+ | '[^']*'
26
+ | ~\|?
27
+ | #(?:[^)\\]|\\.?)*
28
+ | [^:)]*[:)]
29
+ )?
30
+ | \*[^\)]*\)?
31
+ )?
32
+ | (?:${lr.source})+
33
+ | ${Nn}
34
+ | .
35
+ `.replace(/\s+/g,""),"gsu"),Lt=new RegExp(x`
36
+ \\ (?:
37
+ ${$n}
38
+ | .
39
+ )
40
+ | \[:(?:\^?\p{Alpha}+|\^):\]
41
+ | ${Nn}
42
+ | &&
43
+ | .
44
+ `.replace(/\s+/g,""),"gsu");function fa(t,e={}){const r={flags:"",...e,rules:{captureGroup:!1,singleline:!1,...e.rules}};if(typeof t!="string")throw new Error("String expected as pattern");const n=xa(r.flags),i=[n.extended],s={captureGroup:r.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(d){i.push(d)},replaceCurrentModX(d){i[i.length-1]=d},singleline:r.rules.singleline};let o=[],a;for(He.lastIndex=0;a=He.exec(t);){const d=ma(s,t,a[0],He.lastIndex);d.tokens?o.push(...d.tokens):d.token&&o.push(d.token),d.lastIndex!==void 0&&(He.lastIndex=d.lastIndex)}const c=[];let l=0;o.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++l:d.raw==="("&&c.push(d)}),l||c.forEach((d,h)=>{d.kind="capturing",d.number=h+1});const p=l||c.length;return{tokens:o.map(d=>d.type==="EscapedNumber"?Na(d,p):d).flat(),flags:n}}function ma(t,e,r,n){const[i,s]=r;if(r==="["||r==="[^"){const o=ga(e,r,n);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(s))return{token:Dr(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:Ra(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:Mn(r)}}if(s==="K")return{token:Gn("keep",r)};if(s==="N"||s==="R")return{token:he("newline",r,{negate:s==="N"})};if(s==="O")return{token:he("any",r)};if(s==="X")return{token:he("text_segment",r)};const o=Vn(r,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(i==="("){if(s==="*")return{token:Pa(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(e[n]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:Ta(r,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,r==="("&&!t.captureGroup||r==="(?:")return{token:we("group",r)};if(r==="(?>")return{token:we("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:we(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&t.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:we("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:we("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:va(r)}}if(t.getCurrentModX()){if(r==="#"){const o=e.indexOf(`
45
+ `,n);return{lastIndex:o===-1?e.length:o}}if(/^\s$/.test(r)){const o=/\s+/y;return o.lastIndex=n,{lastIndex:o.exec(e)?o.lastIndex:n}}}if(r===".")return{token:he("dot",r)};if(r==="^"||r==="$"){const o=t.singleline?{"^":x`\A`,$:x`\Z`}[r]:r;return{token:Dr(o,r)}}return r==="|"?{token:ya(r)}:lr.test(r)?{tokens:$a(r)}:{token:te(Se(r),r)}}function ga(t,e,r){const n=[Nr(e[1]==="^",e)];let i=1,s;for(Lt.lastIndex=r;s=Lt.exec(t);){const o=s[0];if(o[0]==="["&&o[1]!==":")i++,n.push(Nr(o[1]==="^",o));else if(o==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(te(93,o));else if(i--,n.push(Ea(o)),!i)break}else{const a=_a(o);Array.isArray(a)?n.push(...a):n.push(a)}}return{tokens:n,lastIndex:Lt.lastIndex||t.length}}function _a(t){if(t[0]==="\\")return Vn(t,{inCharClass:!0});if(t[0]==="["){const e=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!e||!cr.has(e.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return he("posix",t,{value:e.groups.name,negate:!!e.groups.negate})}return t==="-"?ba(t):t==="&&"?wa(t):te(Se(t),t)}function Vn(t,{inCharClass:e}){const r=t[1];if(r==="c"||r==="C")return La(t);if("dDhHsSwW".includes(r))return ka(t);if(t.startsWith(x`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return Oa(t)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(t))try{const n=t.split(/\\x/).slice(1).map(o=>parseInt(o,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),s=new TextEncoder;return[...i].map(o=>{const a=[...s.encode(o)].map(c=>`\\x${c.toString(16)}`).join("");return te(Se(o),a)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return te(Da(t),t);if($r.has(r))return te($r.get(r),t);if(/\d/.test(r))return Aa(e,t);if(t==="\\")throw new Error(x`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return te(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function ya(t){return{type:"Alternator",raw:t}}function Dr(t,e){return{type:"Assertion",kind:t,raw:e}}function Mn(t){return{type:"Backreference",raw:t}}function te(t,e){return{type:"Character",value:t,raw:e}}function Ea(t){return{type:"CharacterClassClose",raw:t}}function ba(t){return{type:"CharacterClassHyphen",raw:t}}function wa(t){return{type:"CharacterClassIntersector",raw:t}}function Nr(t,e){return{type:"CharacterClassOpen",negate:t,raw:e}}function he(t,e,r={}){return{type:"CharacterSet",kind:t,...r,raw:e}}function Gn(t,e,r={}){return t==="keep"?{type:"Directive",kind:t,raw:e}:{type:"Directive",kind:t,flags:Le(r.flags),raw:e}}function Aa(t,e){return{type:"EscapedNumber",inCharClass:t,raw:e}}function va(t){return{type:"GroupClose",raw:t}}function we(t,e,r={}){return{type:"GroupOpen",kind:t,...r,raw:e}}function Ca(t,e,r,n){return{type:"NamedCallout",kind:t,tag:e,arguments:r,raw:n}}function Ia(t,e,r,n){return{type:"Quantifier",kind:t,min:e,max:r,raw:n}}function Ra(t){return{type:"Subroutine",raw:t}}const Sa=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),$r=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function La(t){const e=t[1]==="c"?t[2]:t[3];if(!e||!/[A-Za-z]/.test(e))throw new Error(`Unsupported control character "${t}"`);return te(Se(e.toUpperCase())-64,t)}function Ta(t,e){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;n??(n="");const i=(e.getCurrentModX()||r.includes("x"))&&!n.includes("x"),s=Mr(r),o=Mr(n),a={};if(s&&(a.enable=s),o&&(a.disable=o),t.endsWith(")"))return e.replaceCurrentModX(i),Gn("flags",t,{flags:a});if(t.endsWith(":"))return e.pushModX(i),e.numOpenGroups++,we("group",t,{...(s||o)&&{flags:a}});throw new Error(`Unexpected flag modifier "${t}"`)}function Pa(t){const e=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!e)throw new Error(`Incomplete or invalid named callout "${t}"`);const{name:r,tag:n,args:i}=e.groups;if(!r)throw new Error(`Invalid named callout "${t}"`);if(n==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);const s=i?i.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[o,a,c]=s,l=Sa.has(r)?r.toLowerCase():"custom";switch(l){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof o=="string")throw new Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(s.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${l}"`)}return Ca(l,n??null,(i==null?void 0:i.split(","))??null,t)}function Vr(t){let e=null,r,n;if(t[0]==="{"){const{minStr:i,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,o=1e5;if(+i>o||s&&+s>o)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+i,n=s===void 0?+i:s===""?1/0:+s,r>n&&(e="possessive",[r,n]=[n,r]),t.endsWith("?")){if(e==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');e="lazy"}else e||(e="greedy")}else r=t[0]==="+"?1:0,n=t[0]==="?"?1:1/0,e=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return Ia(e,r,n,t)}function ka(t){const e=t[1].toLowerCase();return he({d:"digit",h:"hex",s:"space",w:"word"}[e],t,{negate:t[1]!==e})}function Oa(t){const{p:e,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return he("property",t,{value:n,negate:e==="P"&&!r||e==="p"&&!!r})}function Mr(t){const e={};return t.includes("i")&&(e.ignoreCase=!0),t.includes("m")&&(e.dotAll=!0),t.includes("x")&&(e.extended=!0),Object.keys(e).length?e:null}function xa(t){const e={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<t.length;r++){const n=t[r];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(t.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');e.textSegmentMode=t[r+2]==="g"?"grapheme":"word",r+=3;continue}e[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return e}function Da(t){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(t))throw new Error(`Incomplete or invalid escape "${t}"`);const e=t[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(t).groups.hex:t.slice(2);return parseInt(e,16)}function Na(t,e){const{raw:r,inCharClass:n}=t,i=r.slice(1);if(!n&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=e))return[Mn(r)];const s=[],o=i.match(/^[0-7]+|\d/g);for(let a=0;a<o.length;a++){const c=o[a];let l;if(a===0&&c!=="8"&&c!=="9"){if(l=parseInt(c,8),l>127)throw new Error(x`Octal encoded byte above 177 unsupported "${r}"`)}else l=Se(c);s.push(te(l,(a===0?"\\":"")+c))}return s}function $a(t){const e=[],r=new RegExp(lr,"gy");let n;for(;n=r.exec(t);){const i=n[0];if(i[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(s){const{min:o,max:a}=s.groups;if(+o>+a&&i.endsWith("?")){r.lastIndex--,e.push(Vr(i.slice(0,-1)));continue}}}e.push(Vr(i))}return e}function Bn(t,e){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;const r=t.body[0];return!e||Object.keys(e).every(n=>e[n]===r[n])}function Va(t){return Ma.has(t.type)}const Ma=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Fn(t,e={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e,rules:{captureGroup:!1,singleline:!1,...e.rules}},n=fa(t,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),i=(h,f)=>{const m=n.tokens[s.nextIndex];switch(s.parent=h,s.nextIndex++,m.type){case"Alternator":return ge();case"Assertion":return Ga(m);case"Backreference":return Ba(m,s);case"Character":return ft(m.value,{useLastValid:!!f.isCheckingRangeEnd});case"CharacterClassHyphen":return Fa(m,s,f);case"CharacterClassOpen":return Ua(m,s,f);case"CharacterSet":return ja(m,s);case"Directive":return Qa(m.kind,{flags:m.flags});case"GroupOpen":return Wa(m,s,f);case"NamedCallout":return Ka(m.kind,m.tag,m.arguments);case"Quantifier":return Ha(m,s);case"Subroutine":return za(m,s);default:throw new Error(`Unexpected token type "${m.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:i},o=Ya(Ja(n.flags));let a=o.body[0];for(;s.nextIndex<n.tokens.length;){const h=i(a,{});h.type==="Alternative"?(o.body.push(h),a=h):a.body.push(h)}const{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:p,subroutines:d}=s;if(l&&p.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:h}of d)if(typeof h=="number"){if(h>c.length)throw new Error("Subroutine uses a group number that's not defined");h&&(c[h-1].isSubroutined=!0)}else if(p.has(h)){if(p.get(h).length>1)throw new Error(x`Subroutine uses a duplicate group name "\g<${h}>"`);p.get(h)[0].isSubroutined=!0}else throw new Error(x`Subroutine uses a group name that's not defined "\g<${h}>"`);return o}function Ga({kind:t}){return Ht(Le({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[t],`Unexpected assertion kind "${t}"`),{negate:t===x`\B`||t===x`\Y`})}function Ba({raw:t},e){const r=/^\\k[<']/.test(t),n=r?t.slice(3,-1):t.slice(1),i=(s,o=!1)=>{const a=e.capturingGroups.length;let c=!1;if(s>a)if(e.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,zt(o?a+1-s:s,{orphan:c})};if(r){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(s)return i(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(n))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(n))throw new Error(`Group name not defined to the left "${t}"`);return zt(n)}return i(+n)}function Fa(t,e,r){const{tokens:n,walk:i}=e,s=e.parent,o=s.body.at(-1),a=n[e.nextIndex];if(!r.isCheckingRangeEnd&&o&&o.type!=="CharacterClass"&&o.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){const c=i(s,{...r,isCheckingRangeEnd:!0});if(o.type==="Character"&&c.type==="Character")return s.body.pop(),Xa(o,c);throw new Error("Invalid character class range")}return ft(Se("-"))}function Ua({negate:t},e,r){const{tokens:n,walk:i}=e,s=[Je()],o=n[e.nextIndex];let a=Fr(o);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")s.push(Je()),e.nextIndex++;else{const l=s.at(-1);l.body.push(i(l,r))}a=Fr(n[e.nextIndex],o)}const c=Je({negate:t});return s.length===1?c.body=s[0].body:(c.kind="intersection",c.body=s.map(l=>l.body.length===1?l.body[0]:l)),e.nextIndex++,c}function ja({kind:t,negate:e,value:r},n){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o}=n;if(t==="property"){const a=mt(r);if(cr.has(a)&&!(o!=null&&o.has(a)))t="posix",r=a;else return Ae(r,{negate:e,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o})}return t==="posix"?Za(r,{negate:e}):qt(t,{negate:e})}function Wa(t,e,r){const{tokens:n,capturingGroups:i,namedGroupsByName:s,skipLookbehindValidation:o,walk:a}=e,c=ec(t),l=c.type==="AbsenceFunction",p=Br(c),d=p&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&ha(s,c.name,[]).push(c)),l&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let h=Ur(n[e.nextIndex]);for(;h.type!=="GroupClose";){if(h.type==="Alternator")c.body.push(ge()),e.nextIndex++;else{const f=c.body.at(-1),m=a(f,{...r,isInAbsenceFunction:r.isInAbsenceFunction||l,isInLookbehind:r.isInLookbehind||p,isInNegLookbehind:r.isInNegLookbehind||d});if(f.body.push(m),(p||r.isInLookbehind)&&!o){const y="Lookbehind includes a pattern not allowed by Oniguruma";if(d||r.isInNegLookbehind){if(Gr(m)||m.type==="CapturingGroup")throw new Error(y)}else if(Gr(m)||Br(m)&&m.negate)throw new Error(y)}}h=Ur(n[e.nextIndex])}return e.nextIndex++,c}function Ha({kind:t,min:e,max:r},n){const i=n.parent,s=i.body.at(-1);if(!s||!Va(s))throw new Error("Quantifier requires a repeatable token");const o=jn(t,e,r,s);return i.body.pop(),o}function za({raw:t},e){const{capturingGroups:r,subroutines:n}=e;let i=t.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(s){const a=+s.groups.num,c=r.length;if(e.hasNumberedRef=!0,i={"":a,"+":c+a,"-":c+1-a}[s.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const o=Wn(i);return n.push(o),o}function qa(t,e){return{type:"AbsenceFunction",kind:t,body:Be(e==null?void 0:e.body)}}function ge(t){return{type:"Alternative",body:Hn(t==null?void 0:t.body)}}function Ht(t,e){const r={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(r.negate=!!(e!=null&&e.negate)),r}function zt(t,e){const r=!!(e!=null&&e.orphan);return{type:"Backreference",ref:t,...r&&{orphan:r}}}function Un(t,e){const r={name:void 0,isSubroutined:!1,...e};if(r.name!==void 0&&!tc(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:Be(e==null?void 0:e.body)}}function ft(t,e){const r={useLastValid:!1,...e};if(t>1114111){const n=t.toString(16);if(r.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:t}}function Je(t){const e={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:e.kind,negate:e.negate,body:Hn(t==null?void 0:t.body)}}function Xa(t,e){if(e.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:e}}function qt(t,e){const r=!!(e!=null&&e.negate),n={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(n.negate=r),(t==="text_segment"||t==="newline"&&!r)&&(n.variableLength=!0),n}function Qa(t,e={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:Le(e.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function Ja(t){return{type:"Flags",...t}}function H(t){const e=t==null?void 0:t.atomic,r=t==null?void 0:t.flags;if(e&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...e&&{atomic:e},...r&&{flags:r},body:Be(t==null?void 0:t.body)}}function de(t){const e={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:e.behind?"lookbehind":"lookahead",negate:e.negate,body:Be(t==null?void 0:t.body)}}function Ka(t,e,r){return{type:"NamedCallout",kind:t,tag:e,arguments:r}}function Za(t,e){const r=!!(e!=null&&e.negate);if(!cr.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:r}}function jn(t,e,r,n){if(e>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:e,max:r,body:n}}function Ya(t,e){return{type:"Regex",body:Be(e==null?void 0:e.body),flags:t}}function Wn(t){return{type:"Subroutine",ref:t}}function Ae(t,e){var i;const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e};let n=(i=r.unicodePropertyMap)==null?void 0:i.get(mt(t));if(!n){if(r.normalizeUnknownPropertyNames)n=rc(t);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(x`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:n??t,negate:r.negate}}function ec({flags:t,kind:e,name:r,negate:n,number:i}){switch(e){case"absence_repeater":return qa("repeater");case"atomic":return H({atomic:!0});case"capturing":return Un(i,{name:r});case"group":return H({flags:t});case"lookahead":case"lookbehind":return de({behind:e==="lookbehind",negate:n});default:throw new Error(`Unexpected group kind "${e}"`)}}function Be(t){if(t===void 0)t=[ge()];else if(!Array.isArray(t)||!t.length||!t.every(e=>e.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function Hn(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return t}function Gr(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function Br(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function tc(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function rc(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function mt(t){return t.replace(/[- _]+/g,"").toLowerCase()}function Fr(t,e){const r=e;return Le(t,`Unclosed character class${(r==null?void 0:r.type)==="Character"&&r.value===93&&r.raw==="]"?' (started with "]")':""}`)}function Ur(t){return Le(t,"Unclosed group")}function Oe(t,e,r=null){function n(s,o){for(let a=0;a<s.length;a++){const c=i(s[a],o,a,s);a=Math.max(-1,a+c)}}function i(s,o=null,a=null,c=null){var E,w;let l=0,p=!1;const d={node:s,parent:o,key:a,container:c,root:t,remove(){ze(c).splice(Math.max(0,ye(a)+l),1),l--,p=!0},removeAllNextSiblings(){return ze(c).splice(ye(a)+1)},removeAllPrevSiblings(){const _=ye(a)+l;return l-=_,ze(c).splice(0,Math.max(0,_))},replaceWith(_,A={}){const v=!!A.traverse;c?c[Math.max(0,ye(a)+l)]=_:Le(o,"Can't replace root node")[a]=_,v&&i(_,o,a,c),p=!0},replaceWithMultiple(_,A={}){const v=!!A.traverse;if(ze(c).splice(Math.max(0,ye(a)+l),1,..._),l+=_.length-1,v){let R=0;for(let I=0;I<_.length;I++)R+=i(_[I],o,ye(a)+I+R,c)}p=!0},skip(){p=!0}},{type:h}=s,f=e["*"],m=e[h],y=typeof f=="function"?f:f==null?void 0:f.enter,b=typeof m=="function"?m:m==null?void 0:m.enter;if(y==null||y(d,r),b==null||b(d,r),!p)switch(h){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":n(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(s.min,s,"min"),i(s.max,s,"max");break;case"Quantifier":i(s.body,s,"body");break;case"Regex":n(s.body,s),i(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${h}"`)}return(E=m==null?void 0:m.exit)==null||E.call(m,d,r),(w=f==null?void 0:f.exit)==null||w.call(f,d,r),l}return i(t),t}function ze(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function ye(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}const nc=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function ic(t,e){for(let r=0;r<t.length;r++)t[r]>=e&&t[r]++}function sc(t,e,r,n){return t.slice(0,e)+n+t.slice(e+r.length)}const j=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function ur(t,e,r,n){const i=new RegExp(String.raw`${e}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let o=0,a="";for(const c of t.matchAll(i)){const{0:l,groups:{$skip:p}}=c;if(!p&&(!n||n===j.DEFAULT==!o)){r instanceof Function?a+=r(c,{context:o?j.CHAR_CLASS:j.DEFAULT,negated:s[s.length-1]}):a+=r;continue}l[0]==="["?(o++,s.push(l[1]==="^")):l==="]"&&o&&(o--,s.pop()),a+=l}return a}function zn(t,e,r,n){ur(t,e,r,n)}function oc(t,e,r=0,n){if(!new RegExp(e,"su").test(t))return null;const i=new RegExp(`${e}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=r;let s=0,o;for(;o=i.exec(t);){const{0:a,groups:{$skip:c}}=o;if(!c&&(!n||n===j.DEFAULT==!s))return o;a==="["?s++:a==="]"&&s&&s--,i.lastIndex==o.index&&i.lastIndex++}return null}function qe(t,e,r){return!!oc(t,e,0,r)}function ac(t,e){const r=/\\?./gsu;r.lastIndex=e;let n=t.length,i=0,s=1,o;for(;o=r.exec(t);){const[a]=o;if(a==="[")i++;else if(i)a==="]"&&i--;else if(a==="(")s++;else if(a===")"&&(s--,!s)){n=o.index;break}}return t.slice(e,n)}const jr=new RegExp(String.raw`(?<noncapturingStart>${nc})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function cc(t,e){const r=(e==null?void 0:e.hiddenCaptures)??[];let n=(e==null?void 0:e.captureTransfers)??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:n,hiddenCaptures:r};const i="(?>",s="(?:(?=(",o=[0],a=[];let c=0,l=0,p=NaN,d;do{d=!1;let h=0,f=0,m=!1,y;for(jr.lastIndex=Number.isNaN(p)?0:p+s.length;y=jr.exec(t);){const{0:b,index:E,groups:{capturingStart:w,noncapturingStart:_}}=y;if(b==="[")h++;else if(h)b==="]"&&h--;else if(b===i&&!m)p=E,m=!0;else if(m&&_)f++;else if(w)m?f++:(c++,o.push(c+l));else if(b===")"&&m){if(!f){l++;const A=c+l;if(t=`${t.slice(0,p)}${s}${t.slice(p+i.length,E)}))<$$${A}>)${t.slice(E+1)}`,d=!0,a.push(A),ic(r,A),n.size){const v=new Map;n.forEach((R,I)=>{v.set(I>=A?I+1:I,R.map($=>$>=A?$+1:$))}),n=v}break}f--}}}while(d);return r.push(...a),t=ur(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:h,groups:{backrefNum:f,wrappedBackrefNum:m}})=>{if(f){const y=+f;if(y>o.length-1)throw new Error(`Backref "${h}" greater than number of captures`);return`\\${o[y]}`}return`\\${m}`},j.DEFAULT),{pattern:t,captureTransfers:n,hiddenCaptures:r}}const qn=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Tt=new RegExp(String.raw`
46
+ \\(?: \d+
47
+ | c[A-Za-z]
48
+ | [gk]<[^>]+>
49
+ | [pPu]\{[^\}]+\}
50
+ | u[A-Fa-f\d]{4}
51
+ | x[A-Fa-f\d]{2}
52
+ )
53
+ | \((?: \? (?: [:=!>]
54
+ | <(?:[=!]|[^>]+>)
55
+ | [A-Za-z\-]+:
56
+ | \(DEFINE\)
57
+ ))?
58
+ | (?<qBase>${qn})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
59
+ | \\?.
60
+ `.replace(/\s+/g,""),"gsu");function lc(t){if(!new RegExp(`${qn}\\+`).test(t))return{pattern:t};const e=[];let r=null,n=null,i="",s=0,o;for(Tt.lastIndex=0;o=Tt.exec(t);){const{0:a,index:c,groups:{qBase:l,qMod:p,invalidQ:d}}=o;if(a==="[")s||(n=c),s++;else if(a==="]")s?s--:n=null;else if(!s)if(p==="+"&&i&&!i.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${a}"`);let h=-1;if(/^\{\d+\}$/.test(l))t=sc(t,c+l.length,p,"");else{if(i===")"||i==="]"){const f=i===")"?r:n;if(f===null)throw new Error(`Invalid unmatched "${i}"`);t=`${t.slice(0,f)}(?>${t.slice(f,c)}${l})${t.slice(c+a.length)}`}else t=`${t.slice(0,c-i.length)}(?>${i}${l})${t.slice(c+a.length)}`;h+=4}Tt.lastIndex+=h}else a[0]==="("?e.push(c):a===")"&&(r=e.length?e.pop():null);i=a}return{pattern:t}}const U=String.raw,uc=U`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Xt=U`\(\?R=(?<rDepth>[^\)]+)\)|${uc}`,gt=U`\(\?<(?![=!])(?<captureName>[^>]+)>`,Xn=U`${gt}|(?<unnamed>\()(?!\?)`,ue=new RegExp(U`${gt}|${Xt}|\(\?|\\?.`,"gsu"),Pt="Cannot use multiple overlapping recursions";function dc(t,e){const{hiddenCaptures:r,mode:n}={hiddenCaptures:[],mode:"plugin",...e};let i=(e==null?void 0:e.captureTransfers)??new Map;if(!new RegExp(Xt,"su").test(t))return{pattern:t,captureTransfers:i,hiddenCaptures:r};if(n==="plugin"&&qe(t,U`\(\?\(DEFINE\)`,j.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],o=qe(t,U`\\[1-9]`,j.DEFAULT),a=new Map,c=[];let l=!1,p=0,d=0,h;for(ue.lastIndex=0;h=ue.exec(t);){const{0:f,groups:{captureName:m,rDepth:y,gRNameOrNum:b,gRDepth:E}}=h;if(f==="[")p++;else if(p)f==="]"&&p--;else if(y){if(Wr(y),l)throw new Error(Pt);if(o)throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const w=t.slice(0,h.index),_=t.slice(ue.lastIndex);if(qe(_,Xt,j.DEFAULT))throw new Error(Pt);const A=+y-1;t=Hr(w,_,A,!1,r,s,d),i=qr(i,w,A,s.length,0,d);break}else if(b){Wr(E);let w=!1;for(const G of c)if(G.name===b||G.num===+b){if(w=!0,G.hasRecursedWithin)throw new Error(Pt);break}if(!w)throw new Error(U`Recursive \g cannot be used outside the referenced group "${n==="external"?b:U`\g<${b}&R=${E}>`}"`);const _=a.get(b),A=ac(t,_);if(o&&qe(A,U`${gt}|\((?!\?)`,j.DEFAULT))throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const v=t.slice(_,h.index),R=A.slice(v.length+f.length),I=s.length,$=+E-1,V=Hr(v,R,$,!0,r,s,d);i=qr(i,v,$,s.length-I,I,d);const q=t.slice(0,_),re=t.slice(_+A.length);t=`${q}${V}${re}`,ue.lastIndex+=V.length-f.length-v.length-R.length,c.forEach(G=>G.hasRecursedWithin=!0),l=!0}else if(m)d++,a.set(String(d),ue.lastIndex),a.set(m,ue.lastIndex),c.push({num:d,name:m});else if(f[0]==="("){const w=f==="(";w&&(d++,a.set(String(d),ue.lastIndex)),c.push(w?{num:d}:{})}else f===")"&&c.pop()}return r.push(...s),{pattern:t,captureTransfers:i,hiddenCaptures:r}}function Wr(t){const e=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(e);if(t=+t,t<2||t>100)throw new Error(e)}function Hr(t,e,r,n,i,s,o){const a=new Set;n&&zn(t+e,gt,({groups:{captureName:l}})=>{a.add(l)},j.DEFAULT);const c=[r,n?a:null,i,s,o];return`${t}${zr(`(?:${t}`,"forward",...c)}(?:)${zr(`${e})`,"backward",...c)}${e}`}function zr(t,e,r,n,i,s,o){const c=p=>e==="forward"?p+2:r-p+2-1;let l="";for(let p=0;p<r;p++){const d=c(p);l+=ur(t,U`${Xn}|\\k<(?<backref>[^>]+)>`,({0:h,groups:{captureName:f,unnamed:m,backref:y}})=>{if(y&&n&&!n.has(y))return h;const b=`_$${d}`;if(m||f){const E=o+s.length+1;return s.push(E),pc(i,E),m?h:`(?<${f}${b}>`}return U`\k<${y}${b}>`},j.DEFAULT)}return l}function pc(t,e){for(let r=0;r<t.length;r++)t[r]>=e&&t[r]++}function qr(t,e,r,n,i,s){if(t.size&&n){let o=0;zn(e,Xn,()=>o++,j.DEFAULT);const a=s-o+i,c=new Map;return t.forEach((l,p)=>{const d=(n-o*r)/r,h=o*r,f=p>a+o?p+n:p,m=[];for(const y of l)if(y<=a)m.push(y);else if(y>a+o+d)m.push(y+n);else if(y<=a+o)for(let b=0;b<=r;b++)m.push(y+o*b);else for(let b=0;b<=r;b++)m.push(y+h+d*b);c.set(f,m)}),c}return t}var P=String.fromCodePoint,C=String.raw,z={},_t=globalThis.RegExp;z.flagGroups=(()=>{try{new _t("(?i:)")}catch{return!1}return!0})();z.unicodeSets=(()=>{try{new _t("[[]]","v")}catch{return!1}return!0})();z.bugFlagVLiteralHyphenIsRange=z.unicodeSets?(()=>{try{new _t(C`[\d\-a]`,"v")}catch{return!0}return!1})():!1;z.bugNestedClassIgnoresNegation=z.unicodeSets&&new _t("[[^a]]","v").test("a");function ct(t,{enable:e,disable:r}){return{dotAll:!(r!=null&&r.dotAll)&&!!(e!=null&&e.dotAll||t.dotAll),ignoreCase:!(r!=null&&r.ignoreCase)&&!!(e!=null&&e.ignoreCase||t.ignoreCase)}}function Ve(t,e,r){return t.has(e)||t.set(e,r),t.get(e)}function Qt(t,e){return Xr[t]>=Xr[e]}function hc(t,e){if(t==null)throw new Error(e??"Value expected");return t}var Xr={ES2025:2025,ES2024:2024,ES2018:2018},fc={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function Qn(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!fc[t.target])throw new Error(`Unexpected target "${t.target}"`);const e={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return e.target==="auto"&&(e.target=z.flagGroups?"ES2025":z.unicodeSets?"ES2024":"ES2018"),e}var mc="[ -\r ]",gc=new Set([P(304),P(305)]),K=C`[\p{L}\p{M}\p{N}\p{Pc}]`;function Jn(t){if(gc.has(t))return[t];const e=new Set,r=t.toLowerCase(),n=r.toUpperCase(),i=Ec.get(r),s=_c.get(r),o=yc.get(r);return[...n].length===1&&e.add(n),o&&e.add(o),i&&e.add(i),e.add(r),s&&e.add(s),[...e]}var dr=new Map(`C Other
61
+ Cc Control cntrl
62
+ Cf Format
63
+ Cn Unassigned
64
+ Co Private_Use
65
+ Cs Surrogate
66
+ L Letter
67
+ LC Cased_Letter
68
+ Ll Lowercase_Letter
69
+ Lm Modifier_Letter
70
+ Lo Other_Letter
71
+ Lt Titlecase_Letter
72
+ Lu Uppercase_Letter
73
+ M Mark Combining_Mark
74
+ Mc Spacing_Mark
75
+ Me Enclosing_Mark
76
+ Mn Nonspacing_Mark
77
+ N Number
78
+ Nd Decimal_Number digit
79
+ Nl Letter_Number
80
+ No Other_Number
81
+ P Punctuation punct
82
+ Pc Connector_Punctuation
83
+ Pd Dash_Punctuation
84
+ Pe Close_Punctuation
85
+ Pf Final_Punctuation
86
+ Pi Initial_Punctuation
87
+ Po Other_Punctuation
88
+ Ps Open_Punctuation
89
+ S Symbol
90
+ Sc Currency_Symbol
91
+ Sk Modifier_Symbol
92
+ Sm Math_Symbol
93
+ So Other_Symbol
94
+ Z Separator
95
+ Zl Line_Separator
96
+ Zp Paragraph_Separator
97
+ Zs Space_Separator
98
+ ASCII
99
+ ASCII_Hex_Digit AHex
100
+ Alphabetic Alpha
101
+ Any
102
+ Assigned
103
+ Bidi_Control Bidi_C
104
+ Bidi_Mirrored Bidi_M
105
+ Case_Ignorable CI
106
+ Cased
107
+ Changes_When_Casefolded CWCF
108
+ Changes_When_Casemapped CWCM
109
+ Changes_When_Lowercased CWL
110
+ Changes_When_NFKC_Casefolded CWKCF
111
+ Changes_When_Titlecased CWT
112
+ Changes_When_Uppercased CWU
113
+ Dash
114
+ Default_Ignorable_Code_Point DI
115
+ Deprecated Dep
116
+ Diacritic Dia
117
+ Emoji
118
+ Emoji_Component EComp
119
+ Emoji_Modifier EMod
120
+ Emoji_Modifier_Base EBase
121
+ Emoji_Presentation EPres
122
+ Extended_Pictographic ExtPict
123
+ Extender Ext
124
+ Grapheme_Base Gr_Base
125
+ Grapheme_Extend Gr_Ext
126
+ Hex_Digit Hex
127
+ IDS_Binary_Operator IDSB
128
+ IDS_Trinary_Operator IDST
129
+ ID_Continue IDC
130
+ ID_Start IDS
131
+ Ideographic Ideo
132
+ Join_Control Join_C
133
+ Logical_Order_Exception LOE
134
+ Lowercase Lower
135
+ Math
136
+ Noncharacter_Code_Point NChar
137
+ Pattern_Syntax Pat_Syn
138
+ Pattern_White_Space Pat_WS
139
+ Quotation_Mark QMark
140
+ Radical
141
+ Regional_Indicator RI
142
+ Sentence_Terminal STerm
143
+ Soft_Dotted SD
144
+ Terminal_Punctuation Term
145
+ Unified_Ideograph UIdeo
146
+ Uppercase Upper
147
+ Variation_Selector VS
148
+ White_Space space
149
+ XID_Continue XIDC
150
+ XID_Start XIDS`.split(/\s/).map(t=>[mt(t),t])),_c=new Map([["s",P(383)],[P(383),"s"]]),yc=new Map([[P(223),P(7838)],[P(107),P(8490)],[P(229),P(8491)],[P(969),P(8486)]]),Ec=new Map([ne(453),ne(456),ne(459),ne(498),...kt(8072,8079),...kt(8088,8095),...kt(8104,8111),ne(8124),ne(8140),ne(8188)]),bc=new Map([["alnum",C`[\p{Alpha}\p{Nd}]`],["alpha",C`\p{Alpha}`],["ascii",C`\p{ASCII}`],["blank",C`[\p{Zs}\t]`],["cntrl",C`\p{Cc}`],["digit",C`\p{Nd}`],["graph",C`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",C`\p{Lower}`],["print",C`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",C`[\p{P}\p{S}]`],["space",C`\p{space}`],["upper",C`\p{Upper}`],["word",C`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",C`\p{AHex}`]]);function wc(t,e){const r=[];for(let n=t;n<=e;n++)r.push(n);return r}function ne(t){const e=P(t);return[e.toLowerCase(),e]}function kt(t,e){return wc(t,e).map(r=>ne(r))}var Kn=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Ac(t,e){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...e};Zn(t);const n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Qt(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};Oe(t,vc,n);const i={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},s={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};Oe(t,Cc,s);const o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Oe(t,Ic,o),t._originMap=s.groupOriginByCopy,t._strategy=n.strategy,t}var vc={AbsenceFunction({node:t,parent:e,replaceWith:r}){const{body:n,kind:i}=t;if(i==="repeater"){const s=H();s.body[0].body.push(de({negate:!0,body:n}),Ae("Any"));const o=H();o.body[0].body.push(jn("greedy",0,1/0,s)),r(S(o,e),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:e,key:r},{flagDirectivesByAlt:n}){const i=t.body.filter(s=>s.kind==="flags");for(let s=r+1;s<e.body.length;s++){const o=e.body[s];Ve(n,o,[]).push(...i)}},exit({node:t},{flagDirectivesByAlt:e}){var r;if((r=e.get(t))!=null&&r.length){const n=ei(e.get(t));if(n){const i=H({flags:n});i.body[0].body=t.body,t.body=[S(i,t)]}}}},Assertion({node:t,parent:e,key:r,container:n,root:i,remove:s,replaceWith:o},a){const{kind:c,negate:l}=t,{asciiWordBoundaries:p,avoidSubclass:d,supportedGNodes:h,wordIsAscii:f}=a;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${l?"Y":"y"}"`);if(c==="line_end")o(S(de({body:[ge({body:[Ht("string_end")]}),ge({body:[ft(10)]})]}),e));else if(c==="line_start")o(S(Z(C`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),e));else if(c==="search_start")if(h.has(t))i.flags.sticky=!0,s();else{const m=n[r-1];if(m&&kc(m))o(S(de({negate:!0}),e));else{if(d)throw new Error(C`Uses "\G" in a way that requires a subclass`);o(ie(Ht("string_start"),e)),a.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")o(S(Z(C`(?=\n?\z)`),e));else if(c==="word_boundary"){if(!f&&!p){const m=`(?:(?<=${K})(?!${K})|(?<!${K})(?=${K}))`,y=`(?:(?<=${K})(?=${K})|(?<!${K})(?!${K}))`;o(S(Z(l?y:m),e))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:t},{jsGroupNameMap:e}){let{ref:r}=t;typeof r=="string"&&!xt(r)&&(r=Ot(r,e),t.ref=r)},CapturingGroup({node:t},{jsGroupNameMap:e,subroutineRefMap:r}){let{name:n}=t;n&&!xt(n)&&(n=Ot(n,e),t.name=n),r.set(t.number,t),n&&r.set(n,t)},CharacterClassRange({node:t,parent:e,replaceWith:r}){if(e.kind==="intersection"){const n=Je({body:[t]});r(S(n,e),{traverse:!0})}},CharacterSet({node:t,parent:e,replaceWith:r},{accuracy:n,minTargetEs2024:i,digitIsAscii:s,spaceIsAscii:o,wordIsAscii:a}){const{kind:c,negate:l,value:p}=t;if(s&&(c==="digit"||p==="digit")){r(ie(qt("digit",{negate:l}),e));return}if(o&&(c==="space"||p==="space")){r(S(Dt(Z(mc),l),e));return}if(a&&(c==="word"||p==="word")){r(ie(qt("word",{negate:l}),e));return}if(c==="any")r(ie(Ae("Any"),e));else if(c==="digit")r(ie(Ae("Nd",{negate:l}),e));else if(c!=="dot")if(c==="text_segment"){if(n==="strict")throw new Error(C`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",h=C`\p{RI}{2}|${d}(?:\u200D${d})*`;r(S(Z(C`(?>\r\n|${i?C`\p{RGI_Emoji}`:h}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),e))}else if(c==="hex")r(ie(Ae("AHex",{negate:l}),e));else if(c==="newline")r(S(Z(l?`[^
151
+ ]`:`(?>\r
152
+ ?|[
153
+ \v\f…\u2028\u2029])`),e));else if(c==="posix")if(!i&&(p==="graph"||p==="print")){if(n==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[p];l&&(d=`\0-${P(d.codePointAt(0)-1)}${P(d.codePointAt(2)+1)}-􏿿`),r(S(Z(`[${d}]`),e))}else r(S(Dt(Z(bc.get(p)),l),e));else if(c==="property")dr.has(mt(p))||(t.key="sc");else if(c==="space")r(ie(Ae("space",{negate:l}),e));else if(c==="word")r(S(Dt(Z(K),l),e));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:t,parent:e,root:r,remove:n,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:o}){const{kind:a,flags:c}=t;if(a==="flags")if(!c.enable&&!c.disable)n();else{const l=H({flags:c});l.body[0].body=o(),i(S(l,e),{traverse:!0})}else if(a==="keep"){const l=r.body[0],d=r.body.length===1&&Bn(l,{type:"Group"})&&l.body[0].body.length===1?l.body[0]:r;if(e.parent!==d||d.body.length>1)throw new Error(C`Uses "\K" in a way that's unsupported`);const h=de({behind:!0});h.body[0].body=s(),i(S(h,e))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:t,parent:e}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete t[r]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),e.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;const{enable:e,disable:r}=t.flags;e!=null&&e.extended&&delete e.extended,r!=null&&r.extended&&delete r.extended,e!=null&&e.dotAll&&(r!=null&&r.dotAll)&&delete e.dotAll,e!=null&&e.ignoreCase&&(r!=null&&r.ignoreCase)&&delete e.ignoreCase,e&&!Object.keys(e).length&&delete t.flags.enable,r&&!Object.keys(r).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},e){const{kind:r}=t;r==="lookbehind"&&(e.passedLookbehind=!0)},NamedCallout({node:t,parent:e,replaceWith:r}){const{kind:n}=t;if(n==="fail")r(S(de({negate:!0}),e));else throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){const e=H();e.body[0].body.push(t.body),t.body=S(e,t)}},Regex:{enter({node:t},{supportedGNodes:e}){const r=[];let n=!1,i=!1;for(const s of t.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const o=ri(s.body);o?(n=!0,Array.isArray(o)?r.push(...o):r.push(o)):i=!0}n&&!i&&r.forEach(s=>e.add(s))},exit(t,{accuracy:e,passedLookbehind:r,strategy:n}){if(e==="strict"&&r&&n)throw new Error(C`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:e}){let{ref:r}=t;typeof r=="string"&&!xt(r)&&(r=Ot(r,e),t.ref=r)}},Cc={Backreference({node:t},{multiplexCapturesToLeftByRef:e,reffedNodesByReferencer:r}){const{orphan:n,ref:i}=t;n||r.set(t,[...e.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:t,parent:e,replaceWith:r,skip:n},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:o,openRefs:a,reffedNodesByReferencer:c}){const l=i.get(t);if(l&&a.has(t.number)){const d=ie(Qr(t.number),e);c.set(d,a.get(t.number)),r(d);return}a.set(t.number,t),o.set(t.number,[]),t.name&&Ve(o,t.name,[]);const p=o.get(t.name??t.number);for(let d=0;d<p.length;d++){const h=p[d];if(l===h.node||l&&l===h.origin||t===h.origin){p.splice(d,1);break}}if(o.get(t.number).push({node:t,origin:l}),t.name&&o.get(t.name).push({node:t,origin:l}),t.name){const d=Ve(s,t.name,new Map);let h=!1;if(l)h=!0;else for(const f of d.values())if(!f.hasDuplicateNameToRemove){h=!0;break}s.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:h})}},exit({node:t},{openRefs:e}){e.get(t.number)===t&&e.delete(t.number)}},Group:{enter({node:t},e){e.prevFlags=e.currentFlags,t.flags&&(e.currentFlags=ct(e.currentFlags,t.flags))},exit(t,e){e.currentFlags=e.prevFlags}},Subroutine({node:t,parent:e,replaceWith:r},n){const{isRecursive:i,ref:s}=t;if(i){let p=e;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===s||p.number===s)););n.reffedNodesByReferencer.set(t,p);return}const o=n.subroutineRefMap.get(s),a=s===0,c=a?Qr(0):Yn(o,n.groupOriginByCopy,null);let l=c;if(!a){const p=ei(Lc(o,h=>h.type==="Group"&&!!h.flags)),d=p?ct(n.globalFlags,p):n.globalFlags;Rc(d,n.currentFlags)||(l=H({flags:Tc(d)}),l.body[0].body.push(c))}r(S(l,e),{traverse:!a})}},Ic={Backreference({node:t,parent:e,replaceWith:r},n){if(t.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,t.ref);return}const s=n.reffedNodesByReferencer.get(t).filter(o=>Sc(o,t));if(!s.length)r(S(de({negate:!0}),e));else if(s.length>1){const o=H({atomic:!0,body:s.reverse().map(a=>ge({body:[zt(a.number)]}))});r(S(o,e))}else t.ref=s[0].number},CapturingGroup({node:t},e){t.number=++e.numCapturesToLeft,t.name&&e.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},e){const r=Math.max(e.highestOrphanBackref-e.numCapturesToLeft,0);for(let n=0;n<r;n++){const i=Un();t.body.at(-1).body.push(i)}}},Subroutine({node:t},e){!t.isRecursive||t.ref===0||(t.ref=e.reffedNodesByReferencer.get(t).number)}};function Zn(t){Oe(t,{"*"({node:e,parent:r}){e.parent=r}})}function Rc(t,e){return t.dotAll===e.dotAll&&t.ignoreCase===e.ignoreCase}function Sc(t,e){let r=e;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===t)return!1;const n=ti(r.parent);for(const i of n){if(i===r)break;if(i===t||ni(i,t))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function Yn(t,e,r,n){const i=Array.isArray(t)?[]:{};for(const[s,o]of Object.entries(t))s==="parent"?i.parent=Array.isArray(r)?n:r:o&&typeof o=="object"?i[s]=Yn(o,e,i,r):(s==="type"&&o==="CapturingGroup"&&e.set(i,e.get(t)??t),i[s]=o);return i}function Qr(t){const e=Wn(t);return e.isRecursive=!0,e}function Lc(t,e){const r=[];for(;t=t.parent;)(!e||e(t))&&r.push(t);return r}function Ot(t,e){if(e.has(t))return e.get(t);const r=`$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return e.set(t,r),r}function ei(t){const e=["dotAll","ignoreCase"],r={enable:{},disable:{}};return t.forEach(({flags:n})=>{e.forEach(i=>{var s,o;(s=n.enable)!=null&&s[i]&&(delete r.disable[i],r.enable[i]=!0),(o=n.disable)!=null&&o[i]&&(r.disable[i]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function Tc({dotAll:t,ignoreCase:e}){const r={};return(t||e)&&(r.enable={},t&&(r.enable.dotAll=!0),e&&(r.enable.ignoreCase=!0)),(!t||!e)&&(r.disable={},!t&&(r.disable.dotAll=!0),!e&&(r.disable.ignoreCase=!0)),r}function ti(t){if(!t)throw new Error("Node expected");const{body:e}=t;return Array.isArray(e)?e:e?[e]:null}function ri(t){const e=t.find(r=>r.kind==="search_start"||Oc(r,{negate:!1})||!Pc(r));if(!e)return null;if(e.kind==="search_start")return e;if(e.type==="LookaroundAssertion")return e.body[0].body[0];if(e.type==="CapturingGroup"||e.type==="Group"){const r=[];for(const n of e.body){const i=ri(n.body);if(!i)return null;Array.isArray(i)?r.push(...i):r.push(i)}return r}return null}function ni(t,e){const r=ti(t)??[];for(const n of r)if(n===e||ni(n,e))return!0;return!1}function Pc({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function kc(t){const e=["Character","CharacterClass","CharacterSet"];return e.includes(t.type)||t.type==="Quantifier"&&t.min&&e.includes(t.body.type)}function Oc(t,e){const r={negate:null,...e};return t.type==="LookaroundAssertion"&&(r.negate===null||t.negate===r.negate)&&t.body.length===1&&Bn(t.body[0],{type:"Assertion",kind:"search_start"})}function xt(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function Z(t,e){const n=Fn(t,{...e,unicodePropertyMap:dr}).body;return n.length>1||n[0].body.length>1?H({body:n}):n[0].body[0]}function Dt(t,e){return t.negate=e,t}function ie(t,e){return t.parent=e,t}function S(t,e){return Zn(t),t.parent=e,t}function xc(t,e){const r=Qn(e),n=Qt(r.target,"ES2024"),i=Qt(r.target,"ES2025"),s=r.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,a=null;if(!i){const f=[t.flags.ignoreCase];Oe(t,Dc,{getCurrentModI:()=>f.at(-1),popModI(){f.pop()},pushModI(m){f.push(m)},setHasCasedChar(){f.at(-1)?o=!0:a=!0}})}const c={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||o)&&!a)};let l=t;const p={accuracy:r.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:t._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&o&&a),useFlagMods:i,useFlagV:n,verbose:r.verbose};function d(f){return p.lastNode=l,l=f,hc(Nc[f.type],`Unexpected node type "${f.type}"`)(f,p,d)}const h={pattern:t.body.map(d).join("|"),flags:d(t.flags),options:{...t.options}};return n||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],p.captureMap.forEach((f,m)=>{f.hidden&&h._hiddenCaptures.push(m),f.transferTo&&Ve(h._captureTransfers,f.transferTo,[]).push(m)}),h}var Dc={"*":{enter({node:t},e){if(Kr(t)){const r=e.getCurrentModI();e.pushModI(t.flags?ct({ignoreCase:r},t.flags).ignoreCase:r)}},exit({node:t},e){Kr(t)&&e.popModI()}},Backreference(t,e){e.setHasCasedChar()},Character({node:t},e){pr(P(t.value))&&e.setHasCasedChar()},CharacterClassRange({node:t,skip:e},r){e(),ii(t,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:t},e){t.kind==="property"&&Kn.has(t.value)&&e.setHasCasedChar()}},Nc={Alternative({body:t},e,r){return t.map(r).join("")},Assertion({kind:t,negate:e}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return e?C`\B`:C`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},e){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!e.useFlagMods&&e.accuracy==="strict"&&e.currentFlags.ignoreCase&&!e.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,e,r){const{body:n,name:i,number:s}=t,o={ignoreCase:e.currentFlags.ignoreCase},a=e.originMap.get(t);return a&&(o.hidden=!0,s>a.number&&(o.transferTo=a.number)),e.captureMap.set(s,o),`(${i?`?<${i}>`:""}${n.map(r).join("|")})`},Character({value:t},e){const r=P(t),n=Ee(t,{escDigit:e.lastNode.type==="Backreference",inCharClass:e.inCharClass,useFlagV:e.useFlagV});if(n!==r)return n;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase&&pr(r)){const i=Jn(r);return e.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return r},CharacterClass(t,e,r){const{kind:n,negate:i,parent:s}=t;let{body:o}=t;if(n==="intersection"&&!e.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");z.bugFlagVLiteralHyphenIsRange&&e.useFlagV&&o.some(Zr)&&(o=[ft(45),...o.filter(l=>!Zr(l))]);const a=()=>`[${i?"^":""}${o.map(r).join(n==="intersection"?"&&":"")}]`;if(!e.inCharClass){if((!e.useFlagV||z.bugNestedClassIgnoresNegation)&&!i){const p=o.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(p.length){const d=H(),h=d.body[0];return d.parent=s,h.parent=d,o=o.filter(f=>!p.includes(f)),t.body=o,o.length?(t.parent=h,h.body.push(t)):d.body.pop(),p.forEach(f=>{const m=ge({body:[f]});f.parent=m,m.parent=d,d.body.push(m)}),r(d)}}e.inCharClass=!0;const l=a();return e.inCharClass=!1,l}const c=o[0];if(n==="union"&&!i&&c&&((!e.useFlagV||!e.verbose)&&s.kind==="union"&&!(z.bugFlagVLiteralHyphenIsRange&&e.useFlagV)||!e.verbose&&s.kind==="intersection"&&o.length===1&&c.type!=="CharacterClassRange"))return o.map(r).join("");if(!e.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(t,e){const r=t.min.value,n=t.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:e.useFlagV},s=Ee(r,i),o=Ee(n,i),a=new Set;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase){const c=ii(t);Bc(c).forEach(p=>{a.add(Array.isArray(p)?`${Ee(p[0],i)}-${Ee(p[1],i)}`:Ee(p,i))})}return`${s}-${o}${[...a].join("")}`},CharacterSet({kind:t,negate:e,value:r,key:n},i){if(t==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":C`[^\n]`;if(t==="digit")return e?C`\D`:C`\d`;if(t==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Kn.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${e?C`\P`:C`\p`}{${n?`${n}=`:""}${r}}`}if(t==="word")return e?C`\W`:C`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,e){return(e.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:e,flags:r,parent:n},i,s){const o=i.currentFlags;r&&(i.currentFlags=ct(o,r));const a=e.map(s).join("|"),c=!i.verbose&&e.length===1&&n.type!=="Quantifier"&&!t&&(!i.useFlagMods||!r)?a:`(?${Fc(t,r,i.useFlagMods)}${a})`;return i.currentFlags=o,c},LookaroundAssertion({body:t,kind:e,negate:r},n,i){return`(?${`${e==="lookahead"?"":"<"}${r?"!":"="}`}${t.map(i).join("|")})`},Quantifier(t,e,r){return r(t.body)+Uc(t)},Subroutine({isRecursive:t,ref:e},r){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=r.recursionLimit;return e===0?`(?R=${n})`:C`\g<${e}&R=${n}>`}},$c=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Vc=new Set(["-","\\","]","^","["]),Mc=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Jr=new Map([[9,C`\t`],[10,C`\n`],[11,C`\v`],[12,C`\f`],[13,C`\r`],[8232,C`\u2028`],[8233,C`\u2029`],[65279,C`\uFEFF`]]),Gc=new RegExp("^\\p{Cased}$","u");function pr(t){return Gc.test(t)}function ii(t,e){const r=!!(e!=null&&e.firstOnly),n=t.min.value,i=t.max.value,s=[];if(n<65&&(i===65535||i>=131071)||n===65536&&i>=131071)return s;for(let o=n;o<=i;o++){const a=P(o);if(!pr(a))continue;const c=Jn(a).filter(l=>{const p=l.codePointAt(0);return p<n||p>i});if(c.length&&(s.push(...c),r))break}return s}function Ee(t,{escDigit:e,inCharClass:r,useFlagV:n}){if(Jr.has(t))return Jr.get(t);if(t<32||t>126&&t<160||t>262143||e&&jc(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;const i=r?n?Mc:Vc:$c,s=P(t);return(i.has(s)?"\\":"")+s}function Bc(t){const e=t.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),r=[];let n=null;for(let i=0;i<e.length;i++)e[i+1]===e[i]+1?n??(n=e[i]):n===null?r.push(e[i]):(r.push([n,e[i]]),n=null);return r}function Fc(t,e,r){if(t)return">";let n="";if(e&&r){const{enable:i,disable:s}=e;n=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(s?"-":"")+(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")}return`${n}:`}function Uc({kind:t,max:e,min:r}){let n;return!r&&e===1?n="?":!r&&e===1/0?n="*":r===1&&e===1/0?n="+":r===e?n=`{${r}}`:n=`{${r},${e===1/0?"":e}}`,n+{greedy:"",lazy:"?",possessive:"+"}[t]}function Kr({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function jc(t){return t>47&&t<58}function Zr({type:t,value:e}){return t==="Character"&&e===45}var se,Y,fe,oe,me,Me,Jt,ce,Wc=(ce=class extends RegExp{constructor(r,n,i){var e=(...Wl)=>(super(...Wl),le(this,Me),le(this,se,new Map),le(this,Y,null),le(this,fe),le(this,oe,null),le(this,me,null),g(this,"rawOptions",{}),this);const s=!!(i!=null&&i.lazyCompile);if(r instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const o=r;e(o,n),W(this,fe,o.source),o instanceof ce&&(W(this,se,M(o,se)),W(this,oe,M(o,oe)),W(this,me,M(o,me)),this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...i};e(s?"":r,n),W(this,fe,r),W(this,se,zc(o.hiddenCaptures,o.transfers)),W(this,me,o.strategy),this.rawOptions=i??{}}s||W(this,Y,this)}get source(){return M(this,fe)||"(?:)"}exec(r){if(!M(this,Y)){const{lazyCompile:s,...o}=this.rawOptions;W(this,Y,new ce(M(this,fe),this.flags,o))}const n=this.global||this.sticky,i=this.lastIndex;if(M(this,me)==="clip_search"&&n&&i){this.lastIndex=0;const s=bt(this,Me,Jt).call(this,r.slice(i));return s&&(Hc(s,i,r,this.hasIndices),this.lastIndex+=i),s}return bt(this,Me,Jt).call(this,r)}},se=new WeakMap,Y=new WeakMap,fe=new WeakMap,oe=new WeakMap,me=new WeakMap,Me=new WeakSet,Jt=function(r){M(this,Y).lastIndex=this.lastIndex;const n=mr(ce.prototype,this,"exec").call(M(this,Y),r);if(this.lastIndex=M(this,Y).lastIndex,!n||!M(this,se).size)return n;const i=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);const o=[0];for(let a=1;a<i.length;a++){const{hidden:c,transferTo:l}=M(this,se).get(a)??{};if(c?o.push(null):(o.push(n.length),n.push(i[a]),this.hasIndices&&n.indices.push(s[a])),l&&i[a]!==void 0){const p=o[l];if(!p)throw new Error(`Invalid capture transfer to "${p}"`);if(n[p]=i[a],this.hasIndices&&(n.indices[p]=s[a]),n.groups){M(this,oe)||W(this,oe,qc(this.source));const d=M(this,oe).get(l);d&&(n.groups[d]=i[a],this.hasIndices&&(n.indices.groups[d]=s[a]))}}}return n},ce);function Hc(t,e,r,n){if(t.index+=e,t.input=r,n){const i=t.indices;for(let o=0;o<i.length;o++){const a=i[o];a&&(i[o]=[a[0]+e,a[1]+e])}const s=i.groups;s&&Object.keys(s).forEach(o=>{const a=s[o];a&&(s[o]=[a[0]+e,a[1]+e])})}}function zc(t,e){const r=new Map;for(const n of t)r.set(n,{hidden:!0});for(const[n,i]of e)for(const s of i)Ve(r,s,{}).transferTo=n;return r}function qc(t){const e=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let n=0,i=0,s;for(;s=e.exec(t);){const{0:o,groups:{capture:a,name:c}}=s;o==="["?n++:n?o==="]"&&n--:a&&(i++,c&&r.set(i,c))}return r}function Xc(t,e){const r=Qc(t,e);return r.options?new Wc(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function Qc(t,e){const r=Qn(e),n=Fn(t,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:dr}),i=Ac(n,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),s=xc(i,r),o=dc(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),a=lc(o.pattern),c=cc(a.pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),l={pattern:c.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=c.hiddenCaptures.sort((m,y)=>m-y),d=Array.from(c.captureTransfers),h=i._strategy,f=l.pattern.length>=r.lazyCompileLength;(p.length||d.length||h||f)&&(l.options={...p.length&&{hiddenCaptures:p},...d.length&&{transfers:d},...h&&{strategy:h},...f&&{lazyCompile:f}})}return l}const Yr=4294967295;class Jc{constructor(e,r={}){g(this,"regexps");this.patterns=e,this.options=r;const{forgiving:n=!1,cache:i,regexConstructor:s}=r;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(o=>{if(typeof o!="string")return o;const a=i==null?void 0:i.get(o);if(a){if(a instanceof RegExp)return a;if(n)return null;throw a}try{const c=s(o);return i==null||i.set(o,c),c}catch(c){if(i==null||i.set(o,c),n)return null;throw c}})}findNextMatchSync(e,r,n){const i=typeof e=="string"?e:e.content,s=[];function o(a,c,l=0){return{index:a,captureIndices:c.indices.map(p=>p==null?{start:Yr,end:Yr,length:0}:{start:p[0]+l,end:p[1]+l,length:p[1]-p[0]})}}for(let a=0;a<this.regexps.length;a++){const c=this.regexps[a];if(c)try{c.lastIndex=r;const l=c.exec(i);if(!l)continue;if(l.index===r)return o(a,l,0);s.push([a,l,0])}catch(l){if(this.options.forgiving)continue;throw l}}if(s.length){const a=Math.min(...s.map(c=>c[1].index));for(const[c,l,p]of s)if(l.index===a)return o(c,l,p)}return null}}function Kc(t,e){return Xc(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...e})}function Zc(t={}){const e=Object.assign({target:"auto",cache:new Map},t);return e.regexConstructor||(e.regexConstructor=r=>Kc(r,{target:e.target})),{createScanner(r){return new Jc(r,e)},createString(r){return{content:r}}}}var Yc=Zc({forgiving:!0}),el=Object.fromEntries(or.flatMap(t=>{var e;return((e=t.aliases)!=null?e:[]).map(r=>[r,t.id])})),Ke=new Set(Object.keys(xn)),en=t=>{let e=t.trim().toLowerCase();return el[e]||(Ke.has(e),e)},Nt=new Map,$t=new Map,be=new Map,lt=t=>{var e;return typeof t=="string"?t:(e=t.name)!=null?e:"custom"},tl=(t,e)=>`${t}-${lt(e[0])}-${lt(e[1])}`,rl=(t,e,r)=>{let n=t.slice(0,100),i=t.length>100?t.slice(-100):"";return`${e}:${r[0]}:${r[1]}:${t.length}:${n}:${i}`},nl=(t,e)=>{let r=tl(t,e);if(Nt.has(r))return Nt.get(r);let n=pa({themes:e,langs:[t],engine:Yc});return Nt.set(r,n),n};function il(t={}){var e;let r=(e=t.themes)!=null?e:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(n){let i=en(n);return Ke.has(i)},getSupportedLanguages(){return Array.from(Ke)},getThemes(){return r},highlight({code:n,language:i,themes:s},o){let a=en(i),c=[lt(s[0]),lt(s[1])],l=rl(n,a,c);if($t.has(l))return $t.get(l);o&&(be.has(l)||be.set(l,new Set),be.get(l).add(o));let p=Ke.has(a)?a:"text";return nl(p,s).then(d=>{let h=d.getLoadedLanguages().includes(a)?a:"text",f=d.codeToTokens(n,{lang:h,themes:{light:c[0],dark:c[1]}});$t.set(l,f);let m=be.get(l);if(m){for(let y of m)y(f);be.delete(l)}}).catch(d=>{console.error("[Streamdown Code] Failed to highlight code:",d),be.delete(l)}),null}}}var dl=il();export{dl as code,il as createCodePlugin};