@vantran-se/openchamber-web 2.0.4 → 2.0.6

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 (243) hide show
  1. package/dist/assets/{CodeMirrorCommentWidgets-DZF8ntaq.js → CodeMirrorCommentWidgets-BlzB2e0C.js} +1 -1
  2. package/dist/assets/DiffView-D7JQzQVZ.js +4 -0
  3. package/dist/assets/FilesView-DC2gadXM.js +17 -0
  4. package/dist/assets/{GitView-DwQwqDvu.js → GitView-Gzl0wbdd.js} +4 -4
  5. package/dist/assets/{GuestAttachDialog-CoXM0gh_.js → GuestAttachDialog-CQdDIeco.js} +1 -1
  6. package/dist/assets/GuestSurfacePane-CrOhlIdt.js +1 -0
  7. package/dist/assets/{JsonTreeView-Cq_27v0y.js → JsonTreeView-C3QZifYe.js} +1 -1
  8. package/dist/assets/{LinearIssuesView-CsSSRMhn.js → LinearIssuesView-X27TCI3v.js} +1 -1
  9. package/dist/assets/MarkdownImageGallery-BlTWU9oH.js +1 -0
  10. package/dist/assets/MarkdownRendererImpl-Cno7QsJO.js +12 -0
  11. package/dist/assets/{OnboardingScreen-ClatMQAX.js → OnboardingScreen-Wr_UzNtt.js} +1 -1
  12. package/dist/assets/{PatchDiff-DOwlrIK9.js → PatchDiff-D6pWS7cD.js} +1 -1
  13. package/dist/assets/{PierreDiffViewer-CrcGqqD_.js → PierreDiffViewer-DDljFbJJ.js} +3 -3
  14. package/dist/assets/{PlanView-BGLsMgQk.js → PlanView-LcfEbBPi.js} +4 -4
  15. package/dist/assets/PluginPane-DPWPLc2f.js +3 -0
  16. package/dist/assets/SettingsView-CFe9O3EM.js +30 -0
  17. package/dist/assets/{SettingsWindow-B0BAy-f9.js → SettingsWindow-DT1xhvgi.js} +1 -1
  18. package/dist/assets/{SubmoduleDiffSummary-fcdDzCSW.js → SubmoduleDiffSummary-CBHXaIkB.js} +1 -1
  19. package/dist/assets/{ToolOutputDialog-B7xaUz2H.js → ToolOutputDialog-B_ZX8ZbZ.js} +6 -6
  20. package/dist/assets/{ToolPartDiffPreview-CkWCaUmZ.js → ToolPartDiffPreview-D_HQzkXU.js} +2 -2
  21. package/dist/assets/{VirtualizedFileDiff-DONC4eI2.js → VirtualizedFileDiff-BUK1ujXg.js} +1 -1
  22. package/dist/assets/{WalkthroughView-CXDImOXW.js → WalkthroughView-H-tYOvhO.js} +2 -2
  23. package/dist/assets/{appThemeRegistry-Br2TLSlb.js → appThemeRegistry-BoJGAwCP.js} +1 -1
  24. package/dist/assets/changesTree-CePHbFcj.js +1 -0
  25. package/dist/assets/commitAndPush-BzZrF8bK.js +1 -0
  26. package/dist/assets/{computeVirtualFileMetrics-_-20umCs.js → computeVirtualFileMetrics-kYyVjXLu.js} +2 -2
  27. package/dist/assets/de-ByfQDcPj.js +10 -0
  28. package/dist/assets/es-DzNbjsQS.js +16 -0
  29. package/dist/assets/fr-B8AVLrnX.js +14 -0
  30. package/dist/assets/{index-OKDYjcMF.js → index-0-ON1L7L.js} +1 -1
  31. package/dist/assets/index-DUke1nme.css +1 -0
  32. package/dist/assets/index-Di6zUe5h.js +41 -0
  33. package/dist/assets/{isDiffPlainText-D77M6q1f.js → isDiffPlainText-Bgm_aLpu.js} +1 -1
  34. package/dist/assets/{isFilePlainText-C54B4Mns.js → isFilePlainText-D5GMgURH.js} +1 -1
  35. package/dist/assets/ja-1g6S0G19.js +16 -0
  36. package/dist/assets/ko-CxplvYkJ.js +16 -0
  37. package/dist/assets/{main-CGEvLMd2.js → main--Y98ZLsD.js} +2 -2
  38. package/dist/assets/main-GjXmVNpD.js +896 -0
  39. package/dist/assets/{markdown-shiki.worker-CahLvHIq.js → markdown-shiki.worker-Bg8SoAJJ.js} +8 -5
  40. package/dist/assets/markdownCore-CVdUcVCi.js +7 -0
  41. package/dist/assets/{miniChat-BSxkRQLj.js → miniChat-tTx5mpbd.js} +2 -2
  42. package/dist/assets/{mobile-C5KRTNOB.js → mobile-BmbiDWGb.js} +2 -2
  43. package/dist/assets/patchFileDiff-CV4iVQ8L.js +13 -0
  44. package/dist/assets/pl-f3QyqvIB.js +16 -0
  45. package/dist/assets/pt-BR-BsaoaiCK.js +16 -0
  46. package/dist/assets/{renderElectronMiniChatApp-CnkAQV6o.js → renderElectronMiniChatApp-BnCdnDhv.js} +2 -2
  47. package/dist/assets/renderMobileApp-CKn8nbSW.js +25 -0
  48. package/dist/assets/runtimeEndpointReset-sCi88eed.js +27 -0
  49. package/dist/assets/scheduledTasksApi-Dahv3ws0.js +1 -0
  50. package/dist/assets/{shikiHighlight-4O0ZM14D.js → shikiHighlight-O5_xLmWt.js} +1 -1
  51. package/dist/assets/{textMateThemeFromAppTheme-yNq7b0DZ.js → textMateThemeFromAppTheme-XM4VefqN.js} +1 -1
  52. package/dist/assets/tr-BNFsa6nz.js +7 -0
  53. package/dist/assets/uk-CJ9y5ULA.js +16 -0
  54. package/dist/assets/{useAppFontEffects-Bzyszv2N.js → useAppFontEffects-BN06mgHB.js} +160 -156
  55. package/dist/assets/{useInlineCommentController-zOf6ORAq.js → useInlineCommentController-Bb9Gjz1Q.js} +2 -2
  56. package/dist/assets/{useRootScrollLock-DCaZ4BWi.js → useRootScrollLock-Chk1cFUw.js} +2 -2
  57. package/dist/assets/{vendor-codemirror-language-data-6cEFPNUR.js → vendor-codemirror-language-data-C2qMZiA7.js} +2 -2
  58. package/dist/assets/vendor-opencode-client-DSZl7jSi.js +12 -0
  59. package/dist/assets/vendor-zod-BSoePkpP.js +39 -0
  60. package/dist/assets/{web-components-BEo4-ISu.js → web-components-BQWjCn_U.js} +1 -1
  61. package/dist/assets/zh-CN-U0QjVlAA.js +16 -0
  62. package/dist/assets/zh-TW-J9PTJQJi.js +16 -0
  63. package/dist/index.html +5 -5
  64. package/dist/mini-chat.html +5 -5
  65. package/dist/mobile.html +5 -5
  66. package/package.json +4 -4
  67. package/server/index.js +82 -0
  68. package/server/lib/agent-tool/DOCUMENTATION.md +132 -47
  69. package/server/lib/agent-tool/runtime.js +34 -15
  70. package/server/lib/agent-tool/runtime.test.js +15 -0
  71. package/server/lib/browser-control/DOCUMENTATION.md +14 -2
  72. package/server/lib/event-stream/global-hub.js +23 -1
  73. package/server/lib/event-stream/global-hub.test.js +35 -0
  74. package/server/lib/event-stream/global-ws-bridge.js +3 -1
  75. package/server/lib/event-stream/upstream-reader.js +3 -2
  76. package/server/lib/git/DOCUMENTATION.md +1 -1
  77. package/server/lib/git/service.js +22 -0
  78. package/server/lib/git/service.test.js +8 -0
  79. package/server/lib/guests/DOCUMENTATION.md +4 -3
  80. package/server/lib/guests/catalog.js +19 -1
  81. package/server/lib/guests/catalog.test.js +22 -0
  82. package/server/lib/guests/html-styles.js +5 -3
  83. package/server/lib/guests/html-styles.test.js +3 -1
  84. package/server/lib/guests/routes.js +11 -3
  85. package/server/lib/guests/service.js +5 -0
  86. package/server/lib/guests/surface.js +55 -9
  87. package/server/lib/guests/surface.test.js +56 -6
  88. package/server/lib/notifications/DOCUMENTATION.md +10 -0
  89. package/server/lib/notifications/emit-route.js +118 -0
  90. package/server/lib/notifications/emit-route.test.js +112 -0
  91. package/server/lib/openchamber-control/actions.js +16 -2
  92. package/server/lib/openchamber-control/service.js +23 -0
  93. package/server/lib/openchamber-control/service.test.js +31 -0
  94. package/server/lib/openchamber-sessions/fork-inheritance.js +103 -0
  95. package/server/lib/openchamber-sessions/fork-inheritance.test.js +69 -0
  96. package/server/lib/openchamber-sessions/routes.js +11 -0
  97. package/server/lib/openchamber-sessions/routes.test.js +18 -0
  98. package/server/lib/opencode/bootstrap-runtime.js +14 -1
  99. package/server/lib/opencode/compatibility.js +6 -3
  100. package/server/lib/opencode/compatibility.test.js +8 -0
  101. package/server/lib/opencode/config-entity-v2.test.js +27 -0
  102. package/server/lib/opencode/config-paths.test.js +12 -0
  103. package/server/lib/opencode/config-v2.d.ts +2 -0
  104. package/server/lib/opencode/config-v2.js +42 -0
  105. package/server/lib/opencode/config-v2.test.js +17 -0
  106. package/server/lib/opencode/core-routes.js +20 -4
  107. package/server/lib/opencode/core-routes.test.js +41 -0
  108. package/server/lib/opencode/env-runtime.js +1 -8
  109. package/server/lib/opencode/feature-routes-runtime.js +2 -1
  110. package/server/lib/opencode/lifecycle.js +30 -2
  111. package/server/lib/opencode/lifecycle.test.js +27 -0
  112. package/server/lib/opencode/managed-config-file.js +18 -6
  113. package/server/lib/opencode/managed-config-file.test.js +23 -7
  114. package/server/lib/opencode/mcp.js +7 -2
  115. package/server/lib/opencode/npm-registry-config.d.ts +1 -0
  116. package/server/lib/opencode/npm-registry-config.js +123 -0
  117. package/server/lib/opencode/npm-registry-config.test.js +167 -0
  118. package/server/lib/opencode/npm-registry.js +5 -6
  119. package/server/lib/opencode/npm-registry.test.js +30 -0
  120. package/server/lib/opencode/openchamber-routes.js +29 -11
  121. package/server/lib/opencode/openchamber-routes.test.js +18 -0
  122. package/server/lib/opencode/project-directory-runtime.js +8 -0
  123. package/server/lib/opencode/project-directory-runtime.test.js +13 -0
  124. package/server/lib/opencode/provider-source-route.test.js +59 -0
  125. package/server/lib/opencode/providers.js +3 -0
  126. package/server/lib/opencode/providers.test.js +62 -0
  127. package/server/lib/opencode/proxy.js +38 -2
  128. package/server/lib/opencode/routes-upgrade.test.js +1 -1
  129. package/server/lib/opencode/routes.js +36 -1
  130. package/server/lib/opencode/server-utils-runtime.js +5 -0
  131. package/server/lib/opencode/settings-helpers.js +10 -0
  132. package/server/lib/opencode/settings-helpers.test.js +2 -2
  133. package/server/lib/opencode/settings-registry.json +17 -0
  134. package/server/lib/opencode/settings-runtime.js +1 -0
  135. package/server/lib/opencode/shared.js +49 -4
  136. package/server/lib/opencode/shared.test.js +78 -1
  137. package/server/lib/opencode/shutdown-runtime.js +3 -0
  138. package/server/lib/opencode/skill-routes.js +28 -12
  139. package/server/lib/opencode/skill-routes.test.js +121 -1
  140. package/server/lib/opencode/upgrade-capability.js +0 -14
  141. package/server/lib/opencode/v1-migration-topup.js +21 -15
  142. package/server/lib/opencode/v1-migration-topup.test.js +14 -6
  143. package/server/lib/opencode/v2-install.d.ts +1 -0
  144. package/server/lib/opencode/v2-install.js +8 -7
  145. package/server/lib/opencode/v2-install.test.js +13 -4
  146. package/server/lib/opencode/watcher.js +3 -1
  147. package/server/lib/opencode/websearch-config.js +13 -1
  148. package/server/lib/quota/providers/kimi.js +1 -1
  149. package/server/lib/realtime-proxy.js +5 -1
  150. package/server/lib/realtime-proxy.test.js +29 -0
  151. package/server/lib/relay/tunnel-host.js +4 -1
  152. package/server/lib/relay/tunnel-host.test.js +11 -0
  153. package/server/lib/session-assist/DOCUMENTATION.md +17 -5
  154. package/server/lib/session-assist/runtime.js +19 -2
  155. package/server/lib/session-assist/runtime.test.js +8 -0
  156. package/server/lib/session-goal/DOCUMENTATION.md +11 -0
  157. package/server/lib/small-model/DOCUMENTATION.md +11 -10
  158. package/server/lib/small-model/index.js +27 -32
  159. package/server/lib/small-model/index.test.js +28 -16
  160. package/server/lib/spaces/DOCUMENTATION.md +404 -32
  161. package/server/lib/spaces/code-in-bait.js +145 -6
  162. package/server/lib/spaces/code-in.js +10 -150
  163. package/server/lib/spaces/code-in.test.js +7 -83
  164. package/server/lib/spaces/code-out.js +1819 -0
  165. package/server/lib/spaces/code-out.test.js +3945 -0
  166. package/server/lib/spaces/code-transfer.js +173 -0
  167. package/server/lib/spaces/command-stream.test.js +181 -0
  168. package/server/lib/spaces/dispatcher.js +670 -0
  169. package/server/lib/spaces/dispatcher.test.js +582 -0
  170. package/server/lib/spaces/gatekeeper-channel.js +61 -7
  171. package/server/lib/spaces/gatekeeper-channel.test.js +43 -7
  172. package/server/lib/spaces/gatekeeper-program.cjs +68 -14
  173. package/server/lib/spaces/gatekeeper-program.test.js +118 -3
  174. package/server/lib/spaces/hardening.js +20 -4
  175. package/server/lib/spaces/hardening.test.js +18 -3
  176. package/server/lib/spaces/host-git.js +7 -4
  177. package/server/lib/spaces/host-git.test.js +6 -2
  178. package/server/lib/spaces/host.js +310 -0
  179. package/server/lib/spaces/host.test.js +273 -0
  180. package/server/lib/spaces/journey.js +552 -0
  181. package/server/lib/spaces/journey.test.js +589 -0
  182. package/server/lib/spaces/layout.js +42 -8
  183. package/server/lib/spaces/manager.js +4 -3
  184. package/server/lib/spaces/manager.test.js +6 -0
  185. package/server/lib/spaces/places/code-out.docker.live.test.js +412 -0
  186. package/server/lib/spaces/places/contract-suite.js +36 -0
  187. package/server/lib/spaces/places/dispatcher.docker.live.test.js +296 -0
  188. package/server/lib/spaces/places/docker-live-support.js +27 -4
  189. package/server/lib/spaces/places/docker.js +33 -5
  190. package/server/lib/spaces/places/docker.test.js +42 -3
  191. package/server/lib/spaces/places/escape-suite.js +118 -14
  192. package/server/lib/spaces/places/fake-docker.js +3 -1
  193. package/server/lib/spaces/places/grants.docker.live.test.js +197 -0
  194. package/server/lib/spaces/places/memory-place.js +24 -1
  195. package/server/lib/spaces/places/registry.js +1 -1
  196. package/server/lib/spaces/places/server.docker.live.test.js +69 -33
  197. package/server/lib/spaces/places/sessions.docker.live.test.js +222 -0
  198. package/server/lib/spaces/routes.js +216 -0
  199. package/server/lib/spaces/routes.test.js +213 -0
  200. package/server/lib/spaces/run-command.js +261 -8
  201. package/server/lib/spaces/run-command.test.js +193 -3
  202. package/server/lib/spaces/space-events.js +153 -0
  203. package/server/lib/spaces/space-events.test.js +160 -0
  204. package/server/lib/spaces/space-opencode.js +52 -0
  205. package/server/lib/spaces/space-opencode.test.js +41 -0
  206. package/server/lib/spaces/space-records.js +150 -0
  207. package/server/lib/spaces/space-records.test.js +113 -0
  208. package/server/lib/spaces/space-sessions.js +210 -0
  209. package/server/lib/spaces/space-sessions.test.js +161 -0
  210. package/server/lib/spaces/websocket.js +329 -0
  211. package/server/lib/spaces/websocket.test.js +345 -0
  212. package/server/lib/ui-auth/ui-auth.js +8 -2
  213. package/server/lib/ui-auth/ui-auth.test.js +29 -0
  214. package/server/opencode-proxy.test.js +113 -0
  215. package/dist/assets/DiffView-D2p4Ar0H.js +0 -4
  216. package/dist/assets/FilesView-BeTtbsip.js +0 -17
  217. package/dist/assets/GuestSurfacePane-DIJvkkM-.js +0 -1
  218. package/dist/assets/MarkdownImageGallery-CY0dWTaE.js +0 -1
  219. package/dist/assets/MarkdownRendererImpl-ILdXzLrt.js +0 -12
  220. package/dist/assets/PluginPane-B39JEUL8.js +0 -3
  221. package/dist/assets/SettingsView-13B2_G-A.js +0 -29
  222. package/dist/assets/commitAndPush-CcI4ol7c.js +0 -1
  223. package/dist/assets/de-BtYnUgII.js +0 -10
  224. package/dist/assets/es-crP5qPye.js +0 -16
  225. package/dist/assets/fr-CLSRuALk.js +0 -14
  226. package/dist/assets/index-CLcM8HKx.css +0 -1
  227. package/dist/assets/index-CvLgnuNI.js +0 -41
  228. package/dist/assets/ja-SZ1-ucLV.js +0 -16
  229. package/dist/assets/ko-HthbT_Ve.js +0 -16
  230. package/dist/assets/main-BJklC7Cl.js +0 -896
  231. package/dist/assets/markdownCore-BzQuETm0.js +0 -5
  232. package/dist/assets/patchFileDiff-DGw2KryM.js +0 -13
  233. package/dist/assets/pl-C8eYfjL1.js +0 -16
  234. package/dist/assets/pt-BR-cYOrZdxS.js +0 -16
  235. package/dist/assets/renderMobileApp-CMxjwisj.js +0 -25
  236. package/dist/assets/runtimeEndpointReset-C45jrFq4.js +0 -27
  237. package/dist/assets/scheduledTasksApi-CkK1F9s2.js +0 -1
  238. package/dist/assets/tr-B4IQ5t-T.js +0 -7
  239. package/dist/assets/uk-DCoXG6ve.js +0 -16
  240. package/dist/assets/vendor-opencode-client-_BAHQo4R.js +0 -12
  241. package/dist/assets/vendor-zod-Gea9uBlY.js +0 -39
  242. package/dist/assets/zh-CN-BXBoxsFk.js +0 -16
  243. package/dist/assets/zh-TW-C6oelpnL.js +0 -16
@@ -1,6 +1,6 @@
1
- let R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Tn(t){return Qe(t)}function Qe(t){return Array.isArray(t)?An(t):t instanceof RegExp?t:typeof t=="object"?Pn(t):t}function An(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Qe(t[n]);return e}function Pn(t){let e={};for(let n in t)e[n]=Qe(t[n]);return e}function Gt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function jt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?jt(t.substring(0,t.length-1)):t.substr(~e+1)}var Ee=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,le=class{static hasCaptures(t){return t===null?!1:(Ee.lastIndex=0,Ee.test(t))}static replaceCaptures(t,e,n){return t.replace(Ee,(r,o,i,s)=>{let l=n[parseInt(o||i,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function $t(t,e){return t<e?-1:t>e?1:0}function Ut(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let o=0;o<n;o++){let i=$t(t[o],e[o]);if(i!==0)return i}return 0}return n-r}function ft(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Ht(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ft=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},fe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(On(t),e)}static createFromParsedTheme(t,e){return Bn(t,e)}_cachedMatchRoot=new Ft(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(o=>En(t.parent,o.parentScopes));return r?new Wt(r.fontStyle,r.foreground,r.background):null}},Ie=class me{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new me(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new me(n,e[r]);return n}push(e){return new me(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function En(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],o=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],o=!0}for(;t&&!In(t.scopeName,r);){if(o)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function In(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Wt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function On(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let o=0,i=e.length;o<i;o++){let s=e[o];if(!s.settings)continue;let l;if(typeof s.scope=="string"){let p=s.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),l=p.split(",")}else Array.isArray(s.scope)?l=s.scope:l=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let p=s.settings.fontStyle.split(" ");for(let d=0,m=p.length;d<m;d++)switch(p[d]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof s.settings.foreground=="string"&&ft(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&ft(s.settings.background)&&(u=s.settings.background);for(let p=0,d=l.length;p<d;p++){let h=l[p].trim().split(" "),b=h[h.length-1],S=null;h.length>1&&(S=h.slice(0,h.length-1),S.reverse()),n[r++]=new Mn(b,S,o,a,c,u)}}return n}var Mn=class{constructor(t,e,n,r,o,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=o,this.background=i}},P=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(P||{});function Bn(t,e){t.sort((a,c)=>{let u=$t(a.scope,c.scope);return u!==0||(u=Ut(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",o="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(o=a.background)}let i=new Dn(e),s=new Wt(n,i.getId(r),i.getId(o)),l=new jn(new $e(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new fe(i,s,l)}var Dn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Gn=Object.freeze([]),$e=class zt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,o,i){this.scopeDepth=e,this.parentScopes=n||Gn,this.fontStyle=r,this.foreground=o,this.background=i}clone(){return new zt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,o=e.length;r<o;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,o){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},jn=class Ue{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,o=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[o]===">"&&o++,!(r>=e.parentScopes.length||o>=n.parentScopes.length);){const i=n.parentScopes[o].length-e.parentScopes[r].length;if(i!==0)return i;r++,o++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),o,i;if(r===-1?(o=e,i=""):(o=e.substring(0,r),i=e.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ue._cmpBySpecificity),n}insert(e,n,r,o,i,s){if(n===""){this._doInsertHere(e,r,o,i,s);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Ue(this._mainRule.clone(),$e.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,o,i,s)}_doInsertHere(e,n,r,o,i){if(n===null){this._mainRule.acceptOverwrite(e,r,o,i);return}for(let s=0,l=this._rulesWithParentScopes.length;s<l;s++){let a=this._rulesWithParentScopes[s];if(Ut(a.parentScopes,n)===0){a.acceptOverwrite(e,r,o,i);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new $e(e,n,r,o,i))}},Y=class M{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=M.getLanguageId(e),r=M.getTokenType(e),o=M.getFontStyle(e),i=M.getForeground(e),s=M.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:i,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,o,i,s,l){let a=M.getLanguageId(e),c=M.getTokenType(e),u=M.containsBalancedBrackets(e)?1:0,p=M.getFontStyle(e),d=M.getForeground(e),m=M.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),o!==null&&(u=o?1:0),i!==-1&&(p=i),s!==0&&(d=s),l!==0&&(m=l),(a<<0|c<<8|u<<10|p<<11|d<<15|m<<24)>>>0}};function ge(t,e){const n=[],r=$n(t);let o=r.next();for(;o!==null;){let a=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let c=s();if(n.push({matcher:c,priority:a}),o!==",")break;o=r.next()}return n;function i(){if(o==="-"){o=r.next();const a=i();return c=>!!a&&!a(c)}if(o==="("){o=r.next();const a=l();return o===")"&&(o=r.next()),a}if(gt(o)){const a=[];do a.push(o),o=r.next();while(gt(o));return c=>e(a,c)}return null}function s(){const a=[];let c=i();for(;c;)a.push(c),c=i();return u=>a.every(p=>p(u))}function l(){const a=[];let c=s();for(;c&&(a.push(c),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");c=s()}return u=>a.some(p=>p(u))}}function gt(t){return!!t&&!!t.match(/[\w\.:]+/)}function $n(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function qt(t){typeof t.dispose=="function"&&t.dispose()}var ne=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Un=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Hn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Fn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ne(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Hn;for(const n of t)Wn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof ne){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Wn(t,e,n,r){const o=n.lookup(t.scopeName);if(!o){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof ne?he({baseGrammar:i,selfGrammar:o},r):He(t.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},r);const s=n.injections(t.scopeName);if(s)for(const l of s)r.add(new ne(l))}function He(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];ye([r],e,n)}}function he(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ye(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ye(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ye(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const o=r.repository?Gt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&ye(r.patterns,{...e,repository:o},n);const i=r.include;if(!i)continue;const s=Vt(i);switch(s.kind){case 0:he({...e,selfGrammar:e.baseGrammar},n);break;case 1:he(e,n);break;case 2:He(s.ruleName,{...e,repository:o},n);break;case 3:case 4:const l=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:o};s.kind===4?He(s.ruleName,a,n):he(a,n)}else s.kind===4?n.add(new Un(s.scopeName,s.ruleName)):n.add(new ne(s.scopeName));break}}}var zn=class{kind=0},qn=class{kind=1},Vn=class{constructor(t){this.ruleName=t}kind=2},Kn=class{constructor(t){this.scopeName=t}kind=3},Yn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Vt(t){if(t==="$base")return new zn;if(t==="$self")return new qn;const e=t.indexOf("#");if(e===-1)return new Kn(t);if(e===0)return new Vn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Yn(n,r)}}var Jn=/\\(\d+)/,yt=/\\(\d+)/g,Xn=-1,Kt=-2;var se=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${jt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:le.replaceCaptures(this._contentName,t,e)}},Qn=class extends se{retokenizeCapturedWithRuleId;constructor(t,e,n,r,o){super(t,e,n,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Zn=class extends se{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,o){super(t,e,n,null),this._match=new re(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oe,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},bt=class extends se{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,o){super(t,e,n,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oe,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Fe=class extends se{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,o,i,s,l,a,c){super(t,e,n,r),this._begin=new re(o,this.id),this.beginCaptures=i,this._end=new re(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oe;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},be=class extends se{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,o,i,s,l,a){super(t,e,n,r),this._begin=new re(o,this.id),this.beginCaptures=i,this.whileCaptures=l,this._while=new re(s,Kt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oe;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new oe,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},Yt=class A{static createCaptureRule(e,n,r,o,i){return e.registerRule(s=>new Qn(n,s,r,o,i))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(o=>{if(e.id=o,e.match)return new Zn(e.$vscodeTextmateLocation,e.id,e.name,e.match,A._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Gt({},r,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new bt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,A._compilePatterns(i,n,r))}return e.while?new be(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,A._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,A._compileCaptures(e.whileCaptures||e.captures,n,r),A._compilePatterns(e.patterns,n,r)):new Fe(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,A._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,A._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,A._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let o=[];if(e){let i=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);l>i&&(i=l)}for(let s=0;s<=i;s++)o[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);let a=0;e[s].patterns&&(a=A.getCompiledRuleId(e[s],n,r)),o[l]=A.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return o}static _compilePatterns(e,n,r){let o=[];if(e)for(let i=0,s=e.length;i<s;i++){const l=e[i];let a=-1;if(l.include){const c=Vt(l.include);switch(c.kind){case 0:case 1:a=A.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=A.getCompiledRuleId(u,n,r));break;case 3:case 4:const p=c.scopeName,d=c.kind===4?c.ruleName:null,m=n.getExternalGrammar(p,r);if(m)if(d){let h=m.repository[d];h&&(a=A.getCompiledRuleId(h,n,m.repository))}else a=A.getCompiledRuleId(m.repository.$self,n,m.repository);break}}else a=A.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof bt||c instanceof Fe||c instanceof be)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;o.push(a)}}return{patterns:o,hasMissingPatterns:(e?e.length:0)!==o.length}}},re=class Jt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let o=0,i=[],s=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(i.push(e.substring(o,l)),i.push("$(?!\\n)(?<!\\n)"),o=l+2):(c==="A"||c==="G")&&(s=!0),l++}this.hasAnchor=s,o===0?this.source=e:(i.push(e.substring(o,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Jn.test(this.source):this.hasBackReferences=!1}clone(){return new Jt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(o=>e.substring(o.start,o.end));return yt.lastIndex=0,this.source.replace(yt,(o,i)=>Ht(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],o=[],i,s,l,a;for(i=0,s=this.source.length;i<s;i++)l=this.source.charAt(i),e[i]=l,n[i]=l,r[i]=l,o[i]=l,l==="\\"&&i+1<s&&(a=this.source.charAt(i+1),a==="A"?(e[i+1]="￿",n[i+1]="￿",r[i+1]="A",o[i+1]="A"):a==="G"?(e[i+1]="￿",n[i+1]="G",r[i+1]="￿",o[i+1]="G"):(e[i+1]=a,n[i+1]=a,r[i+1]=a,o[i+1]=a),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:o.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},oe=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new _t(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(o=>o.resolveAnchors(e,n));return new _t(t,r,this._items.map(o=>o.ruleId))}},_t=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
2
- `)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Oe=class{constructor(t,e){this.languageId=t,this.tokenType=e}},er=class We{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Oe(e,8),this._embeddedLanguagesMatcher=new tr(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?We._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Oe(0,0);_getBasicScopeAttributes=new Ft(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Oe(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(We.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},tr=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>Ht(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},St=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Xt(t,e,n,r,o,i,s,l){const a=e.content.length;let c=!1,u=-1;if(s){const m=nr(t,e,n,r,o,i);o=m.stack,r=m.linePos,n=m.isFirstLine,u=m.anchorPosition}const p=Date.now();for(;!c;){if(l!==0&&Date.now()-p>l)return new St(o,!0);d()}return new St(o,!1);function d(){const m=rr(t,e,n,r,o,u);if(!m){i.produce(o,a),c=!0;return}const h=m.captureIndices,b=m.matchedRuleId,S=h&&h.length>0?h[0].end>r:!1;if(b===Xn){const y=o.getRule(t);i.produce(o,h[0].start),o=o.withContentNameScopesList(o.nameScopesList),ee(t,e,n,o,i,y.endCaptures,h),i.produce(o,h[0].end);const _=o;if(o=o.parent,u=_.getAnchorPos(),!S&&_.getEnterPos()===r){o=_,i.produce(o,a),c=!0;return}}else{const y=t.getRule(b);i.produce(o,h[0].start);const _=o,g=y.getName(e.content,h),w=o.contentNameScopesList.pushAttributed(g,t);if(o=o.push(b,r,u,h[0].end===a,null,w,w),y instanceof Fe){const C=y;ee(t,e,n,o,i,C.beginCaptures,h),i.produce(o,h[0].end),u=h[0].end;const I=C.getContentName(e.content,h),$=w.pushAttributed(I,t);if(o=o.withContentNameScopesList($),C.endHasBackReferences&&(o=o.withEndRule(C.getEndWithResolvedBackReferences(e.content,h))),!S&&_.hasSameRuleAs(o)){o=o.pop(),i.produce(o,a),c=!0;return}}else if(y instanceof be){const C=y;ee(t,e,n,o,i,C.beginCaptures,h),i.produce(o,h[0].end),u=h[0].end;const I=C.getContentName(e.content,h),$=w.pushAttributed(I,t);if(o=o.withContentNameScopesList($),C.whileHasBackReferences&&(o=o.withEndRule(C.getWhileWithResolvedBackReferences(e.content,h))),!S&&_.hasSameRuleAs(o)){o=o.pop(),i.produce(o,a),c=!0;return}}else if(ee(t,e,n,o,i,y.captures,h),i.produce(o,h[0].end),o=o.pop(),!S){o=o.safePop(),i.produce(o,a),c=!0;return}}h[0].end>r&&(r=h[0].end,n=!1)}}function nr(t,e,n,r,o,i){let s=o.beginRuleCapturedEOL?0:-1;const l=[];for(let a=o;a;a=a.pop()){const c=a.getRule(t);c instanceof be&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=sr(a.rule,t,a.stack.endRule,n,r===s),p=c.findNextMatchSync(e,r,u);if(p){if(p.ruleId!==Kt){o=a.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(i.produce(a.stack,p.captureIndices[0].start),ee(t,e,n,a.stack,i,a.rule.whileCaptures,p.captureIndices),i.produce(a.stack,p.captureIndices[0].end),s=p.captureIndices[0].end,p.captureIndices[0].end>r&&(r=p.captureIndices[0].end,n=!1))}else{o=a.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:s,isFirstLine:n}}function rr(t,e,n,r,o,i){const s=or(t,e,n,r,o,i),l=t.getInjections();if(l.length===0)return s;const a=ir(l,t,e,n,r,o,i);if(!a)return s;if(!s)return a;const c=s.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:s}function or(t,e,n,r,o,i){const s=o.getRule(t),{ruleScanner:l,findOptions:a}=Qt(s,t,o.endRule,n,r===i),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function ir(t,e,n,r,o,i,s){let l=Number.MAX_VALUE,a=null,c,u=0;const p=i.contentNameScopesList.getScopeNames();for(let d=0,m=t.length;d<m;d++){const h=t[d];if(!h.matcher(p))continue;const b=e.getRule(h.ruleId),{ruleScanner:S,findOptions:y}=Qt(b,e,null,r,o===s),_=S.findNextMatchSync(n,o,y);if(!_)continue;const g=_.captureIndices[0].start;if(!(g>=l)&&(l=g,a=_.captureIndices,c=_.ruleId,u=h.priority,l===o))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function Qt(t,e,n,r,o){return{ruleScanner:t.compileAG(e,n,r,o),findOptions:0}}function sr(t,e,n,r,o){return{ruleScanner:t.compileWhileAG(e,n,r,o),findOptions:0}}function ee(t,e,n,r,o,i,s){if(i.length===0)return;const l=e.content,a=Math.min(i.length,s.length),c=[],u=s[0].end;for(let p=0;p<a;p++){const d=i[p];if(d===null)continue;const m=s[p];if(m.length===0)continue;if(m.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=m.start;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?o.produceFromScopes(c[c.length-1].scopes,m.start):o.produce(r,m.start),d.retokenizeCapturedWithRuleId){const b=d.getName(l,s),S=r.contentNameScopesList.pushAttributed(b,t),y=d.getContentName(l,s),_=S.pushAttributed(y,t),g=r.push(d.retokenizeCapturedWithRuleId,m.start,-1,!1,null,S,_),w=t.createOnigString(l.substring(0,m.end));Xt(t,w,n&&m.start===0,m.start,g,o,!1,0),qt(w);continue}const h=d.getName(l,s);if(h!==null){const S=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(h,t);c.push(new ar(S,m.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var ar=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function lr(t,e,n,r,o,i,s,l){return new ur(t,e,n,r,o,i,s,l)}function kt(t,e,n,r,o){const i=ge(e,_e),s=Yt.getCompiledRuleId(n,r,o.repository);for(const l of i)t.push({debugSelector:e,matcher:l.matcher,ruleId:s,grammar:o,priority:l.priority})}function _e(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let o=n;o<e.length;o++)if(cr(e[o],r))return n=o+1,!0;return!1})}function cr(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var ur=class{constructor(t,e,n,r,o,i,s,l){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=l,this._basicScopeAttributesProvider=new er(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=wt(e,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const a of Object.keys(o)){const c=ge(a,_e);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:o[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const o=r.injections;if(o)for(let s in o)kt(e,s,o[s],this,r);const i=this._grammarRepository.injections(n);i&&i.forEach(s=>{const l=this.getExternalGrammar(s);if(l){const a=l.injectionSelector;a&&kt(e,a,l,this,l)}})}return e.sort((o,i)=>o.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=wt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Yt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!e||e===ze.NULL){o=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),p=Y.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null);let m;d?m=te.createRootAndLookUpScopeName(d,p,this):m=te.createRoot("unknown",p),e=new ze(null,this._rootId,-1,-1,!1,null,m,m)}else o=!1,e.reset();t=t+`
3
- `;const i=this.createOnigString(t),s=i.content.length,l=new mr(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Xt(this,i,o,0,e,l,!0,r);return qt(i),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function wt(t,e){return t=Tn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var te=class B{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,o=e?.scopePath??null;for(const i of n)o=Ie.push(o,i.scopeNames),r=new B(r,o,i.encodedTokenAttributes);return r}static createRoot(e,n){return new B(null,new Ie(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const o=r.getMetadataForScope(e),i=new Ie(null,e),s=r.themeProvider.themeMatch(i),l=B.mergeAttributes(n,o,s);return new B(null,i,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return B.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let o=-1,i=0,s=0;return r!==null&&(o=r.fontStyle,i=r.foregroundId,s=r.backgroundId),Y.set(e,n.languageId,n.tokenType,null,o,i,s)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return B._pushAttributed(this,e,n);const r=e.split(/ /g);let o=this;for(const i of r)o=B._pushAttributed(o,i,n);return o}static _pushAttributed(e,n,r){const o=r.getMetadataForScope(n),i=e.scopePath.push(n),s=r.themeProvider.themeMatch(i),l=B.mergeAttributes(e.tokenAttributes,o,s);return new B(e,i,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},ze=class U{constructor(e,n,r,o,i,s,l,a){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=s,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new U(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:U._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?te.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){U._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,o,i,s,l){return new U(this,e,n,r,o,i,s,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new U(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const r=te.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new U(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,te.fromExtension(r,n.contentNameScopesList))}},pr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ge(n,_e).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ge(n,_e).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},mr=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=t?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(i)&&(r=Y.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=Y.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,o=this._binaryTokens.length;r<o;r++)n[r]=this._binaryTokens[r];return n}},hr=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,o){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,lr(t,i,e,n,r,o,this,this._onigLib))}return this._grammars.get(t)}},dr=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new hr(fe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(fe.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new pr(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,o,i){const s=new Fn(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(l=>this._loadSingleGrammar(l.scopeName)),s.processQueue();return this._grammarForScopeName(e,n,r,o,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,o=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,o)}_grammarForScopeName(e,n=0,r=null,o=null,i=null){return this._syncRegistry.grammarForScopeName(e,n,r,o,i)}},qe=ze.NULL;const fr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ae{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}ae.prototype.normal={};ae.prototype.property={};ae.prototype.space=void 0;function Zt(t,e){const n={},r={};for(const o of t)Object.assign(n,o.property),Object.assign(r,o.normal);return new ae(n,r,e)}function Ve(t){return t.toLowerCase()}class E{constructor(e,n){this.attribute=n,this.property=e}}E.prototype.attribute="";E.prototype.booleanish=!1;E.prototype.boolean=!1;E.prototype.commaOrSpaceSeparated=!1;E.prototype.commaSeparated=!1;E.prototype.defined=!1;E.prototype.mustUseProperty=!1;E.prototype.number=!1;E.prototype.overloadedBoolean=!1;E.prototype.property="";E.prototype.spaceSeparated=!1;E.prototype.space=void 0;let gr=0;const k=F(),N=F(),Ke=F(),f=F(),v=F(),V=F(),O=F();function F(){return 2**++gr}var Ye=Object.freeze({__proto__:null,boolean:k,booleanish:N,commaOrSpaceSeparated:O,commaSeparated:V,number:f,overloadedBoolean:Ke,spaceSeparated:v});const Me=Object.keys(Ye);class Ze extends E{constructor(e,n,r,o){let i=-1;if(super(e,n),vt(this,"space",o),typeof r=="number")for(;++i<Me.length;){const s=Me[i];vt(this,Me[i],(r&Ye[s])===Ye[s])}}}Ze.prototype.defined=!0;function vt(t,e,n){n&&(t[e]=n)}function X(t){const e={},n={};for(const[r,o]of Object.entries(t.properties)){const i=new Ze(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),e[r]=i,n[Ve(r)]=r,n[Ve(i.attribute)]=r}return new ae(e,n,t.space)}const en=X({properties:{ariaActiveDescendant:null,ariaAtomic:N,ariaAutoComplete:null,ariaBusy:N,ariaChecked:N,ariaColCount:f,ariaColIndex:f,ariaColSpan:f,ariaControls:v,ariaCurrent:null,ariaDescribedBy:v,ariaDetails:null,ariaDisabled:N,ariaDropEffect:v,ariaErrorMessage:null,ariaExpanded:N,ariaFlowTo:v,ariaGrabbed:N,ariaHasPopup:null,ariaHidden:N,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:v,ariaLevel:f,ariaLive:null,ariaModal:N,ariaMultiLine:N,ariaMultiSelectable:N,ariaOrientation:null,ariaOwns:v,ariaPlaceholder:null,ariaPosInSet:f,ariaPressed:N,ariaReadOnly:N,ariaRelevant:null,ariaRequired:N,ariaRoleDescription:v,ariaRowCount:f,ariaRowIndex:f,ariaRowSpan:f,ariaSelected:N,ariaSetSize:f,ariaSort:null,ariaValueMax:f,ariaValueMin:f,ariaValueNow:f,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function tn(t,e){return e in t?t[e]:e}function nn(t,e){return tn(t,e.toLowerCase())}const yr=X({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:V,acceptCharset:v,accessKey:v,action:null,allow:null,allowFullScreen:k,allowPaymentRequest:k,allowUserMedia:k,alt:null,as:null,async:k,autoCapitalize:null,autoComplete:v,autoFocus:k,autoPlay:k,blocking:v,capture:null,charSet:null,checked:k,cite:null,className:v,cols:f,colSpan:null,content:null,contentEditable:N,controls:k,controlsList:v,coords:f|V,crossOrigin:null,data:null,dateTime:null,decoding:null,default:k,defer:k,dir:null,dirName:null,disabled:k,download:Ke,draggable:N,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:k,formTarget:null,headers:v,height:f,hidden:Ke,high:f,href:null,hrefLang:null,htmlFor:v,httpEquiv:v,id:null,imageSizes:null,imageSrcSet:null,inert:k,inputMode:null,integrity:null,is:null,isMap:k,itemId:null,itemProp:v,itemRef:v,itemScope:k,itemType:v,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:k,low:f,manifest:null,max:null,maxLength:f,media:null,method:null,min:null,minLength:f,multiple:k,muted:k,name:null,nonce:null,noModule:k,noValidate:k,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:k,optimum:f,pattern:null,ping:v,placeholder:null,playsInline:k,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:k,referrerPolicy:null,rel:v,required:k,reversed:k,rows:f,rowSpan:f,sandbox:v,scope:null,scoped:k,seamless:k,selected:k,shadowRootClonable:k,shadowRootDelegatesFocus:k,shadowRootMode:null,shape:null,size:f,sizes:null,slot:null,span:f,spellCheck:N,src:null,srcDoc:null,srcLang:null,srcSet:null,start:f,step:null,style:null,tabIndex:f,target:null,title:null,translate:null,type:null,typeMustMatch:k,useMap:null,value:N,width:f,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:v,axis:null,background:null,bgColor:null,border:f,borderColor:null,bottomMargin:f,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:k,declare:k,event:null,face:null,frame:null,frameBorder:null,hSpace:f,leftMargin:f,link:null,longDesc:null,lowSrc:null,marginHeight:f,marginWidth:f,noResize:k,noHref:k,noShade:k,noWrap:k,object:null,profile:null,prompt:null,rev:null,rightMargin:f,rules:null,scheme:null,scrolling:N,standby:null,summary:null,text:null,topMargin:f,valueType:null,version:null,vAlign:null,vLink:null,vSpace:f,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:k,disableRemotePlayback:k,prefix:null,property:null,results:f,security:null,unselectable:null},space:"html",transform:nn}),br=X({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:O,accentHeight:f,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:f,amplitude:f,arabicForm:null,ascent:f,attributeName:null,attributeType:null,azimuth:f,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:f,by:null,calcMode:null,capHeight:f,className:v,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:f,diffuseConstant:f,direction:null,display:null,dur:null,divisor:f,dominantBaseline:null,download:k,dx:null,dy:null,edgeMode:null,editable:null,elevation:f,enableBackground:null,end:null,event:null,exponent:f,externalResourcesRequired:null,fill:null,fillOpacity:f,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:V,g2:V,glyphName:V,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:f,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:f,horizOriginX:f,horizOriginY:f,id:null,ideographic:f,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:f,k:f,k1:f,k2:f,k3:f,k4:f,kernelMatrix:O,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:f,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:f,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:f,overlineThickness:f,paintOrder:null,panose1:null,path:null,pathLength:f,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:v,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:f,pointsAtY:f,pointsAtZ:f,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:O,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:O,rev:O,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:O,requiredFeatures:O,requiredFonts:O,requiredFormats:O,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:f,specularExponent:f,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:f,strikethroughThickness:f,string:null,stroke:null,strokeDashArray:O,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:f,strokeOpacity:f,strokeWidth:null,style:null,surfaceScale:f,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:O,tabIndex:f,tableValues:null,target:null,targetX:f,targetY:f,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:O,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:f,underlineThickness:f,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:f,values:null,vAlphabetic:f,vMathematical:f,vectorEffect:null,vHanging:f,vIdeographic:f,version:null,vertAdvY:f,vertOriginX:f,vertOriginY:f,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:f,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tn}),rn=X({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),on=X({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:nn}),sn=X({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),_r=/[A-Z]/g,Ct=/-[a-z]/g,Sr=/^data[-\w.:]+$/i;function kr(t,e){const n=Ve(e);let r=e,o=E;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Sr.test(e)){if(e.charAt(4)==="-"){const i=e.slice(5).replace(Ct,vr);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=e.slice(4);if(!Ct.test(i)){let s=i.replace(_r,wr);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}o=Ze}return new o(r,e)}function wr(t){return"-"+t.toLowerCase()}function vr(t){return t.charAt(1).toUpperCase()}const Cr=Zt([en,yr,rn,on,sn],"html"),an=Zt([en,br,rn,on,sn],"svg"),Nt={}.hasOwnProperty;function Nr(t,e){const n=e||{};function r(o,...i){let s=r.invalid;const l=r.handlers;if(o&&Nt.call(o,t)){const a=String(o[t]);s=Nt.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Rr=/["&'<>`]/g,xr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Lr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Tr=/[|\\{}()[\]^$+*?.]/g,Rt=new WeakMap;function Ar(t,e){if(t=t.replace(e.subset?Pr(e.subset):Rr,r),e.subset||e.escapeOnly)return t;return t.replace(xr,n).replace(Lr,r);function n(o,i,s){return e.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),e)}function r(o,i,s){return e.format(o.charCodeAt(0),s.charCodeAt(i+1),e)}}function Pr(t){let e=Rt.get(t);return e||(e=Er(t),Rt.set(t,e)),e}function Er(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Tr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Ir=/[\dA-Fa-f]/;function Or(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Ir.test(String.fromCharCode(e))?r:r+";"}const Mr=/\d/;function Br(t,e,n){const r="&#"+String(t);return n&&e&&!Mr.test(String.fromCharCode(e))?r:r+";"}const Dr=["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"],Be={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Gr=["cent","copy","divide","gt","lt","not","para","times"],ln={}.hasOwnProperty,Je={};let ce;for(ce in Be)ln.call(Be,ce)&&(Je[Be[ce]]=ce);const jr=/[^\dA-Za-z]/;function $r(t,e,n,r){const o=String.fromCharCode(t);if(ln.call(Je,o)){const i=Je[o],s="&"+i;return n&&Dr.includes(i)&&!Gr.includes(i)&&(!r||e&&e!==61&&jr.test(String.fromCharCode(e)))?s:s+";"}return""}function Ur(t,e,n){let r=Or(t,e,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=$r(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const i=Br(t,e,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return o&&(!n.useShortestReferences||o.length<r.length)?o:r}function K(t,e){return Ar(t,Object.assign({format:Ur},e))}const Hr=/^>|^->|<!--|-->|--!>|<!-$/g,Fr=[">"],Wr=["<",">"];function zr(t,e,n,r){return r.settings.bogusComments?"<?"+K(t.value,Object.assign({},r.settings.characterReferences,{subset:Fr}))+">":"<!--"+t.value.replace(Hr,o)+"-->";function o(i){return K(i,Object.assign({},r.settings.characterReferences,{subset:Wr}))}}function qr(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function xt(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(e);for(;o!==-1;)r++,o=n.indexOf(e,o+e.length);return r}function Vr(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Kr(t){return t.join(" ").trim()}const Yr=/[ \t\n\f\r]/g;function et(t){return typeof t=="object"?t.type==="text"?Lt(t.value):!1:Lt(t)}function Lt(t){return t.replace(Yr,"")===""}const L=un(1),cn=un(-1),Jr=[];function un(t){return e;function e(n,r,o){const i=n?n.children:Jr;let s=(r||0)+t,l=i[s];if(!o)for(;l&&et(l);)s+=t,l=i[s];return l}}const Xr={}.hasOwnProperty;function pn(t){return e;function e(n,r,o){return Xr.call(t,n.tagName)&&t[n.tagName](n,r,o)}}const tt=pn({body:Zr,caption:De,colgroup:De,dd:ro,dt:no,head:De,html:Qr,li:to,optgroup:oo,option:io,p:eo,rp:Tt,rt:Tt,tbody:ao,td:At,tfoot:lo,th:At,thead:so,tr:co});function De(t,e,n){const r=L(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&et(r.value.charAt(0)))}function Qr(t,e,n){const r=L(n,e);return!r||r.type!=="comment"}function Zr(t,e,n){const r=L(n,e);return!r||r.type!=="comment"}function eo(t,e,n){const r=L(n,e);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"))}function to(t,e,n){const r=L(n,e);return!r||r.type==="element"&&r.tagName==="li"}function no(t,e,n){const r=L(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ro(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Tt(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function oo(t,e,n){const r=L(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function io(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function so(t,e,n){const r=L(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ao(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function lo(t,e,n){return!L(n,e)}function co(t,e,n){const r=L(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function At(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const uo=pn({body:ho,colgroup:fo,head:mo,html:po,tbody:go});function po(t){const e=L(t,-1);return!e||e.type!=="comment"}function mo(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function ho(t){const e=L(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&et(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function fo(t,e,n){const r=cn(n,e),o=L(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&tt(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function go(t,e,n){const r=cn(n,e),o=L(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&tt(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const ue={name:[[`
1
+ let R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function In(t){return et(t)}function et(t){return Array.isArray(t)?On(t):t instanceof RegExp?t:typeof t=="object"?Mn(t):t}function On(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=et(t[n]);return e}function Mn(t){let e={};for(let n in t)e[n]=et(t[n]);return e}function Ut(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Ht(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Ht(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,le=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,i,o,s)=>{let l=n[parseInt(i||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Ft(t,e){return t<e?-1:t>e?1:0}function Wt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let o=Ft(t[i],e[i]);if(o!==0)return o}return 0}return n-r}function gt(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function zt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var qt=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},ge=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Gn(t),e)}static createFromParsedTheme(t,e){return $n(t,e)}_cachedMatchRoot=new qt(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(i=>Bn(t.parent,i.parentScopes));return r?new Vt(r.fontStyle,r.foreground,r.background):null}},Me=class he{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new he(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new he(n,e[r]);return n}push(e){return new he(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Bn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!Dn(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Dn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Vt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Gn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let l;if(typeof s.scope=="string"){let p=s.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),l=p.split(",")}else Array.isArray(s.scope)?l=s.scope:l=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let p=s.settings.fontStyle.split(" ");for(let h=0,m=p.length;h<m;h++)switch(p[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof s.settings.foreground=="string"&&gt(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&gt(s.settings.background)&&(u=s.settings.background);for(let p=0,h=l.length;p<h;p++){let d=l[p].trim().split(" "),b=d[d.length-1],_=null;d.length>1&&(_=d.slice(0,d.length-1),_.reverse()),n[r++]=new jn(b,_,i,a,c,u)}}return n}var jn=class{constructor(t,e,n,r,i,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},P=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(P||{});function $n(t,e){t.sort((a,c)=>{let u=Ft(a.scope,c.scope);return u!==0||(u=Wt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(i=a.background)}let o=new Un(e),s=new Vt(n,o.getId(r),o.getId(i)),l=new Fn(new He(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new ge(o,s,l)}var Un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Hn=Object.freeze([]),He=class Kt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,i,o){this.scopeDepth=e,this.parentScopes=n||Hn,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new Kt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Fn=class Fe{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-e.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,o;if(r===-1?(i=e,o=""):(i=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Fe._cmpBySpecificity),n}insert(e,n,r,i,o,s){if(n===""){this._doInsertHere(e,r,i,o,s);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Fe(this._mainRule.clone(),He.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,i,o,s)}_doInsertHere(e,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(e,r,i,o);return}for(let s=0,l=this._rulesWithParentScopes.length;s<l;s++){let a=this._rulesWithParentScopes[s];if(Wt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new He(e,n,r,i,o))}},Y=class M{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=M.getLanguageId(e),r=M.getTokenType(e),i=M.getFontStyle(e),o=M.getForeground(e),s=M.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,o,s,l){let a=M.getLanguageId(e),c=M.getTokenType(e),u=M.containsBalancedBrackets(e)?1:0,p=M.getFontStyle(e),h=M.getForeground(e),m=M.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),i!==null&&(u=i?1:0),o!==-1&&(p=o),s!==0&&(h=s),l!==0&&(m=l),(a<<0|c<<8|u<<10|p<<11|h<<15|m<<24)>>>0}};function ye(t,e){const n=[],r=Wn(t);let i=r.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=s();if(n.push({matcher:c,priority:a}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const a=o();return c=>!!a&&!a(c)}if(i==="("){i=r.next();const a=l();return i===")"&&(i=r.next()),a}if(yt(i)){const a=[];do a.push(i),i=r.next();while(yt(i));return c=>e(a,c)}return null}function s(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(p=>p(u))}function l(){const a=[];let c=s();for(;c&&(a.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=s()}return u=>a.some(p=>p(u))}}function yt(t){return!!t&&!!t.match(/[\w\.:]+/)}function Wn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Yt(t){typeof t.dispose=="function"&&t.dispose()}var ne=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},zn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},qn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Vn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ne(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new qn;for(const n of t)Kn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof ne){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Kn(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof ne?de({baseGrammar:o,selfGrammar:i},r):We(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(t.scopeName);if(s)for(const l of s)r.add(new ne(l))}function We(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];be([r],e,n)}}function de(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&be(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&be(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function be(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Ut({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&be(r.patterns,{...e,repository:i},n);const o=r.include;if(!o)continue;const s=Jt(o);switch(s.kind){case 0:de({...e,selfGrammar:e.baseGrammar},n);break;case 1:de(e,n);break;case 2:We(s.ruleName,{...e,repository:i},n);break;case 3:case 4:const l=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:i};s.kind===4?We(s.ruleName,a,n):de(a,n)}else s.kind===4?n.add(new zn(s.scopeName,s.ruleName)):n.add(new ne(s.scopeName));break}}}var Yn=class{kind=0},Jn=class{kind=1},Xn=class{constructor(t){this.ruleName=t}kind=2},Qn=class{constructor(t){this.scopeName=t}kind=3},Zn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Jt(t){if(t==="$base")return new Yn;if(t==="$self")return new Jn;const e=t.indexOf("#");if(e===-1)return new Qn(t);if(e===0)return new Xn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Zn(n,r)}}var er=/\\(\d+)/,bt=/\\(\d+)/g,tr=-1,Xt=-2;var se=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Ht(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:le.replaceCaptures(this._contentName,t,e)}},nr=class extends se{retokenizeCapturedWithRuleId;constructor(t,e,n,r,i){super(t,e,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},rr=class extends se{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,null),this._match=new re(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ie,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_t=class extends se{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ie,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ze=class extends se{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i,o,s,l,a,c){super(t,e,n,r),this._begin=new re(i,this.id),this.beginCaptures=o,this._end=new re(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ie;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},_e=class extends se{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,i,o,s,l,a){super(t,e,n,r),this._begin=new re(i,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new re(s,Xt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ie;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ie,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},Qt=class T{static createCaptureRule(e,n,r,i,o){return e.registerRule(s=>new nr(n,s,r,i,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new rr(e.$vscodeTextmateLocation,e.id,e.name,e.match,T._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Ut({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new _t(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,T._compilePatterns(o,n,r))}return e.while?new _e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,T._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,T._compileCaptures(e.whileCaptures||e.captures,n,r),T._compilePatterns(e.patterns,n,r)):new ze(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,T._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,T._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,T._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);l>o&&(o=l)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);let a=0;e[s].patterns&&(a=T.getCompiledRuleId(e[s],n,r)),i[l]=T.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const l=e[o];let a=-1;if(l.include){const c=Jt(l.include);switch(c.kind){case 0:case 1:a=T.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=T.getCompiledRuleId(u,n,r));break;case 3:case 4:const p=c.scopeName,h=c.kind===4?c.ruleName:null,m=n.getExternalGrammar(p,r);if(m)if(h){let d=m.repository[h];d&&(a=T.getCompiledRuleId(d,n,m.repository))}else a=T.getCompiledRuleId(m.repository.$self,n,m.repository);break}}else a=T.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof _t||c instanceof ze||c instanceof _e)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},re=class Zt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let i=0,o=[],s=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(i,l)),o.push("$(?!\\n)(?<!\\n)"),i=l+2):(c==="A"||c==="G")&&(s=!0),l++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=er.test(this.source):this.hasBackReferences=!1}clone(){return new Zt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return bt.lastIndex=0,this.source.replace(bt,(i,o)=>zt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],o,s,l,a;for(o=0,s=this.source.length;o<s;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,i[o]=l,l==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="￿",n[o+1]="￿",r[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="￿",n[o+1]="G",r[o+1]="￿",i[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ie=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new St(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new St(t,r,this._items.map(i=>i.ruleId))}},St=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
2
+ `)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Be=class{constructor(t,e){this.languageId=t,this.tokenType=e}},ir=class qe{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Be(e,8),this._embeddedLanguagesMatcher=new or(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?qe._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Be(0,0);_getBasicScopeAttributes=new qt(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Be(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(qe.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},or=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>zt(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},kt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function en(t,e,n,r,i,o,s,l){const a=e.content.length;let c=!1,u=-1;if(s){const m=sr(t,e,n,r,i,o);i=m.stack,r=m.linePos,n=m.isFirstLine,u=m.anchorPosition}const p=Date.now();for(;!c;){if(l!==0&&Date.now()-p>l)return new kt(i,!0);h()}return new kt(i,!1);function h(){const m=ar(t,e,n,r,i,u);if(!m){o.produce(i,a),c=!0;return}const d=m.captureIndices,b=m.matchedRuleId,_=d&&d.length>0?d[0].end>r:!1;if(b===tr){const y=i.getRule(t);o.produce(i,d[0].start),i=i.withContentNameScopesList(i.nameScopesList),ee(t,e,n,i,o,y.endCaptures,d),o.produce(i,d[0].end);const S=i;if(i=i.parent,u=S.getAnchorPos(),!_&&S.getEnterPos()===r){i=S,o.produce(i,a),c=!0;return}}else{const y=t.getRule(b);o.produce(i,d[0].start);const S=i,g=y.getName(e.content,d),w=i.contentNameScopesList.pushAttributed(g,t);if(i=i.push(b,r,u,d[0].end===a,null,w,w),y instanceof ze){const C=y;ee(t,e,n,i,o,C.beginCaptures,d),o.produce(i,d[0].end),u=d[0].end;const I=C.getContentName(e.content,d),$=w.pushAttributed(I,t);if(i=i.withContentNameScopesList($),C.endHasBackReferences&&(i=i.withEndRule(C.getEndWithResolvedBackReferences(e.content,d))),!_&&S.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(y instanceof _e){const C=y;ee(t,e,n,i,o,C.beginCaptures,d),o.produce(i,d[0].end),u=d[0].end;const I=C.getContentName(e.content,d),$=w.pushAttributed(I,t);if(i=i.withContentNameScopesList($),C.whileHasBackReferences&&(i=i.withEndRule(C.getWhileWithResolvedBackReferences(e.content,d))),!_&&S.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(ee(t,e,n,i,o,y.captures,d),o.produce(i,d[0].end),i=i.pop(),!_){i=i.safePop(),o.produce(i,a),c=!0;return}}d[0].end>r&&(r=d[0].end,n=!1)}}function sr(t,e,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const l=[];for(let a=i;a;a=a.pop()){const c=a.getRule(t);c instanceof _e&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=ur(a.rule,t,a.stack.endRule,n,r===s),p=c.findNextMatchSync(e,r,u);if(p){if(p.ruleId!==Xt){i=a.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(a.stack,p.captureIndices[0].start),ee(t,e,n,a.stack,o,a.rule.whileCaptures,p.captureIndices),o.produce(a.stack,p.captureIndices[0].end),s=p.captureIndices[0].end,p.captureIndices[0].end>r&&(r=p.captureIndices[0].end,n=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function ar(t,e,n,r,i,o){const s=lr(t,e,n,r,i,o),l=t.getInjections();if(l.length===0)return s;const a=cr(l,t,e,n,r,i,o);if(!a)return s;if(!s)return a;const c=s.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:s}function lr(t,e,n,r,i,o){const s=i.getRule(t),{ruleScanner:l,findOptions:a}=tn(s,t,i.endRule,n,r===o),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function cr(t,e,n,r,i,o,s){let l=Number.MAX_VALUE,a=null,c,u=0;const p=o.contentNameScopesList.getScopeNames();for(let h=0,m=t.length;h<m;h++){const d=t[h];if(!d.matcher(p))continue;const b=e.getRule(d.ruleId),{ruleScanner:_,findOptions:y}=tn(b,e,null,r,i===s),S=_.findNextMatchSync(n,i,y);if(!S)continue;const g=S.captureIndices[0].start;if(!(g>=l)&&(l=g,a=S.captureIndices,c=S.ruleId,u=d.priority,l===i))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function tn(t,e,n,r,i){return{ruleScanner:t.compileAG(e,n,r,i),findOptions:0}}function ur(t,e,n,r,i){return{ruleScanner:t.compileWhileAG(e,n,r,i),findOptions:0}}function ee(t,e,n,r,i,o,s){if(o.length===0)return;const l=e.content,a=Math.min(o.length,s.length),c=[],u=s[0].end;for(let p=0;p<a;p++){const h=o[p];if(h===null)continue;const m=s[p];if(m.length===0)continue;if(m.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=m.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,m.start):i.produce(r,m.start),h.retokenizeCapturedWithRuleId){const b=h.getName(l,s),_=r.contentNameScopesList.pushAttributed(b,t),y=h.getContentName(l,s),S=_.pushAttributed(y,t),g=r.push(h.retokenizeCapturedWithRuleId,m.start,-1,!1,null,_,S),w=t.createOnigString(l.substring(0,m.end));en(t,w,n&&m.start===0,m.start,g,i,!1,0),Yt(w);continue}const d=h.getName(l,s);if(d!==null){const _=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(d,t);c.push(new pr(_,m.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var pr=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function mr(t,e,n,r,i,o,s,l){return new dr(t,e,n,r,i,o,s,l)}function wt(t,e,n,r,i){const o=ye(e,Se),s=Qt.getCompiledRuleId(n,r,i.repository);for(const l of o)t.push({debugSelector:e,matcher:l.matcher,ruleId:s,grammar:i,priority:l.priority})}function Se(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let i=n;i<e.length;i++)if(hr(e[i],r))return n=i+1,!0;return!1})}function hr(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var dr=class{constructor(t,e,n,r,i,o,s,l){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new ir(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=vt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const c=ye(a,Se);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)wt(e,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const l=this.getExternalGrammar(s);if(l){const a=l.injectionSelector;a&&wt(e,a,l,this,l)}})}return e.sort((i,o)=>i.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=vt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Qt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Ve.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),p=Y.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),h=this.getRule(this._rootId).getName(null,null);let m;h?m=te.createRootAndLookUpScopeName(h,p,this):m=te.createRoot("unknown",p),e=new Ve(null,this._rootId,-1,-1,!1,null,m,m)}else i=!1,e.reset();t=t+`
3
+ `;const o=this.createOnigString(t),s=o.content.length,l=new gr(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=en(this,o,i,0,e,l,!0,r);return Yt(o),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function vt(t,e){return t=In(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var te=class B{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,i=e?.scopePath??null;for(const o of n)i=Me.push(i,o.scopeNames),r=new B(r,i,o.encodedTokenAttributes);return r}static createRoot(e,n){return new B(null,new Me(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const i=r.getMetadataForScope(e),o=new Me(null,e),s=r.themeProvider.themeMatch(o),l=B.mergeAttributes(n,i,s);return new B(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return B.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),Y.set(e,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return B._pushAttributed(this,e,n);const r=e.split(/ /g);let i=this;for(const o of r)i=B._pushAttributed(i,o,n);return i}static _pushAttributed(e,n,r){const i=r.getMetadataForScope(n),o=e.scopePath.push(n),s=r.themeProvider.themeMatch(o),l=B.mergeAttributes(e.tokenAttributes,i,s);return new B(e,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Ve=class U{constructor(e,n,r,i,o,s,l,a){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new U(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:U._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?te.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){U._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,i,o,s,l){return new U(this,e,n,r,i,o,s,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new U(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const r=te.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new U(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,te.fromExtension(r,n.contentNameScopesList))}},fr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ye(n,Se).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ye(n,Se).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},gr=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=t?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=Y.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=Y.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},yr=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,i){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,mr(t,o,e,n,r,i,this,this._onigLib))}return this._grammars.get(t)}},br=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new yr(ge.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(ge.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new fr(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,i,o){const s=new Vn(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(l=>this._loadSingleGrammar(l.scopeName)),s.processQueue();return this._grammarForScopeName(e,n,r,i,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,i=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,r,i,o)}},Ke=Ve.NULL;const _r=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ae{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}ae.prototype.normal={};ae.prototype.property={};ae.prototype.space=void 0;function nn(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new ae(n,r,e)}function Ye(t){return t.toLowerCase()}class E{constructor(e,n){this.attribute=n,this.property=e}}E.prototype.attribute="";E.prototype.booleanish=!1;E.prototype.boolean=!1;E.prototype.commaOrSpaceSeparated=!1;E.prototype.commaSeparated=!1;E.prototype.defined=!1;E.prototype.mustUseProperty=!1;E.prototype.number=!1;E.prototype.overloadedBoolean=!1;E.prototype.property="";E.prototype.spaceSeparated=!1;E.prototype.space=void 0;let Sr=0;const k=F(),N=F(),Je=F(),f=F(),v=F(),V=F(),O=F();function F(){return 2**++Sr}var Xe=Object.freeze({__proto__:null,boolean:k,booleanish:N,commaOrSpaceSeparated:O,commaSeparated:V,number:f,overloadedBoolean:Je,spaceSeparated:v});const De=Object.keys(Xe);class tt extends E{constructor(e,n,r,i){let o=-1;if(super(e,n),Ct(this,"space",i),typeof r=="number")for(;++o<De.length;){const s=De[o];Ct(this,De[o],(r&Xe[s])===Xe[s])}}}tt.prototype.defined=!0;function Ct(t,e,n){n&&(t[e]=n)}function X(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const o=new tt(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[Ye(r)]=r,n[Ye(o.attribute)]=r}return new ae(e,n,t.space)}const rn=X({properties:{ariaActiveDescendant:null,ariaAtomic:N,ariaAutoComplete:null,ariaBusy:N,ariaChecked:N,ariaColCount:f,ariaColIndex:f,ariaColSpan:f,ariaControls:v,ariaCurrent:null,ariaDescribedBy:v,ariaDetails:null,ariaDisabled:N,ariaDropEffect:v,ariaErrorMessage:null,ariaExpanded:N,ariaFlowTo:v,ariaGrabbed:N,ariaHasPopup:null,ariaHidden:N,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:v,ariaLevel:f,ariaLive:null,ariaModal:N,ariaMultiLine:N,ariaMultiSelectable:N,ariaOrientation:null,ariaOwns:v,ariaPlaceholder:null,ariaPosInSet:f,ariaPressed:N,ariaReadOnly:N,ariaRelevant:null,ariaRequired:N,ariaRoleDescription:v,ariaRowCount:f,ariaRowIndex:f,ariaRowSpan:f,ariaSelected:N,ariaSetSize:f,ariaSort:null,ariaValueMax:f,ariaValueMin:f,ariaValueNow:f,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function on(t,e){return e in t?t[e]:e}function sn(t,e){return on(t,e.toLowerCase())}const kr=X({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:V,acceptCharset:v,accessKey:v,action:null,allow:null,allowFullScreen:k,allowPaymentRequest:k,allowUserMedia:k,alt:null,as:null,async:k,autoCapitalize:null,autoComplete:v,autoFocus:k,autoPlay:k,blocking:v,capture:null,charSet:null,checked:k,cite:null,className:v,cols:f,colSpan:null,content:null,contentEditable:N,controls:k,controlsList:v,coords:f|V,crossOrigin:null,data:null,dateTime:null,decoding:null,default:k,defer:k,dir:null,dirName:null,disabled:k,download:Je,draggable:N,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:k,formTarget:null,headers:v,height:f,hidden:Je,high:f,href:null,hrefLang:null,htmlFor:v,httpEquiv:v,id:null,imageSizes:null,imageSrcSet:null,inert:k,inputMode:null,integrity:null,is:null,isMap:k,itemId:null,itemProp:v,itemRef:v,itemScope:k,itemType:v,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:k,low:f,manifest:null,max:null,maxLength:f,media:null,method:null,min:null,minLength:f,multiple:k,muted:k,name:null,nonce:null,noModule:k,noValidate:k,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:k,optimum:f,pattern:null,ping:v,placeholder:null,playsInline:k,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:k,referrerPolicy:null,rel:v,required:k,reversed:k,rows:f,rowSpan:f,sandbox:v,scope:null,scoped:k,seamless:k,selected:k,shadowRootClonable:k,shadowRootDelegatesFocus:k,shadowRootMode:null,shape:null,size:f,sizes:null,slot:null,span:f,spellCheck:N,src:null,srcDoc:null,srcLang:null,srcSet:null,start:f,step:null,style:null,tabIndex:f,target:null,title:null,translate:null,type:null,typeMustMatch:k,useMap:null,value:N,width:f,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:v,axis:null,background:null,bgColor:null,border:f,borderColor:null,bottomMargin:f,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:k,declare:k,event:null,face:null,frame:null,frameBorder:null,hSpace:f,leftMargin:f,link:null,longDesc:null,lowSrc:null,marginHeight:f,marginWidth:f,noResize:k,noHref:k,noShade:k,noWrap:k,object:null,profile:null,prompt:null,rev:null,rightMargin:f,rules:null,scheme:null,scrolling:N,standby:null,summary:null,text:null,topMargin:f,valueType:null,version:null,vAlign:null,vLink:null,vSpace:f,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:k,disableRemotePlayback:k,prefix:null,property:null,results:f,security:null,unselectable:null},space:"html",transform:sn}),wr=X({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:O,accentHeight:f,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:f,amplitude:f,arabicForm:null,ascent:f,attributeName:null,attributeType:null,azimuth:f,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:f,by:null,calcMode:null,capHeight:f,className:v,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:f,diffuseConstant:f,direction:null,display:null,dur:null,divisor:f,dominantBaseline:null,download:k,dx:null,dy:null,edgeMode:null,editable:null,elevation:f,enableBackground:null,end:null,event:null,exponent:f,externalResourcesRequired:null,fill:null,fillOpacity:f,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:V,g2:V,glyphName:V,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:f,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:f,horizOriginX:f,horizOriginY:f,id:null,ideographic:f,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:f,k:f,k1:f,k2:f,k3:f,k4:f,kernelMatrix:O,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:f,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:f,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:f,overlineThickness:f,paintOrder:null,panose1:null,path:null,pathLength:f,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:v,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:f,pointsAtY:f,pointsAtZ:f,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:O,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:O,rev:O,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:O,requiredFeatures:O,requiredFonts:O,requiredFormats:O,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:f,specularExponent:f,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:f,strikethroughThickness:f,string:null,stroke:null,strokeDashArray:O,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:f,strokeOpacity:f,strokeWidth:null,style:null,surfaceScale:f,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:O,tabIndex:f,tableValues:null,target:null,targetX:f,targetY:f,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:O,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:f,underlineThickness:f,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:f,values:null,vAlphabetic:f,vMathematical:f,vectorEffect:null,vHanging:f,vIdeographic:f,version:null,vertAdvY:f,vertOriginX:f,vertOriginY:f,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:f,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:on}),an=X({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),ln=X({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:sn}),cn=X({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),vr=/[A-Z]/g,Nt=/-[a-z]/g,Cr=/^data[-\w.:]+$/i;function Nr(t,e){const n=Ye(e);let r=e,i=E;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Cr.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Nt,Lr);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Nt.test(o)){let s=o.replace(vr,Rr);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=tt}return new i(r,e)}function Rr(t){return"-"+t.toLowerCase()}function Lr(t){return t.charAt(1).toUpperCase()}const xr=nn([rn,kr,an,ln,cn],"html"),un=nn([rn,wr,an,ln,cn],"svg"),Rt={}.hasOwnProperty;function Ar(t,e){const n=e||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&Rt.call(i,t)){const a=String(i[t]);s=Rt.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Tr=/["&'<>`]/g,Pr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Er=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Ir=/[|\\{}()[\]^$+*?.]/g,Lt=new WeakMap;function Or(t,e){if(t=t.replace(e.subset?Mr(e.subset):Tr,r),e.subset||e.escapeOnly)return t;return t.replace(Pr,n).replace(Er,r);function n(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function r(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function Mr(t){let e=Lt.get(t);return e||(e=Br(t),Lt.set(t,e)),e}function Br(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Ir,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Dr=/[\dA-Fa-f]/;function Gr(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Dr.test(String.fromCharCode(e))?r:r+";"}const jr=/\d/;function $r(t,e,n){const r="&#"+String(t);return n&&e&&!jr.test(String.fromCharCode(e))?r:r+";"}const Ur=["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"],Ge={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Hr=["cent","copy","divide","gt","lt","not","para","times"],pn={}.hasOwnProperty,Qe={};let ce;for(ce in Ge)pn.call(Ge,ce)&&(Qe[Ge[ce]]=ce);const Fr=/[^\dA-Za-z]/;function Wr(t,e,n,r){const i=String.fromCharCode(t);if(pn.call(Qe,i)){const o=Qe[i],s="&"+o;return n&&Ur.includes(o)&&!Hr.includes(o)&&(!r||e&&e!==61&&Fr.test(String.fromCharCode(e)))?s:s+";"}return""}function zr(t,e,n){let r=Gr(t,e,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Wr(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=$r(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function K(t,e){return Or(t,Object.assign({format:zr},e))}const qr=/^>|^->|<!--|-->|--!>|<!-$/g,Vr=[">"],Kr=["<",">"];function Yr(t,e,n,r){return r.settings.bogusComments?"<?"+K(t.value,Object.assign({},r.settings.characterReferences,{subset:Vr}))+">":"<!--"+t.value.replace(qr,i)+"-->";function i(o){return K(o,Object.assign({},r.settings.characterReferences,{subset:Kr}))}}function Jr(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function xt(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function Xr(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Qr(t){return t.join(" ").trim()}const Zr=/[ \t\n\f\r]/g;function nt(t){return typeof t=="object"?t.type==="text"?At(t.value):!1:At(t)}function At(t){return t.replace(Zr,"")===""}const x=hn(1),mn=hn(-1),ei=[];function hn(t){return e;function e(n,r,i){const o=n?n.children:ei;let s=(r||0)+t,l=o[s];if(!i)for(;l&&nt(l);)s+=t,l=o[s];return l}}const ti={}.hasOwnProperty;function dn(t){return e;function e(n,r,i){return ti.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const rt=dn({body:ri,caption:je,colgroup:je,dd:ai,dt:si,head:je,html:ni,li:oi,optgroup:li,option:ci,p:ii,rp:Tt,rt:Tt,tbody:pi,td:Pt,tfoot:mi,th:Pt,thead:ui,tr:hi});function je(t,e,n){const r=x(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&nt(r.value.charAt(0)))}function ni(t,e,n){const r=x(n,e);return!r||r.type!=="comment"}function ri(t,e,n){const r=x(n,e);return!r||r.type!=="comment"}function ii(t,e,n){const r=x(n,e);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"))}function oi(t,e,n){const r=x(n,e);return!r||r.type==="element"&&r.tagName==="li"}function si(t,e,n){const r=x(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ai(t,e,n){const r=x(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Tt(t,e,n){const r=x(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function li(t,e,n){const r=x(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function ci(t,e,n){const r=x(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function ui(t,e,n){const r=x(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function pi(t,e,n){const r=x(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function mi(t,e,n){return!x(n,e)}function hi(t,e,n){const r=x(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Pt(t,e,n){const r=x(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const di=dn({body:yi,colgroup:bi,head:gi,html:fi,tbody:_i});function fi(t){const e=x(t,-1);return!e||e.type!=="comment"}function gi(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function yi(t){const e=x(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&nt(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function bi(t,e,n){const r=mn(n,e),i=x(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&rt(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function _i(t,e,n){const r=mn(n,e),i=x(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&rt(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const ue={name:[[`
4
4
  \f\r &/=>`.split(""),`
5
5
  \f\r "&'/=>\``.split("")],[`\0
6
6
  \f\r "&'/<=>`.split(""),`\0
@@ -8,5 +8,8 @@ let R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};funct
8
8
  \f\r &>`.split(""),`\0
9
9
  \f\r "&'<=>\``.split("")],[`\0
10
10
  \f\r "&'<=>\``.split(""),`\0
11
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function yo(t,e,n,r){const o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags;let s=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const l=[];let a;o.space==="html"&&t.tagName==="svg"&&(r.schema=an);const c=bo(r,t.properties),u=r.all(o.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=o,u&&(s=!1),(c||!i||!uo(t,e,n))&&(l.push("<",t.tagName,c?" "+c:""),s&&(o.space==="svg"||r.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!s&&(!i||!tt(t,e,n))&&l.push("</"+t.tagName+">"),l.join("")}function bo(t,e){const n=[];let r=-1,o;if(e){for(o in e)if(e[o]!==null&&e[o]!==void 0){const i=_o(t,o,e[o]);i&&n.push(i)}}for(;++r<n.length;){const i=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&i!=='"'&&i!=="'"&&(n[r]+=" ")}return n.join("")}function _o(t,e,n){const r=kr(t.schema,e),o=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,i=t.settings.allowDangerousCharacters?0:1;let s=t.quote,l;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"";const a=K(r.attribute,Object.assign({},t.settings.characterReferences,{subset:ue.name[o][i]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Vr:Kr)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?a:(t.settings.preferUnquoted&&(l=K(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:ue.unquoted[o][i]}))),l!==n&&(t.settings.quoteSmart&&xt(n,s)>xt(n,t.alternative)&&(s=t.alternative),l=s+K(n,Object.assign({},t.settings.characterReferences,{subset:(s==="'"?ue.single:ue.double)[o][i],attribute:!0}))+s),a+(l&&"="+l))}const So=["<","&"];function mn(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:K(t.value,Object.assign({},r.settings.characterReferences,{subset:So}))}function ko(t,e,n,r){return r.settings.allowDangerousHtml?t.value:mn(t,e,n,r)}function wo(t,e,n,r){return r.all(t)}const vo=Nr("type",{invalid:Co,unknown:No,handlers:{comment:zr,doctype:qr,element:yo,raw:ko,root:wo,text:mn}});function Co(t){throw new Error("Expected node, not `"+t+"`")}function No(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Ro={},xo={},Lo=[];function To(t,e){const n=e||Ro,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ao,all:Po,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||fr,characterReferences:n.characterReferences||xo,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?an:Cr,quote:r,alternative:o}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Ao(t,e,n){return vo(t,e,n,this)}function Po(t){const e=[],n=t&&t.children||Lo;let r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}function Se(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[o,i]of Object.entries(e?.colorReplacements||{}))typeof i=="string"?n[o]=i:o===r&&Object.assign(n,i);return n}function j(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Eo(t){return Array.isArray(t)?t:[t]}async function hn(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function nt(t){return!t||["plaintext","txt","text","plain"].includes(t)}function dn(t){return t==="ansi"||nt(t)}function rt(t){return t==="none"}function fn(t){return rt(t)}function gn(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function Ne(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(/(\r?\n)/g);let r=0;const o=[];for(let i=0;i<n.length;i+=2){const s=e?n[i]+(n[i+1]||""):n[i];o.push([s,r]),r+=n[i].length,r+=n[i+1]?.length||0}return o}function Io(t){const e=Ne(t,!0).map(([o])=>o);function n(o){if(o===t.length)return{line:e.length-1,character:e[e.length-1].length};let i=o,s=0;for(const l of e){if(i<l.length)break;i-=l.length,s++}return{line:s,character:i}}function r(o,i){let s=0;for(let l=0;l<o;l++)s+=e[l].length;return s+=i,s}return{lines:e,indexToPos:n,posToIndex:r}}const ot="light-dark()",Oo=["color","background-color"];function Mo(t,e){let n=0;const r=[];for(const o of e)o>n&&r.push({...t,content:t.content.slice(n,o),offset:t.offset+n}),n=o;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function Bo(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((r,o)=>r-o);return n.length?t.map(r=>r.flatMap(o=>{const i=n.filter(s=>o.offset<s&&s<o.offset+o.content.length).map(s=>s-o.offset).sort((s,l)=>s-l);return i.length?Mo(o,i):o})):t}function Do(t,e,n,r,o="css-vars"){const i={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map(u=>ke(t.variants[u])),l=new Set(s.flatMap(u=>Object.keys(u))),a={},c=(u,p)=>{const d=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+e[u]+(p==="color"?"":d)};return s.forEach((u,p)=>{for(const d of l){const m=u[d]||"inherit";if(p===0&&r&&Oo.includes(d))if(r===ot&&s.length>1){const h=e.findIndex(_=>_==="light"),b=e.findIndex(_=>_==="dark");if(h===-1||b===-1)throw new R('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=s[h][d]||"inherit",y=s[b][d]||"inherit";a[d]=`light-dark(${S}, ${y})`,o==="css-vars"&&(a[c(p,d)]=m)}else a[d]=m;else o==="css-vars"&&(a[c(p,d)]=m)}}),i.htmlStyle=a,i}function ke(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&P.Italic&&(e["font-style"]="italic"),t.fontStyle&P.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&P.Underline&&n.push("underline"),t.fontStyle&P.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function Xe(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}const yn=new WeakMap;function Re(t,e){yn.set(t,e)}function ie(t){return yn.get(t)}class Q{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Q(Object.fromEntries(Eo(n).map(r=>[r,qe])),e)}constructor(...e){if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,o]=e;this.lang=r,this._stacks={[o]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Go(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Go(t){const e=[],n=new Set;function r(o){if(n.has(o))return;n.add(o);const i=o?.nameScopesList?.scopeName;i&&e.push(i),o.parent&&r(o.parent)}return r(t),e}function jo(t,e){if(!(t instanceof Q))throw new R("Invalid grammar state");return t.getInternalStack(e)}function $o(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let r=function(s){if(typeof s=="number"){if(s<0||s>n.source.length)throw new R(`Invalid decoration offset: ${s}. Code length: ${n.source.length}`);return{...o.indexToPos(s),offset:s}}else{const l=o.lines[s.line];if(l===void 0)throw new R(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${o.lines.length}`);let a=s.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new R(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${l.length}`);return{...s,character:a,offset:o.posToIndex(s.line,a)}}};const o=Io(n.source),i=(n.options.decorations||[]).map(s=>({...s,start:r(s.start),end:r(s.end)}));Uo(i),t.set(n.meta,{decorations:i,converter:o,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const o=e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return Bo(n,o)},code(n){if(!this.options.decorations?.length)return;const r=e(this),o=Array.from(n.children).filter(u=>u.type==="element"&&u.tagName==="span");if(o.length!==r.converter.lines.length)throw new R(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(u,p,d,m){const h=o[u];let b="",S=-1,y=-1;if(p===0&&(S=0),d===0&&(y=0),d===Number.POSITIVE_INFINITY&&(y=h.children.length),S===-1||y===-1)for(let g=0;g<h.children.length;g++)b+=bn(h.children[g]),S===-1&&b.length===p&&(S=g+1),y===-1&&b.length===d&&(y=g+1);if(S===-1)throw new R(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(y===-1)throw new R(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const _=h.children.slice(S,y);if(!m.alwaysWrap&&_.length===h.children.length)l(h,m,"line");else if(!m.alwaysWrap&&_.length===1&&_[0].type==="element")l(_[0],m,"token");else{const g={type:"element",tagName:"span",properties:{},children:_};l(g,m,"wrapper"),h.children.splice(S,_.length,g)}}function s(u,p){o[u]=l(o[u],p,"line")}function l(u,p,d){const m=p.properties||{},h=p.transform||(b=>b);return u.tagName=p.tagName||"span",u.properties={...u.properties,...m,class:u.properties.class},p.properties?.class&&gn(u,p.properties.class),u=h(u,d)||u,u}const a=[],c=r.decorations.sort((u,p)=>p.start.offset-u.start.offset||u.end.offset-p.end.offset);for(const u of c){const{start:p,end:d}=u;if(p.line===d.line)i(p.line,p.character,d.character,u);else if(p.line<d.line){i(p.line,p.character,Number.POSITIVE_INFINITY,u);for(let m=p.line+1;m<d.line;m++)a.unshift(()=>s(m,u));i(d.line,0,d.character,u)}}a.forEach(u=>u())}}}function Uo(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new R(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){const o=t[r],i=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,s=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,l=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,a=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(i||s||l||a){if(i&&s||l&&a||l&&n.start.offset===n.end.offset||s&&o.start.offset===o.end.offset)continue;throw new R(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function bn(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(bn).join(""):""}const Ho=[$o()];function we(t){const e=Fo(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...Ho]}function Fo(t){const e=[],n=[],r=[];for(const o of t)switch(o.enforce){case"pre":e.push(o);break;case"post":n.push(o);break;default:r.push(o)}return{pre:e,post:n,normal:r}}var H=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ge={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Wo(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function Pt(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function zo(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Ge[r]&&e.push({type:"setDecoration",value:Ge[r]});else if(r<=29){const o=Ge[r-20];o&&(e.push({type:"resetDecoration",value:o}),o==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:H[r-30]}});else if(r===38){const o=Pt(t);o&&e.push({type:"setForegroundColor",value:o})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:H[r-40]}});else if(r===48){const o=Pt(t);o&&e.push({type:"setBackgroundColor",value:o})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:H[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:H[r-100+8]}})}return e}function qo(){let t=null,e=null,n=new Set;return{parse(r){const o=[];let i=0;do{const s=Wo(r,i),l=s.sequence?r.substring(i,s.startPosition):r.substring(i);if(l.length>0&&o.push({value:l,foreground:t,background:e,decorations:new Set(n)}),s.sequence){const a=zo(s.sequence);for(const c of a)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}i=s.position}while(i<r.length);return o}}}var Vo={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Ko(t=Vo){function e(l){return t[l]}function n(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(){if(r)return r;r=[];for(let c=0;c<H.length;c++)r.push(e(H[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let p=0;p<6;p++)r.push(n([l[c],l[u],l[p]]));let a=8;for(let c=0;c<24;c++,a+=10)r.push(n([a,a,a]));return r}function i(l){return o()[l]}function s(l){switch(l.type){case"named":return e(l.name);case"rgb":return n(l.rgb);case"table":return i(l.index)}}return{value:s}}const Yo={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Jo(t,e,n){const r=Se(t,n),o=Ne(e),i=Object.fromEntries(H.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=t.colors?.[c];return[a,u||Yo[a]]})),s=Ko(i),l=qo();return o.map(a=>l.parse(a[0]).map(c=>{let u,p;c.decorations.has("reverse")?(u=c.background?s.value(c.background):t.bg,p=c.foreground?s.value(c.foreground):t.fg):(u=c.foreground?s.value(c.foreground):t.fg,p=c.background?s.value(c.background):void 0),u=j(u,r),p=j(p,r),c.decorations.has("dim")&&(u=Xo(u));let d=P.None;return c.decorations.has("bold")&&(d|=P.Bold),c.decorations.has("italic")&&(d|=P.Italic),c.decorations.has("underline")&&(d|=P.Underline),c.decorations.has("strikethrough")&&(d|=P.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:p,fontStyle:d}}))}function Xo(t){const e=t.match(/#([0-9a-f]{3,8})/i);if(e){const r=e[1];if(r.length===8){const o=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${o}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const o=r[0],i=r[1],s=r[2],l=r[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${i}${i}${s}${s}${a}`}else if(r.length===3){const o=r[0],i=r[1],s=r[2];return`#${o}${o}${i}${i}${s}${s}80`}}}const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function it(t,e,n={}){const{theme:r=t.getLoadedThemes()[0]}=n,o=t.resolveLangAlias(n.lang||"text");if(nt(o)||rt(r))return Ne(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:s}=t.setTheme(r);if(o==="ansi")return Jo(i,e,n);const l=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new R(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(i.name))throw new R(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Zo(e,l,i,s,n)}function Qo(...t){if(t.length===2)return ie(t[1]);const[e,n,r={}]=t,{lang:o="text",theme:i=e.getLoadedThemes()[0]}=r;if(nt(o)||rt(i))throw new R("Plain language does not have grammar state");if(o==="ansi")throw new R("ANSI language does not have grammar state");const{theme:s,colorMap:l}=e.setTheme(i),a=e.getLanguage(o);return new Q(st(n,a,s,l,r).stateStack,a.name,s.name)}function Zo(t,e,n,r,o){const i=st(t,e,n,r,o),s=new Q(i.stateStack,e.name,n.name);return Re(i.tokens,s),i.tokens}function st(t,e,n,r,o){const i=Se(n,o),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=o,a=Ne(t);let c=o.grammarState?jo(o.grammarState,n.name)??qe:o.grammarContextCode!=null?st(o.grammarContextCode,e,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:qe,u=[];const p=[];for(let d=0,m=a.length;d<m;d++){const[h,b]=a[d];if(h===""){u=[],p.push([]);continue}if(s>0&&h.length>=s){u=[],p.push([{content:h,offset:b,color:"",fontStyle:0}]);continue}let S,y,_;o.includeExplanation&&(S=e.tokenizeLine(h,c,l),y=S.tokens,_=0);const g=e.tokenizeLine2(h,c,l),w=g.tokens.length/2;for(let C=0;C<w;C++){const I=g.tokens[2*C],$=C+1<w?g.tokens[2*C+2]:h.length;if(I===$)continue;const mt=g.tokens[2*C+1],xn=j(r[Y.getForeground(mt)],i),Ln=Y.getFontStyle(mt),Ae={content:h.substring(I,$),offset:b+I,color:xn,fontStyle:Ln};if(o.includeExplanation){const ht=[];if(o.includeExplanation!=="scopeName")for(const G of n.settings){let W;switch(typeof G.scope){case"string":W=G.scope.split(/,/).map(Pe=>Pe.trim());break;case"object":W=G.scope;break;default:continue}ht.push({settings:G,selectors:W.map(Pe=>Pe.split(/ /))})}Ae.explanation=[];let dt=0;for(;I+dt<$;){const G=y[_],W=h.substring(G.startIndex,G.endIndex);dt+=W.length,Ae.explanation.push({content:W,scopes:o.includeExplanation==="scopeName"?ei(G.scopes):ti(ht,G.scopes)}),_+=1}}u.push(Ae)}p.push(u),u=[],c=g.ruleStack}return{tokens:p,stateStack:c}}function ei(t){return t.map(e=>({scopeName:e}))}function ti(t,e){const n=[];for(let r=0,o=e.length;r<o;r++){const i=e[r];n[r]={scopeName:i,themeMatches:ri(t,i,e.slice(0,r))}}return n}function Et(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function ni(t,e,n){if(!Et(t[t.length-1],e))return!1;let r=t.length-2,o=n.length-1;for(;r>=0&&o>=0;)Et(t[r],n[o])&&(r-=1),o-=1;return r===-1}function ri(t,e,n){const r=[];for(const{selectors:o,settings:i}of t)for(const s of o)if(ni(s,e,n)){r.push(i);break}return r}function _n(t,e,n){const r=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),o=r.map(a=>{const c=it(t,e,{...n,theme:a.theme}),u=ie(c),p=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:p}}),i=oi(...o.map(a=>a.tokens)),s=i[0].map((a,c)=>a.map((u,p)=>{const d={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=u.explanation),i.forEach((m,h)=>{const{content:b,explanation:S,offset:y,..._}=m[c][p];d.variants[r[h].color]=_}),d})),l=o[0].state?new Q(Object.fromEntries(o.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),o[0].state.lang):void 0;return l&&Re(s,l),s}function oi(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const o=t.map(a=>a[r]),i=e.map(()=>[]);e.forEach((a,c)=>a.push(i[c]));const s=o.map(()=>0),l=o.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(i[c].push(u),s[c]+=1,l[c]=o[c][s[c]]):(i[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}function ve(t,e,n){let r,o,i,s,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:p="css-vars"}=n,d=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,_)=>y.color===c?-1:_.color===c?1:0);if(d.length===0)throw new R("`themes` option must not be empty");const m=_n(t,e,n);if(a=ie(m),c&&ot!==c&&!d.find(y=>y.color===c))throw new R(`\`themes\` option must contain the defaultColor key \`${c}\``);const h=d.map(y=>t.getTheme(y.theme)),b=d.map(y=>y.color);i=m.map(y=>y.map(_=>Do(_,b,u,c,p))),a&&Re(i,a);const S=d.map(y=>Se(y.theme,n));o=It(d,h,S,u,c,"fg",p),r=It(d,h,S,u,c,"bg",p),s=`shiki-themes ${h.map(y=>y.name).join(" ")}`,l=c?void 0:[o,r].join(";")}else if("theme"in n){const c=Se(n.theme,n);i=it(t,e,n);const u=t.getTheme(n.theme);r=j(u.bg,c),o=j(u.fg,c),s=u.name,a=ie(i)}else throw new R("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:o,bg:r,themeName:s,rootStyle:l,grammarState:a}}function It(t,e,n,r,o,i,s){return t.map((l,a)=>{const c=j(e[a][i],n[a])||"inherit",u=`${r+l.color}${i==="bg"?"-bg":""}:${c}`;if(a===0&&o){if(o===ot&&t.length>1){const p=t.findIndex(b=>b.color==="light"),d=t.findIndex(b=>b.color==="dark");if(p===-1||d===-1)throw new R('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const m=j(e[p][i],n[p])||"inherit",h=j(e[d][i],n[d])||"inherit";return`light-dark(${m}, ${h});${u}`}return c}return s==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Ce(t,e,n,r={meta:{},options:n,codeToHast:(o,i)=>Ce(t,o,i),codeToTokens:(o,i)=>ve(t,o,i)}){let o=e;for(const h of we(n))o=h.preprocess?.call(r,o,n)||o;let{tokens:i,fg:s,bg:l,themeName:a,rootStyle:c,grammarState:u}=ve(t,o,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:d=!1}=n;p===!0?i=si(i):p==="never"&&(i=ai(i)),d&&(i=li(i));const m={...r,get source(){return o}};for(const h of we(n))i=h.tokens?.call(m,i)||i;return ii(i,{...n,fg:s,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},m,u)}function ii(t,e,n,r=ie(t)){const o=we(e),i=[],s={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[b,S]of Object.entries(e.meta||{}))b.startsWith("_")||(c[b]=S);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},p={type:"element",tagName:"code",properties:{},children:i};const d=[],m={...n,structure:l,addClassToHast:gn,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return s},get pre(){return u},get code(){return p},get lines(){return d}};if(t.forEach((b,S)=>{S&&(l==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&i.push({type:"text",value:`
12
- `}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const g of b){let w={type:"element",tagName:"span",properties:{...g.htmlAttrs},children:[{type:"text",value:g.content}]};const C=Xe(g.htmlStyle||ke(g));C&&(w.properties.style=C);for(const I of o)w=I?.span?.call(m,w,S+1,_,y,g)||w;l==="inline"?s.children.push(w):l==="classic"&&y.children.push(w),_+=g.content.length}if(l==="classic"){for(const g of o)y=g?.line?.call(m,y,S+1)||y;d.push(y),i.push(y)}else l==="inline"&&d.push(y)}),l==="classic"){for(const b of o)p=b?.code?.call(m,p)||p;u.children.push(p);for(const b of o)u=b?.pre?.call(m,u)||u;s.children.push(u)}else if(l==="inline"){const b=[];let S={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const g of s.children)g.type==="element"&&g.tagName==="br"?(b.push(S),S={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(g.type==="element"||g.type==="text")&&S.children.push(g);b.push(S);let _={type:"element",tagName:"code",properties:{},children:b};for(const g of o)_=g?.code?.call(m,_)||_;s.children=[];for(let g=0;g<_.children.length;g++){g>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const w=_.children[g];w.type==="element"&&s.children.push(...w.children)}}let h=s;for(const b of o)h=b?.root?.call(m,h)||h;return r&&Re(h,r),h}function si(t){return t.map(e=>{const n=[];let r="",o;return e.forEach((i,s)=>{const a=!(i.fontStyle&&(i.fontStyle&P.Underline||i.fontStyle&P.Strikethrough));a&&i.content.match(/^\s+$/)&&e[s+1]?(o===void 0&&(o=i.offset),r+=i.content):r?(a?n.push({...i,offset:o,content:r+i.content}):n.push({content:r,offset:o},i),o=void 0,r=""):n.push(i)}),n})}function ai(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,o,i,s]=r;if(!o&&!s)return n;const l=[{...n,offset:n.offset+o.length,content:i}];return o&&l.unshift({content:o,offset:n.offset}),s&&l.push({content:s,offset:n.offset+o.length+i.length}),l}))}function li(t){return t.map(e=>{const n=[];for(const r of e){if(n.length===0){n.push({...r});continue}const o=n[n.length-1],i=Xe(o.htmlStyle||ke(o)),s=Xe(r.htmlStyle||ke(r)),l=o.fontStyle&&(o.fontStyle&P.Underline||o.fontStyle&P.Strikethrough),a=r.fontStyle&&(r.fontStyle&P.Underline||r.fontStyle&P.Strikethrough);!l&&!a&&i===s?o.content+=r.content:n.push({...r})}return n})}const ci=To;function ui(t,e,n){const r={meta:{},options:n,codeToHast:(i,s)=>Ce(t,i,s),codeToTokens:(i,s)=>ve(t,i,s)};let o=ci(Ce(t,e,n,r));for(const i of we(n))o=i.postprocess?.call(r,o,n)||o;return o}const Ot={light:"#333333",dark:"#bbbbbb"},Mt={light:"#fffffe",dark:"#1e1e1e"},Bt="__shiki_resolved";function at(t){if(t?.[Bt])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(n=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Ot.light:Ot.dark),n||(n=e.type==="light"?Mt.light:Mt.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let o=0;const i=new Map;function s(l){if(i.has(l))return i.get(l);o+=1;const a=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?s(l):(i.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const p=s(l.settings.foreground);e.colorReplacements[p]=l.settings.foreground,u.settings.foreground=p}if(c){const p=s(l.settings.background);e.colorReplacements[p]=l.settings.background,u.settings.background=p}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=s(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,Bt,{enumerable:!1,writable:!1,value:!0}),e}async function Sn(t){return Array.from(new Set((await Promise.all(t.filter(e=>!dn(e)).map(async e=>await hn(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function kn(t){return(await Promise.all(t.map(async n=>fn(n)?null:at(await hn(n))))).filter(n=>!!n)}let pi=3;function mi(t,e=3){e>pi||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let q=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function wn(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new q(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return t}class hi extends dr{constructor(e,n,r,o={}){super(e),this._resolver=e,this._themes=n,this._langs=r,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const n=at(e);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let n=this._textmateThemeCache.get(e);n||(n=fe.createFromRawTheme(e),this._textmateThemeCache.set(e,n)),this._syncRegistry.setTheme(n)}getGrammar(e){return e=wn(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const n=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const o=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(o.name=e.name,this._resolvedGrammars.set(e.name,o),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,n.size)for(const i of n)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const o of e)this.resolveEmbeddedLanguages(o);const n=Array.from(this._langGraph.entries()),r=n.filter(([o,i])=>!i);if(r.length){const o=n.filter(([i,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(a=>r.map(([c])=>c).includes(a)):!1).filter(i=>!r.includes(i));throw new q(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of n)this._resolver.addLanguage(i);for(const[o,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const n=e.embeddedLanguages??e.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}}class di{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,n){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let r=[];for(let o=1;o<=n.length;o++){const i=n.slice(0,o).join(".");r=[...r,...this._injections.get(i)||[]]}return r}}let Z=0;function fi(t){Z+=1,t.warnings!==!1&&Z>=10&&Z%10===0&&console.warn(`[Shiki] ${Z} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new q("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(at),o=new di(t.engine,n),i=new hi(o,r,n,t.langAlias);let s;function l(g){return wn(g,t.langAlias)}function a(g){y();const w=i.getGrammar(typeof g=="string"?g:g.name);if(!w)throw new q(`Language \`${g}\` not found, you may need to load it first`);return w}function c(g){if(g==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const w=i.getTheme(g);if(!w)throw new q(`Theme \`${g}\` not found, you may need to load it first`);return w}function u(g){y();const w=c(g);s!==g&&(i.setTheme(w),s=g);const C=i.getColorMap();return{theme:w,colorMap:C}}function p(){return y(),i.getLoadedThemes()}function d(){return y(),i.getLoadedLanguages()}function m(...g){y(),i.loadLanguages(g.flat(1))}async function h(...g){return m(await Sn(g))}function b(...g){y();for(const w of g.flat(1))i.loadTheme(w)}async function S(...g){return y(),b(await kn(g))}function y(){if(e)throw new q("Shiki instance has been disposed")}function _(){e||(e=!0,i.dispose(),Z-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:l,loadLanguage:h,loadLanguageSync:m,loadTheme:S,loadThemeSync:b,dispose:_,[Symbol.dispose]:_}}async function gi(t){t.engine||mi("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([kn(t.themes||[]),Sn(t.langs||[]),t.engine]);return fi({...t,themes:e,langs:n,engine:r})}async function yi(t){const e=await gi(t);return{getLastGrammarState:(...n)=>Qo(e,...n),codeToTokensBase:(n,r)=>it(e,n,r),codeToTokensWithThemes:(n,r)=>_n(e,n,r),codeToTokens:(n,r)=>ve(e,n,r),codeToHast:(n,r)=>Ce(e,n,r),codeToHtml:(n,r)=>ui(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function bi(t){const e=t.langs,n=t.themes,r=t.engine;async function o(i){function s(p){if(typeof p=="string"){if(p=i.langAlias?.[p]||p,dn(p))return[];const d=e[p];if(!d)throw new R(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return d}return p}function l(p){if(fn(p))return"none";if(typeof p=="string"){const d=n[p];if(!d)throw new R(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return d}return p}const a=(i.themes??[]).map(p=>l(p)),c=(i.langs??[]).map(p=>s(p)),u=await yi({engine:i.engine??r(),...i,themes:a,langs:c});return{...u,loadLanguage(...p){return u.loadLanguage(...p.map(s))},loadTheme(...p){return u.loadTheme(...p.map(l))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return o}const vn=[{id:"abap",name:"ABAP",import:(()=>import("./abap-Dg923wIy.js"))},{id:"actionscript-3",name:"ActionScript",import:(()=>import("./actionscript-3-8WTK4YD2.js"))},{id:"ada",name:"Ada",import:(()=>import("./ada-CTi7YQtL.js"))},{id:"angular-html",name:"Angular HTML",import:(()=>import("./angular-html-D2R1pe45.js").then(function(t){return t.f}))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>import("./angular-ts-BDmYQnhm.js"))},{id:"apache",name:"Apache Conf",import:(()=>import("./apache-PcO-DBxQ.js"))},{id:"apex",name:"Apex",import:(()=>import("./apex-CnCu5_gb.js"))},{id:"apl",name:"APL",import:(()=>import("./apl-DkfyvC6M.js"))},{id:"applescript",name:"AppleScript",import:(()=>import("./applescript-Ds_W2jPS.js"))},{id:"ara",name:"Ara",import:(()=>import("./ara-C1--7J61.js"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>import("./asciidoc-nTfEFGxb.js"))},{id:"asm",name:"Assembly",import:(()=>import("./asm-CTFRnVOM.js"))},{id:"astro",name:"Astro",import:(()=>import("./astro-DtPAdMss.js"))},{id:"awk",name:"AWK",import:(()=>import("./awk-CrWgQKhV.js"))},{id:"ballerina",name:"Ballerina",import:(()=>import("./ballerina-a0yOSyc5.js"))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>import("./bat-B0cHNp6s.js"))},{id:"beancount",name:"Beancount",import:(()=>import("./beancount-dPJi_gci.js"))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>import("./berry-CVKoklHx.js"))},{id:"bibtex",name:"BibTeX",import:(()=>import("./bibtex-DRcCXNgM.js"))},{id:"bicep",name:"Bicep",import:(()=>import("./bicep-jWz-hQ8I.js"))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>import("./bird2-DaGXIRGu.js"))},{id:"blade",name:"Blade",import:(()=>import("./blade-QlWdzBxO.js"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>import("./bsl-jNujDQK2.js"))},{id:"c",name:"C",import:(()=>import("./c-BG-tZi7o.js"))},{id:"c3",name:"C3",import:(()=>import("./c3-Fcb8_HKm.js"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>import("./cadence-BuaeHeSu.js"))},{id:"cairo",name:"Cairo",import:(()=>import("./cairo-BYiDgOF2.js"))},{id:"clarity",name:"Clarity",import:(()=>import("./clarity-CC_0IFDj.js"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>import("./clojure-KnfDkB_V.js"))},{id:"cmake",name:"CMake",import:(()=>import("./cmake-bh2MLnkv.js"))},{id:"cobol",name:"COBOL",import:(()=>import("./cobol-dIXRVV9Y.js"))},{id:"codeowners",name:"CODEOWNERS",import:(()=>import("./codeowners-CtwIM3TN.js"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>import("./codeql-D164juXQ.js"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>import("./coffee-Bk-z6oI_.js"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>import("./common-lisp-DXc9XcIM.js"))},{id:"coq",name:"Coq",import:(()=>import("./coq-BBL5-mG4.js"))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>import("./cpp-C0lzDePx.js"))},{id:"crystal",name:"Crystal",import:(()=>import("./crystal-Bhade0k2.js"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>import("./csharp-B7nLXyi8.js"))},{id:"css",name:"CSS",import:(()=>import("./css-PZBBrkI0.js"))},{id:"csv",name:"CSV",import:(()=>import("./csv-D5aBhKLr.js"))},{id:"cue",name:"CUE",import:(()=>import("./cue-WCin6O4e.js"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>import("./cypher-DYQk2G82.js"))},{id:"d",name:"D",import:(()=>import("./d-DVc-yF-l.js"))},{id:"dart",name:"Dart",import:(()=>import("./dart-YLd5yyRs.js"))},{id:"dax",name:"DAX",import:(()=>import("./dax-oldcCaJg.js"))},{id:"desktop",name:"Desktop",import:(()=>import("./desktop-DZfyBMgF.js"))},{id:"diff",name:"Diff",import:(()=>import("./diff-jW5kmiru.js"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>import("./docker-DG9neUKd.js"))},{id:"dotenv",name:"dotEnv",import:(()=>import("./dotenv-Bea-FkXq.js"))},{id:"dream-maker",name:"Dream Maker",import:(()=>import("./dream-maker-DAHQwpwp.js"))},{id:"edge",name:"Edge",import:(()=>import("./edge-zt3dU95k.js"))},{id:"elixir",name:"Elixir",import:(()=>import("./elixir-JolcG37e.js"))},{id:"elm",name:"Elm",import:(()=>import("./elm-BjIDgKzz.js"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>import("./emacs-lisp-DMBh55R4.js"))},{id:"erb",name:"ERB",import:(()=>import("./erb-rsjdL4fB.js"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>import("./erlang-DNeY46SW.js"))},{id:"fennel",name:"Fennel",import:(()=>import("./fennel-DBMsxtrh.js"))},{id:"fish",name:"Fish",import:(()=>import("./fish-BxskpYPN.js"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>import("./fluent-Bwo2XpEt.js"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>import("./fortran-fixed-form-DFFnVrrY.js"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>import("./fortran-free-form-DB5N_DgY.js"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>import("./fsharp-DRAF1jsN.js"))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>import("./gdresource-BD-1uzY7.js"))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>import("./gdscript-C3mT4Uym.js"))},{id:"gdshader",name:"GDShader",import:(()=>import("./gdshader-G7X6ysY3.js"))},{id:"genie",name:"Genie",import:(()=>import("./genie-DSsjfZMX.js"))},{id:"gherkin",name:"Gherkin",import:(()=>import("./gherkin-Cl2Fw-_0.js"))},{id:"git-commit",name:"Git Commit Message",import:(()=>import("./git-commit-CJPsQObV.js"))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>import("./git-rebase-DeZqv4fp.js"))},{id:"gleam",name:"Gleam",import:(()=>import("./gleam-BeBqoPwE.js"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>import("./glimmer-js-BuyKUjfV.js"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>import("./glimmer-ts-D9iniPFN.js"))},{id:"glsl",name:"GLSL",import:(()=>import("./glsl-BOG9l2nV.js"))},{id:"gn",name:"GN",import:(()=>import("./gn-Dxr0sSUf.js"))},{id:"gnuplot",name:"Gnuplot",import:(()=>import("./gnuplot-CtW3R_Hz.js"))},{id:"go",name:"Go",import:(()=>import("./go-BBr2UQCn.js"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>import("./graphql-B6XHM4uj.js"))},{id:"groovy",name:"Groovy",import:(()=>import("./groovy-DFxE31Qs.js"))},{id:"hack",name:"Hack",import:(()=>import("./hack-Cxa-FaZ4.js"))},{id:"haml",name:"Ruby Haml",import:(()=>import("./haml-2e0EI6Is.js"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>import("./handlebars-CojHdNmS.js"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>import("./haskell-BfdhR_WN.js"))},{id:"haxe",name:"Haxe",import:(()=>import("./haxe-DVIybFAS.js"))},{id:"hcl",name:"HashiCorp HCL",import:(()=>import("./hcl-B6OePqme.js"))},{id:"hjson",name:"Hjson",import:(()=>import("./hjson-D2jn7IRw.js"))},{id:"hlsl",name:"HLSL",import:(()=>import("./hlsl-MKeth5V9.js"))},{id:"html",name:"HTML",import:(()=>import("./html-DOf0XnR2.js"))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>import("./html-derivative-DfCZ6Hio.js"))},{id:"http",name:"HTTP",import:(()=>import("./http-CG3jvXcS.js"))},{id:"hurl",name:"Hurl",import:(()=>import("./hurl-CxQrh4RI.js"))},{id:"hxml",name:"HXML",import:(()=>import("./hxml-CkS3Eie7.js"))},{id:"hy",name:"Hy",import:(()=>import("./hy-DI6mCUnw.js"))},{id:"imba",name:"Imba",import:(()=>import("./imba-D-Pk5S0X.js"))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>import("./ini-Dix3pTmg.js"))},{id:"java",name:"Java",import:(()=>import("./java-BTDmaRNO.js"))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>import("./javascript-WyGyM1wV.js"))},{id:"jinja",name:"Jinja",import:(()=>import("./jinja-D0mZ3q2r.js"))},{id:"jison",name:"Jison",import:(()=>import("./jison-B9XHrcYJ.js"))},{id:"json",name:"JSON",import:(()=>import("./json-B8JryHcM.js"))},{id:"json5",name:"JSON5",import:(()=>import("./json5-Cdatmj9n.js"))},{id:"jsonc",name:"JSON with Comments",import:(()=>import("./jsonc-CvUCa1o5.js"))},{id:"jsonl",name:"JSON Lines",import:(()=>import("./jsonl-9I_GBd5L.js"))},{id:"jsonnet",name:"Jsonnet",import:(()=>import("./jsonnet-XoenQ2oc.js"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>import("./jssm-CWE2S0Z5.js"))},{id:"jsx",name:"JSX",import:(()=>import("./jsx-8cLv2Six.js"))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>import("./julia-C1oINnwa.js"))},{id:"just",name:"Just",import:(()=>import("./just-Bo3fV9RY.js"))},{id:"kdl",name:"KDL",import:(()=>import("./kdl-CMbyIXjQ.js"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>import("./kotlin-BQy537ds.js"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>import("./kusto-B_y0uMaZ.js"))},{id:"latex",name:"LaTeX",import:(()=>import("./latex-CZAhoKip.js"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>import("./lean-C4RHkN41.js"))},{id:"less",name:"Less",import:(()=>import("./less-XNfgnZC7.js"))},{id:"liquid",name:"Liquid",import:(()=>import("./liquid-DFlqVvG0.js"))},{id:"llvm",name:"LLVM IR",import:(()=>import("./llvm-BJRUtCev.js"))},{id:"log",name:"Log file",import:(()=>import("./log-CcaF_xNv.js"))},{id:"logo",name:"Logo",import:(()=>import("./logo-D9WQLoKQ.js"))},{id:"lua",name:"Lua",import:(()=>import("./lua-8Av-h-ns.js"))},{id:"luau",name:"Luau",import:(()=>import("./luau-BTSFCcFb.js"))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>import("./make-DXVx14cr.js"))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>import("./markdown-DX-TNHnc.js"))},{id:"marko",name:"Marko",import:(()=>import("./marko-DiIoNBFw.js"))},{id:"matlab",name:"MATLAB",import:(()=>import("./matlab-DzreyMvm.js"))},{id:"mdc",name:"MDC",import:(()=>import("./mdc-D_DpLax5.js"))},{id:"mdx",name:"MDX",import:(()=>import("./mdx-C2fqO2XY.js"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>import("./mermaid-Cwy4Up_p.js"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>import("./mipsasm-yE_Aqo9y.js"))},{id:"mojo",name:"Mojo",import:(()=>import("./mojo-M6pJPbMk.js"))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>import("./moonbit-CR8uFLGd.js"))},{id:"move",name:"Move",import:(()=>import("./move-CyYMWVy5.js"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>import("./narrat-DXUZ_ZkW.js"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>import("./nextflow-BPolriEg.js"))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>import("./nextflow-groovy-pQRwk_Jg.js"))},{id:"nginx",name:"Nginx",import:(()=>import("./nginx-DSXkacNc.js"))},{id:"nim",name:"Nim",import:(()=>import("./nim-e2z2kCcq.js"))},{id:"nix",name:"Nix",import:(()=>import("./nix-Ckjrpg0r.js"))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>import("./nushell-DtHLcZf1.js"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>import("./objective-c-BoaBTdtz.js"))},{id:"objective-cpp",name:"Objective-C++",import:(()=>import("./objective-cpp-DstR8hNy.js"))},{id:"ocaml",name:"OCaml",import:(()=>import("./ocaml-DTbn2Hv7.js"))},{id:"odin",name:"Odin",import:(()=>import("./odin-Bxc4S6Xn.js"))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>import("./openscad-CXHpNBsb.js"))},{id:"pascal",name:"Pascal",import:(()=>import("./pascal-Sr-XLSE6.js"))},{id:"perl",name:"Perl",import:(()=>import("./perl-C95KruZl.js"))},{id:"php",name:"PHP",import:(()=>import("./php-B4Kqya17.js"))},{id:"pkl",name:"Pkl",import:(()=>import("./pkl-CRusufhw.js"))},{id:"plsql",name:"PL/SQL",import:(()=>import("./plsql-Dbm3tV2N.js"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>import("./po-LG0lFwH4.js"))},{id:"polar",name:"Polar",import:(()=>import("./polar-DjOs3GWb.js"))},{id:"postcss",name:"PostCSS",import:(()=>import("./postcss-GRRkWn2F.js"))},{id:"powerquery",name:"PowerQuery",import:(()=>import("./powerquery-DHf-dtTS.js"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>import("./powershell-DXrKVo3G.js"))},{id:"prisma",name:"Prisma",import:(()=>import("./prisma-Dgf8IN_C.js"))},{id:"prolog",name:"Prolog",import:(()=>import("./prolog-9JcfiY6I.js"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>import("./proto-dqx_Sj2i.js"))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>import("./pug-CoOVtr4u.js"))},{id:"puppet",name:"Puppet",import:(()=>import("./puppet-Di57VbSS.js"))},{id:"purescript",name:"PureScript",import:(()=>import("./purescript-BgpM7rDH.js"))},{id:"python",name:"Python",aliases:["py"],import:(()=>import("./python-B6Ihcp-E.js"))},{id:"qml",name:"QML",import:(()=>import("./qml-DmGQGbca.js"))},{id:"qmldir",name:"QML Directory",import:(()=>import("./qmldir-DXd9s5XC.js"))},{id:"qss",name:"Qt Style Sheets",import:(()=>import("./qss-B7NnhfIi.js"))},{id:"r",name:"R",import:(()=>import("./r-1ts4xG1r.js"))},{id:"racket",name:"Racket",import:(()=>import("./racket-CeDx7KO2.js"))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>import("./raku-BMJwmrCS.js"))},{id:"razor",name:"ASP.NET Razor",import:(()=>import("./razor-BaMsy-R7.js"))},{id:"reg",name:"Windows Registry Script",import:(()=>import("./reg-Cvyu2Gnx.js"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>import("./regexp-DK-WlHNu.js"))},{id:"rel",name:"Rel",import:(()=>import("./rel-BlqNHz8k.js"))},{id:"riscv",name:"RISC-V",import:(()=>import("./riscv-C5dpdlr7.js"))},{id:"ron",name:"RON",import:(()=>import("./ron-j5NfrB3z.js"))},{id:"rosmsg",name:"ROS Interface",import:(()=>import("./rosmsg-ZkSIzPhc.js"))},{id:"rst",name:"reStructuredText",import:(()=>import("./rst-C371KPjr.js"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>import("./ruby-DusoydGj.js"))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>import("./rust-CxuBE0J8.js"))},{id:"sas",name:"SAS",import:(()=>import("./sas-DtSHuIwI.js"))},{id:"sass",name:"Sass",import:(()=>import("./sass-bfEVHPJ8.js"))},{id:"scala",name:"Scala",import:(()=>import("./scala-Dtw19ca_.js"))},{id:"scheme",name:"Scheme",import:(()=>import("./scheme-OJppFQF3.js"))},{id:"scss",name:"SCSS",import:(()=>import("./scss-DxBkwadj.js"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>import("./sdbl-CvZs3G9c.js"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>import("./shaderlab-CEJedz68.js"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>import("./shellscript-DgJyDXW6.js"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>import("./shellsession-DSlzxnCM.js"))},{id:"smalltalk",name:"Smalltalk",import:(()=>import("./smalltalk-B9IHbYt7.js"))},{id:"solidity",name:"Solidity",import:(()=>import("./solidity-B3CjIuAd.js"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>import("./soy-BSb8SaP0.js"))},{id:"sparql",name:"SPARQL",import:(()=>import("./sparql-BJh4JEw-.js"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>import("./splunk-h-bNAnbk.js"))},{id:"sql",name:"SQL",import:(()=>import("./sql-BbONfI8K.js"))},{id:"ssh-config",name:"SSH Config",import:(()=>import("./ssh-config-CywOjoXH.js"))},{id:"stata",name:"Stata",import:(()=>import("./stata-BKjsT8qe.js"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>import("./stylus-CIg617SB.js"))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>import("./surrealql-2KNEnAt7.js"))},{id:"svelte",name:"Svelte",import:(()=>import("./svelte-xaxjcSSP.js"))},{id:"swift",name:"Swift",import:(()=>import("./swift-tEesUtni.js"))},{id:"system-verilog",name:"SystemVerilog",import:(()=>import("./system-verilog-Qdm_1g2q.js"))},{id:"systemd",name:"Systemd Units",import:(()=>import("./systemd-DKMPPZjB.js"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>import("./talonscript-eRuyeYHl.js"))},{id:"tasl",name:"Tasl",import:(()=>import("./tasl-B9CVvjfG.js"))},{id:"tcl",name:"Tcl",import:(()=>import("./tcl-Bq9dbVAF.js"))},{id:"templ",name:"Templ",import:(()=>import("./templ-BVTOctZ7.js"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>import("./terraform-CAp711iT.js"))},{id:"tex",name:"TeX",import:(()=>import("./tex-BHxF5DMe.js"))},{id:"toml",name:"TOML",import:(()=>import("./toml-Ms459DBw.js"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>import("./ts-tags-C-gylFal.js"))},{id:"tsv",name:"TSV",import:(()=>import("./tsv-BFtm7NXx.js"))},{id:"tsx",name:"TSX",import:(()=>import("./tsx-D6116Ycy.js"))},{id:"turtle",name:"Turtle",import:(()=>import("./turtle-DpRhbQZY.js"))},{id:"twig",name:"Twig",import:(()=>import("./twig-DuP5mDZ4.js"))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>import("./typescript-BqvgUolh.js"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>import("./typespec-DhK7u29_.js"))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>import("./typst-Dfd71gQj.js"))},{id:"v",name:"V",import:(()=>import("./v-BH76v7br.js"))},{id:"vala",name:"Vala",import:(()=>import("./vala-z59IxkFd.js"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>import("./vb-4AxSLKIU.js"))},{id:"verilog",name:"Verilog",import:(()=>import("./verilog-LfQUkHDc.js"))},{id:"vhdl",name:"VHDL",import:(()=>import("./vhdl-DJCsFYgn.js"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>import("./viml-pbKHW3Ia.js"))},{id:"vue",name:"Vue",import:(()=>import("./vue-D2k0BAl5.js"))},{id:"vue-html",name:"Vue HTML",import:(()=>import("./vue-html-zEfNEgpj.js"))},{id:"vue-vine",name:"Vue Vine",import:(()=>import("./vue-vine-D9eCaTqi.js"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>import("./vyper-DpazWNpx.js"))},{id:"wasm",name:"WebAssembly",import:(()=>import("./wasm-CFi-k9--.js"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>import("./wenyan-CYFFG9DK.js"))},{id:"wgsl",name:"WGSL",import:(()=>import("./wgsl-CxjTZs-b.js"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>import("./wikitext-Bx2qct8O.js"))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>import("./wit-DDW3hD69.js"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>import("./wolfram-pu21K997.js"))},{id:"xml",name:"XML",import:(()=>import("./xml-BkAJuBCc.js"))},{id:"xsl",name:"XSL",import:(()=>import("./xsl-C6UUWSil.js"))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>import("./yaml-Bopit2L3.js"))},{id:"zenscript",name:"ZenScript",import:(()=>import("./zenscript-BIAKq-aR.js"))},{id:"zig",name:"Zig",import:(()=>import("./zig-bSFrHQ7n.js"))}],_i=Object.fromEntries(vn.map(t=>[t.id,t.import])),Si=Object.fromEntries(vn.flatMap(t=>t.aliases?.map(e=>[e,t.import])||[])),lt={..._i,...Si},ki=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>import("./andromeeda-CT0vplkN.js"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>import("./aurora-x-C0VKFdlO.js"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>import("./ayu-dark-wZ6ORhBL.js"))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>import("./ayu-light-xXLJ_Ch1.js"))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>import("./ayu-mirage-CQckA_sP.js"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>import("./catppuccin-frappe-CfssSZMA.js"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>import("./catppuccin-latte-DoBaWTGn.js"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>import("./catppuccin-macchiato-BkAuvdZC.js"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>import("./catppuccin-mocha-D9fcC0iT.js"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>import("./dark-plus-DLU5INA3.js"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>import("./dracula-XcYHBZy6.js"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>import("./dracula-soft-BPeX9gxW.js"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>import("./everforest-dark-WOub3wle.js"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>import("./everforest-light-DCUg8VH8.js"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>import("./github-dark-BQV5ugrc.js"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>import("./github-dark-default-DLWDM7FH.js"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>import("./github-dark-dimmed-D1FmiR_p.js"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>import("./github-dark-high-contrast-BilLoi0o.js"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>import("./github-light-Rcb2q3L5.js"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>import("./github-light-default-CQ75esMw.js"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>import("./github-light-high-contrast-CRF1wyLy.js"))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>import("./gruvbox-dark-hard-C37G1gbc.js"))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>import("./gruvbox-dark-medium-C3G9m3TV.js"))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>import("./gruvbox-dark-soft-eZmcmZ9I.js"))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>import("./gruvbox-light-hard-BYj-vz_3.js"))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>import("./gruvbox-light-medium-BdQlDiiF.js"))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>import("./gruvbox-light-soft-BGNwjiRh.js"))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>import("./horizon-cslQss18.js"))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>import("./horizon-bright-CoQRYDvy.js"))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>import("./houston-RHIKkNfR.js"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>import("./kanagawa-dragon-BOvIHJVT.js"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>import("./kanagawa-lotus-Bwcd7Bvx.js"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>import("./kanagawa-wave-0SAlpf0s.js"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>import("./laserwave-si7wuSrt.js"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>import("./light-plus-g_Fi9vkG.js"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>import("./material-theme-CIJ3cGaW.js"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>import("./material-theme-darker-BWg3m1GB.js"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>import("./material-theme-lighter-DR8HWMN7.js"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>import("./material-theme-ocean-CZf9pk28.js"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>import("./material-theme-palenight-BF01YeZy.js"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>import("./min-dark-DhfaepVE.js"))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>import("./min-light-6xx0uMgm.js"))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>import("./monokai-BodnsaDQ.js"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>import("./night-owl-EdP2Hztp.js"))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>import("./night-owl-light-Bk-lYVyk.js"))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>import("./nord-BAu0wM6c.js"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>import("./one-dark-pro-utPxbBbJ.js"))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>import("./one-light-BuCQ22aO.js"))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>import("./plastic-CXnNNlFZ.js"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>import("./poimandres-BrOVMvuE.js"))},{id:"red",displayName:"Red",type:"dark",import:(()=>import("./red-DR6ZwibK.js"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>import("./rose-pine-CN2F2lJl.js"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>import("./rose-pine-dawn-0S8NEhsA.js"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>import("./rose-pine-moon-DzBDT4rc.js"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>import("./slack-dark-CWRQmTmo.js"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>import("./slack-ochin-DO_ok7XK.js"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>import("./snazzy-light-B5llO_gK.js"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>import("./solarized-dark-G9yBjKj_.js"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>import("./solarized-light-DeSzljQz.js"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>import("./synthwave-84-DRVv-_m_.js"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>import("./tokyo-night-BvwC8l2v.js"))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>import("./vesper--t9w6MWz.js"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>import("./vitesse-black-B_BYPdvp.js"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>import("./vitesse-dark-DOSOf2Sz.js"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>import("./vitesse-light-gUX51GpB.js"))}],wi=Object.fromEntries(ki.map(t=>[t.id,t.import]));class ct extends Error{constructor(e){super(e),this.name="ShikiError"}}function vi(){return 2147483648}function Ci(){return typeof performance<"u"?performance.now():Date.now()}const Ni=(t,e)=>t+(e-t%e)%e;async function Ri(t){let e,n;const r={};function o(m){n=m,r.HEAPU8=new Uint8Array(m),r.HEAPU32=new Uint32Array(m)}function i(m,h,b){r.HEAPU8.copyWithin(m,h,h+b)}function s(m){try{return e.grow(m-n.byteLength+65535>>>16),o(e.buffer),1}catch{}}function l(m){const h=r.HEAPU8.length;m=m>>>0;const b=vi();if(m>b)return!1;for(let S=1;S<=4;S*=2){let y=h*(1+.2/S);y=Math.min(y,m+100663296);const _=Math.min(b,Ni(Math.max(m,y),65536));if(s(_))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(m,h,b=1024){const S=h+b;let y=h;for(;m[y]&&!(y>=S);)++y;if(y-h>16&&m.buffer&&a)return a.decode(m.subarray(h,y));let _="";for(;h<y;){let g=m[h++];if(!(g&128)){_+=String.fromCharCode(g);continue}const w=m[h++]&63;if((g&224)===192){_+=String.fromCharCode((g&31)<<6|w);continue}const C=m[h++]&63;if((g&240)===224?g=(g&15)<<12|w<<6|C:g=(g&7)<<18|w<<12|C<<6|m[h++]&63,g<65536)_+=String.fromCharCode(g);else{const I=g-65536;_+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return _}function u(m,h){return m?c(r.HEAPU8,m,h):""}const p={emscripten_get_now:Ci,emscripten_memcpy_big:i,emscripten_resize_heap:l,fd_write:()=>0};async function d(){const h=await t({env:p,wasi_snapshot_preview1:p});e=h.memory,o(e.buffer),Object.assign(r,h),r.UTF8ToString=u}return await d(),r}var xi=Object.defineProperty,Li=(t,e,n)=>e in t?xi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x=(t,e,n)=>Li(t,typeof e!="symbol"?e+"":e,n);let T=null;function Ti(t){throw new ct(t.UTF8ToString(t.getLastOnigError()))}class xe{constructor(e){x(this,"utf16Length"),x(this,"utf8Length"),x(this,"utf16Value"),x(this,"utf8Value"),x(this,"utf16OffsetToUtf8"),x(this,"utf8OffsetToUtf16");const n=e.length,r=xe._utf8ByteLength(e),o=r!==n,i=o?new Uint32Array(n+1):null;o&&(i[n]=r);const s=o?new Uint32Array(r+1):null;o&&(s[r]=n);const l=new Uint8Array(r);let a=0;for(let c=0;c<n;c++){const u=e.charCodeAt(c);let p=u,d=!1;if(u>=55296&&u<=56319&&c+1<n){const m=e.charCodeAt(c+1);m>=56320&&m<=57343&&(p=(u-55296<<10)+65536|m-56320,d=!0)}o&&(i[c]=a,d&&(i[c+1]=a),p<=127?s[a+0]=c:p<=2047?(s[a+0]=c,s[a+1]=c):p<=65535?(s[a+0]=c,s[a+1]=c,s[a+2]=c):(s[a+0]=c,s[a+1]=c,s[a+2]=c,s[a+3]=c)),p<=127?l[a++]=p:p<=2047?(l[a++]=192|(p&1984)>>>6,l[a++]=128|(p&63)>>>0):p<=65535?(l[a++]=224|(p&61440)>>>12,l[a++]=128|(p&4032)>>>6,l[a++]=128|(p&63)>>>0):(l[a++]=240|(p&1835008)>>>18,l[a++]=128|(p&258048)>>>12,l[a++]=128|(p&4032)>>>6,l[a++]=128|(p&63)>>>0),d&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let n=0;for(let r=0,o=e.length;r<o;r++){const i=e.charCodeAt(r);let s=i,l=!1;if(i>=55296&&i<=56319&&r+1<o){const a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(s=(i-55296<<10)+65536|a-56320,l=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,l&&r++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const Le=class D{constructor(e){if(x(this,"id",++D.LAST_ID),x(this,"_onigBinding"),x(this,"content"),x(this,"utf16Length"),x(this,"utf8Length"),x(this,"utf16OffsetToUtf8"),x(this,"utf8OffsetToUtf16"),x(this,"ptr"),!T)throw new ct("Must invoke loadWasm first.");this._onigBinding=T,this.content=e;const n=new xe(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!D._sharedPtrInUse?(D._sharedPtr||(D._sharedPtr=T.omalloc(1e4)),D._sharedPtrInUse=!0,T.HEAPU8.set(n.utf8Value,D._sharedPtr),this.ptr=D._sharedPtr):this.ptr=n.createString(T)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===D._sharedPtr?D._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};x(Le,"LAST_ID",0);x(Le,"_sharedPtr",0);x(Le,"_sharedPtrInUse",!1);let Cn=Le;class Ai{constructor(e){if(x(this,"_onigBinding"),x(this,"_ptr"),!T)throw new ct("Must invoke loadWasm first.");const n=[],r=[];for(let l=0,a=e.length;l<a;l++){const c=new xe(e[l]);n[l]=c.createString(T),r[l]=c.utf8Length}const o=T.omalloc(4*e.length);T.HEAPU32.set(n,o/4);const i=T.omalloc(4*e.length);T.HEAPU32.set(r,i/4);const s=T.createOnigScanner(o,i,e.length);for(let l=0,a=e.length;l<a;l++)T.ofree(n[l]);T.ofree(i),T.ofree(o),s===0&&Ti(T),this._onigBinding=T,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,r){let o=0;if(typeof r=="number"&&(o=r),typeof e=="string"){e=new Cn(e);const i=this._findNextMatchSync(e,n,!1,o);return e.dispose(),i}return this._findNextMatchSync(e,n,!1,o)}_findNextMatchSync(e,n,r,o){const i=this._onigBinding,s=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),o);if(s===0)return null;const l=i.HEAPU32;let a=s/4;const c=l[a++],u=l[a++],p=[];for(let d=0;d<u;d++){const m=e.convertUtf8OffsetToUtf16(l[a++]),h=e.convertUtf8OffsetToUtf16(l[a++]);p[d]={start:m,end:h,length:h-m}}return{index:c,captureIndices:p}}}function Pi(t){return typeof t.instantiator=="function"}function Ei(t){return typeof t.default=="function"}function Ii(t){return typeof t.data<"u"}function Oi(t){return typeof Response<"u"&&t instanceof Response}function Mi(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let pe;function Bi(t){if(pe)return pe;async function e(){T=await Ri(async n=>{let r=t;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Pi(r)?r=await r.instantiator(n):Ei(r)?r=await r.default(n):(Ii(r)&&(r=r.data),Oi(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Di(r)(n):r=await Gi(r)(n):Mi(r)?r=await je(r)(n):r instanceof WebAssembly.Module?r=await je(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await je(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return pe=e(),pe}function je(t){return e=>WebAssembly.instantiate(t,e)}function Di(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Gi(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}async function ji(t){return t&&await Bi(t),{createScanner(e){return new Ai(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new Cn(e)}}}const $i=bi({langs:lt,themes:wi,engine:()=>ji(import("./wasm-CG6Dc4jp.js"))}),Nn="template-call",Ui=t=>{const e=t.repository?.[Nn]?.patterns;return Array.isArray(e)&&e.length>0},Hi=t=>{if(!Ui(t))return t;const e={...t.repository};return e[Nn]={patterns:[]},{...t,repository:e}};function Rn(t){const e=t.base,n=t.tokens??{},r=n.variableProperty??e.variable,o=n.className??n.class??e.type;return{commentDoc:e.comment,stringEscape:e.foreground,stringInterpolation:e.variable,stringRegex:e.string,keywordControl:e.keyword,keywordOperator:e.operator,keywordImport:e.operator,keywordReturn:e.keyword,storageModifier:e.keyword,functionCall:e.function,functionBuiltin:e.function,method:e.function,methodCall:n.method??e.function,variableBuiltin:e.variable,variableProperty:r,variableReadonly:e.number,variableOther:e.variable,variableGlobal:e.string,variableLocal:e.variable,parameter:n.stringEscape??e.foreground,typePrimitive:e.type,typeInterface:n.interface??e.type,interface:e.type,class:o,className:o,struct:o,enum:o,typeParameter:e.type,boolean:e.keyword,null:e.number,constant:e.number,punctuation:e.comment,delimiter:n.punctuation??e.comment,bracket:e.foreground,tag:e.keyword,jsxTag:n.tag??e.keyword,tagAttribute:r,tagAttributeValue:e.string,tagBracket:n.punctuation??e.comment,decorator:e.function,annotation:e.function,namespace:e.type,module:e.operator,label:e.operator,macro:e.keyword,preprocessor:e.operator,regex:e.string,url:e.string,key:r,exception:e.operator,...n}}const Fi=(t,e)=>typeof t=="string"&&t.trim().length>0?t:e,Wi=t=>{const e=t.base,n=new Map(Object.entries(Rn(t))),r=(o,i)=>Fi(n.get(o),i);return[{name:"plain",scope:["source","support.type.property-name.css"],settings:{foreground:e.foreground}},{name:"classes",scope:["entity.name.type.class"],settings:{foreground:r("className",r("class",e.function))}},{name:"interfaces",scope:["entity.name.type.interface","entity.name.type"],settings:{foreground:r("interface",e.type)}},{name:"structs",scope:["entity.name.type.struct"],settings:{foreground:r("struct",e.function)}},{name:"enums",scope:["entity.name.type.enum"],settings:{foreground:r("enum",e.function)}},{name:"keys",scope:["meta.object-literal.key","support.type.property-name"],settings:{foreground:r("key",e.function)}},{name:"methods",scope:["entity.name.function.method","meta.function.method"],settings:{foreground:r("method",e.function)}},{name:"functions",scope:["entity.name.function","support.function","meta.function-call.generic"],settings:{foreground:e.function,fontStyle:"bold"}},{name:"variables",scope:["variable","meta.variable","variable.other.object.property"],settings:{foreground:e.variable}},{name:"variablesOther",scope:["variable.other.object","variable.other.readwrite.alias"],settings:{foreground:r("variableOther",e.variable)}},{name:"globalVariables",scope:["variable.other.global","variable.language.this"],settings:{foreground:r("variableGlobal",e.number)}},{name:"localVariables",scope:["variable.other.local"],settings:{foreground:r("variableLocal",e.variable)}},{name:"parameters",scope:["variable.parameter","meta.parameter"],settings:{foreground:r("parameter",e.foreground)}},{name:"properties",scope:["variable.other.property","meta.property"],settings:{foreground:r("variableProperty",e.variable)}},{name:"strings",scope:["string","string.other.link","markup.inline.raw.string.markdown"],settings:{foreground:e.string}},{name:"stringEscapeSequences",scope:["constant.character.escape","constant.other.placeholder"],settings:{foreground:r("stringEscape",e.foreground)}},{name:"keywords",scope:["keyword"],settings:{foreground:e.keyword}},{name:"keywordsControl",scope:["keyword.control.import","keyword.control.from","keyword.import"],settings:{foreground:r("keywordImport",e.operator)}},{name:"storageModifiers",scope:["storage.modifier","keyword.modifier","storage.type"],settings:{foreground:r("storageModifier",e.keyword)}},{name:"comments",scope:["comment","punctuation.definition.comment"],settings:{foreground:e.comment}},{name:"docComments",scope:["comment.documentation","comment.line.documentation"],settings:{foreground:r("commentDoc",e.comment)}},{name:"numbers",scope:["constant.numeric"],settings:{foreground:e.number}},{name:"booleans",scope:["constant.language.boolean","constant.language.json"],settings:{foreground:r("boolean",e.type)}},{name:"operators",scope:["keyword.operator"],settings:{foreground:e.operator}},{name:"macros",scope:["entity.name.function.preprocessor","meta.preprocessor"],settings:{foreground:r("macro",e.keyword)}},{name:"preprocessor",scope:["meta.preprocessor"],settings:{foreground:r("preprocessor",r("label",e.number))}},{name:"urls",scope:["markup.underline.link"],settings:{foreground:r("url",e.string)}},{name:"tags",scope:["entity.name.tag"],settings:{foreground:r("tag",e.keyword)}},{name:"jsxTags",scope:["support.class.component"],settings:{foreground:r("jsxTag",r("label",e.number))}},{name:"attributes",scope:["entity.other.attribute-name","meta.attribute"],settings:{foreground:r("tagAttribute",e.type)}},{name:"types",scope:["support.type"],settings:{foreground:e.type}},{name:"constants",scope:["variable.other.constant","variable.readonly"],settings:{foreground:r("constant",e.foreground)}},{name:"labels",scope:["entity.name.label","punctuation.definition.label"],settings:{foreground:r("label",r("variableGlobal",e.number))}},{name:"namespaces",scope:["entity.name.namespace","storage.modifier.namespace","markup.bold.markdown"],settings:{foreground:r("namespace",e.type)}},{name:"modules",scope:["entity.name.module","storage.modifier.module"],settings:{foreground:r("module",e.operator)}},{name:"typeParameters",scope:["variable.type.parameter","variable.parameter.type"],settings:{foreground:r("typeParameter",e.function)}},{name:"exceptions",scope:["keyword.control.exception","keyword.control.trycatch"],settings:{foreground:r("exception",r("label",e.number))}},{name:"decorators",scope:["meta.decorator","punctuation.decorator","entity.name.function.decorator"],settings:{foreground:r("decorator",e.type)}},{name:"calls",scope:["variable.function"],settings:{foreground:e.foreground}},{name:"punctuation",scope:["punctuation","punctuation.terminator","punctuation.definition.tag","punctuation.separator","punctuation.definition.string","punctuation.section.block"],settings:{foreground:r("punctuation",e.comment)}},{name:"yellow",scope:["storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","constant.language.go","support.class.dart","keyword.other.documentation","storage.modifier.import.java","punctuation.definition.list.begin.markdown","punctuation.definition.quote.begin.markdown","meta.separator.markdown","entity.name.section.markdown"],settings:{foreground:e.type}},{name:"green",scope:[],settings:{foreground:r("method",e.function)}},{name:"cyan",scope:["markup.italic.markdown","support.type.python","variable.legacy.builtin.python","support.constant.property-value.css","storage.modifier.attribute.swift"],settings:{foreground:e.string}},{name:"blue",scope:[],settings:{foreground:e.keyword}},{name:"purple",scope:["keyword.channel.go","keyword.other.platform.os.swift"],settings:{foreground:e.number}},{name:"magenta",scope:["punctuation.definition.heading.markdown"],settings:{foreground:r("label",r("variableGlobal",e.number))}},{name:"red",scope:[],settings:{foreground:e.operator}},{name:"orange",scope:[],settings:{foreground:e.function}}]},ut="openchamber-md",de={background:"transparent",foreground:"var(--md-syntax-foreground)",comment:"var(--md-syntax-comment)",keyword:"var(--md-syntax-keyword)",string:"var(--md-syntax-string)",number:"var(--md-syntax-number)",function:"var(--md-syntax-function)",variable:"var(--md-syntax-variable)",type:"var(--md-syntax-type)",operator:"var(--md-syntax-operator)"},zi=Object.fromEntries(Object.keys(Rn({base:de})).map(t=>[t,`var(--md-token-${t})`])),qi={name:ut,colors:{"editor.background":"transparent","editor.foreground":de.foreground},tokenColors:[...Wi({base:de,tokens:zi}),{scope:["markup.bold","punctuation.definition.bold"],settings:{fontStyle:"bold"}},{scope:["markup.italic","punctuation.definition.italic"],settings:{fontStyle:"italic"}},{scope:["markup.heading","markup.heading entity.name"],settings:{foreground:de.keyword,fontStyle:"bold"}},{scope:["markup.inserted","punctuation.definition.inserted"],settings:{foreground:"var(--md-syntax-inserted)"}},{scope:["markup.deleted","punctuation.definition.deleted","invalid","invalid.illegal"],settings:{foreground:"var(--md-syntax-deleted)"}}]},Vi=1,Ki=2,Yi=4,Ji=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),Xi=t=>{const e=[];t.color&&e.push(`color:${t.color}`);const n=t.fontStyle??0;return n&Vi&&e.push("font-style:italic"),n&Ki&&e.push("font-weight:bold"),n&Yi&&e.push("text-decoration:underline"),`<span${e.length?` style="${e.join(";")}"`:""}>${Ji(t.content)}</span>`};let Dt,z=Promise.resolve();const Te=()=>(Dt??=$i({themes:[qi],langs:[]}),Dt);self.onmessage=t=>{const e=t.data;if(e.type==="init"){Te();return}if(e.type==="highlight"){z=z.then(()=>Zi(e)).catch(()=>{});return}if(e.type==="highlightTokens"){z=z.then(()=>es(e)).catch(()=>{});return}z=z.then(()=>ts(e)).catch(()=>{})};const Qi=async(t,e)=>{const r=(await lt[e]()).default.map(o=>Hi(o));await t.loadLanguage(...r)},pt=async(t,e)=>{let n=e in lt?e:"text";if(n!=="text"&&!t.getLoadedLanguages().includes(n))try{await Qi(t,n)}catch{n="text"}return n};async function Zi(t){try{const e=await Te(),n=await pt(e,t.lang),r=e.codeToHtml(t.code,{lang:n,theme:ut,tabindex:!1});J({type:"highlight",id:t.id,html:r})}catch(e){J({type:"error",id:t.id,message:e instanceof Error?e.message:String(e)})}}async function es(t){try{const e=await Te();t.theme&&!e.getLoadedThemes().includes(t.themeName)&&await e.loadTheme(t.theme);const n=await pt(e,t.lang),{tokens:r}=e.codeToTokens(t.code,{lang:n,theme:t.themeName}),o=r.map(i=>i.map(s=>[s.content.length,s.color??"",s.fontStyle??0]));J({type:"highlightTokens",id:t.id,lines:o})}catch(e){J({type:"error",id:t.id,message:e instanceof Error?e.message:String(e)})}}async function ts(t){try{const e=await Te(),n=await pt(e,t.lang),{tokens:r}=e.codeToTokens(t.code,{lang:n,theme:ut}),o=r.map(i=>i.map(Xi).join(""));J({type:"highlightLines",id:t.id,lines:o})}catch(e){J({type:"error",id:t.id,message:e instanceof Error?e.message:String(e)})}}function J(t){self.postMessage(t)}
11
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Si(t,e,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const l=[];let a;i.space==="html"&&t.tagName==="svg"&&(r.schema=un);const c=ki(r,t.properties),u=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,u&&(s=!1),(c||!o||!di(t,e,n))&&(l.push("<",t.tagName,c?" "+c:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!s&&(!o||!rt(t,e,n))&&l.push("</"+t.tagName+">"),l.join("")}function ki(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=wi(t,i,e[i]);o&&n.push(o)}}for(;++r<n.length;){const o=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function wi(t,e,n){const r=Nr(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,o=t.settings.allowDangerousCharacters?0:1;let s=t.quote,l;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"";const a=K(r.attribute,Object.assign({},t.settings.characterReferences,{subset:ue.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Xr:Qr)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?a:(t.settings.preferUnquoted&&(l=K(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:ue.unquoted[i][o]}))),l!==n&&(t.settings.quoteSmart&&xt(n,s)>xt(n,t.alternative)&&(s=t.alternative),l=s+K(n,Object.assign({},t.settings.characterReferences,{subset:(s==="'"?ue.single:ue.double)[i][o],attribute:!0}))+s),a+(l&&"="+l))}const vi=["<","&"];function fn(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:K(t.value,Object.assign({},r.settings.characterReferences,{subset:vi}))}function Ci(t,e,n,r){return r.settings.allowDangerousHtml?t.value:fn(t,e,n,r)}function Ni(t,e,n,r){return r.all(t)}const Ri=Ar("type",{invalid:Li,unknown:xi,handlers:{comment:Yr,doctype:Jr,element:Si,raw:Ci,root:Ni,text:fn}});function Li(t){throw new Error("Expected node, not `"+t+"`")}function xi(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Ai={},Ti={},Pi=[];function Ei(t,e){const n=e||Ai,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ii,all:Oi,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||_r,characterReferences:n.characterReferences||Ti,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?un:xr,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Ii(t,e,n){return Ri(t,e,n,this)}function Oi(t){const e=[],n=t&&t.children||Pi;let r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}function ke(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[i,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function j(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Mi(t){return Array.isArray(t)?t:[t]}async function gn(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function it(t){return!t||["plaintext","txt","text","plain"].includes(t)}function yn(t){return t==="ansi"||it(t)}function ot(t){return t==="none"}function bn(t){return ot(t)}function _n(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function Re(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(/(\r?\n)/g);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const s=e?n[o]+(n[o+1]||""):n[o];i.push([s,r]),r+=n[o].length,r+=n[o+1]?.length||0}return i}function Bi(t){const e=Re(t,!0).map(([i])=>i);function n(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let o=i,s=0;for(const l of e){if(o<l.length)break;o-=l.length,s++}return{line:s,character:o}}function r(i,o){let s=0;for(let l=0;l<i;l++)s+=e[l].length;return s+=o,s}return{lines:e,indexToPos:n,posToIndex:r}}const st="light-dark()",Di=["color","background-color"];function Gi(t,e){let n=0;const r=[];for(const i of e)i>n&&r.push({...t,content:t.content.slice(n,i),offset:t.offset+n}),n=i;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function ji(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((r,i)=>r-i);return n.length?t.map(r=>r.flatMap(i=>{const o=n.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,l)=>s-l);return o.length?Gi(i,o):i})):t}function $i(t,e,n,r,i="css-vars"){const o={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map(u=>we(t.variants[u])),l=new Set(s.flatMap(u=>Object.keys(u))),a={},c=(u,p)=>{const h=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+e[u]+(p==="color"?"":h)};return s.forEach((u,p)=>{for(const h of l){const m=u[h]||"inherit";if(p===0&&r&&Di.includes(h))if(r===st&&s.length>1){const d=e.findIndex(S=>S==="light"),b=e.findIndex(S=>S==="dark");if(d===-1||b===-1)throw new R('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const _=s[d][h]||"inherit",y=s[b][h]||"inherit";a[h]=`light-dark(${_}, ${y})`,i==="css-vars"&&(a[c(p,h)]=m)}else a[h]=m;else i==="css-vars"&&(a[c(p,h)]=m)}}),o.htmlStyle=a,o}function we(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&P.Italic&&(e["font-style"]="italic"),t.fontStyle&P.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&P.Underline&&n.push("underline"),t.fontStyle&P.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function Ze(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}const Sn=new WeakMap;function Le(t,e){Sn.set(t,e)}function oe(t){return Sn.get(t)}class Q{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Q(Object.fromEntries(Mi(n).map(r=>[r,Ke])),e)}constructor(...e){if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,i]=e;this.lang=r,this._stacks={[i]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Ui(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Ui(t){const e=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&e.push(o),i.parent&&r(i.parent)}return r(t),e}function Hi(t,e){if(!(t instanceof Q))throw new R("Invalid grammar state");return t.getInternalStack(e)}function Fi(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let r=function(s){if(typeof s=="number"){if(s<0||s>n.source.length)throw new R(`Invalid decoration offset: ${s}. Code length: ${n.source.length}`);return{...i.indexToPos(s),offset:s}}else{const l=i.lines[s.line];if(l===void 0)throw new R(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${i.lines.length}`);let a=s.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new R(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${l.length}`);return{...s,character:a,offset:i.posToIndex(s.line,a)}}};const i=Bi(n.source),o=(n.options.decorations||[]).map(s=>({...s,start:r(s.start),end:r(s.end)}));Wi(o),t.set(n.meta,{decorations:o,converter:i,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const i=e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return ji(n,i)},code(n){if(!this.options.decorations?.length)return;const r=e(this),i=Array.from(n.children).filter(u=>u.type==="element"&&u.tagName==="span");if(i.length!==r.converter.lines.length)throw new R(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(u,p,h,m){const d=i[u];let b="",_=-1,y=-1;if(p===0&&(_=0),h===0&&(y=0),h===Number.POSITIVE_INFINITY&&(y=d.children.length),_===-1||y===-1)for(let g=0;g<d.children.length;g++)b+=kn(d.children[g]),_===-1&&b.length===p&&(_=g+1),y===-1&&b.length===h&&(y=g+1);if(_===-1)throw new R(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(y===-1)throw new R(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const S=d.children.slice(_,y);if(!m.alwaysWrap&&S.length===d.children.length)l(d,m,"line");else if(!m.alwaysWrap&&S.length===1&&S[0].type==="element")l(S[0],m,"token");else{const g={type:"element",tagName:"span",properties:{},children:S};l(g,m,"wrapper"),d.children.splice(_,S.length,g)}}function s(u,p){i[u]=l(i[u],p,"line")}function l(u,p,h){const m=p.properties||{},d=p.transform||(b=>b);return u.tagName=p.tagName||"span",u.properties={...u.properties,...m,class:u.properties.class},p.properties?.class&&_n(u,p.properties.class),u=d(u,h)||u,u}const a=[],c=r.decorations.sort((u,p)=>p.start.offset-u.start.offset||u.end.offset-p.end.offset);for(const u of c){const{start:p,end:h}=u;if(p.line===h.line)o(p.line,p.character,h.character,u);else if(p.line<h.line){o(p.line,p.character,Number.POSITIVE_INFINITY,u);for(let m=p.line+1;m<h.line;m++)a.unshift(()=>s(m,u));o(h.line,0,h.character,u)}}a.forEach(u=>u())}}}function Wi(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new R(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){const i=t[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,s=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,l=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,a=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(o||s||l||a){if(o&&s||l&&a||l&&n.start.offset===n.end.offset||s&&i.start.offset===i.end.offset)continue;throw new R(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function kn(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(kn).join(""):""}const zi=[Fi()];function ve(t){const e=qi(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...zi]}function qi(t){const e=[],n=[],r=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:e,post:n,normal:r}}var H=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],$e={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Vi(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function Et(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Ki(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)$e[r]&&e.push({type:"setDecoration",value:$e[r]});else if(r<=29){const i=$e[r-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:H[r-30]}});else if(r===38){const i=Et(t);i&&e.push({type:"setForegroundColor",value:i})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:H[r-40]}});else if(r===48){const i=Et(t);i&&e.push({type:"setBackgroundColor",value:i})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:H[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:H[r-100+8]}})}return e}function Yi(){let t=null,e=null,n=new Set;return{parse(r){const i=[];let o=0;do{const s=Vi(r,o),l=s.sequence?r.substring(o,s.startPosition):r.substring(o);if(l.length>0&&i.push({value:l,foreground:t,background:e,decorations:new Set(n)}),s.sequence){const a=Ki(s.sequence);for(const c of a)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}o=s.position}while(o<r.length);return i}}}var Ji={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Xi(t=Ji){function e(l){return t[l]}function n(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let c=0;c<H.length;c++)r.push(e(H[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let p=0;p<6;p++)r.push(n([l[c],l[u],l[p]]));let a=8;for(let c=0;c<24;c++,a+=10)r.push(n([a,a,a]));return r}function o(l){return i()[l]}function s(l){switch(l.type){case"named":return e(l.name);case"rgb":return n(l.rgb);case"table":return o(l.index)}}return{value:s}}const Qi={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Zi(t,e,n){const r=ke(t,n),i=Re(e),o=Object.fromEntries(H.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=t.colors?.[c];return[a,u||Qi[a]]})),s=Xi(o),l=Yi();return i.map(a=>l.parse(a[0]).map(c=>{let u,p;c.decorations.has("reverse")?(u=c.background?s.value(c.background):t.bg,p=c.foreground?s.value(c.foreground):t.fg):(u=c.foreground?s.value(c.foreground):t.fg,p=c.background?s.value(c.background):void 0),u=j(u,r),p=j(p,r),c.decorations.has("dim")&&(u=eo(u));let h=P.None;return c.decorations.has("bold")&&(h|=P.Bold),c.decorations.has("italic")&&(h|=P.Italic),c.decorations.has("underline")&&(h|=P.Underline),c.decorations.has("strikethrough")&&(h|=P.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:p,fontStyle:h}}))}function eo(t){const e=t.match(/#([0-9a-f]{3,8})/i);if(e){const r=e[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],o=r[1],s=r[2],l=r[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${o}${o}${s}${s}${a}`}else if(r.length===3){const i=r[0],o=r[1],s=r[2];return`#${i}${i}${o}${o}${s}${s}80`}}}const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function at(t,e,n={}){const{theme:r=t.getLoadedThemes()[0]}=n,i=t.resolveLangAlias(n.lang||"text");if(it(i)||ot(r))return Re(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:s}=t.setTheme(r);if(i==="ansi")return Zi(o,e,n);const l=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new R(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new R(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return no(e,l,o,s,n)}function to(...t){if(t.length===2)return oe(t[1]);const[e,n,r={}]=t,{lang:i="text",theme:o=e.getLoadedThemes()[0]}=r;if(it(i)||ot(o))throw new R("Plain language does not have grammar state");if(i==="ansi")throw new R("ANSI language does not have grammar state");const{theme:s,colorMap:l}=e.setTheme(o),a=e.getLanguage(i);return new Q(lt(n,a,s,l,r).stateStack,a.name,s.name)}function no(t,e,n,r,i){const o=lt(t,e,n,r,i),s=new Q(o.stateStack,e.name,n.name);return Le(o.tokens,s),o.tokens}function lt(t,e,n,r,i){const o=ke(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=i,a=Re(t);let c=i.grammarState?Hi(i.grammarState,n.name)??Ke:i.grammarContextCode!=null?lt(i.grammarContextCode,e,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ke,u=[];const p=[];for(let h=0,m=a.length;h<m;h++){const[d,b]=a[h];if(d===""){u=[],p.push([]);continue}if(s>0&&d.length>=s){u=[],p.push([{content:d,offset:b,color:"",fontStyle:0}]);continue}let _,y,S;i.includeExplanation&&(_=e.tokenizeLine(d,c,l),y=_.tokens,S=0);const g=e.tokenizeLine2(d,c,l),w=g.tokens.length/2;for(let C=0;C<w;C++){const I=g.tokens[2*C],$=C+1<w?g.tokens[2*C+2]:d.length;if(I===$)continue;const ht=g.tokens[2*C+1],Pn=j(r[Y.getForeground(ht)],o),En=Y.getFontStyle(ht),Ee={content:d.substring(I,$),offset:b+I,color:Pn,fontStyle:En};if(i.includeExplanation){const dt=[];if(i.includeExplanation!=="scopeName")for(const G of n.settings){let W;switch(typeof G.scope){case"string":W=G.scope.split(/,/).map(Ie=>Ie.trim());break;case"object":W=G.scope;break;default:continue}dt.push({settings:G,selectors:W.map(Ie=>Ie.split(/ /))})}Ee.explanation=[];let ft=0;for(;I+ft<$;){const G=y[S],W=d.substring(G.startIndex,G.endIndex);ft+=W.length,Ee.explanation.push({content:W,scopes:i.includeExplanation==="scopeName"?ro(G.scopes):io(dt,G.scopes)}),S+=1}}u.push(Ee)}p.push(u),u=[],c=g.ruleStack}return{tokens:p,stateStack:c}}function ro(t){return t.map(e=>({scopeName:e}))}function io(t,e){const n=[];for(let r=0,i=e.length;r<i;r++){const o=e[r];n[r]={scopeName:o,themeMatches:so(t,o,e.slice(0,r))}}return n}function It(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function oo(t,e,n){if(!It(t[t.length-1],e))return!1;let r=t.length-2,i=n.length-1;for(;r>=0&&i>=0;)It(t[r],n[i])&&(r-=1),i-=1;return r===-1}function so(t,e,n){const r=[];for(const{selectors:i,settings:o}of t)for(const s of i)if(oo(s,e,n)){r.push(o);break}return r}function wn(t,e,n){const r=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),i=r.map(a=>{const c=at(t,e,{...n,theme:a.theme}),u=oe(c),p=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:p}}),o=ao(...i.map(a=>a.tokens)),s=o[0].map((a,c)=>a.map((u,p)=>{const h={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=u.explanation),o.forEach((m,d)=>{const{content:b,explanation:_,offset:y,...S}=m[c][p];h.variants[r[d].color]=S}),h})),l=i[0].state?new Q(Object.fromEntries(i.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),i[0].state.lang):void 0;return l&&Le(s,l),s}function ao(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const i=t.map(a=>a[r]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const s=i.map(()=>0),l=i.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),s[c]+=1,l[c]=i[c][s[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}function Ce(t,e,n){let r,i,o,s,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:p="css-vars"}=n,h=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,S)=>y.color===c?-1:S.color===c?1:0);if(h.length===0)throw new R("`themes` option must not be empty");const m=wn(t,e,n);if(a=oe(m),c&&st!==c&&!h.find(y=>y.color===c))throw new R(`\`themes\` option must contain the defaultColor key \`${c}\``);const d=h.map(y=>t.getTheme(y.theme)),b=h.map(y=>y.color);o=m.map(y=>y.map(S=>$i(S,b,u,c,p))),a&&Le(o,a);const _=h.map(y=>ke(y.theme,n));i=Ot(h,d,_,u,c,"fg",p),r=Ot(h,d,_,u,c,"bg",p),s=`shiki-themes ${d.map(y=>y.name).join(" ")}`,l=c?void 0:[i,r].join(";")}else if("theme"in n){const c=ke(n.theme,n);o=at(t,e,n);const u=t.getTheme(n.theme);r=j(u.bg,c),i=j(u.fg,c),s=u.name,a=oe(o)}else throw new R("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:s,rootStyle:l,grammarState:a}}function Ot(t,e,n,r,i,o,s){return t.map((l,a)=>{const c=j(e[a][o],n[a])||"inherit",u=`${r+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&i){if(i===st&&t.length>1){const p=t.findIndex(b=>b.color==="light"),h=t.findIndex(b=>b.color==="dark");if(p===-1||h===-1)throw new R('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const m=j(e[p][o],n[p])||"inherit",d=j(e[h][o],n[h])||"inherit";return`light-dark(${m}, ${d});${u}`}return c}return s==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Ne(t,e,n,r={meta:{},options:n,codeToHast:(i,o)=>Ne(t,i,o),codeToTokens:(i,o)=>Ce(t,i,o)}){let i=e;for(const d of ve(n))i=d.preprocess?.call(r,i,n)||i;let{tokens:o,fg:s,bg:l,themeName:a,rootStyle:c,grammarState:u}=Ce(t,i,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:h=!1}=n;p===!0?o=co(o):p==="never"&&(o=uo(o)),h&&(o=po(o));const m={...r,get source(){return i}};for(const d of ve(n))o=d.tokens?.call(m,o)||o;return lo(o,{...n,fg:s,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},m,u)}function lo(t,e,n,r=oe(t)){const i=ve(e),o=[],s={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[b,_]of Object.entries(e.meta||{}))b.startsWith("_")||(c[b]=_);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},p={type:"element",tagName:"code",properties:{},children:o};const h=[],m={...n,structure:l,addClassToHast:_n,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return s},get pre(){return u},get code(){return p},get lines(){return h}};if(t.forEach((b,_)=>{_&&(l==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
12
+ `}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},S=0;for(const g of b){let w={type:"element",tagName:"span",properties:{...g.htmlAttrs},children:[{type:"text",value:g.content}]};const C=Ze(g.htmlStyle||we(g));C&&(w.properties.style=C);for(const I of i)w=I?.span?.call(m,w,_+1,S,y,g)||w;l==="inline"?s.children.push(w):l==="classic"&&y.children.push(w),S+=g.content.length}if(l==="classic"){for(const g of i)y=g?.line?.call(m,y,_+1)||y;h.push(y),o.push(y)}else l==="inline"&&h.push(y)}),l==="classic"){for(const b of i)p=b?.code?.call(m,p)||p;u.children.push(p);for(const b of i)u=b?.pre?.call(m,u)||u;s.children.push(u)}else if(l==="inline"){const b=[];let _={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const g of s.children)g.type==="element"&&g.tagName==="br"?(b.push(_),_={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(g.type==="element"||g.type==="text")&&_.children.push(g);b.push(_);let S={type:"element",tagName:"code",properties:{},children:b};for(const g of i)S=g?.code?.call(m,S)||S;s.children=[];for(let g=0;g<S.children.length;g++){g>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const w=S.children[g];w.type==="element"&&s.children.push(...w.children)}}let d=s;for(const b of i)d=b?.root?.call(m,d)||d;return r&&Le(d,r),d}function co(t){return t.map(e=>{const n=[];let r="",i;return e.forEach((o,s)=>{const a=!(o.fontStyle&&(o.fontStyle&P.Underline||o.fontStyle&P.Strikethrough));a&&o.content.match(/^\s+$/)&&e[s+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(a?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=void 0,r=""):n.push(o)}),n})}function uo(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,o,s]=r;if(!i&&!s)return n;const l=[{...n,offset:n.offset+i.length,content:o}];return i&&l.unshift({content:i,offset:n.offset}),s&&l.push({content:s,offset:n.offset+i.length+o.length}),l}))}function po(t){return t.map(e=>{const n=[];for(const r of e){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],o=Ze(i.htmlStyle||we(i)),s=Ze(r.htmlStyle||we(r)),l=i.fontStyle&&(i.fontStyle&P.Underline||i.fontStyle&P.Strikethrough),a=r.fontStyle&&(r.fontStyle&P.Underline||r.fontStyle&P.Strikethrough);!l&&!a&&o===s?i.content+=r.content:n.push({...r})}return n})}const vn=Ei;function mo(t,e,n){const r={meta:{},options:n,codeToHast:(o,s)=>Ne(t,o,s),codeToTokens:(o,s)=>Ce(t,o,s)};let i=vn(Ne(t,e,n,r));for(const o of ve(n))i=o.postprocess?.call(r,i,n)||i;return i}const Mt={light:"#333333",dark:"#bbbbbb"},Bt={light:"#fffffe",dark:"#1e1e1e"},Dt="__shiki_resolved";function ct(t){if(t?.[Dt])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(n=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Mt.light:Mt.dark),n||(n=e.type==="light"?Bt.light:Bt.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const o=new Map;function s(l){if(o.has(l))return o.get(l);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?s(l):(o.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const p=s(l.settings.foreground);e.colorReplacements[p]=l.settings.foreground,u.settings.foreground=p}if(c){const p=s(l.settings.background);e.colorReplacements[p]=l.settings.background,u.settings.background=p}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=s(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,Dt,{enumerable:!1,writable:!1,value:!0}),e}async function Cn(t){return Array.from(new Set((await Promise.all(t.filter(e=>!yn(e)).map(async e=>await gn(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Nn(t){return(await Promise.all(t.map(async n=>bn(n)?null:ct(await gn(n))))).filter(n=>!!n)}let ho=3;function fo(t,e=3){e>ho||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let q=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new q(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return t}class go extends br{constructor(e,n,r,i={}){super(e),this._resolver=e,this._themes=n,this._langs=r,this._alias=i,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const n=ct(e);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let n=this._textmateThemeCache.get(e);n||(n=ge.createFromRawTheme(e),this._textmateThemeCache.set(e,n)),this._syncRegistry.setTheme(n)}getGrammar(e){return e=Rn(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const n=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,n.size)for(const o of n)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const n=Array.from(this._langGraph.entries()),r=n.filter(([i,o])=>!o);if(r.length){const i=n.filter(([o,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(a=>r.map(([c])=>c).includes(a)):!1).filter(o=>!r.includes(o));throw new q(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of n)this._resolver.addLanguage(o);for(const[i,o]of n)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const n=e.embeddedLanguages??e.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}}class yo{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,n){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let r=[];for(let i=1;i<=n.length;i++){const o=n.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let Z=0;function bo(t){Z+=1,t.warnings!==!1&&Z>=10&&Z%10===0&&console.warn(`[Shiki] ${Z} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new q("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(ct),i=new yo(t.engine,n),o=new go(i,r,n,t.langAlias);let s;function l(g){return Rn(g,t.langAlias)}function a(g){y();const w=o.getGrammar(typeof g=="string"?g:g.name);if(!w)throw new q(`Language \`${g}\` not found, you may need to load it first`);return w}function c(g){if(g==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const w=o.getTheme(g);if(!w)throw new q(`Theme \`${g}\` not found, you may need to load it first`);return w}function u(g){y();const w=c(g);s!==g&&(o.setTheme(w),s=g);const C=o.getColorMap();return{theme:w,colorMap:C}}function p(){return y(),o.getLoadedThemes()}function h(){return y(),o.getLoadedLanguages()}function m(...g){y(),o.loadLanguages(g.flat(1))}async function d(...g){return m(await Cn(g))}function b(...g){y();for(const w of g.flat(1))o.loadTheme(w)}async function _(...g){return y(),b(await Nn(g))}function y(){if(e)throw new q("Shiki instance has been disposed")}function S(){e||(e=!0,o.dispose(),Z-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:h,resolveLangAlias:l,loadLanguage:d,loadLanguageSync:m,loadTheme:_,loadThemeSync:b,dispose:S,[Symbol.dispose]:S}}async function _o(t){t.engine||fo("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([Nn(t.themes||[]),Cn(t.langs||[]),t.engine]);return bo({...t,themes:e,langs:n,engine:r})}async function So(t){const e=await _o(t);return{getLastGrammarState:(...n)=>to(e,...n),codeToTokensBase:(n,r)=>at(e,n,r),codeToTokensWithThemes:(n,r)=>wn(e,n,r),codeToTokens:(n,r)=>Ce(e,n,r),codeToHast:(n,r)=>Ne(e,n,r),codeToHtml:(n,r)=>mo(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function ko(t){const e=t.langs,n=t.themes,r=t.engine;async function i(o){function s(p){if(typeof p=="string"){if(p=o.langAlias?.[p]||p,yn(p))return[];const h=e[p];if(!h)throw new R(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return h}return p}function l(p){if(bn(p))return"none";if(typeof p=="string"){const h=n[p];if(!h)throw new R(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return h}return p}const a=(o.themes??[]).map(p=>l(p)),c=(o.langs??[]).map(p=>s(p)),u=await So({engine:o.engine??r(),...o,themes:a,langs:c});return{...u,loadLanguage(...p){return u.loadLanguage(...p.map(s))},loadTheme(...p){return u.loadTheme(...p.map(l))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return i}const Ln=[{id:"abap",name:"ABAP",import:(()=>import("./abap-Dg923wIy.js"))},{id:"actionscript-3",name:"ActionScript",import:(()=>import("./actionscript-3-8WTK4YD2.js"))},{id:"ada",name:"Ada",import:(()=>import("./ada-CTi7YQtL.js"))},{id:"angular-html",name:"Angular HTML",import:(()=>import("./angular-html-D2R1pe45.js").then(function(t){return t.f}))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>import("./angular-ts-BDmYQnhm.js"))},{id:"apache",name:"Apache Conf",import:(()=>import("./apache-PcO-DBxQ.js"))},{id:"apex",name:"Apex",import:(()=>import("./apex-CnCu5_gb.js"))},{id:"apl",name:"APL",import:(()=>import("./apl-DkfyvC6M.js"))},{id:"applescript",name:"AppleScript",import:(()=>import("./applescript-Ds_W2jPS.js"))},{id:"ara",name:"Ara",import:(()=>import("./ara-C1--7J61.js"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>import("./asciidoc-nTfEFGxb.js"))},{id:"asm",name:"Assembly",import:(()=>import("./asm-CTFRnVOM.js"))},{id:"astro",name:"Astro",import:(()=>import("./astro-DtPAdMss.js"))},{id:"awk",name:"AWK",import:(()=>import("./awk-CrWgQKhV.js"))},{id:"ballerina",name:"Ballerina",import:(()=>import("./ballerina-a0yOSyc5.js"))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>import("./bat-B0cHNp6s.js"))},{id:"beancount",name:"Beancount",import:(()=>import("./beancount-dPJi_gci.js"))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>import("./berry-CVKoklHx.js"))},{id:"bibtex",name:"BibTeX",import:(()=>import("./bibtex-DRcCXNgM.js"))},{id:"bicep",name:"Bicep",import:(()=>import("./bicep-jWz-hQ8I.js"))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>import("./bird2-DaGXIRGu.js"))},{id:"blade",name:"Blade",import:(()=>import("./blade-QlWdzBxO.js"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>import("./bsl-jNujDQK2.js"))},{id:"c",name:"C",import:(()=>import("./c-BG-tZi7o.js"))},{id:"c3",name:"C3",import:(()=>import("./c3-Fcb8_HKm.js"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>import("./cadence-BuaeHeSu.js"))},{id:"cairo",name:"Cairo",import:(()=>import("./cairo-BYiDgOF2.js"))},{id:"clarity",name:"Clarity",import:(()=>import("./clarity-CC_0IFDj.js"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>import("./clojure-KnfDkB_V.js"))},{id:"cmake",name:"CMake",import:(()=>import("./cmake-bh2MLnkv.js"))},{id:"cobol",name:"COBOL",import:(()=>import("./cobol-dIXRVV9Y.js"))},{id:"codeowners",name:"CODEOWNERS",import:(()=>import("./codeowners-CtwIM3TN.js"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>import("./codeql-D164juXQ.js"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>import("./coffee-Bk-z6oI_.js"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>import("./common-lisp-DXc9XcIM.js"))},{id:"coq",name:"Coq",import:(()=>import("./coq-BBL5-mG4.js"))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>import("./cpp-C0lzDePx.js"))},{id:"crystal",name:"Crystal",import:(()=>import("./crystal-Bhade0k2.js"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>import("./csharp-B7nLXyi8.js"))},{id:"css",name:"CSS",import:(()=>import("./css-PZBBrkI0.js"))},{id:"csv",name:"CSV",import:(()=>import("./csv-D5aBhKLr.js"))},{id:"cue",name:"CUE",import:(()=>import("./cue-WCin6O4e.js"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>import("./cypher-DYQk2G82.js"))},{id:"d",name:"D",import:(()=>import("./d-DVc-yF-l.js"))},{id:"dart",name:"Dart",import:(()=>import("./dart-YLd5yyRs.js"))},{id:"dax",name:"DAX",import:(()=>import("./dax-oldcCaJg.js"))},{id:"desktop",name:"Desktop",import:(()=>import("./desktop-DZfyBMgF.js"))},{id:"diff",name:"Diff",import:(()=>import("./diff-jW5kmiru.js"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>import("./docker-DG9neUKd.js"))},{id:"dotenv",name:"dotEnv",import:(()=>import("./dotenv-Bea-FkXq.js"))},{id:"dream-maker",name:"Dream Maker",import:(()=>import("./dream-maker-DAHQwpwp.js"))},{id:"edge",name:"Edge",import:(()=>import("./edge-zt3dU95k.js"))},{id:"elixir",name:"Elixir",import:(()=>import("./elixir-JolcG37e.js"))},{id:"elm",name:"Elm",import:(()=>import("./elm-BjIDgKzz.js"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>import("./emacs-lisp-DMBh55R4.js"))},{id:"erb",name:"ERB",import:(()=>import("./erb-rsjdL4fB.js"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>import("./erlang-DNeY46SW.js"))},{id:"fennel",name:"Fennel",import:(()=>import("./fennel-DBMsxtrh.js"))},{id:"fish",name:"Fish",import:(()=>import("./fish-BxskpYPN.js"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>import("./fluent-Bwo2XpEt.js"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>import("./fortran-fixed-form-DFFnVrrY.js"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>import("./fortran-free-form-DB5N_DgY.js"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>import("./fsharp-DRAF1jsN.js"))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>import("./gdresource-BD-1uzY7.js"))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>import("./gdscript-C3mT4Uym.js"))},{id:"gdshader",name:"GDShader",import:(()=>import("./gdshader-G7X6ysY3.js"))},{id:"genie",name:"Genie",import:(()=>import("./genie-DSsjfZMX.js"))},{id:"gherkin",name:"Gherkin",import:(()=>import("./gherkin-Cl2Fw-_0.js"))},{id:"git-commit",name:"Git Commit Message",import:(()=>import("./git-commit-CJPsQObV.js"))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>import("./git-rebase-DeZqv4fp.js"))},{id:"gleam",name:"Gleam",import:(()=>import("./gleam-BeBqoPwE.js"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>import("./glimmer-js-BuyKUjfV.js"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>import("./glimmer-ts-D9iniPFN.js"))},{id:"glsl",name:"GLSL",import:(()=>import("./glsl-BOG9l2nV.js"))},{id:"gn",name:"GN",import:(()=>import("./gn-Dxr0sSUf.js"))},{id:"gnuplot",name:"Gnuplot",import:(()=>import("./gnuplot-CtW3R_Hz.js"))},{id:"go",name:"Go",import:(()=>import("./go-BBr2UQCn.js"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>import("./graphql-B6XHM4uj.js"))},{id:"groovy",name:"Groovy",import:(()=>import("./groovy-DFxE31Qs.js"))},{id:"hack",name:"Hack",import:(()=>import("./hack-Cxa-FaZ4.js"))},{id:"haml",name:"Ruby Haml",import:(()=>import("./haml-2e0EI6Is.js"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>import("./handlebars-CojHdNmS.js"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>import("./haskell-BfdhR_WN.js"))},{id:"haxe",name:"Haxe",import:(()=>import("./haxe-DVIybFAS.js"))},{id:"hcl",name:"HashiCorp HCL",import:(()=>import("./hcl-B6OePqme.js"))},{id:"hjson",name:"Hjson",import:(()=>import("./hjson-D2jn7IRw.js"))},{id:"hlsl",name:"HLSL",import:(()=>import("./hlsl-MKeth5V9.js"))},{id:"html",name:"HTML",import:(()=>import("./html-DOf0XnR2.js"))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>import("./html-derivative-DfCZ6Hio.js"))},{id:"http",name:"HTTP",import:(()=>import("./http-CG3jvXcS.js"))},{id:"hurl",name:"Hurl",import:(()=>import("./hurl-CxQrh4RI.js"))},{id:"hxml",name:"HXML",import:(()=>import("./hxml-CkS3Eie7.js"))},{id:"hy",name:"Hy",import:(()=>import("./hy-DI6mCUnw.js"))},{id:"imba",name:"Imba",import:(()=>import("./imba-D-Pk5S0X.js"))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>import("./ini-Dix3pTmg.js"))},{id:"java",name:"Java",import:(()=>import("./java-BTDmaRNO.js"))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>import("./javascript-WyGyM1wV.js"))},{id:"jinja",name:"Jinja",import:(()=>import("./jinja-D0mZ3q2r.js"))},{id:"jison",name:"Jison",import:(()=>import("./jison-B9XHrcYJ.js"))},{id:"json",name:"JSON",import:(()=>import("./json-B8JryHcM.js"))},{id:"json5",name:"JSON5",import:(()=>import("./json5-Cdatmj9n.js"))},{id:"jsonc",name:"JSON with Comments",import:(()=>import("./jsonc-CvUCa1o5.js"))},{id:"jsonl",name:"JSON Lines",import:(()=>import("./jsonl-9I_GBd5L.js"))},{id:"jsonnet",name:"Jsonnet",import:(()=>import("./jsonnet-XoenQ2oc.js"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>import("./jssm-CWE2S0Z5.js"))},{id:"jsx",name:"JSX",import:(()=>import("./jsx-8cLv2Six.js"))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>import("./julia-C1oINnwa.js"))},{id:"just",name:"Just",import:(()=>import("./just-Bo3fV9RY.js"))},{id:"kdl",name:"KDL",import:(()=>import("./kdl-CMbyIXjQ.js"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>import("./kotlin-BQy537ds.js"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>import("./kusto-B_y0uMaZ.js"))},{id:"latex",name:"LaTeX",import:(()=>import("./latex-CZAhoKip.js"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>import("./lean-C4RHkN41.js"))},{id:"less",name:"Less",import:(()=>import("./less-XNfgnZC7.js"))},{id:"liquid",name:"Liquid",import:(()=>import("./liquid-DFlqVvG0.js"))},{id:"llvm",name:"LLVM IR",import:(()=>import("./llvm-BJRUtCev.js"))},{id:"log",name:"Log file",import:(()=>import("./log-CcaF_xNv.js"))},{id:"logo",name:"Logo",import:(()=>import("./logo-D9WQLoKQ.js"))},{id:"lua",name:"Lua",import:(()=>import("./lua-8Av-h-ns.js"))},{id:"luau",name:"Luau",import:(()=>import("./luau-BTSFCcFb.js"))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>import("./make-DXVx14cr.js"))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>import("./markdown-DX-TNHnc.js"))},{id:"marko",name:"Marko",import:(()=>import("./marko-DiIoNBFw.js"))},{id:"matlab",name:"MATLAB",import:(()=>import("./matlab-DzreyMvm.js"))},{id:"mdc",name:"MDC",import:(()=>import("./mdc-D_DpLax5.js"))},{id:"mdx",name:"MDX",import:(()=>import("./mdx-C2fqO2XY.js"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>import("./mermaid-Cwy4Up_p.js"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>import("./mipsasm-yE_Aqo9y.js"))},{id:"mojo",name:"Mojo",import:(()=>import("./mojo-M6pJPbMk.js"))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>import("./moonbit-CR8uFLGd.js"))},{id:"move",name:"Move",import:(()=>import("./move-CyYMWVy5.js"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>import("./narrat-DXUZ_ZkW.js"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>import("./nextflow-BPolriEg.js"))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>import("./nextflow-groovy-pQRwk_Jg.js"))},{id:"nginx",name:"Nginx",import:(()=>import("./nginx-DSXkacNc.js"))},{id:"nim",name:"Nim",import:(()=>import("./nim-e2z2kCcq.js"))},{id:"nix",name:"Nix",import:(()=>import("./nix-Ckjrpg0r.js"))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>import("./nushell-DtHLcZf1.js"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>import("./objective-c-BoaBTdtz.js"))},{id:"objective-cpp",name:"Objective-C++",import:(()=>import("./objective-cpp-DstR8hNy.js"))},{id:"ocaml",name:"OCaml",import:(()=>import("./ocaml-DTbn2Hv7.js"))},{id:"odin",name:"Odin",import:(()=>import("./odin-Bxc4S6Xn.js"))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>import("./openscad-CXHpNBsb.js"))},{id:"pascal",name:"Pascal",import:(()=>import("./pascal-Sr-XLSE6.js"))},{id:"perl",name:"Perl",import:(()=>import("./perl-C95KruZl.js"))},{id:"php",name:"PHP",import:(()=>import("./php-B4Kqya17.js"))},{id:"pkl",name:"Pkl",import:(()=>import("./pkl-CRusufhw.js"))},{id:"plsql",name:"PL/SQL",import:(()=>import("./plsql-Dbm3tV2N.js"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>import("./po-LG0lFwH4.js"))},{id:"polar",name:"Polar",import:(()=>import("./polar-DjOs3GWb.js"))},{id:"postcss",name:"PostCSS",import:(()=>import("./postcss-GRRkWn2F.js"))},{id:"powerquery",name:"PowerQuery",import:(()=>import("./powerquery-DHf-dtTS.js"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>import("./powershell-DXrKVo3G.js"))},{id:"prisma",name:"Prisma",import:(()=>import("./prisma-Dgf8IN_C.js"))},{id:"prolog",name:"Prolog",import:(()=>import("./prolog-9JcfiY6I.js"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>import("./proto-dqx_Sj2i.js"))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>import("./pug-CoOVtr4u.js"))},{id:"puppet",name:"Puppet",import:(()=>import("./puppet-Di57VbSS.js"))},{id:"purescript",name:"PureScript",import:(()=>import("./purescript-BgpM7rDH.js"))},{id:"python",name:"Python",aliases:["py"],import:(()=>import("./python-B6Ihcp-E.js"))},{id:"qml",name:"QML",import:(()=>import("./qml-DmGQGbca.js"))},{id:"qmldir",name:"QML Directory",import:(()=>import("./qmldir-DXd9s5XC.js"))},{id:"qss",name:"Qt Style Sheets",import:(()=>import("./qss-B7NnhfIi.js"))},{id:"r",name:"R",import:(()=>import("./r-1ts4xG1r.js"))},{id:"racket",name:"Racket",import:(()=>import("./racket-CeDx7KO2.js"))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>import("./raku-BMJwmrCS.js"))},{id:"razor",name:"ASP.NET Razor",import:(()=>import("./razor-BaMsy-R7.js"))},{id:"reg",name:"Windows Registry Script",import:(()=>import("./reg-Cvyu2Gnx.js"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>import("./regexp-DK-WlHNu.js"))},{id:"rel",name:"Rel",import:(()=>import("./rel-BlqNHz8k.js"))},{id:"riscv",name:"RISC-V",import:(()=>import("./riscv-C5dpdlr7.js"))},{id:"ron",name:"RON",import:(()=>import("./ron-j5NfrB3z.js"))},{id:"rosmsg",name:"ROS Interface",import:(()=>import("./rosmsg-ZkSIzPhc.js"))},{id:"rst",name:"reStructuredText",import:(()=>import("./rst-C371KPjr.js"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>import("./ruby-DusoydGj.js"))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>import("./rust-CxuBE0J8.js"))},{id:"sas",name:"SAS",import:(()=>import("./sas-DtSHuIwI.js"))},{id:"sass",name:"Sass",import:(()=>import("./sass-bfEVHPJ8.js"))},{id:"scala",name:"Scala",import:(()=>import("./scala-Dtw19ca_.js"))},{id:"scheme",name:"Scheme",import:(()=>import("./scheme-OJppFQF3.js"))},{id:"scss",name:"SCSS",import:(()=>import("./scss-DxBkwadj.js"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>import("./sdbl-CvZs3G9c.js"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>import("./shaderlab-CEJedz68.js"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>import("./shellscript-DgJyDXW6.js"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>import("./shellsession-DSlzxnCM.js"))},{id:"smalltalk",name:"Smalltalk",import:(()=>import("./smalltalk-B9IHbYt7.js"))},{id:"solidity",name:"Solidity",import:(()=>import("./solidity-B3CjIuAd.js"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>import("./soy-BSb8SaP0.js"))},{id:"sparql",name:"SPARQL",import:(()=>import("./sparql-BJh4JEw-.js"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>import("./splunk-h-bNAnbk.js"))},{id:"sql",name:"SQL",import:(()=>import("./sql-BbONfI8K.js"))},{id:"ssh-config",name:"SSH Config",import:(()=>import("./ssh-config-CywOjoXH.js"))},{id:"stata",name:"Stata",import:(()=>import("./stata-BKjsT8qe.js"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>import("./stylus-CIg617SB.js"))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>import("./surrealql-2KNEnAt7.js"))},{id:"svelte",name:"Svelte",import:(()=>import("./svelte-xaxjcSSP.js"))},{id:"swift",name:"Swift",import:(()=>import("./swift-tEesUtni.js"))},{id:"system-verilog",name:"SystemVerilog",import:(()=>import("./system-verilog-Qdm_1g2q.js"))},{id:"systemd",name:"Systemd Units",import:(()=>import("./systemd-DKMPPZjB.js"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>import("./talonscript-eRuyeYHl.js"))},{id:"tasl",name:"Tasl",import:(()=>import("./tasl-B9CVvjfG.js"))},{id:"tcl",name:"Tcl",import:(()=>import("./tcl-Bq9dbVAF.js"))},{id:"templ",name:"Templ",import:(()=>import("./templ-BVTOctZ7.js"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>import("./terraform-CAp711iT.js"))},{id:"tex",name:"TeX",import:(()=>import("./tex-BHxF5DMe.js"))},{id:"toml",name:"TOML",import:(()=>import("./toml-Ms459DBw.js"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>import("./ts-tags-C-gylFal.js"))},{id:"tsv",name:"TSV",import:(()=>import("./tsv-BFtm7NXx.js"))},{id:"tsx",name:"TSX",import:(()=>import("./tsx-D6116Ycy.js"))},{id:"turtle",name:"Turtle",import:(()=>import("./turtle-DpRhbQZY.js"))},{id:"twig",name:"Twig",import:(()=>import("./twig-DuP5mDZ4.js"))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>import("./typescript-BqvgUolh.js"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>import("./typespec-DhK7u29_.js"))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>import("./typst-Dfd71gQj.js"))},{id:"v",name:"V",import:(()=>import("./v-BH76v7br.js"))},{id:"vala",name:"Vala",import:(()=>import("./vala-z59IxkFd.js"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>import("./vb-4AxSLKIU.js"))},{id:"verilog",name:"Verilog",import:(()=>import("./verilog-LfQUkHDc.js"))},{id:"vhdl",name:"VHDL",import:(()=>import("./vhdl-DJCsFYgn.js"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>import("./viml-pbKHW3Ia.js"))},{id:"vue",name:"Vue",import:(()=>import("./vue-D2k0BAl5.js"))},{id:"vue-html",name:"Vue HTML",import:(()=>import("./vue-html-zEfNEgpj.js"))},{id:"vue-vine",name:"Vue Vine",import:(()=>import("./vue-vine-D9eCaTqi.js"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>import("./vyper-DpazWNpx.js"))},{id:"wasm",name:"WebAssembly",import:(()=>import("./wasm-CFi-k9--.js"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>import("./wenyan-CYFFG9DK.js"))},{id:"wgsl",name:"WGSL",import:(()=>import("./wgsl-CxjTZs-b.js"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>import("./wikitext-Bx2qct8O.js"))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>import("./wit-DDW3hD69.js"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>import("./wolfram-pu21K997.js"))},{id:"xml",name:"XML",import:(()=>import("./xml-BkAJuBCc.js"))},{id:"xsl",name:"XSL",import:(()=>import("./xsl-C6UUWSil.js"))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>import("./yaml-Bopit2L3.js"))},{id:"zenscript",name:"ZenScript",import:(()=>import("./zenscript-BIAKq-aR.js"))},{id:"zig",name:"Zig",import:(()=>import("./zig-bSFrHQ7n.js"))}],wo=Object.fromEntries(Ln.map(t=>[t.id,t.import])),vo=Object.fromEntries(Ln.flatMap(t=>t.aliases?.map(e=>[e,t.import])||[])),ut={...wo,...vo},Co=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>import("./andromeeda-CT0vplkN.js"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>import("./aurora-x-C0VKFdlO.js"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>import("./ayu-dark-wZ6ORhBL.js"))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>import("./ayu-light-xXLJ_Ch1.js"))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>import("./ayu-mirage-CQckA_sP.js"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>import("./catppuccin-frappe-CfssSZMA.js"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>import("./catppuccin-latte-DoBaWTGn.js"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>import("./catppuccin-macchiato-BkAuvdZC.js"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>import("./catppuccin-mocha-D9fcC0iT.js"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>import("./dark-plus-DLU5INA3.js"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>import("./dracula-XcYHBZy6.js"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>import("./dracula-soft-BPeX9gxW.js"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>import("./everforest-dark-WOub3wle.js"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>import("./everforest-light-DCUg8VH8.js"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>import("./github-dark-BQV5ugrc.js"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>import("./github-dark-default-DLWDM7FH.js"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>import("./github-dark-dimmed-D1FmiR_p.js"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>import("./github-dark-high-contrast-BilLoi0o.js"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>import("./github-light-Rcb2q3L5.js"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>import("./github-light-default-CQ75esMw.js"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>import("./github-light-high-contrast-CRF1wyLy.js"))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>import("./gruvbox-dark-hard-C37G1gbc.js"))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>import("./gruvbox-dark-medium-C3G9m3TV.js"))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>import("./gruvbox-dark-soft-eZmcmZ9I.js"))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>import("./gruvbox-light-hard-BYj-vz_3.js"))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>import("./gruvbox-light-medium-BdQlDiiF.js"))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>import("./gruvbox-light-soft-BGNwjiRh.js"))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>import("./horizon-cslQss18.js"))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>import("./horizon-bright-CoQRYDvy.js"))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>import("./houston-RHIKkNfR.js"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>import("./kanagawa-dragon-BOvIHJVT.js"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>import("./kanagawa-lotus-Bwcd7Bvx.js"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>import("./kanagawa-wave-0SAlpf0s.js"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>import("./laserwave-si7wuSrt.js"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>import("./light-plus-g_Fi9vkG.js"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>import("./material-theme-CIJ3cGaW.js"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>import("./material-theme-darker-BWg3m1GB.js"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>import("./material-theme-lighter-DR8HWMN7.js"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>import("./material-theme-ocean-CZf9pk28.js"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>import("./material-theme-palenight-BF01YeZy.js"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>import("./min-dark-DhfaepVE.js"))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>import("./min-light-6xx0uMgm.js"))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>import("./monokai-BodnsaDQ.js"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>import("./night-owl-EdP2Hztp.js"))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>import("./night-owl-light-Bk-lYVyk.js"))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>import("./nord-BAu0wM6c.js"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>import("./one-dark-pro-utPxbBbJ.js"))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>import("./one-light-BuCQ22aO.js"))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>import("./plastic-CXnNNlFZ.js"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>import("./poimandres-BrOVMvuE.js"))},{id:"red",displayName:"Red",type:"dark",import:(()=>import("./red-DR6ZwibK.js"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>import("./rose-pine-CN2F2lJl.js"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>import("./rose-pine-dawn-0S8NEhsA.js"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>import("./rose-pine-moon-DzBDT4rc.js"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>import("./slack-dark-CWRQmTmo.js"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>import("./slack-ochin-DO_ok7XK.js"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>import("./snazzy-light-B5llO_gK.js"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>import("./solarized-dark-G9yBjKj_.js"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>import("./solarized-light-DeSzljQz.js"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>import("./synthwave-84-DRVv-_m_.js"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>import("./tokyo-night-BvwC8l2v.js"))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>import("./vesper--t9w6MWz.js"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>import("./vitesse-black-B_BYPdvp.js"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>import("./vitesse-dark-DOSOf2Sz.js"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>import("./vitesse-light-gUX51GpB.js"))}],No=Object.fromEntries(Co.map(t=>[t.id,t.import]));class pt extends Error{constructor(e){super(e),this.name="ShikiError"}}function Ro(){return 2147483648}function Lo(){return typeof performance<"u"?performance.now():Date.now()}const xo=(t,e)=>t+(e-t%e)%e;async function Ao(t){let e,n;const r={};function i(m){n=m,r.HEAPU8=new Uint8Array(m),r.HEAPU32=new Uint32Array(m)}function o(m,d,b){r.HEAPU8.copyWithin(m,d,d+b)}function s(m){try{return e.grow(m-n.byteLength+65535>>>16),i(e.buffer),1}catch{}}function l(m){const d=r.HEAPU8.length;m=m>>>0;const b=Ro();if(m>b)return!1;for(let _=1;_<=4;_*=2){let y=d*(1+.2/_);y=Math.min(y,m+100663296);const S=Math.min(b,xo(Math.max(m,y),65536));if(s(S))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(m,d,b=1024){const _=d+b;let y=d;for(;m[y]&&!(y>=_);)++y;if(y-d>16&&m.buffer&&a)return a.decode(m.subarray(d,y));let S="";for(;d<y;){let g=m[d++];if(!(g&128)){S+=String.fromCharCode(g);continue}const w=m[d++]&63;if((g&224)===192){S+=String.fromCharCode((g&31)<<6|w);continue}const C=m[d++]&63;if((g&240)===224?g=(g&15)<<12|w<<6|C:g=(g&7)<<18|w<<12|C<<6|m[d++]&63,g<65536)S+=String.fromCharCode(g);else{const I=g-65536;S+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return S}function u(m,d){return m?c(r.HEAPU8,m,d):""}const p={emscripten_get_now:Lo,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function h(){const d=await t({env:p,wasi_snapshot_preview1:p});e=d.memory,i(e.buffer),Object.assign(r,d),r.UTF8ToString=u}return await h(),r}var To=Object.defineProperty,Po=(t,e,n)=>e in t?To(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,L=(t,e,n)=>Po(t,typeof e!="symbol"?e+"":e,n);let A=null;function Eo(t){throw new pt(t.UTF8ToString(t.getLastOnigError()))}class xe{constructor(e){L(this,"utf16Length"),L(this,"utf8Length"),L(this,"utf16Value"),L(this,"utf8Value"),L(this,"utf16OffsetToUtf8"),L(this,"utf8OffsetToUtf16");const n=e.length,r=xe._utf8ByteLength(e),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const l=new Uint8Array(r);let a=0;for(let c=0;c<n;c++){const u=e.charCodeAt(c);let p=u,h=!1;if(u>=55296&&u<=56319&&c+1<n){const m=e.charCodeAt(c+1);m>=56320&&m<=57343&&(p=(u-55296<<10)+65536|m-56320,h=!0)}i&&(o[c]=a,h&&(o[c+1]=a),p<=127?s[a+0]=c:p<=2047?(s[a+0]=c,s[a+1]=c):p<=65535?(s[a+0]=c,s[a+1]=c,s[a+2]=c):(s[a+0]=c,s[a+1]=c,s[a+2]=c,s[a+3]=c)),p<=127?l[a++]=p:p<=2047?(l[a++]=192|(p&1984)>>>6,l[a++]=128|(p&63)>>>0):p<=65535?(l[a++]=224|(p&61440)>>>12,l[a++]=128|(p&4032)>>>6,l[a++]=128|(p&63)>>>0):(l[a++]=240|(p&1835008)>>>18,l[a++]=128|(p&258048)>>>12,l[a++]=128|(p&4032)>>>6,l[a++]=128|(p&63)>>>0),h&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let n=0;for(let r=0,i=e.length;r<i;r++){const o=e.charCodeAt(r);let s=o,l=!1;if(o>=55296&&o<=56319&&r+1<i){const a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(s=(o-55296<<10)+65536|a-56320,l=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,l&&r++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const Ae=class D{constructor(e){if(L(this,"id",++D.LAST_ID),L(this,"_onigBinding"),L(this,"content"),L(this,"utf16Length"),L(this,"utf8Length"),L(this,"utf16OffsetToUtf8"),L(this,"utf8OffsetToUtf16"),L(this,"ptr"),!A)throw new pt("Must invoke loadWasm first.");this._onigBinding=A,this.content=e;const n=new xe(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!D._sharedPtrInUse?(D._sharedPtr||(D._sharedPtr=A.omalloc(1e4)),D._sharedPtrInUse=!0,A.HEAPU8.set(n.utf8Value,D._sharedPtr),this.ptr=D._sharedPtr):this.ptr=n.createString(A)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===D._sharedPtr?D._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};L(Ae,"LAST_ID",0);L(Ae,"_sharedPtr",0);L(Ae,"_sharedPtrInUse",!1);let xn=Ae;class Io{constructor(e){if(L(this,"_onigBinding"),L(this,"_ptr"),!A)throw new pt("Must invoke loadWasm first.");const n=[],r=[];for(let l=0,a=e.length;l<a;l++){const c=new xe(e[l]);n[l]=c.createString(A),r[l]=c.utf8Length}const i=A.omalloc(4*e.length);A.HEAPU32.set(n,i/4);const o=A.omalloc(4*e.length);A.HEAPU32.set(r,o/4);const s=A.createOnigScanner(i,o,e.length);for(let l=0,a=e.length;l<a;l++)A.ofree(n[l]);A.ofree(o),A.ofree(i),s===0&&Eo(A),this._onigBinding=A,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof e=="string"){e=new xn(e);const o=this._findNextMatchSync(e,n,!1,i);return e.dispose(),o}return this._findNextMatchSync(e,n,!1,i)}_findNextMatchSync(e,n,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const l=o.HEAPU32;let a=s/4;const c=l[a++],u=l[a++],p=[];for(let h=0;h<u;h++){const m=e.convertUtf8OffsetToUtf16(l[a++]),d=e.convertUtf8OffsetToUtf16(l[a++]);p[h]={start:m,end:d,length:d-m}}return{index:c,captureIndices:p}}}function Oo(t){return typeof t.instantiator=="function"}function Mo(t){return typeof t.default=="function"}function Bo(t){return typeof t.data<"u"}function Do(t){return typeof Response<"u"&&t instanceof Response}function Go(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let pe;function jo(t){if(pe)return pe;async function e(){A=await Ao(async n=>{let r=t;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Oo(r)?r=await r.instantiator(n):Mo(r)?r=await r.default(n):(Bo(r)&&(r=r.data),Do(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await $o(r)(n):r=await Uo(r)(n):Go(r)?r=await Ue(r)(n):r instanceof WebAssembly.Module?r=await Ue(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Ue(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return pe=e(),pe}function Ue(t){return e=>WebAssembly.instantiate(t,e)}function $o(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Uo(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}async function Ho(t){return t&&await jo(t),{createScanner(e){return new Io(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new xn(e)}}}const Fo=ko({langs:ut,themes:No,engine:()=>Ho(import("./wasm-CG6Dc4jp.js"))}),An="template-call",Wo=t=>{const e=t.repository?.[An]?.patterns;return Array.isArray(e)&&e.length>0},zo=t=>{if(!Wo(t))return t;const e={...t.repository};return e[An]={patterns:[]},{...t,repository:e}},qo=8,Vo=256*1024,Ko=new Set(["text","plaintext","txt","plain"]),Yo=new Set(["ansi"]),Jo=/^([\s\S]*?<code[^>]*>)([\s\S]*)(<\/code>[\s\S]*)$/,Gt=t=>{const e=Jo.exec(t);if(!e)return null;const[,n="",r="",i=""]=e;return{open:n,lines:r.split(`
13
+ `),close:i}},Xo=({render:t,maxLineages:e=qo,maxLineageChars:n=Vo})=>{let r=[];const i=(l,a)=>{let c;for(const u of r)u.lang!==l||u.stable.length>a.length||c&&c.stable.length>=u.stable.length||a.startsWith(u.stable)&&(c=u);return c},o=l=>{r=[l,...r.filter(a=>a!==l)].slice(0,e)};return{highlight:(l,a)=>{if(Yo.has(a)||l.length>n)return null;const c=l.lastIndexOf(`
14
+ `),u=l.slice(0,c+1),p=l.slice(c+1),h=i(a,u)??{lang:a,stable:"",lines:[],open:"",close:"",grammarState:void 0},m=u.slice(h.stable.length);if(m!==""){const b=t(m.slice(0,-1),a,h.grammarState),_=Gt(b.html);if(!_||b.grammarState===void 0&&!Ko.has(a))return null;h.lines.push(..._.lines),h.open=_.open,h.close=_.close,h.grammarState=b.grammarState,h.stable=u}const d=Gt(t(p,a,h.grammarState).html);return d?(h.stable!==""&&o(h),`${d.open}${[...h.lines,...d.lines].join(`
15
+ `)}${d.close}`):null},reset(){r=[]}}};function Tn(t){const e=t.base,n=t.tokens??{},r=n.variableProperty??e.variable,i=n.className??n.class??e.type;return{commentDoc:e.comment,stringEscape:e.foreground,stringInterpolation:e.variable,stringRegex:e.string,keywordControl:e.keyword,keywordOperator:e.operator,keywordImport:e.operator,keywordReturn:e.keyword,storageModifier:e.keyword,functionCall:e.function,functionBuiltin:e.function,method:e.function,methodCall:n.method??e.function,variableBuiltin:e.variable,variableProperty:r,variableReadonly:e.number,variableOther:e.variable,variableGlobal:e.string,variableLocal:e.variable,parameter:n.stringEscape??e.foreground,typePrimitive:e.type,typeInterface:n.interface??e.type,interface:e.type,class:i,className:i,struct:i,enum:i,typeParameter:e.type,boolean:e.keyword,null:e.number,constant:e.number,punctuation:e.comment,delimiter:n.punctuation??e.comment,bracket:e.foreground,tag:e.keyword,jsxTag:n.tag??e.keyword,tagAttribute:r,tagAttributeValue:e.string,tagBracket:n.punctuation??e.comment,decorator:e.function,annotation:e.function,namespace:e.type,module:e.operator,label:e.operator,macro:e.keyword,preprocessor:e.operator,regex:e.string,url:e.string,key:r,exception:e.operator,...n}}const Qo=(t,e)=>typeof t=="string"&&t.trim().length>0?t:e,Zo=t=>{const e=t.base,n=new Map(Object.entries(Tn(t))),r=(i,o)=>Qo(n.get(i),o);return[{name:"plain",scope:["source","support.type.property-name.css"],settings:{foreground:e.foreground}},{name:"classes",scope:["entity.name.type.class"],settings:{foreground:r("className",r("class",e.function))}},{name:"interfaces",scope:["entity.name.type.interface","entity.name.type"],settings:{foreground:r("interface",e.type)}},{name:"structs",scope:["entity.name.type.struct"],settings:{foreground:r("struct",e.function)}},{name:"enums",scope:["entity.name.type.enum"],settings:{foreground:r("enum",e.function)}},{name:"keys",scope:["meta.object-literal.key","support.type.property-name"],settings:{foreground:r("key",e.function)}},{name:"methods",scope:["entity.name.function.method","meta.function.method"],settings:{foreground:r("method",e.function)}},{name:"functions",scope:["entity.name.function","support.function","meta.function-call.generic"],settings:{foreground:e.function,fontStyle:"bold"}},{name:"variables",scope:["variable","meta.variable","variable.other.object.property"],settings:{foreground:e.variable}},{name:"variablesOther",scope:["variable.other.object","variable.other.readwrite.alias"],settings:{foreground:r("variableOther",e.variable)}},{name:"globalVariables",scope:["variable.other.global","variable.language.this"],settings:{foreground:r("variableGlobal",e.number)}},{name:"localVariables",scope:["variable.other.local"],settings:{foreground:r("variableLocal",e.variable)}},{name:"parameters",scope:["variable.parameter","meta.parameter"],settings:{foreground:r("parameter",e.foreground)}},{name:"properties",scope:["variable.other.property","meta.property"],settings:{foreground:r("variableProperty",e.variable)}},{name:"strings",scope:["string","string.other.link","markup.inline.raw.string.markdown"],settings:{foreground:e.string}},{name:"stringEscapeSequences",scope:["constant.character.escape","constant.other.placeholder"],settings:{foreground:r("stringEscape",e.foreground)}},{name:"keywords",scope:["keyword"],settings:{foreground:e.keyword}},{name:"keywordsControl",scope:["keyword.control.import","keyword.control.from","keyword.import"],settings:{foreground:r("keywordImport",e.operator)}},{name:"storageModifiers",scope:["storage.modifier","keyword.modifier","storage.type"],settings:{foreground:r("storageModifier",e.keyword)}},{name:"comments",scope:["comment","punctuation.definition.comment"],settings:{foreground:e.comment}},{name:"docComments",scope:["comment.documentation","comment.line.documentation"],settings:{foreground:r("commentDoc",e.comment)}},{name:"numbers",scope:["constant.numeric"],settings:{foreground:e.number}},{name:"booleans",scope:["constant.language.boolean","constant.language.json"],settings:{foreground:r("boolean",e.type)}},{name:"operators",scope:["keyword.operator"],settings:{foreground:e.operator}},{name:"macros",scope:["entity.name.function.preprocessor","meta.preprocessor"],settings:{foreground:r("macro",e.keyword)}},{name:"preprocessor",scope:["meta.preprocessor"],settings:{foreground:r("preprocessor",r("label",e.number))}},{name:"urls",scope:["markup.underline.link"],settings:{foreground:r("url",e.string)}},{name:"tags",scope:["entity.name.tag"],settings:{foreground:r("tag",e.keyword)}},{name:"jsxTags",scope:["support.class.component"],settings:{foreground:r("jsxTag",r("label",e.number))}},{name:"attributes",scope:["entity.other.attribute-name","meta.attribute"],settings:{foreground:r("tagAttribute",e.type)}},{name:"types",scope:["support.type"],settings:{foreground:e.type}},{name:"constants",scope:["variable.other.constant","variable.readonly"],settings:{foreground:r("constant",e.foreground)}},{name:"labels",scope:["entity.name.label","punctuation.definition.label"],settings:{foreground:r("label",r("variableGlobal",e.number))}},{name:"namespaces",scope:["entity.name.namespace","storage.modifier.namespace","markup.bold.markdown"],settings:{foreground:r("namespace",e.type)}},{name:"modules",scope:["entity.name.module","storage.modifier.module"],settings:{foreground:r("module",e.operator)}},{name:"typeParameters",scope:["variable.type.parameter","variable.parameter.type"],settings:{foreground:r("typeParameter",e.function)}},{name:"exceptions",scope:["keyword.control.exception","keyword.control.trycatch"],settings:{foreground:r("exception",r("label",e.number))}},{name:"decorators",scope:["meta.decorator","punctuation.decorator","entity.name.function.decorator"],settings:{foreground:r("decorator",e.type)}},{name:"calls",scope:["variable.function"],settings:{foreground:e.foreground}},{name:"punctuation",scope:["punctuation","punctuation.terminator","punctuation.definition.tag","punctuation.separator","punctuation.definition.string","punctuation.section.block"],settings:{foreground:r("punctuation",e.comment)}},{name:"yellow",scope:["storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","constant.language.go","support.class.dart","keyword.other.documentation","storage.modifier.import.java","punctuation.definition.list.begin.markdown","punctuation.definition.quote.begin.markdown","meta.separator.markdown","entity.name.section.markdown"],settings:{foreground:e.type}},{name:"green",scope:[],settings:{foreground:r("method",e.function)}},{name:"cyan",scope:["markup.italic.markdown","support.type.python","variable.legacy.builtin.python","support.constant.property-value.css","storage.modifier.attribute.swift"],settings:{foreground:e.string}},{name:"blue",scope:[],settings:{foreground:e.keyword}},{name:"purple",scope:["keyword.channel.go","keyword.other.platform.os.swift"],settings:{foreground:e.number}},{name:"magenta",scope:["punctuation.definition.heading.markdown"],settings:{foreground:r("label",r("variableGlobal",e.number))}},{name:"red",scope:[],settings:{foreground:e.operator}},{name:"orange",scope:[],settings:{foreground:e.function}}]},Te="openchamber-md",fe={background:"transparent",foreground:"var(--md-syntax-foreground)",comment:"var(--md-syntax-comment)",keyword:"var(--md-syntax-keyword)",string:"var(--md-syntax-string)",number:"var(--md-syntax-number)",function:"var(--md-syntax-function)",variable:"var(--md-syntax-variable)",type:"var(--md-syntax-type)",operator:"var(--md-syntax-operator)"},es=Object.fromEntries(Object.keys(Tn({base:fe})).map(t=>[t,`var(--md-token-${t})`])),ts={name:Te,colors:{"editor.background":"transparent","editor.foreground":fe.foreground},tokenColors:[...Zo({base:fe,tokens:es}),{scope:["markup.bold","punctuation.definition.bold"],settings:{fontStyle:"bold"}},{scope:["markup.italic","punctuation.definition.italic"],settings:{fontStyle:"italic"}},{scope:["markup.heading","markup.heading entity.name"],settings:{foreground:fe.keyword,fontStyle:"bold"}},{scope:["markup.inserted","punctuation.definition.inserted"],settings:{foreground:"var(--md-syntax-inserted)"}},{scope:["markup.deleted","punctuation.definition.deleted","invalid","invalid.illegal"],settings:{foreground:"var(--md-syntax-deleted)"}}]},ns=1,rs=2,is=4,os=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),ss=t=>{const e=[];t.color&&e.push(`color:${t.color}`);const n=t.fontStyle??0;return n&ns&&e.push("font-style:italic"),n&rs&&e.push("font-weight:bold"),n&is&&e.push("text-decoration:underline"),`<span${e.length?` style="${e.join(";")}"`:""}>${os(t.content)}</span>`};let jt,z=Promise.resolve();const Pe=()=>(jt??=Fo({themes:[ts],langs:[]}),jt);self.onmessage=t=>{const e=t.data;if(e.type==="init"){Pe();return}if(e.type==="highlight"){z=z.then(()=>cs(e)).catch(()=>{});return}if(e.type==="highlightTokens"){z=z.then(()=>us(e)).catch(()=>{});return}z=z.then(()=>ps(e)).catch(()=>{})};const as=async(t,e)=>{const r=(await ut[e]()).default.map(i=>zo(i));await t.loadLanguage(...r)},mt=async(t,e)=>{let n=e in ut?e:"text";if(n!=="text"&&!t.getLoadedLanguages().includes(n))try{await as(t,n)}catch{n="text"}return n};let $t,me;const ls=t=>(me&&$t===t||($t=t,me=Xo({render:(e,n,r)=>{const i=t.codeToHast(e,{lang:n,theme:Te,tabindex:!1,grammarState:r});return{html:vn(i),grammarState:t.getLastGrammarState(i)}}})),me);async function cs(t){try{const e=await Pe(),n=await mt(e,t.lang),r=(t.fullPass?null:ls(e).highlight(t.code,n))??e.codeToHtml(t.code,{lang:n,theme:Te,tabindex:!1});J({type:"highlight",id:t.id,html:r})}catch(e){J({type:"error",id:t.id,message:e instanceof Error?e.message:String(e)})}}async function us(t){try{const e=await Pe();t.theme&&!e.getLoadedThemes().includes(t.themeName)&&await e.loadTheme(t.theme);const n=await mt(e,t.lang),{tokens:r}=e.codeToTokens(t.code,{lang:n,theme:t.themeName}),i=r.map(o=>o.map(s=>[s.content.length,s.color??"",s.fontStyle??0]));J({type:"highlightTokens",id:t.id,lines:i})}catch(e){J({type:"error",id:t.id,message:e instanceof Error?e.message:String(e)})}}async function ps(t){try{const e=await Pe(),n=await mt(e,t.lang),{tokens:r}=e.codeToTokens(t.code,{lang:n,theme:Te}),i=r.map(o=>o.map(ss).join(""));J({type:"highlightLines",id:t.id,lines:i})}catch(e){J({type:"error",id:t.id,message:e instanceof Error?e.message:String(e)})}}function J(t){self.postMessage(t)}