vitepress-openapi 0.2.9 → 0.2.11

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