@openchambery/web 2.0.0-beta.4 → 2.0.0-beta.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 (172) hide show
  1. package/dist/assets/{AgentAvatar-Q1SmFRx2.js → AgentAvatar-BBmQXYDq.js} +1 -1
  2. package/dist/assets/AssistantView-BpvbpZBC.js +3 -0
  3. package/dist/assets/{DiagramView-BW92schO.js → DiagramView-UwKDr8HS.js} +1 -1
  4. package/dist/assets/{FadeInOnReveal-BZmwl-zE.js → FadeInOnReveal-w_BQ7K7K.js} +1 -1
  5. package/dist/assets/Icon-B9kZgYZn.js +1 -0
  6. package/dist/assets/{MarkdownRenderer-Bv05iDZZ.js → MarkdownRenderer-C8tDsO5F.js} +2 -2
  7. package/dist/assets/{MarkdownRendererImpl-C81xqYib.js → MarkdownRendererImpl-DRZ1iTbg.js} +1 -1
  8. package/dist/assets/MarkstreamRendererImpl-fU6uhDTr.js +3 -0
  9. package/dist/assets/{MobileDetailNavigation-BMgIu7zc.js → MobileDetailNavigation-MXUDe0nG.js} +1 -1
  10. package/dist/assets/{MobileShareBridge-BOXGNHmC.js → MobileShareBridge-C7x4jOGb.js} +2 -2
  11. package/dist/assets/MobileSurface-BQSmXYJ_.js +2 -0
  12. package/dist/assets/{MultiRunWindow-B5At2Z95.js → MultiRunWindow-ClfxxgP5.js} +1 -1
  13. package/dist/assets/{OnboardingScreen-bsPLgz4r.js → OnboardingScreen-BxItVnnO.js} +1 -1
  14. package/dist/assets/{OverlayScrollbar-4wp4migh.js → OverlayScrollbar-B4e0QD05.js} +1 -1
  15. package/dist/assets/SettingsView-DtWgey4y.js +25 -0
  16. package/dist/assets/{SettingsWindow-CMtX2bMl.js → SettingsWindow-Du8y1EI8.js} +1 -1
  17. package/dist/assets/TerminalView-DL9qkQDj.js +8 -0
  18. package/dist/assets/{ToolOutputDialog-uH1ZZDSS.js → ToolOutputDialog-BXawDmmf.js} +1 -1
  19. package/dist/assets/{appThemeRegistry-DK7q2juD.js → appThemeRegistry-DsSahEsq.js} +1 -1
  20. package/dist/assets/{button-CcNJUxUd.js → button-CwXyux0a.js} +1 -1
  21. package/dist/assets/collapsible-BZ6_cYJd.js +1 -0
  22. package/dist/assets/context-menu-DHrRifPE.js +1 -0
  23. package/dist/assets/{desktopHosts-C6HrP0jq.js → desktopHosts-JGFqhlaM.js} +1 -1
  24. package/dist/assets/{desktopRelayRestore-DdVBp45U.js → desktopRelayRestore-CHEwrI93.js} +1 -1
  25. package/dist/assets/{diagram-CxTs9hCQ.js → diagram-BwnPNKWt.js} +1 -1
  26. package/dist/assets/{dialog-KMVL9QKF.js → dialog-Dp0lQv5K.js} +1 -1
  27. package/dist/assets/es-DicJ8lKD.js +15 -0
  28. package/dist/assets/fileMentionTouchSelection-PZQrywzZ.js +3 -0
  29. package/dist/assets/{fileQueries-CjdBRy8y.js → fileQueries-DN6gbLhM.js} +1 -1
  30. package/dist/assets/fr-lhgVcBW_.js +13 -0
  31. package/dist/assets/{gitApi-yuWg9BN4.js → gitApi-C1oGENfw.js} +4 -4
  32. package/dist/assets/{imageSource-9vQBq3zp.js → imageSource-BMztRu0c.js} +1 -1
  33. package/dist/assets/{input-CrIvk3HZ.js → input-Biw8aNzR.js} +1 -1
  34. package/dist/assets/insertionBoundaries-BmQh-tke.js +1 -0
  35. package/dist/assets/ja-B9EZwOcw.js +15 -0
  36. package/dist/assets/ko-Dxk-uJRb.js +15 -0
  37. package/dist/assets/main-BnyE5H4i.js +169 -0
  38. package/dist/assets/main-D2BzpnUt.css +1 -0
  39. package/dist/assets/main-DOgXHO44.js +2 -0
  40. package/dist/assets/{markdownHeightCache-BmXVY_gc.js → markdownHeightCache-BOOrGCuG.js} +1 -1
  41. package/dist/assets/markdownTheme-DM5h1i18.js +1 -0
  42. package/dist/assets/{mcpQueries-C7jknHV8.js → mcpQueries-D9Dyzcve.js} +1 -1
  43. package/dist/assets/miniChat-C7FecHIX.js +2 -0
  44. package/dist/assets/mobile-_zrfbam4.js +2 -0
  45. package/dist/assets/multirun-BLFbv4I9.js +4 -0
  46. package/dist/assets/persistence-D0y7226-.js +3 -0
  47. package/dist/assets/pl-CFhwWLJj.js +15 -0
  48. package/dist/assets/platform-D_c-T5nO.js +6 -0
  49. package/dist/assets/projectMeta-BCdCRuYS.js +3 -0
  50. package/dist/assets/pt-BR-Ba6GfZ6J.js +15 -0
  51. package/dist/assets/renderElectronMiniChatApp-QQq7dj-0.js +2 -0
  52. package/dist/assets/renderMobileApp-BVIkeTKi.js +28 -0
  53. package/dist/assets/{runtimeConfig-BEANkvOd.js → runtimeConfig-S9D4fVI5.js} +1 -1
  54. package/dist/assets/runtimeEndpointReset-B6eE14f9.js +149 -0
  55. package/dist/assets/sessionChangeSummary-DLo3Iv_g.js +2 -0
  56. package/dist/assets/{sessionLookup-34XFmP9C.js → sessionLookup-BXXTw54z.js} +1 -1
  57. package/dist/assets/{sortable-tabs-strip-DyEV0Heg.js → sortable-tabs-strip-CTY_wG46.js} +1 -1
  58. package/dist/assets/src-lS1keDVV.css +2 -0
  59. package/dist/assets/store-DmowK-GO.js +15 -0
  60. package/dist/assets/{terminalApi-CXaBEoa_.js → terminalApi-Dhqqp4xi.js} +1 -1
  61. package/dist/assets/{textarea-BBOlRI9O.js → textarea-QxsmcBGj.js} +1 -1
  62. package/dist/assets/{tooltip-CPI4fr1a.js → tooltip-CpMLl5_k.js} +1 -1
  63. package/dist/assets/uk-ChchBzy6.js +15 -0
  64. package/dist/assets/{url-DRDQXjyX.js → url-CGbJbiJq.js} +1 -1
  65. package/dist/assets/{useAppFontEffects-CiDe42I5.js → useAppFontEffects-BDs0O2qK.js} +56 -51
  66. package/dist/assets/{useAssistantUIStore-asNG6K7n.js → useAssistantUIStore-Bz4tRflF.js} +1 -1
  67. package/dist/assets/useDesktopWindowControlsLayout-ojoBEglc.js +1 -0
  68. package/dist/assets/{useEffectiveDirectory-C_CouL5v.js → useEffectiveDirectory-B_nHyDMJ.js} +1 -1
  69. package/dist/assets/{useFontPreferences-B0oUZAiB.js → useFontPreferences-Xw1vSkmC.js} +1 -1
  70. package/dist/assets/useMobileNavigationStore-D_96D661.js +414 -0
  71. package/dist/assets/{useRuntimeAPIs-DwLtO0c_.js → useRuntimeAPIs-DSLXJybW.js} +1 -1
  72. package/dist/assets/useSessionAutoCleanup-Dw34f-EW.js +2 -0
  73. package/dist/assets/{useThemeSystem-BlNUWH47.js → useThemeSystem-DMzWVJaW.js} +1 -1
  74. package/dist/assets/useUIStore-syVmbuDA.js +1 -0
  75. package/dist/assets/{useWorkerHighlightedLines-CPNYz6Wf.js → useWorkerHighlightedLines-CNlfP7nA.js} +1 -1
  76. package/dist/assets/{vendor-base-ui-CDjyofeD.js → vendor-base-ui-CnHfUmDN.js} +1 -1
  77. package/dist/assets/{vendor-cmdk-BFH0UpXX.js → vendor-cmdk-CeAGfrLo.js} +1 -1
  78. package/dist/assets/{vendor-dnd-kit-accessibility-BrR3AKvM.js → vendor-dnd-kit-accessibility-BY5LhhUB.js} +1 -1
  79. package/dist/assets/{vendor-dnd-kit-core-CNfdvk6H.js → vendor-dnd-kit-core-CvWxUPdb.js} +1 -1
  80. package/dist/assets/{vendor-dnd-kit-sortable-DQUaTeGj.js → vendor-dnd-kit-sortable-hHdP9lLb.js} +1 -1
  81. package/dist/assets/{vendor-framer-motion-4dogsUk3.js → vendor-framer-motion-DFy_BSVd.js} +1 -1
  82. package/dist/assets/{vendor-legendapp-list-BU7MdPZR.js → vendor-legendapp-list-WE32lwNk.js} +1 -1
  83. package/dist/assets/{vendor-markstream-react-qHC2FykU.js → vendor-markstream-react-DX55XLGO.js} +3 -3
  84. package/dist/assets/vendor-opencode-client-C12gfjag.js +12 -0
  85. package/dist/assets/{vendor-pierre-diffs-CUfqC003.js → vendor-pierre-diffs-DX7XTPG3.js} +1 -1
  86. package/dist/assets/{vendor-react-C94A0AHl.js → vendor-react-DLPElpoQ.js} +1 -1
  87. package/dist/assets/{vendor-react-drawio-FVlWqKVE.js → vendor-react-drawio-ECtEwvbc.js} +1 -1
  88. package/dist/assets/{vendor-reactuses-core-C2A3EjUi.js → vendor-reactuses-core-Dq5ocTF8.js} +1 -1
  89. package/dist/assets/{vendor-sonner-DNqHmUQs.js → vendor-sonner-DVzioF3d.js} +1 -1
  90. package/dist/assets/{vendor-stream-diffs-CwbKsmlv.js → vendor-stream-diffs-DWy3xSmp.js} +2 -2
  91. package/dist/assets/{vendor-tanstack-react-query-D0iFK57C.js → vendor-tanstack-react-query-D7pys_c9.js} +1 -1
  92. package/dist/assets/{vendor-tanstack-react-virtual-B2kV6cnT.js → vendor-tanstack-react-virtual-tlDgH6PG.js} +1 -1
  93. package/dist/assets/{vendor-zustand-BqLKf6ZY.js → vendor-zustand-B4dlGEM2.js} +1 -1
  94. package/dist/assets/zh-CN-Z_bkUQk5.js +15 -0
  95. package/dist/assets/zh-TW-CZeTm7kd.js +15 -0
  96. package/dist/index.html +13 -13
  97. package/dist/mini-chat.html +13 -13
  98. package/dist/mobile.html +13 -13
  99. package/package.json +3 -2
  100. package/server/index.js +38 -7
  101. package/server/lib/browser-provider/DOCUMENTATION.md +141 -0
  102. package/server/lib/browser-provider/contract.js +312 -0
  103. package/server/lib/browser-provider/host.js +421 -0
  104. package/server/lib/browser-provider/host.test.js +304 -0
  105. package/server/lib/browser-provider/routes.js +122 -0
  106. package/server/lib/browser-provider/routes.test.js +120 -0
  107. package/server/lib/browser-provider/selection-store.js +43 -0
  108. package/server/lib/browser-provider/selection-store.test.js +35 -0
  109. package/server/lib/notifications/DOCUMENTATION.md +3 -1
  110. package/server/lib/notifications/runtime.js +110 -26
  111. package/server/lib/notifications/runtime.test.js +92 -0
  112. package/server/lib/notifications/template-runtime.js +130 -38
  113. package/server/lib/notifications/template-runtime.test.js +96 -0
  114. package/server/lib/opencode/DOCUMENTATION.md +4 -0
  115. package/server/lib/opencode/ensure-cli.d.ts +8 -0
  116. package/server/lib/opencode/feature-routes-runtime.js +10 -0
  117. package/server/lib/opencode/feature-routes-runtime.test.js +7 -0
  118. package/server/lib/opencode/proxy.js +3 -1
  119. package/server/lib/opencode/proxy.test.js +3 -3
  120. package/server/lib/opencode/routes.js +30 -0
  121. package/server/lib/opencode/upgrade-screen.d.ts +30 -0
  122. package/server/lib/opencode/upgrade-screen.js +299 -0
  123. package/server/lib/opencode/upgrade-screen.test.js +196 -0
  124. package/server/lib/session-metadata/DOCUMENTATION.md +27 -17
  125. package/server/lib/session-metadata/opencode-session-record.d.ts +57 -0
  126. package/server/lib/session-metadata/opencode-session-record.js +316 -0
  127. package/server/lib/session-metadata/opencode-session-record.test.js +242 -0
  128. package/server/lib/session-metadata/routes.js +5 -1
  129. package/server/lib/session-metadata/session-archive.js +1 -1
  130. package/server/lib/session-metadata/session-metadata-store.d.ts +2 -0
  131. package/server/lib/session-metadata/session-metadata-store.js +63 -16
  132. package/server/lib/session-metadata/session-projection.js +26 -2
  133. package/server/lib/session-title/runtime.js +2 -2
  134. package/dist/assets/AssistantView-CwXkiCAd.js +0 -3
  135. package/dist/assets/Icon-AQPvxMiU.js +0 -1
  136. package/dist/assets/MarkstreamRendererImpl-CXUCQuKJ.js +0 -3
  137. package/dist/assets/MobileSurface-xuc_z0_G.js +0 -2
  138. package/dist/assets/SettingsView-CJ6tcH5_.js +0 -25
  139. package/dist/assets/TerminalView-Dvr-ysTS.js +0 -8
  140. package/dist/assets/collapsible-ZmZ6rLWs.js +0 -3
  141. package/dist/assets/context-menu-B2LXJgXL.js +0 -1
  142. package/dist/assets/es-CN3E_zXj.js +0 -15
  143. package/dist/assets/fileMentionTouchSelection-7RIwlpkB.js +0 -4
  144. package/dist/assets/fr-9zZvQZD2.js +0 -13
  145. package/dist/assets/insertionBoundaries-BiUCSkx-.js +0 -1
  146. package/dist/assets/ja-Dnjk_82N.js +0 -15
  147. package/dist/assets/ko-BxCEE99C.js +0 -15
  148. package/dist/assets/main-C9mIBo77.js +0 -2
  149. package/dist/assets/main-DiL6w6KF.js +0 -169
  150. package/dist/assets/main-qSeeJRW1.css +0 -1
  151. package/dist/assets/markdownTheme-CKac3wKC.js +0 -1
  152. package/dist/assets/miniChat-CwtUaElU.js +0 -2
  153. package/dist/assets/mobile-DB-6--ws.js +0 -2
  154. package/dist/assets/multirun-TAsxFI8e.js +0 -4
  155. package/dist/assets/persistence-56kq8Z4V.js +0 -3
  156. package/dist/assets/pl-CNNsWnPM.js +0 -15
  157. package/dist/assets/platform-C13fMVEs.js +0 -6
  158. package/dist/assets/pt-BR-BZB2DJMp.js +0 -15
  159. package/dist/assets/renderElectronMiniChatApp-CGj0MNRU.js +0 -2
  160. package/dist/assets/renderMobileApp-CGMMqbsO.js +0 -28
  161. package/dist/assets/runtimeEndpointReset-A_ZBUJFS.js +0 -147
  162. package/dist/assets/sessionChangeSummary-qOLrP9fw.js +0 -2
  163. package/dist/assets/src-ubCWXZhR.css +0 -2
  164. package/dist/assets/store-DLCiZaA6.js +0 -15
  165. package/dist/assets/uk-rwQrxeYM.js +0 -15
  166. package/dist/assets/useDesktopWindowControlsLayout-BlizAlOt.js +0 -1
  167. package/dist/assets/useMobileNavigationStore-DfPClaW-.js +0 -414
  168. package/dist/assets/useSessionAutoCleanup-DtrfbxAp.js +0 -2
  169. package/dist/assets/useUIStore-CQYKJnrg.js +0 -1
  170. package/dist/assets/vendor-opencode-client-BOe2qpQb.js +0 -12
  171. package/dist/assets/zh-CN-BvmBDnkD.js +0 -15
  172. package/dist/assets/zh-TW-9wcHTX0y.js +0 -15
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-shikijs-langs-eloENL-7.js","assets/rolldown-runtime-C0FnF6B9.js","assets/vendor-shikijs-themes-C7F1vBnG.js","assets/vendor-shiki-DzFPeSWm.js","assets/vendor-pierre-theme-D9JzKBPc.js"])))=>i.map(i=>d[i]);
2
- import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{nt as n,rt as r}from"./vendor-base-ui-CDjyofeD.js";import{o as i}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{t as a}from"./vendor-hast-util-to-html-B0p1k5Xa.js";import{t as o}from"./vendor-oniguruma-to-es-CrHzjjSU.js";import{n as s,r as c,t as l}from"./vendor-diff-Dq7CZNim.js";import{t as u}from"./vendor-lru_map-DpDied8H.js";var d=`diffs-container`,f=(()=>{try{return!1}catch{return!1}})(),p=/(?=^From [a-f0-9]+ .+$)/m,m=/(?=^diff --git)/gm,h=/(?=^---\s+\S)/gm,g=/(?=^@@ )/gm,_=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,v=/(?<=\n)/,y=/^(---|\+\+\+)\s+([^\t\r\n]+)/,b=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,x=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,S=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,C=/^<{7,}(?:\s.*)?$/,w=/^\|{7,}(?:\s.*)?$/,T=/^={7,}$/,E=/^>{7,}(?:\s.*)?$/,D=`header-prefix`,O=`header-filename-suffix`,k=`header-metadata`,A=`header-custom`,j={dark:`pierre-dark`,light:`pierre-light`},M=`data-theme-css`,N=`data-unsafe-css`,ee=`data-core-css`,te=`data-diffs-scrollbar-measure`,ne=`data-diffs-code-view-header`,re=`data-diffs-code-view-footer`,ie=`--diffs-scrollbar-gutter-measured`,ae=1e5,oe={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},se={...oe,hunkLineCount:1},ce={paddingTop:8,paddingBottom:8,gap:8},le={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ue=Object.freeze({fromStart:0,fromEnd:0}),de={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},fe={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},pe=new Map,me=new Map,he=new Map,ge=new Set;function _e(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!ge.has(t))return!1;return!0}function ve(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(ge.has(n.name))continue;let e=pe.get(n.name);e??(e=n,pe.set(n.name,e)),ge.add(e.name),t.loadLanguageSync(e.data)}}function ye(){pe.clear(),ge.clear()}function be(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var P=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function xe(e){return Se(e)}function Se(e){return Array.isArray(e)?Ce(e):e instanceof RegExp?e:typeof e==`object`?we(e):e}function Ce(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Se(e[n]);return t}function we(e){let t={};for(let n in e)t[n]=Se(e[n]);return t}function Te(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ee(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ee(e.substring(0,e.length-1)):e.substr(~t+1)}var De=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Oe=class{static hasCaptures(e){return e!==null&&(De.lastIndex=0,De.test(e))}static replaceCaptures(e,t,n){return e.replace(De,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function ke(e,t){return e<t?-1:+(e>t)}function Ae(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=ke(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function je(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Me(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Ne=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Pe=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ze(e),t)}static createFromParsedTheme(e,t){return Ve(e,t)}_cachedMatchRoot=new Ne(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Ie(e.parent,t.parentScopes));return n?new Re(n.fontStyle,n.foreground,n.background):null}},Fe=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Ie(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Le(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Le(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Re=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ze(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&je(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&je(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Be(l,u,e,o,s,c)}}return n}var Be=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},F=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(F||{});function Ve(e,t){e.sort((e,t)=>{let n=ke(e.scope,t.scope);return n!==0||(n=Ae(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new He(t),o=new Re(n,a.getId(r),a.getId(i)),s=new Ge(new We(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Pe(a,o,s)}var He=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Ue=Object.freeze([]),We=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Ue,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e||(this.scopeDepth=e),t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Ge=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),We.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Ae(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new We(e,t,n,r,i))}},Ke=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){e.getLanguageId(t),e.getTokenType(t),e.getFontStyle(t),e.getForeground(t),e.getBackground(t)}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Je(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function qe(e){return e}function Je(e){return e}function Ye(e,t){let n=[],r=Ze(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:`${i}`}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Xe(i)){let e=[];do e.push(i),i=r.next();while(Xe(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Xe(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ze(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Qe(e){typeof e.dispose==`function`&&e.dispose()}var $e=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},et=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},tt=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},nt=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new $e(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new tt;for(let n of e)rt(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof $e){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function rt(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof $e?at({baseGrammar:a,selfGrammar:i},r):it(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new $e(e))}function it(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];ot([r],t,n)}}function at(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ot(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ot(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ot(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Te({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ot(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ft(i);switch(a.kind){case 0:at({...t,selfGrammar:t.baseGrammar},n);break;case 1:at(t,n);break;case 2:it(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?it(a.ruleName,i,n):at(i,n)}else a.kind===4?n.add(new et(a.scopeName,a.ruleName)):n.add(new $e(a.scopeName))}}}var st=class{kind=0},ct=class{kind=1},lt=class{constructor(e){this.ruleName=e}kind=2},ut=class{constructor(e){this.scopeName=e}kind=3},dt=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ft(e){if(e===`$base`)return new st;if(e===`$self`)return new ct;let t=e.indexOf(`#`);return t===-1?new ut(e):t===0?new lt(e.substring(1)):new dt(e.substring(0,t),e.substring(t+1))}var pt=/\\(\d+)/,mt=/\\(\d+)/g,ht=-1,gt=-2;function _t(e){return e}function vt(e){return e}var yt=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Oe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Oe.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ee(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Oe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Oe.replaceCaptures(this._contentName,e,t)}},bt=class extends yt{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},xt=class extends yt{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Et(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Dt,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},St=class extends yt{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Dt,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ct=class extends yt{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Et(i,this.id),this.beginCaptures=a,this._end=new Et(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Dt;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},wt=class extends yt{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Et(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Et(o,gt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Dt;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Dt,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},Tt=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new bt(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new xt(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Te({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new St(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new wt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Ct(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=ft(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof St||e instanceof Ct||e instanceof wt)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Et=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&pt.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return mt.lastIndex=0,this.source.replace(mt,(e,t)=>Me(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Dt=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(),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(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Ot(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Ot(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Ot=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
2
+ import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{nt as n,rt as r}from"./vendor-base-ui-CnHfUmDN.js";import{o as i}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{t as a}from"./vendor-hast-util-to-html-B0p1k5Xa.js";import{t as o}from"./vendor-oniguruma-to-es-CrHzjjSU.js";import{n as s,r as c,t as l}from"./vendor-diff-Dq7CZNim.js";import{t as u}from"./vendor-lru_map-DpDied8H.js";var d=`diffs-container`,f=(()=>{try{return!1}catch{return!1}})(),p=/(?=^From [a-f0-9]+ .+$)/m,m=/(?=^diff --git)/gm,h=/(?=^---\s+\S)/gm,g=/(?=^@@ )/gm,_=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,v=/(?<=\n)/,y=/^(---|\+\+\+)\s+([^\t\r\n]+)/,b=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,x=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,S=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,C=/^<{7,}(?:\s.*)?$/,w=/^\|{7,}(?:\s.*)?$/,T=/^={7,}$/,E=/^>{7,}(?:\s.*)?$/,D=`header-prefix`,O=`header-filename-suffix`,k=`header-metadata`,A=`header-custom`,j={dark:`pierre-dark`,light:`pierre-light`},M=`data-theme-css`,N=`data-unsafe-css`,ee=`data-core-css`,te=`data-diffs-scrollbar-measure`,ne=`data-diffs-code-view-header`,re=`data-diffs-code-view-footer`,ie=`--diffs-scrollbar-gutter-measured`,ae=1e5,oe={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},se={...oe,hunkLineCount:1},ce={paddingTop:8,paddingBottom:8,gap:8},le={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ue=Object.freeze({fromStart:0,fromEnd:0}),de={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},fe={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},pe=new Map,me=new Map,he=new Map,ge=new Set;function _e(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!ge.has(t))return!1;return!0}function ve(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(ge.has(n.name))continue;let e=pe.get(n.name);e??(e=n,pe.set(n.name,e)),ge.add(e.name),t.loadLanguageSync(e.data)}}function ye(){pe.clear(),ge.clear()}function be(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var P=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function xe(e){return Se(e)}function Se(e){return Array.isArray(e)?Ce(e):e instanceof RegExp?e:typeof e==`object`?we(e):e}function Ce(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Se(e[n]);return t}function we(e){let t={};for(let n in e)t[n]=Se(e[n]);return t}function Te(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ee(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ee(e.substring(0,e.length-1)):e.substr(~t+1)}var De=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Oe=class{static hasCaptures(e){return e!==null&&(De.lastIndex=0,De.test(e))}static replaceCaptures(e,t,n){return e.replace(De,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function ke(e,t){return e<t?-1:+(e>t)}function Ae(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=ke(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function je(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Me(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Ne=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Pe=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ze(e),t)}static createFromParsedTheme(e,t){return Ve(e,t)}_cachedMatchRoot=new Ne(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Ie(e.parent,t.parentScopes));return n?new Re(n.fontStyle,n.foreground,n.background):null}},Fe=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Ie(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Le(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Le(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Re=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ze(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&je(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&je(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Be(l,u,e,o,s,c)}}return n}var Be=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},F=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(F||{});function Ve(e,t){e.sort((e,t)=>{let n=ke(e.scope,t.scope);return n!==0||(n=Ae(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new He(t),o=new Re(n,a.getId(r),a.getId(i)),s=new Ge(new We(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Pe(a,o,s)}var He=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Ue=Object.freeze([]),We=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Ue,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e||(this.scopeDepth=e),t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Ge=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),We.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Ae(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new We(e,t,n,r,i))}},Ke=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){e.getLanguageId(t),e.getTokenType(t),e.getFontStyle(t),e.getForeground(t),e.getBackground(t)}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Je(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function qe(e){return e}function Je(e){return e}function Ye(e,t){let n=[],r=Ze(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:`${i}`}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Xe(i)){let e=[];do e.push(i),i=r.next();while(Xe(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Xe(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ze(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Qe(e){typeof e.dispose==`function`&&e.dispose()}var $e=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},et=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},tt=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},nt=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new $e(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new tt;for(let n of e)rt(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof $e){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function rt(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof $e?at({baseGrammar:a,selfGrammar:i},r):it(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new $e(e))}function it(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];ot([r],t,n)}}function at(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ot(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ot(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ot(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Te({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ot(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ft(i);switch(a.kind){case 0:at({...t,selfGrammar:t.baseGrammar},n);break;case 1:at(t,n);break;case 2:it(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?it(a.ruleName,i,n):at(i,n)}else a.kind===4?n.add(new et(a.scopeName,a.ruleName)):n.add(new $e(a.scopeName))}}}var st=class{kind=0},ct=class{kind=1},lt=class{constructor(e){this.ruleName=e}kind=2},ut=class{constructor(e){this.scopeName=e}kind=3},dt=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ft(e){if(e===`$base`)return new st;if(e===`$self`)return new ct;let t=e.indexOf(`#`);return t===-1?new ut(e):t===0?new lt(e.substring(1)):new dt(e.substring(0,t),e.substring(t+1))}var pt=/\\(\d+)/,mt=/\\(\d+)/g,ht=-1,gt=-2;function _t(e){return e}function vt(e){return e}var yt=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Oe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Oe.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ee(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Oe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Oe.replaceCaptures(this._contentName,e,t)}},bt=class extends yt{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},xt=class extends yt{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Et(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Dt,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},St=class extends yt{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Dt,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ct=class extends yt{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Et(i,this.id),this.beginCaptures=a,this._end=new Et(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Dt;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},wt=class extends yt{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Et(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Et(o,gt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Dt;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Dt,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},Tt=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new bt(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new xt(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Te({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new St(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new wt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Ct(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=ft(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof St||e instanceof Ct||e instanceof wt)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Et=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&pt.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return mt.lastIndex=0,this.source.replace(mt,(e,t)=>Me(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Dt=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(),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(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Ot(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Ot(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Ot=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
3
3
  `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},kt=class{constructor(e,t){this.languageId=e,this.tokenType=t}},At=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new kt(e,8),this._embeddedLanguagesMatcher=new jt(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new kt(0,0);_getBasicScopeAttributes=new Ne(e=>new kt(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.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 Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},jt=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Me(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Mt=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Nt(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Pt(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Mt(i,!0);f()}return new Mt(i,!1);function f(){let o=Ft(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===ht){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Bt(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Ct){let r=o;Bt(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof wt){let r=o;Bt(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Bt(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Pt(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof wt&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=zt(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==gt){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Bt(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Ft(e,t,n,r,i,a){let o=It(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Lt(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function It(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Rt(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Lt(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Rt(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Rt(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function zt(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Bt(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Nt(e,p,n&&d.start===0,d.start,f,i,!1,0),Qe(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Vt(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Vt=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Ht(e,t,n,r,i,a,o,s){return new Kt(e,t,n,r,i,a,o,s)}function Ut(e,t,n,r,i){let a=Ye(t,Wt),o=Tt.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Wt(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Gt(t[r],e))return n=r+1,!0;return!1})}function Gt(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Kt=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new At(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=qt(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Ye(e,Wt);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Ut(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Ut(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(_t(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[vt(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=qt(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Tt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Yt.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Ke.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Jt.createRootAndLookUpScopeName(a,r,this):Jt.createRoot(`unknown`,r),t=new Yt(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
4
4
  `;let a=this.createOnigString(e),o=a.content.length,s=new Zt(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Nt(this,a,i,0,t,s,!0,r);return Qe(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function qt(e,t){return e=xe(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Jt=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Fe.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Fe(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Fe(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Ke.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Yt=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Jt.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:vt(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Jt.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,_t(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Jt.fromExtension(r,n.contentNameScopesList))}},Xt=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Ye(e,Wt).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Ye(e,Wt).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Zt=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Ke.set(n,0,qe(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Ke.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Qt=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Ht(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},$t=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Qt(Pe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Pe.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Xt(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new nt(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},en=Yt.NULL;function tn(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function nn(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function rn(e){return Array.isArray(e)?e:[e]}async function an(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function on(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function sn(e){return e===`ansi`||on(e)}function cn(e){return e===`none`}function ln(e){return cn(e)}function un(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function dn(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function fn(e){let t=dn(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function pn(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var mn=`light-dark()`,hn=[`color`,`background-color`];function gn(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function _n(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?gn(e,t):e})):e}function vn(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>yn(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&hn.includes(a))if(r===mn&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function yn(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&F.Italic&&(t[`font-style`]=`italic`),e.fontStyle&F.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&F.Underline&&n.push(`underline`),e.fontStyle&F.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function bn(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var xn=new WeakMap;function Sn(e,t){xn.set(e,t)}function Cn(e){return xn.get(e)}var wn=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(rn(n).map(e=>[e,en])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Tn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Tn(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function En(e,t){if(!(e instanceof wn))throw new P(`Invalid grammar state`);return e.getInternalStack(t)}function Dn(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new P(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(t===void 0)throw new P(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new P(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=fn(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));On(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return _n(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new P(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=kn(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new P(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new P(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&un(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function On(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new P(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new P(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function kn(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(kn).join(``):``}var An=[Dn()];function jn(e){let t=Mn(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...An]}function Mn(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Nn=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Pn={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Fn(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function In(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Ln(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Pn[r]&&t.push({type:`setDecoration`,value:Pn[r]});else if(r<=29){let e=Pn[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Nn[r-30]}});else if(r===38){let n=In(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Nn[r-40]}});else if(r===48){let n=In(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Nn[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Nn[r-100+8]}})}return t}function Rn(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Fn(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Ln(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var zn={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 Bn(e=zn){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Nn.length;e++)r.push(t(Nn[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Vn={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 Hn(e,t,n){let r=tn(e,n),i=dn(t),a=Bn(Object.fromEntries(Nn.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Vn[t]]}))),o=Rn();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=nn(i,r),o=nn(o,r),n.decorations.has(`dim`)&&(i=Un(i));let s=F.None;return n.decorations.has(`bold`)&&(s|=F.Bold),n.decorations.has(`italic`)&&(s|=F.Italic),n.decorations.has(`underline`)&&(s|=F.Underline),n.decorations.has(`strikethrough`)&&(s|=F.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Un(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Wn(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(on(i)||cn(r))return dn(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return Hn(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new P(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Kn(t,s,a,o,n)}function Gn(...e){if(e.length===2)return Cn(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(on(i)||cn(a))throw new P(`Plain language does not have grammar state`);if(i===`ansi`)throw new P(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new wn(qn(n,c,o,s,r).stateStack,c.name,o.name)}function Kn(e,t,n,r,i){let a=qn(e,t,n,r,i),o=new wn(a.stateStack,t.name,n.name);return Sn(a.tokens,o),a.tokens}function qn(e,t,n,r,i){let a=tn(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=dn(e),l=i.grammarState?En(i.grammarState,n.name)??en:i.grammarContextCode==null?en:qn(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=nn(r[Ke.getForeground(s)],a),l=Ke.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Jn(t.scopes):Yn(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Jn(e){return e.map(e=>({scopeName:e}))}function Yn(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Qn(e,i,t.slice(0,r))}}return n}function Xn(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Zn(e,t,n){if(!Xn(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Xn(e[r],n[i])&&--r,--i;return r===-1}function Qn(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Zn(e,t,n)){r.push(a);break}return r}function $n(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=Wn(e,t,{...n,theme:r.theme});return{tokens:i,state:Cn(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=er(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new wn(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&Sn(o,s),o}function er(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function tr(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new P("`themes` option must not be empty");let p=$n(e,t,n);if(c=Cn(p),l&&mn!==l&&!f.find(e=>e.color===l))throw new P(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>vn(e,h,u,l,d))),c&&Sn(a,c);let g=f.map(e=>tn(e.theme,n));i=nr(f,m,g,u,l,`fg`,d),r=nr(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=tn(n.theme,n);a=Wn(e,t,n);let l=e.getTheme(n.theme);r=nn(l.bg,s),i=nn(l.fg,s),o=l.name,c=Cn(a)}else throw new P("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function nr(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=nn(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===mn&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${nn(t[r][a],n[r])||`inherit`}, ${nn(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function rr(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>rr(e,t,n),codeToTokens:(t,n)=>tr(e,t,n)}){let i=t;for(let e of jn(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=tr(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=ar(a):d===`never`&&(a=or(a)),f&&(a=sr(a));let p={...r,get source(){return i}};for(let e of jn(n))a=e.tokens?.call(p,a)||a;return ir(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function ir(e,t,n,r=Cn(e)){let i=jn(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:un,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
5
5
  `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=bn(a.htmlStyle||yn(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&Sn(m,r),m}function ar(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&F.Underline||i.fontStyle&F.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function or(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function sr(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=bn(e.htmlStyle||yn(e)),i=bn(n.htmlStyle||yn(n)),a=e.fontStyle&&(e.fontStyle&F.Underline||e.fontStyle&F.Strikethrough),o=n.fontStyle&&(n.fontStyle&F.Underline||n.fontStyle&F.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var cr=a;function lr(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>rr(e,t,n),codeToTokens:(t,n)=>tr(e,t,n)},i=cr(rr(e,t,n,r));for(let e of jn(n))i=e.postprocess?.call(r,i,n)||i;return i}var ur={light:`#333333`,dark:`#bbbbbb`},dr={light:`#fffffe`,dark:`#1e1e1e`},fr=`__shiki_resolved`;function pr(e){if(e?.[fr])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?ur.light:ur.dark,n||=t.type===`light`?dr.light:dr.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,fr,{enumerable:!1,writable:!1,value:!0}),t}async function mr(e){return Array.from(new Set((await Promise.all(e.filter(e=>!sn(e)).map(async e=>await an(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function hr(e){return(await Promise.all(e.map(async e=>ln(e)?null:pr(await an(e))))).filter(e=>!!e)}var gr=3;function _r(e,t=3){gr&&(typeof gr==`number`&&t>gr||`${e}`)}var vr=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function yr(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new vr(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var br=class extends $t{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),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){let t=pr(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Pe.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=yr(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new vr(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return 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);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},xr=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}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(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Sr=0;function Cr(e){Sr+=1,e.warnings!==!1&&Sr>=10&&Sr%10==0&&console.warn(`[Shiki] ${Sr} 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 t=!1;if(!e.engine)throw new vr("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(pr),i=new br(new xr(e.engine,n),r,n,e.langAlias),a;function o(t){return yr(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new vr(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new vr(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await mr(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await hr(e))}function g(){if(t)throw new vr(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Sr)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function wr(e){e.engine||_r("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([hr(e.themes||[]),mr(e.langs||[]),e.engine]);return Cr({...e,themes:t,langs:n,engine:r})}async function Tr(e){let t=await wr(e);return{getLastGrammarState:(...e)=>Gn(t,...e),codeToTokensBase:(e,n)=>Wn(t,e,n),codeToTokensWithThemes:(e,n)=>$n(t,e,n),codeToTokens:(e,n)=>tr(t,e,n),codeToHast:(e,n)=>rr(t,e,n),codeToHtml:(e,n)=>lr(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Er(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,sn(n))return[];let r=t[n];if(!r)throw new P(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(ln(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new P(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await Tr({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Dr(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function Or(e,t){let n=Dr(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}function kr(e={}){let{name:t=`css-variables`,variablePrefix:n=`--shiki-`,fontStyle:r=!0}=e,i=t=>e.variableDefaults?.[t]?`var(${n}${t}, ${e.variableDefaults[t]})`:`var(${n}${t})`,a={name:t,type:`dark`,colors:{"editor.foreground":i(`foreground`),"editor.background":i(`background`),"terminal.ansiBlack":i(`ansi-black`),"terminal.ansiRed":i(`ansi-red`),"terminal.ansiGreen":i(`ansi-green`),"terminal.ansiYellow":i(`ansi-yellow`),"terminal.ansiBlue":i(`ansi-blue`),"terminal.ansiMagenta":i(`ansi-magenta`),"terminal.ansiCyan":i(`ansi-cyan`),"terminal.ansiWhite":i(`ansi-white`),"terminal.ansiBrightBlack":i(`ansi-bright-black`),"terminal.ansiBrightRed":i(`ansi-bright-red`),"terminal.ansiBrightGreen":i(`ansi-bright-green`),"terminal.ansiBrightYellow":i(`ansi-bright-yellow`),"terminal.ansiBrightBlue":i(`ansi-bright-blue`),"terminal.ansiBrightMagenta":i(`ansi-bright-magenta`),"terminal.ansiBrightCyan":i(`ansi-bright-cyan`),"terminal.ansiBrightWhite":i(`ansi-bright-white`)},tokenColors:[{scope:[`keyword.operator.accessor`,`meta.group.braces.round.function.arguments`,`meta.template.expression`,`markup.fenced_code meta.embedded.block`],settings:{foreground:i(`foreground`)}},{scope:`emphasis`,settings:{fontStyle:`italic`}},{scope:[`strong`,`markup.heading.markdown`,`markup.bold.markdown`],settings:{fontStyle:`bold`}},{scope:[`markup.italic.markdown`],settings:{fontStyle:`italic`}},{scope:`meta.link.inline.markdown`,settings:{fontStyle:`underline`,foreground:i(`token-link`)}},{scope:[`string`,`markup.fenced_code`,`markup.inline`],settings:{foreground:i(`token-string`)}},{scope:[`comment`,`string.quoted.docstring.multi`],settings:{foreground:i(`token-comment`)}},{scope:[`constant.numeric`,`constant.language`,`constant.other.placeholder`,`constant.character.format.placeholder`,`variable.language.this`,`variable.other.object`,`variable.other.class`,`variable.other.constant`,`meta.property-name`,`meta.property-value`,`support`],settings:{foreground:i(`token-constant`)}},{scope:[`keyword`,`storage.modifier`,`storage.type`,`storage.control.clojure`,`entity.name.function.clojure`,`entity.name.tag.yaml`,`support.function.node`,`support.type.property-name.json`,`punctuation.separator.key-value`,`punctuation.definition.template-expression`],settings:{foreground:i(`token-keyword`)}},{scope:`variable.parameter.function`,settings:{foreground:i(`token-parameter`)}},{scope:[`support.function`,`entity.name.type`,`entity.other.inherited-class`,`meta.function-call`,`meta.instance.constructor`,`entity.other.attribute-name`,`entity.name.function`,`constant.keyword.clojure`],settings:{foreground:i(`token-function`)}},{scope:[`entity.name.tag`,`string.quoted`,`string.regexp`,`string.interpolated`,`string.template`,`string.unquoted.plain.out.yaml`,`keyword.other.template`],settings:{foreground:i(`token-string-expression`)}},{scope:[`punctuation.definition.arguments`,`punctuation.definition.dict`,`punctuation.separator`,`meta.function-call.arguments`],settings:{foreground:i(`token-punctuation`)}},{scope:[`markup.underline.link`,`punctuation.definition.metadata.markdown`],settings:{foreground:i(`token-link`)}},{scope:[`beginning.punctuation.definition.list.markdown`],settings:{foreground:i(`token-string`)}},{scope:[`punctuation.definition.string.begin.markdown`,`punctuation.definition.string.end.markdown`,`string.other.link.title.markdown`,`string.other.link.description.markdown`],settings:{foreground:i(`token-keyword`)}},{scope:[`markup.inserted`,`meta.diff.header.to-file`,`punctuation.definition.inserted`],settings:{foreground:i(`token-inserted`)}},{scope:[`markup.deleted`,`meta.diff.header.from-file`,`punctuation.definition.deleted`],settings:{foreground:i(`token-deleted`)}},{scope:[`markup.changed`,`punctuation.definition.changed`],settings:{foreground:i(`token-changed`)}}]};return r||(a.tokenColors=a.tokenColors?.map(e=>(e.settings?.fontStyle&&delete e.settings.fontStyle,e))),a}var Ar=[{id:`abap`,name:`ABAP`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.yi),__vite__mapDeps([0,1])))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.vi),__vite__mapDeps([0,1])))},{id:`ada`,name:`Ada`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e._i),__vite__mapDeps([0,1])))},{id:`angular-html`,name:`Angular HTML`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.pi),__vite__mapDeps([0,1])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.di),__vite__mapDeps([0,1])))},{id:`apache`,name:`Apache Conf`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ui),__vite__mapDeps([0,1])))},{id:`apex`,name:`Apex`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.li),__vite__mapDeps([0,1])))},{id:`apl`,name:`APL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ai),__vite__mapDeps([0,1])))},{id:`applescript`,name:`AppleScript`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ii),__vite__mapDeps([0,1])))},{id:`ara`,name:`Ara`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ri),__vite__mapDeps([0,1])))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ni),__vite__mapDeps([0,1])))},{id:`asm`,name:`Assembly`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ti),__vite__mapDeps([0,1])))},{id:`astro`,name:`Astro`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Zr),__vite__mapDeps([0,1])))},{id:`awk`,name:`AWK`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Xr),__vite__mapDeps([0,1])))},{id:`ballerina`,name:`Ballerina`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Yr),__vite__mapDeps([0,1])))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Jr),__vite__mapDeps([0,1])))},{id:`beancount`,name:`Beancount`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.qr),__vite__mapDeps([0,1])))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Kr),__vite__mapDeps([0,1])))},{id:`bibtex`,name:`BibTeX`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Gr),__vite__mapDeps([0,1])))},{id:`bicep`,name:`Bicep`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Wr),__vite__mapDeps([0,1])))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ur),__vite__mapDeps([0,1])))},{id:`blade`,name:`Blade`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Br),__vite__mapDeps([0,1])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Rr),__vite__mapDeps([0,1])))},{id:`c`,name:`C`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Lr),__vite__mapDeps([0,1])))},{id:`c3`,name:`C3`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ir),__vite__mapDeps([0,1])))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Fr),__vite__mapDeps([0,1])))},{id:`cairo`,name:`Cairo`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Nr),__vite__mapDeps([0,1])))},{id:`clarity`,name:`Clarity`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Mr),__vite__mapDeps([0,1])))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.jr),__vite__mapDeps([0,1])))},{id:`cmake`,name:`CMake`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ar),__vite__mapDeps([0,1])))},{id:`cobol`,name:`COBOL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.kr),__vite__mapDeps([0,1])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Or),__vite__mapDeps([0,1])))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Dr),__vite__mapDeps([0,1])))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Er),__vite__mapDeps([0,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Tr),__vite__mapDeps([0,1])))},{id:`coq`,name:`Coq`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.wr),__vite__mapDeps([0,1])))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.xr),__vite__mapDeps([0,1])))},{id:`crystal`,name:`Crystal`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.yr),__vite__mapDeps([0,1])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.vr),__vite__mapDeps([0,1])))},{id:`css`,name:`CSS`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.hi),__vite__mapDeps([0,1])))},{id:`csv`,name:`CSV`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e._r),__vite__mapDeps([0,1])))},{id:`cue`,name:`CUE`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.gr),__vite__mapDeps([0,1])))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.hr),__vite__mapDeps([0,1])))},{id:`d`,name:`D`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.mr),__vite__mapDeps([0,1])))},{id:`dart`,name:`Dart`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.pr),__vite__mapDeps([0,1])))},{id:`dax`,name:`DAX`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.fr),__vite__mapDeps([0,1])))},{id:`desktop`,name:`Desktop`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.dr),__vite__mapDeps([0,1])))},{id:`diff`,name:`Diff`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ur),__vite__mapDeps([0,1])))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.lr),__vite__mapDeps([0,1])))},{id:`dotenv`,name:`dotEnv`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.cr),__vite__mapDeps([0,1])))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.sr),__vite__mapDeps([0,1])))},{id:`edge`,name:`Edge`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.or),__vite__mapDeps([0,1])))},{id:`elixir`,name:`Elixir`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ar),__vite__mapDeps([0,1])))},{id:`elm`,name:`Elm`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ir),__vite__mapDeps([0,1])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.rr),__vite__mapDeps([0,1])))},{id:`erb`,name:`ERB`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Xn),__vite__mapDeps([0,1])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Jn),__vite__mapDeps([0,1])))},{id:`fennel`,name:`Fennel`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.qn),__vite__mapDeps([0,1])))},{id:`fish`,name:`Fish`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Kn),__vite__mapDeps([0,1])))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Gn),__vite__mapDeps([0,1])))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Un),__vite__mapDeps([0,1])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Wn),__vite__mapDeps([0,1])))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Hn),__vite__mapDeps([0,1])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.zn),__vite__mapDeps([0,1])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Bn),__vite__mapDeps([0,1])))},{id:`gdshader`,name:`GDShader`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Vn),__vite__mapDeps([0,1])))},{id:`genie`,name:`Genie`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Rn),__vite__mapDeps([0,1])))},{id:`gherkin`,name:`Gherkin`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ln),__vite__mapDeps([0,1])))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.In),__vite__mapDeps([0,1])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Fn),__vite__mapDeps([0,1])))},{id:`gleam`,name:`Gleam`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Pn),__vite__mapDeps([0,1])))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Nn),__vite__mapDeps([0,1])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Mn),__vite__mapDeps([0,1])))},{id:`glsl`,name:`GLSL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Sr),__vite__mapDeps([0,1])))},{id:`gn`,name:`GN`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.jn),__vite__mapDeps([0,1])))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.An),__vite__mapDeps([0,1])))},{id:`go`,name:`Go`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.kn),__vite__mapDeps([0,1])))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.er),__vite__mapDeps([0,1])))},{id:`groovy`,name:`Groovy`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.On),__vite__mapDeps([0,1])))},{id:`hack`,name:`Hack`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Dn),__vite__mapDeps([0,1])))},{id:`haml`,name:`Ruby Haml`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.nr),__vite__mapDeps([0,1])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.En),__vite__mapDeps([0,1])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Tn),__vite__mapDeps([0,1])))},{id:`haxe`,name:`Haxe`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.wn),__vite__mapDeps([0,1])))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Cn),__vite__mapDeps([0,1])))},{id:`hjson`,name:`Hjson`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Sn),__vite__mapDeps([0,1])))},{id:`hlsl`,name:`HLSL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.xn),__vite__mapDeps([0,1])))},{id:`html`,name:`HTML`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.mi),__vite__mapDeps([0,1])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Hr),__vite__mapDeps([0,1])))},{id:`http`,name:`HTTP`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.bn),__vite__mapDeps([0,1])))},{id:`hurl`,name:`Hurl`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.yn),__vite__mapDeps([0,1])))},{id:`hxml`,name:`HXML`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.vn),__vite__mapDeps([0,1])))},{id:`hy`,name:`Hy`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e._n),__vite__mapDeps([0,1])))},{id:`imba`,name:`Imba`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.gn),__vite__mapDeps([0,1])))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.hn),__vite__mapDeps([0,1])))},{id:`java`,name:`Java`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ci),__vite__mapDeps([0,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.gi),__vite__mapDeps([0,1])))},{id:`jinja`,name:`Jinja`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.mn),__vite__mapDeps([0,1])))},{id:`jison`,name:`Jison`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.pn),__vite__mapDeps([0,1])))},{id:`json`,name:`JSON`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.oi),__vite__mapDeps([0,1])))},{id:`json5`,name:`JSON5`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.fn),__vite__mapDeps([0,1])))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.dn),__vite__mapDeps([0,1])))},{id:`jsonl`,name:`JSON Lines`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.un),__vite__mapDeps([0,1])))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ln),__vite__mapDeps([0,1])))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.cn),__vite__mapDeps([0,1])))},{id:`jsx`,name:`JSX`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.tr),__vite__mapDeps([0,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.on),__vite__mapDeps([0,1])))},{id:`just`,name:`Just`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.in),__vite__mapDeps([0,1])))},{id:`kdl`,name:`KDL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.rn),__vite__mapDeps([0,1])))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.nn),__vite__mapDeps([0,1])))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.tn),__vite__mapDeps([0,1])))},{id:`latex`,name:`LaTeX`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.$t),__vite__mapDeps([0,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Qt),__vite__mapDeps([0,1])))},{id:`less`,name:`Less`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Zt),__vite__mapDeps([0,1])))},{id:`liquid`,name:`Liquid`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Xt),__vite__mapDeps([0,1])))},{id:`llvm`,name:`LLVM IR`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Yt),__vite__mapDeps([0,1])))},{id:`log`,name:`Log file`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Jt),__vite__mapDeps([0,1])))},{id:`logo`,name:`Logo`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.qt),__vite__mapDeps([0,1])))},{id:`lua`,name:`Lua`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.$n),__vite__mapDeps([0,1])))},{id:`luau`,name:`Luau`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Kt),__vite__mapDeps([0,1])))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Gt),__vite__mapDeps([0,1])))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Yn),__vite__mapDeps([0,1])))},{id:`marko`,name:`Marko`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Wt),__vite__mapDeps([0,1])))},{id:`matlab`,name:`MATLAB`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ut),__vite__mapDeps([0,1])))},{id:`mdc`,name:`MDC`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ht),__vite__mapDeps([0,1])))},{id:`mdx`,name:`MDX`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Vt),__vite__mapDeps([0,1])))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Bt),__vite__mapDeps([0,1])))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.zt),__vite__mapDeps([0,1])))},{id:`mojo`,name:`Mojo`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Rt),__vite__mapDeps([0,1])))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Lt),__vite__mapDeps([0,1])))},{id:`move`,name:`Move`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.It),__vite__mapDeps([0,1])))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ft),__vite__mapDeps([0,1])))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Nt),__vite__mapDeps([0,1])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Pt),__vite__mapDeps([0,1])))},{id:`nginx`,name:`Nginx`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Mt),__vite__mapDeps([0,1])))},{id:`nim`,name:`Nim`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.jt),__vite__mapDeps([0,1])))},{id:`nix`,name:`Nix`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.At),__vite__mapDeps([0,1])))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.kt),__vite__mapDeps([0,1])))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ot),__vite__mapDeps([0,1])))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Dt),__vite__mapDeps([0,1])))},{id:`ocaml`,name:`OCaml`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Et),__vite__mapDeps([0,1])))},{id:`odin`,name:`Odin`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Tt),__vite__mapDeps([0,1])))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.wt),__vite__mapDeps([0,1])))},{id:`pascal`,name:`Pascal`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Ct),__vite__mapDeps([0,1])))},{id:`perl`,name:`Perl`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.an),__vite__mapDeps([0,1])))},{id:`php`,name:`PHP`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.St),__vite__mapDeps([0,1])))},{id:`pkl`,name:`Pkl`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.xt),__vite__mapDeps([0,1])))},{id:`plsql`,name:`PL/SQL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.bt),__vite__mapDeps([0,1])))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.yt),__vite__mapDeps([0,1])))},{id:`polar`,name:`Polar`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.vt),__vite__mapDeps([0,1])))},{id:`postcss`,name:`PostCSS`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.$r),__vite__mapDeps([0,1])))},{id:`powerquery`,name:`PowerQuery`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e._t),__vite__mapDeps([0,1])))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.gt),__vite__mapDeps([0,1])))},{id:`prisma`,name:`Prisma`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ht),__vite__mapDeps([0,1])))},{id:`prolog`,name:`Prolog`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.mt),__vite__mapDeps([0,1])))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.pt),__vite__mapDeps([0,1])))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ft),__vite__mapDeps([0,1])))},{id:`puppet`,name:`Puppet`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.dt),__vite__mapDeps([0,1])))},{id:`purescript`,name:`PureScript`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ut),__vite__mapDeps([0,1])))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Pr),__vite__mapDeps([0,1])))},{id:`qml`,name:`QML`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.lt),__vite__mapDeps([0,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ct),__vite__mapDeps([0,1])))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.st),__vite__mapDeps([0,1])))},{id:`r`,name:`R`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.sn),__vite__mapDeps([0,1])))},{id:`racket`,name:`Racket`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ot),__vite__mapDeps([0,1])))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.at),__vite__mapDeps([0,1])))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.it),__vite__mapDeps([0,1])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.rt),__vite__mapDeps([0,1])))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Cr),__vite__mapDeps([0,1])))},{id:`rel`,name:`Rel`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.nt),__vite__mapDeps([0,1])))},{id:`riscv`,name:`RISC-V`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.tt),__vite__mapDeps([0,1])))},{id:`ron`,name:`RON`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.et),__vite__mapDeps([0,1])))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.$),__vite__mapDeps([0,1])))},{id:`rst`,name:`reStructuredText`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Q),__vite__mapDeps([0,1])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Zn),__vite__mapDeps([0,1])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Z),__vite__mapDeps([0,1])))},{id:`sas`,name:`SAS`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.X),__vite__mapDeps([0,1])))},{id:`sass`,name:`Sass`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Y),__vite__mapDeps([0,1])))},{id:`scala`,name:`Scala`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.J),__vite__mapDeps([0,1])))},{id:`scheme`,name:`Scheme`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.q),__vite__mapDeps([0,1])))},{id:`scss`,name:`SCSS`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.fi),__vite__mapDeps([0,1])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.zr),__vite__mapDeps([0,1])))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.K),__vite__mapDeps([0,1])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.br),__vite__mapDeps([0,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.G),__vite__mapDeps([0,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.W),__vite__mapDeps([0,1])))},{id:`solidity`,name:`Solidity`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.U),__vite__mapDeps([0,1])))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.H),__vite__mapDeps([0,1])))},{id:`sparql`,name:`SPARQL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.B),__vite__mapDeps([0,1])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.z),__vite__mapDeps([0,1])))},{id:`sql`,name:`SQL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Vr),__vite__mapDeps([0,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.R),__vite__mapDeps([0,1])))},{id:`stata`,name:`Stata`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.L),__vite__mapDeps([0,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.I),__vite__mapDeps([0,1])))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.F),__vite__mapDeps([0,1])))},{id:`svelte`,name:`Svelte`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.P),__vite__mapDeps([0,1])))},{id:`swift`,name:`Swift`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.N),__vite__mapDeps([0,1])))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.M),__vite__mapDeps([0,1])))},{id:`systemd`,name:`Systemd Units`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.j),__vite__mapDeps([0,1])))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.A),__vite__mapDeps([0,1])))},{id:`tasl`,name:`Tasl`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.k),__vite__mapDeps([0,1])))},{id:`tcl`,name:`Tcl`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.O),__vite__mapDeps([0,1])))},{id:`templ`,name:`Templ`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.D),__vite__mapDeps([0,1])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.E),__vite__mapDeps([0,1])))},{id:`tex`,name:`TeX`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.en),__vite__mapDeps([0,1])))},{id:`toml`,name:`TOML`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.T),__vite__mapDeps([0,1])))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.w),__vite__mapDeps([0,1])))},{id:`tsv`,name:`TSV`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.C),__vite__mapDeps([0,1])))},{id:`tsx`,name:`TSX`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Qr),__vite__mapDeps([0,1])))},{id:`turtle`,name:`Turtle`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.V),__vite__mapDeps([0,1])))},{id:`twig`,name:`Twig`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.S),__vite__mapDeps([0,1])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.ei),__vite__mapDeps([0,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.x),__vite__mapDeps([0,1])))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.b),__vite__mapDeps([0,1])))},{id:`v`,name:`V`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.y),__vite__mapDeps([0,1])))},{id:`vala`,name:`Vala`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.v),__vite__mapDeps([0,1])))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e._),__vite__mapDeps([0,1])))},{id:`verilog`,name:`Verilog`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.g),__vite__mapDeps([0,1])))},{id:`vhdl`,name:`VHDL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.h),__vite__mapDeps([0,1])))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.m),__vite__mapDeps([0,1])))},{id:`vue`,name:`Vue`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.d),__vite__mapDeps([0,1])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.p),__vite__mapDeps([0,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.f),__vite__mapDeps([0,1])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.u),__vite__mapDeps([0,1])))},{id:`wasm`,name:`WebAssembly`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.l),__vite__mapDeps([0,1])))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.c),__vite__mapDeps([0,1])))},{id:`wgsl`,name:`WGSL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.s),__vite__mapDeps([0,1])))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.o),__vite__mapDeps([0,1])))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.a),__vite__mapDeps([0,1])))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.i),__vite__mapDeps([0,1])))},{id:`xml`,name:`XML`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.si),__vite__mapDeps([0,1])))},{id:`xsl`,name:`XSL`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.r),__vite__mapDeps([0,1])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.Qn),__vite__mapDeps([0,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.n),__vite__mapDeps([0,1])))},{id:`zig`,name:`Zig`,import:(()=>i(()=>import(`./vendor-shikijs-langs-eloENL-7.js`).then(e=>e.t),__vite__mapDeps([0,1])))}],jr=Object.fromEntries(Ar.map(e=>[e.id,e.import])),Mr=Object.fromEntries(Ar.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Nr={...jr,...Mr},Pr=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.dt),__vite__mapDeps([2,1])))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.ut),__vite__mapDeps([2,1])))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.lt),__vite__mapDeps([2,1])))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.ct),__vite__mapDeps([2,1])))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.st),__vite__mapDeps([2,1])))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.ot),__vite__mapDeps([2,1])))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.at),__vite__mapDeps([2,1])))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.it),__vite__mapDeps([2,1])))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.rt),__vite__mapDeps([2,1])))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.nt),__vite__mapDeps([2,1])))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.et),__vite__mapDeps([2,1])))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.tt),__vite__mapDeps([2,1])))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.$),__vite__mapDeps([2,1])))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.Q),__vite__mapDeps([2,1])))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.J),__vite__mapDeps([2,1])))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.Z),__vite__mapDeps([2,1])))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.X),__vite__mapDeps([2,1])))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.Y),__vite__mapDeps([2,1])))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.G),__vite__mapDeps([2,1])))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.q),__vite__mapDeps([2,1])))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.K),__vite__mapDeps([2,1])))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.W),__vite__mapDeps([2,1])))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.U),__vite__mapDeps([2,1])))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.H),__vite__mapDeps([2,1])))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.V),__vite__mapDeps([2,1])))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.B),__vite__mapDeps([2,1])))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.z),__vite__mapDeps([2,1])))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.L),__vite__mapDeps([2,1])))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.R),__vite__mapDeps([2,1])))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.I),__vite__mapDeps([2,1])))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.F),__vite__mapDeps([2,1])))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.P),__vite__mapDeps([2,1])))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.N),__vite__mapDeps([2,1])))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.M),__vite__mapDeps([2,1])))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.j),__vite__mapDeps([2,1])))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.E),__vite__mapDeps([2,1])))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.A),__vite__mapDeps([2,1])))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.k),__vite__mapDeps([2,1])))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.O),__vite__mapDeps([2,1])))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.D),__vite__mapDeps([2,1])))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.T),__vite__mapDeps([2,1])))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.w),__vite__mapDeps([2,1])))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.C),__vite__mapDeps([2,1])))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.x),__vite__mapDeps([2,1])))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.S),__vite__mapDeps([2,1])))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.b),__vite__mapDeps([2,1])))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.y),__vite__mapDeps([2,1])))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.v),__vite__mapDeps([2,1])))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e._),__vite__mapDeps([2,1])))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.g),__vite__mapDeps([2,1])))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.h),__vite__mapDeps([2,1])))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.f),__vite__mapDeps([2,1])))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.m),__vite__mapDeps([2,1])))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.p),__vite__mapDeps([2,1])))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.d),__vite__mapDeps([2,1])))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.u),__vite__mapDeps([2,1])))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.l),__vite__mapDeps([2,1])))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.c),__vite__mapDeps([2,1])))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.s),__vite__mapDeps([2,1])))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.o),__vite__mapDeps([2,1])))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.a),__vite__mapDeps([2,1])))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.i),__vite__mapDeps([2,1])))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.r),__vite__mapDeps([2,1])))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.n),__vite__mapDeps([2,1])))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.t),__vite__mapDeps([2,1])))}].map(e=>[e.id,e.import])),Fr=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Ir(){return 2147483648}function Lr(){return typeof performance<`u`?performance.now():Date.now()}var Rr=(e,t)=>e+(t-e%t)%t;async function zr(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Ir();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Rr(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Lr,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Br=Object.defineProperty,Vr=(e,t,n)=>t in e?Br(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I=(e,t,n)=>Vr(e,typeof t==`symbol`?t:t+``,n),L=null;function Hr(e){throw new Fr(e.UTF8ToString(e.getLastOnigError()))}var Ur=class e{constructor(t){I(this,`utf16Length`),I(this,`utf8Length`),I(this,`utf16Value`),I(this,`utf8Value`),I(this,`utf16OffsetToUtf8`),I(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Wr=class e{constructor(t){if(I(this,`id`,++e.LAST_ID),I(this,`_onigBinding`),I(this,`content`),I(this,`utf16Length`),I(this,`utf8Length`),I(this,`utf16OffsetToUtf8`),I(this,`utf8OffsetToUtf16`),I(this,`ptr`),!L)throw new Fr(`Must invoke loadWasm first.`);this._onigBinding=L,this.content=t;let n=new Ur(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=L.omalloc(1e4),e._sharedPtrInUse=!0,L.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(L)}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===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};I(Wr,`LAST_ID`,0),I(Wr,`_sharedPtr`,0),I(Wr,`_sharedPtrInUse`,!1);var Gr=Wr,Kr=class{constructor(e){if(I(this,`_onigBinding`),I(this,`_ptr`),!L)throw new Fr(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Ur(e[r]);t[r]=i.createString(L),n[r]=i.utf8Length}let r=L.omalloc(4*e.length);L.HEAPU32.set(t,r/4);let i=L.omalloc(4*e.length);L.HEAPU32.set(n,i/4);let a=L.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)L.ofree(t[n]);L.ofree(i),L.ofree(r),a===0&&Hr(L),this._onigBinding=L,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Gr(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function qr(e){return typeof e.instantiator==`function`}function Jr(e){return typeof e.default==`function`}function Yr(e){return e.data!==void 0}function Xr(e){return typeof Response<`u`&&e instanceof Response}function Zr(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Qr;function $r(e){if(Qr)return Qr;async function t(){L=await zr(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),qr(n)?n=await n.instantiator(t):Jr(n)?n=await n.default(t):(Yr(n)&&(n=n.data),Xr(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await ti(n)(t):await ni(n)(t):Zr(n)||n instanceof WebAssembly.Module?n=await ei(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await ei(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Qr=t(),Qr}function ei(e){return t=>WebAssembly.instantiate(e,t)}function ti(e){return t=>WebAssembly.instantiateStreaming(e,t)}function ni(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function ri(e){return e&&await $r(e),{createScanner(e){return new Kr(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Gr(e)}}}var ii=Er({langs:Nr,themes:Pr,engine:()=>ri(i(()=>import(`./vendor-shiki-DzFPeSWm.js`).then(e=>e.t),__vite__mapDeps([3,1])))}),{codeToHtml:ai,codeToHast:oi,codeToTokens:si,codeToTokensBase:ci,codeToTokensWithThemes:li,getSingletonHighlighter:ui,getLastGrammarState:di}=Or(ii,{guessEmbeddedLanguages:pn}),fi=4294967295,pi=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:fi,end:fi,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function mi(e,t){return o(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function hi(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>mi(e,{target:t.target}),{createScanner(e){return new pi(e,t)},createString(e){return{content:e}}}}async function gi(e){if(be())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=me.get(e);if(t!=null)return t;try{let t=he.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(Nr,e)&&(t=Nr[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return pe.has(e)||pe.set(e,n),n});return me.set(e,n),await n}finally{me.delete(e)}}function _i(e){return pe.get(e)??gi(e)}function vi(e=j){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}var yi=new Set;function bi(e){for(let t of vi(e))if(!yi.has(t))return!1;return!0}function xi(e){let t=[],n=new Set;for(let r of Si(e.themes)){let e=Ti(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return xi({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return xi({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function Si(e){return Ci(e)?[e]:e}function Ci(e){return Ti(e)||wi(e)}function wi(e){return typeof e.name==`string`&&typeof e.load==`function`}function Ti(e){return typeof e.getThemes==`function`}function Ei(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Di=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},Oi=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},ki=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function Ai(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Di(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new Oi(i));let c=r,l=s().then(e=>{let a=Ei(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new ki(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var ji=Ai();function Mi(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=ji.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,ji.getResolvedTheme(n)??ji.seedResolvedTheme(n,e);yi.has(n)||(yi.add(n),t.loadThemeSync(e))}}function Ni(){ji.clearResolvedThemes(),yi.clear()}function Pi({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:Fi(t)}}function Fi(e){return async()=>pr(Ei(await e()))}var Ii=`pierre`,Li=[`pierre-dark`,`pierre-dark-soft`,`pierre-dark-vibrant`,`pierre-dark-protanopia-deuteranopia`,`pierre-dark-tritanopia`],Ri=[`pierre-light`,`pierre-light-soft`,`pierre-light-vibrant`,`pierre-light-protanopia-deuteranopia`,`pierre-light-tritanopia`],zi=[...Ri,...Li],Bi=new Set(Ri);function Vi(e){return Bi.has(e)?`light`:`dark`}var Hi={"pierre-dark":`Pierre Dark`,"pierre-dark-soft":`Pierre Dark Soft`,"pierre-dark-vibrant":`Pierre Dark Vibrant`,"pierre-dark-protanopia-deuteranopia":`Pierre Dark Protanopia & Deuteranopia`,"pierre-dark-tritanopia":`Pierre Dark Tritanopia`,"pierre-light":`Pierre Light`,"pierre-light-soft":`Pierre Light Soft`,"pierre-light-vibrant":`Pierre Light Vibrant`,"pierre-light-protanopia-deuteranopia":`Pierre Light Protanopia & Deuteranopia`,"pierre-light-tritanopia":`Pierre Light Tritanopia`},Ui={"pierre-dark":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.o),__vite__mapDeps([4,1])),"pierre-dark-soft":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.l),__vite__mapDeps([4,1])),"pierre-dark-vibrant":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.s),__vite__mapDeps([4,1])),"pierre-dark-protanopia-deuteranopia":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.u),__vite__mapDeps([4,1])),"pierre-dark-tritanopia":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.c),__vite__mapDeps([4,1])),"pierre-light":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.t),__vite__mapDeps([4,1])),"pierre-light-soft":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.i),__vite__mapDeps([4,1])),"pierre-light-vibrant":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.n),__vite__mapDeps([4,1])),"pierre-light-protanopia-deuteranopia":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.a),__vite__mapDeps([4,1])),"pierre-light-tritanopia":()=>i(()=>import(`./vendor-pierre-theme-D9JzKBPc.js`).then(e=>e.r),__vite__mapDeps([4,1]))};function Wi(e){return Pi({name:e,collection:Ii,colorScheme:Vi(e),displayName:Hi[e],load:Ui[e]})}var Gi=xi({themes:zi.map(e=>Wi(e))}),Ki=`shiki`,qi=[`ayu-light`,`catppuccin-latte`,`everforest-light`,`github-light`,`github-light-default`,`github-light-high-contrast`,`gruvbox-light-hard`,`gruvbox-light-medium`,`gruvbox-light-soft`,`horizon-bright`,`kanagawa-lotus`,`light-plus`,`material-theme-lighter`,`min-light`,`night-owl-light`,`one-light`,`rose-pine-dawn`,`slack-ochin`,`snazzy-light`,`solarized-light`,`vitesse-light`],Ji=`andromeeda.aurora-x.ayu-dark.ayu-mirage.catppuccin-frappe.catppuccin-macchiato.catppuccin-mocha.dark-plus.dracula.dracula-soft.everforest-dark.github-dark.github-dark-default.github-dark-dimmed.github-dark-high-contrast.gruvbox-dark-hard.gruvbox-dark-medium.gruvbox-dark-soft.horizon.houston.kanagawa-dragon.kanagawa-wave.laserwave.material-theme.material-theme-darker.material-theme-ocean.material-theme-palenight.min-dark.monokai.night-owl.nord.one-dark-pro.plastic.poimandres.red.rose-pine.rose-pine-moon.slack-dark.solarized-dark.synthwave-84.tokyo-night.vesper.vitesse-black.vitesse-dark`.split(`.`),Yi=new Set(qi);function Xi(e){return Yi.has(e)?`light`:`dark`}var Zi={andromeeda:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.dt),__vite__mapDeps([2,1])),"aurora-x":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.ut),__vite__mapDeps([2,1])),"ayu-dark":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.lt),__vite__mapDeps([2,1])),"ayu-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.ct),__vite__mapDeps([2,1])),"ayu-mirage":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.st),__vite__mapDeps([2,1])),"catppuccin-frappe":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.ot),__vite__mapDeps([2,1])),"catppuccin-latte":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.at),__vite__mapDeps([2,1])),"catppuccin-macchiato":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.it),__vite__mapDeps([2,1])),"catppuccin-mocha":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.rt),__vite__mapDeps([2,1])),"dark-plus":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.nt),__vite__mapDeps([2,1])),dracula:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.et),__vite__mapDeps([2,1])),"dracula-soft":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.tt),__vite__mapDeps([2,1])),"everforest-dark":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.$),__vite__mapDeps([2,1])),"everforest-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.Q),__vite__mapDeps([2,1])),"github-dark":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.J),__vite__mapDeps([2,1])),"github-dark-default":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.Z),__vite__mapDeps([2,1])),"github-dark-dimmed":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.X),__vite__mapDeps([2,1])),"github-dark-high-contrast":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.Y),__vite__mapDeps([2,1])),"github-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.G),__vite__mapDeps([2,1])),"github-light-default":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.q),__vite__mapDeps([2,1])),"github-light-high-contrast":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.K),__vite__mapDeps([2,1])),"gruvbox-dark-hard":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.W),__vite__mapDeps([2,1])),"gruvbox-dark-medium":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.U),__vite__mapDeps([2,1])),"gruvbox-dark-soft":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.H),__vite__mapDeps([2,1])),"gruvbox-light-hard":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.V),__vite__mapDeps([2,1])),"gruvbox-light-medium":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.B),__vite__mapDeps([2,1])),"gruvbox-light-soft":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.z),__vite__mapDeps([2,1])),horizon:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.L),__vite__mapDeps([2,1])),"horizon-bright":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.R),__vite__mapDeps([2,1])),houston:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.I),__vite__mapDeps([2,1])),"kanagawa-dragon":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.F),__vite__mapDeps([2,1])),"kanagawa-lotus":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.P),__vite__mapDeps([2,1])),"kanagawa-wave":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.N),__vite__mapDeps([2,1])),laserwave:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.M),__vite__mapDeps([2,1])),"light-plus":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.j),__vite__mapDeps([2,1])),"material-theme":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.E),__vite__mapDeps([2,1])),"material-theme-darker":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.A),__vite__mapDeps([2,1])),"material-theme-lighter":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.k),__vite__mapDeps([2,1])),"material-theme-ocean":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.O),__vite__mapDeps([2,1])),"material-theme-palenight":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.D),__vite__mapDeps([2,1])),"min-dark":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.T),__vite__mapDeps([2,1])),"min-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.w),__vite__mapDeps([2,1])),monokai:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.C),__vite__mapDeps([2,1])),"night-owl":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.x),__vite__mapDeps([2,1])),"night-owl-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.S),__vite__mapDeps([2,1])),nord:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.b),__vite__mapDeps([2,1])),"one-dark-pro":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.y),__vite__mapDeps([2,1])),"one-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.v),__vite__mapDeps([2,1])),plastic:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e._),__vite__mapDeps([2,1])),poimandres:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.g),__vite__mapDeps([2,1])),red:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.h),__vite__mapDeps([2,1])),"rose-pine":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.f),__vite__mapDeps([2,1])),"rose-pine-dawn":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.m),__vite__mapDeps([2,1])),"rose-pine-moon":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.p),__vite__mapDeps([2,1])),"slack-dark":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.d),__vite__mapDeps([2,1])),"slack-ochin":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.u),__vite__mapDeps([2,1])),"snazzy-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.l),__vite__mapDeps([2,1])),"solarized-dark":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.c),__vite__mapDeps([2,1])),"solarized-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.s),__vite__mapDeps([2,1])),"synthwave-84":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.o),__vite__mapDeps([2,1])),"tokyo-night":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.a),__vite__mapDeps([2,1])),vesper:()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.i),__vite__mapDeps([2,1])),"vitesse-black":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.r),__vite__mapDeps([2,1])),"vitesse-dark":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.n),__vite__mapDeps([2,1])),"vitesse-light":()=>i(()=>import(`./vendor-shikijs-themes-C7F1vBnG.js`).then(e=>e.t),__vite__mapDeps([2,1]))};function Qi(e){return Pi({name:e,collection:Ki,colorScheme:Xi(e),load:Zi[e]})}var $i=xi({themes:Object.freeze([...qi.map(e=>Qi(e)),...Ji.map(e=>Qi(e))])});function ea(e){if(be())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(ji.hasRegisteredTheme(e))return;let t=$i.getTheme(e);if(t!=null){ji.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function ta(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function na(e){ea(e);let t=await ji.resolveTheme(e);return ta(e,t),t}function ra(e){return ji.getResolvedTheme(e)??na(e)}var R;async function ia({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){R??=ii({themes:[],langs:[`text`],engine:n===`shiki-wasm`?ri(i(()=>import(`./vendor-shiki-DzFPeSWm.js`).then(e=>e.t),__vite__mapDeps([3,1]))):hi()});let r=sa(R)?await R:R;R=r;let a=[];for(let e of Array.from(new Set(t))){if(e===`text`||e===`ansi`)continue;let t=_i(e);`then`in t?a.push(t):ve(t,r)}let o=[];for(let t of e){let e=ra(t);`then`in e?o.push(e):Mi(e,R)}return(a.length>0||o.length>0)&&await Promise.all([Promise.all(a).then(e=>{ve(e,r)}),Promise.all(o).then(e=>{Mi(e,r)})]),r}function aa(e=R){return e!=null&&!(`then`in e)}function oa(e){if(!(R==null||`then`in R)&&!(e!=null&&(!bi(e.theme)||!_e(e.lang))))return R}function sa(e=R){return e!=null&&`then`in e}function ca(e=R){return e==null}async function la(e){await ia(e)}async function ua(){R!=null&&((await R).dispose(),ye(),Ni(),R=void 0)}for(let e of Gi.getThemes())ji.registerThemeIfAbsent(e.name,e.load);var da=new Set,fa=null;function z(e){da.add(e),fa??=requestAnimationFrame(ha)}function pa(e){da.delete(e)&&da.size===0&&fa!=null&&(cancelAnimationFrame(fa),fa=null)}function ma(){da.clear(),fa!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(fa),fa=null}function ha(e){let t=new Set(da);da.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}fa=da.size>0?requestAnimationFrame(ha):null}function ga(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function _a(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function va(e,t){let n=e?.theme??j,r=t?.theme??j,i=ya(e),a=ya(t);return _a(n,r)&&ga(e,t,[`theme`,`parseDiffOptions`])&&ga(i,a)}function ya(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function ba(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function xa({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:r=!1,fitPerfectlyOverscroll:i=0,overscrollSize:a}){let o=n+a*2,s=r?n+i*2:o;if(t=Math.max(t,s),o>=t||r){let n=Math.max(e-i,0),r=Math.min(e+s,t);return{top:n,bottom:Math.max(r,n)}}let c=e+n/2-o/2,l=c+o;return c<0&&(c=0),l>t&&(l=t),c=Math.floor(Math.max(c,0)),{top:c,bottom:Math.ceil(Math.max(Math.min(l,t),c))}}function Sa(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function B(e){return{type:`text`,value:e}}function V({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function Ca({name:e,width:t=16,height:n=16,properties:r}){return V({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[V({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function wa(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function Ta(e){return V({tagName:`div`,properties:{"data-gutter":``},children:e})}function Ea(e,t,n,r={}){return V({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[V({tagName:`span`,properties:{"data-line-number-content":``},children:[B(`${t}`)]})]})}function H(e,t,n){return V({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function Da(){return V({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[Ca({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}function Oa(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function ka(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}var Aa=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),pa(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||ba(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&ka(e.composedPath())||(Xa(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(Xa(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(Xa(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){Xa(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();Xa(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);Xa(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Fa(i)&&this.hoveredLine?.lineElement===i.lineElement;Pa(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Pa(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Fa(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(La(i)&&p!=null){p(i);break}if(Ia(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Fa(i))break;Pa(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,Xa(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),Xa(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),Xa(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();ka(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(Oa(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=a(Da());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);Na(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(Ba(t));if(Na(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(Na(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(Na(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&ka(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=Ba(e);if(t&&ka(n))return;let r=Va(e);return r==null?this.pathFromAnnotationSlot(e):Ba(r)}pathFromAnnotationSlot(e){let t=Ha(e)?.previousElementSibling;if(t instanceof HTMLElement&&(t.hasAttribute(`data-line`)||t.hasAttribute(`data-column-number`)))return Ba(t);let n=Wa(Ua(e));if(n==null)return;let r=this.targetForSelectionPoint(n);return r==null?void 0:Ba(r.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=Ga(t)?t:Ga(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}ba(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,z(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{pa(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!qa(this.renderedSelectedLinesState,n),i=!qa(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);Ra(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=Ya(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=Ya(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:za(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:za(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Ja(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Ja(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function ja({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Ma({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function Ma({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function Na(e){return e!=null&&`kind`in e&&e.kind===`line`}function Pa(e){return e!=null&&`kind`in e&&e.kind===`token`}function Fa(e){return Na(e)||Pa(e)}function Ia(e){return`type`in e&&e.type===`line-info`}function La(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Ra(e){return e===`current`||e===`incoming`||e===`both`}function za(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ba(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Va(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function Ha(e){let t=e.closest(`[slot^="annotation-"]`),n=(t instanceof HTMLElement&&t.assignedSlot!=null?t.assignedSlot:e.tagName===`SLOT`?e:void 0)?.closest(`[data-line-annotation]`);return n instanceof HTMLElement?n:void 0}function Ua(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function Wa(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function Ga(e){return e!=null&&typeof e.elementFromPoint==`function`}function Ka(e,t){return e===t||ba(e??void 0,t??void 0)}function qa(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&Ka(e?.range??null,t.range)}function Ja(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function Ya(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function Xa(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}[...n]}var Za=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),eo(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?ro(t):io(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:Qa(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:$a(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&to(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function Qa(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function $a(e){return Math.max(Math.ceil(e),0)}function eo(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?to(e,{codeWidthChanged:!0,numberWidthChanged:!0}):no(e))}function to(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function no(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function ro(e){e.codeElement.isConnected&&no(e)}function io(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}function ao(e){return ji.hasResolvedThemes(e)}function oo(e,t){return _a(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function so(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function co(e){return V({tagName:`div`,children:[V({tagName:`div`,children:e.annotations?.map(e=>V({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function lo(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function uo({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return V({tagName:`div`,children:[t===`custom`?V({tagName:`slot`,properties:{name:A}}):fo({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[po(r)]],properties:i})}function fo({name:e,prevName:t,iconType:n}){let r=[V({tagName:`slot`,properties:{name:D}}),Ca({name:lo(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(V({tagName:`div`,children:[V({tagName:`bdi`,children:[B(t)]})],properties:{"data-prev-name":``}})),r.push(Ca({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(V({tagName:`div`,children:[V({tagName:`bdi`,children:[B(e)]})],properties:{"data-title":``}})),r.push(V({tagName:`slot`,properties:{name:O}})),V({tagName:`div`,children:r,properties:{"data-header-content":``}})}function po(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(V({tagName:`span`,children:[B(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(V({tagName:`span`,children:[B(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(V({tagName:`slot`,properties:{name:k}})),V({tagName:`div`,children:t,properties:{"data-metadata":``}})}function mo(e){return V({tagName:`pre`,properties:ho(e)})}function ho({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}var go=new Map,_o=0,vo={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function U(e){if(go.has(e))return go.get(e)??`text`;if(vo[e]!=null)return vo[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(go.has(t[1]))return go.get(t[1])??`text`;if(vo[t[1]]!=null)return vo[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return go.has(n)?go.get(n)??`text`:vo[n]??`text`}function yo(e,t){if(e<=_o)return!1;go.clear();for(let e in t){let n=t[e];n!=null&&go.set(e,n)}return _o=e,!0}function bo(){return _o}function xo(e,t){let n=go.get(e);return n!==t&&(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),go.set(e,t),_o++,!0)}function So(){return Object.fromEntries(go)}function Co(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:vi(t),preferredHighlighter:n}}function wo(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function To(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function Eo(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(B(`