@wes-dev/pr 0.0.1

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 (318) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +82 -0
  3. package/dist/cli/index.js +154 -0
  4. package/dist/web/assets/abap-CLvhMVsD.js +1 -0
  5. package/dist/web/assets/actionscript-3--17pq3dv.js +1 -0
  6. package/dist/web/assets/ada-C5qYipkI.js +1 -0
  7. package/dist/web/assets/andromeeda-vGVdxbeo.js +1 -0
  8. package/dist/web/assets/angular-html-Dy5TOb5M.js +1 -0
  9. package/dist/web/assets/angular-ts-CQ-VvwG4.js +1 -0
  10. package/dist/web/assets/apache-U0d_L8uA.js +1 -0
  11. package/dist/web/assets/apex-VAyPSnFM.js +1 -0
  12. package/dist/web/assets/apl-DLPyOpzA.js +1 -0
  13. package/dist/web/assets/applescript-CCn79oCD.js +1 -0
  14. package/dist/web/assets/ara-4CJ0cIlV.js +1 -0
  15. package/dist/web/assets/asciidoc-DE70LPWp.js +1 -0
  16. package/dist/web/assets/asm-Cmm7eHzH.js +1 -0
  17. package/dist/web/assets/astro-Bg8eE3kY.js +1 -0
  18. package/dist/web/assets/aurora-x-CDeNXAV0.js +1 -0
  19. package/dist/web/assets/awk-BWXHIvNe.js +1 -0
  20. package/dist/web/assets/ayu-dark-DluEY0Gj.js +1 -0
  21. package/dist/web/assets/ayu-light-C3h-C4tm.js +1 -0
  22. package/dist/web/assets/ayu-mirage-Bqwy1Gya.js +1 -0
  23. package/dist/web/assets/ballerina-B7ZEbQpA.js +1 -0
  24. package/dist/web/assets/bat-Bo4NYOV-.js +1 -0
  25. package/dist/web/assets/beancount-D-usSTwE.js +1 -0
  26. package/dist/web/assets/berry-DKpUyyne.js +1 -0
  27. package/dist/web/assets/bibtex-Ci_nEsc7.js +1 -0
  28. package/dist/web/assets/bicep-CUHmPFLl.js +1 -0
  29. package/dist/web/assets/bird2-C6vDhewU.js +1 -0
  30. package/dist/web/assets/blade-kDLtazTS.js +1 -0
  31. package/dist/web/assets/bsl-BkkzgIyY.js +1 -0
  32. package/dist/web/assets/c-LLHuKvL1.js +1 -0
  33. package/dist/web/assets/c3-BFHwR3_K.js +1 -0
  34. package/dist/web/assets/cadence-CQ2zXKGN.js +1 -0
  35. package/dist/web/assets/cairo-DLTphjLi.js +1 -0
  36. package/dist/web/assets/catppuccin-frappe-3VR1Za6u.js +1 -0
  37. package/dist/web/assets/catppuccin-latte-DwIHMF0Q.js +1 -0
  38. package/dist/web/assets/catppuccin-macchiato-DYnBP6_5.js +1 -0
  39. package/dist/web/assets/catppuccin-mocha-DYhrFGRu.js +1 -0
  40. package/dist/web/assets/clarity-SemFz856.js +1 -0
  41. package/dist/web/assets/clojure-DqKBuwfJ.js +1 -0
  42. package/dist/web/assets/cmake-Bj61d0ZC.js +1 -0
  43. package/dist/web/assets/cobol-KB1NrS7u.js +1 -0
  44. package/dist/web/assets/codeowners-C8r90Shi.js +1 -0
  45. package/dist/web/assets/codeql-oeQT6MSM.js +1 -0
  46. package/dist/web/assets/coffee-BIVXoYBq.js +1 -0
  47. package/dist/web/assets/common-lisp-Cv5bFMCO.js +1 -0
  48. package/dist/web/assets/coq-BrsZFFmf.js +1 -0
  49. package/dist/web/assets/cpp-t-AOohLk.js +1 -0
  50. package/dist/web/assets/crystal-Siw7Sgsi.js +1 -0
  51. package/dist/web/assets/csharp-oqKa8noW.js +1 -0
  52. package/dist/web/assets/css-C4JxYney.js +1 -0
  53. package/dist/web/assets/csv-Dx-8-gkx.js +1 -0
  54. package/dist/web/assets/cue-CE9AQfxI.js +1 -0
  55. package/dist/web/assets/cypher-ClKdZ_lG.js +1 -0
  56. package/dist/web/assets/d-qD-0Kul2.js +1 -0
  57. package/dist/web/assets/dark-plus-Cs2F2srj.js +1 -0
  58. package/dist/web/assets/dart-CnvKMtbv.js +1 -0
  59. package/dist/web/assets/dax-BkyTk9wS.js +1 -0
  60. package/dist/web/assets/desktop-Dlh5hvp9.js +1 -0
  61. package/dist/web/assets/diff-woXpYk--.js +1 -0
  62. package/dist/web/assets/docker-IyjqRm3v.js +1 -0
  63. package/dist/web/assets/dotenv-_5a1GRtc.js +1 -0
  64. package/dist/web/assets/dracula-BHWKrbxM.js +1 -0
  65. package/dist/web/assets/dracula-soft-5eyTD99u.js +1 -0
  66. package/dist/web/assets/dream-maker-DW3nJb8Q.js +1 -0
  67. package/dist/web/assets/edge-DWGhPgzT.js +1 -0
  68. package/dist/web/assets/elixir-CRNPk2CS.js +1 -0
  69. package/dist/web/assets/elm-wtHW2ZzC.js +1 -0
  70. package/dist/web/assets/emacs-lisp-B4R74twV.js +1 -0
  71. package/dist/web/assets/erb-zY-7xODc.js +1 -0
  72. package/dist/web/assets/erlang-Cphh6RMH.js +1 -0
  73. package/dist/web/assets/everforest-dark-sB-x3p7T.js +1 -0
  74. package/dist/web/assets/everforest-light-Df2xbC6M.js +1 -0
  75. package/dist/web/assets/fennel-DQxkIbk2.js +1 -0
  76. package/dist/web/assets/fish-BJitypiv.js +1 -0
  77. package/dist/web/assets/fluent-C03EYrpw.js +1 -0
  78. package/dist/web/assets/fortran-fixed-form-DEKoE2YW.js +1 -0
  79. package/dist/web/assets/fortran-free-form-CYNrtFtB.js +1 -0
  80. package/dist/web/assets/fsharp-D13ZGOAj.js +1 -0
  81. package/dist/web/assets/gdresource-C0sCabJj.js +1 -0
  82. package/dist/web/assets/gdscript-Cp2uCuqX.js +1 -0
  83. package/dist/web/assets/gdshader-CBce3t8t.js +1 -0
  84. package/dist/web/assets/genie-CV2tkWYe.js +1 -0
  85. package/dist/web/assets/gherkin-DExj1W_8.js +1 -0
  86. package/dist/web/assets/git-commit-BSykSTBG.js +1 -0
  87. package/dist/web/assets/git-rebase-DryBRQqt.js +1 -0
  88. package/dist/web/assets/github-dark-C-LZuMrd.js +1 -0
  89. package/dist/web/assets/github-dark-default-DXG-b-1a.js +1 -0
  90. package/dist/web/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
  91. package/dist/web/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
  92. package/dist/web/assets/github-light-EUqPIrTm.js +1 -0
  93. package/dist/web/assets/github-light-default-BXViO-2h.js +1 -0
  94. package/dist/web/assets/github-light-high-contrast-B68TUdTA.js +1 -0
  95. package/dist/web/assets/gleam-CSRkHgEL.js +1 -0
  96. package/dist/web/assets/glimmer-js-C1lI2oOe.js +1 -0
  97. package/dist/web/assets/glimmer-ts-w8P2a6UH.js +1 -0
  98. package/dist/web/assets/glsl-BOGqvuHx.js +1 -0
  99. package/dist/web/assets/gn-ilITqXS6.js +1 -0
  100. package/dist/web/assets/gnuplot-7GGW24-e.js +1 -0
  101. package/dist/web/assets/go-rLFTqkRN.js +1 -0
  102. package/dist/web/assets/graphql-CMxvykwD.js +1 -0
  103. package/dist/web/assets/groovy-CacY0gHj.js +1 -0
  104. package/dist/web/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
  105. package/dist/web/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
  106. package/dist/web/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
  107. package/dist/web/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
  108. package/dist/web/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
  109. package/dist/web/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
  110. package/dist/web/assets/hack-BTJt-rSc.js +1 -0
  111. package/dist/web/assets/haml-CpShFG-s.js +1 -0
  112. package/dist/web/assets/handlebars-BsUSmFng.js +1 -0
  113. package/dist/web/assets/haskell-D8IpX4py.js +1 -0
  114. package/dist/web/assets/haxe-OTjmBuCE.js +1 -0
  115. package/dist/web/assets/hcl-Dh228itO.js +1 -0
  116. package/dist/web/assets/hjson-CxZEssPk.js +1 -0
  117. package/dist/web/assets/hlsl-Cvrh5tZx.js +1 -0
  118. package/dist/web/assets/horizon-CE9ld1lL.js +1 -0
  119. package/dist/web/assets/horizon-bright-DSNQnXHK.js +1 -0
  120. package/dist/web/assets/houston-CsvMBhTu.js +1 -0
  121. package/dist/web/assets/html-derivative-DslI7lKP.js +1 -0
  122. package/dist/web/assets/html-efT10kNy.js +1 -0
  123. package/dist/web/assets/http-DGneOSH7.js +1 -0
  124. package/dist/web/assets/hurl-D7wxeizR.js +1 -0
  125. package/dist/web/assets/hxml-B0Qn7Nwc.js +1 -0
  126. package/dist/web/assets/hy-CZbG8q4J.js +1 -0
  127. package/dist/web/assets/imba-DsUTQ-LC.js +1 -0
  128. package/dist/web/assets/index-CuLPuzv1.js +2825 -0
  129. package/dist/web/assets/index-dvXjNgUr.css +1 -0
  130. package/dist/web/assets/ini-B5eOa1yu.js +1 -0
  131. package/dist/web/assets/java-DRV6EAgN.js +1 -0
  132. package/dist/web/assets/javascript-VqTwarqZ.js +1 -0
  133. package/dist/web/assets/jinja-B0K-1eZW.js +1 -0
  134. package/dist/web/assets/jison-C6X_CrUT.js +1 -0
  135. package/dist/web/assets/json-BMTvgpRj.js +1 -0
  136. package/dist/web/assets/json5-BR5RXkoi.js +1 -0
  137. package/dist/web/assets/jsonc-CYpm1nAK.js +1 -0
  138. package/dist/web/assets/jsonl-CmCQp5Yx.js +1 -0
  139. package/dist/web/assets/jsonnet-CJTPZ8u_.js +1 -0
  140. package/dist/web/assets/jssm-DXw9l8Rf.js +1 -0
  141. package/dist/web/assets/jsx-BdBaYpud.js +1 -0
  142. package/dist/web/assets/julia-eSoxcKep.js +1 -0
  143. package/dist/web/assets/just-BMl4E389.js +1 -0
  144. package/dist/web/assets/kanagawa-dragon-CXtmUGW6.js +1 -0
  145. package/dist/web/assets/kanagawa-lotus-BN08jTvb.js +1 -0
  146. package/dist/web/assets/kanagawa-wave-CTweb8Dz.js +1 -0
  147. package/dist/web/assets/kdl-CsD5j6eV.js +1 -0
  148. package/dist/web/assets/kotlin-DhhofPvG.js +1 -0
  149. package/dist/web/assets/kusto-C7mF5XQf.js +1 -0
  150. package/dist/web/assets/laserwave-C_8bwKvT.js +1 -0
  151. package/dist/web/assets/latex-vrLDptzo.js +1 -0
  152. package/dist/web/assets/lean-CewbzKMR.js +1 -0
  153. package/dist/web/assets/less-DVTAwKKz.js +1 -0
  154. package/dist/web/assets/light-plus-DVQuIRkW.js +1 -0
  155. package/dist/web/assets/liquid-DhiVbfmF.js +1 -0
  156. package/dist/web/assets/llvm-Cm23YOpf.js +1 -0
  157. package/dist/web/assets/log-BNLmms1o.js +1 -0
  158. package/dist/web/assets/logo-Cluzi2Zq.js +1 -0
  159. package/dist/web/assets/lua-BZarQnS9.js +1 -0
  160. package/dist/web/assets/luau-FMPmPwt6.js +1 -0
  161. package/dist/web/assets/make-Dixweg8N.js +1 -0
  162. package/dist/web/assets/markdown-BYOwaDjH.js +1 -0
  163. package/dist/web/assets/marko-BWPwdtQS.js +1 -0
  164. package/dist/web/assets/material-theme-Bm3Qr25_.js +1 -0
  165. package/dist/web/assets/material-theme-darker-2IIEA8gg.js +1 -0
  166. package/dist/web/assets/material-theme-lighter-uhdI0v04.js +1 -0
  167. package/dist/web/assets/material-theme-ocean-CHQ94UKr.js +1 -0
  168. package/dist/web/assets/material-theme-palenight-B5W6OYN7.js +1 -0
  169. package/dist/web/assets/matlab-D7qyCx1q.js +1 -0
  170. package/dist/web/assets/mdc-Cx_ikHJA.js +1 -0
  171. package/dist/web/assets/mdx-DQZ5AkYe.js +1 -0
  172. package/dist/web/assets/mermaid-Bk4SNUv9.js +1 -0
  173. package/dist/web/assets/min-dark-BSWPekZh.js +1 -0
  174. package/dist/web/assets/min-light-DDpmG2fV.js +1 -0
  175. package/dist/web/assets/mipsasm-BMqwQI7S.js +1 -0
  176. package/dist/web/assets/mojo-BgCJLMeH.js +1 -0
  177. package/dist/web/assets/monokai-CdkpiU2Y.js +1 -0
  178. package/dist/web/assets/moonbit-CaWjb8XO.js +1 -0
  179. package/dist/web/assets/move-B1IS1UjX.js +1 -0
  180. package/dist/web/assets/narrat-_X_XdTYD.js +1 -0
  181. package/dist/web/assets/nextflow-BJtWHP5T.js +1 -0
  182. package/dist/web/assets/nextflow-groovy-DJMQeKeT.js +1 -0
  183. package/dist/web/assets/nginx-iNlDtGB5.js +1 -0
  184. package/dist/web/assets/night-owl-DhmEMT88.js +1 -0
  185. package/dist/web/assets/night-owl-light-eJ-hLW7d.js +1 -0
  186. package/dist/web/assets/nim-DGF5L7xM.js +1 -0
  187. package/dist/web/assets/nix-IvuFDN5E.js +1 -0
  188. package/dist/web/assets/nord-Cb4Vim4T.js +1 -0
  189. package/dist/web/assets/nushell-DcLAeLz5.js +1 -0
  190. package/dist/web/assets/objective-c-D1A_Heim.js +1 -0
  191. package/dist/web/assets/objective-cpp-BsSzOQcm.js +1 -0
  192. package/dist/web/assets/ocaml-O90oeIOV.js +1 -0
  193. package/dist/web/assets/odin-B1RWQWA5.js +1 -0
  194. package/dist/web/assets/one-dark-pro-CLwyXe_n.js +1 -0
  195. package/dist/web/assets/one-light-D7Lr4KcI.js +1 -0
  196. package/dist/web/assets/openscad-BUDT5pXO.js +1 -0
  197. package/dist/web/assets/pascal-4ZHwLPI5.js +1 -0
  198. package/dist/web/assets/perl-CFfHYoph.js +1 -0
  199. package/dist/web/assets/php-CtPBh1K5.js +1 -0
  200. package/dist/web/assets/pierre-dark-CpLgRqie.js +1 -0
  201. package/dist/web/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
  202. package/dist/web/assets/pierre-dark-soft-kZQmAZld.js +1 -0
  203. package/dist/web/assets/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
  204. package/dist/web/assets/pierre-dark-vibrant-CpQYzh95.js +1 -0
  205. package/dist/web/assets/pierre-light-CoaEpmwp.js +1 -0
  206. package/dist/web/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
  207. package/dist/web/assets/pierre-light-soft-lWLdNTOI.js +1 -0
  208. package/dist/web/assets/pierre-light-tritanopia-CEbqgOJL.js +1 -0
  209. package/dist/web/assets/pierre-light-vibrant-D80Fkn33.js +1 -0
  210. package/dist/web/assets/pkl-ot-7Btpt.js +1 -0
  211. package/dist/web/assets/plastic-DQwYfKfQ.js +1 -0
  212. package/dist/web/assets/plsql-DGHpHOYJ.js +1 -0
  213. package/dist/web/assets/po-BiJDBrnU.js +1 -0
  214. package/dist/web/assets/poimandres-DRFjx7u4.js +1 -0
  215. package/dist/web/assets/polar-C7UOKdEL.js +1 -0
  216. package/dist/web/assets/postcss-BXeXVLqQ.js +1 -0
  217. package/dist/web/assets/powerquery-DNMTfnFr.js +1 -0
  218. package/dist/web/assets/powershell-DshXNtvi.js +1 -0
  219. package/dist/web/assets/prisma-BsRQq5mF.js +1 -0
  220. package/dist/web/assets/prolog-iXnhIJG7.js +1 -0
  221. package/dist/web/assets/proto-DB4EqR-F.js +1 -0
  222. package/dist/web/assets/pug-CxRWcKXx.js +1 -0
  223. package/dist/web/assets/puppet-CDv2pdJW.js +1 -0
  224. package/dist/web/assets/purescript-9MfHhQsQ.js +1 -0
  225. package/dist/web/assets/python-gzcpVVnB.js +1 -0
  226. package/dist/web/assets/qml-CQ8J3wuq.js +1 -0
  227. package/dist/web/assets/qmldir-DCQb3MpD.js +1 -0
  228. package/dist/web/assets/qss-Fe1Jh2GI.js +1 -0
  229. package/dist/web/assets/r-CItjESd8.js +1 -0
  230. package/dist/web/assets/racket-DcIDlBhZ.js +1 -0
  231. package/dist/web/assets/raku-B3gFvitq.js +1 -0
  232. package/dist/web/assets/razor-BPkkINsq.js +1 -0
  233. package/dist/web/assets/red-CJ3rzSJv.js +1 -0
  234. package/dist/web/assets/reg-CRGYupPL.js +1 -0
  235. package/dist/web/assets/regexp-DX3MNthO.js +1 -0
  236. package/dist/web/assets/rel-BtDbiS_P.js +1 -0
  237. package/dist/web/assets/riscv-Ckw8ddFX.js +1 -0
  238. package/dist/web/assets/ron-VUp2lXgN.js +1 -0
  239. package/dist/web/assets/rose-pine-BthvhNj6.js +1 -0
  240. package/dist/web/assets/rose-pine-dawn-Dg85fqjY.js +1 -0
  241. package/dist/web/assets/rose-pine-moon-hon4tzzS.js +1 -0
  242. package/dist/web/assets/rosmsg-CAekHB0j.js +1 -0
  243. package/dist/web/assets/rst-ClRAjKbC.js +1 -0
  244. package/dist/web/assets/ruby-CgYgA9Jj.js +1 -0
  245. package/dist/web/assets/rust-Cfkwpbl8.js +1 -0
  246. package/dist/web/assets/sas-CPmYLbzU.js +1 -0
  247. package/dist/web/assets/sass-DXrisJhu.js +1 -0
  248. package/dist/web/assets/scala-DKOlJaKm.js +1 -0
  249. package/dist/web/assets/scheme-DQCgrYNe.js +1 -0
  250. package/dist/web/assets/scss-Cm-sHo09.js +1 -0
  251. package/dist/web/assets/sdbl-bTVj8UrX.js +1 -0
  252. package/dist/web/assets/shaderlab-TOUzSsQk.js +1 -0
  253. package/dist/web/assets/shellscript-DmaaF0b7.js +1 -0
  254. package/dist/web/assets/shellsession-CQx7VqyU.js +1 -0
  255. package/dist/web/assets/slack-dark-DnToyrRv.js +1 -0
  256. package/dist/web/assets/slack-ochin-B2OO5cIa.js +1 -0
  257. package/dist/web/assets/smalltalk-B16xEiuN.js +1 -0
  258. package/dist/web/assets/snazzy-light-4G7pJPwS.js +1 -0
  259. package/dist/web/assets/solarized-dark-DV17i1UV.js +1 -0
  260. package/dist/web/assets/solarized-light-DSh2HLQt.js +1 -0
  261. package/dist/web/assets/solidity-CKzVLygQ.js +1 -0
  262. package/dist/web/assets/soy-B_yUNzV2.js +1 -0
  263. package/dist/web/assets/sparql-D_iOobhT.js +1 -0
  264. package/dist/web/assets/splunk-BC2Px7Mm.js +1 -0
  265. package/dist/web/assets/sql-BJHohXqk.js +1 -0
  266. package/dist/web/assets/ssh-config-BgfXC-Er.js +1 -0
  267. package/dist/web/assets/stata-UAFrzABU.js +1 -0
  268. package/dist/web/assets/stylus-B6D30XZt.js +1 -0
  269. package/dist/web/assets/surrealql-CWvgOHzZ.js +1 -0
  270. package/dist/web/assets/svelte-BddkVZXj.js +1 -0
  271. package/dist/web/assets/swift-DonLKvLd.js +1 -0
  272. package/dist/web/assets/synthwave-84-nFMaYfgc.js +1 -0
  273. package/dist/web/assets/system-verilog-DJ5XKQeo.js +1 -0
  274. package/dist/web/assets/systemd-BxMlprV5.js +1 -0
  275. package/dist/web/assets/talonscript-CohzipZa.js +1 -0
  276. package/dist/web/assets/tasl-DMoTqEGO.js +1 -0
  277. package/dist/web/assets/tcl-CZd0xW_V.js +1 -0
  278. package/dist/web/assets/templ-C84Bu3va.js +1 -0
  279. package/dist/web/assets/terraform-DswuEJGm.js +1 -0
  280. package/dist/web/assets/tex-RrP2i1xH.js +1 -0
  281. package/dist/web/assets/tokyo-night-oM2G3aXe.js +1 -0
  282. package/dist/web/assets/toml-CcmNWLt0.js +1 -0
  283. package/dist/web/assets/ts-tags-BRr3h9RL.js +1 -0
  284. package/dist/web/assets/tsv-sltzmVWM.js +1 -0
  285. package/dist/web/assets/tsx-CzdrIvPO.js +1 -0
  286. package/dist/web/assets/turtle-ByJddavk.js +1 -0
  287. package/dist/web/assets/twig-CibPnSwR.js +1 -0
  288. package/dist/web/assets/typescript-CWzslnac.js +1 -0
  289. package/dist/web/assets/typespec-BRdr0IET.js +1 -0
  290. package/dist/web/assets/typst-DI99ib-x.js +1 -0
  291. package/dist/web/assets/v-DETTlOr0.js +1 -0
  292. package/dist/web/assets/vala-zf12oZj6.js +1 -0
  293. package/dist/web/assets/vb-Djn5o6TS.js +1 -0
  294. package/dist/web/assets/verilog-CiiDBU1e.js +1 -0
  295. package/dist/web/assets/vesper-DdrHHSXu.js +1 -0
  296. package/dist/web/assets/vhdl-BroJfC0k.js +1 -0
  297. package/dist/web/assets/viml-DvXPmvsu.js +1 -0
  298. package/dist/web/assets/vitesse-black-fwtXNY1n.js +1 -0
  299. package/dist/web/assets/vitesse-dark-BZCL-v6S.js +1 -0
  300. package/dist/web/assets/vitesse-light-VbXTXTou.js +1 -0
  301. package/dist/web/assets/vue-C-b1or0S.js +1 -0
  302. package/dist/web/assets/vue-html-B7qsQ7no.js +1 -0
  303. package/dist/web/assets/vue-vine-dqyrjuMF.js +1 -0
  304. package/dist/web/assets/vyper-CgoNMtux.js +1 -0
  305. package/dist/web/assets/wasm-BnjxR4X6.js +1 -0
  306. package/dist/web/assets/wasm-ByWQv1Qj.js +1 -0
  307. package/dist/web/assets/wenyan-C8pVoKbM.js +1 -0
  308. package/dist/web/assets/wgsl-BsKzXJz4.js +1 -0
  309. package/dist/web/assets/wikitext-ClFFjSW2.js +1 -0
  310. package/dist/web/assets/wit-DdvCle-K.js +1 -0
  311. package/dist/web/assets/wolfram-DLL8P-h_.js +1 -0
  312. package/dist/web/assets/xml-CG7JAl4q.js +1 -0
  313. package/dist/web/assets/xsl-DE3Ct1nt.js +1 -0
  314. package/dist/web/assets/yaml-76tnpMFk.js +1 -0
  315. package/dist/web/assets/zenscript-BnlCZFoB.js +1 -0
  316. package/dist/web/assets/zig-CMLA9XwU.js +1 -0
  317. package/dist/web/index.html +13 -0
  318. package/package.json +80 -0
@@ -0,0 +1,2825 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-Dy5TOb5M.js","assets/html-efT10kNy.js","assets/javascript-VqTwarqZ.js","assets/css-C4JxYney.js","assets/angular-ts-CQ-VvwG4.js","assets/scss-Cm-sHo09.js","assets/apl-DLPyOpzA.js","assets/xml-CG7JAl4q.js","assets/java-DRV6EAgN.js","assets/json-BMTvgpRj.js","assets/astro-Bg8eE3kY.js","assets/typescript-CWzslnac.js","assets/postcss-BXeXVLqQ.js","assets/tsx-CzdrIvPO.js","assets/blade-kDLtazTS.js","assets/html-derivative-DslI7lKP.js","assets/sql-BJHohXqk.js","assets/bsl-BkkzgIyY.js","assets/sdbl-bTVj8UrX.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/cobol-KB1NrS7u.js","assets/coffee-BIVXoYBq.js","assets/cpp-t-AOohLk.js","assets/regexp-DX3MNthO.js","assets/glsl-BOGqvuHx.js","assets/c-LLHuKvL1.js","assets/crystal-Siw7Sgsi.js","assets/shellscript-DmaaF0b7.js","assets/edge-DWGhPgzT.js","assets/elixir-CRNPk2CS.js","assets/elm-wtHW2ZzC.js","assets/erb-zY-7xODc.js","assets/ruby-CgYgA9Jj.js","assets/haml-CpShFG-s.js","assets/graphql-CMxvykwD.js","assets/jsx-BdBaYpud.js","assets/lua-BZarQnS9.js","assets/yaml-76tnpMFk.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-C0sCabJj.js","assets/gdshader-CBce3t8t.js","assets/gdscript-Cp2uCuqX.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-DryBRQqt.js","assets/glimmer-js-C1lI2oOe.js","assets/glimmer-ts-w8P2a6UH.js","assets/hack-BTJt-rSc.js","assets/handlebars-BsUSmFng.js","assets/http-DGneOSH7.js","assets/hurl-D7wxeizR.js","assets/csv-Dx-8-gkx.js","assets/hxml-B0Qn7Nwc.js","assets/haxe-OTjmBuCE.js","assets/jinja-B0K-1eZW.js","assets/jison-C6X_CrUT.js","assets/julia-eSoxcKep.js","assets/r-CItjESd8.js","assets/just-BMl4E389.js","assets/perl-CFfHYoph.js","assets/latex-vrLDptzo.js","assets/tex-RrP2i1xH.js","assets/liquid-DhiVbfmF.js","assets/marko-BWPwdtQS.js","assets/less-DVTAwKKz.js","assets/mdc-Cx_ikHJA.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-iNlDtGB5.js","assets/nim-DGF5L7xM.js","assets/php-CtPBh1K5.js","assets/pug-CxRWcKXx.js","assets/qml-CQ8J3wuq.js","assets/razor-BPkkINsq.js","assets/csharp-oqKa8noW.js","assets/rst-ClRAjKbC.js","assets/cmake-Bj61d0ZC.js","assets/sas-CPmYLbzU.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-CQx7VqyU.js","assets/soy-B_yUNzV2.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-UAFrzABU.js","assets/surrealql-CWvgOHzZ.js","assets/svelte-BddkVZXj.js","assets/templ-C84Bu3va.js","assets/go-rLFTqkRN.js","assets/ts-tags-BRr3h9RL.js","assets/twig-CibPnSwR.js","assets/vue-C-b1or0S.js","assets/vue-html-B7qsQ7no.js","assets/vue-vine-dqyrjuMF.js","assets/stylus-B6D30XZt.js","assets/xsl-DE3Ct1nt.js"])))=>i.map(i=>d[i]);
2
+ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return r(this.context.count)},getNextContextId(){return r(this.context.count++)}};function r(e){let t=String(e),r=t.length-1;return n.context.id+(r?String.fromCharCode(96+r):``)+t}function i(e){n.context=e}function a(){return{...n.context,id:n.getNextContextId(),count:0}}var o=(e,t)=>e===t,s=Symbol(`solid-track`),c={equals:o},l=null,u=le,d=1,f=2,p={owned:null,cleanups:null,context:null,owner:null},m=null,h=null,g=null,_=null,v=null,y=null,b=null,x=0;function S(e,t){let n=v,r=m,i=e.length===0,a=t===void 0?r:t,o=i?p:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>D(()=>me(o)));m=o,v=null;try{return se(s,!0)}finally{v=n,m=r}}function C(e,t){t=t?Object.assign({},c,t):c;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[N.bind(n),e=>(typeof e==`function`&&(e=h&&h.running&&h.sources.has(n)?e(n.tValue):e(n.value)),ne(n,e))]}function w(e,t,n){let r=ae(e,t,!1,d);g&&h&&h.running?y.push(r):re(r)}function T(e,t,n){u=de;let r=ae(e,t,!1,d),i=M&&j(M);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),b?b.push(r):re(r)}function E(e,t,n){n=n?Object.assign({},c,n):c;let r=ae(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,g&&h&&h.running?(r.tState=d,y.push(r)):re(r),N.bind(r)}function D(e){if(!_&&v===null)return e();let t=v;v=null;try{return _?_.untrack(e):e()}finally{v=t}}function ee(e){T(()=>D(e))}function te(e){return m===null||(m.cleanups===null?m.cleanups=[e]:m.cleanups.push(e)),e}function O(e){if(h&&h.running)return e(),h.done;let t=v,n=m;return Promise.resolve().then(()=>{v=t,m=n;let r;return(g||M)&&(r=h||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),se(e,!1),v=m=null,r?r.done:void 0})}var[k,A]=C(!1);function j(e){let t;return m&&m.context&&(t=m.context[e.id])!==void 0?t:e.defaultValue}var M;function N(){let e=h&&h.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===d)re(this);else{let e=y;y=null,se(()=>fe(this),!1),y=e}if(v){let e=this.observers;if(!e||e[e.length-1]!==v){let t=e?e.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(t)):(v.sources=[this],v.sourceSlots=[t]),e?(e.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}}return e&&h.sources.has(this)?this.tValue:this.value}function ne(e,t,n){let r=h&&h.running&&h.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(h){let r=h.running;(r||!n&&h.sources.has(e))&&(h.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&se(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=h&&h.running;r&&h.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?y.push(n):b.push(n),n.observers&&pe(n)),r?n.tState=d:n.state=d)}if(y.length>1e6)throw y=[],Error()},!1)}return t}function re(e){if(!e.fn)return;me(e);let t=x;ie(e,h&&h.running&&h.sources.has(e)?e.tValue:e.value,t),h&&!h.running&&h.sources.has(e)&&queueMicrotask(()=>{se(()=>{h&&(h.running=!0),v=m=e,ie(e,e.tValue,t),v=m=null},!1)})}function ie(e,t,n){let r,i=m,a=v;v=m=e;try{r=e.fn(t)}catch(t){return e.pure&&(h&&h.running?(e.tState=d,e.tOwned&&e.tOwned.forEach(me),e.tOwned=void 0):(e.state=d,e.owned&&e.owned.forEach(me),e.owned=null)),e.updatedAt=n+1,ve(t)}finally{v=a,m=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?ne(e,r,!0):h&&h.running&&e.pure?(h.sources.has(e)||(e.value=r),h.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ae(e,t,n,r=d,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:m?m.context:null,pure:n};if(h&&h.running&&(a.state=0,a.tState=r),m===null||m!==p&&(h&&h.running&&m.pure?m.tOwned?m.tOwned.push(a):m.tOwned=[a]:m.owned?m.owned.push(a):m.owned=[a]),_&&a.fn){let e=a.fn,[t,n]=C(void 0,{equals:!1}),r=_.factory(e,n);te(()=>r.dispose());let i,o=()=>O(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),h&&h.running?(i||=_.factory(e,o),i.track(n)):r.track(n))}return a}function oe(e){let t=h&&h.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===f)return fe(e);if(e.suspense&&D(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<x);){if(t&&h.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(h.disposed.has(t))return}if((t?e.tState:e.state)===d)re(e);else if((t?e.tState:e.state)===f){let t=y;y=null,se(()=>fe(e,n[0]),!1),y=t}}}function se(e,t){if(y)return e();let n=!1;t||(y=[]),b?n=!0:b=[],x++;try{let t=e();return ce(n),t}catch(e){n||(b=null),y=null,ve(e)}}function ce(e){if(y&&=(g&&h&&h.running?ue(y):le(y),null),e)return;let t;if(h){if(!h.promises.size&&!h.queue.size){let e=h.sources,n=h.disposed;b.push.apply(b,h.effects),t=h.resolve;for(let e of b)`tState`in e&&(e.state=e.tState),delete e.tState;h=null,se(()=>{for(let e of n)me(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)me(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}A(!1)},!1)}else if(h.running){h.running=!1,h.effects.push.apply(h.effects,b),b=null,A(!0);return}}let n=b;b=null,n.length&&se(()=>u(n),!1),t&&t()}function le(e){for(let t=0;t<e.length;t++)oe(e[t])}function ue(e){for(let t=0;t<e.length;t++){let n=e[t],r=h.queue;r.has(n)||(r.add(n),g(()=>{r.delete(n),se(()=>{h.running=!0,oe(n)},!1),h&&(h.running=!1)}))}}function de(e){let t,r=0;for(t=0;t<e.length;t++){let n=e[t];n.user?e[r++]=n:oe(n)}if(n.context){if(n.count){n.effects||=[],n.effects.push(...e.slice(0,r));return}i()}for(n.effects&&(n.done||!n.count)&&(e=[...n.effects,...e],r+=n.effects.length,delete n.effects),t=0;t<r;t++)oe(e[t])}function fe(e,t){let n=h&&h.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===d?i!==t&&(!i.updatedAt||i.updatedAt<x)&&oe(i):e===f&&fe(i,t)}}}function pe(e){let t=h&&h.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=f:r.state=f,r.pure?y.push(r):b.push(r),r.observers&&pe(r))}}function me(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)me(e.tOwned[t]);delete e.tOwned}if(h&&h.running&&e.pure)he(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)me(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}h&&h.running?e.tState=0:e.state=0}function he(e,t){if(t||(e.tState=0,h.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)he(e.owned[t])}function ge(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function _e(e,t,n){try{for(let n of t)n(e)}catch(e){ve(e,n&&n.owner||null)}}function ve(e,t=m){let n=l&&t&&t.context&&t.context[l],r=ge(e);if(!n)throw r;b?b.push({fn(){_e(r,n,t)},state:d}):_e(r,n,t)}var ye=Symbol(`fallback`);function be(e){for(let t=0;t<e.length;t++)e[t]()}function xe(e,t,n={}){let r=[],i=[],a=[],o=0,c=t.length>1?[]:null;return te(()=>be(a)),()=>{let l=e()||[],u=l.length,d,f;return l[s],D(()=>{let e,t,s,m,h,g,_,v,y;if(u===0)o!==0&&(be(a),a=[],r=[],i=[],o=0,c&&=[]),n.fallback&&(r=[ye],i[0]=S(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=S(p);o=u}else{for(s=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(o,u);g<_&&r[g]===l[g];g++);for(_=o-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)s[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(s[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;f<u;f++)f in s?(i[f]=s[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=S(p);i=i.slice(0,o=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=C(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}var Se=!1;function Ce(e,t){if(Se&&n.context){let r=n.context;i(a());let o=D(()=>e(t||{}));return i(r),o}return D(()=>e(t||{}))}var we=e=>`Stale read from <${e}>.`;function Te(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return E(xe(()=>e.each,e.children,t||void 0))}function Ee(e){let t=e.keyed,n=E(()=>e.when,void 0,void 0),r=t?n:E(n,void 0,{equals:(e,t)=>!e==!t});return E(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?D(()=>a(t?i:()=>{if(!D(r))throw we(`Show`);return n()})):a}return e.fallback},void 0,void 0)}var De=e=>E(()=>e());function P(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var Oe=`_$DX_DELEGATE`;function ke(e,t,n,r={}){let i;return S(r=>{i=r,t===document?e():I(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function F(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>D(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Ae(e,t=window.document){let n=t[Oe]||(t[Oe]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Fe))}}function je(e,t,n){Pe(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Me(e,t){Pe(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function Ne(e,t,n){return D(()=>e(t,n))}function I(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Ie(e,t,r,n);w(r=>Ie(e,t(),r,n),r)}function Pe(e){return!!n.context&&!n.done&&(!e||e.isConnected)}function Fe(e){if(n.registry&&n.events&&n.events.find(([t,n])=>n===e))return;let t=e.target,r=`$$${e.type}`,i=e.target,a=e.currentTarget,o=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),s=()=>{let n=t[r];if(n&&!t.disabled){let i=t[`${r}Data`];if(i===void 0?n.call(t,e):n.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},c=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),n.registry&&!n.done&&(n.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();o(n[0]);for(let e=0;e<n.length-2&&(t=n[e],s());e++){if(t._$host){t=t._$host,c();break}if(t.parentNode===a)break}}else c();o(i)}function Ie(e,t,n,r,i){let a=Pe(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=ze(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=ze(e,n,r)}else if(o===`function`)return w(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Ie(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(Le(o,t,n,i))return w(()=>n=Ie(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=ze(e,n,r),s)return n}else c?n.length===0?Re(e,o,r):P(e,n,o):(n&&ze(e),Re(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=ze(e,n,r,t);ze(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function Le(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=Le(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=Le(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function Re(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function ze(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}var Be=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
3
+ <symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
4
+ <path d="M12.4697 5.46973C12.7626 5.17684 13.2374 5.17684 13.5303 5.46973C13.8232 5.76262 13.8232 6.23738 13.5303 6.53028L8.53028 11.5303C8.23738 11.8232 7.76262 11.8232 7.46973 11.5303L2.46973 6.53028C2.17684 6.23738 2.17684 5.76262 2.46973 5.46973C2.76262 5.17684 3.23738 5.17684 3.53028 5.46973L8 9.93946L12.4697 5.46973Z" fill="currentcolor"/>
5
+ </symbol>
6
+ <symbol id="file-tree-icon-dot" viewBox="0 0 6 6">
7
+ <circle cx="3" cy="3" r="3" />
8
+ </symbol>
9
+ <symbol id="file-tree-icon-file" viewBox="0 0 16 16">
10
+ <path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".5"/>
11
+ <path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
12
+ </symbol>
13
+ <symbol id="file-tree-icon-lock" viewBox="0 0 16 16">
14
+ <path fill="currentcolor" d="M4 5.336V4a4 4 0 1 1 8 0v1.336c1.586.54 2 1.843 2 4.664v1c0 4.118-.883 5-5 5H7c-4.117 0-5-.883-5-5v-1c0-2.821.414-4.124 2-4.664M5.5 4v1.054Q6.166 4.998 7 5h2q.834-.002 1.5.054V4a2.5 2.5 0 0 0-5 0m-2 6v1c0 .995.055 1.692.167 2.193.107.483.246.686.35.79s.307.243.79.35c.5.112 1.198.167 2.193.167h2c.995 0 1.692-.055 2.193-.166.483-.108.686-.247.79-.35.104-.105.243-.308.35-.791.112-.5.167-1.198.167-2.193v-1c0-.995-.055-1.692-.166-2.193-.108-.483-.247-.686-.35-.79-.105-.104-.308-.243-.791-.35C10.693 6.555 9.995 6.5 9 6.5H7c-.995 0-1.692.055-2.193.167-.483.107-.686.246-.79.35s-.243.307-.35.79C3.555 8.307 3.5 9.005 3.5 10" />
15
+ </symbol>
16
+ <symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
17
+ <path d="M5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M14 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
18
+ </symbol>
19
+ </svg>`,Ve=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
20
+ <path fill="currentColor" d="M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z" class="bg" opacity=".6"/>
21
+ <path fill="currentColor" d="M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z" class="fg"/>
22
+ </symbol>`,He=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
23
+ <path fill="currentColor" fill-rule="evenodd" d="M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z" clip-rule="evenodd"/>
24
+ </symbol>`,Ue=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
25
+ <path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
26
+ <path fill="currentColor" d="M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0" class="fg-stroke"/>
27
+ </symbol>`,We=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
28
+ <path fill="currentColor" d="M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z"/>
29
+ </symbol>`,Ge=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
30
+ <path fill="currentColor" fill-rule="evenodd" d="M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z" class="bg" clip-rule="evenodd" opacity=".2"/>
31
+ <path fill="currentColor" fill-rule="evenodd" d="M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z" class="fg" clip-rule="evenodd"/>
32
+ </symbol>`,Ke=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
33
+ <path fill="currentColor" d="M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5" class="bg" opacity=".5"/>
34
+ <path fill="currentColor" d="M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21"/>
35
+ <path fill="currentColor" d="M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13"/>
36
+ </symbol>`,qe=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
37
+ <path fill="currentColor" d="M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5"/>
38
+ </symbol>`,Je=`<symbol id="file-tree-builtin-c" viewBox="0 0 16 16">
39
+ <path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
40
+ </symbol>`,Ye=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
41
+ <path fill="currentColor" d="M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z"/>
42
+ </symbol>`,Xe=`<symbol id="file-tree-builtin-cpp" viewBox="0 0 16 16">
43
+ <path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
44
+ </symbol>`,Ze=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
45
+ <path fill="currentColor" d="M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7" class="vector" opacity=".2"/>
46
+ <path fill="currentColor" d="M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6"/>
47
+ </symbol>`,Qe=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
48
+ <path fill="currentColor" d="M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683"/>
49
+ <path fill="currentColor" d="M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z"/>
50
+ <path fill="currentColor" d="M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1"/>
51
+ </symbol>`,$e=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
52
+ <path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".4"/>
53
+ <path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
54
+ </symbol>`,et=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
55
+ <path fill="currentColor" d="M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z"/>
56
+ <path fill="currentColor" d="M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13" opacity=".5"/>
57
+ </symbol>`,tt=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
58
+ <path fill="currentColor" d="M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2" opacity=".5"/>
59
+ <path fill="currentColor" d="m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z"/>
60
+ </symbol>`,nt=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
61
+ <path fill="currentColor" d="M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z"/>
62
+ </symbol>`,rt=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
63
+ <path fill="currentColor" d="M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27"/>
64
+ </symbol>`,it=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
65
+ <path fill="currentColor" fill-rule="evenodd" d="M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3" clip-rule="evenodd"/>
66
+ </symbol>`,at=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
67
+ <path fill="currentColor" fill-rule="evenodd" d="M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z" clip-rule="evenodd"/>
68
+ </symbol>`,ot=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
69
+ <path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
70
+ <path fill="currentColor" d="M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z" class="fg"/>
71
+ </symbol>`,st=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
72
+ <path fill="currentColor" d="M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z" opacity=".3"/>
73
+ <path fill="currentColor" d="M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
74
+ </symbol>`,L=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
75
+ <path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
76
+ <path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8"/>
77
+ </symbol>`,R=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
78
+ <path fill="currentColor" d="M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5"/>
79
+ </symbol>`,ct=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
80
+ <path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
81
+ </symbol>`,lt=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
82
+ <path fill="currentColor" d="M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82"/>
83
+ <path fill="currentColor" d="M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16"/>
84
+ </symbol>`,ut=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
85
+ <defs>
86
+ <linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
87
+ <stop stop-color="currentColor"/>
88
+ <stop offset="1" stop-color="currentColor" stop-opacity="0"/>
89
+ </linearGradient>
90
+ </defs>
91
+ <path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
92
+ <path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
93
+ <path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
94
+ </symbol>`,dt=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
95
+ <path fill="currentColor" d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z" class="vector" opacity=".2"/>
96
+ <path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
97
+ </symbol>`,ft=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
98
+ <path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z"/>
99
+ </symbol>`,pt=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
100
+ <path fill="currentColor" d="M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8"/>
101
+ </symbol>`,mt=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
102
+ <path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
103
+ <path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
104
+ <path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
105
+ <path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
106
+ </symbol>`,ht=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
107
+ <path fill="currentColor" d="M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65" class="bg" opacity=".8"/>
108
+ <path fill="currentColor" d="M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64" class="fg"/>
109
+ </symbol>`,gt=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
110
+ <path fill="currentColor" d="M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65"/>
111
+ <path fill="currentColor" fill-rule="evenodd" d="M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7" clip-rule="evenodd"/>
112
+ </symbol>`,_t=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
113
+ <path fill="currentColor" fill-rule="evenodd" d="M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7" clip-rule="evenodd"/>
114
+ </symbol>`,vt=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
115
+ <path fill="currentColor" fill-rule="evenodd" d="M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z" clip-rule="evenodd"/>
116
+ </symbol>`,yt=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
117
+ <path fill="currentColor" fill-rule="evenodd" d="M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z" clip-rule="evenodd"/>
118
+ </symbol>`,bt=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
119
+ <path fill="currentColor" d="M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1"/>
120
+ <path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
121
+ </symbol>`,xt=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
122
+ <path fill="currentColor" d="m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z"/>
123
+ </symbol>`,St=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
124
+ <path fill="currentColor" d="M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/>
125
+ <path fill="currentColor" d="M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1" opacity=".5"/>
126
+ </symbol>`,Ct=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
127
+ <path fill="currentColor" d="M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4"/>
128
+ <path fill="currentColor" fill-rule="evenodd" d="M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27" clip-rule="evenodd"/>
129
+ </symbol>`,wt=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
130
+ <path fill="currentColor" d="M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7"/>
131
+ </symbol>`,Tt=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
132
+ <path fill="currentColor" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" opacity=".4"/>
133
+ <path fill="currentColor" d="M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
134
+ </symbol>`,Et=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
135
+ <path fill="currentColor" fill-rule="evenodd" d="M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8" clip-rule="evenodd"/>
136
+ </symbol>`,Dt=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
137
+ <path fill="currentColor" d="M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z"/>
138
+ </symbol>`,Ot=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
139
+ <path fill="currentColor" fill-rule="evenodd" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" clip-rule="evenodd" opacity=".4"/>
140
+ <path fill="currentColor" d="M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z"/>
141
+ </symbol>`,kt=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
142
+ <path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
143
+ <path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z"/>
144
+ </symbol>`,At=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
145
+ <path fill="currentColor" d="M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z"/>
146
+ </symbol>`,jt=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
147
+ <path fill="currentColor" d="m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z" opacity=".75"/>
148
+ <path fill="currentColor" d="M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z" opacity=".65"/>
149
+ <path fill="currentColor" d="M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z"/>
150
+ </symbol>`,Mt=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
151
+ <path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
152
+ <path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
153
+ </symbol>`,Nt=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
154
+ <path fill="currentColor" d="M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z" class="subtract" opacity=".2"/>
155
+ <path fill="currentColor" d="M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z"/>
156
+ <path fill="currentColor" fill-rule="evenodd" d="M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z" clip-rule="evenodd"/>
157
+ </symbol>`,Pt=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
158
+ <path fill="currentColor" d="M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z" class="bg" opacity=".4"/>
159
+ <path fill="currentColor" d="m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z" class="fg"/>
160
+ </symbol>`,Ft=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
161
+ <path fill="currentColor" d="M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/>
162
+ </symbol>`,It=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
163
+ <path fill="currentColor" d="m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z"/>
164
+ <path fill="currentColor" d="M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z"/>
165
+ </symbol>`,Lt=[Ue,Je,Xe,Ze,Qe,$e,nt,rt,it,ot,st,L,R,ct,lt,ht,_t,vt,wt,Tt,Ot,kt,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
166
+ <path fill="currentColor" d="M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z" class="bg" opacity=".5"/>
167
+ <path fill="currentColor" fill-rule="evenodd" d="M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z" class="fg" clip-rule="evenodd"/>
168
+ </symbol>`],Rt=[Ve,He,We,Ge,Ke,qe,Ye,et,tt,at,ut,dt,ft,pt,mt,gt,yt,bt,xt,St,Ct,Et,Dt,At,jt,Mt,Nt,Pt,Ft,It];function zt(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
169
+ `)}\n</svg>`)}var Bt=zt(Be,Lt),Vt={minimal:Be,standard:Bt,complete:zt(Bt,Rt)},Ht={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},Ut={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},Wt={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},Gt=new Set([`bash`,`c`,`cpp`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),Kt=new Set([`complete`]);function qt(e){return Vt[e===`none`?`minimal`:e]}function Jt(e){return`file-tree-builtin-${e}`}function Yt(e){return e!==`none`&&Kt.has(e)}function Xt(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=Ht[t.toLowerCase()];if(i!=null&&(r||Gt.has(i)))return i;for(let e of n){if(r){let t=Wt[e];if(t!=null)return t}let t=Ut[e];if(t!=null&&(r||Gt.has(t)))return t}return`default`}var Zt=`file-tree-container`,Qt=`data-file-tree-style`,$t=`data-file-tree-unsafe-css`,en=`data-file-tree-scrollbar-measure`,tn=`data-file-tree-scrollbar-gutter-measured`,nn=`--trees-scrollbar-gutter-measured`,rn=`header`,an=`context-menu`,on=`context-menu-trigger`;function sn(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function cn(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(sn(e)?`none`:`complete`),colored:e.colored??!0}}var ln={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function un(e,t){if(typeof e==`number`)return{itemHeight:t??ln.default.itemHeight,factor:e};let n=ln[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var dn=ln.default.itemHeight,fn=`@layer base {
170
+ :host {
171
+ --trees-accent: var(--trees-accent-override, #009fff);
172
+ --trees-fg: var(--trees-fg-override, var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1)));
173
+ --trees-fg-muted: var(--trees-fg-muted-override, var(--trees-theme-sidebar-header-fg, light-dark(#84848a, #84848a)));
174
+ --trees-bg: var(--trees-bg-override, var(--trees-theme-sidebar-bg, light-dark(#f8f8f8, #141415)));
175
+ --trees-bg-muted: var(--trees-bg-muted-override, var(--trees-theme-list-hover-bg, light-dark(color-mix(in lab,
176
+ var(--trees-accent) var(--trees-bg-alpha-light, 8%),
177
+ var(--trees-bg)), color-mix(in lab,
178
+ var(--trees-accent) var(--trees-bg-alpha-dark, 10%),
179
+ var(--trees-bg)))));
180
+ --trees-input-bg: var(--trees-input-bg-override, light-dark(#f8f8f8, #070707));
181
+ --trees-added-light: #16a994;
182
+ --trees-added-dark: #00cab1;
183
+ --trees-ignored-light: #adadb1;
184
+ --trees-ignored-dark: #4a4a4e;
185
+ --trees-modified-light: #1ca1c7;
186
+ --trees-modified-dark: #08c0ef;
187
+ --trees-renamed-light: #d5a910;
188
+ --trees-renamed-dark: #ffd452;
189
+ --trees-untracked-light: #16a994;
190
+ --trees-untracked-dark: #00cab1;
191
+ --trees-deleted-light: #ff2e3f;
192
+ --trees-deleted-dark: #ff6762;
193
+ --trees-border-color: var(--trees-border-color-override, var(--trees-theme-sidebar-border, light-dark(#eeeeef, #070707)));
194
+ --trees-indent-guide-bg: var(--trees-indent-guide-bg-override, color-mix(in lab, var(--trees-fg-muted) 25%, transparent));
195
+ --trees-density: var(--trees-density-override, 1);
196
+ --trees-border-radius: var(--trees-border-radius-override, calc(6px * var(--trees-density)));
197
+ --trees-font-family: var(--trees-font-family-override, system-ui);
198
+ --trees-font-size: var(--trees-font-size-override, 13px);
199
+ --trees-font-weight-regular: var(--trees-font-weight-regular-override, 400);
200
+ --trees-font-weight-semibold: var(--trees-font-weight-semibold-override, 600);
201
+ --trees-focus-ring-color: var(--trees-focus-ring-color-override, var(--trees-theme-focus-ring, var(--trees-accent)));
202
+ --trees-focus-ring-width: var(--trees-focus-ring-width-override, 1px);
203
+ --trees-focus-ring-offset: var(--trees-focus-ring-offset-override, -1px);
204
+ --trees-search-fg: var(--trees-search-fg-override, var(--trees-theme-input-fg, var(--trees-fg)));
205
+ --trees-search-font-weight: var(--trees-search-font-weight-override, 600);
206
+ --trees-search-bg: var(--trees-search-bg-override, var(--trees-theme-input-bg, var(--trees-input-bg)));
207
+ --trees-scrollbar-thumb: var(--trees-scrollbar-thumb-override, var(--trees-theme-scrollbar-thumb, color-mix(in lab, var(--trees-fg) 25%, var(--trees-bg))));
208
+ --trees-selected-fg: var(--trees-selected-fg-override, var(--trees-theme-list-active-selection-fg, var(--trees-fg)));
209
+ --trees-selected-bg: var(--trees-selected-bg-override, var(--trees-theme-list-active-selection-bg, light-dark(color-mix(in lab, var(--trees-accent) 12%, var(--trees-bg)), color-mix(in lab, var(--trees-accent) 15%, var(--trees-bg)))));
210
+ --trees-selected-focused-border-color: var(--trees-selected-focused-border-color-override, var(--trees-theme-focus-ring, var(--trees-accent)));
211
+ --trees-status-added: var(--trees-status-added-override, var(--trees-theme-git-added-fg, light-dark(var(--trees-added-light), var(--trees-added-dark))));
212
+ --trees-status-ignored: var(--trees-status-ignored-override, var(--trees-theme-git-ignored-fg, light-dark(var(--trees-ignored-light), var(--trees-ignored-dark))));
213
+ --trees-status-modified: var(--trees-status-modified-override, var(--trees-theme-git-modified-fg, light-dark(var(--trees-modified-light), var(--trees-modified-dark))));
214
+ --trees-status-renamed: var(--trees-status-renamed-override, var(--trees-theme-git-renamed-fg, light-dark(var(--trees-renamed-light), var(--trees-renamed-dark))));
215
+ --trees-status-untracked: var(--trees-status-untracked-override, var(--trees-theme-git-untracked-fg, light-dark(var(--trees-untracked-light), var(--trees-untracked-dark))));
216
+ --trees-status-deleted: var(--trees-status-deleted-override, var(--trees-theme-git-deleted-fg, light-dark(var(--trees-deleted-light), var(--trees-deleted-dark))));
217
+ --trees-git-modified-color: var(--trees-git-modified-color-override, var(--trees-status-modified));
218
+ --trees-git-added-color: var(--trees-git-added-color-override, var(--trees-status-added));
219
+ --trees-git-ignored-color: var(--trees-git-ignored-color-override, var(--trees-status-ignored));
220
+ --trees-git-deleted-color: var(--trees-git-deleted-color-override, var(--trees-status-deleted));
221
+ --trees-git-renamed-color: var(--trees-git-renamed-color-override, var(--trees-status-renamed));
222
+ --trees-git-untracked-color: var(--trees-git-untracked-color-override, var(--trees-status-untracked));
223
+ --trees-icon-gray: light-dark(#84848a, #adadb1);
224
+ --trees-icon-red: light-dark(#d52c36, #ff6762);
225
+ --trees-icon-vermilion: light-dark(#ff8c5b, #d5512f);
226
+ --trees-icon-orange: light-dark(#d47628, #ffa359);
227
+ --trees-icon-yellow: light-dark(#d5a910, #ffd452);
228
+ --trees-icon-green: light-dark(#199f43, #5ecc71);
229
+ --trees-icon-teal: light-dark(#17a5af, #64d1db);
230
+ --trees-icon-cyan: light-dark(#1ca1c7, #68cdf2);
231
+ --trees-icon-blue: light-dark(#1a85d4, #69b1ff);
232
+ --trees-icon-indigo: light-dark(#693acf, #9d6afb);
233
+ --trees-icon-purple: light-dark(#a631be, #d568ea);
234
+ --trees-icon-pink: light-dark(#d32a61, #ff678d);
235
+ --trees-icon-mauve: light-dark(#594c5b, #79697b);
236
+ --trees-file-icon-color-default: var(--trees-file-icon-color, var(--trees-icon-gray));
237
+ --trees-file-icon-color-astro: var(--trees-file-icon-color, var(--trees-icon-purple));
238
+ --trees-file-icon-color-babel: var(--trees-file-icon-color, var(--trees-icon-yellow));
239
+ --trees-file-icon-color-bash: var(--trees-file-icon-color, var(--trees-icon-green));
240
+ --trees-file-icon-color-biome: var(--trees-file-icon-color, var(--trees-icon-blue));
241
+ --trees-file-icon-color-bootstrap: var(--trees-file-icon-color, var(--trees-icon-indigo));
242
+ --trees-file-icon-color-browserslist: var(--trees-file-icon-color, var(--trees-icon-yellow));
243
+ --trees-file-icon-color-bun: var(--trees-file-icon-color, var(--trees-icon-mauve));
244
+ --trees-file-icon-color-c: var(--trees-file-icon-color, var(--trees-icon-blue));
245
+ --trees-file-icon-color-cpp: var(--trees-file-icon-color, var(--trees-icon-blue));
246
+ --trees-file-icon-color-claude: var(--trees-file-icon-color, var(--trees-icon-orange));
247
+ --trees-file-icon-color-css: var(--trees-file-icon-color, var(--trees-icon-indigo));
248
+ --trees-file-icon-color-database: var(--trees-file-icon-color, var(--trees-icon-purple));
249
+ --trees-file-icon-color-docker: var(--trees-file-icon-color, var(--trees-icon-blue));
250
+ --trees-file-icon-color-eslint: var(--trees-file-icon-color, var(--trees-icon-indigo));
251
+ --trees-file-icon-color-git: var(--trees-file-icon-vermilion, var(--trees-icon-vermilion));
252
+ --trees-file-icon-color-go: var(--trees-file-icon-color, var(--trees-icon-cyan));
253
+ --trees-file-icon-color-graphql: var(--trees-file-icon-color, var(--trees-icon-pink));
254
+ --trees-file-icon-color-html: var(--trees-file-icon-color, var(--trees-icon-orange));
255
+ --trees-file-icon-color-image: var(--trees-file-icon-color, var(--trees-icon-pink));
256
+ --trees-file-icon-color-javascript: var(--trees-file-icon-color, var(--trees-icon-yellow));
257
+ --trees-file-icon-color-json: var(--trees-file-icon-color, var(--trees-icon-orange));
258
+ --trees-file-icon-color-markdown: var(--trees-file-icon-color, var(--trees-icon-green));
259
+ --trees-file-icon-color-mcp: var(--trees-file-icon-color, var(--trees-icon-teal));
260
+ --trees-file-icon-color-npm: var(--trees-file-icon-color, var(--trees-icon-red));
261
+ --trees-file-icon-color-oxc: var(--trees-file-icon-cyan, var(--trees-icon-cyan));
262
+ --trees-file-icon-color-postcss: var(--trees-file-icon-color, var(--trees-icon-red));
263
+ --trees-file-icon-color-prettier: var(--trees-file-icon-color, var(--trees-icon-teal));
264
+ --trees-file-icon-color-python: var(--trees-file-icon-color, var(--trees-icon-blue));
265
+ --trees-file-icon-color-react: var(--trees-file-icon-color, var(--trees-icon-cyan));
266
+ --trees-file-icon-color-ruby: var(--trees-file-icon-color, var(--trees-icon-red));
267
+ --trees-file-icon-color-rust: var(--trees-file-icon-color, var(--trees-icon-orange));
268
+ --trees-file-icon-color-sass: var(--trees-file-icon-color, var(--trees-icon-pink));
269
+ --trees-file-icon-color-svg: var(--trees-file-icon-color, var(--trees-icon-orange));
270
+ --trees-file-icon-color-svelte: var(--trees-file-icon-color, var(--trees-icon-red));
271
+ --trees-file-icon-color-svgo: var(--trees-file-icon-color, var(--trees-icon-green));
272
+ --trees-file-icon-color-swift: var(--trees-file-icon-color, var(--trees-icon-orange));
273
+ --trees-file-icon-color-table: var(--trees-file-icon-color, var(--trees-icon-teal));
274
+ --trees-file-icon-color-text: var(--trees-file-icon-color, var(--trees-icon-gray));
275
+ --trees-file-icon-color-tailwind: var(--trees-file-icon-color, var(--trees-icon-cyan));
276
+ --trees-file-icon-color-terraform: var(--trees-file-icon-color, var(--trees-icon-indigo));
277
+ --trees-file-icon-color-typescript: var(--trees-file-icon-color, var(--trees-icon-blue));
278
+ --trees-file-icon-color-vite: var(--trees-file-icon-color, var(--trees-icon-purple));
279
+ --trees-file-icon-color-vscode: var(--trees-file-icon-color, var(--trees-icon-blue));
280
+ --trees-file-icon-color-vue: var(--trees-file-icon-color, var(--trees-icon-green));
281
+ --trees-file-icon-color-wasm: var(--trees-file-icon-color, var(--trees-icon-indigo));
282
+ --trees-file-icon-color-webpack: var(--trees-file-icon-color, var(--trees-icon-blue));
283
+ --trees-file-icon-color-yml: var(--trees-file-icon-color, var(--trees-icon-red));
284
+ --trees-file-icon-color-zig: var(--trees-file-icon-color, var(--trees-icon-orange));
285
+ --trees-file-icon-color-zip: var(--trees-file-icon-color, var(--trees-icon-orange));
286
+ --trees-level-gap: var(--trees-level-gap-override, calc(8px * var(--trees-density)));
287
+ --trees-item-padding-x: var(--trees-item-padding-x-override, calc(8px * var(--trees-density)));
288
+ --trees-item-margin-x: var(--trees-item-margin-x-override, calc(2px * var(--trees-density)));
289
+ --trees-item-row-gap: var(--trees-item-row-gap-override, calc(6px * var(--trees-density)));
290
+ --trees-icon-width: var(--trees-icon-width-override, 16px);
291
+ --trees-icon-nudge: var(--trees-icon-nudge-override, calc(1px * var(--trees-density)));
292
+ --trees-row-height: var(--trees-item-height, 30px);
293
+ --trees-git-lane-width: var(--trees-git-lane-width-override, 12px);
294
+ --trees-action-lane-width: var(--trees-action-lane-width-override, calc(var(--trees-icon-width) + 2px));
295
+ --trees-context-menu-trigger-inline-offset: calc(var(--trees-padding-inline) + var(--trees-item-padding-x) -
296
+ var(--trees-focus-ring-width));
297
+ --trees-scrollbar-gutter: var(--trees-scrollbar-gutter-override, 6px);
298
+ --trees-padding-inline: var(--trees-padding-inline-override, 16px);
299
+ color-scheme: light dark;
300
+ font-size: var(--trees-font-size);
301
+ color: var(--trees-fg);
302
+ background-color: var(--trees-bg);
303
+ --truncate-marker-background-color: var(--trees-bg);
304
+ --truncate-marker-background-overlay-color: transparent;
305
+ font-family: var(--trees-font-family);
306
+ font-weight: var(--trees-font-weight-regular);
307
+ flex-direction: column;
308
+ display: flex;
309
+ }
310
+
311
+ :host([data-file-tree-virtualized="true"]) {
312
+ height: 100%;
313
+ overflow: hidden;
314
+ }
315
+
316
+ [data-file-tree-virtualized-wrapper="true"], [data-file-tree-virtualized-root="true"] {
317
+ flex-direction: column;
318
+ height: 100%;
319
+ display: flex;
320
+ overflow: hidden;
321
+ }
322
+
323
+ [data-file-tree-virtualized-scroll="true"], [data-file-tree-scrollbar-measure="true"] {
324
+ --trees-scrollbar-thumb-current: transparent;
325
+ scrollbar-gutter: stable;
326
+ overflow-y: auto;
327
+
328
+ &:hover {
329
+ --trees-scrollbar-thumb-current: var(--trees-scrollbar-thumb);
330
+ }
331
+
332
+ &::-webkit-scrollbar {
333
+ width: var(--trees-scrollbar-gutter);
334
+ height: var(--trees-scrollbar-gutter);
335
+ }
336
+
337
+ &::-webkit-scrollbar-track {
338
+ background: none;
339
+ }
340
+
341
+ &::-webkit-scrollbar-thumb {
342
+ background-color: var(--trees-scrollbar-thumb-current);
343
+ border-radius: calc(var(--trees-scrollbar-gutter) / 2);
344
+ background-clip: content-box;
345
+ border: 1px solid #0000;
346
+ }
347
+
348
+ &::-webkit-scrollbar-corner {
349
+ background-color: #0000;
350
+ }
351
+ }
352
+
353
+ [data-file-tree-scrollbar-measure="true"] {
354
+ visibility: hidden;
355
+ pointer-events: none;
356
+ width: 100px;
357
+ height: 100px;
358
+ position: absolute;
359
+ top: 0;
360
+ left: 0;
361
+ }
362
+
363
+ @supports ((-moz-appearance: none)) {
364
+ [data-file-tree-virtualized-scroll="true"], [data-file-tree-scrollbar-measure="true"] {
365
+ scrollbar-width: thin;
366
+ scrollbar-color: var(--trees-scrollbar-thumb-current) transparent;
367
+ }
368
+ }
369
+
370
+ [data-file-tree-virtualized-scroll="true"] {
371
+ min-height: 0;
372
+ padding-inline: max(calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
373
+ 0px)
374
+ /* NOTE(amadeus): We can assume that all Webkit based browser gutters
375
+ * will align to the value of '--trees-scrollbar-gutter', however if not, then
376
+ * \`--trees-scrollbar-gutter-measured\` should correct it. Mostly we are
377
+ * hoping to avoid SSR alignment jumps if possible. In non-SSR'd environments
378
+ * \`--trees-scrollbar-gutter-measured\` should always be immediately available.
379
+ */
380
+ max(calc(var(--trees-padding-inline) - var(--trees-item-margin-x) -
381
+ var(--trees-scrollbar-gutter-measured, var(--trees-scrollbar-gutter))),
382
+ 0px);
383
+ flex: 1 1 0;
384
+ position: relative;
385
+ overflow-y: auto;
386
+ }
387
+
388
+ @supports ((-moz-appearance: none)) {
389
+ [data-file-tree-virtualized-scroll="true"] {
390
+ padding-inline: max(calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
391
+ 0px)
392
+ /* NOTE(amadeus): However on Firefox it can vary a little bit, but most
393
+ * likely the majority of cases will default to a 0px width scrollbar lets
394
+ * inherit that first to avoid SSR jumps. In non-SSR'd environments
395
+ * \`--trees-scrollbar-gutter-measured\` should always be immediately available.
396
+ */
397
+ max(calc(var(--trees-padding-inline) - var(--trees-item-margin-x) -
398
+ var(--trees-scrollbar-gutter-measured, 0px)),
399
+ 0px);
400
+ }
401
+ }
402
+
403
+ [data-file-tree-sticky-overlay="true"] {
404
+ z-index: 4;
405
+ pointer-events: none;
406
+ height: 0;
407
+ position: sticky;
408
+ top: 0;
409
+ overflow: visible;
410
+ }
411
+
412
+ [data-file-tree-virtualized-root="true"][data-scroll-at-top="true"]:not([data-overlay-reveal]) [data-file-tree-sticky-overlay="true"] {
413
+ visibility: hidden;
414
+ }
415
+
416
+ [data-file-tree-sticky-overlay-content="true"] {
417
+ background-color: var(--trees-bg);
418
+ pointer-events: none;
419
+ position: relative;
420
+ }
421
+
422
+ [data-file-tree-virtualized-list="true"] {
423
+ background-color: var(--trees-bg);
424
+ overflow-anchor: none;
425
+ width: 100%;
426
+ min-height: 100%;
427
+ position: relative;
428
+
429
+ &[data-is-scrolling] {
430
+ pointer-events: none;
431
+ }
432
+ }
433
+
434
+ [data-file-tree-virtualized-sticky-offset="true"] {
435
+ contain: layout size;
436
+ }
437
+
438
+ [data-file-tree-virtualized-sticky="true"] {
439
+ isolation: isolate;
440
+ will-change: transform;
441
+ flex-direction: column;
442
+ width: 100%;
443
+ display: flex;
444
+ position: sticky;
445
+ top: 0;
446
+ }
447
+
448
+ [data-file-tree-search-container] {
449
+ padding: 0;
450
+ padding-inline: var(--trees-padding-inline);
451
+ margin-bottom: var(--trees-item-row-gap);
452
+ display: flex;
453
+ }
454
+
455
+ [data-file-tree-search-input] {
456
+ --trees-focus-ring-width: 2px;
457
+ font-family: var(--trees-font-family);
458
+ font-size: var(--trees-font-size);
459
+ height: var(--trees-row-height);
460
+ padding-inline: var(--trees-item-padding-x);
461
+ line-height: var(--trees-row-height);
462
+ color: var(--trees-search-fg);
463
+ background-color: var(--trees-search-bg);
464
+ border: 1px solid var(--trees-border-color);
465
+ border-radius: var(--trees-border-radius);
466
+ outline: none;
467
+ flex: 1;
468
+ margin-block: 1px;
469
+
470
+ &::placeholder {
471
+ color: color-mix(in lab,
472
+ var(--trees-search-fg) 65%,
473
+ var(--trees-search-bg));
474
+ }
475
+
476
+ &:focus-visible, &[data-file-tree-search-input-fake-focus="true"] {
477
+ outline: var(--trees-focus-ring-width) solid var(--trees-focus-ring-color);
478
+ outline-offset: var(--trees-focus-ring-offset);
479
+ }
480
+ }
481
+
482
+ [role="tree"] {
483
+ gap: var(--trees-gap-override, 0);
484
+ flex-direction: column;
485
+ display: flex;
486
+ position: relative;
487
+ }
488
+
489
+ [data-type="item"] {
490
+ color: inherit;
491
+ font-family: var(--trees-font-family);
492
+ font-size: var(--trees-font-size);
493
+ text-align: start;
494
+ background-color: var(--trees-bg);
495
+ padding: 0 var(--trees-item-padding-x);
496
+ margin: 0 var(--trees-item-margin-x);
497
+ cursor: pointer;
498
+ user-select: none;
499
+ -webkit-touch-callout: none;
500
+ touch-action: manipulation;
501
+ flex: 0 0 var(--trees-row-height);
502
+ height: var(--trees-row-height);
503
+ line-height: var(--trees-row-height);
504
+ align-items: center;
505
+ gap: var(--trees-item-row-gap);
506
+ border-radius: var(--trees-border-radius);
507
+ --truncate-marker-background-color: var(--trees-bg);
508
+ --truncate-marker-background-overlay-color: transparent;
509
+ --truncate-marker-block-inset: 0px;
510
+ border: none;
511
+ outline: none;
512
+ display: flex;
513
+ position: relative;
514
+
515
+ &:hover, &[data-item-context-hover="true"] {
516
+ background-color: var(--trees-bg-muted);
517
+ --truncate-marker-background-overlay-color: var(--trees-bg-muted);
518
+ }
519
+
520
+ &[data-item-focused="true"], &:focus-visible {
521
+ z-index: 2;
522
+
523
+ & [data-item-flattened-subitems] {
524
+ --truncate-marker-block-inset: var(--trees-focus-ring-width);
525
+ }
526
+
527
+ &:before {
528
+ content: "";
529
+ border-radius: var(--trees-border-radius);
530
+ outline: var(--trees-focus-ring-width) solid
531
+ var(--trees-focus-ring-color);
532
+ outline-offset: var(--trees-focus-ring-offset);
533
+ pointer-events: none;
534
+ display: block;
535
+ position: absolute;
536
+ inset: 0;
537
+ }
538
+
539
+ &[data-item-selected="true"]:before {
540
+ outline-color: var(--trees-selected-focused-border-color);
541
+ }
542
+ }
543
+
544
+ &[data-item-selected="true"] {
545
+ color: var(--trees-selected-fg);
546
+ background-color: var(--trees-selected-bg);
547
+ --truncate-marker-background-overlay-color: var(--trees-selected-bg);
548
+ z-index: 3;
549
+
550
+ & [data-item-section="icon"] {
551
+ color: var(--trees-selected-fg);
552
+ }
553
+ }
554
+
555
+ &[data-item-search-match="true"] {
556
+ font-weight: var(--trees-search-font-weight);
557
+ }
558
+ }
559
+
560
+ [data-type="item"][data-file-tree-sticky-row="true"] {
561
+ pointer-events: auto;
562
+ }
563
+
564
+ [data-file-tree-virtualized-root="true"][data-is-scrolling] [data-type="item"][data-file-tree-sticky-row="true"] {
565
+ pointer-events: none;
566
+ }
567
+
568
+ [data-file-tree-virtualized-root="true"][data-is-scrolling] [data-type="item"][data-file-tree-sticky-row="true"]:hover:not([data-item-selected="true"]), [data-file-tree-virtualized-root="true"][data-is-scrolling] [data-type="item"][data-file-tree-sticky-row="true"][data-item-context-hover="true"]:not([data-item-selected="true"]) {
569
+ background-color: var(--trees-bg);
570
+ --truncate-marker-background-overlay-color: transparent;
571
+ }
572
+
573
+ [data-item-selected="true"]:has( + [data-item-selected="true"]) {
574
+ border-bottom-right-radius: 0;
575
+ border-bottom-left-radius: 0;
576
+ }
577
+
578
+ [data-item-selected="true"] + [data-item-selected="true"] {
579
+ border-top-left-radius: 0;
580
+ border-top-right-radius: 0;
581
+ }
582
+
583
+ [data-item-flattened-subitems] {
584
+ align-items: center;
585
+ gap: 2px;
586
+ display: inline-flex;
587
+ }
588
+
589
+ [data-item-flattened-subitem]:hover, [data-item-flattened-subitem-drag-target="true"] {
590
+ text-decoration: underline;
591
+ }
592
+
593
+ [data-item-section="icon"] {
594
+ color: var(--trees-fg-muted);
595
+ fill: currentColor;
596
+ width: var(--trees-icon-width);
597
+ flex-shrink: 0;
598
+ justify-content: center;
599
+ align-items: center;
600
+ display: flex;
601
+ }
602
+
603
+ :where([data-item-section="icon"] > [data-icon-token]) {
604
+ color: var(--trees-fg-muted);
605
+ }
606
+
607
+ [data-file-tree-colored-icons="true"] {
608
+ & [data-icon-token="astro"] {
609
+ color: var(--trees-file-icon-color-astro);
610
+ }
611
+
612
+ & [data-icon-token="babel"] {
613
+ color: var(--trees-file-icon-color-babel);
614
+ }
615
+
616
+ & [data-icon-token="bash"] {
617
+ color: var(--trees-file-icon-color-bash);
618
+ }
619
+
620
+ & [data-icon-token="biome"] {
621
+ color: var(--trees-file-icon-color-biome);
622
+ }
623
+
624
+ & [data-icon-token="bootstrap"] {
625
+ color: var(--trees-file-icon-color-bootstrap);
626
+ }
627
+
628
+ & [data-icon-token="browserslist"] {
629
+ color: var(--trees-file-icon-color-browserslist);
630
+ }
631
+
632
+ & [data-icon-token="bun"] {
633
+ color: var(--trees-file-icon-color-bun);
634
+ }
635
+
636
+ & [data-icon-token="c"] {
637
+ color: var(--trees-file-icon-color-c);
638
+ }
639
+
640
+ & [data-icon-token="cpp"] {
641
+ color: var(--trees-file-icon-color-cpp);
642
+ }
643
+
644
+ & [data-icon-token="claude"] {
645
+ color: var(--trees-file-icon-color-claude);
646
+ }
647
+
648
+ & [data-icon-token="css"] {
649
+ color: var(--trees-file-icon-color-css);
650
+ }
651
+
652
+ & [data-icon-token="database"] {
653
+ color: var(--trees-file-icon-color-database);
654
+ }
655
+
656
+ & [data-icon-token="default"] {
657
+ color: var(--trees-file-icon-color-default);
658
+ }
659
+
660
+ & [data-icon-token="docker"] {
661
+ color: var(--trees-file-icon-color-docker);
662
+ }
663
+
664
+ & [data-icon-token="eslint"] {
665
+ color: var(--trees-file-icon-color-eslint);
666
+ }
667
+
668
+ & [data-icon-token="git"] {
669
+ color: var(--trees-file-icon-color-git);
670
+ }
671
+
672
+ & [data-icon-token="go"] {
673
+ color: var(--trees-file-icon-color-go);
674
+ }
675
+
676
+ & [data-icon-token="graphql"] {
677
+ color: var(--trees-file-icon-color-graphql);
678
+ }
679
+
680
+ & [data-icon-token="html"] {
681
+ color: var(--trees-file-icon-color-html);
682
+ }
683
+
684
+ & [data-icon-token="image"] {
685
+ color: var(--trees-file-icon-color-image);
686
+ }
687
+
688
+ & [data-icon-token="javascript"] {
689
+ color: var(--trees-file-icon-color-javascript);
690
+ }
691
+
692
+ & [data-icon-token="json"] {
693
+ color: var(--trees-file-icon-color-json);
694
+ }
695
+
696
+ & [data-icon-token="markdown"] {
697
+ color: var(--trees-file-icon-color-markdown);
698
+ }
699
+
700
+ & [data-icon-token="mcp"] {
701
+ color: var(--trees-file-icon-color-mcp);
702
+ }
703
+
704
+ & [data-icon-token="npm"] {
705
+ color: var(--trees-file-icon-color-npm);
706
+ }
707
+
708
+ & [data-icon-token="oxc"] {
709
+ color: var(--trees-file-icon-color-oxc);
710
+ }
711
+
712
+ & [data-icon-token="postcss"] {
713
+ color: var(--trees-file-icon-color-postcss);
714
+ }
715
+
716
+ & [data-icon-token="prettier"] {
717
+ color: var(--trees-file-icon-color-prettier);
718
+ }
719
+
720
+ & [data-icon-token="python"] {
721
+ color: var(--trees-file-icon-color-python);
722
+ }
723
+
724
+ & [data-icon-token="react"] {
725
+ color: var(--trees-file-icon-color-react);
726
+ }
727
+
728
+ & [data-icon-token="ruby"] {
729
+ color: var(--trees-file-icon-color-ruby);
730
+ }
731
+
732
+ & [data-icon-token="rust"] {
733
+ color: var(--trees-file-icon-color-rust);
734
+ }
735
+
736
+ & [data-icon-token="sass"] {
737
+ color: var(--trees-file-icon-color-sass);
738
+ }
739
+
740
+ & [data-icon-token="svg"] {
741
+ color: var(--trees-file-icon-color-svg);
742
+ }
743
+
744
+ & [data-icon-token="svelte"] {
745
+ color: var(--trees-file-icon-color-svelte);
746
+ }
747
+
748
+ & [data-icon-token="svgo"] {
749
+ color: var(--trees-file-icon-color-svgo);
750
+ }
751
+
752
+ & [data-icon-token="swift"] {
753
+ color: var(--trees-file-icon-color-swift);
754
+ }
755
+
756
+ & [data-icon-token="table"] {
757
+ color: var(--trees-file-icon-color-table);
758
+ }
759
+
760
+ & [data-icon-token="text"] {
761
+ color: var(--trees-file-icon-color-text);
762
+ }
763
+
764
+ & [data-icon-token="tailwind"] {
765
+ color: var(--trees-file-icon-color-tailwind);
766
+ }
767
+
768
+ & [data-icon-token="terraform"] {
769
+ color: var(--trees-file-icon-color-terraform);
770
+ }
771
+
772
+ & [data-icon-token="typescript"] {
773
+ color: var(--trees-file-icon-color-typescript);
774
+ }
775
+
776
+ & [data-icon-token="vite"] {
777
+ color: var(--trees-file-icon-color-vite);
778
+ }
779
+
780
+ & [data-icon-token="vscode"] {
781
+ color: var(--trees-file-icon-color-vscode);
782
+ }
783
+
784
+ & [data-icon-token="vue"] {
785
+ color: var(--trees-file-icon-color-vue);
786
+ }
787
+
788
+ & [data-icon-token="wasm"] {
789
+ color: var(--trees-file-icon-color-wasm);
790
+ }
791
+
792
+ & [data-icon-token="webpack"] {
793
+ color: var(--trees-file-icon-color-webpack);
794
+ }
795
+
796
+ & [data-icon-token="yml"] {
797
+ color: var(--trees-file-icon-color-yml);
798
+ }
799
+
800
+ & [data-icon-token="zig"] {
801
+ color: var(--trees-file-icon-color-zig);
802
+ }
803
+
804
+ & [data-icon-token="zip"] {
805
+ color: var(--trees-file-icon-color-zip);
806
+ }
807
+ }
808
+
809
+ [data-icon-name="file-tree-icon-chevron"] {
810
+ &[data-align-capitals="false"] {
811
+ transform: translate(0, var(--trees-icon-nudge));
812
+ }
813
+
814
+ &[data-align-capitals="true"] {
815
+ transform: translate(0);
816
+ }
817
+ }
818
+
819
+ [data-item-section="content"] {
820
+ text-align: start;
821
+ text-overflow: ellipsis;
822
+ flex: 0 auto;
823
+ min-width: 0;
824
+ max-width: 100%;
825
+ overflow: hidden;
826
+ }
827
+
828
+ [data-item-section="decoration"] {
829
+ text-align: end;
830
+ min-width: 0;
831
+ color: var(--trees-fg-muted);
832
+ flex: 1 1 0;
833
+ justify-content: flex-end;
834
+ display: flex;
835
+ overflow: hidden;
836
+ }
837
+
838
+ [data-item-section="decoration"] > span {
839
+ text-overflow: ellipsis;
840
+ white-space: nowrap;
841
+ justify-content: flex-end;
842
+ align-items: center;
843
+ min-width: 0;
844
+ max-width: 100%;
845
+ display: inline-flex;
846
+ overflow: hidden;
847
+ }
848
+
849
+ [data-item-section="git"], [data-item-section="action"] {
850
+ flex: none;
851
+ justify-content: center;
852
+ align-items: center;
853
+ display: flex;
854
+ }
855
+
856
+ [data-item-section="git"] {
857
+ width: var(--trees-git-lane-width);
858
+ }
859
+
860
+ [data-item-section="action"] {
861
+ width: var(--trees-action-lane-width);
862
+ color: var(--trees-fg-muted);
863
+ fill: currentColor;
864
+ pointer-events: none;
865
+ }
866
+
867
+ [data-item-section="git"] > span, [data-item-section="action"] > span {
868
+ justify-content: center;
869
+ align-items: center;
870
+ width: 100%;
871
+ display: inline-flex;
872
+ }
873
+
874
+ [data-item-action-affordance="decorative"] {
875
+ opacity: .85;
876
+ }
877
+
878
+ [data-item-rename-input] {
879
+ appearance: none;
880
+ width: 100%;
881
+ min-width: 0;
882
+ height: calc(var(--trees-row-height) - 4px);
883
+ font-family: inherit;
884
+ font-size: inherit;
885
+ color: inherit;
886
+ box-sizing: border-box;
887
+ background-color: #0000;
888
+ border: 0;
889
+ outline: none;
890
+ padding-inline: 6px;
891
+ }
892
+
893
+ [data-item-section="content"]:has([data-item-rename-input]) ~ [data-item-section="action"], [data-item-section="content"]:has([data-item-rename-input]) ~ [data-item-section="decoration"] {
894
+ display: none;
895
+ }
896
+
897
+ [aria-expanded="false"][data-item-type="folder"] > [data-item-section="icon"] > [data-icon-name="file-tree-icon-chevron"] {
898
+ &[data-align-capitals="true"] {
899
+ transform: rotate(-90deg)
900
+ translate(calc(var(--trees-icon-nudge) / 2),
901
+ calc(var(--trees-icon-nudge) / 2));
902
+ }
903
+
904
+ &[data-align-capitals="false"] {
905
+ transform: rotate(-90deg)
906
+ translate(calc(var(--trees-icon-nudge) / 2 * -1),
907
+ calc(var(--trees-icon-nudge) / 2));
908
+ }
909
+ }
910
+
911
+ [data-item-section="spacing"] {
912
+ height: var(--trees-row-height);
913
+ padding-left: calc(calc(var(--trees-icon-width) / 2) - .5px);
914
+ flex-direction: row;
915
+ justify-content: center;
916
+ align-items: center;
917
+ display: flex;
918
+
919
+ &:empty {
920
+ padding-left: 0;
921
+ }
922
+ }
923
+
924
+ [data-item-section="spacing-item"] {
925
+ border-left: 1px solid var(--trees-indent-guide-bg);
926
+ height: 100%;
927
+ margin-right: calc(var(--trees-level-gap) - 1px);
928
+ opacity: 0;
929
+ transition: opacity .15s;
930
+ display: inline-block;
931
+ transform: translateX(-.25px);
932
+
933
+ & + & {
934
+ margin-left: calc(var(--trees-item-row-gap) + calc(var(--trees-icon-width) / 2) - .5px);
935
+ }
936
+ }
937
+
938
+ :host(:hover) [data-item-section="spacing-item"] {
939
+ opacity: .75;
940
+ }
941
+
942
+ [data-item-contains-git-change="true"] > [data-item-section="git"] {
943
+ color: var(--trees-git-modified-color);
944
+ opacity: .5;
945
+ fill: currentColor;
946
+ }
947
+
948
+ [data-item-git-status] {
949
+ & > :where([data-item-section="icon"]) > :where(:not([data-icon-name="file-tree-icon-chevron"])), & > [data-item-section="content"] {
950
+ color: var(--trees-item-git-status-color);
951
+ }
952
+
953
+ & > [data-item-section="git"] {
954
+ color: var(--trees-item-git-status-color);
955
+ font-weight: var(--trees-font-weight-semibold);
956
+ }
957
+ }
958
+
959
+ [data-item-git-status="added"] {
960
+ --trees-item-git-status-color: var(--trees-git-added-color);
961
+ }
962
+
963
+ [data-item-git-status="deleted"] {
964
+ --trees-item-git-status-color: var(--trees-git-deleted-color);
965
+ }
966
+
967
+ [data-item-git-status="ignored"] {
968
+ --trees-item-git-status-color: var(--trees-git-ignored-color);
969
+
970
+ & > [data-item-section="icon"] {
971
+ opacity: .5;
972
+ }
973
+ }
974
+
975
+ [data-item-section="git"] [data-icon-name="file-tree-icon-dot"] {
976
+ transform: translateY(calc(.65ex - 50%));
977
+ }
978
+
979
+ [data-item-git-status="modified"] {
980
+ --trees-item-git-status-color: var(--trees-git-modified-color);
981
+ }
982
+
983
+ [data-item-git-status="renamed"] {
984
+ --trees-item-git-status-color: var(--trees-git-renamed-color);
985
+ }
986
+
987
+ [data-item-git-status="untracked"] {
988
+ --trees-item-git-status-color: var(--trees-git-untracked-color);
989
+ }
990
+
991
+ [data-item-drag-target="true"] {
992
+ background-color: var(--trees-selected-bg);
993
+ }
994
+
995
+ [data-item-dragging="true"] {
996
+ opacity: .5;
997
+ }
998
+
999
+ [data-item-section="lock"] {
1000
+ color: var(--trees-fg-muted);
1001
+ flex: none;
1002
+ align-items: center;
1003
+ margin-left: auto;
1004
+ display: flex;
1005
+ }
1006
+
1007
+ [data-item-section="lock"] svg {
1008
+ display: block;
1009
+ }
1010
+
1011
+ [data-type="header-slot"] {
1012
+ flex: none;
1013
+ display: block;
1014
+ }
1015
+
1016
+ [data-type="context-menu-wash"] {
1017
+ z-index: 3;
1018
+ touch-action: none;
1019
+ background-color: #0000;
1020
+ position: absolute;
1021
+ inset: 0;
1022
+ }
1023
+
1024
+ [data-type="context-menu-anchor"] {
1025
+ top: 0;
1026
+ right: var(--trees-context-menu-trigger-inline-offset);
1027
+ z-index: 4;
1028
+ align-items: center;
1029
+ display: none;
1030
+ position: absolute;
1031
+
1032
+ &[data-visible="true"] {
1033
+ display: flex;
1034
+ }
1035
+ }
1036
+
1037
+ [data-file-tree-virtualized-root="true"][data-is-scrolling] [data-type="context-menu-anchor"] {
1038
+ display: none;
1039
+ }
1040
+
1041
+ [data-type="context-menu-anchor"] > slot[name="context-menu"] {
1042
+ flex: 0 0 0;
1043
+ width: 0;
1044
+ min-width: 0;
1045
+ display: block;
1046
+ overflow: visible;
1047
+ }
1048
+
1049
+ [data-type="context-menu-trigger"] {
1050
+ all: unset;
1051
+ width: var(--trees-action-lane-width);
1052
+ color: var(--trees-fg-muted);
1053
+ fill: currentColor;
1054
+ cursor: pointer;
1055
+ font-family: var(--trees-font-family);
1056
+ font-size: var(--trees-font-size);
1057
+ border-top-right-radius: var(--trees-border-radius);
1058
+ border-bottom-right-radius: var(--trees-border-radius);
1059
+ margin: var(--trees-focus-ring-width);
1060
+ height: calc(var(--trees-row-height) - var(--trees-focus-ring-width) * 2);
1061
+ border-width: 0;
1062
+ justify-content: center;
1063
+ align-items: center;
1064
+ transition: color .12s;
1065
+ display: flex;
1066
+ }
1067
+
1068
+ [data-type="context-menu-trigger"]:hover, [data-type="context-menu-trigger"][aria-expanded="true"] {
1069
+ color: var(--trees-fg);
1070
+ }
1071
+
1072
+ [data-truncate-container] {
1073
+ --truncate-internal-marker-fade-width: var(--truncate-marker-fade-width, 2px);
1074
+ --truncate-internal-marker-gap: var(--truncate-marker-gap, 0px);
1075
+ --truncate-internal-marker-opacity: var(--truncate-marker-opacity, 50%);
1076
+ --truncate-internal-middle-marker-opacity: var(--truncate-middle-marker-opacity, 80%);
1077
+ --truncate-internal-marker-background-color: var(--truncate-marker-background-color, light-dark(#fff, #000));
1078
+ --truncate-internal-marker-background-overlay-color: var(--truncate-marker-background-overlay-color, transparent);
1079
+ --truncate-internal-marker-block-inset: var(--truncate-marker-block-inset, 0px);
1080
+ --truncate-internal-marker-fade-out-duration: var(--truncate-marker-fade-out-duration, 0s);
1081
+ --truncate-internal-marker-fade-in-duration: var(--truncate-marker-fade-in-duration, .1s);
1082
+ --truncate-internal-fade-marker-color: var(--truncate-fade-marker-color, #000);
1083
+ --truncate-internal-fade-marker-width: var(--truncate-fade-marker-width, .2lh);
1084
+ --truncate-internal-single-line-height: 1lh;
1085
+ height: var(--truncate-internal-single-line-height);
1086
+ min-width: 0;
1087
+ margin-top: -1px;
1088
+ margin-bottom: -1px;
1089
+ overflow: hidden;
1090
+ }
1091
+
1092
+ [data-truncate-marker] {
1093
+ height: var(--truncate-internal-single-line-height);
1094
+ padding-block: var(--truncate-internal-marker-block-inset);
1095
+ box-sizing: border-box;
1096
+ z-index: 2;
1097
+ color: color-mix(in srgb,
1098
+ currentColor var(--truncate-internal-marker-opacity),
1099
+ transparent);
1100
+ opacity: 0;
1101
+ transition: opacity var(--truncate-internal-marker-fade-out-duration)
1102
+ ease-in-out;
1103
+ background-clip: content-box;
1104
+ align-items: center;
1105
+ display: flex;
1106
+ position: absolute;
1107
+ }
1108
+
1109
+ @container measure (height > 1lh) {
1110
+ [data-truncate-marker] {
1111
+ opacity: 1;
1112
+ transition: opacity var(--truncate-internal-marker-fade-in-duration)
1113
+ ease-in-out;
1114
+ }
1115
+ }
1116
+
1117
+ [data-truncate-grid] {
1118
+ display: grid;
1119
+ position: relative;
1120
+ }
1121
+
1122
+ [data-truncate-content="visible"] {
1123
+ white-space: nowrap;
1124
+ }
1125
+
1126
+ [data-truncate-content="overflow"] {
1127
+ opacity: 0;
1128
+ pointer-events: none;
1129
+ user-select: none;
1130
+ word-break: break-all;
1131
+ margin-top: calc(-1 * var(--truncate-internal-single-line-height));
1132
+ }
1133
+
1134
+ [data-truncate-marker-cell] {
1135
+ user-select: none;
1136
+ pointer-events: none;
1137
+ overflow: visible;
1138
+ container: measure / size;
1139
+ }
1140
+
1141
+ [data-truncate-container="truncate"] {
1142
+ & [data-truncate-grid] {
1143
+ grid-template-columns: minmax(0, max-content) 0;
1144
+ }
1145
+
1146
+ & [data-truncate-marker] {
1147
+ right: 0;
1148
+ }
1149
+
1150
+ & [data-truncate-fade] {
1151
+ margin-right: calc(-2 * var(--truncate-internal-fade-marker-width));
1152
+ }
1153
+ }
1154
+
1155
+ [data-truncate-container="fruncate"] {
1156
+ & [data-truncate-grid] {
1157
+ grid-template-columns: 0 minmax(0, max-content) auto;
1158
+ }
1159
+
1160
+ & [data-truncate-content] {
1161
+ direction: rtl;
1162
+ }
1163
+
1164
+ & [data-truncate-content] > span {
1165
+ unicode-bidi: plaintext;
1166
+ }
1167
+
1168
+ & [data-truncate-fade] {
1169
+ margin-left: calc(-2 * var(--truncate-internal-fade-marker-width));
1170
+ }
1171
+ }
1172
+
1173
+ [data-truncate-variant="default"] {
1174
+ & [data-truncate-marker] {
1175
+ background-color: var(--truncate-internal-marker-background-color);
1176
+ background-image: linear-gradient(var(--truncate-internal-marker-background-overlay-color),
1177
+ var(--truncate-internal-marker-background-overlay-color));
1178
+ }
1179
+
1180
+ & [data-truncate-marker]:after, & [data-truncate-marker]:before {
1181
+ content: "";
1182
+ width: calc(var(--truncate-internal-marker-fade-width) +
1183
+ var(--truncate-internal-marker-gap));
1184
+ height: max(0px,
1185
+ calc(var(--truncate-internal-single-line-height) -
1186
+ var(--truncate-internal-marker-block-inset) * 2));
1187
+ background-color: var(--truncate-internal-marker-background-color);
1188
+ background-image: linear-gradient(var(--truncate-internal-marker-background-overlay-color),
1189
+ var(--truncate-internal-marker-background-overlay-color));
1190
+ -webkit-mask-image: linear-gradient(var(--truncate-internal-fade-dir),
1191
+ #000 0%,
1192
+ #000 var(--truncate-internal-marker-gap),
1193
+ transparent 100%);
1194
+ mask-image: linear-gradient(var(--truncate-internal-fade-dir),
1195
+ #000 0%,
1196
+ #000 var(--truncate-internal-marker-gap),
1197
+ transparent 100%);
1198
+ position: absolute;
1199
+ inset-block-start: var(--truncate-internal-marker-block-inset);
1200
+ }
1201
+
1202
+ & [data-truncate-marker]:after {
1203
+ --truncate-internal-fade-dir: to right;
1204
+ right: calc(-1 *
1205
+ (
1206
+ var(--truncate-internal-marker-fade-width) +
1207
+ var(--truncate-internal-marker-gap)
1208
+ ));
1209
+ }
1210
+
1211
+ & [data-truncate-marker]:before {
1212
+ --truncate-internal-fade-dir: to left;
1213
+ left: calc(-1 *
1214
+ (
1215
+ var(--truncate-internal-marker-fade-width) +
1216
+ var(--truncate-internal-marker-gap)
1217
+ ));
1218
+ }
1219
+ }
1220
+
1221
+ [data-truncate-variant="fade"] {
1222
+ & [data-truncate-marker] {
1223
+ background: none;
1224
+ }
1225
+ }
1226
+
1227
+ [data-truncate-fade] {
1228
+ box-shadow: 0 0 calc(var(--truncate-internal-fade-marker-width) / 2)
1229
+ var(--truncate-internal-fade-marker-color),
1230
+ 0 0 var(--truncate-internal-fade-marker-width)
1231
+ var(--truncate-internal-fade-marker-color);
1232
+ width: calc(var(--truncate-internal-fade-marker-width) * 2);
1233
+ height: calc(var(--truncate-internal-single-line-height) -
1234
+ (var(--truncate-internal-fade-marker-width) * 2));
1235
+ margin: var(--truncate-internal-fade-marker-width) 0;
1236
+ }
1237
+
1238
+ [data-truncate-group-container="middle"] {
1239
+ & [data-truncate-container] {
1240
+ --truncate-marker-opacity: var(--truncate-internal-middle-marker-opacity);
1241
+ }
1242
+
1243
+ min-width: 0;
1244
+ display: flex;
1245
+
1246
+ & > div {
1247
+ min-width: 0;
1248
+ }
1249
+
1250
+ & > div[data-truncate-segment-priority="1"] {
1251
+ flex: 0 1 max-content;
1252
+ }
1253
+
1254
+ & > div[data-truncate-segment-priority="2"] {
1255
+ flex: 0 999999 max-content;
1256
+ }
1257
+ }
1258
+ }
1259
+
1260
+ @layer theme, unsafe;
1261
+ `,pn=`@layer base, unsafe;`;function mn(e){return`${pn}
1262
+ @layer base {
1263
+ ${e}
1264
+ }`}function hn(e){return`${pn}
1265
+ @layer unsafe {
1266
+ ${e}
1267
+ }`}var gn=new WeakMap;function _n(e){let t=gn.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(en,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),gn.set(e,i),i}function vn(e,t){if(!e.isConnected)return;let n=_n(t);if(n==null)return;let r=t.querySelector(`style[${tn}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(tn,``),t.appendChild(i)),i.textContent=`:host { ${nn}: ${n}px; }`}var yn;function bn(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){yn??(yn=new CSSStyleSheet,yn.replaceSync(mn(fn)));let t=!1;try{e.adoptedStyleSheets=[yn],t=!0}catch{}if(t){e.querySelector(`style[${Qt}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(Qt,``),t.textContent=mn(fn),e.prepend(t)}}function xn(e,t){Sn(e,t),bn(t),vn(e,t)}function Sn(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});xn(this,e)}}if(customElements.define(Zt,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(Zt)))e instanceof HTMLElement&&xn(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var Cn=5,wn=1<<Cn,Tn=wn*4;function En(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Dn(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function On(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function kn(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function An(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function jn(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function Mn(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,In(e,t)}function Nn(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=kn(e).get(t);if(i===void 0)return;let a=i>>Cn;e.childVisibleChunkSums[a]+=r}function Pn(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=Ln(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=wn}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function Fn(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>Cn;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<Cn}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function In(e,t){if(t.childIds.length<Tn){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/wn),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>Cn]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function Ln(e,t,n,r){let i=Math.min(t.childIds.length,n+wn),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var Rn=7,zn=3,Bn=1<<zn,Vn=4;function Hn(e,t,n=0){return e<<Vn|n<<zn|t}function Un(e){return e.depthAndFlags>>>Vn}function Wn(e){return(e.depthAndFlags&Bn)>>zn}function z(e){return(e.depthAndFlags&Bn)!==0}function Gn(e){return e.depthAndFlags&Rn}function Kn(e,t){return(Gn(e)&t)!==0}function qn(e,t){e.depthAndFlags|=t}function Jn(e,t){e.depthAndFlags=Hn(t,Gn(e),Wn(e))}var Yn=Symbol(`benchmarkInstrumentation`);function Xn(e,t){return t==null||Object.defineProperty(e,Yn,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function Zn(e){return e==null?null:e[Yn]??null}function B(e,t,n){return e==null?n():e.measurePhase(t,n)}function Qn(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function $n(e){return e>=48&&e<=57}function er(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!$n(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&$n(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function tr(e){let t=e.toLowerCase();return{lowerValue:t,tokens:er(t)}}function nr(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function rr(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=nr(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function ir(e,t,n){let r=rr(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function ar(e,t){return ir(e,t,tr)}function or(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function sr(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=or(e,r);return a===or(t,r)?ar(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function cr(e,t){return sr(e,t)}function lr(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=tr(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=or(e,n);return o===or(t,n)?ir(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function ur(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=tr(r);return e.sortKeyById[t]=i,i}function dr(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function fr(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function pr(e){let{hasTrailingSlash:t,segments:n}=fr(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function mr(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=fr(e);return{requiresDirectory:t,segments:n}}function hr(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[tr(``)]}}function gr(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function _r(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var vr=Symbol(`pathStorePreparedInputKind`);function yr(e,t){return e[vr]=t,e}function br(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function xr(e,t,n){return n==="default"?cr(e,t):n(br(e),br(t))}function Sr(){return{depthAndFlags:Hn(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function Cr(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function wr(e){return e.isDirectory?e.segments.length:e.segments.length-1}function Tr(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function Er(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function Dr(e,t={}){return Nr(e,t).map(e=>e.path)}function Or(e,t={}){let n=Nr(e,t);return yr({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function kr(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return yr({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function Ar(e){let t=e,n=t.preparedPaths;if(t[vr]===`prepared`&&n!=null)return n;if(!Tr(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function jr(e){let t=e;return t[vr]===`presorted`&&t.presortedPaths!=null||Er(t.presortedPaths)?t.presortedPaths:null}function Mr(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function Nr(e,t={}){let n=dr(t),r=Zn(t);Qn(r,`workload.inputFiles`,e.length);let i=B(r,`store.preparePathEntries.parse`,()=>e.map(e=>pr(e)));return B(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>xr(e,t,n.sort))),i}var Pr=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[Sr()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=hr();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=Zn(e),this.options=dr(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,En())}appendPaths(e){return B(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>pr(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,B(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return B(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null)if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:Hn(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:Hn(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:Hn(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=pr(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null)if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:Hn(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:Hn(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=pr(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(B(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||B(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort==="default"?lr(this.lastPreparedPath,e,this.segmentSortKeyCache):xr(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=wr(e),i=n==null?0:wr(n),a=n==null?0:Cr(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=gr(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:Hn(Un(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),An(i,s),s}createFileChildUnchecked(e,t){let n=gr(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Hn(Un(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),An(r,a),a}getOrCreateDirectoryChild(e,t){let n=gr(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!z(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Hn(Un(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),An(r,a),this.directories.set(a,En()),a}createDirectoryChild(e,t){let n=gr(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Hn(Un(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),An(r,a),this.directories.set(a,En()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!z(n))throw Error(`Path is not a directory: "${t}"`);if(Kn(n,1))throw Error(`Duplicate path: "${t}"`);qn(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,Dn());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(z(a)){let t=Dn();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;z(n)&&this.directories.set(t,En());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),An(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!z(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return Mn(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function Fr(e,t=`closed`,n=null){let r=Lr(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function Ir(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function Lr(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function Rr(e,t){return Kn(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion===`closed`?!1:Un(t)<=e.defaultExpansion}function zr(e,t,n=e.snapshot.nodes[t]){return n==null||!z(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:Rr(e,n)}function Br(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!z(r))return;let i=Rr(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function Vr(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function Hr(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function Ur(e,t){let n=Vr(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function Wr(e,t){let n=Vr(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function Gr(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function Kr(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function qr(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function Jr(e,t){e.directoryLoadInfoById.delete(t)}function Yr(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function Xr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Zr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function Qr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function $r(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function ei(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function ti(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function ni(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function ri(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function ii(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function ai(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function oi(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function si(e,t,n){return{...n,visibleCountDelta:vi(e)-t}}function ci(e,t){let n=vi(e),r=Ir();e.transactionStack.push(r);try{t()}catch(t){throw di(e,r,!1),t}di(e,r,!0,vi(e)-n)}function li(e,t){let n=e.instrumentation;if(n==null){ui(e,t);return}B(n,`store.events.record`,()=>ui(e,t))}function ui(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){gi(e,t);return}n.events.push(t),hi(n,t)}function di(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?mi(i,t):B(n,`store.events.batch.merge`,()=>mi(i,t));return}let a=fi(t,r),o=e.instrumentation;if(o==null){gi(e,a);return}B(o,`store.events.batch.commit`,()=>gi(e,a))}function fi(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function pi(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function mi(e,t){for(let n of t.events)e.events.push(n);pi(e,t)}function hi(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function gi(e,t){let n=e.instrumentation;if(n==null){_i(e,t);return}B(n,`store.events.emit`,()=>_i(e,t))}function _i(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function vi(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function yi(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!z(n)||Kn(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!z(a)?null:i}function bi(e,t){let n=t;for(;;){let t=yi(e,n);if(t==null)return n;n=t}}function xi(e,t){let n=[t],r=t;for(;;){let t=yi(e,r);if(t==null)return n;n.push(t),r=t}}function Si(e,t){let n=t==null?e.snapshot.rootId:ji(e,t);return n==null?[]:Ni(e,n)}function Ci(e,t){let n=pr(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=Ji(e,qi(e,r)),{createdNodeIds:a,directoryId:o}=Pi(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=U(e,o);if(Kn(n,1))throw Error(`Path already exists: "${t}"`);qn(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=Ii(e,o,n.basename),s.add(c);Oi(e,o);let l=Ji(e,o);return Xr({affectedAncestorIds:Ai(e,c),affectedNodeIds:[...s],path:t,projectionChanged:Yi(i,l)})}function wi(e,t,n){let r=ji(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=U(e,r);if(Kn(i,2))throw Error(`The root node cannot be removed`);if(z(i)&&H(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=Ji(e,a),s=Gi(e,r);zi(e,a,r,i.nameId),Ki(e,a),Oi(e,a);let c=Ji(e,a);return Zr({affectedAncestorIds:Ai(e,a),affectedNodeIds:s,path:t,projectionChanged:Yi(o,c),recursive:n.recursive===!0})}function Ti(e,t,n,r){let i=ji(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=U(e,i);if(Kn(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=Ui(e,i,n),c=Ji(e,a.parentId),l=Ji(e,s.parentId),u=_r(e.snapshot.segmentTable,a.nameId),d=gr(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(z(a)&&$i(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=On(e.snapshot.nodes,H(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&Wi(e,p,o,Wn(a))===`skip`)return null;let m=a.parentId;zi(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),Qi(e,i),Ri(e,s.parentId,i),Ki(e,m),e.pathCacheVersion++,Oi(e,m),s.parentId!==m&&Oi(e,s.parentId);let h=Ji(e,m),g=Ji(e,s.parentId);return Qr({affectedAncestorIds:[...new Set([...Ai(e,m),...Ai(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:Xi([c,l],[h,g]),to:V(e,i)})}function Ei(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function Di(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function V(e,t){let n=U(e,t),r=Ei(e,t);if(r!=null)return r;if(Kn(n,2))return Di(e,t,``);let i=V(e,n.parentId),a=_r(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return Di(e,t,z(n)?`${o}/`:o)}function Oi(e,t){let n=e.instrumentation;if(n==null){ta(e,t);return}B(n,`store.recomputeCountsUpwardFrom`,()=>ta(e,t))}function ki(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!z(o)){ea(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){ea(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function Ai(e,t){let n=[],r=t;for(;r!=null;){let t=U(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function ji(e,t){if(t.length===0)return e.snapshot.rootId;let n=mr(t);return Mi(e,n.segments,n.requiresDirectory)}function Mi(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=H(e,r),a=On(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=U(e,r);return n&&!z(i)?null:r}function H(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function U(e,t){let n=e.snapshot.nodes[t];if(n===void 0||Kn(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function Ni(e,t){let n=e.snapshot.nodes[t];if(n===void 0||Kn(n,4))return[];if(!z(n))return[V(e,t)];if(H(e,t).childIds.length===0)return Kn(n,1)&&!Kn(n,2)?[V(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||Kn(n,4)){i.pop();continue}if(!z(n)){r.push(V(e,t.nodeId)),i.pop();continue}let a=H(e,t.nodeId);if(a.childIds.length===0){Kn(n,1)&&!Kn(n,2)&&r.push(V(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function Pi(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=gr(e.snapshot.segmentTable,i),a=H(e,r),o=On(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!z(U(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=Fi(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function Fi(e,t,n){let r=U(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Hn(Un(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,En()),Ri(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function Ii(e,t,n){let r=gr(e.snapshot.segmentTable,n),i=H(e,t);if(On(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${ra(e,t,n)}"`);let a=U(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Hn(Un(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),Ri(e,t,o),e.activeNodeCount++,o}function Li(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}Bi(e,n,o)<0?i=a:r=a+1}return r}function Ri(e,t,n){let r=H(e,t),i=U(e,n);On(e.snapshot.nodes,r).set(i.nameId,n),Nn(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=Li(e,r,n);r.childIds.splice(a,0,n),jn(r,a),In(e.snapshot.nodes,r)}function zi(e,t,n,r){let i=H(e,t),a=kn(i),o=a.get(n)??-1;On(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&Nn(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),jn(i,o),In(e.snapshot.nodes,i))}function Bi(e,t,n){let r=e.snapshot.options.sort;return r==="default"?Vi(e,t,n):r(Hi(e,t),Hi(e,n))}function Vi(e,t,n){let r=U(e,t),i=U(e,n),a=z(r);if(a!==z(i))return a?-1:1;let o=rr(ur(e.snapshot.segmentTable,r.nameId),ur(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=_r(e.snapshot.segmentTable,r.nameId),c=_r(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function Hi(e,t){let n=U(e,t),r=V(e,t),i=z(n),a=i?r.slice(0,-1):r;return{basename:_r(e.snapshot.segmentTable,n.nameId),depth:Un(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function Ui(e,t,n){let r=U(e,t),i=ji(e,n);if(i!=null){let t=U(e,i);if(z(t))return{basename:_r(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=mr(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=mr(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:Mi(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function Wi(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${V(e,t)}"`);let i=U(e,t);if(Wn(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(z(i)&&H(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return Gi(e,t),zi(e,a,t,o),Ki(e,a),Oi(e,a),`handled`}function Gi(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=U(e,t.nodeId);if(t.visitedChildren||!z(i)){z(i)&&e.snapshot.directories.delete(t.nodeId),qn(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),Jr(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=H(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function Ki(e,t){let n=t;for(;n!=null;){let t=U(e,n);if(!z(t)||Kn(t,2)||H(e,n).childIds.length>0)return;qn(t,1),n=t.parentId===n?null:t.parentId}}function qi(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=On(e.snapshot.nodes,H(e,n)).get(t);if(i==null||!z(U(e,i)))break;n=i}return n}function Ji(e,t){let n=Zi(e,t);if(n==null)return null;let r=bi(e,n),i=U(e,r),a=n===r?null:xi(e,n).map(t=>V(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:H(e,r).childIds.length>0,path:V(e,r),terminalKind:Wn(i)})}function Yi(e,t){return Xi([e],[t])}function Xi(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function Zi(e,t){let n=t;for(;n!=null;){let t=U(e,n);if(!z(t)||Kn(t,2))return null;if(!zr(e,n,t))return n;n=t.parentId}return null}function Qi(e,t){let n=U(e,t);if(Jn(n,(t===e.snapshot.rootId?-1:Un(U(e,n.parentId)))+1),!z(n))return;let r=H(e,t);for(let t of r.childIds)Qi(e,t)}function $i(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=U(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function ea(e,t,n=U(e,t),r=!1){let i=e.instrumentation;if(i==null){na(e,t,n,r);return}B(i,`store.recomputeNodeCounts`,()=>na(e,t,n,r))}function ta(e,t){let n=t;for(;n!=null;){let t=U(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(ea(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&Nn(H(e,s),n,a,o),n=s}}function na(e,t,n,r){if(!z(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=H(e,t);if(r){let t=e.instrumentation;t==null?Mn(e.snapshot.nodes,i):B(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>Mn(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,Kn(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=yi(e,t)==null?zr(e,t,n)?1+o:1:o}function ra(e,t,n){let r=V(e,t);return r.length===0?n:`${r}${n}`}function ia(e){return e!=null&&!Kn(e,4)}function aa(e,t){let n=e.snapshot.nodes[t];return!ia(n)||!z(n)||Kn(n,2)?null:n}function oa(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&ia(e.snapshot.nodes[n])&&(t+=1);return t}function sa(e){return Math.max(0,e.valueById.length-1)}function ca(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:oa(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:sa(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function la(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function ua(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)aa(e,n)!=null&&t.push(V(e,n));for(let t of e.expandedDirectoryIds)aa(e,t)!=null&&n.push(V(e,t));return{collapsedPaths:t,expandedPaths:n}}function da(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)aa(e,n)==null||Hr(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:V(e,n)});return t}function fa(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=ji(e,n);t!=null&&Br(e,t,!0,U(e,t))}for(let n of t.collapsedPaths){let t=ji(e,n);t!=null&&Br(e,t,!1,U(e,t))}}function pa(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=ji(e,n.path);t!=null&&aa(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function ma(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function ha(e){let t=e.snapshot.segmentTable,n=hr();for(let r of e.snapshot.nodes)if(ia(r)){if(Kn(r,2)){r.nameId=0;continue}r.nameId=gr(n,_r(t,r.nameId))}e.snapshot.segmentTable=n}function ga(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!ia(r)||!z(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return ia(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[U(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),Mn(e.snapshot.nodes,n)}}function _a(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(ia(n))break;--t}e.snapshot.nodes.length=t+1}function va(e){let t=ua(e),n=da(e);B(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>ma(e)),B(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>ha(e)),B(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>ga(e)),B(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>_a(e)),B(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>fa(e,t)),B(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>pa(e,n)),B(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>ki(e,e.snapshot.rootId))}function ya(e){let t=ua(e),n=da(e),r=B(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>Si(e)),i=Xn({...e.snapshot.options},e.instrumentation),a=B(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new Pr(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,B(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>fa(e,t)),B(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>pa(e,n)),B(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>ki(e,e.snapshot.rootId))}function ba(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function xa(e,t){let n=ca(e);t===`stable`?B(e.instrumentation,`store.cleanup.stable`,()=>va(e)):B(e.instrumentation,`store.cleanup.aggressive`,()=>ya(e));let r=ca(e);return la(t,t===`stable`,n,r)}var Sa=64;function Ca(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function wa(e){return U(e,e.snapshot.rootId).visibleSubtreeCount}function Ta(e,t,n,r){let i=U(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function Ea(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:Ga(e,t.cursor),setSize:t.setSize,subtreeEndIndex:Ta(e,t.cursor,t.index,n)}}function Da(e,t,n,r,i,a){let o=H(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=Pn(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return Oa(e,u,l,r+c,i+1,s,o.childIds.length,a)}function Oa(e,t,n,r,i,a,o,s){if(!z(U(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=za(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=U(e,c.terminalNodeId);if(!z(l)||!zr(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return Da(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function ka(e,t){let n=wa(e);if(t<0||t>=n)return null;let r=Da(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>V(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=Ea(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:Ga(e,r.cursor),setSize:r.setSize,subtreeEndIndex:Ta(e,r.cursor,r.index,n)}}function Aa(e,t,n){let r=e.instrumentation,i=wa(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return Wa(e,o+1);let t=[],n=Ia(e,a);for(let r=a;r<=o&&n!=null;r++){let r=Ga(e,n);t.push(r),n=Va(e,n)}return t}let s=[],c=0,l=0,u=B(r,`store.getVisibleSlice.selectFirstRow`,()=>Ia(e,a));for(let t=a;t<=o&&u!=null;t++){let t=B(r,`store.getVisibleSlice.materializeRow`,()=>Ga(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=B(r,`store.getVisibleSlice.advanceCursor`,()=>Va(e,u))}return Qn(r,`workload.visibleRowsRead`,s.length),Qn(r,`workload.flattenedRowsRead`,c),Qn(r,`workload.flattenedSegmentsRead`,l),s}function ja(e,t=wa(e)){let n=e.instrumentation;return n==null?Ua(e,t):B(n,`store.getVisibleTreeProjection`,()=>Ua(e,t))}function Ma(e){return Ha(ja(e))}function Na(e,t){let n=ji(e,t);if(n==null||n===e.snapshot.rootId||z(U(e,n))&&bi(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=U(e,i).parentId,n=H(e,t),s=kn(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=Fn(a,n,s),t!==o){let n=U(e,t),a=yi(e,t);if(!zr(e,t,n)&&a!==i)return null;bi(e,t)===t&&(r+=1)}i=t}return r}function Pa(e,t){let n=ji(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=U(e,n);if(!z(r))throw Error(`Path is not a directory: "${t}"`);return zr(e,n,r)?null:(Br(e,n,!0,r),Oi(e,n),$r({affectedAncestorIds:Ai(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function Fa(e,t){let n=ji(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=U(e,n);if(!z(r))throw Error(`Path is not a directory: "${t}"`);return zr(e,n,r)?(Br(e,n,!1,r),Oi(e,n),ei({affectedAncestorIds:Ai(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function Ia(e,t){return t<0||t>=wa(e)?null:La(e,e.snapshot.rootId,t,-1)}function La(e,t,n,r){let i=H(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?Pn(e.snapshot.nodes,i,n):B(a,`store.getVisibleSlice.selectChildIndex`,()=>Pn(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return Ra(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function Ra(e,t,n,r){if(!z(U(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=za(e,t,r);if(n===0)return i;let a=U(e,i.terminalNodeId);if(!z(a)||!zr(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return La(e,i.terminalNodeId,n-1,i.visibleDepth)}function za(e,t,n){return z(U(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:bi(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:B(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>bi(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function Ba(e,t){let n=U(e,t);if(!z(n))return!0;let r=n.parentId;return r===e.snapshot.rootId?!0:yi(e,r)!==t}function Va(e,t){let n=U(e,t.terminalNodeId);if(z(n)){let r=H(e,t.terminalNodeId);if(zr(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:Ra(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=U(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=H(e,n),o=kn(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return Ra(e,s,0,i);Ba(e,r)&&i--,r=n}}function Ha(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function Ua(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(Sa);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=Ca(o,y);let x,S=_;if(z(v))S=f?bi(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:V(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&z(C)&&zr(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function Wa(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!z(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:V(e,f)};continue}let h=l?bi(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=Ga(e,g);let _=i[h];_!=null&&z(_)&&zr(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function Ga(e,t){let n=U(e,t.terminalNodeId),r=z(n)?Ka(e,t):null,i=V(e,t.terminalNodeId),a=_r(e.snapshot.segmentTable,n.nameId),o=z(n)&&H(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?xi(e,t.headNodeId).map(n=>{let r=U(e,n);return{isTerminal:n===t.terminalNodeId,name:_r(e.snapshot.segmentTable,r.nameId),nodeId:n,path:V(e,n)}}):B(c,`store.getVisibleSlice.flatten.collectSegments`,()=>xi(e,t.headNodeId).map(n=>{let r=U(e,n);return{isTerminal:n===t.terminalNodeId,name:_r(e.snapshot.segmentTable,r.nameId),nodeId:n,path:V(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:z(n)&&zr(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:z(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function Ka(e,t){if(t.headNodeId===t.terminalNodeId)return Hr(e,t.terminalNodeId);let n=xi(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=Hr(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function qa(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!z(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&In(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&z(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,In(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function Ja(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var Ya=class e{#e;constructor(e={}){let t=Zn(e),n=B(t,`store.builder.create`,()=>new Pr(e));if(e.preparedInput!=null){let t=jr(e.preparedInput);t==null?n.appendPreparedPaths(Ar(e.preparedInput),!1):n.appendPresortedPaths(t,Mr(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(B(t,`store.preparePathEntries`,()=>Nr(r,e)))}let r=B(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=B(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=B(t,`store.state.create`,()=>Fr(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:B(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||Ja(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&B(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?B(t,`store.state.initializeOpenVisibleCounts`,()=>qa(this.#e)):B(t,`store.state.recomputeCounts`,()=>ki(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return Dr(e,t)}static prepareInput(e,t={}){return Or(e,t)}static preparePresortedInput(e){return kr(e)}list(e){return B(this.#e.instrumentation,`store.list`,()=>Si(this.#e,e))}add(e){B(this.#e.instrumentation,`store.add`,()=>{let t=wa(this.#e);li(this.#e,si(this.#e,t,Ci(this.#e,e)))})}remove(e,t={}){B(this.#e.instrumentation,`store.remove`,()=>{let n=wa(this.#e);li(this.#e,si(this.#e,n,wi(this.#e,e,t)))})}move(e,t,n={}){B(this.#e.instrumentation,`store.move`,()=>{let r=wa(this.#e),i=Ti(this.#e,e,t,n);i!=null&&li(this.#e,si(this.#e,r,i))})}batch(e){ci(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return B(this.#e.instrumentation,`store.getVisibleCount`,()=>wa(this.#e))}getVisibleSlice(e,t){return B(this.#e.instrumentation,`store.getVisibleSlice`,()=>Aa(this.#e,e,t))}getVisibleRowContext(e){return B(this.#e.instrumentation,`store.getVisibleRowContext`,()=>ka(this.#e,e))}getVisibleTreeProjection(){return Ma(this.#e)}getVisibleTreeProjectionData(e){return ja(this.#e,e)}getVisibleIndex(e){return B(this.#e.instrumentation,`store.getVisibleIndex`,()=>Na(this.#e,e))}getPathInfo(e){return B(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=ji(this.#e,e);if(t==null)return null;let n=U(this.#e,t);return{depth:Un(n),kind:z(n)?`directory`:`file`,path:V(this.#e,t)}})}isExpanded(e){return B(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=U(this.#e,t);return zr(this.#e,t,n)})}expand(e){B(this.#e.instrumentation,`store.expand`,()=>{let t=wa(this.#e),n=Pa(this.#e,e);n!=null&&li(this.#e,si(this.#e,t,n))})}collapse(e){B(this.#e.instrumentation,`store.collapse`,()=>{let t=wa(this.#e),n=Fa(this.#e,e);n!=null&&li(this.#e,si(this.#e,t,n))})}on(e,t){return Yr(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return Hr(this.#e,t)}markDirectoryUnloaded(e){B(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(H(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=wa(this.#e);Wr(this.#e,t),li(this.#e,si(this.#e,n,ti({affectedAncestorIds:Ai(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return B(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=wa(this.#e),r=Ur(this.#e,t);return li(this.#e,si(this.#e,n,ni({affectedAncestorIds:Ai(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return B(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||Hr(this.#e,n)!==`loading`||!Kr(this.#e,n,e.attemptId))return!1;let r=V(this.#e,n);this.validateChildPatch(r,t);let i=wa(this.#e),a=[];for(let e of t.operations){Xa(r,e);let t=wa(this.#e);switch(e.type){case`add`:a.push(si(this.#e,t,Ci(this.#e,e.path)));break;case`remove`:a.push(si(this.#e,t,wi(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=Ti(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(si(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return li(this.#e,si(this.#e,i,ri({affectedAncestorIds:Ai(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:V(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return B(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=wa(this.#e),r=Gr(this.#e,t,e.attemptId);return li(this.#e,si(this.#e,n,ii({affectedAncestorIds:Ai(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:V(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return B(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=wa(this.#e),i=qr(this.#e,n,e.attemptId,t);return li(this.#e,si(this.#e,r,ai({affectedAncestorIds:Ai(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:V(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return B(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(ba(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=wa(this.#e),n=xa(this.#e,e.mode??`stable`);return li(this.#e,si(this.#e,t,oi({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=H(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??tr(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=rr(ur(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!z(U(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=U(this.#e,n);zr(this.#e,n,i)||(Br(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=U(this.#e,e);if(!zr(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=ji(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!z(U(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!z(U(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=U(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=U(this.#e,e),r=yi(this.#e,e);if(!zr(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function Xa(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`);break}}var Za=e=>e.startsWith(`f::`)?e.slice(3):e;function Qa(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function $a(e,t){return e===``?t:`${e}/${t}`}function eo({files:e,path:t,isFolder:n,nextBasename:r}){let i=Za(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=Qa(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=$a(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function to(e){return e.endsWith(`/`)}function no(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function ro(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function io(e,t){return t.includes(e)?ro(t):[e]}function ao(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function oo(e,t){return{draggedPaths:e,target:t}}function so(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(to(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function co(e,t){return t.kind===`root`||t.directoryPath==null?no(e):t.directoryPath}function lo(e,t){let n=e.map(e=>{let n=co(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function uo(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function fo(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!uo(Ya.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function po(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function mo(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function ho(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function go(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return ho(e,t.path)?n?e:null:e;case`move`:return mo(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=go(r,e,n),r==null)return null;return r}}}function _o(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function vo(e){switch(e.operation){case`add`:return{..._o(e),operation:`add`,path:e.path};case`remove`:return{..._o(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{..._o(e),from:e.from,operation:`move`,to:e.to}}}function yo(e){return{..._o(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>vo(e)),operation:`batch`}}function bo(e){switch(e.operation){case`add`:case`remove`:case`move`:return vo(e);case`batch`:return yo(e);default:return null}}function xo(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function So(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function Co(e){return So(e).at(-1)??null}function wo(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function To(e){return e.endsWith(`/`)}var Eo=e=>e.toLowerCase();function Do(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function Oo(e){return e.endsWith(`/`)?e.slice(0,-1):e}function ko(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var Ao=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},jo=Symbol(`FILE_TREE_RENAME_VIEW`),Mo=512,No=512;function Po(e){return e===`top`||e===`center`?e:`nearest`}function Fo(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=So(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function Io(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:Fo(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var Lo=class e{static{Object.defineProperty(e.prototype,jo,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=fo({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=Co(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:Po(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=No){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t==null||!this.#B.has(t)||this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=io(t,n);return this.#r.canDrag?.(r)===!1?!1:(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=oo(t.draggedPaths,n);(so(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}ao(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=oo(e.draggedPaths,t);if(so(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=lo(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=To(r),a=Oo(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of So(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=Do(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,To(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,To(e)?{recursive:!0}:void 0);return}let t=To(e),n=eo({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:Oo(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(ko(n.sourcePath,t),ko(n.destinationPath,t))}#Y(e){this.#T==null||this.#E===e||(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=fo({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!xo(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=Co(e),n=wo(e,t),r=null,i=null;for(let e of this.#be()){if(Co(e)!==t)continue;let a=wo(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=So(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!xo(this.#B,r),a=this.#z!==t;!i&&!a||(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new Ya({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of So(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(Eo),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(Eo),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of So(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:Ao(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of So(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of So(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=Io(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,Mo)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s===e&&this.#c===n||(this.#s=e,this.#c=n,t&&this.#De()))}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=go(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=go(this.#c,e,!0),r=[...this.#B].map(t=>go(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=go(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return xo(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&po(e)&&(this.#i=null);let t=po(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=bo(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},Ro=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function zo(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(!(e[t]===`/`||t===e.length)){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function Bo(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function Vo(e,t){return t?`${e}/`:e}function Ho(e,t=null){let n=Ro(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=Wo(t);e!=null&&qo({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function Uo(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=Go(e);t!=null&&(c=Ko({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=Wo(e);t!=null&&(c=qo({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:Xo(i),statusByPath:i}:e}function Wo(e){return Go(e.path)}function Go(e){let t=zo(e);if(t!=null)return{canonicalPath:Vo(t.path,t.isDirectory),isDirectory:t.isDirectory}}function Ko({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a==null?!1:(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),Yo(t,n,e),!0)}function qo({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s===a?!1:(s??Jo(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function Jo(e,t,n){for(let r of Bo(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function Yo(e,t,n){for(let r of Bo(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function Xo(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var Zo=e=>e.trim().toLowerCase(),Qo=e=>e.split(`/`).at(-1)??e,$o=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function es(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function ts(e){let t=cn(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(Zo(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let s=Qo(o),c=s.toLowerCase(),l=r.get(c);if(l!=null)return es(l,e);for(let[t,n]of a)if(c.includes(t))return es(n,e);let u=$o(s);for(let t of u){let n=i.get(t);if(n!=null)return es(n,e)}let d=Xt(t.set,s,u);if(d!=null&&t.set!==`none`){if(d==="default"){let t=n?.[e];if(t!=null)return es(t,e)}return{name:Jt(d),remappedFrom:e,token:d}}}let s=n?.[e];return s==null?{name:e}:es(s,e)}}}var W,ns,rs,is,as,os,ss,cs,ls,us,ds={},fs=[],ps=Array.isArray,ms=fs.slice,hs=Object.assign;function gs(e){e&&e.parentNode&&e.remove()}function _s(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?ms.call(arguments,2):n),vs(e,o,r,i,null)}function vs(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ns,__i:-1,__u:0};return i==null&&W.vnode!=null&&W.vnode(a),a}function ys(e){return e.children}function bs(e,t){this.props=e,this.context=t,this.__g=0}function xs(e,t){if(t==null)return e.__?xs(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?xs(e):null}function Ss(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return Ss(e)}}function Cs(e){(8&e.__g||!(e.__g|=8)||!rs.push(e)||as++)&&is==W.debounceRendering||((is=W.debounceRendering)||queueMicrotask)(ws)}function ws(){for(var e,t,n,r,i,a,o,s,c=1;rs.length;)rs.length>c&&rs.sort(os),e=rs.shift(),c=rs.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=hs({},r)).__v=r.__v+1,W.vnode&&W.vnode(n),Ms(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??xs(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Ps(a,n,o),n.__e!=i&&Ss(n)));as=0}function Ts(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||fs,b=t.length;for(c=Es(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?ds:y[m.__i]||ds,m.__i=f,_=Ms(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Ls(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=Ds(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Es(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?vs(null,o,null,null,null):ps(o)?vs(ys,{children:o},null,null,null):o.constructor==null&&o.__b>0?vs(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=Os(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=xs(s)),Rs(s,s));return r}function Ds(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Ds(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=xs(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Os(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function ks(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function As(e,t,n,r,i){var a;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||ks(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||ks(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(ss,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=cs,e.addEventListener(t,a?us:ls,a)):e.removeEventListener(t,a?us:ls,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function js(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=cs++;else if(t.u<n.l)return;return n(W.event?W.event(t):t)}}}function Ms(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,ee,te,O,k,A=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=W.__b)&&d(t);n:if(typeof A==`function`)try{if(v=t.props,y=`prototype`in A&&A.prototype.render,b=(d=A.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new A(v,x):(t.__c=f=new bs(v,x),f.constructor=A,f.render=zs),b&&b.sub(f),f.props=v,f.state||={},f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&A.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=hs({},f.__s)),hs(f.__s,A.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&A.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&A.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=W.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=hs({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===ys&&d.key==null&&(E=Fs(d.props.children)),s=Ts(e,ps(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(D=0,ee=!1,t.__u|=c?160:128,t.__c.__z=[],te=0;te<a.length;te++)(O=a[te])==null||ee||(O.nodeType==8&&O.data==`$s`?(D>0&&t.__c.__z.push(O),D++,a[te]=null):O.nodeType==8&&O.data==`/$s`?(--D>0&&t.__c.__z.push(O),ee=D===0,s=a[te],a[te]=null):D>0&&(t.__c.__z.push(O),a[te]=null));if(!ee){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(k=a.length;k--;)gs(a[k]);Ns(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Ns(t);W.__e(e,t,n)}else s=t.__e=Is(n.__e,t,n,r,i,a,o,c,l,u);return(d=W.diffed)&&d(t),128&t.__u?void 0:s}function Ns(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Ns)}function Ps(e,t,n){for(var r=0;r<n.length;r++)Ls(n[r],n[++r],n[++r]);W.__c&&W.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){W.__e(e,t.__v)}})}function Fs(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:ps(e)?e.map(Fs):hs({},e)}function Is(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(W.__m&&W.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=ms.call(e.childNodes),v=n.props||ds,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;As(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||As(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),Ts(b==`template`?e.content:e,ps(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&xs(n,0),s,c,l),a!=null)for(u=a.length;u--;)gs(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||As(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&As(e,u,g,v[u],i))}return e}function Ls(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){W.__e(e,n)}}function Rs(e,t,n){var r,i;if(W.unmount&&W.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ls(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){W.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Rs(r[i],t,n||typeof e.type!=`function`);n||gs(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function zs(e,t,n){return this.constructor(e,n)}function Bs(e,t){var n,r,i,a;t==document&&(t=document.documentElement),W.__&&W.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=_s(ys,null,[e]),i=[],a=[],Ms(t,e,r||ds,ds,t.namespaceURI,r?null:t.firstChild?ms.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Ps(i,e,a)}function Vs(e,t){e.__u|=32,Bs(e,t)}W={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw as=0,e}},ns=0,bs.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=hs({},this.state);typeof e==`function`&&(e=e(hs({},n),this.props)),e&&hs(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Cs(this))},bs.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),Cs(this))},bs.prototype.render=ys,rs=[],as=0,os=function(e,t){return e.__v.__b-t.__v.__b},ss=/(PointerCapture)$|Capture$/i,cs=0,ls=js(!1),us=js(!0);var Hs=0;Array.isArray;function G(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Hs,__i:-1,__u:0,__source:i,__self:a};return W.vnode&&W.vnode(l),l}var Us=16,Ws=16,Gs={};function Ks({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=Gs[e]??{width:Us,height:Ws},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return G(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:G(`use`,{href:c})})}var qs=e=>e!==void 0&&/\s/.test(e),Js=(e,t)=>{let n=t=>qs(e[t-1])||qs(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},Ys=e=>Js(e,Math.ceil(e.length/2)),Xs=e=>{if(e.length<2)return[e,``];let t=Ys(e);return[e.slice(0,t),e.slice(t)]},Zs=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Ys(e);return[e.slice(0,r),e.slice(r)]},Qs=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},$s=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},ec=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},tc=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function nc({children:e,marker:t,variant:n=`default`}){"use no memo";return G(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:G(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?G(`span`,{"data-truncate-fade":!0}):t})})}function rc(e){"use no memo";let{mode:t,children:n}=e;return G(`div`,{children:[G(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?G(`span`,{children:n}):n}),G(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?G(`span`,{children:n}):n})]})}function ic({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=G(rc,{mode:t,children:e},`content`),o=G(nc,{marker:n,mode:t,variant:r},`marker`),s=G(`div`,{"data-truncate-fill":!0},`fill`);return G(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:G(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function ac({children:e,...t}){"use no memo";return G(ic,{mode:`truncate`,...t,children:e})}function oc({children:e,...t}){"use no memo";return G(ic,{mode:`fruncate`,...t,children:e})}function sc({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=G(ac,{...s,children:t[0]}),l=G(oc,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return G(`div`,{className:a,style:o});if(e.length<i)return G(n===`end`?oc:ac,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=Xs:r===`extension`?t=Zs:r===`leaf-path`&&(t=Qs);else if(typeof r==`number`)t=$s,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=ec:e===`first`&&(t=tc)}else typeof r==`function`&&(t=r);t??=Xs;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=G(ac,{...s,..._,children:f}),l=G(oc,{...s,...v,children:p})}return G(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[G(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),G(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var cc={endIndex:-1,startIndex:-1};function lc(e,t,n){return Math.min(Math.max(e,t),n)}function uc(e,t){return e<0||t<e?cc:{endIndex:t,startIndex:e}}function dc(e){return e.startIndex<0||e.endIndex<e.startIndex}function fc(e,t){return dc(e)?0:(e.endIndex-e.startIndex+1)*t}function pc(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function mc(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function hc(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function gc(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function _c(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function vc(e,t,n){if(e.length===0||t<=0)return[];let r=_c(e),i=hc(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=gc(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function yc(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=lc(t.scrollTop,0,o),c=t.stickyRows??vc(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=pc(s,n,t.itemHeight),m=pc(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?cc:uc(m,mc(u+d,n,t.itemHeight)),y=g+1,b=dc(v)?cc:uc(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=fc(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:dc(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var bc={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},xc={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},Sc=`Contains git status items`;function Cc(e){return e.current?!0:(e.current=!0,!1)}function wc(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function Tc(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return wc({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function Ec(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function Dc(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function Oc(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function kc(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function Ac(e,t){return e!=null&&e>0?e:t}function jc(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function Mc(e,t,n,r,i=0){let a=wc({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function Nc(e,t,n,r,i,a,o=0){let s=Tc({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s==null?!1:(e.scrollTop=s,!0)}function Pc(e,t,n,r,i,a){let o=Ec({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function Fc(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function Ic(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function Lc({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return G(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function Rc(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function zc(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var Bc,Vc,Hc,Uc,Wc=Object.is,Gc=0,Kc=[],qc=W,Jc=qc.__b,Yc=qc.__r,Xc=qc.diffed,Zc=qc.__c,Qc=qc.unmount,$c=qc.__;function el(e,t){qc.__h&&qc.__h(Vc,e,Gc||t),Gc=0;var n=Vc.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function tl(e){return Gc=1,nl(pl,e)}function nl(e,t,n){var r=el(Bc++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):pl(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);Wc(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Vc,!Vc.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,Wc(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};Vc.__f=!0;var a=Vc.shouldComponentUpdate,o=Vc.componentWillUpdate;Vc.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Vc.shouldComponentUpdate=i}return r.__N||r.__}function rl(e,t){var n=el(Bc++,3);!qc.__s&&fl(n.__H,t)&&(n.__=e,n.u=t,Vc.__H.__h.push(n))}function il(e,t){var n=el(Bc++,4);!qc.__s&&fl(n.__H,t)&&(n.__=e,n.u=t,Vc.__h.push(n))}function K(e){return Gc=5,al(function(){return{current:e}},[])}function al(e,t){var n=el(Bc++,7);return fl(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ol(e,t){return Gc=8,al(function(){return e},t)}function sl(){for(var e;e=Kc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ul),e.__H.__h.forEach(dl),e.__H.__h=[]}catch(t){e.__H.__h=[],qc.__e(t,e.__v)}}qc.__b=function(e){Vc=null,Jc&&Jc(e)},qc.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),$c&&$c(e,t)},qc.__r=function(e){Yc&&Yc(e),Bc=0;var t=(Vc=e.__c).__H;t&&(Hc===Vc?(t.__h=[],Vc.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(ul),t.__h.forEach(dl),t.__h=[],Bc=0)),Hc=Vc},qc.diffed=function(e){Xc&&Xc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Kc.push(t)!==1&&Uc===qc.requestAnimationFrame||((Uc=qc.requestAnimationFrame)||ll)(sl)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Hc=Vc=null},qc.__c=function(e,t){t.some(function(e){try{e.__h.forEach(ul),e.__h=e.__h.filter(function(e){return!e.__||dl(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],qc.__e(n,e.__v)}}),Zc&&Zc(e,t)},qc.unmount=function(e){Qc&&Qc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{ul(e)}catch(e){t=e}}),n.__H=void 0,t&&qc.__e(t,n.__v))};var cl=typeof requestAnimationFrame==`function`;function ll(e){var t,n=function(){clearTimeout(r),cl&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);cl&&(t=requestAnimationFrame(n))}function ul(e){var t=Vc,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Vc=t}function dl(e){var t=Vc;e.__c=e.__(),Vc=t}function fl(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!Wc(t,e[n])})}function pl(e,t){return typeof t==`function`?t(e):t}function ml(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:G(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return G(ys,{children:[G(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:G(ac,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function hl(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function gl(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function _l(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function vl({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=yc(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:_l(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?_l(u,1,t,o):i&&r<=0&&c.length>0?vc(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var yl=400,bl=10,xl=40,Sl=18;function Cl(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?wl(e,t,n):a instanceof HTMLElement?a:null}function wl(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function Tl(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function El(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function Dl(){return navigator.vendor!==`Apple Computer, Inc.`}function Ol(e,t){let n=e-t.top;if(n<xl)return-Math.ceil((xl-Math.max(0,n))/xl*Sl);let r=t.bottom-e;return r<xl?Math.ceil((xl-Math.max(0,r))/xl*Sl):0}function kl(e,t){if(e!=null){let t=bc[e];return t==null?null:{text:t,title:xc[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:Sc}:null}function Al(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function jl(e){return e!=null&&`toggle`in e}function Ml(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function Nl(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Pl(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Fl(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function Il(e,t){return t&&Fl(e)||(e.ctrlKey||e.metaKey)&&Ml(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var Ll=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function Rl(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function zl(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function Bl(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function Vl(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function Hl(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function Ul(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function Wl(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function Gl(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function Kl(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=Gl(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function ql(e,t){return{kind:e.kind,name:gl(e),path:t}}function Jl(e){return e==null?void 0:`${e}__tree`}function Yl(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function Xl(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function Zl(e,t){if(e==null)return null;if(`text`in e)return G(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?Xl(e.icon)?t(e.icon):{name:e.icon}:Xl(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return G(`span`,{title:e.title,children:G(Ks,{...n})})}function Ql(e){e!=null&&Dc(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function $l(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=hl(e);return G(ys,{children:[e.depth>0?G(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>G(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,G(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?G(Ks,{...t(`file-tree-icon-chevron`)}):G(Ks,{...t(`file-tree-icon-file`,u)})}),G(`div`,{"data-item-section":`content`,children:e.isFlattened?ml(e,c,a):c??G(sc,{minimumLength:5,split:`extension`,children:e.name})}),i?G(`div`,{"data-item-section":`decoration`,children:r==null?null:Zl(r,t)}):null,s?G(`div`,{"data-item-section":`git`,children:Zl(o,t)}):null,n?G(`div`,{"data-item-section":`action`,children:l?G(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:G(Ks,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function eu(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:ee,resolveIcon:te,renderDecorationForRow:O,openContextMenuForRow:k,onRowClick:A,onKeyDown:j}=e,M=hl(t),{isParked:N=!1,mode:ne=`flow`,style:re}=r,ie=ne===`sticky`,ae=_?.get(M)??null??Al(t.ancestorPaths,v,y),oe=t.kind===`directory`&&(b?.has(M)??!1),se=O(t,M),ce=kl(ae,oe),le=S&&w,ue=se!=null||x||le,de=le&&T===`always`,fe=a.getPath()===M,pe=fe?a.getValue():``,me=ie||!fe?null:G(Lc,{ref:D,ariaLabel:`Rename ${gl(t)}`,isFlattened:t.isFlattened,value:pe,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),he=$l(t,te,{actionLaneEnabled:le,customDecoration:se,decorationLaneEnabled:ue,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:ce,gitLaneActive:x,renameInput:me,showDecorativeActionAffordance:de}),ge={...Rc({ariaLabel:gl(t),domId:t.isFocused?Yl(h,M,N):void 0,extraStyle:re,features:{actionLaneEnabled:le,contextMenuButtonVisibility:le?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:N,itemHeight:g,mode:ne,row:t,state:{containsGitChange:oe,effectiveGitStatus:ae,isContextHovered:s===M,isDragTarget:l?.kind===`directory`&&l.directoryPath===M,isDragging:c?.has(M)===!0,isFocusRinged:t.isFocused&&o===M},targetPath:M}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(M),k(t,M,{anchorRect:Bl(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ie?void 0:()=>{i.focusMountedPathFromInput(M)},onKeyDown:ie?void 0:j,ref:e=>{ee(M,e)}};return!ie&&fe?G(`div`,{...ge,children:he}):G(`button`,{...ge,type:`button`,draggable:u&&!N,onDragEnd:u&&!N?p:void 0,onDragStart:u&&!N?e=>{f(e,t,M)}:void 0,onMouseDown:e=>{if(ie){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!N?e=>{m(e,t,M)}:void 0,onClick:e=>{A(e,t,M,ne)},children:he})}function tu(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(hl(e))).map((n,r)=>eu(e,n,t.start+r))}function nu({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=dn,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=K(null),v=K(null),y=K(!1),b=K(null),x=K(null),S=K(null),C=K(null),w=K(null),T=K(new Map),E=K(new Map),D=K(()=>{}),ee=K(null),te=K(0),O=K(!1),k=K(null);k.current!==t&&(O.current=!1,k.current=t);let A=K(!1),j=K(null),M=K(null),N=K(!1),ne=K(null),re=K(null),ie=K(null),ae=K(null),oe=K(null),se=K(null),ce=K(null),le=K(null),ue=K(!1),de=K(null),fe=K(null),pe=K(null),me=K(null),he=al(()=>new Map,[]),[,ge]=tl(0),_e=K(!1),[ve,ye]=tl(null),[be,xe]=tl(null),[Se,Ce]=tl(null),[we,Te]=tl(null),[Ee,De]=tl(0),[P,Oe]=tl(null),ke=K(P);ke.current=P;let F=K(null),Ae=K(null),je=K(null),Me=K(null),Ne=K(null),I=K(!1),Pe=()=>{Ae.current=null,je.current=null,Me.current=null},Fe=(e,t)=>{Ae.current=e,je.current=null,Me.current=t==null?null:{path:e,scrollTop:t}},Ie=(e,t)=>{Ae.current=null,je.current={path:e,viewportOffset:t},Me.current=null},Le=K(d===`retain`&&t.isSearchOpen()),[Re,ze]=tl(p);rl(()=>{p||ze(!1)},[p]);let Be=K(!1),Ve=ol(()=>{Be.current=!0,ze(e=>e&&!1)},[]),[He,Ue]=tl(()=>vl({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[We,Ge]=tl(!1);rl(()=>{Ge(!0)},[]);let Ke=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,qe=e?.contextMenu?.triggerMode??(Ke?`right-click`:`both`),Je=qe===`both`||qe===`button`,Ye=e?.contextMenu?.buttonVisibility??`when-needed`,Xe=qe===`both`||qe===`right-click`;il(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Ne.current=t,xe(t),Te(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(I.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let Ze=ol((e,t)=>{Hl(T.current,e,t)},[]),Qe=ol((e,t)=>{Hl(E.current,e,t)},[]),$e=ol(e=>{x.current=e},[]),et=ol(e=>Ul(e,E.current,T.current),[]),tt=n!=null||r!=null||i!=null,{resolveIcon:nt}=al(()=>ts(a),[a]),rt=t[jo](),it=rt.getPath(),at=it!=null,ot=t.isSearchOpen(),st=t.getSearchValue(),L=t.getFocusedPath(),R=t.getFocusedIndex(),ct=t.getScrollRequest(),lt=t.isDragAndDropEnabled(),ut=t.getDragSession(),dt=al(()=>ut==null?null:new Set(ut.draggedPaths),[ut]),ft=ut?.target??null,pt=ut?.primaryPath??null,mt=Jl(o),{overlayHeight:ht,overlayRows:gt,snapshot:_t,visibleRows:vt}=He,yt=_t.physical.viewportHeight,bt=al(()=>({end:_t.window.endIndex,start:_t.window.startIndex}),[_t.window.endIndex,_t.window.startIndex]),xt=gt,St=_t.sticky.rows,Ct=_t.physical.totalHeight,wt=_t.sticky.height,Tt=al(()=>new Set(St.map(e=>hl(e.row))),[St]),Et=R>=0&&R>=bt.start&&R<=bt.end,Dt=ol((e,t)=>u?.({item:ql(e,t),row:e})??null,[u]),Ot=ol(e=>Dc(e==null?null:T.current.get(e)??null)?!0:Dc(S.current),[]),kt=ol(e=>{Ot(t.focusNearestPath(e))},[t,Ot]),At=K(kt);At.current=kt;let jt=K(!0),Mt=K(()=>{}),Nt=ol((t=!0)=>{let n=ke.current;n!=null&&(jt.current=jt.current&&t,Oe(null),e?.contextMenu?.onClose?.(),jt.current&&kt(n.path))},[e?.contextMenu,kt]);Mt.current=Nt;let Pt=ol(e=>{let t=e==null?null:Vl(S.current,e);Ce(e=>e===t?e:t)},[]),Ft=ol((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=et(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Fe(n,e?.scrollTop??null),A.current=!0,ye(e=>e===n?e:n)}i.focus(),Pt(a),jt.current=!0,Oe({anchorRect:r?.anchorRect??null,item:ql(e,n),path:n,source:r?.source??`keyboard`})},[t,et,Pt]),It=ol(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=kc(e,yt);ne.current=R<0||e==null?null:Math.max(0,Math.min(R*s-e.scrollTop,Math.max(0,t-s))),N.current=!0}t.startRenaming(e)!==!1&&(Te(`focus`),ge(e=>e+1))}},[t,R,s,l,yt]),Lt=ol((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=kc(i,yt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:vl({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return A.current=!0,Pc(i,a,s,l,u,d),D.current(),F.current=n?e:null,!0},[t,s,c,yt,h]),Rt=()=>y.current===!0||me.current!=null||ue.current===!0,zt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Bt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Vt=()=>{ae.current!=null&&(clearTimeout(ae.current),ae.current=null),ie.current=null},Ht=()=>{se.current?.remove(),se.current=null},Ut=()=>{Bt(re.current),re.current=null,oe.current=null},Wt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Gt=()=>{le.current?.(),le.current=null,me.current!=null&&(clearTimeout(me.current),me.current=null),ue.current=!1,de.current=null,pe.current=null,fe.current!=null&&(fe.current.setAttribute(`draggable`,`true`),fe.current.style.removeProperty(`touch-action`),fe.current=null),Ht(),Vt(),Ut(),ce.current=null},Kt=(e,n)=>{let r=S.current?.getRootNode(),i=Tl(Cl(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},qt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Vt();return}let r=t.getItem(e.directoryPath),i=jl(r)?r:null;if(i==null||i.isExpanded()){Vt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ie.current!==a&&(Vt(),ie.current=a,ae.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},Jt=()=>{re.current=null;let e=oe.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=Ol(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,D.current()),qt(Kt(e.clientX,e.clientY)),re.current=zt(Jt)},Yt=(e,t)=>{oe.current={clientX:e,clientY:t},re.current??=zt(Jt)},Xt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Gt(),Ht(),Vt(),Ut(),t.startDrag(r)===!1){e.preventDefault();return}if(ce.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Dl())){let t=El(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Wt(t),se.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Zt=()=>{Ht(),Vt(),Ut(),ce.current=null,t.cancelDrag()},Qt=(e,n,r)=>{if(me.current!=null||ue.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;pe.current={clientX:i.clientX,clientY:i.clientY},fe.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!ue.current;me.current!=null&&(clearTimeout(me.current),me.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),le.current===o&&(le.current=null),t&&(a.setAttribute(`draggable`,`true`),fe.current===a&&(fe.current=null),pe.current=null)},s=e=>{let t=e.touches[0],n=pe.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=bl*bl||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),le.current=o,me.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),fe.current===a&&(fe.current=null),pe.current=null;return}ue.current=!0,fe.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),ce.current=n;let e=a.getBoundingClientRect(),s=El(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Wt(s),se.current=s,de.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=de.current;n!=null&&se.current!=null&&(se.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),qt(Kt(t.clientX,t.clientY)),Yt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Kt(n.clientX,n.clientY),t.completeDrag(),Gt()},u=()=>{t.cancelDrag(),Gt()};le.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},yl)},$t=e=>{if(P!=null){if(e.key===`Escape`){Nt(),e.preventDefault(),e.stopPropagation();return}Ll.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(rt.isActive()){if(e.key===`Escape`)rt.cancel();else if(e.key===`Enter`)rt.commit();else return;Te(`focus`),ge(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){It(L??void 0),e.preventDefault(),e.stopPropagation();return}if(ot){if(e.key===`Escape`)N.current=!1,ne.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=kc(n,yt);ne.current=R<0||n==null?null:Math.max(0,Math.min(R*s-n.scrollTop,Math.max(0,r-s))),N.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Te(`focus`),ge(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&Nl(e)){t.openSearch(e.key),ge(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ke&&Fl(e),r=Il(e,Ke),i=r&&S.current!=null?Oc(S.current):null,a=r?new Set(Wl(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==L&&a.has(o)){let e=C.current;Fe(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=jl(p)?p:null,h=u!=null&&(Tt.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=Ul(u,E.current,T.current);e==null||n==null?y=!1:Ft(e,u)}else if((e.ctrlKey||e.metaKey)&&Ml(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;Te(`focus`);let b=t.getFocusedPath(),x=b!=null&&(Tt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Fe(b,v?.scrollTop??null),A.current=!0,ye(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Ie(b,Kl(S.current,v,i,u,s,wt,yt)),A.current=!0,ye(e=>e===b?e:b)):Pe()}ge(e=>e+1),e.preventDefault(),e.stopPropagation()};il(()=>{if(!(!f||!ot)){if(Le.current){Le.current=!1;return}Dc(w.current)}},[ot,f]),il(()=>{let e=x.current;switch(Ic({hasRenderedInput:e!=null,previousRenamingPath:M.current,renamingPath:it})){case`reset`:M.current=null;return;case`reveal-canonical`:it!=null&&Lt(it,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(F.current=null,M.current=it,Dc(e),e.select());return}},[bt.end,bt.start,it,Lt,Tt]),il(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=Oc(e)?.dataset.itemPath??null;ye(e=>e===t?e:t)},i=()=>{n(),A.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,Oc(e)!=null){r();return}A.current=!1,ye(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),A.current=!1,ye(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;ye(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),il(()=>{let e=S.current;e!=null&&(_t.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[_t.physical.scrollTop]),il(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;ee.current=kc(n,g);let a=()=>{let e=t.getVisibleCount(),r=Ac(ee.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Ue(vl({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!O.current){O.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=Ac(ee.current,g),i=t.getVisibleRows(e,e)[0]??null;Mc(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{Cc(_e)&&ge(e=>e+1),a()}),l=()=>{I.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,De(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i==null||I.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200))},p=()=>{if(a(),n.scrollTop>0&&d(),ke.current!=null&&y.current&&Mt.current(),I.current===!0){y.current=!1;return}xe(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{ee.current=(e[0]==null?null:jc(e[0]))??kc(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,ee.current=null,x?.disconnect()}},[t,g,s,c,h]),il(()=>{Ke||P==null||Nt(!1)},[Nt,Ke,P]);let en=al(()=>P==null?null:`${P.path}::${P.source}`,[P]);il(()=>{if(en==null){m?.clearSlotContent(an);return}let t=ke.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??zl(n.getBoundingClientRect()),close:e=>{Mt.current(e?.restoreFocus??!0)},restoreFocus:()=>{jt.current&&At.current(ke.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(an,i),e?.contextMenu?.onOpen?.(t.item,r),Ql(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&Ql(i)}),()=>{m?.clearSlotContent(an)}},[en,e?.contextMenu,m]),il(()=>{P!=null&&t.getItem(P.path)==null&&Nt()},[Nt,P,t]),il(()=>{if(P==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(Rl(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Nt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Nt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Nt,P]),il(()=>{let e=C.current,n=S.current;if(e==null||n==null){j.current=L;return}let r=L==null?null:T.current.get(L)??null,i=Oc(n),a=i?.dataset.itemPath??null,o=at&&x.current===i,c=f&&w.current===i,l=N.current&&!ot,u=ne.current??0,d=F.current,p=Ae.current,m=je.current,g=Me.current,_=i!=null,v=A.current||_,y=j.current!==L,b=p!=null&&p===L&&L!=null,E=!1,ee=!1;if(ct!=null&&ct.id!==te.current){te.current=ct.id;let n=ct.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,yt-s))):wt;E=!0,ee=Nc(e,n,s,yt,Ct,ct.offset,t)}t.clearScrollRequest(ct.id)}let O=!E&&l&&Pc(e,R,s,yt,Ct,u),k=!E&&d!=null&&d===L&&Pc(e,R,s,yt,Ct,wt),M=!E&&m!=null&&m.path===L&&Pc(e,R,s,yt,Ct,m.viewportOffset),re=!E&&g!=null&&g.path===L&&e.scrollTop!==g.scrollTop;if(re&&(e.scrollTop=g.scrollTop),(re||ee||k||M||O||v&&y&&d!==L&&!b&&Mc(e,R,s,yt,wt))&&D.current(),E){j.current=L;return}if(!v){j.current=L;return}if(o){j.current=L;return}if(c&&!l){j.current=L;return}if(r==null){l&&R>=0&&(Pc(e,R,s,yt,Ct,u),D.current()),j.current=L;return}(y||l||d===L||p===L||m?.path===L||g?.path===L||a==null||a!==L)&&(Dc(r),d===L&&(F.current=null),p===L&&(Ae.current=null),m?.path===L&&(je.current=null),g?.path===L&&(Me.current=null),N.current=!1,ne.current=null),j.current=L},[t,R,L,Et,s,at,ot,bt,yt,f,ct,h,wt,Ct,vt]);let tn=R>=0&&R>=_t.visible.startIndex&&R<=_t.visible.endIndex,nn=L!=null&&xt.some(e=>hl(e.row)===L),sn=tn||nn,cn=Je&&A.current===!0&&sn?L:null,ln=we===`pointer`?be:null,un=P?.path??Ne.current??ln??cn??be,fn=P?.source===`right-click`;il(()=>{y.current&&P==null||Pt(et(un))},[P,et,bt,yt,Ee,xt,un,Pt,vt]);let pn=ol(e=>{if(y.current||Rl(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&Te(e=>e===`pointer`?e:`pointer`),xe(e=>e===i?e:i)},[]),mn=ol(()=>{xe(null)},[]);il(()=>{if(!lt)return;let e=()=>{Gt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Gt(),t.cancelDrag()}},[t,lt]);let hn=e=>{if(!lt||t.getDragSession()==null||ue.current)return;let n=Tl(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),qt(t.getDragSession()?.target??null),Yt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},gn=e=>{if(!lt||t.getDragSession()==null||ue.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Vt(),Ut(),t.setDragTarget(null))},_n=e=>{!lt||t.getDragSession()==null||ue.current||(e.preventDefault(),Kt(e.clientX,e.clientY),t.completeDrag(),Ht(),Vt(),Ut(),ce.current=null)},vn=_t.window.height,yn=_t.window.offsetTop,bn=Math.min(0,yt-vn),xn=Math.min(0,yt-vn-wt),Sn=ve===L||N.current,Cn=L!=null&&Sn&&!Et&&R>=0?vt[R]??t.getVisibleRows(R,R)[0]??null:null,wn=Cn==null?null:Fc(R,s,bt,vn),Tn=ce.current,En=pt!=null&&Tn!=null&&Tn.path===pt&&Tn.index>=bt.start&&Tn.index<=bt.end,Dn=pt!=null&&Tn!=null&&Tn.path===pt&&!En&&Tn.path!==Cn?.path?Tn:null,On=Dn==null?null:Fc(Dn.index,s,bt,vn),kn=Pl((R>=0?vt[R]??t.getVisibleRows(R,R)[0]??null:null)?.ancestorPaths.at(-1)??null),An=ot&&L!=null?Yl(o,L,!Et):void 0,jn=P?.path??(ot?L:ve),Mn=P?.path??be,Nn=et(un),Pn=Ke&&Je&&!fn&&!at&&Nn!=null&&Se!=null&&un!=null,Fn=Ke&&(Pn||P!=null),In=P?.anchorRect,Ln=In==null&&Nn!=null&&Se!=null&&(P!=null||Pn)?Se:null,Rn=In==null?Ln==null?void 0:{top:`${Ln}px`}:{left:`${In.left}px`,position:`fixed`,right:`auto`,top:`${In.top}px`},zn=fn?{opacity:`0`}:void 0,Bn=ol((e,n,r,i)=>{let a=zc({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:ot,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c);break}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=_t.visible.startIndex&&n.index<=_t.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(A.current=!0,ye(e=>e===c?e:c),Te(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Lt(c,{targetOffset:`sticky-parents`})},[t,ot,_t.visible.endIndex,_t.visible.startIndex,Lt]),Vn=()=>{if(y.current||!Je||un==null||Nn==null)return;let e=t.getItem(un);e!=null&&(Pt(Nn),jt.current=!0,Oe({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:Nn.getAttribute(`aria-label`)??un,path:e.getPath()},path:e.getPath(),source:`button`}))},Hn={contextHoverPath:Mn,contextMenuButtonTriggerEnabled:Je,contextMenuButtonVisibility:Ye,contextMenuEnabled:Ke,contextMenuRightClickEnabled:Xe,contextMenuTriggerMode:qe,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:lt,draggedPathSet:dt,dragTarget:ft,gitLaneActive:tt,gitStatusByPath:n,handleRowDragEnd:Zt,handleRowDragStart:Xt,handleRowTouchStart:Qt,ignoredGitDirectories:r,ignoredInheritanceCache:he,instanceId:o,itemHeight:s,onKeyDown:$t,onRowClick:Bn,openContextMenuForRow:Ft,registerButton:Ze,registerRenameInput:$e,renameView:rt,renderDecorationForRow:Dt,resolveIcon:nt,shouldSuppressContextMenu:Rt,visualFocusPath:jn},Un={...Hn,registerButton:Qe};return G(`div`,{ref:S,id:mt,"data-file-tree-context-menu-button-visibility":Ke&&Je?Ye:void 0,"data-file-tree-context-menu-trigger-mode":Ke?qe:void 0,"data-file-tree-has-context-menu-action-lane":Ke&&Je?`true`:void 0,"data-file-tree-has-git-lane":tt?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:lt?gn:void 0,onDragOver:lt?hn:void 0,onDrop:lt?_n:void 0,onKeyDown:$t,onPointerLeave:Ke?mn:void 0,onPointerOver:Ke?pn:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[G(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:kn}}),G(`slot`,{name:rn,"data-type":`header-slot`}),f?G(`div`,{"data-file-tree-search-container":!0,"data-open":ot?`true`:`false`,children:G(`input`,{ref:w,"aria-activedescendant":An,"aria-controls":mt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Re?`true`:void 0,value:st,onBlur:()=>{d===`retain`&&!Be.current||t.closeSearch()},onFocus:Ve,onPointerDown:Ve,onInput:e=>{Ve();let n=e.currentTarget;t.setSearch(n.value)}})}):null,G(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&We&&xt.length>0?G(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:G(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${ht}px`},children:xt.map((e,t)=>eu(Un,e.row,`sticky:${hl(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${xt.length-t}`}}))})}):null,G(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${Ct}px`},children:[G(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${yn}px`}}),G(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${vn}px`,top:`${bn}px`,bottom:`${xn}px`},children:[tu(Hn,bt,Tt),Cn!=null&&wn!=null?eu(Hn,Cn,`parked:${Cn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:pt===Cn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${wn}px`}}):null,Dn!=null&&On!=null?eu(Hn,Dn,`parked-drag:${Dn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${On}px`}}):null]})]})]}),Ke?G(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Fn?`true`:`false`,style:Rn,children:[G(`button`,{ref:v,type:`button`,"data-type":on,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":P==null?`false`:`true`,"data-visible":Pn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),P!=null){Nt();return}Vn()},tabIndex:-1,style:zn,children:G(Ks,{...nt(`file-tree-icon-ellipsis`)})}),P==null?null:G(`slot`,{name:an})]}):null,P==null?null:G(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Nt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Nt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var ru={hydrateRoot:(e,t)=>{Vs(_s(nu,t),e)},renderRoot:(e,t)=>{Bs(_s(nu,t),e)},unmountRoot:e=>{Bs(null,e)}};function iu(e,t){ru.renderRoot(e,t)}function au(e,t){ru.hydrateRoot(e,t)}function ou(e){ru.unmountRoot(e)}var su=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}},cu=`__c`,lu=`__k`,uu=`__d`,du=`__s`,fu=/[\s\n\\/='"\0<>]/,pu=/^(xlink|xmlns|xml)([A-Z])/,mu=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,hu=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,gu=new Set([`draggable`,`spellcheck`]);function _u(e){e.__g===void 0?e[uu]=!0:e.__g|=8}function vu(e){e.__g===void 0?e[uu]=!1:e.__g&=-9}function yu(e){return e.__g===void 0?!0===e[uu]:!!(8&e.__g)}var bu=/["&<]/;function xu(e){if(e.length===0||!1===bu.test(e))return e;for(var t=0,n=0,r=``,i=``;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=`&quot;`;break;case 38:i=`&amp;`;break;case 60:i=`&lt;`;break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var Su={},Cu=new Set(`animation-iteration-count.border-image-outset.border-image-slice.border-image-width.box-flex.box-flex-group.box-ordinal-group.column-count.fill-opacity.flex.flex-grow.flex-negative.flex-order.flex-positive.flex-shrink.flood-opacity.font-weight.grid-column.grid-row.line-clamp.line-height.opacity.order.orphans.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.widows.z-index.zoom`.split(`.`)),wu=/[A-Z]/g;function Tu(e){var t=``;for(var n in e){var r=e[n];if(r!=null&&r!==``){var i=n[0]==`-`?n:Su[n]||(Su[n]=n.replace(wu,`-$&`).toLowerCase()),a=`;`;typeof r!=`number`||i.startsWith(`--`)||Cu.has(i)||(a=`px;`),t=t+i+`:`+r+a}}return t||void 0}function Eu(){this.__d=!0}function Du(e,t){return{__v:e,context:t,props:e.props,setState:Eu,forceUpdate:Eu,__d:!0,__h:[]}}function Ou(e,t,n){if(!e.s){if(n instanceof ku){if(!n.s)return void(n.o=Ou.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Ou.bind(null,e,t),Ou.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var ku=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{Ou(r,1,a(this.v))}catch(e){Ou(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?Ou(r,1,t?t(i):i):n?Ou(r,1,n(i)):Ou(r,2,i)}catch(e){Ou(r,2,e)}},r},e}(),Au,ju,Mu,Nu,Pu={},Fu=Array.isArray,Iu=Object.assign,Lu=``,Ru=`<!--$s-->`,zu=`<!--/$s-->`;function Bu(e,t){var n,r=e.type,i=!0;return e[cu]?(i=!1,(n=e[cu]).state=n[du]):n=new r(e.props,t),e[cu]=n,n.__v=e,n.props=e.props,n.context=t,_u(n),n.state??=Pu,n[du]??(n[du]=n.state),r.getDerivedStateFromProps?n.state=Iu({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[du]===n.state?n.state:n[du]):!i&&n.componentWillUpdate&&n.componentWillUpdate(),Mu&&Mu(e),n.render(n.props,n.state,t)}function Vu(e,t,n,r,i,a,o){if(e==null||!0===e||!1===e||e===Lu)return Lu;var s=typeof e;if(s!=`object`)return s==`function`?Lu:s==`string`?xu(e):e+Lu;if(Fu(e)){var c,l=Lu;i[lu]=e;for(var u=e.length,d=0;d<u;d++){var f=e[d];if(f!=null&&typeof f!=`boolean`){var p,m=Vu(f,t,n,r,i,a,o);typeof m==`string`?l+=m:(c||=Array(u),l&&c.push(l),l=Lu,Fu(m)?(p=c).push.apply(p,m):c.push(m))}}return c?(l&&c.push(l),c):l}if(e.constructor!==void 0)return Lu;e.__=i,Au&&Au(e);var h=e.type,g=e.props;if(typeof h==`function`){var _,v,y,b=t;if(h===ys){if(`tpl`in g){for(var x=Lu,S=0;S<g.tpl.length;S++)if(x+=g.tpl[S],g.exprs&&S<g.exprs.length){var C=g.exprs[S];if(C==null)continue;typeof C!=`object`||C.constructor!==void 0&&!Fu(C)?x+=C:x+=Vu(C,t,n,r,e,a,o)}return x}if(`UNSTABLE_comment`in g)return`<!--`+xu(g.UNSTABLE_comment)+`-->`;v=g.children}else{if((_=h.contextType)!=null){var w=t[_.__c];b=w?w.props.value:_.__}var T=h.prototype&&typeof h.prototype.render==`function`;if(T)v=Bu(e,b),y=e[cu];else{e[cu]=y=Du(e,b);for(var E=0;yu(y)&&E++<25;){vu(y),Mu&&Mu(e);try{v=h.call(y,g,b)}catch(t){throw a&&t&&typeof t.then==`function`&&(e._suspended=!0),t}}_u(y)}if(y.getChildContext!=null&&(t=Iu({},t,y.getChildContext())),T&&W.errorBoundaries&&(h.getDerivedStateFromError||y.componentDidCatch)){v=v!=null&&v.type===ys&&v.key==null&&v.props.tpl==null?v.props.children:v;try{return Vu(v,t,n,r,e,a,!1)}catch(i){return h.getDerivedStateFromError&&(y[du]=h.getDerivedStateFromError(i)),y.componentDidCatch&&y.componentDidCatch(i,Pu),yu(y)?(v=Bu(e,t),(y=e[cu]).getChildContext!=null&&(t=Iu({},t,y.getChildContext())),Vu(v=v!=null&&v.type===ys&&v.key==null&&v.props.tpl==null?v.props.children:v,t,n,r,e,a,o)):Lu}finally{ju&&ju(e),Nu&&Nu(e)}}}v=v!=null&&v.type===ys&&v.key==null&&v.props.tpl==null?v.props.children:v;try{var D=Vu(v,t,n,r,e,a,o);return ju&&ju(e),W.unmount&&W.unmount(e),e._suspended?typeof D==`string`?Ru+D+zu:Fu(D)?(D.unshift(Ru),D.push(zu),D):D.then(function(e){return Ru+e+zu}):D}catch(i){if(!a&&o&&o.onError){var ee=function i(s){return o.onError(s,e,function(e,s){try{return Vu(e,t,n,r,s,a,o)}catch(e){return i(e)}})}(i);if(ee!==void 0)return ee;var te=W.__e;return te&&te(i,e),Lu}if(!a||!i||typeof i.then!=`function`)throw i;return i.then(function i(){try{var s=Vu(v,t,n,r,e,a,o);return e._suspended?Ru+s+zu:s}catch(e){if(!e||typeof e.then!=`function`)throw e;return e.then(i)}})}}var O,k=`<`+h,A=Lu;for(var j in g){var M=g[j];if(typeof(M=Uu(M)?M.value:M)!=`function`||j===`class`||j===`className`){switch(j){case`children`:O=M;continue;case`key`:case`ref`:case`__self`:case`__source`:continue;case`htmlFor`:if(`for`in g)continue;j=`for`;break;case`className`:if(`class`in g)continue;j=`class`;break;case`defaultChecked`:j=`checked`;break;case`defaultSelected`:j=`selected`;break;case`defaultValue`:case`value`:switch(j=`value`,h){case`textarea`:O=M;continue;case`select`:r=M;continue;case`option`:r!=M||`selected`in g||(k+=` selected`)}break;case`dangerouslySetInnerHTML`:A=M&&M.__html;continue;case`style`:typeof M==`object`&&(M=Tu(M));break;case`acceptCharset`:j=`accept-charset`;break;case`httpEquiv`:j=`http-equiv`;break;default:if(pu.test(j))j=j.replace(pu,`$1:$2`).toLowerCase();else{if(fu.test(j))continue;j[4]!==`-`&&!gu.has(j)||M==null?n?hu.test(j)&&(j=j===`panose1`?`panose-1`:j.replace(/([A-Z])/g,`-$1`).toLowerCase()):mu.test(j)&&(j=j.toLowerCase()):M+=Lu}}M!=null&&!1!==M&&(k=!0===M||M===Lu?k+` `+j:k+` `+j+`="`+(typeof M==`string`?xu(M):M+Lu)+`"`)}}if(fu.test(h))throw Error(h+` is not a valid HTML tag name in `+k+`>`);if(A||(typeof O==`string`?A=xu(O):O!=null&&!1!==O&&!0!==O&&(A=Vu(O,t,h===`svg`||h!==`foreignObject`&&n,r,e,a,o))),ju&&ju(e),Nu&&Nu(e),!A&&Hu.has(h))return k+`/>`;var N=`</`+h+`>`,ne=k+`>`;return Fu(A)?[ne].concat(A,[N]):typeof A==`string`?ne+A+N:[ne,A,N]}var Hu=new Set([`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function Uu(e){return typeof e==`object`&&!!e&&typeof e.peek==`function`&&`value`in e}var Wu=0;function Gu(e){return e!=null&&e.length>0?e:(Wu+=1,`pst_ft_${Wu}`)}function Ku({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??dn)}function qu(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function Ju(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function Yu(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var Xu=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new su;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=Gu(a),this.#p=Ho(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=un(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new Lo({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(ou(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=Uo(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&iu(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),iu(t.wrapper,this.#w()))}setGitStatus(e){let t=Ho(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&iu(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),iu(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),au(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),iu(r,this.#w())}#C(){return{initialViewportHeight:Ku({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(rn,e());return}this.#l.setSlotHtml(rn,this.#e?.header?.html??null)}#k(e){let t=Yu(e).find(e=>Ju(e)),n=qu(qt(cn(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=Yu(e),n=t.find(e=>Ju(e)),r=t.filter(e=>e!==n),i=cn(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=qu(i);if(a==null){for(let e of r)e.remove();return}if(!(r.length===1&&r[0].outerHTML===a.outerHTML)){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=cn(this.#m);t.colored&&Yt(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${$t}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}this.#g?.parentNode===e&&this.#_===this.#h||(this.#g??=document.createElement(`style`),this.#g.setAttribute($t,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=hn(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return xn(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}};function Zu(e,t){return e.split(/(?=^diff --git )/m).find(e=>$u(e)===t)}function Qu(e,t,n){let r=new Set(n),i=new Map,a=new Map;for(let e of t){let t=i.get(e.path)??[];if(t.push(e),i.set(e.path,t),r.has(e.id)){let t=a.get(e.path)??[];t.push(e),a.set(e.path,t)}}return e.split(/(?=^diff --git )/m).flatMap(e=>{let t=$u(e),n=t?a.get(t)?.sort((e,t)=>e.index-t.index):void 0;if(!t||!n||n.length===0)return[];if(n.length===i.get(t)?.length)return e;let r=e.search(/^@@ /m);return r<0?e:`${e.slice(0,r).trimEnd()}\n${n.map(e=>e.content).join(`
1268
+ `)}\n`}).join(`
1269
+ `)}function $u(e){return e.match(/^\+\+\+ b\/(.+)$/m)?.[1]||e.match(/^--- a\/(.+)$/m)?.[1]||e.match(/^diff --git a\/(.+?) b\/(.+)$/m)?.[2]}function ed(e){let t=e.trim();if(t)return rd(t)??nd(t)}function td(e){let t=e.split(`/`);return(t.length===2||t.length===3)&&t.every(e=>e.length>0&&!/\s/.test(e))}function nd(e){let t=e.match(/^(?:(.+)#)?(\d+)$/);if(!t)return;let n=Number(t[2]),r=t[1];if(!(!Number.isSafeInteger(n)||n<=0)&&!(r&&!td(r)))return{repository:r,number:n}}function rd(e){let t;try{t=new URL(e)}catch{return}if(t.protocol!==`https:`&&t.protocol!==`http:`)return;let[n,r,i,a]=t.pathname.split(`/`).filter(Boolean);if(!(!n||!r||!a||![`pull`,`pulls`].includes(i??``)))return nd(`${t.hostname===`github.com`?`${n}/${r}`:`${t.host}/${n}/${r}`}#${a}`)}var id=Object.create,ad=Object.defineProperty,od=Object.getOwnPropertyDescriptor,sd=Object.getOwnPropertyNames,cd=Object.getPrototypeOf,ld=Object.prototype.hasOwnProperty,ud=(e,t)=>function(){return t||(0,e[sd(e)[0]])((t={exports:{}}).exports,t),t.exports},dd=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=sd(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ld.call(e,s)&&s!==n&&ad(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=od(t,s))||r.enumerable});return e},fd=(e,t,n)=>(n=e==null?{}:id(cd(e)),dd(t||!e||!e.__esModule?ad(n,`default`,{value:e,enumerable:!0}):n,e)),pd=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),md=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=pd().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),hd=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=pd().default,r=md();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),gd=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=hd();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),_d=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=gd();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});function vd(e){let t={subscribe(t){let n=null,r=!1,i=!1,a=!1;function o(){if(n===null){a=!0;return}i||(i=!0,typeof n==`function`?n():n&&n.unsubscribe())}return n=e({next(e){var n;r||(n=t.next)==null||n.call(t,e)},error(e){var n;r||(r=!0,(n=t.error)==null||n.call(t,e),o())},complete(){var e;r||(r=!0,(e=t.complete)==null||e.call(t),o())}}),a&&o(),{unsubscribe:o}},pipe(...e){return e.reduce(yd,t)}};return t}function yd(e,t){return t(e)}function bd(e){let t=new AbortController;return new Promise((n,r)=>{let i=!1;function a(){i||(i=!0,o.unsubscribe())}t.signal.addEventListener(`abort`,()=>{r(t.signal.reason)});let o=e.subscribe({next(e){i=!0,n(e),a()},error(e){r(e)},complete(){t.abort(),a()}})})}function xd(e){return e=>{let t=0,n=null,r=[];function i(){n||=e.subscribe({next(e){for(let n of r){var t;(t=n.next)==null||t.call(n,e)}},error(e){for(let n of r){var t;(t=n.error)==null||t.call(n,e)}},complete(){for(let t of r){var e;(e=t.complete)==null||e.call(t)}}})}function a(){if(t===0&&n){let e=n;n=null,e.unsubscribe()}}return vd(e=>(t++,r.push(e),i(),{unsubscribe(){t--,a();let n=r.findIndex(t=>t===e);n>-1&&r.splice(n,1)}}))}}function Sd(e){let t=e,n=[],r=e=>{t!==void 0&&e.next(t),n.push(e)},i=e=>{n.splice(n.indexOf(e),1)},a=vd(e=>(r(e),()=>{i(e)}));return a.next=e=>{if(t!==e){t=e;for(let t of n)t.next(e)}},a.get=()=>t,a}function Cd(e){return vd(t=>{function n(t=0,r=e.op){let i=e.links[t];if(!i)throw Error(`No more links to execute - did you forget to add an ending link?`);return i({op:r,next(e){return n(t+1,e)}})}return n().subscribe(t)})}function wd(e){return!!e&&!Array.isArray(e)&&typeof e==`object`}function Td(){return Object.create(null)}var Ed={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};Ed.BAD_GATEWAY,Ed.SERVICE_UNAVAILABLE,Ed.GATEWAY_TIMEOUT,Ed.INTERNAL_SERVER_ERROR;var Dd=Object.create,Od=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,jd=Object.getPrototypeOf,Md=Object.prototype.hasOwnProperty,Nd=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Pd=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Ad(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Md.call(e,s)&&s!==n&&Od(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=kd(t,s))||r.enumerable});return e},Fd=(e,t,n)=>(n=e==null?{}:Dd(jd(e)),Pd(t||!e||!e.__esModule?Od(n,`default`,{value:e,enumerable:!0}):n,e)),Id=()=>{},Ld=e=>{Object.freeze&&Object.freeze(e)};function Rd(e,t,n){let r=t.join(`.`);return n[r]??(n[r]=new Proxy(Id,{get(r,i){if(!(typeof i!=`string`||i===`then`))return Rd(e,[...t,i],n)},apply(n,r,i){let a=t[t.length-1];if(a===`valueOf`||a===`toString`||a===`toJSON`)return`tRPC.proxy(${t.slice(0,-1).join(`.`)})`;let o={args:i,path:t};return a===`call`?o={args:i.length>=2?[i[1]]:[],path:t.slice(0,-1)}:a===`apply`&&(o={args:i.length>=2?i[1]:[],path:t.slice(0,-1)}),Ld(o.args),Ld(o.path),e(o)}})),n[r]}var zd=e=>Rd(e,[],Td()),Bd=e=>new Proxy(Id,{get(t,n){if(n!==`then`)return e(n)}}),Vd=Nd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Hd=Nd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Vd().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ud=Nd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Vd().default,r=Hd();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Wd=Nd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=Ud();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Gd=Nd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Wd();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});Fd(Gd(),1),Fd(Wd(),1);var Kd=Fd(Gd(),1);function qd(e,t){if(`error`in e){let n=t.deserialize(e.error);return{ok:!1,error:(0,Kd.default)((0,Kd.default)({},e),{},{error:n})}}return{ok:!0,result:(0,Kd.default)((0,Kd.default)({},e.result),(!e.result.type||e.result.type===`data`)&&{type:`data`,data:t.deserialize(e.result.data)})}}var Jd=class extends Error{constructor(){super(`Unable to transform response from server`)}};function Yd(e,t){let n;try{n=qd(e,t)}catch{throw new Jd}if(!n.ok&&(!wd(n.error.error)||typeof n.error.error.code!=`number`)||n.ok&&!wd(n.result))throw new Jd;return n}Fd(Gd(),1);var Xd=fd(gd(),1),Zd=fd(_d(),1);function Qd(e){return e instanceof tf}function $d(e){return wd(e)&&wd(e.error)&&typeof e.error.code==`number`&&typeof e.error.message==`string`}function ef(e,t){return typeof e==`string`?e:wd(e)&&typeof e.message==`string`?e.message:t}var tf=class e extends Error{constructor(t,n){var r,i;let a=n?.cause;super(t,{cause:a}),(0,Xd.default)(this,`cause`,void 0),(0,Xd.default)(this,`shape`,void 0),(0,Xd.default)(this,`data`,void 0),(0,Xd.default)(this,`meta`,void 0),this.meta=n?.meta,this.cause=a,this.shape=n==null||(r=n.result)==null?void 0:r.error,this.data=n==null||(i=n.result)==null?void 0:i.error.data,this.name=`TRPCClientError`,Object.setPrototypeOf(this,e.prototype)}static from(t,n={}){let r=t;return Qd(r)?(n.meta&&(r.meta=(0,Zd.default)((0,Zd.default)({},r.meta),n.meta)),r):$d(r)?new e(r.error.message,(0,Zd.default)((0,Zd.default)({},n),{},{result:r,cause:n.cause})):new e(ef(r,`Unknown error`),(0,Zd.default)((0,Zd.default)({},n),{},{cause:r}))}};function nf(e){let t=e;return t?`input`in t?t:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}var rf=e=>typeof e==`function`;function af(e){if(e)return e;if(typeof window<`u`&&rf(window.fetch))return window.fetch;if(typeof globalThis<`u`&&rf(globalThis.fetch))return globalThis.fetch;throw Error(`No fetch implementation found`)}var of=fd(_d());function sf(e){return{url:e.url.toString(),fetch:e.fetch,transformer:nf(e.transformer),methodOverride:e.methodOverride}}function cf(e){let t={};for(let n=0;n<e.length;n++)t[n]=e[n];return t}var lf={query:`GET`,mutation:`POST`,subscription:`PATCH`};function uf(e){return`input`in e?e.transformer.input.serialize(e.input):cf(e.inputs.map(t=>e.transformer.input.serialize(t)))}var df=e=>{let t=e.url.split(`?`),n=t[0].replace(/\/$/,``)+`/`+e.path,r=[];if(t[1]&&r.push(t[1]),`inputs`in e&&r.push(`batch=1`),e.type===`query`||e.type===`subscription`){let t=uf(e);t!==void 0&&e.methodOverride!==`POST`&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(n+=`?`+r.join(`&`)),n},ff=e=>{if(e.type===`query`&&e.methodOverride!==`POST`)return;let t=uf(e);return t===void 0?void 0:JSON.stringify(t)},pf=e=>_f((0,of.default)((0,of.default)({},e),{},{contentTypeHeader:`application/json`,getUrl:df,getBody:ff})),mf=class extends Error{constructor(){let e=`AbortError`;super(e),this.name=e,this.message=e}},hf=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<`u`?new DOMException(`AbortError`,`AbortError`):new mf};async function gf(e){hf(e.signal);let t=e.getUrl(e),n=e.getBody(e),r=e.methodOverride??lf[e.type],i=await(async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),a=(0,of.default)((0,of.default)((0,of.default)({},e.contentTypeHeader&&r!==`GET`?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{[e.trpcAcceptHeaderKey??`trpc-accept`]:e.trpcAcceptHeader}:void 0),i);return af(e.fetch)(t,{method:r,signal:e.signal,body:n,headers:a})}async function _f(e){let t={},n=await gf(e);t.response=n;let r=await n.json();return t.responseJSON=r,{json:r,meta:t}}fd(_d(),1);var vf=()=>{throw Error(`Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new`)};function yf(e){let t=null,n=null,r=()=>{clearTimeout(n),n=null,t=null};function i(t){let n=[[]],r=0;for(;;){let o=t[r];if(!o)break;let s=n[n.length-1];if(o.aborted){var i;(i=o.reject)==null||i.call(o,Error(`Aborted`)),r++;continue}if(e.validate(s.concat(o).map(e=>e.key))){s.push(o),r++;continue}if(s.length===0){var a;(a=o.reject)==null||a.call(o,Error(`Input is too big for a single dispatch`)),r++;continue}n.push([])}return n}function a(){let n=i(t);r();for(let t of n){if(!t.length)continue;let n={items:t};for(let e of t)e.batch=n;e.fetch(n.items.map(e=>e.key)).then(async e=>{await Promise.all(e.map(async(e,t)=>{let r=n.items[t];try{var i;let t=await Promise.resolve(e);(i=r.resolve)==null||i.call(r,t)}catch(e){var a;(a=r.reject)==null||a.call(r,e)}r.batch=null,r.reject=null,r.resolve=null}));for(let e of n.items){var t;(t=e.reject)==null||t.call(e,Error(`Missing result`)),e.batch=null}}).catch(e=>{for(let r of n.items){var t;(t=r.reject)==null||t.call(r,e),r.batch=null}})}}function o(e){let r={aborted:!1,key:e,batch:null,resolve:vf,reject:vf},i=new Promise((e,n)=>{r.reject=n,r.resolve=e,t??=[],t.push(r)});return n??=setTimeout(a),i}return{load:o}}function bf(...e){let t=new AbortController,n=e.length,r=0,i=()=>{++r===n&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener(`abort`,i,{once:!0});return t.signal}var xf=fd(_d(),1);function Sf(e){let t=sf(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{let i=i=>({validate(e){if(n===1/0&&r===1/0)return!0;if(e.length>r)return!1;let a=e.map(e=>e.path).join(`,`),o=e.map(e=>e.input);return df((0,xf.default)((0,xf.default)({},t),{},{type:i,path:a,inputs:o,signal:null})).length<=n},async fetch(n){let r=n.map(e=>e.path).join(`,`),a=n.map(e=>e.input),o=bf(...n.map(e=>e.signal)),s=await pf((0,xf.default)((0,xf.default)({},t),{},{path:r,inputs:a,type:i,headers(){return e.headers?typeof e.headers==`function`?e.headers({opList:n}):e.headers:{}},signal:o}));return(Array.isArray(s.json)?s.json:n.map(()=>s.json)).map(e=>({meta:s.meta,json:e}))}}),a={query:yf(i(`query`)),mutation:yf(i(`mutation`))};return({op:e})=>vd(n=>{if(e.type===`subscription`)throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let r=a[e.type].load(e),i;return r.then(e=>{i=e;let r=Yd(e.json,t.transformer.output);if(!r.ok){n.error(tf.from(r.error,{meta:e.meta}));return}n.next({context:e.meta,result:r.result}),n.complete()}).catch(e=>{n.error(tf.from(e,{meta:i?.meta}))}),()=>{}})}}fd(_d(),1);var Cf=(e,...t)=>typeof e==`function`?e(...t):e;fd(gd(),1);function wf(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function Tf(e){let t=await Cf(e.url);return e.connectionParams?t+`${t.includes(`?`)?`&`:`?`}connectionParams=1`:t}async function Ef(e,t){let n={method:`connectionParams`,data:await Cf(e)};return t.encode(n)}fd(gd(),1);var Df=fd(gd(),1);function Of(e){let{promise:t,resolve:n,reject:r}=wf();return e.addEventListener(`open`,()=>{e.removeEventListener(`error`,r),n()}),e.addEventListener(`error`,r),t}function kf(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function a(){r=setTimeout(()=>{e.send(`PING`),i=setTimeout(()=>{e.close()},n)},t)}function o(){clearTimeout(r),a()}function s(){clearTimeout(i),o()}e.addEventListener(`open`,a),e.addEventListener(`message`,({data:e})=>{clearTimeout(r),a(),e===`PONG`&&s()}),e.addEventListener(`close`,()=>{clearTimeout(r),clearTimeout(i)})}var Af=class e{constructor(t){if((0,Df.default)(this,`id`,++e.connectCount),(0,Df.default)(this,`WebSocketPonyfill`,void 0),(0,Df.default)(this,`urlOptions`,void 0),(0,Df.default)(this,`keepAliveOpts`,void 0),(0,Df.default)(this,`encoder`,void 0),(0,Df.default)(this,`wsObservable`,Sd(null)),(0,Df.default)(this,`openPromise`,null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive,this.encoder=t.encoder}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++e.connectCount,t.openPromise=Tf(t.urlOptions).then(e=>new t.WebSocketPonyfill(e)).then(async e=>{t.ws=e,e.binaryType=`arraybuffer`,e.addEventListener(`message`,function({data:e}){e===`PING`&&this.send(`PONG`)}),t.keepAliveOpts.enabled&&kf(e,t.keepAliveOpts),e.addEventListener(`close`,()=>{t.ws===e&&(t.ws=null)}),await Of(e),t.urlOptions.connectionParams&&e.send(await Ef(t.urlOptions.connectionParams,t.encoder))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var t;(t=e.ws)==null||t.close()}}};(0,Df.default)(Af,`connectCount`,0),fd(gd(),1),fd(_d(),1);var jf=fd(gd(),1),Mf=fd(_d(),1),Nf=class{constructor(e){(0,jf.default)(this,`links`,void 0),(0,jf.default)(this,`runtime`,void 0),(0,jf.default)(this,`requestId`,void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){return Cd({links:this.links,op:(0,Mf.default)((0,Mf.default)({},e),{},{context:e.context??{},id:++this.requestId})}).pipe(xd())}async requestAsPromise(e){var t=this;try{return(await bd(t.$request(e))).result.data}catch(e){throw tf.from(e)}}query(e,t,n){return this.requestAsPromise({type:`query`,path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:`mutation`,path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:`subscription`,path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(e){switch(e.result.type){case`state`:var t;(t=n.onConnectionStateChange)==null||t.call(n,e.result);break;case`started`:var r;(r=n.onStarted)==null||r.call(n,{context:e.context});break;case`stopped`:var i;(i=n.onStopped)==null||i.call(n);break;case`data`:case void 0:var a;(a=n.onData)==null||a.call(n,e.result.data);break}},error(e){var t;(t=n.onError)==null||t.call(n,e)},complete(){var e;(e=n.onComplete)==null||e.call(n)}})}},Pf=Symbol.for(`trpc_untypedClient`),Ff={query:`query`,mutate:`mutation`,subscribe:`subscription`},If=e=>Ff[e];function Lf(e){let t=zd(({path:t,args:n})=>{let r=[...t],i=If(r.pop()),a=r.join(`.`);return e[i](a,...n)});return Bd(n=>n===Pf?e:t[n])}function Rf(e){return Lf(new Nf(e))}fd(_d(),1),fd(_d(),1),fd(ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}})(),1),fd(_d(),1);var zf=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Bf=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(e,t){this.v=e,this.k=t}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Vf=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=Bf();function r(e){return new n(e,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Hf=ud({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=Bf();function r(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function i(t,r){try{var o=e[t](r),s=o.value,c=s instanceof n;Promise.resolve(c?s.v:s).then(function(n){if(c){var r=t===`return`?`return`:`next`;if(!s.k||n.done)return i(r,n);n=e[r](n).value}a(o.done?`return`:`normal`,n)},function(e){i(`throw`,e)})}catch(e){a(`throw`,e)}}function a(e,n){switch(e){case`return`:t.resolve({value:n,done:!0});break;case`throw`:t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise(function(a,o){var s={key:e,arg:n,resolve:a,reject:o,next:null};r?r=r.next=s:(t=r=s,i(e,n))})},typeof e.return!=`function`&&(this.return=void 0)}i.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},i.prototype.next=function(e){return this._invoke(`next`,e)},i.prototype.throw=function(e){return this._invoke(`throw`,e)},i.prototype.return=function(e){return this._invoke(`return`,e)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});fd(zf(),1),fd(Vf(),1),fd(Hf(),1),fd(_d(),1);var Uf=Rf({links:[Sf({url:`/api/trpc`})]}),Wf=`diffs-container`;(()=>{try{return!1}catch{return!1}})();var Gf=/(?=^From [a-f0-9]+ .+$)/m,Kf=/(?=^diff --git)/gm,qf=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Jf=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Yf=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Xf=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Zf=`header-prefix`,Qf=`header-metadata`,$f=`header-custom`,ep={dark:`pierre-dark`,light:`pierre-light`},tp=`data-theme-css`,np=`data-unsafe-css`,rp=`data-diffs-scrollbar-measure`,ip=`--diffs-scrollbar-gutter-measured`,ap=1e5,op=Object.freeze({fromStart:0,fromEnd:0}),sp={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},cp={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function lp(e){return e.replace(/\n$|\r\n$/,``)}var up=new TextEncoder,dp=new TextDecoder(`utf-8`,{ignoreBOM:!0}),fp=/[\uD800-\uDFFF]/,pp=1024,mp=new Uint8Array(pp);function hp(){mp.length!==pp&&(mp=new Uint8Array(pp))}function gp(e){if(e.length===0)return e;if(fp.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;mp.length<t&&(mp=new Uint8Array(t));let{written:n}=up.encodeInto(e,mp);return dp.decode(mp.subarray(0,n))}function _p(e,t,n){try{return vp(e,t,n)}finally{hp()}}function vp(e,t,n=!1){let r=Ip(e),i=r?Tp(e):Ep(e),a,o=[];for(let e of i){if(r&&!Kf.test(e)){if(a==null)a=gp(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}else if(!r&&!Dp(e)){if(a==null)a=gp(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=bp(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function yp(e,t){try{return bp(e,t)}finally{hp()}}function bp(e,{cacheKey:t,isGitDiff:n=Kf.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=Lp(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=wp(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=Np(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?Cp(i.contents):[],deletionLines:!l&&r!=null&&i!=null?Cp(r.contents):[],cacheKey:zp(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Yf),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=gp(r.trim()),n!==r&&(c.prevName=gp(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Jf:qf):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=gp(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=gp(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=gp(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=gp(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=gp(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=gp(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Xf)??[];t!=null&&(c.prevObjectId=gp(t)),n!=null&&(c.newObjectId=gp(n)),r!=null&&(c.mode=gp(r))}e.startsWith(`rename from `)&&(c.prevName=gp(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=gp(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
1270
+ `||s[s.length-1]===`\r`||s[s.length-1]===`\r
1271
+ `||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:zp(p.hunkContext),hunkSpecs:gp(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(a&&jp(t)&&!Mp(t))throw Error(`parsePatchContent: hunk has more lines than expected`);break}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=Bp(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=Vp(t);(g==null||g.type!==`change`)&&(g=Hp(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=Vp(t);(g==null||g.type!==`change`)&&(g=Hp(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=Vp(t);(g==null||g.type!==`context`)&&(g=Hp(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=lp(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=lp(c.deletionLines[e]))}}}if(a&&(x!==b.additionCount||S!==b.deletionCount))throw Error(`parsePatchContent: hunk line count mismatch`);b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(b.additionStart-1-o,0),c.hunks.push(b),o=b.additionStart+b.additionCount-1;for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=e.additionStart+e.additionCount-1,n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),c}}function xp(e,t,n=!1){let r=[],i=Sp(e)?e.split(Gf):[e];for(let e of i)try{r.push(_p(e,t==null?void 0:`${t}-${r.length}`,n))}catch(e){if(n)throw e;console.error(e)}return r}function Sp(e){return e.startsWith(`From `)||e.includes(`
1272
+ From `)}function Cp(e){let t=wp(e);for(let e=0;e<t.length;e++)t[e]=gp(t[e]);return t}function wp(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
1273
+ `,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function Tp(e){return Lp(e,`diff --git`)}function Ep(e){if(e.length===0)return[``];let t=[],n=0,r=0,i=0,a=0,o=!1;for(;r<e.length;){let s=Ap(e,r);if(i<=0&&a<=0){if(Op(e,r)){r>n&&t.push(e.slice(n,r)),n=r,o=!0,r=Ap(e,s);continue}if(o&&e.startsWith(`@@ -`,r)){let t=Np(e.slice(r,s));t!=null&&(i=t.deletionCount,a=t.additionCount)}r=s;continue}let c=e[r];if(c===`\\`){r=s;continue}c===` `?(i=Math.max(i-1,0),a=Math.max(a-1,0)):c===`-`?i=Math.max(i-1,0):c===`+`&&(a=Math.max(a-1,0)),r=s}return t.push(e.slice(n)),t}function Dp(e){return Op(e,0)}function Op(e,t){let n=Ap(e,t);return kp(e,t,`---`)&&kp(e,n,`+++`)}function kp(e,t,n){if(!e.startsWith(n,t))return!1;let r=e[t+n.length];if(r!==` `&&r!==` `)return!1;for(let r=t+n.length+1;r<e.length;r++){let t=e[r];if(t===`
1274
+ `||t===`\r`)break;if(t!==` `&&t!==` `)return!0}return!1}function Ap(e,t){let n=e.indexOf(`
1275
+ `,t);return n===-1?e.length:n+1}function jp(e){let t=e[0];return t===`+`||t===`-`||t===` `}function Mp(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
1276
+ `&&n!==`\r`)return!1}return!0}function Np(e){if(!e.startsWith(`@@ -`))return;let t=4,n=Pp(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=Pp(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=Pp(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=Pp(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=Fp(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function Pp(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function Fp(e){return e.endsWith(`\r
1277
+ `)?e.slice(0,-2):e.endsWith(`
1278
+ `)?e.slice(0,-1):e}function Ip(e){return e.startsWith(`diff --git`)||e.includes(`
1279
+ diff --git`)}function Lp(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:Rp(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=Rp(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function Rp(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function zp(e){return e==null?e:gp(e)}function Bp(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function Vp(e){let t=e.slice(1);return gp(t===``?`
1280
+ `:t)}function Hp(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}function Up(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function Wp(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}function Gp(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Kp(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function qp(e){return{type:`text`,value:e}}function q({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function Jp({name:e,width:t=16,height:n=16,properties:r}){return q({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[q({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function Yp(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 Xp(e){return q({tagName:`div`,properties:{"data-gutter":``},children:e})}function Zp(e,t,n,r={}){return q({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[q({tagName:`span`,properties:{"data-line-number-content":``},children:[qp(`${t}`)]})]})}function Qp(e,t,n){return q({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 $p(){return q({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[Jp({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}var em=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],tm=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};tm.prototype.normal={},tm.prototype.property={},tm.prototype.space=void 0;function nm(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new tm(n,r,t)}function rm(e){return e.toLowerCase()}var im=class{constructor(e,t){this.attribute=t,this.property=e}};im.prototype.attribute=``,im.prototype.booleanish=!1,im.prototype.boolean=!1,im.prototype.commaOrSpaceSeparated=!1,im.prototype.commaSeparated=!1,im.prototype.defined=!1,im.prototype.mustUseProperty=!1,im.prototype.number=!1,im.prototype.overloadedBoolean=!1,im.prototype.property=``,im.prototype.spaceSeparated=!1,im.prototype.space=void 0;var am=t({boolean:()=>J,booleanish:()=>sm,commaOrSpaceSeparated:()=>um,commaSeparated:()=>lm,number:()=>Y,overloadedBoolean:()=>cm,spaceSeparated:()=>X}),om=0,J=dm(),sm=dm(),cm=dm(),Y=dm(),X=dm(),lm=dm(),um=dm();function dm(){return 2**++om}var fm=Object.keys(am),pm=class extends im{constructor(e,t,n,r){let i=-1;if(super(e,t),mm(this,`space`,r),typeof n==`number`)for(;++i<fm.length;){let e=fm[i];mm(this,fm[i],(n&am[e])===am[e])}}};pm.prototype.defined=!0;function mm(e,t,n){n&&(e[t]=n)}function hm(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new pm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[rm(r)]=r,n[rm(a.attribute)]=r}return new tm(t,n,e.space)}var gm=hm({properties:{ariaActiveDescendant:null,ariaAtomic:sm,ariaAutoComplete:null,ariaBusy:sm,ariaChecked:sm,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:X,ariaCurrent:null,ariaDescribedBy:X,ariaDetails:null,ariaDisabled:sm,ariaDropEffect:X,ariaErrorMessage:null,ariaExpanded:sm,ariaFlowTo:X,ariaGrabbed:sm,ariaHasPopup:null,ariaHidden:sm,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:X,ariaLevel:Y,ariaLive:null,ariaModal:sm,ariaMultiLine:sm,ariaMultiSelectable:sm,ariaOrientation:null,ariaOwns:X,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:sm,ariaReadOnly:sm,ariaRelevant:null,ariaRequired:sm,ariaRoleDescription:X,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:sm,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function _m(e,t){return t in e?e[t]:t}function vm(e,t){return _m(e,t.toLowerCase())}var ym=hm({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:lm,acceptCharset:X,accessKey:X,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alpha:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:X,autoFocus:J,autoPlay:J,blocking:X,capture:null,charSet:null,checked:J,cite:null,className:X,closedBy:null,colorSpace:null,cols:Y,colSpan:Y,command:null,commandFor:null,content:null,contentEditable:sm,controls:J,controlsList:X,coords:Y|lm,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:cm,draggable:sm,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:X,height:Y,hidden:cm,high:Y,href:null,hrefLang:null,htmlFor:X,httpEquiv:X,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:X,itemRef:X,itemScope:J,itemType:X,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:J,optimum:Y,pattern:null,ping:X,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:X,required:J,reversed:J,rows:Y,rowSpan:Y,sandbox:X,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootCustomElementRegistry:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shadowRootSerializable:J,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:sm,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:sm,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:X,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:sm,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:J,disablePictureInPicture:J,disableRemotePlayback:J,exportParts:lm,part:X,prefix:null,property:null,results:Y,security:null,unselectable:null},space:`html`,transform:vm}),bm=hm({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:um,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:X,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:lm,g2:lm,glyphName:lm,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:um,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:X,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:um,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:um,rev:um,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:um,requiredFeatures:um,requiredFonts:um,requiredFormats:um,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:um,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:um,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:um,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:_m}),xm=hm({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Sm=hm({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:vm}),Cm=hm({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),wm=/[A-Z]/g,Tm=/-[a-z]/g,Em=/^data[-\w.:]+$/i;function Dm(e,t){let n=rm(t),r=t,i=im;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Em.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Tm,km);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Tm.test(e)){let n=e.replace(wm,Om);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=pm}return new i(r,t)}function Om(e){return`-`+e.toLowerCase()}function km(e){return e.charAt(1).toUpperCase()}var Am=nm([gm,ym,xm,Sm,Cm],`html`),jm=nm([gm,bm,xm,Sm,Cm],`svg`),Mm={}.hasOwnProperty;function Nm(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Mm.call(t,e)){let n=String(t[e]);i=Mm.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Pm=/["&'<>`]/g,Fm=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Im=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Lm=/[|\\{}()[\]^$+*?.]/g,Rm=new WeakMap;function zm(e,t){if(e=e.replace(t.subset?Bm(t.subset):Pm,r),t.subset||t.escapeOnly)return e;return e.replace(Fm,n).replace(Im,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Bm(e){let t=Rm.get(e);return t||(t=Vm(e),Rm.set(e,t)),t}function Vm(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Lm,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Hm=/[\dA-Fa-f]/;function Um(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Hm.test(String.fromCharCode(t))?r:r+`;`}var Wm=/\d/;function Gm(e,t,n){let r=`&#`+String(e);return n&&t&&!Wm.test(String.fromCharCode(t))?r:r+`;`}var Km=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),qm={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Jm=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Ym={}.hasOwnProperty,Xm={},Zm;for(Zm in qm)Ym.call(qm,Zm)&&(Xm[qm[Zm]]=Zm);var Qm=/[^\dA-Za-z]/;function $m(e,t,n,r){let i=String.fromCharCode(e);if(Ym.call(Xm,i)){let e=Xm[i],a=`&`+e;return n&&Km.includes(e)&&!Jm.includes(e)&&(!r||t&&t!==61&&Qm.test(String.fromCharCode(t)))?a:a+`;`}return``}function eh(e,t,n){let r=Um(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=$m(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Gm(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function th(e,t){return zm(e,Object.assign({format:eh},t))}var nh=/^>|^->|<!--|-->|--!>|<!-$/g,rh=[`>`],ih=[`<`,`>`];function ah(e,t,n,r){return r.settings.bogusComments?`<?`+th(e.value,Object.assign({},r.settings.characterReferences,{subset:rh}))+`>`:`<!--`+e.value.replace(nh,i)+`-->`;function i(e){return th(e,Object.assign({},r.settings.characterReferences,{subset:ih}))}}function oh(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function sh(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ch(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function lh(e){return e.join(` `).trim()}var uh=/[ \t\n\f\r]/g;function dh(e){return typeof e==`object`?e.type===`text`?fh(e.value):!1:fh(e)}function fh(e){return e.replace(uh,``)===``}var ph=gh(1),mh=gh(-1),hh=[];function gh(e){return t;function t(t,n,r){let i=t?t.children:hh,a=(n||0)+e,o=i[a];if(!r)for(;o&&dh(o);)a+=e,o=i[a];return o}}var _h={}.hasOwnProperty;function vh(e){return t;function t(t,n,r){return _h.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var yh=vh({body:Sh,caption:bh,colgroup:bh,dd:Eh,dt:Th,head:bh,html:xh,li:wh,optgroup:Oh,option:kh,p:Ch,rp:Dh,rt:Dh,tbody:jh,td:Ph,tfoot:Mh,th:Ph,thead:Ah,tr:Nh});function bh(e,t,n){let r=ph(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&dh(r.value.charAt(0)))}function xh(e,t,n){let r=ph(n,t);return!r||r.type!==`comment`}function Sh(e,t,n){let r=ph(n,t);return!r||r.type!==`comment`}function Ch(e,t,n){let r=ph(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function wh(e,t,n){let r=ph(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Th(e,t,n){let r=ph(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Eh(e,t,n){let r=ph(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Dh(e,t,n){let r=ph(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Oh(e,t,n){let r=ph(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function kh(e,t,n){let r=ph(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Ah(e,t,n){let r=ph(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function jh(e,t,n){let r=ph(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Mh(e,t,n){return!ph(n,t)}function Nh(e,t,n){let r=ph(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Ph(e,t,n){let r=ph(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Fh=vh({body:Rh,colgroup:zh,head:Lh,html:Ih,tbody:Bh});function Ih(e){let t=ph(e,-1);return!t||t.type!==`comment`}function Lh(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Rh(e){let t=ph(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&dh(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function zh(e,t,n){let r=mh(n,t),i=ph(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&yh(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Bh(e,t,n){let r=mh(n,t),i=ph(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&yh(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Vh={name:[[`
1281
+ \f\r &/=>`.split(``),`
1282
+ \f\r "&'/=>\``.split(``)],[`\0
1283
+ \f\r "&'/<=>`.split(``),`\0
1284
+ \f\r "&'/<=>\``.split(``)]],unquoted:[[`
1285
+ \f\r &>`.split(``),`\0
1286
+ \f\r "&'<=>\``.split(``)],[`\0
1287
+ \f\r "&'<=>\``.split(``),`\0
1288
+ \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Hh(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=jm);let l=Uh(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Fh(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!yh(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Uh(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Wh(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Wh(e,t,n){let r=Dm(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=th(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Vh.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?ch:lh)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=th(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Vh.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&sh(n,o)>sh(n,e.alternative)&&(o=e.alternative),s=o+th(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Vh.single:Vh.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Gh=[`<`,`&`];function Kh(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:th(e.value,Object.assign({},r.settings.characterReferences,{subset:Gh}))}function qh(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Kh(e,t,n,r)}function Jh(e,t,n,r){return r.all(e)}var Yh=Nm(`type`,{invalid:Xh,unknown:Zh,handlers:{comment:ah,doctype:oh,element:Hh,raw:qh,root:Jh,text:Kh}});function Xh(e){throw Error("Expected node, not `"+e+"`")}function Zh(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Qh={},$h={},eg=[];function tg(e,t){let n=t||Qh,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:ng,all:rg,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||em,characterReferences:n.characterReferences||$h,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?jm:Am,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function ng(e,t,n){return Yh(e,t,n,this)}function rg(e){let t=[],n=e&&e.children||eg,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var ig=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;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(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}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.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){let n=!(e===this.selectedRange||Gp(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}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&&xg(e.composedPath())||(Sg(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||(Sg(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(Sg(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){Sg(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();Sg(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);Sg(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=lg(i)&&this.hoveredLine?.lineElement===i.lineElement;cg(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),cg(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),lg(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(dg(i)&&p!=null){p(i);break}if(ug(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!lg(i))break;cg(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,Sg(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})()),Sg(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),Sg(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();xg(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{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;let r=this.currentSelectionEnds(),i=r?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),a=r?.top??i;i==null||a==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:a,current:i},t&&(this.selectionAnchor={lineNumber:a.lineNumber,side:a.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{let{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let n=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.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(Kp(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{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),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.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.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=tg($p());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);sg(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(mg(t));if(sg(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(sg(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(sg(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&&xg(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=mg(e);if(t&&xg(n))return;let r=hg(e);return r==null?this.pathFromAnnotationSlot(e):mg(r)}pathFromAnnotationSlot(e){let t=_g(gg(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:mg(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=vg(t)?t:vg(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)}Gp(r??void 0,i??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,this.queuedSelectionRender??=requestAnimationFrame(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}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;let e=this.pre.querySelectorAll(`[data-selected-line]`);for(let t of e)t.removeAttribute(`data-selected-line`);if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;let{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let n=this.pre.getAttribute(`data-diff-type`)===`split`,r=this.getIndexesFromSelection(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),Error(`InteractionManager.renderSelection: No valid rowRange`);let i=r.start===r.end,a=Math.min(r.start,r.end),o=Math.max(r.start,r.end);for(let e of t){let[t,r]=e.children,s=r.children.length;if(s!==t.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);for(let e=0;e<s;e++){let s=r.children[e],c=t.children[e];if(!(s instanceof HTMLElement)||!(c instanceof HTMLElement))continue;let l=this.parseLineIndex(s,n);if((l??0)>o)break;if(l==null||l<a)continue;let u=i?`single`:l===a?`first`:l===o?`last`:``;s.setAttribute(`data-selected-line`,u),c.setAttribute(`data-selected-line`,u),c.nextSibling instanceof HTMLElement&&s.nextSibling instanceof HTMLElement&&(s.nextSibling.hasAttribute(`data-line-annotation`)||s.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(i?(u=`last`,s.setAttribute(`data-selected-line`,`first`)):l===a?u=``:l===o&&s.setAttribute(`data-selected-line`,``),s.nextSibling.setAttribute(`data-selected-line`,u),c.nextSibling.setAttribute(`data-selected-line`,u))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}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);fg(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=bg(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=bg(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:pg(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:pg(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:yg(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:yg(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 ag({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:og({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 og({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 sg(e){return e!=null&&`kind`in e&&e.kind===`line`}function cg(e){return e!=null&&`kind`in e&&e.kind===`token`}function lg(e){return sg(e)||cg(e)}function ug(e){return`type`in e&&e.type===`line-info`}function dg(e){return`kind`in e&&e.kind===`merge-conflict-action`}function fg(e){return e===`current`||e===`incoming`||e===`both`}function pg(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function mg(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function hg(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 gg(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 _g(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 vg(e){return e!=null&&typeof e.elementFromPoint==`function`}function yg(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function bg(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 xg(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}function Sg(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;break}console.log(...n)}var Cg=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,t){let n=new Set,r=0,i=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(r===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;r++;let n=i.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 a=e.firstElementChild;a instanceof HTMLElement||(a=null),n==null?(n={type:`code`,codeElement:e,numberElement:a,codeWidth:`auto`,numberWidth:0},this.observedNodes.set(e,n),this.observe(e),a!=null&&(this.observedNodes.set(a,n),this.observe(a))):(this.observedNodes.set(e,n),i.delete(e),n.numberElement===a?n.numberElement==null?n.numberWidth=0:(i.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),i.delete(n.numberElement)),a!=null&&(this.observe(a),i.delete(a),this.observedNodes.set(a,n)),n.numberElement=a,n.numberWidth=0))}if(r>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),r=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 n=r.get(t);n??(n=[],r.set(t,n)),n.push(e)}for(let[e,t]of r){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[r,a]=t,o=r.firstElementChild,s=a.firstElementChild;if(!(r instanceof HTMLElement)||!(a instanceof HTMLElement)||!(o instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=i.get(o);if(c!=null){this.observedNodes.set(o,c),this.observedNodes.set(s,c),i.delete(o),i.delete(s);continue}let l=o.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:r,child:o,childHeight:l},column2:{container:a,child:s,childHeight:u},currentHeight:`auto`},n.add({child1:o,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of n)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);n.clear()}for(let[e,t]of i)this.unobserve(e),t.type===`code`?Eg(t):Dg(t);i.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:wg(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:Tg(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;if(!(!i&&!a)&&(t.codeWidth=e,t.numberWidth=r,i&&t.codeElement.style.setProperty(`--diffs-column-width`,`${typeof e==`number`?`${e}px`:`auto`}`),a&&t.codeElement.style.setProperty(`--diffs-column-number-width`,`${r===0?`auto`:`${r}px`}`),i||a&&e!==`auto`)){let n=typeof e==`number`?Math.max(e-r,0):0;t.codeElement.style.setProperty(`--diffs-column-content-width`,`${n>0?`${n}px`:`auto`}`)}}};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 wg(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function Tg(e){return Math.max(Math.ceil(e),0)}function Eg(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`))}function Dg(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 Og(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function kg(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 Ag(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}var jg=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
1289
+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
1290
+ <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
1291
+ </symbol>
1292
+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
1293
+ <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
1294
+ </symbol>
1295
+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
1296
+ <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
1297
+ </symbol>
1298
+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
1299
+ <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
1300
+ </symbol>
1301
+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
1302
+ <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
1303
+ </symbol>
1304
+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
1305
+ <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
1306
+ </symbol>
1307
+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
1308
+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
1309
+ </symbol>
1310
+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
1311
+ <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
1312
+ </symbol>
1313
+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
1314
+ <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
1315
+ </symbol>
1316
+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
1317
+ <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
1318
+ </symbol>
1319
+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
1320
+ <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
1321
+ </symbol>
1322
+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
1323
+ <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
1324
+ </symbol>
1325
+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
1326
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
1327
+ </symbol>
1328
+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
1329
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
1330
+ </symbol>
1331
+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
1332
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
1333
+ </symbol>
1334
+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
1335
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
1336
+ </symbol>
1337
+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
1338
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
1339
+ </symbol>
1340
+ </svg>`;function Mg(e,t){return e==null||t==null?e===t:Pg(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var Ng={};function Pg(e=Ng,t=Ng){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function Fg(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function Ig(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e.style.touchAction=`none`,e}function Lg(){let e=document.createElement(`style`);return e.setAttribute(np,``),e}var Rg;function zg(e){if(Rg!=null)return Rg;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(rp,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),Rg=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),Rg}function Bg(e){return`${ip}: ${e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`};`}var Vg=`@layer base {
1341
+ :host {
1342
+ --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
1343
+ "Courier New", monospace;
1344
+ --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
1345
+ "Noto Sans", "Liberation Sans", Arial, sans-serif;
1346
+ --diffs-mixer: light-dark(#000, #fff);
1347
+ --diffs-gap-fallback: 8px;
1348
+ --diffs-scrollbar-gutter-fallback: 6px;
1349
+ --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
1350
+ --diffs-added-light: #0dbe4e;
1351
+ --diffs-added-dark: #5ecc71;
1352
+ --diffs-modified-light: #009fff;
1353
+ --diffs-modified-dark: #69b1ff;
1354
+ --diffs-deleted-light: #ff2e3f;
1355
+ --diffs-deleted-dark: #ff6762;
1356
+ color-scheme: light dark;
1357
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1358
+ font-size: var(--diffs-font-size, 13px);
1359
+ line-height: var(--diffs-line-height, 20px);
1360
+ font-feature-settings: var(--diffs-font-features);
1361
+ --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
1362
+ --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
1363
+ --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
1364
+ --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
1365
+ --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
1366
+ --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
1367
+ --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
1368
+ --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
1369
+ --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
1370
+ --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
1371
+ --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
1372
+ --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
1373
+ --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
1374
+ --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
1375
+ --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
1376
+ --diffs-selection-base: var(--diffs-modified-base);
1377
+ --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
1378
+ background-color: var(--diffs-bg);
1379
+ color: var(--diffs-fg);
1380
+ display: block;
1381
+ }
1382
+
1383
+ pre, code, [data-error-wrapper] {
1384
+ isolation: isolate;
1385
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1386
+ outline: none;
1387
+ margin: 0;
1388
+ padding: 0;
1389
+ display: block;
1390
+ }
1391
+
1392
+ pre, code {
1393
+ background-color: var(--diffs-bg);
1394
+ }
1395
+
1396
+ code {
1397
+ contain: content;
1398
+ }
1399
+
1400
+ *, :before, :after {
1401
+ box-sizing: border-box;
1402
+ }
1403
+
1404
+ [data-icon-sprite] {
1405
+ display: none;
1406
+ }
1407
+
1408
+ [data-diffs-header], [data-separator] {
1409
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1410
+ }
1411
+
1412
+ [data-diffs-header][data-sticky] {
1413
+ z-index: 1;
1414
+ background-color: var(--diffs-bg);
1415
+ position: sticky;
1416
+ top: 0;
1417
+ }
1418
+
1419
+ [data-file-info] {
1420
+ color: var(--fg);
1421
+ background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
1422
+ border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
1423
+ padding: 10px;
1424
+ font-weight: 700;
1425
+ }
1426
+
1427
+ [data-diff], [data-file] {
1428
+ --diffs-grid-number-column-width: minmax(min-content, max-content);
1429
+ --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
1430
+
1431
+ &[data-dehydrated] {
1432
+ --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
1433
+ }
1434
+
1435
+ &:hover [data-code]::-webkit-scrollbar-thumb {
1436
+ background-color: var(--diffs-bg-context);
1437
+ }
1438
+ }
1439
+
1440
+ @supports (-webkit-touch-callout: none) {
1441
+ :host {
1442
+ --diffs-scrollbar-gutter-fallback: 0px;
1443
+ }
1444
+ }
1445
+
1446
+ [data-line] span {
1447
+ color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
1448
+ background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
1449
+ font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
1450
+ font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
1451
+ text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
1452
+ }
1453
+
1454
+ [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions] {
1455
+ --diffs-computed-decoration-bg: var(--diffs-bg);
1456
+ --diffs-computed-diff-line-bg: var(--diffs-bg);
1457
+ --diffs-computed-selected-line-bg: var(--diffs-bg);
1458
+ color: var(--diffs-fg);
1459
+ background-color: var(--diffs-line-bg, var(--diffs-bg));
1460
+
1461
+ @media (pointer: fine) {
1462
+ &:where([data-hovered]) {
1463
+ --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
1464
+ var(--diffs-computed-selected-line-bg) 97%,
1465
+ var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab,
1466
+ var(--diffs-computed-selected-line-bg) 91%,
1467
+ var(--diffs-bg-hover-override, var(--diffs-mixer))));
1468
+ --diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit);
1469
+ }
1470
+ }
1471
+ }
1472
+
1473
+ [data-line], [data-no-newline] {
1474
+ &[data-decoration-bg] {
1475
+ --mix-deco-light: 92%;
1476
+ --mix-deco-dark: 85%;
1477
+
1478
+ &[data-decoration-bg-depth="2"] {
1479
+ --mix-deco-light: 88%;
1480
+ --mix-deco-dark: 80%;
1481
+ }
1482
+
1483
+ &[data-decoration-bg-depth="3"] {
1484
+ --mix-deco-light: 85%;
1485
+ --mix-deco-dark: 78%;
1486
+ }
1487
+
1488
+ @media (pointer: fine) {
1489
+ &[data-hovered]:not([data-selected-line]) {
1490
+ --mix-deco-light: 85%;
1491
+ --mix-deco-dark: 85%;
1492
+ }
1493
+
1494
+ &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] {
1495
+ --mix-deco-light: 83%;
1496
+ --mix-deco-dark: 83%;
1497
+ }
1498
+
1499
+ &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] {
1500
+ --mix-deco-light: 81%;
1501
+ --mix-deco-dark: 81%;
1502
+ }
1503
+ }
1504
+
1505
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
1506
+ var(--diffs-bg) var(--mix-deco-light),
1507
+ var(--diffs-decoration-bg)), color-mix(in lab,
1508
+ var(--diffs-bg) var(--mix-deco-dark),
1509
+ var(--diffs-decoration-bg)));
1510
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
1511
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
1512
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
1513
+ }
1514
+ }
1515
+
1516
+ [data-line-annotation], [data-gutter-buffer="annotation"] {
1517
+ --diffs-annotation-bg: var(--diffs-bg-context);
1518
+ --diffs-computed-decoration-bg: var(--diffs-annotation-bg);
1519
+ --diffs-computed-diff-line-bg: var(--diffs-annotation-bg);
1520
+ --diffs-computed-selected-line-bg: var(--diffs-annotation-bg);
1521
+ --diffs-line-bg: var(--diffs-annotation-bg);
1522
+ }
1523
+
1524
+ [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
1525
+ --diffs-computed-decoration-bg: var(--diffs-bg-context);
1526
+ --diffs-computed-diff-line-bg: var(--diffs-bg-context);
1527
+ --diffs-computed-selected-line-bg: var(--diffs-bg-context);
1528
+ --diffs-line-bg: var(--diffs-bg-context);
1529
+ }
1530
+
1531
+ [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
1532
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
1533
+ var(--diffs-bg) 78%,
1534
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
1535
+ var(--diffs-bg) 68%,
1536
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
1537
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
1538
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
1539
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
1540
+ }
1541
+
1542
+ [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
1543
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
1544
+ var(--diffs-bg) 78%,
1545
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
1546
+ var(--diffs-bg) 68%,
1547
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
1548
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
1549
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
1550
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
1551
+ }
1552
+
1553
+ [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
1554
+ --diffs-computed-decoration-bg: var(--diffs-bg);
1555
+ --diffs-computed-diff-line-bg: var(--diffs-bg);
1556
+ --diffs-computed-selected-line-bg: var(--diffs-bg);
1557
+ --diffs-line-bg: var(--diffs-bg);
1558
+ }
1559
+
1560
+ :where([data-background]) {
1561
+ & [data-gutter-buffer], & [data-column-number] {
1562
+ --mix-light: 91%;
1563
+ --mix-dark: 85%;
1564
+ }
1565
+
1566
+ & [data-line], & [data-no-newline] {
1567
+ --mix-light: 88%;
1568
+ --mix-dark: 80%;
1569
+ }
1570
+
1571
+ & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
1572
+ --diffs-diff-line-mix-target: var(--diffs-bg);
1573
+
1574
+ &[data-line-type="change-deletion"] {
1575
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
1576
+
1577
+ @media (pointer: fine) {
1578
+ &[data-hovered] {
1579
+ --mix-light: 80%;
1580
+ --mix-dark: 75%;
1581
+ }
1582
+ }
1583
+
1584
+ &:where([data-gutter-buffer], [data-column-number]) {
1585
+ color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
1586
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
1587
+ }
1588
+
1589
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
1590
+ var(--diffs-computed-decoration-bg) var(--mix-light),
1591
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
1592
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
1593
+ var(--diffs-diff-line-mix-target)));
1594
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
1595
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
1596
+ }
1597
+
1598
+ &[data-line-type="change-addition"] {
1599
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
1600
+
1601
+ @media (pointer: fine) {
1602
+ &[data-hovered] {
1603
+ --mix-light: 80%;
1604
+ --mix-dark: 70%;
1605
+ }
1606
+ }
1607
+
1608
+ &:where([data-gutter-buffer], [data-column-number]) {
1609
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
1610
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
1611
+ }
1612
+
1613
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
1614
+ var(--diffs-computed-decoration-bg) var(--mix-light),
1615
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
1616
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
1617
+ var(--diffs-diff-line-mix-target)));
1618
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
1619
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
1620
+ }
1621
+
1622
+ &[data-merge-conflict="current"] {
1623
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
1624
+
1625
+ &:where([data-gutter-buffer], [data-column-number]) {
1626
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
1627
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
1628
+ }
1629
+
1630
+ @media (pointer: fine) {
1631
+ &[data-hovered] {
1632
+ --mix-light: 80%;
1633
+ --mix-dark: 70%;
1634
+ }
1635
+ }
1636
+
1637
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
1638
+ var(--diffs-computed-decoration-bg) var(--mix-light),
1639
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
1640
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
1641
+ var(--diffs-diff-line-mix-target)));
1642
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
1643
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
1644
+ }
1645
+
1646
+ &[data-merge-conflict="incoming"] {
1647
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
1648
+
1649
+ &:where([data-gutter-buffer], [data-column-number]) {
1650
+ color: var(--diffs-modified-base);
1651
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
1652
+ }
1653
+
1654
+ @media (pointer: fine) {
1655
+ &[data-hovered] {
1656
+ --mix-light: 80%;
1657
+ --mix-dark: 70%;
1658
+ }
1659
+ }
1660
+
1661
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
1662
+ var(--diffs-computed-decoration-bg) var(--mix-light),
1663
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
1664
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
1665
+ var(--diffs-diff-line-mix-target)));
1666
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
1667
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
1668
+ }
1669
+ }
1670
+ }
1671
+
1672
+ [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline] {
1673
+ --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
1674
+
1675
+ &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
1676
+ --mix-selection-light: 82%;
1677
+ --mix-selection-dark: 75%;
1678
+
1679
+ @media (pointer: fine) {
1680
+ &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
1681
+ --mix-selection-light: 75%;
1682
+ --mix-selection-dark: 70%;
1683
+ }
1684
+ }
1685
+ }
1686
+
1687
+ &:where([data-gutter-buffer], [data-column-number])[data-selected-line] {
1688
+ --mix-selection-light: 75%;
1689
+ --mix-selection-dark: 60%;
1690
+ --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
1691
+
1692
+ @media (pointer: fine) {
1693
+ &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
1694
+ --mix-selection-light: 70%;
1695
+ --mix-selection-dark: 55%;
1696
+ }
1697
+ }
1698
+ }
1699
+
1700
+ &[data-selected-line] {
1701
+ --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
1702
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
1703
+ var(--diffs-selection-mix-target)), color-mix(in lab,
1704
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
1705
+ var(--diffs-selection-mix-target)));
1706
+ --diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit);
1707
+ }
1708
+ }
1709
+
1710
+ [data-gutter-buffer], [data-column-number] {
1711
+ &[data-selected-line] {
1712
+ color: var(--diffs-selection-number-fg);
1713
+ }
1714
+ }
1715
+
1716
+ [data-no-newline] {
1717
+ user-select: none;
1718
+
1719
+ & span {
1720
+ opacity: .6;
1721
+ }
1722
+ }
1723
+
1724
+ [data-diff-type="split"][data-overflow="scroll"] {
1725
+ grid-template-columns: 1fr 1fr;
1726
+ display: grid;
1727
+
1728
+ & [data-additions] {
1729
+ border-left: 1px solid var(--diffs-bg);
1730
+ }
1731
+
1732
+ & [data-deletions] {
1733
+ border-right: 1px solid var(--diffs-bg);
1734
+ }
1735
+ }
1736
+
1737
+ [data-code] {
1738
+ grid-auto-flow: dense;
1739
+ grid-template-columns: var(--diffs-code-grid);
1740
+ overflow: var(--diffs-overflow-override, scroll) clip;
1741
+ overscroll-behavior-x: none;
1742
+ tab-size: var(--diffs-tab-size, 2);
1743
+ padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
1744
+ padding-bottom: max(0px,
1745
+ calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
1746
+ var(--diffs-scrollbar-gutter)));
1747
+ scrollbar-gutter: stable;
1748
+ align-self: flex-start;
1749
+ display: grid;
1750
+ }
1751
+
1752
+ [data-diffs-scrollbar-measure] {
1753
+ opacity: 0;
1754
+ pointer-events: none;
1755
+ scrollbar-gutter: auto;
1756
+ grid-template-columns: none;
1757
+ width: 100px;
1758
+ height: 100px;
1759
+ padding: 0;
1760
+ position: absolute;
1761
+ top: -200px;
1762
+ left: -200px;
1763
+ }
1764
+
1765
+ [data-container-size] {
1766
+ container-type: inline-size;
1767
+ }
1768
+
1769
+ [data-code]::-webkit-scrollbar {
1770
+ width: 0;
1771
+ height: var(--diffs-scrollbar-gutter);
1772
+ }
1773
+
1774
+ [data-code]::-webkit-scrollbar-track {
1775
+ background: none;
1776
+ }
1777
+
1778
+ [data-code]::-webkit-scrollbar-thumb {
1779
+ background-color: #0000;
1780
+ background-clip: content-box;
1781
+ border: 1px solid #0000;
1782
+ border-radius: 3px;
1783
+ }
1784
+
1785
+ [data-code]::-webkit-scrollbar-corner {
1786
+ background-color: #0000;
1787
+ }
1788
+
1789
+ @supports ((-moz-appearance: none)) {
1790
+ [data-code] {
1791
+ scrollbar-width: thin;
1792
+ scrollbar-color: var(--diffs-bg-context) transparent;
1793
+ padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
1794
+ }
1795
+ }
1796
+
1797
+ [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
1798
+ & [data-code], &[data-overflow="wrap"] {
1799
+ padding-top: 0;
1800
+ }
1801
+ }
1802
+
1803
+ [data-gutter] {
1804
+ grid-template-rows: subgrid;
1805
+ grid-template-columns: subgrid;
1806
+ z-index: 3;
1807
+ background-color: var(--diffs-bg);
1808
+ grid-column: 1;
1809
+ display: grid;
1810
+ position: relative;
1811
+
1812
+ & [data-gutter-buffer], & [data-column-number] {
1813
+ border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
1814
+ }
1815
+ }
1816
+
1817
+ [data-content] {
1818
+ grid-template-rows: subgrid;
1819
+ grid-template-columns: subgrid;
1820
+ background-color: var(--diffs-bg);
1821
+ grid-column: 2;
1822
+ min-width: 0;
1823
+ display: grid;
1824
+ }
1825
+
1826
+ [data-diff-type="split"][data-overflow="wrap"] {
1827
+ grid-auto-flow: dense;
1828
+ grid-template-columns: repeat(2, var(--diffs-code-grid));
1829
+ padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
1830
+ display: grid;
1831
+
1832
+ & [data-deletions] {
1833
+ display: contents;
1834
+
1835
+ & [data-gutter] {
1836
+ grid-column: 1;
1837
+ }
1838
+
1839
+ & [data-content] {
1840
+ border-right: 1px solid var(--diffs-bg);
1841
+ grid-column: 2;
1842
+ }
1843
+ }
1844
+
1845
+ & [data-additions] {
1846
+ display: contents;
1847
+
1848
+ & [data-gutter] {
1849
+ border-left: 1px solid var(--diffs-bg);
1850
+ grid-column: 3;
1851
+ }
1852
+
1853
+ & [data-content] {
1854
+ grid-column: 4;
1855
+ }
1856
+ }
1857
+ }
1858
+
1859
+ [data-overflow="scroll"] [data-gutter] {
1860
+ position: sticky;
1861
+ left: 0;
1862
+ }
1863
+
1864
+ [data-interactive-lines] [data-line] {
1865
+ cursor: pointer;
1866
+ }
1867
+
1868
+ [data-interactive-line-numbers] [data-column-number] {
1869
+ cursor: pointer;
1870
+ touch-action: none;
1871
+ }
1872
+
1873
+ [data-content-buffer], [data-gutter-buffer] {
1874
+ user-select: none;
1875
+ min-height: 1lh;
1876
+ position: relative;
1877
+ }
1878
+
1879
+ [data-gutter-buffer] {
1880
+ padding-left: 2ch;
1881
+ padding-right: 1ch;
1882
+
1883
+ &:before {
1884
+ content: "";
1885
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
1886
+ display: block;
1887
+ }
1888
+ }
1889
+
1890
+ [data-gutter-buffer="annotation"] {
1891
+ --diffs-annotation-bg: var(--diffs-bg-context-gutter);
1892
+ min-height: 0;
1893
+ }
1894
+
1895
+ [data-gutter-buffer="buffer"] {
1896
+ --diffs-line-bg: var(--diffs-bg-context-gutter);
1897
+ }
1898
+
1899
+ [data-content-buffer] {
1900
+ background-position: 5px 0;
1901
+ background-size: 8px 8px;
1902
+ background-origin: border-box;
1903
+ background-image: repeating-linear-gradient(-45deg,
1904
+ transparent,
1905
+ transparent calc(3px * 1.414),
1906
+ var(--diffs-bg-buffer) calc(3px * 1.414),
1907
+ var(--diffs-bg-buffer) calc(4px * 1.414));
1908
+ grid-column: 1;
1909
+ }
1910
+
1911
+ [data-separator] {
1912
+ box-sizing: content-box;
1913
+ background-color: var(--diffs-bg);
1914
+ }
1915
+
1916
+ [data-separator="simple"] {
1917
+ min-height: 4px;
1918
+ }
1919
+
1920
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
1921
+ background-color: var(--diffs-bg-separator);
1922
+ }
1923
+
1924
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
1925
+ height: 32px;
1926
+ position: relative;
1927
+ }
1928
+
1929
+ [data-separator-wrapper] {
1930
+ user-select: none;
1931
+ fill: currentColor;
1932
+ background-color: var(--diffs-bg);
1933
+ align-items: center;
1934
+ height: 100%;
1935
+ display: flex;
1936
+ position: absolute;
1937
+ inset-inline: 0;
1938
+ }
1939
+
1940
+ [data-content] [data-separator-wrapper] {
1941
+ display: none;
1942
+ }
1943
+
1944
+ [data-separator="metadata"] [data-separator-wrapper] {
1945
+ background-color: var(--diffs-bg-separator);
1946
+ height: 100%;
1947
+ color: var(--diffs-fg-number);
1948
+ white-space: nowrap;
1949
+ text-overflow: ellipsis;
1950
+ min-width: min-content;
1951
+ padding-inline: 1ch;
1952
+ inset-inline: 100% auto;
1953
+ overflow: hidden;
1954
+ }
1955
+
1956
+ [data-separator="line-info"] {
1957
+ margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
1958
+
1959
+ & [data-separator-wrapper] {
1960
+ min-width: 16px;
1961
+ }
1962
+ }
1963
+
1964
+ [data-separator="line-info-basic"], [data-separator="metadata"] {
1965
+ margin-block: 0;
1966
+ }
1967
+
1968
+ [data-separator="line-info"][data-separator-first] {
1969
+ margin-top: 0;
1970
+ }
1971
+
1972
+ [data-separator="line-info"][data-separator-last] {
1973
+ margin-bottom: 0;
1974
+ }
1975
+
1976
+ [data-expand-index] [data-separator-wrapper] {
1977
+ grid-template-columns: 32px auto;
1978
+ display: grid;
1979
+ }
1980
+
1981
+ [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
1982
+ grid-template-columns: 32px 32px auto;
1983
+ }
1984
+
1985
+ [data-expand-button], [data-separator-content] {
1986
+ background-color: var(--diffs-bg-separator);
1987
+ flex: none;
1988
+ align-items: center;
1989
+ display: flex;
1990
+ }
1991
+
1992
+ [data-expand-index] [data-separator-content]:hover {
1993
+ cursor: pointer;
1994
+ text-decoration: underline;
1995
+ }
1996
+
1997
+ [data-expand-button] {
1998
+ cursor: pointer;
1999
+ min-width: 32px;
2000
+ color: var(--diffs-fg-number);
2001
+ border-right: 2px solid var(--diffs-bg);
2002
+ flex-shrink: 0;
2003
+ justify-content: center;
2004
+ align-self: stretch;
2005
+
2006
+ &:hover {
2007
+ color: var(--diffs-fg);
2008
+ }
2009
+
2010
+ &[data-expand-all-button] {
2011
+ display: none;
2012
+ }
2013
+ }
2014
+
2015
+ [data-expand-down] [data-icon] {
2016
+ transform: scaleY(-1);
2017
+ }
2018
+
2019
+ [data-separator-content] {
2020
+ height: 100%;
2021
+ color: var(--diffs-fg-number);
2022
+ flex: auto;
2023
+ justify-content: flex-start;
2024
+ padding: 0 1ch;
2025
+ overflow: hidden;
2026
+ }
2027
+
2028
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
2029
+ & [data-separator-content] {
2030
+ user-select: none;
2031
+ height: 100%;
2032
+ overflow: clip;
2033
+ }
2034
+ }
2035
+
2036
+ [data-unmodified-lines] {
2037
+ text-overflow: ellipsis;
2038
+ white-space: nowrap;
2039
+ flex: 0 auto;
2040
+ min-width: 0;
2041
+ display: block;
2042
+ overflow: hidden;
2043
+ }
2044
+
2045
+ @supports (width: 1cqi) {
2046
+ [data-unified] {
2047
+ & [data-separator="line-info"] [data-separator-wrapper] {
2048
+ padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
2049
+ width: 100cqi;
2050
+
2051
+ & [data-separator-content] {
2052
+ border-radius: 6px;
2053
+ }
2054
+ }
2055
+
2056
+ & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
2057
+ border-top-left-radius: unset;
2058
+ border-bottom-left-radius: unset;
2059
+ }
2060
+ }
2061
+
2062
+ [data-gutter] {
2063
+ & [data-separator="line-info"] [data-separator-wrapper] {
2064
+ padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
2065
+ }
2066
+
2067
+ & [data-separator="line-info"] [data-separator-content] {
2068
+ border-top-left-radius: 6px;
2069
+ border-bottom-left-radius: 6px;
2070
+ }
2071
+
2072
+ & [data-separator="line-info"][data-expand-index] [data-separator-content] {
2073
+ border-top-left-radius: unset;
2074
+ border-bottom-left-radius: unset;
2075
+ }
2076
+ }
2077
+
2078
+ [data-additions] {
2079
+ & [data-content] [data-separator="line-info"] {
2080
+ background-color: var(--diffs-bg);
2081
+
2082
+ & [data-separator-wrapper] {
2083
+ display: none;
2084
+ }
2085
+ }
2086
+
2087
+ & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
2088
+ background-color: var(--diffs-bg-separator);
2089
+ border-top-right-radius: 6px;
2090
+ border-bottom-right-radius: 6px;
2091
+ height: 100%;
2092
+ display: block;
2093
+
2094
+ & [data-separator-content], & [data-expand-button] {
2095
+ display: none;
2096
+ }
2097
+ }
2098
+ }
2099
+
2100
+ [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
2101
+ width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
2102
+ }
2103
+
2104
+ [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
2105
+ background-color: var(--diffs-bg-separator);
2106
+ height: 100%;
2107
+ margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
2108
+ border-top-right-radius: 6px;
2109
+ border-bottom-right-radius: 6px;
2110
+ display: block;
2111
+
2112
+ & [data-separator-content], & [data-expand-button] {
2113
+ display: none;
2114
+ }
2115
+ }
2116
+
2117
+ [data-separator="line-info"] [data-separator-wrapper] {
2118
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
2119
+ border-top-left-radius: 6px;
2120
+ border-bottom-left-radius: 6px;
2121
+ }
2122
+ }
2123
+
2124
+ @media (pointer: fine) {
2125
+ [data-separator="line-info"] [data-separator-wrapper] {
2126
+ &[data-separator-multi-button] {
2127
+ & [data-expand-up] {
2128
+ border-top-left-radius: 6px;
2129
+ border-bottom-left-radius: unset;
2130
+ }
2131
+
2132
+ & [data-expand-down] {
2133
+ border-bottom-left-radius: 6px;
2134
+ border-top-left-radius: unset;
2135
+ }
2136
+ }
2137
+ }
2138
+ }
2139
+ }
2140
+
2141
+ @media (pointer: coarse) {
2142
+ [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
2143
+ grid-template-columns: 34px 34px auto;
2144
+
2145
+ & [data-separator-content] {
2146
+ grid-column: unset;
2147
+ grid-row: unset;
2148
+ }
2149
+ }
2150
+
2151
+ @supports (width: 1cqi) {
2152
+ [data-separator="line-info"] [data-separator-wrapper] {
2153
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
2154
+ border-top-left-radius: 6px;
2155
+ border-bottom-left-radius: 6px;
2156
+ }
2157
+
2158
+ &[data-separator-multi-button] {
2159
+ & [data-expand-up] {
2160
+ border-top-left-radius: 6px;
2161
+ border-bottom-left-radius: 6px;
2162
+ }
2163
+
2164
+ & [data-expand-down] {
2165
+ border-bottom-left-radius: unset;
2166
+ border-top-left-radius: unset;
2167
+ }
2168
+ }
2169
+ }
2170
+ }
2171
+ }
2172
+
2173
+ @media (pointer: fine) {
2174
+ [data-separator-wrapper][data-separator-multi-button] {
2175
+ grid-template-rows: 50% 50%;
2176
+ display: grid;
2177
+
2178
+ & [data-separator-content] {
2179
+ grid-area: 1 / 2 / -1;
2180
+ min-width: min-content;
2181
+ }
2182
+
2183
+ & [data-expand-button] {
2184
+ grid-column: 1;
2185
+ }
2186
+ }
2187
+
2188
+ [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
2189
+ grid-template-columns: 34px auto;
2190
+ }
2191
+
2192
+ [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
2193
+ grid-template-columns: 100% auto;
2194
+ }
2195
+
2196
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
2197
+ & [data-separator-multi-button] {
2198
+ & [data-expand-up] {
2199
+ border-bottom: 1px solid var(--diffs-bg);
2200
+ border-right: 2px solid var(--diffs-bg);
2201
+ }
2202
+
2203
+ & [data-expand-down] {
2204
+ border-top: 1px solid var(--diffs-bg);
2205
+ border-right: 2px solid var(--diffs-bg);
2206
+ }
2207
+ }
2208
+ }
2209
+ }
2210
+
2211
+ [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
2212
+ display: none;
2213
+ }
2214
+
2215
+ [data-line-annotation] {
2216
+ min-height: var(--diffs-annotation-min-height, 0);
2217
+ z-index: 2;
2218
+ }
2219
+
2220
+ [data-merge-conflict-actions] {
2221
+ z-index: 2;
2222
+ }
2223
+
2224
+ [data-separator="custom"] {
2225
+ grid-template-columns: subgrid;
2226
+ display: grid;
2227
+ }
2228
+
2229
+ [data-line], [data-column-number], [data-no-newline] {
2230
+ padding-inline: 1ch;
2231
+ position: relative;
2232
+ }
2233
+
2234
+ [data-indicators="classic"] [data-line] {
2235
+ padding-inline-start: 2ch;
2236
+ }
2237
+
2238
+ [data-indicators="classic"] {
2239
+ & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
2240
+ &[data-no-newline], &[data-line] {
2241
+ &:before {
2242
+ user-select: none;
2243
+ width: 1ch;
2244
+ height: 1lh;
2245
+ display: inline-block;
2246
+ position: absolute;
2247
+ top: 0;
2248
+ left: 0;
2249
+ }
2250
+ }
2251
+ }
2252
+
2253
+ & [data-line-type="change-addition"] {
2254
+ &[data-line], &[data-no-newline] {
2255
+ &:before {
2256
+ content: "+";
2257
+ color: var(--diffs-addition-base);
2258
+ }
2259
+ }
2260
+ }
2261
+
2262
+ & [data-line-type="change-deletion"] {
2263
+ &[data-line], &[data-no-newline] {
2264
+ &:before {
2265
+ content: "-";
2266
+ color: var(--diffs-deletion-base);
2267
+ }
2268
+ }
2269
+ }
2270
+ }
2271
+
2272
+ [data-indicators="bars"] {
2273
+ & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
2274
+ &[data-column-number] {
2275
+ &:before {
2276
+ content: "";
2277
+ user-select: none;
2278
+ contain: strict;
2279
+ width: 4px;
2280
+ height: 100%;
2281
+ display: block;
2282
+ position: absolute;
2283
+ top: 0;
2284
+ left: 0;
2285
+ }
2286
+ }
2287
+ }
2288
+
2289
+ & [data-line-type="change-deletion"] {
2290
+ &[data-column-number] {
2291
+ &:before {
2292
+ background-image: linear-gradient(0deg,
2293
+ var(--diffs-bg-deletion) 50%,
2294
+ var(--diffs-deletion-base) 50%);
2295
+ background-repeat: repeat;
2296
+ background-size: 2px 2px;
2297
+ background-size: calc(1lh / round(1lh / 2px))
2298
+ calc(1lh / round(1lh / 2px));
2299
+ }
2300
+ }
2301
+ }
2302
+
2303
+ & [data-line-type="change-addition"] {
2304
+ &[data-column-number] {
2305
+ &:before {
2306
+ background-color: var(--diffs-addition-base);
2307
+ }
2308
+ }
2309
+ }
2310
+ }
2311
+
2312
+ [data-overflow="wrap"] {
2313
+ & [data-line], & [data-annotation-content] {
2314
+ white-space: pre-wrap;
2315
+ word-break: break-word;
2316
+ }
2317
+ }
2318
+
2319
+ [data-overflow="scroll"] [data-line] {
2320
+ white-space: pre;
2321
+ min-height: 1lh;
2322
+ }
2323
+
2324
+ [data-column-number] {
2325
+ box-sizing: content-box;
2326
+ text-align: right;
2327
+ user-select: none;
2328
+ color: var(--diffs-fg-number);
2329
+ padding-left: 2ch;
2330
+ }
2331
+
2332
+ [data-line-number-content] {
2333
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
2334
+ z-index: 1;
2335
+ display: inline-block;
2336
+ position: relative;
2337
+ }
2338
+
2339
+ [data-disable-line-numbers] {
2340
+ & [data-gutter-buffer], & [data-column-number] {
2341
+ min-width: 4px;
2342
+ padding: 0;
2343
+
2344
+ &:before {
2345
+ min-width: 0;
2346
+ }
2347
+ }
2348
+
2349
+ & [data-line-number-content] {
2350
+ display: none;
2351
+ }
2352
+
2353
+ & [data-gutter-utility-slot] {
2354
+ right: unset;
2355
+ justify-content: flex-start;
2356
+ left: 0;
2357
+ }
2358
+
2359
+ &[data-indicators="bars"] [data-gutter-utility-slot] {
2360
+ left: 6px;
2361
+ }
2362
+ }
2363
+
2364
+ [data-file][data-disable-line-numbers] {
2365
+ & [data-gutter-buffer], & [data-column-number] {
2366
+ border-right: 0;
2367
+ min-width: 0;
2368
+ }
2369
+ }
2370
+
2371
+ [data-diff-span] {
2372
+ box-decoration-break: clone;
2373
+ border-radius: 3px;
2374
+ }
2375
+
2376
+ [data-line-type="change-addition"] [data-diff-span] {
2377
+ background-color: var(--diffs-bg-addition-emphasis);
2378
+ }
2379
+
2380
+ [data-line-type="change-deletion"] [data-diff-span] {
2381
+ background-color: var(--diffs-bg-deletion-emphasis);
2382
+ }
2383
+
2384
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
2385
+ color: var(--diffs-fg);
2386
+ padding-left: 1ch;
2387
+ }
2388
+
2389
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
2390
+ align-items: center;
2391
+ display: flex;
2392
+
2393
+ &:after {
2394
+ color: var(--diffs-fg-conflict-marker);
2395
+ font-size: .75rem;
2396
+ font-style: normal;
2397
+ line-height: 1.25rem;
2398
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
2399
+ padding-left: 1ch;
2400
+ }
2401
+ }
2402
+
2403
+ [data-merge-conflict="marker-start"]:after {
2404
+ content: "(Current Change)";
2405
+ }
2406
+
2407
+ [data-merge-conflict="marker-end"]:after {
2408
+ content: "(Incoming Change)";
2409
+ }
2410
+
2411
+ [data-merge-conflict-actions-content] {
2412
+ min-height: 1.75rem;
2413
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
2414
+ color: var(--diffs-fg);
2415
+ align-items: center;
2416
+ gap: .25rem;
2417
+ padding-inline: .5rem;
2418
+ font-size: .75rem;
2419
+ line-height: 1.2;
2420
+ display: flex;
2421
+ }
2422
+
2423
+ [data-merge-conflict-action] {
2424
+ appearance: none;
2425
+ color: var(--diffs-fg-number);
2426
+ font: inherit;
2427
+ cursor: pointer;
2428
+ background: none;
2429
+ border: 0;
2430
+ padding: 0;
2431
+ font-style: normal;
2432
+ }
2433
+
2434
+ [data-merge-conflict-action]:hover {
2435
+ color: var(--diffs-fg);
2436
+ }
2437
+
2438
+ [data-merge-conflict-action="current"]:hover {
2439
+ color: var(--diffs-addition-base);
2440
+ }
2441
+
2442
+ [data-merge-conflict-action="incoming"]:hover {
2443
+ color: var(--diffs-modified-base);
2444
+ }
2445
+
2446
+ [data-merge-conflict-action-separator] {
2447
+ color: var(--diffs-fg-number);
2448
+ opacity: .6;
2449
+ user-select: none;
2450
+ }
2451
+
2452
+ [data-diffs-header="default"] {
2453
+ background-color: var(--diffs-bg);
2454
+ justify-content: space-between;
2455
+ align-items: center;
2456
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
2457
+ min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
2458
+ z-index: 2;
2459
+ flex-direction: row;
2460
+ padding-inline: 16px;
2461
+ display: flex;
2462
+ position: relative;
2463
+ top: 0;
2464
+ }
2465
+
2466
+ [data-header-content] {
2467
+ align-items: center;
2468
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
2469
+ white-space: nowrap;
2470
+ flex-direction: row;
2471
+ min-width: 0;
2472
+ display: flex;
2473
+ }
2474
+
2475
+ [data-header-content] [data-prev-name], [data-header-content] [data-title] {
2476
+ text-overflow: ellipsis;
2477
+ white-space: nowrap;
2478
+ direction: rtl;
2479
+ min-width: 0;
2480
+ overflow: hidden;
2481
+ }
2482
+
2483
+ [data-prev-name] {
2484
+ opacity: .7;
2485
+ }
2486
+
2487
+ [data-rename-icon] {
2488
+ fill: currentColor;
2489
+ flex-grow: 0;
2490
+ flex-shrink: 0;
2491
+ }
2492
+
2493
+ [data-diffs-header="default"] [data-metadata] {
2494
+ white-space: nowrap;
2495
+ align-items: center;
2496
+ gap: 1ch;
2497
+ display: flex;
2498
+ }
2499
+
2500
+ [data-diffs-header="default"] [data-additions-count] {
2501
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
2502
+ color: var(--diffs-addition-base);
2503
+ }
2504
+
2505
+ [data-diffs-header="default"] [data-deletions-count] {
2506
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
2507
+ color: var(--diffs-deletion-base);
2508
+ }
2509
+
2510
+ [data-change-icon] {
2511
+ fill: currentColor;
2512
+ flex-shrink: 0;
2513
+ }
2514
+
2515
+ [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
2516
+ color: var(--diffs-modified-base);
2517
+ }
2518
+
2519
+ [data-change-icon="new"] {
2520
+ color: var(--diffs-addition-base);
2521
+ }
2522
+
2523
+ [data-change-icon="deleted"] {
2524
+ color: var(--diffs-deletion-base);
2525
+ }
2526
+
2527
+ [data-change-icon="file"] {
2528
+ opacity: .6;
2529
+ }
2530
+
2531
+ [data-annotation-content] {
2532
+ z-index: 2;
2533
+ isolation: isolate;
2534
+ align-self: flex-start;
2535
+ min-width: 0;
2536
+ display: flow-root;
2537
+ position: relative;
2538
+ }
2539
+
2540
+ [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
2541
+ width: var(--diffs-column-content-width, auto);
2542
+ left: var(--diffs-column-number-width, 0);
2543
+ position: sticky;
2544
+ }
2545
+
2546
+ [data-annotation-slot] {
2547
+ text-wrap-mode: wrap;
2548
+ word-break: normal;
2549
+ white-space-collapse: collapse;
2550
+ }
2551
+
2552
+ [data-gutter-utility-slot] {
2553
+ touch-action: none;
2554
+ justify-content: flex-end;
2555
+ display: flex;
2556
+ position: absolute;
2557
+ top: 0;
2558
+ bottom: 0;
2559
+ right: 0;
2560
+ }
2561
+
2562
+ [data-utility-button] {
2563
+ appearance: none;
2564
+ cursor: pointer;
2565
+ width: 1lh;
2566
+ height: 1lh;
2567
+ font-size: var(--diffs-font-size, 13px);
2568
+ line-height: var(--diffs-line-height, 20px);
2569
+ background-color: var(--diffs-modified-base);
2570
+ color: var(--diffs-bg);
2571
+ fill: currentColor;
2572
+ z-index: 4;
2573
+ touch-action: none;
2574
+ border: none;
2575
+ border-radius: 4px;
2576
+ justify-content: center;
2577
+ align-items: center;
2578
+ margin-right: calc(-1lh + 1ch);
2579
+ padding: 0;
2580
+ display: flex;
2581
+ position: relative;
2582
+
2583
+ &:before {
2584
+ content: "";
2585
+ display: block;
2586
+ position: absolute;
2587
+ inset: 0 0 0 -4px;
2588
+ }
2589
+ }
2590
+
2591
+ [data-decoration-bar-stack] {
2592
+ pointer-events: none;
2593
+ isolation: isolate;
2594
+ z-index: 1;
2595
+ background-color: var(--diffs-decoration-bar-color, transparent);
2596
+ box-sizing: content-box;
2597
+ border-left: 2px solid var(--diffs-bg);
2598
+ border-right: 2px solid var(--diffs-bg);
2599
+ width: 6px;
2600
+ position: absolute;
2601
+ top: 0;
2602
+ bottom: 0;
2603
+ right: -2px;
2604
+
2605
+ [data-decoration-bar-depth="1"] & {
2606
+ background-color: color-mix(in lab,
2607
+ var(--diffs-bg) 20%,
2608
+ var(--diffs-decoration-bar-color, transparent));
2609
+ }
2610
+
2611
+ [data-decoration-bar-depth="2"] & {
2612
+ background-color: color-mix(in lab,
2613
+ var(--diffs-bg) 45%,
2614
+ var(--diffs-decoration-bar-color, transparent));
2615
+ }
2616
+
2617
+ [data-decoration-bar-depth="3"] & {
2618
+ background-color: color-mix(in lab,
2619
+ var(--diffs-bg) 65%,
2620
+ var(--diffs-decoration-bar-color, transparent));
2621
+ }
2622
+
2623
+ [data-decoration-bar-start] & {
2624
+ border-top-left-radius: 5px;
2625
+ border-top-right-radius: 5px;
2626
+ }
2627
+
2628
+ [data-decoration-bar-end] & {
2629
+ z-index: 3;
2630
+ border-bottom-right-radius: 5px;
2631
+ border-bottom-left-radius: 5px;
2632
+ }
2633
+ }
2634
+
2635
+ [data-placeholder] {
2636
+ contain: strict;
2637
+ }
2638
+
2639
+ [data-error-wrapper] {
2640
+ padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
2641
+ var(--diffs-gap-inline, var(--diffs-gap-fallback));
2642
+ scrollbar-width: none;
2643
+ max-height: 400px;
2644
+ overflow: auto;
2645
+
2646
+ & [data-error-message] {
2647
+ color: var(--diffs-deletion-base);
2648
+ font-size: 18px;
2649
+ font-weight: bold;
2650
+ }
2651
+
2652
+ & [data-error-stack] {
2653
+ color: var(--diffs-fg-number);
2654
+ }
2655
+ }
2656
+ }
2657
+
2658
+ @layer theme, rendered, unsafe;
2659
+ `,Hg=`@layer base, theme, rendered, unsafe;`,Ug=RegExp(`${qg(ip)}\\s*:\\s*[^;]+;`);function Wg(e){return`${Hg}
2660
+ @layer unsafe {
2661
+ ${e}
2662
+ }`}function Gg(e,t=`system`,n){return`${Hg}
2663
+ @layer rendered {
2664
+ :host {${t===`system`?``:`
2665
+ color-scheme: ${t};`}
2666
+ ${Bg(n)}
2667
+ ${e}
2668
+ }
2669
+ }`}function Kg(e,t){let n=Bg(t);return e.replace(Ug,n)}function qg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Jg({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function Yg({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``){t?.remove();return}return t??=Xg(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function Xg(){let e=document.createElement(`style`);return e.setAttribute(tp,``),e}function Zg(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function Qg(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`);break}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(Vg)),t.adoptedStyleSheets=[e]}connectedCallback(){zg(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(Wf,t)}var $g=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},e_=new class extends $g{};function t_(e,t,n){return e_.diff(e,t,n)}function n_(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function r_(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function i_(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function a_(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function o_(e,t){return i_(e,t,``)}function s_(e,t){return a_(e,t,``)}function c_(e,t){return t.slice(0,l_(e,t))}function l_(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function u_(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function d_(e,t){if(t)return p_(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function f_(e,t){if(t)return p_(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function p_(e,t){if(!t)return[f_(e),d_(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=u_(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var m_=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,h_=RegExp(`[${m_}]+|\\s+|[^${m_}]`,`ug`);new class extends $g{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=u_(e,r)}else n=e.match(h_)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&g_(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&g_(n,i,r,null,t.intlSegmenter),e}};function g_(e,t,n,r,i){if(t&&n){let[a,o]=p_(t.value,i),[s,c]=p_(n.value,i);if(e){let r=n_(a,s);e.value=a_(e.value,s,r),t.value=o_(t.value,r),n.value=o_(n.value,r)}if(r){let e=r_(o,c);r.value=i_(r.value,c,e),t.value=s_(t.value,e),n.value=s_(n.value,e)}}else if(n){if(e){let e=f_(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=f_(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=f_(r.value,i),[a,o]=p_(t.value,i),s=n_(n,a);t.value=o_(t.value,s);let c=r_(o_(n,s),o);t.value=s_(t.value,c),r.value=i_(r.value,n,c),e.value=a_(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=f_(r.value,i),n=c_(d_(t.value,i),e);t.value=s_(t.value,n)}else if(e){let n=c_(d_(e.value,i),f_(t.value,i));t.value=o_(t.value,n)}}var __=new class extends $g{tokenize(e){let t=RegExp(`(\\r?\\n)|[${m_}]+|[^\\S\\n\\r]+|[^${m_}]`,`ug`);return e.match(t)||[]}};function v_(e,t,n){return __.diff(e,t,n)}var y_=new class extends $g{constructor(){super(...arguments),this.tokenize=x_}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
2670
+ `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
2671
+ `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
2672
+ `)&&(e=e.slice(0,-1)),t.endsWith(`
2673
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function b_(e,t,n){return y_.diff(e,t,n)}function x_(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
2674
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function S_(e){return e==`.`||e==`!`||e==`?`}new class extends $g{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(S_(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends $g{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends $g{constructor(){super(...arguments),this.tokenize=x_}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(C_(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function C_(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=C_(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=C_(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends $g{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function w_(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function T_(e){if(!w_(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];e===7?t+=`\\a`:e===8?t+=`\\b`:e===9?t+=`\\t`:e===10?t+=`\\n`:e===11?t+=`\\v`:e===12?t+=`\\f`:e===13?t+=`\\r`:e===34?t+=`\\"`:e===92?t+=`\\\\`:e>=32&&e<=126?t+=String.fromCharCode(e):t+=`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var E_={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function D_(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;b_(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(b_(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||A_(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
2675
+ `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function O_(e,t){if(t||=E_,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>O_(e,t)).join(`
2676
+ `)}let n=[];if(e.isGit){if(t=E_,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+T_(r)+` `+T_(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+T_((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+T_((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+T_((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+T_((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+T_(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+T_(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
2677
+ `)+`
2678
+ `}function k_(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;D_(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?O_(e,o.headerOptions):void 0)}}))}else{let s=D_(e,t,n,r,i,a,o);return s?O_(s,o?.headerOptions):void 0}}function A_(e){let t=e.endsWith(`
2679
+ `),n=e.split(`
2680
+ `).map(e=>e+`
2681
+ `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function j_(e,t,n,r=!1){let i=yp(k_(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:r});if(i==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);return t.lang!=null&&(i.lang=t.lang),i}var M_=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}},N_=new Map,P_={"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`,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 F_(e){if(N_.has(e))return N_.get(e)??`text`;if(P_[e]!=null)return P_[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(N_.has(t[1]))return N_.get(t[1])??`text`;if(P_[t[1]]!=null)return P_[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return N_.has(n)?N_.get(n)??`text`:P_[n]??`text`}function I_(e){let t=e.lang??F_(e.name),n=e.lang??(e.prevName==null?`text`:F_(e.prevName));return t===`text`&&n===`text`}function L_(e){let t=e[0];return t!=null&&t.length>0?t:void 0}function R_(e){return e.startingLine===0&&e.totalLines>0}var z_=new Map,B_=new Map,V_=new Map,H_=new Set;function U_(e){for(let t of Array.isArray(e)?e:[e])if(!(t===`text`||t===`ansi`)&&!H_.has(t))return!1;return!0}function W_(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(H_.has(n.name))continue;let e=z_.get(n.name);e??(e=n,z_.set(n.name,e)),H_.add(e.name),t.loadLanguageSync(e.data)}}function G_(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var K_=`modulepreload`,q_=function(e){return`/`+e},J_={},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=q_(t,n),t=s(t),t in J_)return;J_[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:K_,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Y_=[{id:`abap`,name:`ABAP`,import:(()=>Z(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>Z(()=>import(`./actionscript-3--17pq3dv.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>Z(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>Z(()=>import(`./angular-html-Dy5TOb5M.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>Z(()=>import(`./angular-ts-CQ-VvwG4.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>Z(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>Z(()=>import(`./apex-VAyPSnFM.js`),[]))},{id:`apl`,name:`APL`,import:(()=>Z(()=>import(`./apl-DLPyOpzA.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>Z(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>Z(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>Z(()=>import(`./asciidoc-DE70LPWp.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>Z(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>Z(()=>import(`./astro-Bg8eE3kY.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>Z(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>Z(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>Z(()=>import(`./bat-Bo4NYOV-.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>Z(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>Z(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>Z(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>Z(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>Z(()=>import(`./bird2-C6vDhewU.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>Z(()=>import(`./blade-kDLtazTS.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>Z(()=>import(`./bsl-BkkzgIyY.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>Z(()=>import(`./c-LLHuKvL1.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>Z(()=>import(`./c3-BFHwR3_K.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>Z(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>Z(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20])))},{id:`clarity`,name:`Clarity`,import:(()=>Z(()=>import(`./clarity-SemFz856.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>Z(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>Z(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>Z(()=>import(`./cobol-KB1NrS7u.js`),__vite__mapDeps([21,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>Z(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>Z(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>Z(()=>import(`./coffee-BIVXoYBq.js`),__vite__mapDeps([22,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>Z(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>Z(()=>import(`./coq-BrsZFFmf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>Z(()=>import(`./cpp-t-AOohLk.js`).then(e=>e.n),__vite__mapDeps([23,16,24,25,26])))},{id:`crystal`,name:`Crystal`,import:(()=>Z(()=>import(`./crystal-Siw7Sgsi.js`),__vite__mapDeps([27,2,3,1,16,26,28])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>Z(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>Z(()=>import(`./css-C4JxYney.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>Z(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>Z(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>Z(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>Z(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>Z(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>Z(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>Z(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>Z(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>Z(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>Z(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>Z(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>Z(()=>import(`./edge-DWGhPgzT.js`),__vite__mapDeps([29,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>Z(()=>import(`./elixir-CRNPk2CS.js`),__vite__mapDeps([30,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>Z(()=>import(`./elm-wtHW2ZzC.js`),__vite__mapDeps([31,25,26])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>Z(()=>import(`./emacs-lisp-B4R74twV.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>Z(()=>import(`./erb-zY-7xODc.js`),__vite__mapDeps([32,1,2,3,33,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>Z(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([39,40])))},{id:`fennel`,name:`Fennel`,import:(()=>Z(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>Z(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>Z(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>Z(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([41,42])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>Z(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>Z(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([43,40])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>Z(()=>import(`./gdresource-C0sCabJj.js`),__vite__mapDeps([44,45,46])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>Z(()=>import(`./gdscript-Cp2uCuqX.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>Z(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>Z(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>Z(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>Z(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([47,48])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>Z(()=>import(`./git-rebase-DryBRQqt.js`),__vite__mapDeps([49,28])))},{id:`gleam`,name:`Gleam`,import:(()=>Z(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>Z(()=>import(`./glimmer-js-C1lI2oOe.js`),__vite__mapDeps([50,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>Z(()=>import(`./glimmer-ts-w8P2a6UH.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>Z(()=>import(`./glsl-BOGqvuHx.js`).then(e=>e.n),__vite__mapDeps([25,26])))},{id:`gn`,name:`GN`,import:(()=>Z(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>Z(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>Z(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>Z(()=>import(`./graphql-CMxvykwD.js`).then(e=>e.n),__vite__mapDeps([35,2,11,13,36])))},{id:`groovy`,name:`Groovy`,import:(()=>Z(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>Z(()=>import(`./hack-BTJt-rSc.js`),__vite__mapDeps([52,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>Z(()=>import(`./haml-CpShFG-s.js`).then(e=>e.n),__vite__mapDeps([34,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>Z(()=>import(`./handlebars-BsUSmFng.js`),__vite__mapDeps([53,2,3,1,38])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>Z(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>Z(()=>import(`./haxe-OTjmBuCE.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>Z(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>Z(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>Z(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>Z(()=>import(`./html-efT10kNy.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>Z(()=>import(`./html-derivative-DslI7lKP.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>Z(()=>import(`./http-DGneOSH7.js`),__vite__mapDeps([54,7,8,9,28,35,2,11,13,36])))},{id:`hurl`,name:`Hurl`,import:(()=>Z(()=>import(`./hurl-D7wxeizR.js`),__vite__mapDeps([55,7,8,56,35,2,11,13,36])))},{id:`hxml`,name:`HXML`,import:(()=>Z(()=>import(`./hxml-B0Qn7Nwc.js`),__vite__mapDeps([57,58])))},{id:`hy`,name:`Hy`,import:(()=>Z(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>Z(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>Z(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>Z(()=>import(`./java-DRV6EAgN.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>Z(()=>import(`./javascript-VqTwarqZ.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>Z(()=>import(`./jinja-B0K-1eZW.js`),__vite__mapDeps([59,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>Z(()=>import(`./jison-C6X_CrUT.js`),__vite__mapDeps([60,2])))},{id:`json`,name:`JSON`,import:(()=>Z(()=>import(`./json-BMTvgpRj.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>Z(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>Z(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>Z(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>Z(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>Z(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>Z(()=>import(`./jsx-BdBaYpud.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>Z(()=>import(`./julia-eSoxcKep.js`),__vite__mapDeps([61,2,16,20,23,24,25,26,62])))},{id:`just`,name:`Just`,import:(()=>Z(()=>import(`./just-BMl4E389.js`),__vite__mapDeps([63,2,11,20,28,33,3,1,7,8,16,26,23,24,25,34,35,13,36,37,38,64])))},{id:`kdl`,name:`KDL`,import:(()=>Z(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>Z(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>Z(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>Z(()=>import(`./latex-vrLDptzo.js`),__vite__mapDeps([65,66,62])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>Z(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>Z(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>Z(()=>import(`./liquid-DhiVbfmF.js`),__vite__mapDeps([67,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>Z(()=>import(`./llvm-Cm23YOpf.js`),[]))},{id:`log`,name:`Log file`,import:(()=>Z(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>Z(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>Z(()=>import(`./lua-BZarQnS9.js`).then(e=>e.n),__vite__mapDeps([37,26])))},{id:`luau`,name:`Luau`,import:(()=>Z(()=>import(`./luau-FMPmPwt6.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>Z(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>Z(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>Z(()=>import(`./marko-BWPwdtQS.js`),__vite__mapDeps([68,3,5,11,69])))},{id:`matlab`,name:`MATLAB`,import:(()=>Z(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>Z(()=>import(`./mdc-Cx_ikHJA.js`),__vite__mapDeps([70,15,1,2,3,38,40])))},{id:`mdx`,name:`MDX`,import:(()=>Z(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>Z(()=>import(`./mermaid-Bk4SNUv9.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>Z(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>Z(()=>import(`./mojo-BgCJLMeH.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>Z(()=>import(`./moonbit-CaWjb8XO.js`),[]))},{id:`move`,name:`Move`,import:(()=>Z(()=>import(`./move-B1IS1UjX.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>Z(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>Z(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([71,72])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>Z(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>Z(()=>import(`./nginx-iNlDtGB5.js`),__vite__mapDeps([73,37,26])))},{id:`nim`,name:`Nim`,import:(()=>Z(()=>import(`./nim-DGF5L7xM.js`),__vite__mapDeps([74,2,3,1,7,8,26,25,40])))},{id:`nix`,name:`Nix`,import:(()=>Z(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>Z(()=>import(`./nushell-DcLAeLz5.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>Z(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>Z(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>Z(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>Z(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>Z(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>Z(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>Z(()=>import(`./perl-CFfHYoph.js`),__vite__mapDeps([64,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>Z(()=>import(`./php-CtPBh1K5.js`),__vite__mapDeps([75,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>Z(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>Z(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>Z(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>Z(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>Z(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>Z(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>Z(()=>import(`./powershell-DshXNtvi.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>Z(()=>import(`./prisma-BsRQq5mF.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>Z(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>Z(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>Z(()=>import(`./pug-CxRWcKXx.js`),__vite__mapDeps([76,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>Z(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>Z(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>Z(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>Z(()=>import(`./qml-CQ8J3wuq.js`),__vite__mapDeps([77,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>Z(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>Z(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>Z(()=>import(`./r-CItjESd8.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>Z(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>Z(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>Z(()=>import(`./razor-BPkkINsq.js`),__vite__mapDeps([78,1,2,3,79])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>Z(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>Z(()=>import(`./regexp-DX3MNthO.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>Z(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>Z(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>Z(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>Z(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>Z(()=>import(`./rst-ClRAjKbC.js`),__vite__mapDeps([80,2,15,1,3,20,81,23,16,24,25,26,28,38,33,7,8,34,35,11,13,36,37])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>Z(()=>import(`./ruby-CgYgA9Jj.js`),__vite__mapDeps([33,2,3,1,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>Z(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>Z(()=>import(`./sas-CPmYLbzU.js`),__vite__mapDeps([82,16])))},{id:`sass`,name:`Sass`,import:(()=>Z(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>Z(()=>import(`./scala-DKOlJaKm.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>Z(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>Z(()=>import(`./scss-Cm-sHo09.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>Z(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>Z(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([83,84])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>Z(()=>import(`./shellscript-DmaaF0b7.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>Z(()=>import(`./shellsession-CQx7VqyU.js`),__vite__mapDeps([85,28])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>Z(()=>import(`./smalltalk-B16xEiuN.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>Z(()=>import(`./solidity-CKzVLygQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>Z(()=>import(`./soy-B_yUNzV2.js`),__vite__mapDeps([86,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>Z(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([87,88])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>Z(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>Z(()=>import(`./sql-BJHohXqk.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>Z(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>Z(()=>import(`./stata-UAFrzABU.js`),__vite__mapDeps([89,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>Z(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>Z(()=>import(`./surrealql-CWvgOHzZ.js`),__vite__mapDeps([90,2])))},{id:`svelte`,name:`Svelte`,import:(()=>Z(()=>import(`./svelte-BddkVZXj.js`),__vite__mapDeps([91,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>Z(()=>import(`./swift-DonLKvLd.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>Z(()=>import(`./system-verilog-DJ5XKQeo.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>Z(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>Z(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>Z(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>Z(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>Z(()=>import(`./templ-C84Bu3va.js`),__vite__mapDeps([92,2,3,93])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>Z(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>Z(()=>import(`./tex-RrP2i1xH.js`),__vite__mapDeps([66,62])))},{id:`toml`,name:`TOML`,import:(()=>Z(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>Z(()=>import(`./ts-tags-BRr3h9RL.js`),__vite__mapDeps([94,2,3,1,7,8,11,16,25,26])))},{id:`tsv`,name:`TSV`,import:(()=>Z(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>Z(()=>import(`./tsx-CzdrIvPO.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>Z(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>Z(()=>import(`./twig-CibPnSwR.js`),__vite__mapDeps([95,2,3,5,20,33,1,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38,75,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>Z(()=>import(`./typescript-CWzslnac.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>Z(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>Z(()=>import(`./typst-DI99ib-x.js`),[]))},{id:`v`,name:`V`,import:(()=>Z(()=>import(`./v-DETTlOr0.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>Z(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>Z(()=>import(`./vb-Djn5o6TS.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>Z(()=>import(`./verilog-CiiDBU1e.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>Z(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>Z(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>Z(()=>import(`./vue-C-b1or0S.js`),__vite__mapDeps([96,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>Z(()=>import(`./vue-html-B7qsQ7no.js`),__vite__mapDeps([97,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>Z(()=>import(`./vue-vine-dqyrjuMF.js`),__vite__mapDeps([98,2,3,5,12,69,99])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>Z(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>Z(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>Z(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>Z(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>Z(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>Z(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>Z(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>Z(()=>import(`./xml-CG7JAl4q.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>Z(()=>import(`./xsl-DE3Ct1nt.js`),__vite__mapDeps([100,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>Z(()=>import(`./yaml-76tnpMFk.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>Z(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>Z(()=>import(`./zig-CMLA9XwU.js`),[]))}],X_=Object.fromEntries(Y_.map(e=>[e.id,e.import])),Z_=Object.fromEntries(Y_.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Q_={...X_,...Z_},$_=Object.defineProperty,ev=Object.getOwnPropertyDescriptor,tv=Object.getOwnPropertyNames,nv=Object.prototype.hasOwnProperty,rv=(e,t)=>{let n={};for(var r in e)$_(n,r,{get:e[r],enumerable:!0});return t||$_(n,Symbol.toStringTag,{value:`Module`}),n},iv=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=tv(t),a=0,o=i.length,s;a<o;a++)s=i[a],!nv.call(e,s)&&s!==n&&$_(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ev(t,s))||r.enumerable});return e},av=(e,t,n)=>(iv(e,t,`default`),n&&iv(n,t,`default`)),ov=t({createOnigurumaEngine:()=>Pv,getDefaultWasmLoader:()=>Nv,loadWasm:()=>Dv,setDefaultWasmLoader:()=>Mv}),sv=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function cv(){return 2147483648}function lv(){return typeof performance<`u`?performance.now():Date.now()}var uv=(e,t)=>e+(t-e%t)%t;async function dv(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=cv();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,uv(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:lv,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 fv=Object.defineProperty,pv=(e,t,n)=>t in e?fv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mv=(e,t,n)=>pv(e,typeof t==`symbol`?t:t+``,n),hv=null;function gv(e){throw new sv(e.UTF8ToString(e.getLastOnigError()))}var _v=class e{constructor(t){mv(this,`utf16Length`),mv(this,`utf8Length`),mv(this,`utf16Value`),mv(this,`utf8Value`),mv(this,`utf16OffsetToUtf8`),mv(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)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},vv=class e{constructor(t){if(mv(this,`id`,++e.LAST_ID),mv(this,`_onigBinding`),mv(this,`content`),mv(this,`utf16Length`),mv(this,`utf8Length`),mv(this,`utf16OffsetToUtf8`),mv(this,`utf8OffsetToUtf16`),mv(this,`ptr`),!hv)throw new sv(`Must invoke loadWasm first.`);this._onigBinding=hv,this.content=t;let n=new _v(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=hv.omalloc(1e4),e._sharedPtrInUse=!0,hv.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(hv)}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)}};mv(vv,`LAST_ID`,0),mv(vv,`_sharedPtr`,0),mv(vv,`_sharedPtrInUse`,!1);var yv=vv,bv=class{constructor(e){if(mv(this,`_onigBinding`),mv(this,`_ptr`),!hv)throw new sv(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new _v(e[r]);t[r]=i.createString(hv),n[r]=i.utf8Length}let r=hv.omalloc(4*e.length);hv.HEAPU32.set(t,r/4);let i=hv.omalloc(4*e.length);hv.HEAPU32.set(n,i/4);let a=hv.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)hv.ofree(t[n]);hv.ofree(i),hv.ofree(r),a===0&&gv(hv),this._onigBinding=hv,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 yv(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 xv(e){return typeof e.instantiator==`function`}function Sv(e){return typeof e.default==`function`}function Cv(e){return e.data!==void 0}function wv(e){return typeof Response<`u`&&e instanceof Response}function Tv(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 Ev;function Dv(e){if(Ev)return Ev;async function t(){hv=await dv(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),xv(n)?n=await n.instantiator(t):Sv(n)?n=await n.default(t):(Cv(n)&&(n=n.data),wv(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await kv(n)(t):await Av(n)(t):Tv(n)||n instanceof WebAssembly.Module?n=await Ov(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Ov(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Ev=t(),Ev}function Ov(e){return t=>WebAssembly.instantiate(e,t)}function kv(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Av(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var jv;function Mv(e){jv=e}function Nv(){return jv}async function Pv(e){return e&&await Dv(e),{createScanner(e){return new bv(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new yv(e)}}}var Fv=rv({});av(Fv,ov);var Iv=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>Z(()=>import(`./andromeeda-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>Z(()=>import(`./aurora-x-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>Z(()=>import(`./ayu-dark-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>Z(()=>import(`./ayu-light-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>Z(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>Z(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>Z(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>Z(()=>import(`./dark-plus-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>Z(()=>import(`./dracula-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>Z(()=>import(`./dracula-soft-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>Z(()=>import(`./everforest-dark-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>Z(()=>import(`./everforest-light-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-default-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>Z(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>Z(()=>import(`./github-light-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>Z(()=>import(`./github-light-default-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>Z(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>Z(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>Z(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>Z(()=>import(`./horizon-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>Z(()=>import(`./horizon-bright-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>Z(()=>import(`./houston-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>Z(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>Z(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>Z(()=>import(`./laserwave-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>Z(()=>import(`./light-plus-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>Z(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>Z(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>Z(()=>import(`./min-dark-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>Z(()=>import(`./min-light-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>Z(()=>import(`./monokai-CdkpiU2Y.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>Z(()=>import(`./night-owl-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>Z(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>Z(()=>import(`./nord-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>Z(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>Z(()=>import(`./one-light-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>Z(()=>import(`./plastic-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>Z(()=>import(`./poimandres-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>Z(()=>import(`./red-CJ3rzSJv.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-BthvhNj6.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>Z(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>Z(()=>import(`./rose-pine-moon-hon4tzzS.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>Z(()=>import(`./slack-dark-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>Z(()=>import(`./slack-ochin-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>Z(()=>import(`./snazzy-light-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>Z(()=>import(`./solarized-dark-DV17i1UV.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>Z(()=>import(`./solarized-light-DSh2HLQt.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>Z(()=>import(`./synthwave-84-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>Z(()=>import(`./tokyo-night-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>Z(()=>import(`./vesper-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-black-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>Z(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>Z(()=>import(`./vitesse-light-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Q=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Lv(e){return Rv(e)}function Rv(e){return Array.isArray(e)?zv(e):e instanceof RegExp?e:typeof e==`object`?Bv(e):e}function zv(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Rv(e[n]);return t}function Bv(e){let t={};for(let n in e)t[n]=Rv(e[n]);return t}function Vv(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Hv(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Hv(e.substring(0,e.length-1)):e.substr(~t+1)}var Uv=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Wv=class{static hasCaptures(e){return e===null?!1:(Uv.lastIndex=0,Uv.test(e))}static replaceCaptures(e,t,n){return e.replace(Uv,(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 Gv(e,t){return e<t?-1:+(e>t)}function Kv(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=Gv(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function qv(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 Jv(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Yv=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}},Xv=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ty(e),t)}static createFromParsedTheme(e,t){return iy(e,t)}_cachedMatchRoot=new Yv(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=>Qv(e.parent,t.parentScopes));return n?new ey(n.fontStyle,n.foreground,n.background):null}},Zv=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?!0:this.parent===null?!1: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 Qv(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&&!$v(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function $v(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var ey=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ty(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;break}}let s=null;typeof i.settings.foreground==`string`&&qv(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&qv(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 ny(l,u,e,o,s,c)}}return n}var ny=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}},ry=(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))(ry||{});function iy(e,t){e.sort((e,t)=>{let n=Gv(e.scope,t.scope);return n!==0||(n=Kv(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 ay(t),o=new ey(n,a.getId(r),a.getId(i)),s=new cy(new sy(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 Xv(a,o,s)}var ay=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)}},oy=Object.freeze([]),sy=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||oy,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?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},cy=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(),sy.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(Kv(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 sy(e,t,n,r,i))}},ly=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(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=dy(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 uy(e){return e}function dy(e){return e}function fy(e,t){let n=[],r=my(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:console.log(`Unknown priority ${i} in scope selector`)}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(py(i)){let e=[];do e.push(i),i=r.next();while(py(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 py(e){return!!e&&!!e.match(/[\w\.:]+/)}function my(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 hy(e){typeof e.dispose==`function`&&e.dispose()}var gy=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},_y=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},vy=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))}},yy=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new gy(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new vy;for(let n of e)by(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof gy){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 by(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 gy?Sy({baseGrammar:a,selfGrammar:i},r):xy(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 gy(e))}function xy(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Cy([r],t,n)}}function Sy(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Cy(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Cy(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Cy(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Vv({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Cy(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ky(i);switch(a.kind){case 0:Sy({...t,selfGrammar:t.baseGrammar},n);break;case 1:Sy(t,n);break;case 2:xy(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?xy(a.ruleName,i,n):Sy(i,n)}else a.kind===4?n.add(new _y(a.scopeName,a.ruleName)):n.add(new gy(a.scopeName));break}}}var wy=class{kind=0},Ty=class{kind=1},Ey=class{constructor(e){this.ruleName=e}kind=2},Dy=class{constructor(e){this.scopeName=e}kind=3},Oy=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ky(e){if(e===`$base`)return new wy;if(e===`$self`)return new Ty;let t=e.indexOf(`#`);return t===-1?new Dy(e):t===0?new Ey(e.substring(1)):new Oy(e.substring(0,t),e.substring(t+1))}var Ay=/\\(\d+)/,jy=/\\(\d+)/g,My=-1,Ny=-2;function Py(e){return e}function Fy(e){return e}var Iy=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Wv.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Wv.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Hv(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:Wv.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Wv.replaceCaptures(this._contentName,e,t)}},Ly=class extends Iy{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!`)}},Ry=class extends Iy{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Uy(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 Wy,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zy=class extends Iy{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 Wy,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},By=class extends Iy{_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 Uy(i,this.id),this.beginCaptures=a,this._end=new Uy(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 Wy;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}},Vy=class extends Iy{_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 Uy(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Uy(o,Ny),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 Wy;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 Wy,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},Hy=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Ly(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Ry(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Vv({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new zy(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Vy(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 By(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=ky(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);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof zy||e instanceof By||e instanceof Vy)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Uy=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.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=Ay.test(this.source):this.hasBackReferences=!1}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 jy.lastIndex=0,this.source.replace(jy,(e,t)=>Jv(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}},Wy=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 Gy(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 Gy(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Gy=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(`
2682
+ `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ky=class{constructor(e,t){this.languageId=e,this.tokenType=t}},qy=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Ky(e,8),this._embeddedLanguagesMatcher=new Jy(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 Ky(0,0);_getBasicScopeAttributes=new Yv(e=>new Ky(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/},Jy=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])=>Jv(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 Yy=!1,Xy=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Zy(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Qy(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 Xy(i,!0);f()}return new Xy(i,!1);function f(){let o=$y(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===My){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),ab(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 By){let r=o;ab(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 Vy){let r=o;ab(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(ab(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 Qy(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 Vy&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=rb(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Ny){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),ab(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 $y(e,t,n,r,i,a){let o=eb(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=tb(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 eb(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=nb(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 tb(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}=nb(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 nb(e,t,n,r,i){return Yy?{ruleScanner:e.compile(t,n),findOptions:ib(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function rb(e,t,n,r,i){return Yy?{ruleScanner:e.compileWhile(t,n),findOptions:ib(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function ib(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function ab(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));Zy(e,p,n&&d.start===0,d.start,f,i,!1,0),hy(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 ob(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ob=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function sb(e,t,n,r,i,a,o,s){return new db(e,t,n,r,i,a,o,s)}function cb(e,t,n,r,i){let a=fy(t,lb),o=Hy.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 lb(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(ub(t[r],e))return n=r+1,!0;return!1})}function ub(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 db=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new qy(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=fb(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=fy(e,lb);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)cb(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&&cb(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(Py(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Fy(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]=fb(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=Hy.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===mb.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=ly.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?pb.createRootAndLookUpScopeName(a,r,this):pb.createRoot(`unknown`,r),t=new mb(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
2683
+ `;let a=this.createOnigString(e),o=a.content.length,s=new gb(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Zy(this,a,i,0,t,s,!0,r);return hy(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function fb(e,t){return e=Lv(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 pb=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=Zv.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Zv(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Zv(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}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),ly.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);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}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}},mb=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?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?pb.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:Fy(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=pb.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Py(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,pb.fromExtension(r,n.contentNameScopesList))}},hb=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):fy(e,lb).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>fy(e,lb).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}},gb=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=ly.set(n,0,uy(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=ly.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}},_b=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,sb(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},vb=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new _b(Xv.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Xv.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 hb(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new yy(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)}},yb=mb.NULL;function bb(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 xb(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Sb(e){return Array.isArray(e)?e:[e]}async function Cb(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function wb(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Tb(e){return e===`ansi`||wb(e)}function Eb(e){return e===`none`}function Db(e){return Eb(e)}var Ob=/(\r?\n)/g;function kb(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Ob),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}var Ab={light:`#333333`,dark:`#bbbbbb`},jb={light:`#fffffe`,dark:`#1e1e1e`},Mb=`__shiki_resolved`;function Nb(e){if(e?.[Mb])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`?Ab.light:Ab.dark,n||=t.type===`light`?jb.light:jb.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,Mb,{enumerable:!1,writable:!1,value:!0}),t}async function Pb(e){return[...new Set((await Promise.all(e.filter(e=>!Tb(e)).map(async e=>await Cb(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Fb(e){return(await Promise.all(e.map(async e=>Db(e)?null:Nb(await Cb(e))))).filter(e=>!!e)}function Ib(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 Q(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Lb=class extends vb{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;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)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Nb(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=Xv.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Ib(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=[...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 Q(`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))}},Rb=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}},zb=0;function Bb(e){zb+=1,e.warnings!==!1&&zb>=10&&zb%10==0&&console.warn(`[Shiki] ${zb} 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 Q("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Nb),i=new Lb(new Rb(e.engine,n),r,n,e.langAlias),a;function o(t){return Ib(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Q(`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 Q(`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 Pb(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Fb(e))}function g(){if(t)throw new Q(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--zb)}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 Vb(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Fb(e.themes||[]),Pb(e.langs||[]),e.engine]);return Bb({...e,themes:t,langs:n,engine:r})}var Hb=new WeakMap;function Ub(e,t){Hb.set(e,t)}function Wb(e){return Hb.get(e)}var Gb=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(Sb(n).map(e=>[e,yb])),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 Kb(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Kb(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 qb(e,t){if(!(e instanceof Gb))throw new Q(`Invalid grammar state`);return e.getInternalStack(t)}var Jb=/,/,Yb=/ /;function Xb(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(wb(e.resolveLangAlias(n.lang||`text`))||Eb(r))return kb(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Q(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Q(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Qb(t,o,i,a,n)}function Zb(...e){if(e.length===2)return Wb(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(wb(i)||Eb(a))throw new Q(`Plain language does not have grammar state`);if(i===`ansi`)throw new Q(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Gb($b(n,c,o,s,r).stateStack,c.name,o.name)}function Qb(e,t,n,r,i){let a=$b(e,t,n,r,i),o=new Gb(a.stateStack,t.name,n.name);return Ub(a.tokens,o),a.tokens}function $b(e,t,n,r,i){let a=bb(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=kb(e),l=i.grammarState?qb(i.grammarState,n.name)??yb:i.grammarContextCode==null?yb:$b(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=xb(r[ly.getForeground(s)],a),l=ly.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(Jb).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Yb))})}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`?ex(t.scopes):tx(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function ex(e){return e.map(e=>({scopeName:e}))}function tx(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:ix(e,i,t.slice(0,r))}}return n}function nx(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function rx(e,t,n){if(!nx(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)nx(e[r],n[i])&&--r,--i;return r===-1}function ix(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(rx(e,t,n)){r.push(a);break}return r}function ax(e,t,n,r=Xb){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Wb(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=ox(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Gb(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Ub(s,c),s}function ox(...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}var sx=/\s+/g;function cx(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(sx)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(sx);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var lx=/:?lang=["']([^"']+)["']/g,ux=/(?:```|~~~)([\w-]+)/g,dx=/\\begin\{([\w-]+)\}/g,fx=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function px(e){let t=kb(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-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 mx(e,t,n){let r=new Set;for(let t of e.matchAll(lx)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(ux)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(dx)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(fx)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var hx=[`color`,`background-color`];function gx(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 _x(e,t){let n=[...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?gx(e,t):e})):e}function vx(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>yx(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&&hx.includes(a))if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new Q('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,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 yx(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&ry.Italic&&(t[`font-style`]=`italic`),e.fontStyle&ry.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&ry.Underline&&n.push(`underline`),e.fontStyle&ry.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function bx(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function xx(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=px(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Q(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}else{let t=n.lines[e.line];if(t===void 0)throw new Q(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new Q(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Sx(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return _x(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=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new Q(`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+=Cx(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Q(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Q(`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&&cx(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 Sx(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Q(`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 Q(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function Cx(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(Cx).join(``):``}var wx=[xx()];function Tx(e){let t=Ex(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...wx]}function Ex(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 Dx=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Ox={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function kx(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 Ax(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}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function jx(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)Ox[r]&&t.push({type:`setDecoration`,value:Ox[r]});else if(r<=29){let e=Ox[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:Dx[r-30]}});else if(r===38){let n=Ax(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:Dx[r-40]}});else if(r===48){let n=Ax(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:Dx[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Dx[r-100+8]}})}return t}function Mx(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=kx(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=jx(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 Nx={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 Px(e=Nx){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<Dx.length;e++)r.push(t(Dx[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 Fx=/#([0-9a-f]{3,8})/i,Ix=/var\((--[\w-]+-ansi-[\w-]+)\)/,Lx={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 Rx(e,t,n){let r=bb(e,n),i=kb(t),a=Px(Object.fromEntries(Dx.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Lx[t]]}))),o=Mx();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=xb(i,r),o=xb(o,r),n.decorations.has(`dim`)&&(i=zx(i));let s=ry.None;return n.decorations.has(`bold`)&&(s|=ry.Bold),n.decorations.has(`italic`)&&(s|=ry.Italic),n.decorations.has(`underline`)&&(s|=ry.Underline),n.decorations.has(`strikethrough`)&&(s|=ry.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function zx(e){let t=e.match(Fx);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}`}else if(e.length===6)return`#${e}80`;else 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`)}`}else 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(Ix);return n?`var(${n[1]}-dim)`:e}function Bx(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!wb(r)&&!Eb(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return Rx(r,t,n)}return Xb(e,t,n)}function Vx(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 Q("`themes` option must not be empty");let p=ax(e,t,n,Bx);if(c=Wb(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new Q(`\`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=>vx(e,h,u,l,d))),c&&Ub(a,c);let g=f.map(e=>bb(e.theme,n));i=Hx(f,m,g,u,l,`fg`,d),r=Hx(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=bb(n.theme,n);a=Bx(e,t,n);let l=e.getTheme(n.theme);r=xb(l.bg,s),i=xb(l.fg,s),o=l.name,c=Wb(a)}else throw new Q("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Hx(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=xb(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&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 Q('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${xb(t[r][a],n[r])||`inherit`}, ${xb(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var Ux=/^\s+$/,Wx=/^(\s*)(.*?)(\s*)$/;function Gx(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Gx(e,t,n),codeToTokens:(t,n)=>Vx(e,t,n)}){let i=t;for(let e of Tx(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Vx(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=qx(a):d===`never`&&(a=Jx(a)),f&&(a=Yx(a));let p={...r,get source(){return i}};for(let e of Tx(n))a=e.tokens?.call(p,a)||a;return Kx(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Kx(e,t,n,r=Wb(e)){let i=Tx(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=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:cx,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:`
2684
+ `}));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=bx(a.htmlStyle||yx(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&&Ub(m,r),m}function qx(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&ry.Underline||i.fontStyle&ry.Strikethrough));o&&Ux.test(i.content)&&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 Jx(e){return e.map(e=>e.flatMap(e=>{if(Ux.test(e.content))return e;let t=e.content.match(Wx);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 Yx(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=bx(e.htmlStyle||yx(e)),i=bx(n.htmlStyle||yx(n)),a=e.fontStyle&&(e.fontStyle&ry.Underline||e.fontStyle&ry.Strikethrough),o=n.fontStyle&&(n.fontStyle&ry.Underline||n.fontStyle&ry.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Xx=tg;function Zx(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Gx(e,t,n),codeToTokens:(t,n)=>Vx(e,t,n)},i=Xx(Gx(e,t,n,r));for(let e of Tx(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Qx(e){let t=await Vb(e);return{getLastGrammarState:(...e)=>Zb(t,...e),codeToTokensBase:(e,n)=>Bx(t,e,n),codeToTokensWithThemes:(e,n)=>ax(t,e,n),codeToTokens:(e,n)=>Vx(t,e,n),codeToHast:(e,n)=>Gx(t,e,n),codeToHtml:(e,n)=>Zx(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function $x(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,Tb(n))return[];let r=t[n];if(!r)throw new Q(`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(Db(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Q(`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 Qx({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 eS(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}else{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 tS(e,t){let n=eS(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)}}}var nS=$x({langs:Q_,themes:Iv,engine:()=>(0,Fv.createOnigurumaEngine)(Z(()=>import(`./wasm-BnjxR4X6.js`),[]))}),{codeToHtml:rS,codeToHast:iS,codeToTokens:aS,codeToTokensBase:oS,codeToTokensWithThemes:sS,getSingletonHighlighter:cS,getLastGrammarState:lS}=tS(nS,{guessEmbeddedLanguages:mx}),uS=4294967295,dS=class{patterns;options;regexps;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}})}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:uS,end:uS,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 fS(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function pS(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var mS=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),hS=String.raw;function gS(e,t){if(e==null)throw Error(t??`Value expected`);return e}var _S=hS`\[\^?`,vS=`c.? | C(?:-.?)?|${hS`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${hS`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${hS`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${hS`o\{[^\}]*\}?`}|${hS`\d{1,3}`}`,yS=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,bS=new RegExp(hS`
2685
+ \\ (?:
2686
+ ${vS}
2687
+ | [gk]<[^>]*>?
2688
+ | [gk]'[^']*'?
2689
+ | .
2690
+ )
2691
+ | \( (?:
2692
+ \? (?:
2693
+ [:=!>({]
2694
+ | <[=!]
2695
+ | <[^>]*>
2696
+ | '[^']*'
2697
+ | ~\|?
2698
+ | #(?:[^)\\]|\\.?)*
2699
+ | [^:)]*[:)]
2700
+ )?
2701
+ | \*[^\)]*\)?
2702
+ )?
2703
+ | (?:${yS.source})+
2704
+ | ${_S}
2705
+ | .
2706
+ `.replace(/\s+/g,``),`gsu`),xS=new RegExp(hS`
2707
+ \\ (?:
2708
+ ${vS}
2709
+ | .
2710
+ )
2711
+ | \[:(?:\^?\p{Alpha}+|\^):\]
2712
+ | ${_S}
2713
+ | &&
2714
+ | .
2715
+ `.replace(/\s+/g,``),`gsu`);function SS(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=QS(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(bS.lastIndex=0;s=bS.exec(e);){let t=CS(a,e,s[0],bS.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(bS.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?eC(e,u):e).flat(),flags:r}}function CS(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=wS(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:OS(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:HS(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:kS(n)}}if(a===`K`)return{token:IS(`keep`,n)};if(a===`N`||a===`R`)return{token:FS(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:FS(`any`,n)};if(a===`X`)return{token:FS(`text_segment`,n)};let e=ES(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:qS(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:KS(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:zS(`group`,n)};if(n===`(?>`)return{token:zS(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:zS(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:zS(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:zS(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:RS(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
2716
+ `,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:FS(`dot`,n)}:n===`^`||n===`$`?{token:OS(e.singleline?{"^":hS`\A`,$:hS`\Z`}[n]:n,n)}:n===`|`?{token:DS(n)}:yS.test(n)?{tokens:tC(n)}:{token:AS(fS(n),n)}}function wS(e,t,n){let r=[PS(t[1]===`^`,t)],i=1,a;for(xS.lastIndex=n;a=xS.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(PS(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(AS(93,e));else if(i--,r.push(jS(e)),!i)break}else{let t=TS(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:xS.lastIndex||e.length}}function TS(e){if(e[0]===`\\`)return ES(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!mS.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return FS(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?MS(e):e===`&&`?NS(e):AS(fS(e),e)}function ES(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return GS(e);if(`dDhHsSwW`.includes(n))return YS(e);if(e.startsWith(hS`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return XS(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return AS(fS(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return AS($S(e),e);if(WS.has(n))return AS(WS.get(n),e);if(/\d/.test(n))return LS(t,e);if(e===`\\`)throw Error(hS`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return AS(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function DS(e){return{type:`Alternator`,raw:e}}function OS(e,t){return{type:`Assertion`,kind:e,raw:t}}function kS(e){return{type:`Backreference`,raw:e}}function AS(e,t){return{type:`Character`,value:e,raw:t}}function jS(e){return{type:`CharacterClassClose`,raw:e}}function MS(e){return{type:`CharacterClassHyphen`,raw:e}}function NS(e){return{type:`CharacterClassIntersector`,raw:e}}function PS(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function FS(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function IS(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:gS(n.flags),raw:t}}function LS(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function RS(e){return{type:`GroupClose`,raw:e}}function zS(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function BS(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function VS(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function HS(e){return{type:`Subroutine`,raw:e}}var US=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),WS=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function GS(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return AS(fS(t.toUpperCase())-64,e)}function KS(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=ZS(n),o=ZS(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),IS(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,zS(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function qS(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=US.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return BS(l,r??null,i?.split(`,`)??null,e)}function JS(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return VS(t,n,r,e)}function YS(e){let t=e[1].toLowerCase();return FS({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function XS(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return FS(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function ZS(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function QS(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function $S(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function eC(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[kS(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(hS`Octal encoded byte above 177 unsupported "${n}"`)}else r=fS(t);a.push(AS(r,(e===0?`\\`:``)+t))}return a}function tC(e){let t=[],n=new RegExp(yS,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(JS(e.slice(0,-1)));continue}}}t.push(JS(e))}return t}function nC(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function rC(e){return iC.has(e.type)}var iC=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function aC(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=SS(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return hC();case`Assertion`:return oC(n);case`Backreference`:return sC(n,a);case`Character`:return yC(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return cC(n,a,t);case`CharacterClassOpen`:return lC(n,a,t);case`CharacterSet`:return uC(n,a);case`Directive`:return CC(n.kind,{flags:n.flags});case`GroupOpen`:return dC(n,a,t);case`NamedCallout`:return DC(n.kind,n.tag,n.arguments);case`Quantifier`:return fC(n,a);case`Subroutine`:return pC(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=AC(wC(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(hS`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(hS`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function oC({kind:e}){return gC(gS({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===hS`\B`||e===hS`\Y`})}function sC({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,_C(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return _C(r)}return i(+r)}function cC(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),xC(o,e);throw Error(`Invalid character class range`)}return yC(fS(`-`))}function lC({negate:e},t,n){let{tokens:r,walk:i}=t,a=[bC()],o=r[t.nextIndex],s=VC(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(bC()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=VC(r[t.nextIndex],o)}let c=bC({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function uC({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=BC(n);if(mS.has(r)&&!o?.has(r))e=`posix`,n=r;else return MC(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?OC(n,{negate:t}):SC(e,{negate:t})}function dC(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=NC(e),l=c.type===`AbsenceFunction`,u=LC(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&pS(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=HC(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(hC()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(IC(t)||t.type===`CapturingGroup`)throw Error(e)}else if(IC(t)||LC(t)&&t.negate)throw Error(e)}}f=HC(r[t.nextIndex])}return t.nextIndex++,c}function fC({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!rC(a))throw Error(`Quantifier requires a repeatable token`);let o=kC(e,t,n,a);return i.body.pop(),o}function pC({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=jC(i);return r.push(o),o}function mC(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:PC(t?.body)}}function hC(e){return{type:`Alternative`,body:FC(e?.body)}}function gC(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function _C(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function vC(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!RC(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:PC(t?.body)}}function yC(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function bC(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:FC(e?.body)}}function xC(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function SC(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function CC(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:gS(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function wC(e){return{type:`Flags`,...e}}function TC(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:PC(e?.body)}}function EC(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:PC(e?.body)}}function DC(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function OC(e,t){let n=!!t?.negate;if(!mS.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function kC(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function AC(e,t){return{type:`Regex`,body:PC(t?.body),flags:e}}function jC(e){return{type:`Subroutine`,ref:e}}function MC(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(BC(e));if(!r){if(n.normalizeUnknownPropertyNames)r=zC(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(hS`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function NC({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return mC(`repeater`);case`atomic`:return TC({atomic:!0});case`capturing`:return vC(i,{name:n});case`group`:return TC({flags:e});case`lookahead`:case`lookbehind`:return EC({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function PC(e){if(e===void 0)e=[hC()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function FC(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function IC(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function LC(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function RC(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function zC(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function BC(e){return e.replace(/[- _]+/g,``).toLowerCase()}function VC(e,t){let n=t;return gS(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function HC(e){return gS(e,`Unclosed group`)}function UC(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){WC(c).splice(Math.max(0,GC(s)+l),1),l--,u=!0},removeAllNextSiblings(){return WC(c).splice(GC(s)+1)},removeAllPrevSiblings(){let e=GC(s)+l;return l-=e,WC(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,GC(s)+l)]=e:gS(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(WC(c).splice(Math.max(0,GC(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,GC(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function WC(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function GC(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var KC=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function qC(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function JC(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var YC=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function XC(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===YC.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?YC.CHAR_CLASS:YC.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function ZC(e,t,n,r){XC(e,t,n,r)}function QC(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===YC.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function $C(e,t,n){return!!QC(e,t,0,n)}function ew(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var tw=new RegExp(String.raw`(?<noncapturingStart>${KC})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function nw(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(tw.lastIndex=Number.isNaN(c)?0:c+7;f=tw.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),qC(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=XC(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},YC.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var rw=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,iw=new RegExp(String.raw`
2717
+ \\(?: \d+
2718
+ | c[A-Za-z]
2719
+ | [gk]<[^>]+>
2720
+ | [pPu]\{[^\}]+\}
2721
+ | u[A-Fa-f\d]{4}
2722
+ | x[A-Fa-f\d]{2}
2723
+ )
2724
+ | \((?: \? (?: [:=!>]
2725
+ | <(?:[=!]|[^>]+>)
2726
+ | [A-Za-z\-]+:
2727
+ | \(DEFINE\)
2728
+ ))?
2729
+ | (?<qBase>${rw})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
2730
+ | \\?.
2731
+ `.replace(/\s+/g,``),`gsu`);function aw(e){if(!RegExp(`${rw}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(iw.lastIndex=0;o=iw.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=JC(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}iw.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var ow=String.raw,sw=ow`\(\?R=(?<rDepth>[^\)]+)\)|${ow`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,cw=ow`\(\?<(?![=!])(?<captureName>[^>]+)>`,lw=ow`${cw}|(?<unnamed>\()(?!\?)`,uw=new RegExp(ow`${cw}|${sw}|\(\?|\\?.`,`gsu`),dw=`Cannot use multiple overlapping recursions`;function fw(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(sw,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&$C(e,ow`\(\?\(DEFINE\)`,YC.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=$C(e,ow`\\[1-9]`,YC.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(uw.lastIndex=0;f=uw.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(pw(m),l)throw Error(dw);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(uw.lastIndex);if($C(s,sw,YC.DEFAULT))throw Error(dw);let c=m-1;e=mw(t,s,c,!1,n,a,d),i=_w(i,t,c,a.length,0,d);break}else if(h){pw(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(dw);break}if(!u)throw Error(ow`Recursive \g cannot be used outside the referenced group "${r===`external`?h:ow`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=ew(e,p);if(o&&$C(m,ow`${cw}|\((?!\?)`,YC.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=mw(_,v,b,!0,n,a,d);i=_w(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,uw.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),uw.lastIndex),s.set(p,uw.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),uw.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function pw(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function mw(e,t,n,r,i,a,o){let s=new Set;r&&ZC(e+t,cw,({groups:{captureName:e}})=>{s.add(e)},YC.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${hw(`(?:${e}`,`forward`,...c)}(?:)${hw(`${t})`,`backward`,...c)}${t}`}function hw(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=XC(e,ow`${lw}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),gw(i,n),s?e:`(?<${t}${l}>`}return ow`\k<${c}${l}>`},YC.DEFAULT)}return c}function gw(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function _w(e,t,n,r,i,a){if(e.size&&r){let o=0;ZC(t,lw,()=>o++,YC.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var vw=String.fromCodePoint,$=String.raw,yw={},bw=globalThis.RegExp;yw.flagGroups=(()=>{try{new bw(`(?i:)`)}catch{return!1}return!0})(),yw.unicodeSets=(()=>{try{new bw(`[[]]`,`v`)}catch{return!1}return!0})(),yw.bugFlagVLiteralHyphenIsRange=yw.unicodeSets?(()=>{try{new bw($`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,yw.bugNestedClassIgnoresNegation=yw.unicodeSets&&new bw(`[[^a]]`,`v`).test(`a`);function xw(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Sw(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Cw(e,t){return Tw[e]>=Tw[t]}function ww(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Tw={ES2025:2025,ES2024:2024,ES2018:2018},Ew={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function Dw(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!Ew[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=yw.flagGroups?`ES2025`:yw.unicodeSets?`ES2024`:`ES2018`),t}var Ow=`[ -\r ]`,kw=new Set([vw(304),vw(305)]),Aw=$`[\p{L}\p{M}\p{N}\p{Pc}]`;function jw(e){if(kw.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Fw.get(n),a=Nw.get(n),o=Pw.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var Mw=new Map(`C Other
2732
+ Cc Control cntrl
2733
+ Cf Format
2734
+ Cn Unassigned
2735
+ Co Private_Use
2736
+ Cs Surrogate
2737
+ L Letter
2738
+ LC Cased_Letter
2739
+ Ll Lowercase_Letter
2740
+ Lm Modifier_Letter
2741
+ Lo Other_Letter
2742
+ Lt Titlecase_Letter
2743
+ Lu Uppercase_Letter
2744
+ M Mark Combining_Mark
2745
+ Mc Spacing_Mark
2746
+ Me Enclosing_Mark
2747
+ Mn Nonspacing_Mark
2748
+ N Number
2749
+ Nd Decimal_Number digit
2750
+ Nl Letter_Number
2751
+ No Other_Number
2752
+ P Punctuation punct
2753
+ Pc Connector_Punctuation
2754
+ Pd Dash_Punctuation
2755
+ Pe Close_Punctuation
2756
+ Pf Final_Punctuation
2757
+ Pi Initial_Punctuation
2758
+ Po Other_Punctuation
2759
+ Ps Open_Punctuation
2760
+ S Symbol
2761
+ Sc Currency_Symbol
2762
+ Sk Modifier_Symbol
2763
+ Sm Math_Symbol
2764
+ So Other_Symbol
2765
+ Z Separator
2766
+ Zl Line_Separator
2767
+ Zp Paragraph_Separator
2768
+ Zs Space_Separator
2769
+ ASCII
2770
+ ASCII_Hex_Digit AHex
2771
+ Alphabetic Alpha
2772
+ Any
2773
+ Assigned
2774
+ Bidi_Control Bidi_C
2775
+ Bidi_Mirrored Bidi_M
2776
+ Case_Ignorable CI
2777
+ Cased
2778
+ Changes_When_Casefolded CWCF
2779
+ Changes_When_Casemapped CWCM
2780
+ Changes_When_Lowercased CWL
2781
+ Changes_When_NFKC_Casefolded CWKCF
2782
+ Changes_When_Titlecased CWT
2783
+ Changes_When_Uppercased CWU
2784
+ Dash
2785
+ Default_Ignorable_Code_Point DI
2786
+ Deprecated Dep
2787
+ Diacritic Dia
2788
+ Emoji
2789
+ Emoji_Component EComp
2790
+ Emoji_Modifier EMod
2791
+ Emoji_Modifier_Base EBase
2792
+ Emoji_Presentation EPres
2793
+ Extended_Pictographic ExtPict
2794
+ Extender Ext
2795
+ Grapheme_Base Gr_Base
2796
+ Grapheme_Extend Gr_Ext
2797
+ Hex_Digit Hex
2798
+ IDS_Binary_Operator IDSB
2799
+ IDS_Trinary_Operator IDST
2800
+ ID_Continue IDC
2801
+ ID_Start IDS
2802
+ Ideographic Ideo
2803
+ Join_Control Join_C
2804
+ Logical_Order_Exception LOE
2805
+ Lowercase Lower
2806
+ Math
2807
+ Noncharacter_Code_Point NChar
2808
+ Pattern_Syntax Pat_Syn
2809
+ Pattern_White_Space Pat_WS
2810
+ Quotation_Mark QMark
2811
+ Radical
2812
+ Regional_Indicator RI
2813
+ Sentence_Terminal STerm
2814
+ Soft_Dotted SD
2815
+ Terminal_Punctuation Term
2816
+ Unified_Ideograph UIdeo
2817
+ Uppercase Upper
2818
+ Variation_Selector VS
2819
+ White_Space space
2820
+ XID_Continue XIDC
2821
+ XID_Start XIDS`.split(/\s/).map(e=>[BC(e),e])),Nw=new Map([[`s`,vw(383)],[vw(383),`s`]]),Pw=new Map([[vw(223),vw(7838)],[vw(107),vw(8490)],[vw(229),vw(8491)],[vw(969),vw(8486)]]),Fw=new Map([Rw(453),Rw(456),Rw(459),Rw(498),...zw(8072,8079),...zw(8088,8095),...zw(8104,8111),Rw(8124),Rw(8140),Rw(8188)]),Iw=new Map([[`alnum`,$`[\p{Alpha}\p{Nd}]`],[`alpha`,$`\p{Alpha}`],[`ascii`,$`\p{ASCII}`],[`blank`,$`[\p{Zs}\t]`],[`cntrl`,$`\p{Cc}`],[`digit`,$`\p{Nd}`],[`graph`,$`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,$`\p{Lower}`],[`print`,$`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,$`[\p{P}\p{S}]`],[`space`,$`\p{space}`],[`upper`,$`\p{Upper}`],[`word`,$`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,$`\p{AHex}`]]);function Lw(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Rw(e){let t=vw(e);return[t.toLowerCase(),t]}function zw(e,t){return Lw(e,t).map(e=>Rw(e))}var Bw=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function Vw(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};Gw(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Cw(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};UC(e,Hw,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return UC(e,Uw,a),UC(e,Ww,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var Hw={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=TC();e.body[0].body.push(EC({negate:!0,body:r}),MC(`Any`));let i=TC();i.body[0].body.push(kC(`greedy`,0,1/0,e)),n(uT(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];Sw(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=Qw(t.get(e));if(n){let t=TC({flags:n});t.body[0].body=e.body,e.body=[uT(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(uT(EC({body:[hC({body:[gC(`string_end`)]}),hC({body:[yC(10)]})]}),t));else if(c===`line_start`)o(uT(sT($`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&iT(e))o(uT(EC({negate:!0}),t));else if(d)throw Error($`Uses "\G" in a way that requires a subclass`);else o(lT(gC(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(uT(sT($`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${Aw})(?!${Aw})|(?<!${Aw})(?=${Aw}))`,n=`(?:(?<=${Aw})(?=${Aw})|(?<!${Aw})(?!${Aw}))`;o(uT(sT(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!oT(n)&&(n=Zw(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!oT(r)&&(r=Zw(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(uT(bC({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(lT(SC(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(uT(cT(sT(Ow),l),t));return}if(s&&(c===`word`||u===`word`)){n(lT(SC(`word`,{negate:l}),t));return}if(c===`any`)n(lT(MC(`Any`),t));else if(c===`digit`)n(lT(MC(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error($`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=$`\p{RI}{2}|${e}(?:\u200D${e})*`;n(uT(sT($`(?>\r\n|${i?$`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(lT(MC(`AHex`,{negate:l}),t));else if(c===`newline`)n(uT(sT(l?`[^
2822
+ ]`:`(?>\r
2823
+ ?|[
2824
+ \v\f…\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${vw(e.codePointAt(0)-1)}${vw(e.codePointAt(2)+1)}-\u{10FFFF}`),n(uT(sT(`[${e}]`),t))}else n(uT(cT(sT(Iw.get(u)),l),t));else if(c===`property`)Mw.has(BC(u))||(e.key=`sc`);else if(c===`space`)n(lT(MC(`space`,{negate:l}),t));else if(c===`word`)n(uT(cT(sT(Aw),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=TC({flags:c});e.body[0].body=o(),i(uT(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&nC(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error($`Uses "\K" in a way that's unsupported`);let o=EC({behind:!0});o.body[0].body=a(),i(uT(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(uT(EC({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=TC();t.body[0].body.push(e.body),e.body=uT(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=tT(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error($`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!oT(n)&&(n=Zw(n,t),e.ref=n)}},Uw={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=lT(Yw(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&Sw(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=Sw(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=xw(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?Yw(0):Jw(o,r.groupOriginByCopy,null),l=c;if(!s){let e=Qw(Xw(o,e=>e.type===`Group`&&!!e.flags)),t=e?xw(r.globalFlags,e):r.globalFlags;Kw(t,r.currentFlags)||(l=TC({flags:$w(t)}),l.body[0].body.push(c))}n(uT(l,t),{traverse:!s})}},Ww={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>qw(t,e));i.length?i.length>1?n(uT(TC({atomic:!0,body:i.reverse().map(e=>hC({body:[_C(e.number)]}))}),t)):e.ref=i[0].number:n(uT(EC({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=vC();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Gw(e){UC(e,{"*"({node:e,parent:t}){e.parent=t}})}function Kw(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function qw(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=eT(n.parent);for(let r of t){if(r===n)break;if(r===e||nT(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function Jw(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=Jw(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function Yw(e){let t=jC(e);return t.isRecursive=!0,t}function Xw(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Zw(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function Qw(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function $w({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function eT(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function tT(e){let t=e.find(e=>e.kind===`search_start`||aT(e,{negate:!1})||!rT(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=tT(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function nT(e,t){let n=eT(e)??[];for(let e of n)if(e===t||nT(e,t))return!0;return!1}function rT({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function iT(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function aT(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&nC(e.body[0],{type:`Assertion`,kind:`search_start`})}function oT(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function sT(e,t){let n=aC(e,{...t,unicodePropertyMap:Mw}).body;return n.length>1||n[0].body.length>1?TC({body:n}):n[0].body[0]}function cT(e,t){return e.negate=t,e}function lT(e,t){return e.parent=t,e}function uT(e,t){return Gw(e),e.parent=t,e}function dT(e,t){let n=Dw(t),r=Cw(n.target,`ES2024`),i=Cw(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];UC(e,fT,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,ww(pT[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&Sw(f._captureTransfers,e.transferTo,[]).push(t)}),f}var fT={"*":{enter({node:e},t){if(TT(e)){let n=t.getCurrentModI();t.pushModI(e.flags?xw({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){TT(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){yT(vw(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),bT(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&Bw.has(e.value)&&t.setHasCasedChar()}},pT={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?$`\B`:$`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=vw(e),r=xT(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&yT(n)){let e=jw(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);yw.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(DT)&&(o=[yC(45),...o.filter(e=>!DT(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||yw.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=TC(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=hC({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(yw.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=xT(n,i),o=xT(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ST(bT(e)).forEach(e=>{s.add(Array.isArray(e)?`${xT(e[0],i)}-${xT(e[1],i)}`:xT(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:$`[^\n]`;if(e===`digit`)return t?$`\D`:$`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Bw.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?$`\P`:$`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?$`\W`:$`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=xw(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${CT(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+wT(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:$`\g<${t}&R=${r}>`}},mT=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),hT=new Set([`-`,`\\`,`]`,`^`,`[`]),gT=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),_T=new Map([[9,$`\t`],[10,$`\n`],[11,$`\v`],[12,$`\f`],[13,$`\r`],[8232,$`\u2028`],[8233,$`\u2029`],[65279,$`\uFEFF`]]),vT=/^\p{Cased}$/u;function yT(e){return vT.test(e)}function bT(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=vw(e);if(!yT(t))continue;let o=jw(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function xT(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(_T.has(e))return _T.get(e);if(e<32||e>126&&e<160||e>262143||t&&ET(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?gT:hT:mT,a=vw(e);return(i.has(a)?`\\`:``)+a}function ST(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function CT(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function wT({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function TT({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function ET(e){return e>47&&e<58}function DT({type:e,value:t}){return e===`Character`&&t===45}var OT=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=AT(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(kT(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=jT(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function kT(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function AT(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)Sw(n,t,{}).transferTo=e;return n}function jT(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function MT(e,t){let n=NT(e,t);return n.options?new OT(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function NT(e,t){let n=Dw(t),r=Vw(aC(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Mw}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=dT(r,n),a=fw(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=nw(aw(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}function PT(e,t){return MT(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function FT(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>PT(e,{target:t.target}),{createScanner(e){return new dS(e,t)},createString(e){return{content:e}}}}async function IT(e){if(G_())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=B_.get(e);if(t!=null)return t;try{let t=V_.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(Q_,e)&&(t=Q_[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 z_.has(e)||z_.set(e,n),n});return B_.set(e,n),await n}finally{B_.delete(e)}}function LT(e){return z_.get(e)??IT(e)}function RT(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var zT=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},BT=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},VT=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function HT(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new zT(t);e.set(t,n)}function a(t,n){return e.has(t)?!1:(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 BT(i));let c=r,l=s().then(e=>{let a=RT(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 VT(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 UT=HT(),WT=new Set;function GT(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=UT.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,UT.getResolvedTheme(n)??UT.seedResolvedTheme(n,e);WT.has(n)||(WT.add(n),t.loadThemeSync(e))}}function KT(e){let t=[],n=new Set;for(let r of qT(e.themes)){let e=XT(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 KT({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 KT({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function qT(e){return JT(e)?[e]:e}function JT(e){return XT(e)||YT(e)}function YT(e){return typeof e.name==`string`&&typeof e.load==`function`}function XT(e){return typeof e.getThemes==`function`}function ZT({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:QT(t)}}function QT(e){return async()=>Nb(RT(await e()))}var $T=`pierre`,eE=[`pierre-dark`,`pierre-dark-soft`,`pierre-dark-vibrant`,`pierre-dark-protanopia-deuteranopia`,`pierre-dark-tritanopia`],tE=[`pierre-light`,`pierre-light-soft`,`pierre-light-vibrant`,`pierre-light-protanopia-deuteranopia`,`pierre-light-tritanopia`],nE=[...tE,...eE],rE=new Set(tE);function iE(e){return rE.has(e)?`light`:`dark`}var aE={"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`},oE={"pierre-dark":()=>Z(()=>import(`./pierre-dark-CpLgRqie.js`),[]),"pierre-dark-soft":()=>Z(()=>import(`./pierre-dark-soft-kZQmAZld.js`),[]),"pierre-dark-vibrant":()=>Z(()=>import(`./pierre-dark-vibrant-CpQYzh95.js`),[]),"pierre-dark-protanopia-deuteranopia":()=>Z(()=>import(`./pierre-dark-protanopia-deuteranopia-B35FxJx-.js`),[]),"pierre-dark-tritanopia":()=>Z(()=>import(`./pierre-dark-tritanopia-CpjhbsIL.js`),[]),"pierre-light":()=>Z(()=>import(`./pierre-light-CoaEpmwp.js`),[]),"pierre-light-soft":()=>Z(()=>import(`./pierre-light-soft-lWLdNTOI.js`),[]),"pierre-light-vibrant":()=>Z(()=>import(`./pierre-light-vibrant-D80Fkn33.js`),[]),"pierre-light-protanopia-deuteranopia":()=>Z(()=>import(`./pierre-light-protanopia-deuteranopia-0fSaH845.js`),[]),"pierre-light-tritanopia":()=>Z(()=>import(`./pierre-light-tritanopia-CEbqgOJL.js`),[])};function sE(e){return ZT({name:e,collection:$T,colorScheme:iE(e),displayName:aE[e],load:oE[e]})}var cE=KT({themes:nE.map(e=>sE(e))}),lE=`shiki`,uE=[`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`],dE=`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(`.`),fE=new Set(uE);function pE(e){return fE.has(e)?`light`:`dark`}var mE={andromeeda:()=>Z(()=>import(`./andromeeda-vGVdxbeo.js`),[]),"aurora-x":()=>Z(()=>import(`./aurora-x-CDeNXAV0.js`),[]),"ayu-dark":()=>Z(()=>import(`./ayu-dark-DluEY0Gj.js`),[]),"ayu-light":()=>Z(()=>import(`./ayu-light-C3h-C4tm.js`),[]),"ayu-mirage":()=>Z(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]),"catppuccin-frappe":()=>Z(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[]),"catppuccin-latte":()=>Z(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[]),"catppuccin-macchiato":()=>Z(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[]),"catppuccin-mocha":()=>Z(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[]),"dark-plus":()=>Z(()=>import(`./dark-plus-Cs2F2srj.js`),[]),dracula:()=>Z(()=>import(`./dracula-BHWKrbxM.js`),[]),"dracula-soft":()=>Z(()=>import(`./dracula-soft-5eyTD99u.js`),[]),"everforest-dark":()=>Z(()=>import(`./everforest-dark-sB-x3p7T.js`),[]),"everforest-light":()=>Z(()=>import(`./everforest-light-Df2xbC6M.js`),[]),"github-dark":()=>Z(()=>import(`./github-dark-C-LZuMrd.js`),[]),"github-dark-default":()=>Z(()=>import(`./github-dark-default-DXG-b-1a.js`),[]),"github-dark-dimmed":()=>Z(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]),"github-dark-high-contrast":()=>Z(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]),"github-light":()=>Z(()=>import(`./github-light-EUqPIrTm.js`),[]),"github-light-default":()=>Z(()=>import(`./github-light-default-BXViO-2h.js`),[]),"github-light-high-contrast":()=>Z(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]),"gruvbox-dark-hard":()=>Z(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]),"gruvbox-dark-medium":()=>Z(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]),"gruvbox-dark-soft":()=>Z(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]),"gruvbox-light-hard":()=>Z(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]),"gruvbox-light-medium":()=>Z(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]),"gruvbox-light-soft":()=>Z(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]),horizon:()=>Z(()=>import(`./horizon-CE9ld1lL.js`),[]),"horizon-bright":()=>Z(()=>import(`./horizon-bright-DSNQnXHK.js`),[]),houston:()=>Z(()=>import(`./houston-CsvMBhTu.js`),[]),"kanagawa-dragon":()=>Z(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[]),"kanagawa-lotus":()=>Z(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[]),"kanagawa-wave":()=>Z(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[]),laserwave:()=>Z(()=>import(`./laserwave-C_8bwKvT.js`),[]),"light-plus":()=>Z(()=>import(`./light-plus-DVQuIRkW.js`),[]),"material-theme":()=>Z(()=>import(`./material-theme-Bm3Qr25_.js`),[]),"material-theme-darker":()=>Z(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]),"material-theme-lighter":()=>Z(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]),"material-theme-ocean":()=>Z(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]),"material-theme-palenight":()=>Z(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]),"min-dark":()=>Z(()=>import(`./min-dark-BSWPekZh.js`),[]),"min-light":()=>Z(()=>import(`./min-light-DDpmG2fV.js`),[]),monokai:()=>Z(()=>import(`./monokai-CdkpiU2Y.js`),[]),"night-owl":()=>Z(()=>import(`./night-owl-DhmEMT88.js`),[]),"night-owl-light":()=>Z(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]),nord:()=>Z(()=>import(`./nord-Cb4Vim4T.js`),[]),"one-dark-pro":()=>Z(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]),"one-light":()=>Z(()=>import(`./one-light-D7Lr4KcI.js`),[]),plastic:()=>Z(()=>import(`./plastic-DQwYfKfQ.js`),[]),poimandres:()=>Z(()=>import(`./poimandres-DRFjx7u4.js`),[]),red:()=>Z(()=>import(`./red-CJ3rzSJv.js`),[]),"rose-pine":()=>Z(()=>import(`./rose-pine-BthvhNj6.js`),[]),"rose-pine-dawn":()=>Z(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[]),"rose-pine-moon":()=>Z(()=>import(`./rose-pine-moon-hon4tzzS.js`),[]),"slack-dark":()=>Z(()=>import(`./slack-dark-DnToyrRv.js`),[]),"slack-ochin":()=>Z(()=>import(`./slack-ochin-B2OO5cIa.js`),[]),"snazzy-light":()=>Z(()=>import(`./snazzy-light-4G7pJPwS.js`),[]),"solarized-dark":()=>Z(()=>import(`./solarized-dark-DV17i1UV.js`),[]),"solarized-light":()=>Z(()=>import(`./solarized-light-DSh2HLQt.js`),[]),"synthwave-84":()=>Z(()=>import(`./synthwave-84-nFMaYfgc.js`),[]),"tokyo-night":()=>Z(()=>import(`./tokyo-night-oM2G3aXe.js`),[]),vesper:()=>Z(()=>import(`./vesper-DdrHHSXu.js`),[]),"vitesse-black":()=>Z(()=>import(`./vitesse-black-fwtXNY1n.js`),[]),"vitesse-dark":()=>Z(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]),"vitesse-light":()=>Z(()=>import(`./vitesse-light-VbXTXTou.js`),[])};function hE(e){return ZT({name:e,collection:lE,colorScheme:pE(e),load:mE[e]})}var gE=KT({themes:Object.freeze([...uE.map(e=>hE(e)),...dE.map(e=>hE(e))])});function _E(e){if(G_())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(UT.hasRegisteredTheme(e))return;let t=gE.getTheme(e);if(t!=null){UT.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function vE(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function yE(e){_E(e);let t=await UT.resolveTheme(e);return vE(e,t),t}function bE(e){return UT.getResolvedTheme(e)??yE(e)}var xE;async function SE({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){xE??=nS({themes:[],langs:[`text`],engine:n===`shiki-wasm`?Pv(Z(()=>import(`./wasm-BnjxR4X6.js`),[])):FT()});let r=wE(xE)?await xE:xE;xE=r;let i=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=LT(e);`then`in t?i.push(t):W_(t,r)}let a=[];for(let t of e){let e=bE(t);`then`in e?a.push(e):GT(e,xE)}return(i.length>0||a.length>0)&&await Promise.all([Promise.all(i).then(e=>{W_(e,r)}),Promise.all(a).then(e=>{GT(e,r)})]),r}function CE(){if(xE!=null&&!(`then`in xE))return xE}function wE(e=xE){return e!=null&&`then`in e}for(let e of cE.getThemes())UT.registerThemeIfAbsent(e.name,e.load);function TE(e=ep){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function EE(e){for(let t of TE(e))if(!WT.has(t))return!1;return!0}function DE(e){return q({tagName:`div`,children:[q({tagName:`div`,children:e.annotations?.map(e=>q({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function OE(e,t){return q({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function kE(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 AE({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 q({tagName:`div`,children:[t===`custom`?q({tagName:`slot`,properties:{name:$f}}):jE({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[ME(r)]],properties:i})}function jE({name:e,prevName:t,iconType:n}){let r=[q({tagName:`slot`,properties:{name:Zf}}),Jp({name:kE(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(q({tagName:`div`,children:[q({tagName:`bdi`,children:[qp(t)]})],properties:{"data-prev-name":``}})),r.push(Jp({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(q({tagName:`div`,children:[q({tagName:`bdi`,children:[qp(e)]})],properties:{"data-title":``}})),q({tagName:`div`,children:r,properties:{"data-header-content":``}})}function ME(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(q({tagName:`span`,children:[qp(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(q({tagName:`span`,children:[qp(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(q({tagName:`slot`,properties:{name:Qf}})),q({tagName:`div`,children:t,properties:{"data-metadata":``}})}function NE(e){return q({tagName:`pre`,properties:PE(e)})}function PE({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;`}}function FE(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:TE(t),preferredHighlighter:n}}function IE(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}function LE(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function RE({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function zE({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-(n.additionLineIndex+n.additionCount),i=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function BE({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=zE({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function VE({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=HE({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=c.unifiedCount+e<n,a=c.splitCount+r<n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=RE({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),s=n===c.finalHunkIndex?BE({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,l=o.fromStart+o.fromEnd;function u(e,n){return s==null||s.collapsedLines<=0||s.fromStart+s.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?s.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?s.collapsedLines:0}let d=o.collapsedLines===0;function f(){return d?0:(d=!0,o.collapsedLines)}if(c.shouldSkip(l,l))c.incrementCounts(l,l),f();else{let e=r.unifiedLineStart-o.rangeSize,i=r.splitLineStart-o.rangeSize,a=r.deletionLineIndex-o.rangeSize,s=r.additionLineIndex-o.rangeSize,l=r.deletionStart-o.rangeSize,u=r.additionStart-o.rangeSize;if(GE(c,o.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:l+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:s+t,lineNumber:u+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-o.fromEnd,i=r.splitLineStart-o.fromEnd,a=r.deletionLineIndex-o.fromEnd,s=r.additionLineIndex-o.fromEnd,l=r.deletionStart-o.fromEnd,u=r.additionStart-o.fromEnd,GE(c,o.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:l+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:s+t,lineNumber:u+t,noEOFCR:!1}}),()=>{f()})))break hunkIterator}let p=r.unifiedLineStart,m=r.splitLineStart,h=r.deletionLineIndex,g=r.additionLineIndex,_=r.deletionStart,v=r.additionStart,y=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===y;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),f();else if(GE(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=p+t,s=m+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:u(o,s),type:`context`,deletionLine:{lineNumber:_+t,lineIndex:h+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:g+t,lineNumber:v+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{f()}))break hunkIterator;p+=e.lines,m+=e.lines,h+=e.lines,g+=e.lines,_+=e.lines,v+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=KE(c,e,t);(s[0]?.[0]??0)>0&&f();for(let[l,d]of s)for(let s=l;s<d;s++){let l=u(p+s,t===`unified`?m+(s<e.deletions?s:s-e.deletions):m+s);if(c.emit(qE({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:p,splitLineIndex:m,additionLineIndex:g,deletionLineIndex:h,additionLineNumber:v,deletionLineNumber:_,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}f(),c.incrementCounts(o,a),p+=o,m+=a,h+=e.deletions,g+=e.additions,_+=e.deletions,v+=e.additions}}if(s!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=s,a=r+i;if(GE(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:_+t,lineIndex:h+t,noEOFCR:!1,unifiedLineIndex:p+t,splitLineIndex:m+t},additionLine:{unifiedLineIndex:p+t,splitLineIndex:m+t,lineIndex:g+t,lineNumber:v+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function HE({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=UE({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function UE({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=RE({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?BE({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function WE(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function GE(e,t,n,r,i,a){let[o,s]=WE(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function KE(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function qE({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,w=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,T=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:w}:void 0;if(T==null&&E!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:E};if(T!=null&&E==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:void 0};if(T==null||E==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:E}}function JE(e,t){return Up(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function YE(e){return q({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function XE(e){return q({tagName:`div`,children:[q({tagName:`span`,children:[qp(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function ZE(e){return q({tagName:`div`,children:[Jp({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function QE({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(q({tagName:`div`,children:[qp(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(ZE(`up`)),s++),o||(e.push(ZE(`down`)),s++)):(e.push(ZE(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(q({tagName:`div`,children:[q({tagName:`span`,children:[qp(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(q({tagName:`div`,children:[qp(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(q({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(q({tagName:`slot`,properties:{name:i}})),q({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function $E(e,t){return`hunk-separator-${e}-${t}`}function eD(e){let t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function tD(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function nD(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(qp(`
2825
+ `)),e}var rD=Symbol(`no-token`),iD=Symbol(`multiple-tokens`);function aD(e){let t=oD(e);if(t!=null)return t;let n=rD,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){cD(e,a);for(let t of e.children)sD(t)}else sD(e);r.push(e),i=[],a=void 0;return}for(let e of i)sD(e);r.push(q({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==rD){if(e===iD){n=iD;return}if(n===rD){n=e;return}n!==e&&(n=iD)}};for(let t of e.children){let e=t.type===`element`?aD(t):rD;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function oD(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function sD(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)sD(t)}}function cD(e,t){e.properties[`data-char`]=t}function lD(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=t+uD(typeof e==`string`?e:a(e))+n;return o=r(o),i.has(o)||i.set(o,typeof e==`string`?e:{...e}),o}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function uD(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function dD(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=Yp(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&aD(a),i.push(nD(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(pD,fD),{state:n,transformers:r,toClass:fD}}var fD=lD({classPrefix:`hl-`}),pD={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function mD(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var hD=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,gD=/^0(?:\.0+)?%?$/;function _D(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function vD(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function yD(e){if(e==null)return null;let t=vD(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function bD(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||hD.test(t))return!0;let n=_D(t);return n!=null&&gD.test(n)}function xD(e,t,n){if(t==null||n==null)return!1;let r=yD(e),i=yD(t),a=yD(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var SD=new WeakMap;function CD(e){let t=SD.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;wD(r,`editor.background`,i),wD(r,`editor.foreground`,a),wD(r,`sideBar.background`,o),wD(r,`sideBar.foreground`,s),wD(r,`input.background`,n[`input.background`]??o),wD(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),wD(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),wD(r,`gitDecoration.addedResourceForeground`,TD(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),wD(r,`gitDecoration.modifiedResourceForeground`,TD(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),wD(r,`gitDecoration.deletedResourceForeground`,TD(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(bD(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(bD(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(ED(l,o)||xD(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return SD.set(e,u),u}function wD(e,t,n){n!=null&&n!==``&&(e[t]=n)}function TD(...e){for(let t of e)if(t!=null&&t!==``)return t}function ED(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function DD({theme:e=ep,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=CD(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${mD(`global`)}fg:${a.fg};`,r+=`${mD(`global`)}bg:${a.bg};`,r+=OD(i,n)}else{let n=t.getTheme(e.dark),i=CD(n);r+=`${mD(`global`)}dark:${i.fg};`,r+=`${mD(`global`)}dark-bg:${i.bg};`,r+=OD(n,`dark`),n=t.getTheme(e.light),i=CD(n),r+=`${mD(`global`)}light:${i.fg};`,r+=`${mD(`global`)}light-bg:${i.bg};`,r+=OD(n,`light`)}return r}function OD(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${mD(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${mD(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${mD(`global`)}${t}modified-color:${a};`),n}function kD(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}function AD({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function jD({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}var MD={forcePlainText:!1};function ND(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=MD){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=DD({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??FD();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}VE({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:c?h:!0,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&PD({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=ID({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function PD({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=lp(e),t=lp(t),e.length>s||t.length>s))return;let c=o===`char`?t_(e,t):v_(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(jD({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),jD({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?jD({item:e,arr:l,enableJoin:d,isLastItem:t}):jD({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(AD({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(AD({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function FD(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function ID({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=ep,...l}}){let u=s??F_(e.name),d=s??F_(t.name),{state:f,transformers:p}=dD(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:mD(`token`),tokenizeTimeLimit:0}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:mD(`token`),tokenizeTimeLimit:0};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,kD(i.codeToHast(lp(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,kD(i.codeToHast(lp(t.contents),m)))}}var LD=-1,RD=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++LD}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang=`text`;renderCache;constructor(e={theme:ep},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=EE(e.theme??ep)?CE():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??op}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t===`change`?{gutterLineType:e===`deletions`?`change-deletion`:`change-addition`}:{gutterLineType:t}}createAnnotationElement=e=>DE(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=ep,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=ap,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await SE(FE(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=qD(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!JE(t,r.options)&&(r=void 0),this.renderCache??={diff:e,highlighted:!n&&!I_(e),options:t,result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLang=e.lang??F_(e.name),this.initializeHighlighter())}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:IE(this.options),tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!LE(e,n.diff)||!JE(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=sp){if(e==null)return;let{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getMatchingWorkerResultCache(e,i);o!=null&&!this.hasHighlightedRenderCache(e,i)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||I_(e)||qD(e,this.getTokenizeMaxLength()),l=!LE(e,this.renderCache.diff),u=!kg(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(c||this.renderCache.result==null||!this.renderCache.highlighted&&(l||u))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||l||u||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,tD(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??F_(e.name);let t=this.highlighter!=null&&EE(i.theme),n=this.highlighter!=null&&U_(this.computedLang),r=!c&&n;if(this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=sp){let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return NE({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=qD(e,this.getTokenizeMaxLength());this.computedLang=t?`text`:e.lang??F_(e.name);let n=this.highlighter!=null&&EE(this.options.theme??ep),r=t||this.highlighter!=null&&U_(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults();return{result:ND(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i}),options:r}}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;let i=!this.renderCache.highlighted||!JE(this.renderCache.options,n)||!LE(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){let n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!JE(t,n.options)))return n}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&LE(e,n.diff)&&JE(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults();this.diff=e;let d=a===`unified`,f=[],p=[],m=[],h=[],{additionLines:g,deletionLines:_}=n,v={rowCount:0,hunkSeparators:u,additionsContentAST:f,deletionsContentAST:p,unifiedContentAST:m,unifiedGutterAST:Xp(),deletionsGutterAST:Xp(),additionsGutterAST:Xp(),expansionLineCount:c,hunkData:h,incrementRowCount(e=1){v.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:v.unifiedGutterAST.children.push(t);break;case`deletions`:v.deletionsGutterAST.children.push(t);break;case`additions`:v.additionsGutterAST.children.push(t);break}}},y=zE({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),b={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(v.pushToGutter(`additions`,Qp(void 0,`buffer`,this.size)),f?.push(YE(this.size))):(v.pushToGutter(`deletions`,Qp(void 0,`buffer`,this.size)),p?.push(YE(this.size))),this.size=0,this.side=void 0}}},x=(e,t,n,r,i)=>{v.pushToGutter(e,Zp(t,n,r,i))};function S(e){b.flush(),a===`unified`?GD(`unified`,e,v):(GD(`deletions`,e,v),GD(`additions`,e,v))}this.pushFileLevelAnnotations(e,a,t,v),VE({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,d=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&b.flush(),r>0&&S({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:!e.isPartial});let f=a===`unified`?d:l,p={type:c,hunkIndex:t,lineIndex:f,unifiedLineIndex:d,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(p);n?.before!=null&&HD(n.before,v);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});x(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${d},${l}`,u.gutterProperties),i==null?r!=null&&(r=KD(r,u.contentProperties)):i=KD(i,u.contentProperties),WD({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,f),createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&HD(n.after,v)}else{let n=this.getSplitInjectedRowsForLine?.(p);n?.before!=null&&UD(n.before,v,b);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let d=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();if(d!=null){if(b.side!=null&&b.side!==d)throw Error(`DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits`);b.side=d,b.increment()}let m=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,f);if(m!=null&&b.size>0&&b.flush(),s!=null){let e=KD(r,a.contentProperties);x(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=KD(i,u.contentProperties);x(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}WD({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...m,createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&UD(n.after,v,b)}let m=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,h=m?n.noEOFCRDeletions:!1,C=m?n.noEOFCRAdditions:!1,w=(s?.noEOFCR??!1)||h,T=(o?.noEOFCR??!1)||C;if(T||w){if(a===`split`&&b.flush(),w){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(v.unifiedContentAST.push(XE(e)),v.pushToGutter(`unified`,Qp(e,`metadata`,1))):(v.deletionsContentAST.push(XE(e)),v.pushToGutter(`deletions`,Qp(e,`metadata`,1)),T||(v.pushToGutter(`additions`,Qp(void 0,`buffer`,1)),v.additionsContentAST.push(YE(1))))}if(T){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(v.unifiedContentAST.push(XE(e)),v.pushToGutter(`unified`,Qp(e,`metadata`,1))):(v.additionsContentAST.push(XE(e)),v.pushToGutter(`additions`,Qp(e,`metadata`,1)),w||(v.pushToGutter(`deletions`,Qp(void 0,`buffer`,1)),v.deletionsContentAST.push(YE(1))))}v.incrementRowCount(1)}i>0&&u!==`simple`&&S({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:i,rangeSize:y,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),v.incrementRowCount(1)}}),a===`split`&&b.flush();let C=Math.max(eD(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),w=t.bufferBefore>0||t.bufferAfter>0,T=!d&&e.type!==`deleted`,E=!d&&e.type!==`new`,D=v.rowCount>0||w;f=T&&D?f:void 0,p=E&&D?p:void 0,m=d&&D?m:void 0;let ee=this.createPreElement(p!=null&&f!=null,C);return{unifiedGutterAST:d&&D?v.unifiedGutterAST.children:void 0,unifiedContentAST:m,deletionsGutterAST:E&&D?v.deletionsGutterAST.children:void 0,deletionsContentAST:p,additionsGutterAST:T&&D?v.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:h,preNode:ee,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff),totalLines:C,rowCount:v.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=Xp(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,OE(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(q({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(q({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(q({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return tg(this.renderFullAST(e,t))}renderPartialHTML(e,t){return tg(t==null?e:q({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!R_(n))return;let i=e.type===`new`?[]:zD(L_(this.deletionAnnotations)),a=e.type===`deleted`?[]:zD(L_(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;if(t===`unified`){WD({diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r});return}WD({diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(Ag(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(Ag(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(!(o.annotations.length===0&&a.annotations.length===0))return{deletionSpan:a,additionSpan:o}}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return AE({fileOrDiff:e,mode:t,stickyHeader:n})}};function zD(e){return e?.map(e=>Ag(e))??[]}var BD=new Intl.PluralRules(`en-US`);function VD(e){return`${e} unmodified line${BD.select(e)===`one`?``:`s`}`}function HD(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function UD(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function WD({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,Qp(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,Qp(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,Qp(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function GD(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,QE({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(QE({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,QE({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(QE({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=$E(e,t),d=r>c.expansionLineCount,f=s?t:void 0;c.pushToGutter(e,QE({type:c.hunkSeparators,content:VD(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(QE({type:c.hunkSeparators,content:VD(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:n,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function KD(e,t){return e==null||e.type!==`element`||t==null?e:{...e,properties:{...e.properties,...t}}}function qD(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function JD(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function YD(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function XD(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}var ZD=-1,QD=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++ZD}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(e={theme:ep},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new Cg,this.scrollSyncManager=new M_,this.interactionManager=new ig(`diff`,ag(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return XD(e)}createHunksRenderer(e){return new RD(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>{if(this.fileDiff==null)return;let n=this.fileDiff.hunks.at(-1),r,i;hunkIterator:for(let a of this.fileDiff.hunks){let o=t===`deletions`?a.deletionStart:a.additionStart,s=t===`deletions`?a.deletionCount:a.additionCount,c=a.splitLineStart,l=a.unifiedLineStart;if(e<o){let t=o-e;r=Math.max(l-t,0),i=Math.max(c-t,0);break hunkIterator}if(e>=o+s){if(a===n){let t=e-(o+s);r=l+a.unifiedLineCount+t,i=c+a.splitLineCount+t;break hunkIterator}continue}for(let n of a.hunkContent)if(n.type===`context`)if(e<o+n.lines){let t=e-o;i=c+t,r=l+t;break hunkIterator}else o+=n.lines,c+=n.lines,l+=n.lines;else{let a=t===`deletions`?n.deletions:n.additions;if(e<o+a){let a=e-o;r=l+(t===`additions`?n.deletions:0)+a,i=c+a;break hunkIterator}else o+=a,c+=Math.max(n.deletions,n.additions),l+=n.deletions+n.additions}break hunkIterator}if(!(r==null||i==null))return[r,i]};setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(ag(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType===t?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Up(this.appliedThemeCSS.theme,this.options.theme??ep)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t===`wrap`),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,lineAnnotations:i,oldFile:a,newFile:o,fileDiff:s}=e;this.hydrateElements(t,n),tO(this.pre,$D({fileDiff:s,oldFile:a,newFile:o}),this.options.collapsed)||nO(this.headerElement,eO({fileDiff:s,oldFile:a,newFile:o}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:s,oldFile:a,newFile:o,lineAnnotations:i}),r||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),Zg(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)!(e instanceof HTMLElement)||e.tagName.toLowerCase()!==`code`||(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!=null&&n!=null?j_(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,deferManagers:r=!1,forceRender:i=!1,preventEmit:a=!1,lineAnnotations:o,fileContainer:s,containerWrapper:c,renderRange:l}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let{collapsed:u=!1,themeType:d=`system`}=this.options,f=u?void 0:l,p=this.hasThemeChanged(),m=e!=null&&t!=null&&(!Og(e,this.deletionFile)||!Og(t,this.additionFile)),h=n!=null&&n!==this.fileDiff,g=o!=null&&(o.length>0||this.lineAnnotations.length>0)?o!==this.lineAnnotations:!1;if(!u&&kg(f,this.renderRange)&&!i&&!g&&!p&&(n!=null&&n===this.fileDiff||n==null&&!m))return this.applyCachedThemeState(d);let{renderRange:_}=this;if(this.renderRange=f,this.deletionFile=e,this.additionFile=t,n==null?e!=null&&t!=null&&m&&(h=!0,this.fileDiff=j_(e,t,this.options.parseDiffOptions)):this.fileDiff=n,h&&(this.cachedHeaderHTML=void 0),o!=null&&this.setLineAnnotations(o),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:v=!1,disableFileHeader:y=!1}=this.options;if(y&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),s=this.getOrCreateFileContainer(s,c),this.applyCachedThemeState(d),u){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,cp);e!=null&&this.applyThemeState(s,e.themeStyles,d,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,s),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,s)}return a||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(s);if(!(this.canPartiallyRender(i,g,m||h||p)&&this.applyPartialRender({previousRenderRange:_,renderRange:f}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,f);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(s,t.themeStyles,d,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,s),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,f),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,r||this.flushManagers()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,s)}return a||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}primeHighlightCache(){let{fileDiff:e,workerManager:t}=this;if(e==null||t==null||I_(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||t.primeDiffHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!YD(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${Ag(r)}`,a=this.annotationCache.get(i);if(a==null||!JD(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:Fg(Ag(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=Ig();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:Wp(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):Wp(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=jg;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,r=this.cachedHeaderHTML??tg(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;let{renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o}=this.options;if(i!=null){let e=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,$f,e),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}let s=a?.(n)??void 0,c=o?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Zf,s),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,Qf,c),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=Lg(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=Wg(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??ep,s=typeof o==`string`?o:{...o},c=zg(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=Yg({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:Gg(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=Kg(this.themeCSSStyle.textContent??``,zg(e)))}applyHunksToDOM(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Jg({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Jg({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Jg({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:a,options:{diffStyle:o=`split`}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;let s=this.getCodeColumns(o,r,a,i);if(s==null)return!1;let c=e.startingLine,l=t.startingLine,u=c+e.totalLines,d=l+t.totalLines,f=Math.max(c,l),p=Math.min(u,d);if(p<=f)return!1;let m=Math.max(0,f-c),h=Math.max(0,u-p),g=this.trimColumns({columns:s,trimStart:m,trimEnd:h,previousStart:c,overlapStart:f,overlapEnd:p,diffStyle:o});if(g<0)throw Error(`applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<g)throw Error(`applyPartialRender: trimmed beyond DOM row count`);let _=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(l,Math.max(f-l,0));if(y==null&&l<f)return!1;let b=v(p,Math.max(d-p,0));if(b==null&&d>p)return!1;let x=(e,t)=>{if(e!=null){if(o===`unified`&&!Array.isArray(s))this.insertPartialHTML(o,s,e,t);else if(o===`split`&&Array.isArray(s))this.insertPartialHTML(o,s,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);_+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,`afterbegin`),x(b,`beforeend`),this.lastRowCount!==_&&(this.applyRowSpan(o,s,_),this.lastRowCount=_),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=rO(t[0]),i=rO(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}else throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,r){function i(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(!(!(t instanceof HTMLElement)||!(n instanceof HTMLElement)||t.dataset.gutter==null||n.dataset.content==null))return{gutter:t,content:n}}if(e===`unified`)return i(t);{let e=i(n),t=i(r);return e!=null||t!=null?[e,t]:void 0}}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l===`unified`?!1:t!=null&&n!=null,totalLines:r,customProperties:i};Mg(u,this.appliedPreAttributes)||(Qg(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function $D({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function eO({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function tO(e,t,n=!1){return!n&&e==null&&t}function nO(e,t,n=!1){return e==null&&t&&!n}function rO(e){if(!(e==null||e.type!==`element`))return e.children??[]}var iO=F(`<div>`),aO=F(`<div class=diff-viewer>`),oO=F(`<p class=empty>No diff is available for this file.`);function sO(e){let[t,n]=C(),r;function i(){return new QD({diffStyle:`split`,hunkSeparators:`line-info`,lineDiffType:`word`,overflow:`scroll`,theme:{dark:`github-dark`,light:`github-light`},themeType:`light`})}function a(){r?.cleanUp(),r=void 0}let o=E(()=>{let t=(e.selectedPath?Zu(e.diff,e.selectedPath):e.diff)?.trim()??``;if(t.length!==0)return xp(t,`review-diff`).flatMap(e=>e.files)[0]});return T(()=>{let e=o(),n=t();if(!n||!e){a();return}a(),r=i(),r.render({fileDiff:e,containerWrapper:n,forceRender:!0})}),te(a),(()=>{var e=aO();return I(e,Ce(Ee,{get when(){return o()},get fallback(){return oO()},get children(){var e=iO();return Ne(n,e),e}})),e})()}var cO=F(`<p class=empty>Load a PR to see its changed files.`),lO=F(`<div class=file-tree><div class=file-tree-mount>`),uO=F(`<details class=grouping-progress><summary><span></span><span></span></summary><ol>`),dO=F(`<li><span class=grouping-step-state></span><span>`),fO=F(`<p class=empty>Run grouping to organize this PR for review.`),pO=F(`<div class=group-list><button type=button class=group-item><strong>All changes</strong><span> groups`),mO=F(`<button type=button class=group-item><strong></strong><span></span><small> files, <!> chunks`),hO=F(`<section class=empty-state><h2>Load a pull request</h2><p>Enter an explicit repository and PR number, or leave the repository blank to use the one in the directory where this command was started.`),gO=F(`<main class=app-shell><section class=review-header><div><p class=eyebrow>@wes-dev/pr</p><h1>Pull request review</h1></div><form class=pr-loader><label class=repository-input>Repository<input type=text placeholder=owner/repo></label><label>PR number<input type=text min=1 inputmode=numeric></label><button type=submit>Load PR`),_O=F(`<p class=pr-context> #`),vO=F(`<p class=error>`),yO=F(`<p>`),bO=F(`<section class=pr-summary><div><h2></h2></div><div class=header-actions><a target=_blank rel=noreferrer>Open on GitHub</a><button type=button class=primary>Group changes`),xO=F(`<section class=review-grid><aside class="panel group-panel"><div class=panel-heading><h2>Logical groups</h2><span></span></div></aside><section class="panel diff-panel"><div class=panel-heading><h2>Diff</h2><span></span></div></section><aside class="panel file-panel"><div class=panel-heading><h2>Files</h2><span>`),SO=F(`<ul class=draft-list>`),CO=F(`<div class=current-comments>`),wO=F(`<section class=review-actions><section class="panel draft-panel"><div class=panel-heading><h2>Draft inline comment</h2><span> drafts</span></div><div class=form-content><p class=comment-target></p><div class=inline-fields><label>Side<select><option value=right>New (right)</option><option value=left>Old (left)</option></select></label><label>Line<input type=number min=1></label></div><label>Comment<textarea></textarea></label><button type=button>Add draft comment</button></div></section><section class="panel submit-panel"><div class=panel-heading><h2>Review</h2><button type=button>Refresh GitHub comments</button></div><div class=form-content><label>Decision<select><option value=pending>Choose a decision</option><option value=comment>Comment</option><option value=approve>Approve</option><option value=request-changes>Request changes</option></select></label><label>Review body<textarea></textarea></label><div class=submit-actions><button type=button>Save draft</button><button type=button class=primary>Submit review`),TO=F(`<li><strong>:</strong><span>`),EO=F(`<article><strong></strong><span></span><p>`);function DO(e){return e.status===`added`?`added`:e.status===`removed`?`deleted`:`modified`}function OO(e){let t,n,r=``,i=E(()=>e.files.map(e=>e.path)),a=E(()=>e.files.map(e=>({path:e.path,status:DO(e)})));return ee(()=>{if(!t)return;let o=i();r=kO(o),n=new Xu({density:`compact`,flattenEmptyDirectories:!0,gitStatus:a(),initialExpansion:`open`,initialSelectedPaths:e.activePath?[e.activePath]:[],paths:o,onSelectionChange:t=>{let[n]=t;n&&e.onSelect(n)}}),n.render({containerWrapper:t})}),T(()=>{let e=i(),t=kO(e);n&&t!==r&&(n.resetPaths(e,{initialExpandedPaths:e}),r=t),n?.setGitStatus(a())}),T(()=>{let t=e.activePath;if(!t)return;let r=n?.getItem(t);r&&!r.isSelected()&&r.select(),n?.scrollToPath(t,{focus:!1,offset:`nearest`})}),te(()=>{n?.cleanUp()}),(()=>{var n=lO(),r=n.firstChild;return Ne(e=>{t=e},r),I(n,Ce(Ee,{get when(){return e.files.length===0},get children(){return cO()}}),null),n})()}function kO(e){return e.join(`\0`)}function AO(e){return e instanceof Error?e.message:String(e)}function jO(e){return(()=>{var t=uO(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=n.nextSibling;return I(i,()=>e.grouping.message??`Grouping changes`),I(a,Ce(Te,{get each(){return e.grouping.steps},children:e=>(()=>{var t=dO(),n=t.firstChild.nextSibling;return I(n,()=>e.label),w(()=>je(t,`data-state`,e.state)),t})()})),w(n=>{var i=e.grouping.state===`running`,a=`grouping-state ${e.grouping.state}`;return i!==n.e&&(t.open=n.e=i),a!==n.t&&Me(r,n.t=a),n},{e:void 0,t:void 0}),t})()}function MO(e){return(()=>{var t=pO(),n=t.firstChild,r=n.firstChild.nextSibling,i=r.firstChild;return n.$$click=()=>e.onSelect(void 0),I(r,()=>e.groups.length,i),I(t,Ce(Te,{get each(){return e.groups},children:t=>(()=>{var n=mO(),r=n.firstChild,i=r.nextSibling,a=i.nextSibling,o=a.firstChild,s=o.nextSibling;return s.nextSibling,n.$$click=()=>e.onSelect(t.id),I(r,()=>t.title),I(i,()=>t.summary),I(a,()=>t.files.length,o),I(a,()=>t.chunks.length,s),w(r=>{var i=t.id===e.selectedGroupId,a=t.id===e.selectedGroupId;return i!==r.e&&n.classList.toggle(`selected`,r.e=i),a!==r.t&&je(n,`aria-pressed`,r.t=a),r},{e:void 0,t:void 0}),n})()}),null),I(t,Ce(Ee,{get when(){return e.groups.length===0},get children(){return fO()}}),null),w(t=>{var r=!e.selectedGroupId,i=!e.selectedGroupId;return r!==t.e&&n.classList.toggle(`selected`,t.e=r),i!==t.t&&je(n,`aria-pressed`,t.t=i),t},{e:void 0,t:void 0}),t})()}function NO(){let[e,t]=C(``),[n,r]=C(``),[i,a]=C(),[o,s]=C(),[c,l]=C(),[u,d]=C(``),[f,p]=C(``),[m,h]=C(`right`),[g,_]=C(`pending`),[v,y]=C(``),[b,x]=C([]),[S,D]=C(),[O,k]=C(),A,j=E(()=>i()?.files??[]),M=E(()=>i()?.groups.find(e=>e.id===o())),N=E(()=>{let e=M();return e?j().filter(t=>e.files.includes(t.path)):j()}),ne=E(()=>c()??N()[0]?.path),re=E(()=>{let e=i(),t=M(),n=ne();if(!e)return``;if(!t)return e.diff;if(!n)return``;let r=e.chunks.filter(e=>e.path===n&&t.files.includes(n)).map(e=>e.id);return r.length===0?e.diff:Qu(e.diff,e.chunks,r)});T(()=>{let e=N(),t=c();t&&!e.some(e=>e.path===t)&&l(e[0]?.path)}),T(()=>{o()&&!M()&&s(void 0)}),T(()=>{let e=i(),t=e?.grouping.state===`running`?e.id:void 0;t!==A?.sessionId&&(se(),t&&oe(t))}),te(se),ee(()=>{(async()=>{try{let e=await Uf.review.initialPullRequest.query();e.target&&(t(e.target.repository??``),r(String(e.target.number)),await ie(e.target))}catch(e){k(AO(e))}})()});async function ie(r){let i=r?.number??Number(n()),o=r?.repository??(e().trim()||void 0);if(!Number.isInteger(i)||i<=0){k(`Enter a positive pull request number.`);return}D(`load`),k(void 0);try{let e=await Uf.review.loadPullRequest.mutate({repository:o,number:i});a(e),s(void 0),t(e.pullRequest.repository),l(e.files[0]?.path),_(e.decision.decision),y(e.decision.body),x([]),d(``),p(``)}catch(e){k(AO(e))}finally{D(void 0)}}function ae(e){s(e);let t=e?j().filter(t=>i()?.groups.find(t=>t.id===e)?.files.includes(t.path)):j();t.some(e=>e.path===c())||l(t[0]?.path)}function oe(e){let t={cancelled:!1,inFlight:!1,interval:0,sessionId:e},n=async()=>{if(!(t.cancelled||t.inFlight||i()?.id!==e)){t.inFlight=!0;try{let n=await Uf.review.getSession.query({sessionId:e});!t.cancelled&&i()?.id===e&&a(n)}catch(e){t.cancelled||k(AO(e))}finally{t.inFlight=!1}}};t.interval=window.setInterval(()=>{n()},750),A=t,n()}function se(){A&&=(A.cancelled=!0,window.clearInterval(A.interval),void 0)}function ce(e){let n=ed(e);if(n?.repository){t(n.repository),r(String(n.number));return}t(e)}function le(e){let n=ed(e);if(n?.repository){t(n.repository),r(String(n.number));return}r(e)}async function ue(){let e=i();if(e){D(`groups`),k(void 0);try{a(await Uf.review.groupChanges.mutate({sessionId:e.id}))}catch(t){try{a(await Uf.review.getSession.query({sessionId:e.id}))}catch{}k(AO(t))}finally{D(void 0)}}}async function de(){let e=i(),t=ne(),n=Number(f());if(!(!e||!t||!u().trim())){if(!Number.isInteger(n)||n<=0){k(`Set the visible diff line for this draft comment.`);return}D(`comment`),k(void 0);try{a(await Uf.review.addDraftComment.mutate({sessionId:e.id,filePath:t,line:n,side:m(),body:u().trim()})),d(``)}catch(e){k(AO(e))}finally{D(void 0)}}}async function fe(){let e=i();if(e){D(`decision`),k(void 0);try{a(await Uf.review.setDecisionDraft.mutate({sessionId:e.id,decision:{decision:g(),body:v()}}))}catch(e){k(AO(e))}finally{D(void 0)}}}async function pe(){let e=i();if(e){D(`comments`),k(void 0);try{x(await Uf.review.listCurrentComments.query({sessionId:e.id}))}catch(e){k(AO(e))}finally{D(void 0)}}}async function me(){let e=i();if(!(!e||g()===`pending`)){D(`submit`),k(void 0);try{await Uf.review.setDecisionDraft.mutate({sessionId:e.id,decision:{decision:g(),body:v()}}),a(await Uf.review.submitReview.mutate({sessionId:e.id})),_(`pending`),y(``),x([])}catch(e){k(AO(e))}finally{D(void 0)}}}return(()=>{var t=gO(),r=t.firstChild.firstChild;r.firstChild.nextSibling;var a=r.nextSibling,s=a.firstChild,c=s.firstChild.nextSibling,x=s.nextSibling,C=x.firstChild.nextSibling,T=x.nextSibling;return I(r,Ce(Ee,{get when(){return i()},children:e=>(()=>{var t=_O(),n=t.firstChild;return I(t,()=>e().pullRequest.repository,n),I(t,()=>e().pullRequest.number,null),t})()}),null),a.addEventListener(`submit`,e=>{e.preventDefault(),ie()}),c.$$input=e=>ce(e.currentTarget.value),C.$$input=e=>le(e.currentTarget.value),I(t,Ce(Ee,{get when(){return O()},children:e=>(()=>{var t=vO();return I(t,e),t})()}),null),I(t,Ce(Ee,{get when(){return i()},children:e=>[(()=>{var t=bO(),n=t.firstChild,r=n.firstChild,i=n.nextSibling.firstChild,a=i.nextSibling;return I(r,()=>e().pullRequest.title),I(n,Ce(Ee,{get when(){return e().pullRequest.body},get children(){var t=yO();return I(t,()=>e().pullRequest.body),t}}),null),a.$$click=ue,w(t=>{var n=e().pullRequest.url,r=!!S()||e().grouping.state===`running`;return n!==t.e&&je(i,`href`,t.e=n),r!==t.t&&(a.disabled=t.t=r),t},{e:void 0,t:void 0}),t})(),(()=>{var t=xO(),n=t.firstChild,r=n.firstChild.firstChild.nextSibling,i=n.nextSibling,a=i.firstChild.firstChild.nextSibling,s=i.nextSibling,c=s.firstChild.firstChild.nextSibling;return I(r,()=>e().groups.length),I(n,Ce(Ee,{get when(){return e().grouping.state!==`idle`},get children(){return Ce(jO,{get grouping(){return e().grouping}})}}),null),I(n,Ce(MO,{get groups(){return e().groups},get selectedGroupId(){return o()},onSelect:ae}),null),I(a,()=>ne()??`No file selected`),I(i,Ce(sO,{get diff(){return re()},get selectedPath(){return ne()}}),null),I(c,()=>N().length),I(s,Ce(OO,{get activePath(){return ne()},get files(){return N()},onSelect:l}),null),t})(),(()=>{var t=wO(),n=t.firstChild,r=n.firstChild,i=r.firstChild.nextSibling,a=i.firstChild,o=r.nextSibling,s=o.firstChild,c=s.nextSibling,l=c.firstChild,x=l.firstChild.nextSibling,C=l.nextSibling.firstChild.nextSibling,T=c.nextSibling,E=T.firstChild.nextSibling,D=T.nextSibling,ee=n.nextSibling.firstChild,te=ee.firstChild.nextSibling,O=ee.nextSibling,k=O.firstChild,A=k.firstChild.nextSibling,j=k.nextSibling,M=j.firstChild.nextSibling,N=j.nextSibling.firstChild,re=N.nextSibling;return I(i,()=>e().draftComments.length,a),I(s,()=>ne()??`Select a file`),x.addEventListener(`change`,e=>h(e.currentTarget.value)),C.$$input=e=>p(e.currentTarget.value),E.$$input=e=>d(e.currentTarget.value),D.$$click=de,I(o,Ce(Ee,{get when(){return e().draftComments.length>0},get children(){var t=SO();return I(t,Ce(Te,{get each(){return e().draftComments},children:e=>(()=>{var t=TO(),n=t.firstChild,r=n.firstChild,i=n.nextSibling;return I(n,()=>e.filePath,r),I(n,()=>e.line,null),I(i,()=>e.body),t})()})),t}}),null),te.$$click=pe,A.addEventListener(`change`,e=>_(e.currentTarget.value)),M.$$input=e=>y(e.currentTarget.value),N.$$click=fe,re.$$click=me,I(O,Ce(Ee,{get when(){return b().length>0},get children(){var e=CO();return I(e,Ce(Te,{get each(){return b()},children:e=>(()=>{var t=EO(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling;return I(n,()=>e.author),I(r,(()=>{var t=De(()=>!!e.filePath);return()=>t()?`${e.filePath}:${e.line??``}`:`General comment`})()),I(i,()=>e.body),t})()})),e}}),null),w(e=>{var t=!!S()||!ne(),n=!!S(),r=!!S(),i=!!S()||g()===`pending`;return t!==e.e&&(D.disabled=e.e=t),n!==e.t&&(te.disabled=e.t=n),r!==e.a&&(N.disabled=e.a=r),i!==e.o&&(re.disabled=e.o=i),e},{e:void 0,t:void 0,a:void 0,o:void 0}),w(()=>x.value=m()),w(()=>C.value=f()),w(()=>E.value=u()),w(()=>A.value=g()),w(()=>M.value=v()),t})()]}),null),I(t,Ce(Ee,{get when(){return De(()=>!i())()&&!O()},get children(){return hO()}}),null),w(()=>T.disabled=!!S()),w(()=>c.value=e()),w(()=>C.value=n()),t})()}Ae([`click`,`input`]);var PO=document.getElementById(`root`);if(!PO)throw Error(`Missing root element.`);ke(()=>Ce(NO,{}),PO);export{t};