palettecn 0.1.0

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 (460) hide show
  1. package/dist/index.mjs +10 -0
  2. package/dist/web/nitro.json +17 -0
  3. package/dist/web/public/assets/abap-BdvmRIgS.js +1 -0
  4. package/dist/web/public/assets/actionscript-3-et0rQaqm.js +1 -0
  5. package/dist/web/public/assets/ada-DPgrustg.js +1 -0
  6. package/dist/web/public/assets/andromeeda-DJl1yeV_.js +1 -0
  7. package/dist/web/public/assets/angular-html-Dm7s7tSx.js +1 -0
  8. package/dist/web/public/assets/angular-ts-B_ywTULt.js +1 -0
  9. package/dist/web/public/assets/apache-CFpsYX8S.js +1 -0
  10. package/dist/web/public/assets/apex-CN5n6pbI.js +1 -0
  11. package/dist/web/public/assets/apl-Dm11wHHc.js +1 -0
  12. package/dist/web/public/assets/applescript-JrY23hsL.js +1 -0
  13. package/dist/web/public/assets/ara-DR83hn3A.js +1 -0
  14. package/dist/web/public/assets/asciidoc-Dpu9XLB1.js +1 -0
  15. package/dist/web/public/assets/asm-BYI3A31V.js +1 -0
  16. package/dist/web/public/assets/astro-DP1naDCT.js +1 -0
  17. package/dist/web/public/assets/aurora-x-Nav5jnoQ.js +1 -0
  18. package/dist/web/public/assets/awk-BIoTx_w6.js +1 -0
  19. package/dist/web/public/assets/ayu-dark-H5QV5J7K.js +1 -0
  20. package/dist/web/public/assets/ayu-light-BrwTNGnU.js +1 -0
  21. package/dist/web/public/assets/ayu-mirage-Bg6FpF5w.js +1 -0
  22. package/dist/web/public/assets/ballerina-BFvDNd4T.js +1 -0
  23. package/dist/web/public/assets/bat-DtQkx7Ny.js +1 -0
  24. package/dist/web/public/assets/beancount-BIjKALa1.js +1 -0
  25. package/dist/web/public/assets/berry-BPkDN_EZ.js +1 -0
  26. package/dist/web/public/assets/bibtex-Dur2CNW6.js +1 -0
  27. package/dist/web/public/assets/bicep-BMz1bZ7m.js +1 -0
  28. package/dist/web/public/assets/bird2-91rdr9s7.js +1 -0
  29. package/dist/web/public/assets/blade-DD5O596X.js +1 -0
  30. package/dist/web/public/assets/bsl-FmB7U2qd.js +1 -0
  31. package/dist/web/public/assets/bundle-mjs-Bso3xn9x.js +1 -0
  32. package/dist/web/public/assets/c-DqqBLLyl.js +1 -0
  33. package/dist/web/public/assets/c3-CJTbEooS.js +1 -0
  34. package/dist/web/public/assets/cadence-C0GI7BZZ.js +1 -0
  35. package/dist/web/public/assets/cairo-B5JMmIC0.js +1 -0
  36. package/dist/web/public/assets/catppuccin-frappe-D76-cUjK.js +1 -0
  37. package/dist/web/public/assets/catppuccin-latte-DUHNJ_6_.js +1 -0
  38. package/dist/web/public/assets/catppuccin-macchiato-CFhPH2wd.js +1 -0
  39. package/dist/web/public/assets/catppuccin-mocha-BRD0cvUW.js +1 -0
  40. package/dist/web/public/assets/chunk-FRKYWMV7-DUkk3w4h.js +122 -0
  41. package/dist/web/public/assets/clarity-KgUVrNfC.js +1 -0
  42. package/dist/web/public/assets/clojure-BhQuoGIG.js +1 -0
  43. package/dist/web/public/assets/cmake-CA59gUFQ.js +1 -0
  44. package/dist/web/public/assets/cobol-CCFShgGZ.js +1 -0
  45. package/dist/web/public/assets/codeowners-CD36YqjJ.js +1 -0
  46. package/dist/web/public/assets/codeql-CrMosKUt.js +1 -0
  47. package/dist/web/public/assets/coffee-C-Mn3tBT.js +1 -0
  48. package/dist/web/public/assets/common-lisp-DYnOjAFz.js +1 -0
  49. package/dist/web/public/assets/components-DiZ1dSl3.js +77 -0
  50. package/dist/web/public/assets/coq-BaHtq3Qt.js +1 -0
  51. package/dist/web/public/assets/cpp-D8Y73ItU.js +1 -0
  52. package/dist/web/public/assets/crystal-CnXWqbxx.js +1 -0
  53. package/dist/web/public/assets/csharp-D6sghVPa.js +1 -0
  54. package/dist/web/public/assets/css-CUGjdPw_.js +1 -0
  55. package/dist/web/public/assets/csv-DuxyxUAI.js +1 -0
  56. package/dist/web/public/assets/cue-D9NRAX0_.js +1 -0
  57. package/dist/web/public/assets/cypher-HJRdtilF.js +1 -0
  58. package/dist/web/public/assets/d-B4Ont7_X.js +1 -0
  59. package/dist/web/public/assets/dark-plus-DZSBycyp.js +1 -0
  60. package/dist/web/public/assets/dart-Dp4asavE.js +1 -0
  61. package/dist/web/public/assets/dax-DBUubp6S.js +1 -0
  62. package/dist/web/public/assets/desktop-DQ0n6zIQ.js +1 -0
  63. package/dist/web/public/assets/diff-CFHlrffC.js +1 -0
  64. package/dist/web/public/assets/docker-BuefmsF5.js +1 -0
  65. package/dist/web/public/assets/dotenv-BKTsUQ_r.js +1 -0
  66. package/dist/web/public/assets/dracula-MOn9qacs.js +1 -0
  67. package/dist/web/public/assets/dracula-soft-C4r_sC_D.js +1 -0
  68. package/dist/web/public/assets/dream-maker-BNdv5lLS.js +1 -0
  69. package/dist/web/public/assets/edge-C-Mi8Oda.js +1 -0
  70. package/dist/web/public/assets/elixir-CTS5wQtX.js +1 -0
  71. package/dist/web/public/assets/elm-rM310x8D.js +1 -0
  72. package/dist/web/public/assets/emacs-lisp-D9FIGRtM.js +1 -0
  73. package/dist/web/public/assets/erb-oaGjGVGO.js +1 -0
  74. package/dist/web/public/assets/erlang-q4Mkyw3m.js +1 -0
  75. package/dist/web/public/assets/everforest-dark-CNa2QFRn.js +1 -0
  76. package/dist/web/public/assets/everforest-light-DRbUDqJT.js +1 -0
  77. package/dist/web/public/assets/fennel-DpqQTaVZ.js +1 -0
  78. package/dist/web/public/assets/field-1-Ujza0S5j.js +1 -0
  79. package/dist/web/public/assets/fish-hyk5x6Q4.js +1 -0
  80. package/dist/web/public/assets/fluent-DMll-MGX.js +1 -0
  81. package/dist/web/public/assets/fortran-fixed-form-BmdfKovV.js +1 -0
  82. package/dist/web/public/assets/fortran-free-form-MCAifii4.js +1 -0
  83. package/dist/web/public/assets/fsharp-DLlBn9Nl.js +1 -0
  84. package/dist/web/public/assets/gdresource-BzFzBRli.js +1 -0
  85. package/dist/web/public/assets/gdscript-D3R4J0Cv.js +1 -0
  86. package/dist/web/public/assets/gdshader-BAubtqqN.js +1 -0
  87. package/dist/web/public/assets/genie-BnIIX2pC.js +1 -0
  88. package/dist/web/public/assets/gherkin-CL3NUuB1.js +1 -0
  89. package/dist/web/public/assets/git-commit-BYPE8h85.js +1 -0
  90. package/dist/web/public/assets/git-rebase-Bmmgf6eN.js +1 -0
  91. package/dist/web/public/assets/github-dark-default-C6I2oE4c.js +1 -0
  92. package/dist/web/public/assets/github-dark-dimmed-DEqwxg6D.js +1 -0
  93. package/dist/web/public/assets/github-dark-high-contrast-DDt3j0cs.js +1 -0
  94. package/dist/web/public/assets/github-dark-oLN6SDKl.js +1 -0
  95. package/dist/web/public/assets/github-light-DaN-N2Gj.js +1 -0
  96. package/dist/web/public/assets/github-light-default-B3EwMbS7.js +1 -0
  97. package/dist/web/public/assets/github-light-high-contrast-Cl9D0f_e.js +1 -0
  98. package/dist/web/public/assets/gleam-Cvj8QRtQ.js +1 -0
  99. package/dist/web/public/assets/glimmer-js-CahbROb1.js +1 -0
  100. package/dist/web/public/assets/glimmer-ts-JMFYNbot.js +1 -0
  101. package/dist/web/public/assets/global-XWAvxWcA.css +2 -0
  102. package/dist/web/public/assets/glsl-BCuCNM3V.js +1 -0
  103. package/dist/web/public/assets/gn-DxCHSEMl.js +1 -0
  104. package/dist/web/public/assets/gnuplot-CkGXHK7B.js +1 -0
  105. package/dist/web/public/assets/go-B_NLCuTj.js +1 -0
  106. package/dist/web/public/assets/graphql-RXOfHGfI.js +1 -0
  107. package/dist/web/public/assets/groovy-DVge8oRs.js +1 -0
  108. package/dist/web/public/assets/gruvbox-dark-hard-BwZz1yni.js +1 -0
  109. package/dist/web/public/assets/gruvbox-dark-medium-Bqy6jkuO.js +1 -0
  110. package/dist/web/public/assets/gruvbox-dark-soft-DjUvyUfH.js +1 -0
  111. package/dist/web/public/assets/gruvbox-light-hard-BTLmfPdm.js +1 -0
  112. package/dist/web/public/assets/gruvbox-light-medium-DeWqsWs6.js +1 -0
  113. package/dist/web/public/assets/gruvbox-light-soft-BL8ld-1F.js +1 -0
  114. package/dist/web/public/assets/hack-BBQpwyf_.js +1 -0
  115. package/dist/web/public/assets/haml-mWELc9kh.js +1 -0
  116. package/dist/web/public/assets/handlebars-COrUo8cC.js +1 -0
  117. package/dist/web/public/assets/haskell-DRmM8XlQ.js +1 -0
  118. package/dist/web/public/assets/haxe-BEhq8ZEr.js +1 -0
  119. package/dist/web/public/assets/hcl-B5ZIaGS0.js +1 -0
  120. package/dist/web/public/assets/highlighted-body-TPN3WLV5-YJgGFx4e.js +1 -0
  121. package/dist/web/public/assets/hjson-B9uRLqIO.js +1 -0
  122. package/dist/web/public/assets/hlsl-Hv1kKjrS.js +1 -0
  123. package/dist/web/public/assets/horizon-ClXGBjWw.js +1 -0
  124. package/dist/web/public/assets/horizon-bright-CvUCr3ux.js +1 -0
  125. package/dist/web/public/assets/houston-NqkqG60q.js +1 -0
  126. package/dist/web/public/assets/html-cmigv1ou.js +1 -0
  127. package/dist/web/public/assets/html-derivative-B3me0pSu.js +1 -0
  128. package/dist/web/public/assets/http-BojM9cyU.js +1 -0
  129. package/dist/web/public/assets/hurl-BxEmMiGP.js +1 -0
  130. package/dist/web/public/assets/hxml-CoBuVbfs.js +1 -0
  131. package/dist/web/public/assets/hy-CeISYGGU.js +1 -0
  132. package/dist/web/public/assets/imba-xjcDFXUW.js +1 -0
  133. package/dist/web/public/assets/ini-D0ZCSj6e.js +1 -0
  134. package/dist/web/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  135. package/dist/web/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  136. package/dist/web/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  137. package/dist/web/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  138. package/dist/web/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  139. package/dist/web/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  140. package/dist/web/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  141. package/dist/web/public/assets/java-BvheClGI.js +1 -0
  142. package/dist/web/public/assets/javascript-DjlJORDg.js +1 -0
  143. package/dist/web/public/assets/jinja-Bi4sG72X.js +1 -0
  144. package/dist/web/public/assets/jison-BTz5Ik2Y.js +1 -0
  145. package/dist/web/public/assets/json-CiTd40Rg.js +1 -0
  146. package/dist/web/public/assets/json5-FR9EyF7a.js +1 -0
  147. package/dist/web/public/assets/jsonc-CHIeFfsD.js +1 -0
  148. package/dist/web/public/assets/jsonl-B4WQkwTf.js +1 -0
  149. package/dist/web/public/assets/jsonnet-vd-gzGkL.js +1 -0
  150. package/dist/web/public/assets/jssm-C_bj1LkZ.js +1 -0
  151. package/dist/web/public/assets/jsx-Bx-RZMFH.js +1 -0
  152. package/dist/web/public/assets/jsx-runtime-n8k0hwt8.js +1 -0
  153. package/dist/web/public/assets/julia-BKcIfSxk.js +1 -0
  154. package/dist/web/public/assets/just-IkZCagAs.js +1 -0
  155. package/dist/web/public/assets/kanagawa-dragon-B3Cz89vt.js +1 -0
  156. package/dist/web/public/assets/kanagawa-lotus-CRe_W5Ft.js +1 -0
  157. package/dist/web/public/assets/kanagawa-wave-BPqZ5XB7.js +1 -0
  158. package/dist/web/public/assets/kdl-BzL_Ak31.js +1 -0
  159. package/dist/web/public/assets/kotlin-BQQFk6ql.js +1 -0
  160. package/dist/web/public/assets/kusto-vWe6OLKV.js +1 -0
  161. package/dist/web/public/assets/laserwave-CwtvEUcj.js +1 -0
  162. package/dist/web/public/assets/latex-9N90_WFU.js +1 -0
  163. package/dist/web/public/assets/lean-CaqenOqv.js +1 -0
  164. package/dist/web/public/assets/less-CERnPzn6.js +1 -0
  165. package/dist/web/public/assets/light-plus-B9_M_OKq.js +1 -0
  166. package/dist/web/public/assets/liquid-CQLPDP7m.js +1 -0
  167. package/dist/web/public/assets/llvm-BylJXvm7.js +1 -0
  168. package/dist/web/public/assets/log-CBBcNcbO.js +1 -0
  169. package/dist/web/public/assets/logo-r-8Jc8Xk.js +1 -0
  170. package/dist/web/public/assets/lua-BBL6LXKd.js +1 -0
  171. package/dist/web/public/assets/luau-B2g7L-zP.js +1 -0
  172. package/dist/web/public/assets/main-0lKVDR64.css +2 -0
  173. package/dist/web/public/assets/main-CcNf0BOb.js +126 -0
  174. package/dist/web/public/assets/make-DK-HzJ2w.js +1 -0
  175. package/dist/web/public/assets/markdown-FgdsukgR.js +1 -0
  176. package/dist/web/public/assets/marko-CLZwt2N2.js +1 -0
  177. package/dist/web/public/assets/material-theme-DOJ9PS4O.js +1 -0
  178. package/dist/web/public/assets/material-theme-darker-DOurH5jT.js +1 -0
  179. package/dist/web/public/assets/material-theme-lighter-BfPWxCP6.js +1 -0
  180. package/dist/web/public/assets/material-theme-ocean-BcO5PKoq.js +1 -0
  181. package/dist/web/public/assets/material-theme-palenight-ClWQBDDd.js +1 -0
  182. package/dist/web/public/assets/matlab-DwyUVNXd.js +1 -0
  183. package/dist/web/public/assets/mdc-Bo8CRPg4.js +1 -0
  184. package/dist/web/public/assets/mdx-3EBShbsD.js +1 -0
  185. package/dist/web/public/assets/mermaid-ByG2-SLz.js +1 -0
  186. package/dist/web/public/assets/mermaid-O7DHMXV3-COAgR3aM.js +1 -0
  187. package/dist/web/public/assets/min-dark-ClJ2x5pc.js +1 -0
  188. package/dist/web/public/assets/min-light-BsOUz5iE.js +1 -0
  189. package/dist/web/public/assets/mipsasm-BKDtQCf3.js +1 -0
  190. package/dist/web/public/assets/mojo-DmEAK7iv.js +1 -0
  191. package/dist/web/public/assets/monokai-BKc3VADO.js +1 -0
  192. package/dist/web/public/assets/moonbit-Qm8v_cKN.js +1 -0
  193. package/dist/web/public/assets/move-CMectUPk.js +1 -0
  194. package/dist/web/public/assets/narrat-Bdm8NaK8.js +1 -0
  195. package/dist/web/public/assets/nextflow-BpSt05nC.js +1 -0
  196. package/dist/web/public/assets/nextflow-groovy-BZ-bqJ-u.js +1 -0
  197. package/dist/web/public/assets/nginx-ChZL5FWE.js +1 -0
  198. package/dist/web/public/assets/night-owl-CbFc5pXO.js +1 -0
  199. package/dist/web/public/assets/night-owl-light-zYbVCVuz.js +1 -0
  200. package/dist/web/public/assets/nim-5JnPAJWa.js +1 -0
  201. package/dist/web/public/assets/nix-P5P-2qHs.js +1 -0
  202. package/dist/web/public/assets/nord-C7hKGudV.js +1 -0
  203. package/dist/web/public/assets/nushell-DKPnC5RG.js +1 -0
  204. package/dist/web/public/assets/objective-c-BPwXtM0v.js +1 -0
  205. package/dist/web/public/assets/objective-cpp-CWYEdWNG.js +1 -0
  206. package/dist/web/public/assets/ocaml-CL7OJ02v.js +1 -0
  207. package/dist/web/public/assets/odin-Dtay25eA.js +1 -0
  208. package/dist/web/public/assets/one-dark-pro-CrdFNNwF.js +1 -0
  209. package/dist/web/public/assets/one-light-BUiz8X4B.js +1 -0
  210. package/dist/web/public/assets/openscad-WD4sXUUp.js +1 -0
  211. package/dist/web/public/assets/pascal-A6-MZnZ8.js +1 -0
  212. package/dist/web/public/assets/perl-Yq3AfnVV.js +1 -0
  213. package/dist/web/public/assets/php-CCj0foPx.js +1 -0
  214. package/dist/web/public/assets/pkl-cmPbg8fI.js +1 -0
  215. package/dist/web/public/assets/plastic-DtQ_LnDB.js +1 -0
  216. package/dist/web/public/assets/plsql-DwmuVd7q.js +1 -0
  217. package/dist/web/public/assets/po-CkVxkZaj.js +1 -0
  218. package/dist/web/public/assets/poimandres-Dt0xZuaa.js +1 -0
  219. package/dist/web/public/assets/polar-hStNz_W2.js +1 -0
  220. package/dist/web/public/assets/postcss-ZIk0AQ7M.js +1 -0
  221. package/dist/web/public/assets/powerquery-D0gqoHHD.js +1 -0
  222. package/dist/web/public/assets/powershell-DXB5HoVh.js +1 -0
  223. package/dist/web/public/assets/prisma-DmTrfxC0.js +1 -0
  224. package/dist/web/public/assets/prolog-CdoyriEj.js +1 -0
  225. package/dist/web/public/assets/proto-4MrN11dS.js +1 -0
  226. package/dist/web/public/assets/pug-svYJKDOQ.js +1 -0
  227. package/dist/web/public/assets/puppet-MEaLGpAP.js +1 -0
  228. package/dist/web/public/assets/purescript-CPxCorqB.js +1 -0
  229. package/dist/web/public/assets/python-f4fp5z0z.js +1 -0
  230. package/dist/web/public/assets/qml-BzEtWdqI.js +1 -0
  231. package/dist/web/public/assets/qmldir-DCjSceJ_.js +1 -0
  232. package/dist/web/public/assets/qss-BdM02NUc.js +1 -0
  233. package/dist/web/public/assets/r-luosIeJH.js +1 -0
  234. package/dist/web/public/assets/racket-D2tfa8Zc.js +1 -0
  235. package/dist/web/public/assets/raku-KeGPJVZg.js +1 -0
  236. package/dist/web/public/assets/razor-Bokxs4Qx.js +1 -0
  237. package/dist/web/public/assets/red-C0qZ-1lN.js +1 -0
  238. package/dist/web/public/assets/reg-DdnswvOj.js +1 -0
  239. package/dist/web/public/assets/regexp-CYC8h6V9.js +1 -0
  240. package/dist/web/public/assets/rel-RhzEfSRc.js +1 -0
  241. package/dist/web/public/assets/riscv-dS5TzX10.js +1 -0
  242. package/dist/web/public/assets/ron-CQjQSCVp.js +1 -0
  243. package/dist/web/public/assets/rose-pine-C89ViLdr.js +1 -0
  244. package/dist/web/public/assets/rose-pine-dawn-Dq2gf0yi.js +1 -0
  245. package/dist/web/public/assets/rose-pine-moon-CBDvXVs_.js +1 -0
  246. package/dist/web/public/assets/rosmsg-nvjuSIGu.js +1 -0
  247. package/dist/web/public/assets/routes-BXqJCOpL.js +542 -0
  248. package/dist/web/public/assets/rst-1xwvVGf7.js +1 -0
  249. package/dist/web/public/assets/ruby-Blad-eDx.js +1 -0
  250. package/dist/web/public/assets/rust-rV8q_xyI.js +1 -0
  251. package/dist/web/public/assets/sas-DUPWtptg.js +1 -0
  252. package/dist/web/public/assets/sass-CuxdoNN0.js +1 -0
  253. package/dist/web/public/assets/scala-Df4L7N3R.js +1 -0
  254. package/dist/web/public/assets/scheme-DalRmAPH.js +1 -0
  255. package/dist/web/public/assets/scss-CYQ8LEwP.js +1 -0
  256. package/dist/web/public/assets/sdbl-B_TmFnGf.js +1 -0
  257. package/dist/web/public/assets/shaderlab-DYEMDY3e.js +1 -0
  258. package/dist/web/public/assets/shellscript-DjKZ34ac.js +1 -0
  259. package/dist/web/public/assets/shellsession-C3kcnBnh.js +1 -0
  260. package/dist/web/public/assets/slack-dark-ak_jOeLl.js +1 -0
  261. package/dist/web/public/assets/slack-ochin-ByiYhLwu.js +1 -0
  262. package/dist/web/public/assets/smalltalk-DTTnjjZJ.js +1 -0
  263. package/dist/web/public/assets/snazzy-light-BBRYeY60.js +1 -0
  264. package/dist/web/public/assets/solarized-dark-BtoLnWkw.js +1 -0
  265. package/dist/web/public/assets/solarized-light-CtzUA7GI.js +1 -0
  266. package/dist/web/public/assets/solidity-CSIHEQ2t.js +1 -0
  267. package/dist/web/public/assets/soy-BN0uzUAI.js +1 -0
  268. package/dist/web/public/assets/sparql-B6k9tA6Q.js +1 -0
  269. package/dist/web/public/assets/splunk-DkRzN7V_.js +1 -0
  270. package/dist/web/public/assets/sql-Bx-WX28V.js +1 -0
  271. package/dist/web/public/assets/ssh-config-Bqp7ng33.js +1 -0
  272. package/dist/web/public/assets/stata-HAj7doU8.js +1 -0
  273. package/dist/web/public/assets/stylus-CdbCxDLX.js +1 -0
  274. package/dist/web/public/assets/surrealql-BkGf0I3k.js +1 -0
  275. package/dist/web/public/assets/svelte-DtWg6ssL.js +1 -0
  276. package/dist/web/public/assets/swift-yRu2dtgr.js +1 -0
  277. package/dist/web/public/assets/synthwave-84-2WIu6MHX.js +1 -0
  278. package/dist/web/public/assets/system-verilog-GUE_oP1V.js +1 -0
  279. package/dist/web/public/assets/systemd-FLIJAQZV.js +1 -0
  280. package/dist/web/public/assets/talonscript-DTR-8ILs.js +1 -0
  281. package/dist/web/public/assets/tasl-WHNWP-1F.js +1 -0
  282. package/dist/web/public/assets/tcl-BaBXNNp6.js +1 -0
  283. package/dist/web/public/assets/templ-Dc9vj00n.js +1 -0
  284. package/dist/web/public/assets/terraform-uJUFpr8t.js +1 -0
  285. package/dist/web/public/assets/tex-DA3dAz55.js +1 -0
  286. package/dist/web/public/assets/tokyo-night-BbogFqAr.js +1 -0
  287. package/dist/web/public/assets/toml-CyR4Gqq1.js +1 -0
  288. package/dist/web/public/assets/ts-tags-BD1j21LH.js +1 -0
  289. package/dist/web/public/assets/tsv-COLVYI6A.js +1 -0
  290. package/dist/web/public/assets/tsx-CFm2E6uK.js +1 -0
  291. package/dist/web/public/assets/turtle-PQwt4gkb.js +1 -0
  292. package/dist/web/public/assets/twig-DrUXy85s.js +1 -0
  293. package/dist/web/public/assets/typescript-Dy-5sXFx.js +1 -0
  294. package/dist/web/public/assets/typespec-Bb7qHV0g.js +1 -0
  295. package/dist/web/public/assets/typst-Bj_JElGz.js +1 -0
  296. package/dist/web/public/assets/v-BTkrtik4.js +1 -0
  297. package/dist/web/public/assets/vala-AXT1CI9v.js +1 -0
  298. package/dist/web/public/assets/vb-DzTKUgW8.js +1 -0
  299. package/dist/web/public/assets/verilog-aI3j5Xj8.js +1 -0
  300. package/dist/web/public/assets/vesper-BmnwIC_B.js +1 -0
  301. package/dist/web/public/assets/vhdl-4IgBB7vO.js +1 -0
  302. package/dist/web/public/assets/viml-D_XMKSR6.js +1 -0
  303. package/dist/web/public/assets/vitesse-black-DhmxIXiA.js +1 -0
  304. package/dist/web/public/assets/vitesse-dark-dvEH_9qt.js +1 -0
  305. package/dist/web/public/assets/vitesse-light-Ca0W2L1O.js +1 -0
  306. package/dist/web/public/assets/vue-DC_yTvy2.js +1 -0
  307. package/dist/web/public/assets/vue-html-Bp8x4gdt.js +1 -0
  308. package/dist/web/public/assets/vue-vine-ZcUkuUUp.js +1 -0
  309. package/dist/web/public/assets/vyper-Dz2f7-FK.js +1 -0
  310. package/dist/web/public/assets/wasm-CuXPCj65.js +1 -0
  311. package/dist/web/public/assets/wasm-DHkXUMsP.js +1 -0
  312. package/dist/web/public/assets/wenyan-BRAtM0Iv.js +1 -0
  313. package/dist/web/public/assets/wgsl-CMpn9jTa.js +1 -0
  314. package/dist/web/public/assets/wikitext-DRmBVmVA.js +1 -0
  315. package/dist/web/public/assets/wit-Drp_HLqJ.js +1 -0
  316. package/dist/web/public/assets/wolfram-C33umj7M.js +1 -0
  317. package/dist/web/public/assets/xml-BHoOtGbO.js +1 -0
  318. package/dist/web/public/assets/xsl-CN1PlFqm.js +1 -0
  319. package/dist/web/public/assets/yaml-DT0mpn8u.js +1 -0
  320. package/dist/web/public/assets/zenscript-BlYQ_Frf.js +1 -0
  321. package/dist/web/public/assets/zig-Buk7I0y-.js +1 -0
  322. package/dist/web/server/_chunks/ssr-renderer.mjs +15 -0
  323. package/dist/web/server/_libs/@ai-sdk/anthropic+[...].mjs +14021 -0
  324. package/dist/web/server/_libs/@ai-sdk/moonshotai+[...].mjs +898 -0
  325. package/dist/web/server/_libs/@ai-sdk/react+[...].mjs +8969 -0
  326. package/dist/web/server/_libs/@emotion/is-prop-valid+[...].mjs +34 -0
  327. package/dist/web/server/_libs/@floating-ui/core+[...].mjs +698 -0
  328. package/dist/web/server/_libs/@floating-ui/dom+[...].mjs +644 -0
  329. package/dist/web/server/_libs/@floating-ui/react-dom+[...].mjs +475 -0
  330. package/dist/web/server/_libs/@lobehub/icons+[...].mjs +3079 -0
  331. package/dist/web/server/_libs/@radix-ui/react-arrow+[...].mjs +184 -0
  332. package/dist/web/server/_libs/@radix-ui/react-collapsible+[...].mjs +374 -0
  333. package/dist/web/server/_libs/@radix-ui/react-dialog+[...].mjs +1503 -0
  334. package/dist/web/server/_libs/@radix-ui/react-menu+[...].mjs +1236 -0
  335. package/dist/web/server/_libs/@radix-ui/react-select+[...].mjs +1007 -0
  336. package/dist/web/server/_libs/@shikijs/core+[...].mjs +9017 -0
  337. package/dist/web/server/_libs/@shikijs/engine-javascript+[...].mjs +3159 -0
  338. package/dist/web/server/_libs/@streamdown/math+[...].mjs +37559 -0
  339. package/dist/web/server/_libs/@tanstack/react-router+[...].mjs +14074 -0
  340. package/dist/web/server/_libs/_.mjs +3 -0
  341. package/dist/web/server/_libs/_2.mjs +3 -0
  342. package/dist/web/server/_libs/_3.mjs +2 -0
  343. package/dist/web/server/_libs/_4.mjs +2 -0
  344. package/dist/web/server/_libs/ai-sdk__gateway+vercel__oidc.mjs +1255 -0
  345. package/dist/web/server/_libs/ai-sdk__google.mjs +1630 -0
  346. package/dist/web/server/_libs/ai-sdk__openai+zod.mjs +4951 -0
  347. package/dist/web/server/_libs/ai-sdk__provider-utils.mjs +411 -0
  348. package/dist/web/server/_libs/ai-sdk__provider.mjs +222 -0
  349. package/dist/web/server/_libs/bail.mjs +13 -0
  350. package/dist/web/server/_libs/character-entities.mjs +2135 -0
  351. package/dist/web/server/_libs/class-variance-authority+clsx.mjs +69 -0
  352. package/dist/web/server/_libs/color+[...].mjs +2185 -0
  353. package/dist/web/server/_libs/copy-text-to-clipboard.mjs +40 -0
  354. package/dist/web/server/_libs/d3-array.mjs +231 -0
  355. package/dist/web/server/_libs/d3-color.mjs +330 -0
  356. package/dist/web/server/_libs/d3-format.mjs +252 -0
  357. package/dist/web/server/_libs/d3-interpolate.mjs +207 -0
  358. package/dist/web/server/_libs/d3-path.mjs +77 -0
  359. package/dist/web/server/_libs/d3-scale+[...].mjs +1907 -0
  360. package/dist/web/server/_libs/d3-shape.mjs +818 -0
  361. package/dist/web/server/_libs/date-fns.mjs +3012 -0
  362. package/dist/web/server/_libs/date-fns__tz.mjs +249 -0
  363. package/dist/web/server/_libs/decimal.js-light.mjs +884 -0
  364. package/dist/web/server/_libs/decode-named-character-reference+[...].mjs +19 -0
  365. package/dist/web/server/_libs/dexie.mjs +3745 -0
  366. package/dist/web/server/_libs/escape-string-regexp.mjs +7 -0
  367. package/dist/web/server/_libs/estree-util-is-identifier-name.mjs +20 -0
  368. package/dist/web/server/_libs/eventemitter3.mjs +237 -0
  369. package/dist/web/server/_libs/extend.mjs +75 -0
  370. package/dist/web/server/_libs/fast-equals.mjs +423 -0
  371. package/dist/web/server/_libs/framer-motion+[...].mjs +9573 -0
  372. package/dist/web/server/_libs/fuzzysort.mjs +621 -0
  373. package/dist/web/server/_libs/h3+rou3+srvx.mjs +1158 -0
  374. package/dist/web/server/_libs/hast-util-raw+[...].mjs +800 -0
  375. package/dist/web/server/_libs/hast-util-sanitize.mjs +780 -0
  376. package/dist/web/server/_libs/hast-util-to-jsx-runtime+[...].mjs +853 -0
  377. package/dist/web/server/_libs/hookable.mjs +41 -0
  378. package/dist/web/server/_libs/html-url-attributes.mjs +44 -0
  379. package/dist/web/server/_libs/is-plain-obj.mjs +8 -0
  380. package/dist/web/server/_libs/lodash.mjs +4532 -0
  381. package/dist/web/server/_libs/lucide-react.mjs +605 -0
  382. package/dist/web/server/_libs/markdown-table.mjs +289 -0
  383. package/dist/web/server/_libs/marked.mjs +1511 -0
  384. package/dist/web/server/_libs/mdast-util-find-and-replace.mjs +198 -0
  385. package/dist/web/server/_libs/mdast-util-from-markdown+[...].mjs +8121 -0
  386. package/dist/web/server/_libs/mdast-util-gfm+[...].mjs +2060 -0
  387. package/dist/web/server/_libs/mdast-util-to-hast+[...].mjs +1770 -0
  388. package/dist/web/server/_libs/micromark-extension-gfm+[...].mjs +2235 -0
  389. package/dist/web/server/_libs/nanoid.mjs +26 -0
  390. package/dist/web/server/_libs/next-themes.mjs +124 -0
  391. package/dist/web/server/_libs/prop-types.mjs +69 -0
  392. package/dist/web/server/_libs/radix-ui__number.mjs +6 -0
  393. package/dist/web/server/_libs/radix-ui__primitive.mjs +9 -0
  394. package/dist/web/server/_libs/radix-ui__react-collection.mjs +80 -0
  395. package/dist/web/server/_libs/radix-ui__react-direction.mjs +11 -0
  396. package/dist/web/server/_libs/radix-ui__react-label.mjs +23 -0
  397. package/dist/web/server/_libs/radix-ui__react-menubar.mjs +400 -0
  398. package/dist/web/server/_libs/radix-ui__react-popover.mjs +251 -0
  399. package/dist/web/server/_libs/radix-ui__react-progress.mjs +81 -0
  400. package/dist/web/server/_libs/radix-ui__react-scroll-area.mjs +669 -0
  401. package/dist/web/server/_libs/radix-ui__react-separator.mjs +32 -0
  402. package/dist/web/server/_libs/radix-ui__react-slider.mjs +464 -0
  403. package/dist/web/server/_libs/radix-ui__react-switch.mjs +120 -0
  404. package/dist/web/server/_libs/radix-ui__react-tabs.mjs +145 -0
  405. package/dist/web/server/_libs/radix-ui__react-tooltip.mjs +494 -0
  406. package/dist/web/server/_libs/react-day-picker.mjs +3510 -0
  407. package/dist/web/server/_libs/react-is.mjs +48 -0
  408. package/dist/web/server/_libs/react-resizable-panels.mjs +1517 -0
  409. package/dist/web/server/_libs/react-smooth.mjs +1024 -0
  410. package/dist/web/server/_libs/recharts+[...].mjs +12998 -0
  411. package/dist/web/server/_libs/rehype-harden.mjs +210 -0
  412. package/dist/web/server/_libs/rehype-raw.mjs +37 -0
  413. package/dist/web/server/_libs/rehype-sanitize.mjs +27 -0
  414. package/dist/web/server/_libs/remark-gfm.mjs +34 -0
  415. package/dist/web/server/_libs/remark-parse.mjs +37 -0
  416. package/dist/web/server/_libs/remark-rehype.mjs +169 -0
  417. package/dist/web/server/_libs/remend.mjs +544 -0
  418. package/dist/web/server/_libs/scule.mjs +55 -0
  419. package/dist/web/server/_libs/shiki+streamdown__code.mjs +1748 -0
  420. package/dist/web/server/_libs/shiki.mjs +16 -0
  421. package/dist/web/server/_libs/shikijs__engine-oniguruma.mjs +387 -0
  422. package/dist/web/server/_libs/shikijs__langs.mjs +1357 -0
  423. package/dist/web/server/_libs/shikijs__themes.mjs +268 -0
  424. package/dist/web/server/_libs/sonner.mjs +909 -0
  425. package/dist/web/server/_libs/streamdown+[...].mjs +5842 -0
  426. package/dist/web/server/_libs/tanstack__history.mjs +342 -0
  427. package/dist/web/server/_libs/tanstack__query-core.mjs +2073 -0
  428. package/dist/web/server/_libs/tanstack__react-query.mjs +146 -0
  429. package/dist/web/server/_libs/tanstack__router-core.mjs +6 -0
  430. package/dist/web/server/_libs/tanstack__zod-adapter.mjs +16 -0
  431. package/dist/web/server/_libs/ufo.mjs +64 -0
  432. package/dist/web/server/_libs/ungap__structured-clone.mjs +197 -0
  433. package/dist/web/server/_libs/use-stick-to-bottom.mjs +410 -0
  434. package/dist/web/server/_libs/vercel__oidc.mjs +393 -0
  435. package/dist/web/server/_libs/zhipu-ai-provider.mjs +13483 -0
  436. package/dist/web/server/_libs/zustand.mjs +48 -0
  437. package/dist/web/server/_runtime.mjs +35 -0
  438. package/dist/web/server/_ssr/components-BzCiScpA.mjs +1452 -0
  439. package/dist/web/server/_ssr/dist-3Mu7PF0n.mjs +137 -0
  440. package/dist/web/server/_ssr/dist-BRaLXgxZ.mjs +17 -0
  441. package/dist/web/server/_ssr/field-1-agM60DBf.mjs +167 -0
  442. package/dist/web/server/_ssr/get-providers-BoYkp0Of.mjs +40 -0
  443. package/dist/web/server/_ssr/initialize-provider-B6W8V5Eg.mjs +19 -0
  444. package/dist/web/server/_ssr/model-list-CDFjdz2P.mjs +60 -0
  445. package/dist/web/server/_ssr/router-BmmOCtJZ.mjs +168 -0
  446. package/dist/web/server/_ssr/routes-CvlpZK4Q.mjs +2630 -0
  447. package/dist/web/server/_ssr/schemas-DsZ5O3zp.mjs +67 -0
  448. package/dist/web/server/_ssr/send-message-DUT1vRvx.mjs +135 -0
  449. package/dist/web/server/_ssr/ssr.mjs +5253 -0
  450. package/dist/web/server/_ssr/start-rewezkfD.mjs +4 -0
  451. package/dist/web/server/_ssr/submit-key-CcCv6-yy.mjs +62 -0
  452. package/dist/web/server/_ssr/suggestions-B0Uc3p7F.mjs +38 -0
  453. package/dist/web/server/_ssr/use-providers-Bwqg2U3N.mjs +1554 -0
  454. package/dist/web/server/_tanstack-start-manifest_v-BMIvh4y6.mjs +60 -0
  455. package/dist/web/server/index.mjs +2531 -0
  456. package/dist/web/server/node_modules/tslib/modules/index.js +70 -0
  457. package/dist/web/server/node_modules/tslib/modules/package.json +3 -0
  458. package/dist/web/server/node_modules/tslib/package.json +47 -0
  459. package/dist/web/server/node_modules/tslib/tslib.js +484 -0
  460. package/package.json +32 -0
@@ -0,0 +1,1770 @@
1
+ import { E as visit, a as asciiAlphanumeric } from "./@streamdown/math+[...].mjs";
2
+ import { t as esm_default } from "./ungap__structured-clone.mjs";
3
+ import { i as position, n as pointEnd, r as pointStart } from "./hast-util-raw+[...].mjs";
4
+ //#region ../../node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.js
5
+ /**
6
+ * Normalize a URL.
7
+ *
8
+ * Encode unsafe characters with percent-encoding, skipping already encoded
9
+ * sequences.
10
+ *
11
+ * @param {string} value
12
+ * URI to normalize.
13
+ * @returns {string}
14
+ * Normalized URI.
15
+ */
16
+ function normalizeUri(value) {
17
+ /** @type {Array<string>} */
18
+ const result = [];
19
+ let index = -1;
20
+ let start = 0;
21
+ let skip = 0;
22
+ while (++index < value.length) {
23
+ const code = value.charCodeAt(index);
24
+ /** @type {string} */
25
+ let replace = "";
26
+ if (code === 37 && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) skip = 2;
27
+ else if (code < 128) {
28
+ if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) replace = String.fromCharCode(code);
29
+ } else if (code > 55295 && code < 57344) {
30
+ const next = value.charCodeAt(index + 1);
31
+ if (code < 56320 && next > 56319 && next < 57344) {
32
+ replace = String.fromCharCode(code, next);
33
+ skip = 1;
34
+ } else replace = "�";
35
+ } else replace = String.fromCharCode(code);
36
+ if (replace) {
37
+ result.push(value.slice(start, index), encodeURIComponent(replace));
38
+ start = index + skip + 1;
39
+ replace = "";
40
+ }
41
+ if (skip) {
42
+ index += skip;
43
+ skip = 0;
44
+ }
45
+ }
46
+ return result.join("") + value.slice(start);
47
+ }
48
+ //#endregion
49
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js
50
+ /**
51
+ * @import {Element} from 'hast'
52
+ * @import {Blockquote} from 'mdast'
53
+ * @import {State} from '../state.js'
54
+ */
55
+ /**
56
+ * Turn an mdast `blockquote` node into hast.
57
+ *
58
+ * @param {State} state
59
+ * Info passed around.
60
+ * @param {Blockquote} node
61
+ * mdast node.
62
+ * @returns {Element}
63
+ * hast node.
64
+ */
65
+ function blockquote(state, node) {
66
+ /** @type {Element} */
67
+ const result = {
68
+ type: "element",
69
+ tagName: "blockquote",
70
+ properties: {},
71
+ children: state.wrap(state.all(node), true)
72
+ };
73
+ state.patch(node, result);
74
+ return state.applyData(node, result);
75
+ }
76
+ //#endregion
77
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/break.js
78
+ /**
79
+ * @import {Element, Text} from 'hast'
80
+ * @import {Break} from 'mdast'
81
+ * @import {State} from '../state.js'
82
+ */
83
+ /**
84
+ * Turn an mdast `break` node into hast.
85
+ *
86
+ * @param {State} state
87
+ * Info passed around.
88
+ * @param {Break} node
89
+ * mdast node.
90
+ * @returns {Array<Element | Text>}
91
+ * hast element content.
92
+ */
93
+ function hardBreak(state, node) {
94
+ /** @type {Element} */
95
+ const result = {
96
+ type: "element",
97
+ tagName: "br",
98
+ properties: {},
99
+ children: []
100
+ };
101
+ state.patch(node, result);
102
+ return [state.applyData(node, result), {
103
+ type: "text",
104
+ value: "\n"
105
+ }];
106
+ }
107
+ //#endregion
108
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/code.js
109
+ /**
110
+ * @import {Element, Properties} from 'hast'
111
+ * @import {Code} from 'mdast'
112
+ * @import {State} from '../state.js'
113
+ */
114
+ /**
115
+ * Turn an mdast `code` node into hast.
116
+ *
117
+ * @param {State} state
118
+ * Info passed around.
119
+ * @param {Code} node
120
+ * mdast node.
121
+ * @returns {Element}
122
+ * hast node.
123
+ */
124
+ function code(state, node) {
125
+ const value = node.value ? node.value + "\n" : "";
126
+ /** @type {Properties} */
127
+ const properties = {};
128
+ const language = node.lang ? node.lang.split(/\s+/) : [];
129
+ if (language.length > 0) properties.className = ["language-" + language[0]];
130
+ /** @type {Element} */
131
+ let result = {
132
+ type: "element",
133
+ tagName: "code",
134
+ properties,
135
+ children: [{
136
+ type: "text",
137
+ value
138
+ }]
139
+ };
140
+ if (node.meta) result.data = { meta: node.meta };
141
+ state.patch(node, result);
142
+ result = state.applyData(node, result);
143
+ result = {
144
+ type: "element",
145
+ tagName: "pre",
146
+ properties: {},
147
+ children: [result]
148
+ };
149
+ state.patch(node, result);
150
+ return result;
151
+ }
152
+ //#endregion
153
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/delete.js
154
+ /**
155
+ * @import {Element} from 'hast'
156
+ * @import {Delete} from 'mdast'
157
+ * @import {State} from '../state.js'
158
+ */
159
+ /**
160
+ * Turn an mdast `delete` node into hast.
161
+ *
162
+ * @param {State} state
163
+ * Info passed around.
164
+ * @param {Delete} node
165
+ * mdast node.
166
+ * @returns {Element}
167
+ * hast node.
168
+ */
169
+ function strikethrough(state, node) {
170
+ /** @type {Element} */
171
+ const result = {
172
+ type: "element",
173
+ tagName: "del",
174
+ properties: {},
175
+ children: state.all(node)
176
+ };
177
+ state.patch(node, result);
178
+ return state.applyData(node, result);
179
+ }
180
+ //#endregion
181
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
182
+ /**
183
+ * @import {Element} from 'hast'
184
+ * @import {Emphasis} from 'mdast'
185
+ * @import {State} from '../state.js'
186
+ */
187
+ /**
188
+ * Turn an mdast `emphasis` node into hast.
189
+ *
190
+ * @param {State} state
191
+ * Info passed around.
192
+ * @param {Emphasis} node
193
+ * mdast node.
194
+ * @returns {Element}
195
+ * hast node.
196
+ */
197
+ function emphasis(state, node) {
198
+ /** @type {Element} */
199
+ const result = {
200
+ type: "element",
201
+ tagName: "em",
202
+ properties: {},
203
+ children: state.all(node)
204
+ };
205
+ state.patch(node, result);
206
+ return state.applyData(node, result);
207
+ }
208
+ //#endregion
209
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
210
+ /**
211
+ * @import {Element} from 'hast'
212
+ * @import {FootnoteReference} from 'mdast'
213
+ * @import {State} from '../state.js'
214
+ */
215
+ /**
216
+ * Turn an mdast `footnoteReference` node into hast.
217
+ *
218
+ * @param {State} state
219
+ * Info passed around.
220
+ * @param {FootnoteReference} node
221
+ * mdast node.
222
+ * @returns {Element}
223
+ * hast node.
224
+ */
225
+ function footnoteReference(state, node) {
226
+ const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
227
+ const id = String(node.identifier).toUpperCase();
228
+ const safeId = normalizeUri(id.toLowerCase());
229
+ const index = state.footnoteOrder.indexOf(id);
230
+ /** @type {number} */
231
+ let counter;
232
+ let reuseCounter = state.footnoteCounts.get(id);
233
+ if (reuseCounter === void 0) {
234
+ reuseCounter = 0;
235
+ state.footnoteOrder.push(id);
236
+ counter = state.footnoteOrder.length;
237
+ } else counter = index + 1;
238
+ reuseCounter += 1;
239
+ state.footnoteCounts.set(id, reuseCounter);
240
+ /** @type {Element} */
241
+ const link = {
242
+ type: "element",
243
+ tagName: "a",
244
+ properties: {
245
+ href: "#" + clobberPrefix + "fn-" + safeId,
246
+ id: clobberPrefix + "fnref-" + safeId + (reuseCounter > 1 ? "-" + reuseCounter : ""),
247
+ dataFootnoteRef: true,
248
+ ariaDescribedBy: ["footnote-label"]
249
+ },
250
+ children: [{
251
+ type: "text",
252
+ value: String(counter)
253
+ }]
254
+ };
255
+ state.patch(node, link);
256
+ /** @type {Element} */
257
+ const sup = {
258
+ type: "element",
259
+ tagName: "sup",
260
+ properties: {},
261
+ children: [link]
262
+ };
263
+ state.patch(node, sup);
264
+ return state.applyData(node, sup);
265
+ }
266
+ //#endregion
267
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/heading.js
268
+ /**
269
+ * @import {Element} from 'hast'
270
+ * @import {Heading} from 'mdast'
271
+ * @import {State} from '../state.js'
272
+ */
273
+ /**
274
+ * Turn an mdast `heading` node into hast.
275
+ *
276
+ * @param {State} state
277
+ * Info passed around.
278
+ * @param {Heading} node
279
+ * mdast node.
280
+ * @returns {Element}
281
+ * hast node.
282
+ */
283
+ function heading(state, node) {
284
+ /** @type {Element} */
285
+ const result = {
286
+ type: "element",
287
+ tagName: "h" + node.depth,
288
+ properties: {},
289
+ children: state.all(node)
290
+ };
291
+ state.patch(node, result);
292
+ return state.applyData(node, result);
293
+ }
294
+ //#endregion
295
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/html.js
296
+ /**
297
+ * @import {Element} from 'hast'
298
+ * @import {Html} from 'mdast'
299
+ * @import {State} from '../state.js'
300
+ * @import {Raw} from '../../index.js'
301
+ */
302
+ /**
303
+ * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise
304
+ * nothing).
305
+ *
306
+ * @param {State} state
307
+ * Info passed around.
308
+ * @param {Html} node
309
+ * mdast node.
310
+ * @returns {Element | Raw | undefined}
311
+ * hast node.
312
+ */
313
+ function html(state, node) {
314
+ if (state.options.allowDangerousHtml) {
315
+ /** @type {Raw} */
316
+ const result = {
317
+ type: "raw",
318
+ value: node.value
319
+ };
320
+ state.patch(node, result);
321
+ return state.applyData(node, result);
322
+ }
323
+ }
324
+ //#endregion
325
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/revert.js
326
+ /**
327
+ * @import {ElementContent} from 'hast'
328
+ * @import {Reference, Nodes} from 'mdast'
329
+ * @import {State} from './state.js'
330
+ */
331
+ /**
332
+ * Return the content of a reference without definition as plain text.
333
+ *
334
+ * @param {State} state
335
+ * Info passed around.
336
+ * @param {Extract<Nodes, Reference>} node
337
+ * Reference node (image, link).
338
+ * @returns {Array<ElementContent>}
339
+ * hast content.
340
+ */
341
+ function revert(state, node) {
342
+ const subtype = node.referenceType;
343
+ let suffix = "]";
344
+ if (subtype === "collapsed") suffix += "[]";
345
+ else if (subtype === "full") suffix += "[" + (node.label || node.identifier) + "]";
346
+ if (node.type === "imageReference") return [{
347
+ type: "text",
348
+ value: "![" + node.alt + suffix
349
+ }];
350
+ const contents = state.all(node);
351
+ const head = contents[0];
352
+ if (head && head.type === "text") head.value = "[" + head.value;
353
+ else contents.unshift({
354
+ type: "text",
355
+ value: "["
356
+ });
357
+ const tail = contents[contents.length - 1];
358
+ if (tail && tail.type === "text") tail.value += suffix;
359
+ else contents.push({
360
+ type: "text",
361
+ value: suffix
362
+ });
363
+ return contents;
364
+ }
365
+ //#endregion
366
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
367
+ /**
368
+ * @import {ElementContent, Element, Properties} from 'hast'
369
+ * @import {ImageReference} from 'mdast'
370
+ * @import {State} from '../state.js'
371
+ */
372
+ /**
373
+ * Turn an mdast `imageReference` node into hast.
374
+ *
375
+ * @param {State} state
376
+ * Info passed around.
377
+ * @param {ImageReference} node
378
+ * mdast node.
379
+ * @returns {Array<ElementContent> | ElementContent}
380
+ * hast node.
381
+ */
382
+ function imageReference(state, node) {
383
+ const id = String(node.identifier).toUpperCase();
384
+ const definition = state.definitionById.get(id);
385
+ if (!definition) return revert(state, node);
386
+ /** @type {Properties} */
387
+ const properties = {
388
+ src: normalizeUri(definition.url || ""),
389
+ alt: node.alt
390
+ };
391
+ if (definition.title !== null && definition.title !== void 0) properties.title = definition.title;
392
+ /** @type {Element} */
393
+ const result = {
394
+ type: "element",
395
+ tagName: "img",
396
+ properties,
397
+ children: []
398
+ };
399
+ state.patch(node, result);
400
+ return state.applyData(node, result);
401
+ }
402
+ //#endregion
403
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/image.js
404
+ /**
405
+ * @import {Element, Properties} from 'hast'
406
+ * @import {Image} from 'mdast'
407
+ * @import {State} from '../state.js'
408
+ */
409
+ /**
410
+ * Turn an mdast `image` node into hast.
411
+ *
412
+ * @param {State} state
413
+ * Info passed around.
414
+ * @param {Image} node
415
+ * mdast node.
416
+ * @returns {Element}
417
+ * hast node.
418
+ */
419
+ function image(state, node) {
420
+ /** @type {Properties} */
421
+ const properties = { src: normalizeUri(node.url) };
422
+ if (node.alt !== null && node.alt !== void 0) properties.alt = node.alt;
423
+ if (node.title !== null && node.title !== void 0) properties.title = node.title;
424
+ /** @type {Element} */
425
+ const result = {
426
+ type: "element",
427
+ tagName: "img",
428
+ properties,
429
+ children: []
430
+ };
431
+ state.patch(node, result);
432
+ return state.applyData(node, result);
433
+ }
434
+ //#endregion
435
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
436
+ /**
437
+ * @import {Element, Text} from 'hast'
438
+ * @import {InlineCode} from 'mdast'
439
+ * @import {State} from '../state.js'
440
+ */
441
+ /**
442
+ * Turn an mdast `inlineCode` node into hast.
443
+ *
444
+ * @param {State} state
445
+ * Info passed around.
446
+ * @param {InlineCode} node
447
+ * mdast node.
448
+ * @returns {Element}
449
+ * hast node.
450
+ */
451
+ function inlineCode(state, node) {
452
+ /** @type {Text} */
453
+ const text = {
454
+ type: "text",
455
+ value: node.value.replace(/\r?\n|\r/g, " ")
456
+ };
457
+ state.patch(node, text);
458
+ /** @type {Element} */
459
+ const result = {
460
+ type: "element",
461
+ tagName: "code",
462
+ properties: {},
463
+ children: [text]
464
+ };
465
+ state.patch(node, result);
466
+ return state.applyData(node, result);
467
+ }
468
+ //#endregion
469
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
470
+ /**
471
+ * @import {ElementContent, Element, Properties} from 'hast'
472
+ * @import {LinkReference} from 'mdast'
473
+ * @import {State} from '../state.js'
474
+ */
475
+ /**
476
+ * Turn an mdast `linkReference` node into hast.
477
+ *
478
+ * @param {State} state
479
+ * Info passed around.
480
+ * @param {LinkReference} node
481
+ * mdast node.
482
+ * @returns {Array<ElementContent> | ElementContent}
483
+ * hast node.
484
+ */
485
+ function linkReference(state, node) {
486
+ const id = String(node.identifier).toUpperCase();
487
+ const definition = state.definitionById.get(id);
488
+ if (!definition) return revert(state, node);
489
+ /** @type {Properties} */
490
+ const properties = { href: normalizeUri(definition.url || "") };
491
+ if (definition.title !== null && definition.title !== void 0) properties.title = definition.title;
492
+ /** @type {Element} */
493
+ const result = {
494
+ type: "element",
495
+ tagName: "a",
496
+ properties,
497
+ children: state.all(node)
498
+ };
499
+ state.patch(node, result);
500
+ return state.applyData(node, result);
501
+ }
502
+ //#endregion
503
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/link.js
504
+ /**
505
+ * @import {Element, Properties} from 'hast'
506
+ * @import {Link} from 'mdast'
507
+ * @import {State} from '../state.js'
508
+ */
509
+ /**
510
+ * Turn an mdast `link` node into hast.
511
+ *
512
+ * @param {State} state
513
+ * Info passed around.
514
+ * @param {Link} node
515
+ * mdast node.
516
+ * @returns {Element}
517
+ * hast node.
518
+ */
519
+ function link(state, node) {
520
+ /** @type {Properties} */
521
+ const properties = { href: normalizeUri(node.url) };
522
+ if (node.title !== null && node.title !== void 0) properties.title = node.title;
523
+ /** @type {Element} */
524
+ const result = {
525
+ type: "element",
526
+ tagName: "a",
527
+ properties,
528
+ children: state.all(node)
529
+ };
530
+ state.patch(node, result);
531
+ return state.applyData(node, result);
532
+ }
533
+ //#endregion
534
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/list-item.js
535
+ /**
536
+ * @import {ElementContent, Element, Properties} from 'hast'
537
+ * @import {ListItem, Parents} from 'mdast'
538
+ * @import {State} from '../state.js'
539
+ */
540
+ /**
541
+ * Turn an mdast `listItem` node into hast.
542
+ *
543
+ * @param {State} state
544
+ * Info passed around.
545
+ * @param {ListItem} node
546
+ * mdast node.
547
+ * @param {Parents | undefined} parent
548
+ * Parent of `node`.
549
+ * @returns {Element}
550
+ * hast node.
551
+ */
552
+ function listItem(state, node, parent) {
553
+ const results = state.all(node);
554
+ const loose = parent ? listLoose(parent) : listItemLoose(node);
555
+ /** @type {Properties} */
556
+ const properties = {};
557
+ /** @type {Array<ElementContent>} */
558
+ const children = [];
559
+ if (typeof node.checked === "boolean") {
560
+ const head = results[0];
561
+ /** @type {Element} */
562
+ let paragraph;
563
+ if (head && head.type === "element" && head.tagName === "p") paragraph = head;
564
+ else {
565
+ paragraph = {
566
+ type: "element",
567
+ tagName: "p",
568
+ properties: {},
569
+ children: []
570
+ };
571
+ results.unshift(paragraph);
572
+ }
573
+ if (paragraph.children.length > 0) paragraph.children.unshift({
574
+ type: "text",
575
+ value: " "
576
+ });
577
+ paragraph.children.unshift({
578
+ type: "element",
579
+ tagName: "input",
580
+ properties: {
581
+ type: "checkbox",
582
+ checked: node.checked,
583
+ disabled: true
584
+ },
585
+ children: []
586
+ });
587
+ properties.className = ["task-list-item"];
588
+ }
589
+ let index = -1;
590
+ while (++index < results.length) {
591
+ const child = results[index];
592
+ if (loose || index !== 0 || child.type !== "element" || child.tagName !== "p") children.push({
593
+ type: "text",
594
+ value: "\n"
595
+ });
596
+ if (child.type === "element" && child.tagName === "p" && !loose) children.push(...child.children);
597
+ else children.push(child);
598
+ }
599
+ const tail = results[results.length - 1];
600
+ if (tail && (loose || tail.type !== "element" || tail.tagName !== "p")) children.push({
601
+ type: "text",
602
+ value: "\n"
603
+ });
604
+ /** @type {Element} */
605
+ const result = {
606
+ type: "element",
607
+ tagName: "li",
608
+ properties,
609
+ children
610
+ };
611
+ state.patch(node, result);
612
+ return state.applyData(node, result);
613
+ }
614
+ /**
615
+ * @param {Parents} node
616
+ * @return {Boolean}
617
+ */
618
+ function listLoose(node) {
619
+ let loose = false;
620
+ if (node.type === "list") {
621
+ loose = node.spread || false;
622
+ const children = node.children;
623
+ let index = -1;
624
+ while (!loose && ++index < children.length) loose = listItemLoose(children[index]);
625
+ }
626
+ return loose;
627
+ }
628
+ /**
629
+ * @param {ListItem} node
630
+ * @return {Boolean}
631
+ */
632
+ function listItemLoose(node) {
633
+ const spread = node.spread;
634
+ return spread === null || spread === void 0 ? node.children.length > 1 : spread;
635
+ }
636
+ //#endregion
637
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/list.js
638
+ /**
639
+ * @import {Element, Properties} from 'hast'
640
+ * @import {List} from 'mdast'
641
+ * @import {State} from '../state.js'
642
+ */
643
+ /**
644
+ * Turn an mdast `list` node into hast.
645
+ *
646
+ * @param {State} state
647
+ * Info passed around.
648
+ * @param {List} node
649
+ * mdast node.
650
+ * @returns {Element}
651
+ * hast node.
652
+ */
653
+ function list(state, node) {
654
+ /** @type {Properties} */
655
+ const properties = {};
656
+ const results = state.all(node);
657
+ let index = -1;
658
+ if (typeof node.start === "number" && node.start !== 1) properties.start = node.start;
659
+ while (++index < results.length) {
660
+ const child = results[index];
661
+ if (child.type === "element" && child.tagName === "li" && child.properties && Array.isArray(child.properties.className) && child.properties.className.includes("task-list-item")) {
662
+ properties.className = ["contains-task-list"];
663
+ break;
664
+ }
665
+ }
666
+ /** @type {Element} */
667
+ const result = {
668
+ type: "element",
669
+ tagName: node.ordered ? "ol" : "ul",
670
+ properties,
671
+ children: state.wrap(results, true)
672
+ };
673
+ state.patch(node, result);
674
+ return state.applyData(node, result);
675
+ }
676
+ //#endregion
677
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
678
+ /**
679
+ * @import {Element} from 'hast'
680
+ * @import {Paragraph} from 'mdast'
681
+ * @import {State} from '../state.js'
682
+ */
683
+ /**
684
+ * Turn an mdast `paragraph` node into hast.
685
+ *
686
+ * @param {State} state
687
+ * Info passed around.
688
+ * @param {Paragraph} node
689
+ * mdast node.
690
+ * @returns {Element}
691
+ * hast node.
692
+ */
693
+ function paragraph(state, node) {
694
+ /** @type {Element} */
695
+ const result = {
696
+ type: "element",
697
+ tagName: "p",
698
+ properties: {},
699
+ children: state.all(node)
700
+ };
701
+ state.patch(node, result);
702
+ return state.applyData(node, result);
703
+ }
704
+ //#endregion
705
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/root.js
706
+ /**
707
+ * @import {Parents as HastParents, Root as HastRoot} from 'hast'
708
+ * @import {Root as MdastRoot} from 'mdast'
709
+ * @import {State} from '../state.js'
710
+ */
711
+ /**
712
+ * Turn an mdast `root` node into hast.
713
+ *
714
+ * @param {State} state
715
+ * Info passed around.
716
+ * @param {MdastRoot} node
717
+ * mdast node.
718
+ * @returns {HastParents}
719
+ * hast node.
720
+ */
721
+ function root(state, node) {
722
+ /** @type {HastRoot} */
723
+ const result = {
724
+ type: "root",
725
+ children: state.wrap(state.all(node))
726
+ };
727
+ state.patch(node, result);
728
+ return state.applyData(node, result);
729
+ }
730
+ //#endregion
731
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/strong.js
732
+ /**
733
+ * @import {Element} from 'hast'
734
+ * @import {Strong} from 'mdast'
735
+ * @import {State} from '../state.js'
736
+ */
737
+ /**
738
+ * Turn an mdast `strong` node into hast.
739
+ *
740
+ * @param {State} state
741
+ * Info passed around.
742
+ * @param {Strong} node
743
+ * mdast node.
744
+ * @returns {Element}
745
+ * hast node.
746
+ */
747
+ function strong(state, node) {
748
+ /** @type {Element} */
749
+ const result = {
750
+ type: "element",
751
+ tagName: "strong",
752
+ properties: {},
753
+ children: state.all(node)
754
+ };
755
+ state.patch(node, result);
756
+ return state.applyData(node, result);
757
+ }
758
+ //#endregion
759
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/table.js
760
+ /**
761
+ * @import {Table} from 'mdast'
762
+ * @import {Element} from 'hast'
763
+ * @import {State} from '../state.js'
764
+ */
765
+ /**
766
+ * Turn an mdast `table` node into hast.
767
+ *
768
+ * @param {State} state
769
+ * Info passed around.
770
+ * @param {Table} node
771
+ * mdast node.
772
+ * @returns {Element}
773
+ * hast node.
774
+ */
775
+ function table(state, node) {
776
+ const rows = state.all(node);
777
+ const firstRow = rows.shift();
778
+ /** @type {Array<Element>} */
779
+ const tableContent = [];
780
+ if (firstRow) {
781
+ /** @type {Element} */
782
+ const head = {
783
+ type: "element",
784
+ tagName: "thead",
785
+ properties: {},
786
+ children: state.wrap([firstRow], true)
787
+ };
788
+ state.patch(node.children[0], head);
789
+ tableContent.push(head);
790
+ }
791
+ if (rows.length > 0) {
792
+ /** @type {Element} */
793
+ const body = {
794
+ type: "element",
795
+ tagName: "tbody",
796
+ properties: {},
797
+ children: state.wrap(rows, true)
798
+ };
799
+ const start = pointStart(node.children[1]);
800
+ const end = pointEnd(node.children[node.children.length - 1]);
801
+ if (start && end) body.position = {
802
+ start,
803
+ end
804
+ };
805
+ tableContent.push(body);
806
+ }
807
+ /** @type {Element} */
808
+ const result = {
809
+ type: "element",
810
+ tagName: "table",
811
+ properties: {},
812
+ children: state.wrap(tableContent, true)
813
+ };
814
+ state.patch(node, result);
815
+ return state.applyData(node, result);
816
+ }
817
+ //#endregion
818
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/table-row.js
819
+ /**
820
+ * @import {Element, ElementContent, Properties} from 'hast'
821
+ * @import {Parents, TableRow} from 'mdast'
822
+ * @import {State} from '../state.js'
823
+ */
824
+ /**
825
+ * Turn an mdast `tableRow` node into hast.
826
+ *
827
+ * @param {State} state
828
+ * Info passed around.
829
+ * @param {TableRow} node
830
+ * mdast node.
831
+ * @param {Parents | undefined} parent
832
+ * Parent of `node`.
833
+ * @returns {Element}
834
+ * hast node.
835
+ */
836
+ function tableRow(state, node, parent) {
837
+ const siblings = parent ? parent.children : void 0;
838
+ const tagName = (siblings ? siblings.indexOf(node) : 1) === 0 ? "th" : "td";
839
+ const align = parent && parent.type === "table" ? parent.align : void 0;
840
+ const length = align ? align.length : node.children.length;
841
+ let cellIndex = -1;
842
+ /** @type {Array<ElementContent>} */
843
+ const cells = [];
844
+ while (++cellIndex < length) {
845
+ const cell = node.children[cellIndex];
846
+ /** @type {Properties} */
847
+ const properties = {};
848
+ const alignValue = align ? align[cellIndex] : void 0;
849
+ if (alignValue) properties.align = alignValue;
850
+ /** @type {Element} */
851
+ let result = {
852
+ type: "element",
853
+ tagName,
854
+ properties,
855
+ children: []
856
+ };
857
+ if (cell) {
858
+ result.children = state.all(cell);
859
+ state.patch(cell, result);
860
+ result = state.applyData(cell, result);
861
+ }
862
+ cells.push(result);
863
+ }
864
+ /** @type {Element} */
865
+ const result = {
866
+ type: "element",
867
+ tagName: "tr",
868
+ properties: {},
869
+ children: state.wrap(cells, true)
870
+ };
871
+ state.patch(node, result);
872
+ return state.applyData(node, result);
873
+ }
874
+ //#endregion
875
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js
876
+ /**
877
+ * @import {Element} from 'hast'
878
+ * @import {TableCell} from 'mdast'
879
+ * @import {State} from '../state.js'
880
+ */
881
+ /**
882
+ * Turn an mdast `tableCell` node into hast.
883
+ *
884
+ * @param {State} state
885
+ * Info passed around.
886
+ * @param {TableCell} node
887
+ * mdast node.
888
+ * @returns {Element}
889
+ * hast node.
890
+ */
891
+ function tableCell(state, node) {
892
+ /** @type {Element} */
893
+ const result = {
894
+ type: "element",
895
+ tagName: "td",
896
+ properties: {},
897
+ children: state.all(node)
898
+ };
899
+ state.patch(node, result);
900
+ return state.applyData(node, result);
901
+ }
902
+ //#endregion
903
+ //#region ../../node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.js
904
+ var tab = 9;
905
+ var space = 32;
906
+ /**
907
+ * Remove initial and final spaces and tabs at the line breaks in `value`.
908
+ * Does not trim initial and final spaces and tabs of the value itself.
909
+ *
910
+ * @param {string} value
911
+ * Value to trim.
912
+ * @returns {string}
913
+ * Trimmed value.
914
+ */
915
+ function trimLines(value) {
916
+ const source = String(value);
917
+ const search = /\r?\n|\r/g;
918
+ let match = search.exec(source);
919
+ let last = 0;
920
+ /** @type {Array<string>} */
921
+ const lines = [];
922
+ while (match) {
923
+ lines.push(trimLine(source.slice(last, match.index), last > 0, true), match[0]);
924
+ last = match.index + match[0].length;
925
+ match = search.exec(source);
926
+ }
927
+ lines.push(trimLine(source.slice(last), last > 0, false));
928
+ return lines.join("");
929
+ }
930
+ /**
931
+ * @param {string} value
932
+ * Line to trim.
933
+ * @param {boolean} start
934
+ * Whether to trim the start of the line.
935
+ * @param {boolean} end
936
+ * Whether to trim the end of the line.
937
+ * @returns {string}
938
+ * Trimmed line.
939
+ */
940
+ function trimLine(value, start, end) {
941
+ let startIndex = 0;
942
+ let endIndex = value.length;
943
+ if (start) {
944
+ let code = value.codePointAt(startIndex);
945
+ while (code === tab || code === space) {
946
+ startIndex++;
947
+ code = value.codePointAt(startIndex);
948
+ }
949
+ }
950
+ if (end) {
951
+ let code = value.codePointAt(endIndex - 1);
952
+ while (code === tab || code === space) {
953
+ endIndex--;
954
+ code = value.codePointAt(endIndex - 1);
955
+ }
956
+ }
957
+ return endIndex > startIndex ? value.slice(startIndex, endIndex) : "";
958
+ }
959
+ //#endregion
960
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/text.js
961
+ /**
962
+ * @import {Element as HastElement, Text as HastText} from 'hast'
963
+ * @import {Text as MdastText} from 'mdast'
964
+ * @import {State} from '../state.js'
965
+ */
966
+ /**
967
+ * Turn an mdast `text` node into hast.
968
+ *
969
+ * @param {State} state
970
+ * Info passed around.
971
+ * @param {MdastText} node
972
+ * mdast node.
973
+ * @returns {HastElement | HastText}
974
+ * hast node.
975
+ */
976
+ function text(state, node) {
977
+ /** @type {HastText} */
978
+ const result = {
979
+ type: "text",
980
+ value: trimLines(String(node.value))
981
+ };
982
+ state.patch(node, result);
983
+ return state.applyData(node, result);
984
+ }
985
+ //#endregion
986
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
987
+ /**
988
+ * @import {Element} from 'hast'
989
+ * @import {ThematicBreak} from 'mdast'
990
+ * @import {State} from '../state.js'
991
+ */
992
+ /**
993
+ * Turn an mdast `thematicBreak` node into hast.
994
+ *
995
+ * @param {State} state
996
+ * Info passed around.
997
+ * @param {ThematicBreak} node
998
+ * mdast node.
999
+ * @returns {Element}
1000
+ * hast node.
1001
+ */
1002
+ function thematicBreak(state, node) {
1003
+ /** @type {Element} */
1004
+ const result = {
1005
+ type: "element",
1006
+ tagName: "hr",
1007
+ properties: {},
1008
+ children: []
1009
+ };
1010
+ state.patch(node, result);
1011
+ return state.applyData(node, result);
1012
+ }
1013
+ //#endregion
1014
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/index.js
1015
+ /**
1016
+ * @import {Handlers} from '../state.js'
1017
+ */
1018
+ /**
1019
+ * Default handlers for nodes.
1020
+ *
1021
+ * @satisfies {Handlers}
1022
+ */
1023
+ var handlers = {
1024
+ blockquote,
1025
+ break: hardBreak,
1026
+ code,
1027
+ delete: strikethrough,
1028
+ emphasis,
1029
+ footnoteReference,
1030
+ heading,
1031
+ html,
1032
+ imageReference,
1033
+ image,
1034
+ inlineCode,
1035
+ linkReference,
1036
+ link,
1037
+ listItem,
1038
+ list,
1039
+ paragraph,
1040
+ root,
1041
+ strong,
1042
+ table,
1043
+ tableCell,
1044
+ tableRow,
1045
+ text,
1046
+ thematicBreak,
1047
+ toml: ignore,
1048
+ yaml: ignore,
1049
+ definition: ignore,
1050
+ footnoteDefinition: ignore
1051
+ };
1052
+ function ignore() {}
1053
+ //#endregion
1054
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/footer.js
1055
+ /**
1056
+ * @import {ElementContent, Element} from 'hast'
1057
+ * @import {State} from './state.js'
1058
+ */
1059
+ /**
1060
+ * @callback FootnoteBackContentTemplate
1061
+ * Generate content for the backreference dynamically.
1062
+ *
1063
+ * For the following markdown:
1064
+ *
1065
+ * ```markdown
1066
+ * Alpha[^micromark], bravo[^micromark], and charlie[^remark].
1067
+ *
1068
+ * [^remark]: things about remark
1069
+ * [^micromark]: things about micromark
1070
+ * ```
1071
+ *
1072
+ * This function will be called with:
1073
+ *
1074
+ * * `0` and `0` for the backreference from `things about micromark` to
1075
+ * `alpha`, as it is the first used definition, and the first call to it
1076
+ * * `0` and `1` for the backreference from `things about micromark` to
1077
+ * `bravo`, as it is the first used definition, and the second call to it
1078
+ * * `1` and `0` for the backreference from `things about remark` to
1079
+ * `charlie`, as it is the second used definition
1080
+ * @param {number} referenceIndex
1081
+ * Index of the definition in the order that they are first referenced,
1082
+ * 0-indexed.
1083
+ * @param {number} rereferenceIndex
1084
+ * Index of calls to the same definition, 0-indexed.
1085
+ * @returns {Array<ElementContent> | ElementContent | string}
1086
+ * Content for the backreference when linking back from definitions to their
1087
+ * reference.
1088
+ *
1089
+ * @callback FootnoteBackLabelTemplate
1090
+ * Generate a back label dynamically.
1091
+ *
1092
+ * For the following markdown:
1093
+ *
1094
+ * ```markdown
1095
+ * Alpha[^micromark], bravo[^micromark], and charlie[^remark].
1096
+ *
1097
+ * [^remark]: things about remark
1098
+ * [^micromark]: things about micromark
1099
+ * ```
1100
+ *
1101
+ * This function will be called with:
1102
+ *
1103
+ * * `0` and `0` for the backreference from `things about micromark` to
1104
+ * `alpha`, as it is the first used definition, and the first call to it
1105
+ * * `0` and `1` for the backreference from `things about micromark` to
1106
+ * `bravo`, as it is the first used definition, and the second call to it
1107
+ * * `1` and `0` for the backreference from `things about remark` to
1108
+ * `charlie`, as it is the second used definition
1109
+ * @param {number} referenceIndex
1110
+ * Index of the definition in the order that they are first referenced,
1111
+ * 0-indexed.
1112
+ * @param {number} rereferenceIndex
1113
+ * Index of calls to the same definition, 0-indexed.
1114
+ * @returns {string}
1115
+ * Back label to use when linking back from definitions to their reference.
1116
+ */
1117
+ /**
1118
+ * Generate the default content that GitHub uses on backreferences.
1119
+ *
1120
+ * @param {number} _
1121
+ * Index of the definition in the order that they are first referenced,
1122
+ * 0-indexed.
1123
+ * @param {number} rereferenceIndex
1124
+ * Index of calls to the same definition, 0-indexed.
1125
+ * @returns {Array<ElementContent>}
1126
+ * Content.
1127
+ */
1128
+ function defaultFootnoteBackContent(_, rereferenceIndex) {
1129
+ /** @type {Array<ElementContent>} */
1130
+ const result = [{
1131
+ type: "text",
1132
+ value: "↩"
1133
+ }];
1134
+ if (rereferenceIndex > 1) result.push({
1135
+ type: "element",
1136
+ tagName: "sup",
1137
+ properties: {},
1138
+ children: [{
1139
+ type: "text",
1140
+ value: String(rereferenceIndex)
1141
+ }]
1142
+ });
1143
+ return result;
1144
+ }
1145
+ /**
1146
+ * Generate the default label that GitHub uses on backreferences.
1147
+ *
1148
+ * @param {number} referenceIndex
1149
+ * Index of the definition in the order that they are first referenced,
1150
+ * 0-indexed.
1151
+ * @param {number} rereferenceIndex
1152
+ * Index of calls to the same definition, 0-indexed.
1153
+ * @returns {string}
1154
+ * Label.
1155
+ */
1156
+ function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {
1157
+ return "Back to reference " + (referenceIndex + 1) + (rereferenceIndex > 1 ? "-" + rereferenceIndex : "");
1158
+ }
1159
+ /**
1160
+ * Generate a hast footer for called footnote definitions.
1161
+ *
1162
+ * @param {State} state
1163
+ * Info passed around.
1164
+ * @returns {Element | undefined}
1165
+ * `section` element or `undefined`.
1166
+ */
1167
+ function footer(state) {
1168
+ const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
1169
+ const footnoteBackContent = state.options.footnoteBackContent || defaultFootnoteBackContent;
1170
+ const footnoteBackLabel = state.options.footnoteBackLabel || defaultFootnoteBackLabel;
1171
+ const footnoteLabel = state.options.footnoteLabel || "Footnotes";
1172
+ const footnoteLabelTagName = state.options.footnoteLabelTagName || "h2";
1173
+ const footnoteLabelProperties = state.options.footnoteLabelProperties || { className: ["sr-only"] };
1174
+ /** @type {Array<ElementContent>} */
1175
+ const listItems = [];
1176
+ let referenceIndex = -1;
1177
+ while (++referenceIndex < state.footnoteOrder.length) {
1178
+ const definition = state.footnoteById.get(state.footnoteOrder[referenceIndex]);
1179
+ if (!definition) continue;
1180
+ const content = state.all(definition);
1181
+ const id = String(definition.identifier).toUpperCase();
1182
+ const safeId = normalizeUri(id.toLowerCase());
1183
+ let rereferenceIndex = 0;
1184
+ /** @type {Array<ElementContent>} */
1185
+ const backReferences = [];
1186
+ const counts = state.footnoteCounts.get(id);
1187
+ while (counts !== void 0 && ++rereferenceIndex <= counts) {
1188
+ if (backReferences.length > 0) backReferences.push({
1189
+ type: "text",
1190
+ value: " "
1191
+ });
1192
+ let children = typeof footnoteBackContent === "string" ? footnoteBackContent : footnoteBackContent(referenceIndex, rereferenceIndex);
1193
+ if (typeof children === "string") children = {
1194
+ type: "text",
1195
+ value: children
1196
+ };
1197
+ backReferences.push({
1198
+ type: "element",
1199
+ tagName: "a",
1200
+ properties: {
1201
+ href: "#" + clobberPrefix + "fnref-" + safeId + (rereferenceIndex > 1 ? "-" + rereferenceIndex : ""),
1202
+ dataFootnoteBackref: "",
1203
+ ariaLabel: typeof footnoteBackLabel === "string" ? footnoteBackLabel : footnoteBackLabel(referenceIndex, rereferenceIndex),
1204
+ className: ["data-footnote-backref"]
1205
+ },
1206
+ children: Array.isArray(children) ? children : [children]
1207
+ });
1208
+ }
1209
+ const tail = content[content.length - 1];
1210
+ if (tail && tail.type === "element" && tail.tagName === "p") {
1211
+ const tailTail = tail.children[tail.children.length - 1];
1212
+ if (tailTail && tailTail.type === "text") tailTail.value += " ";
1213
+ else tail.children.push({
1214
+ type: "text",
1215
+ value: " "
1216
+ });
1217
+ tail.children.push(...backReferences);
1218
+ } else content.push(...backReferences);
1219
+ /** @type {Element} */
1220
+ const listItem = {
1221
+ type: "element",
1222
+ tagName: "li",
1223
+ properties: { id: clobberPrefix + "fn-" + safeId },
1224
+ children: state.wrap(content, true)
1225
+ };
1226
+ state.patch(definition, listItem);
1227
+ listItems.push(listItem);
1228
+ }
1229
+ if (listItems.length === 0) return;
1230
+ return {
1231
+ type: "element",
1232
+ tagName: "section",
1233
+ properties: {
1234
+ dataFootnotes: true,
1235
+ className: ["footnotes"]
1236
+ },
1237
+ children: [
1238
+ {
1239
+ type: "element",
1240
+ tagName: footnoteLabelTagName,
1241
+ properties: {
1242
+ ...esm_default(footnoteLabelProperties),
1243
+ id: "footnote-label"
1244
+ },
1245
+ children: [{
1246
+ type: "text",
1247
+ value: footnoteLabel
1248
+ }]
1249
+ },
1250
+ {
1251
+ type: "text",
1252
+ value: "\n"
1253
+ },
1254
+ {
1255
+ type: "element",
1256
+ tagName: "ol",
1257
+ properties: {},
1258
+ children: state.wrap(listItems, true)
1259
+ },
1260
+ {
1261
+ type: "text",
1262
+ value: "\n"
1263
+ }
1264
+ ]
1265
+ };
1266
+ }
1267
+ //#endregion
1268
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/state.js
1269
+ /**
1270
+ * @import {
1271
+ * ElementContent as HastElementContent,
1272
+ * Element as HastElement,
1273
+ * Nodes as HastNodes,
1274
+ * Properties as HastProperties,
1275
+ * RootContent as HastRootContent,
1276
+ * Text as HastText
1277
+ * } from 'hast'
1278
+ * @import {
1279
+ * Definition as MdastDefinition,
1280
+ * FootnoteDefinition as MdastFootnoteDefinition,
1281
+ * Nodes as MdastNodes,
1282
+ * Parents as MdastParents
1283
+ * } from 'mdast'
1284
+ * @import {VFile} from 'vfile'
1285
+ * @import {
1286
+ * FootnoteBackContentTemplate,
1287
+ * FootnoteBackLabelTemplate
1288
+ * } from './footer.js'
1289
+ */
1290
+ /**
1291
+ * @callback Handler
1292
+ * Handle a node.
1293
+ * @param {State} state
1294
+ * Info passed around.
1295
+ * @param {any} node
1296
+ * mdast node to handle.
1297
+ * @param {MdastParents | undefined} parent
1298
+ * Parent of `node`.
1299
+ * @returns {Array<HastElementContent> | HastElementContent | undefined}
1300
+ * hast node.
1301
+ *
1302
+ * @typedef {Partial<Record<MdastNodes['type'], Handler>>} Handlers
1303
+ * Handle nodes.
1304
+ *
1305
+ * @typedef Options
1306
+ * Configuration (optional).
1307
+ * @property {boolean | null | undefined} [allowDangerousHtml=false]
1308
+ * Whether to persist raw HTML in markdown in the hast tree (default:
1309
+ * `false`).
1310
+ * @property {string | null | undefined} [clobberPrefix='user-content-']
1311
+ * Prefix to use before the `id` property on footnotes to prevent them from
1312
+ * *clobbering* (default: `'user-content-'`).
1313
+ *
1314
+ * Pass `''` for trusted markdown and when you are careful with
1315
+ * polyfilling.
1316
+ * You could pass a different prefix.
1317
+ *
1318
+ * DOM clobbering is this:
1319
+ *
1320
+ * ```html
1321
+ * <p id="x"></p>
1322
+ * <script>alert(x) // `x` now refers to the `p#x` DOM element<\/script>
1323
+ * ```
1324
+ *
1325
+ * The above example shows that elements are made available by browsers, by
1326
+ * their ID, on the `window` object.
1327
+ * This is a security risk because you might be expecting some other variable
1328
+ * at that place.
1329
+ * It can also break polyfills.
1330
+ * Using a prefix solves these problems.
1331
+ * @property {VFile | null | undefined} [file]
1332
+ * Corresponding virtual file representing the input document (optional).
1333
+ * @property {FootnoteBackContentTemplate | string | null | undefined} [footnoteBackContent]
1334
+ * Content of the backreference back to references (default: `defaultFootnoteBackContent`).
1335
+ *
1336
+ * The default value is:
1337
+ *
1338
+ * ```js
1339
+ * function defaultFootnoteBackContent(_, rereferenceIndex) {
1340
+ * const result = [{type: 'text', value: '↩'}]
1341
+ *
1342
+ * if (rereferenceIndex > 1) {
1343
+ * result.push({
1344
+ * type: 'element',
1345
+ * tagName: 'sup',
1346
+ * properties: {},
1347
+ * children: [{type: 'text', value: String(rereferenceIndex)}]
1348
+ * })
1349
+ * }
1350
+ *
1351
+ * return result
1352
+ * }
1353
+ * ```
1354
+ *
1355
+ * This content is used in the `a` element of each backreference (the `↩`
1356
+ * links).
1357
+ * @property {FootnoteBackLabelTemplate | string | null | undefined} [footnoteBackLabel]
1358
+ * Label to describe the backreference back to references (default:
1359
+ * `defaultFootnoteBackLabel`).
1360
+ *
1361
+ * The default value is:
1362
+ *
1363
+ * ```js
1364
+ * function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {
1365
+ * return (
1366
+ * 'Back to reference ' +
1367
+ * (referenceIndex + 1) +
1368
+ * (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')
1369
+ * )
1370
+ * }
1371
+ * ```
1372
+ *
1373
+ * Change it when the markdown is not in English.
1374
+ *
1375
+ * This label is used in the `ariaLabel` property on each backreference
1376
+ * (the `↩` links).
1377
+ * It affects users of assistive technology.
1378
+ * @property {string | null | undefined} [footnoteLabel='Footnotes']
1379
+ * Textual label to use for the footnotes section (default: `'Footnotes'`).
1380
+ *
1381
+ * Change it when the markdown is not in English.
1382
+ *
1383
+ * This label is typically hidden visually (assuming a `sr-only` CSS class
1384
+ * is defined that does that) and so affects screen readers only.
1385
+ * If you do have such a class, but want to show this section to everyone,
1386
+ * pass different properties with the `footnoteLabelProperties` option.
1387
+ * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]
1388
+ * Properties to use on the footnote label (default: `{className:
1389
+ * ['sr-only']}`).
1390
+ *
1391
+ * Change it to show the label and add other properties.
1392
+ *
1393
+ * This label is typically hidden visually (assuming an `sr-only` CSS class
1394
+ * is defined that does that) and so affects screen readers only.
1395
+ * If you do have such a class, but want to show this section to everyone,
1396
+ * pass an empty string.
1397
+ * You can also add different properties.
1398
+ *
1399
+ * > **Note**: `id: 'footnote-label'` is always added, because footnote
1400
+ * > calls use it with `aria-describedby` to provide an accessible label.
1401
+ * @property {string | null | undefined} [footnoteLabelTagName='h2']
1402
+ * HTML tag name to use for the footnote label element (default: `'h2'`).
1403
+ *
1404
+ * Change it to match your document structure.
1405
+ *
1406
+ * This label is typically hidden visually (assuming a `sr-only` CSS class
1407
+ * is defined that does that) and so affects screen readers only.
1408
+ * If you do have such a class, but want to show this section to everyone,
1409
+ * pass different properties with the `footnoteLabelProperties` option.
1410
+ * @property {Handlers | null | undefined} [handlers]
1411
+ * Extra handlers for nodes (optional).
1412
+ * @property {Array<MdastNodes['type']> | null | undefined} [passThrough]
1413
+ * List of custom mdast node types to pass through (keep) in hast (note that
1414
+ * the node itself is passed, but eventual children are transformed)
1415
+ * (optional).
1416
+ * @property {Handler | null | undefined} [unknownHandler]
1417
+ * Handler for all unknown nodes (optional).
1418
+ *
1419
+ * @typedef State
1420
+ * Info passed around.
1421
+ * @property {(node: MdastNodes) => Array<HastElementContent>} all
1422
+ * Transform the children of an mdast parent to hast.
1423
+ * @property {<Type extends HastNodes>(from: MdastNodes, to: Type) => HastElement | Type} applyData
1424
+ * Honor the `data` of `from`, and generate an element instead of `node`.
1425
+ * @property {Map<string, MdastDefinition>} definitionById
1426
+ * Definitions by their identifier.
1427
+ * @property {Map<string, MdastFootnoteDefinition>} footnoteById
1428
+ * Footnote definitions by their identifier.
1429
+ * @property {Map<string, number>} footnoteCounts
1430
+ * Counts for how often the same footnote was called.
1431
+ * @property {Array<string>} footnoteOrder
1432
+ * Identifiers of order when footnote calls first appear in tree order.
1433
+ * @property {Handlers} handlers
1434
+ * Applied handlers.
1435
+ * @property {(node: MdastNodes, parent: MdastParents | undefined) => Array<HastElementContent> | HastElementContent | undefined} one
1436
+ * Transform an mdast node to hast.
1437
+ * @property {Options} options
1438
+ * Configuration.
1439
+ * @property {(from: MdastNodes, node: HastNodes) => undefined} patch
1440
+ * Copy a node’s positional info.
1441
+ * @property {<Type extends HastRootContent>(nodes: Array<Type>, loose?: boolean | undefined) => Array<HastText | Type>} wrap
1442
+ * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.
1443
+ */
1444
+ var own = {}.hasOwnProperty;
1445
+ /** @type {Options} */
1446
+ var emptyOptions = {};
1447
+ /**
1448
+ * Create `state` from an mdast tree.
1449
+ *
1450
+ * @param {MdastNodes} tree
1451
+ * mdast node to transform.
1452
+ * @param {Options | null | undefined} [options]
1453
+ * Configuration (optional).
1454
+ * @returns {State}
1455
+ * `state` function.
1456
+ */
1457
+ function createState(tree, options) {
1458
+ const settings = options || emptyOptions;
1459
+ /** @type {Map<string, MdastDefinition>} */
1460
+ const definitionById = /* @__PURE__ */ new Map();
1461
+ /** @type {Map<string, MdastFootnoteDefinition>} */
1462
+ const footnoteById = /* @__PURE__ */ new Map();
1463
+ /** @type {State} */
1464
+ const state = {
1465
+ all,
1466
+ applyData,
1467
+ definitionById,
1468
+ footnoteById,
1469
+ footnoteCounts: /* @__PURE__ */ new Map(),
1470
+ footnoteOrder: [],
1471
+ handlers: {
1472
+ ...handlers,
1473
+ ...settings.handlers
1474
+ },
1475
+ one,
1476
+ options: settings,
1477
+ patch,
1478
+ wrap
1479
+ };
1480
+ visit(tree, function(node) {
1481
+ if (node.type === "definition" || node.type === "footnoteDefinition") {
1482
+ const map = node.type === "definition" ? definitionById : footnoteById;
1483
+ const id = String(node.identifier).toUpperCase();
1484
+ if (!map.has(id)) map.set(id, node);
1485
+ }
1486
+ });
1487
+ return state;
1488
+ /**
1489
+ * Transform an mdast node into a hast node.
1490
+ *
1491
+ * @param {MdastNodes} node
1492
+ * mdast node.
1493
+ * @param {MdastParents | undefined} [parent]
1494
+ * Parent of `node`.
1495
+ * @returns {Array<HastElementContent> | HastElementContent | undefined}
1496
+ * Resulting hast node.
1497
+ */
1498
+ function one(node, parent) {
1499
+ const type = node.type;
1500
+ const handle = state.handlers[type];
1501
+ if (own.call(state.handlers, type) && handle) return handle(state, node, parent);
1502
+ if (state.options.passThrough && state.options.passThrough.includes(type)) {
1503
+ if ("children" in node) {
1504
+ const { children, ...shallow } = node;
1505
+ const result = esm_default(shallow);
1506
+ result.children = state.all(node);
1507
+ return result;
1508
+ }
1509
+ return esm_default(node);
1510
+ }
1511
+ return (state.options.unknownHandler || defaultUnknownHandler)(state, node, parent);
1512
+ }
1513
+ /**
1514
+ * Transform the children of an mdast node into hast nodes.
1515
+ *
1516
+ * @param {MdastNodes} parent
1517
+ * mdast node to compile
1518
+ * @returns {Array<HastElementContent>}
1519
+ * Resulting hast nodes.
1520
+ */
1521
+ function all(parent) {
1522
+ /** @type {Array<HastElementContent>} */
1523
+ const values = [];
1524
+ if ("children" in parent) {
1525
+ const nodes = parent.children;
1526
+ let index = -1;
1527
+ while (++index < nodes.length) {
1528
+ const result = state.one(nodes[index], parent);
1529
+ if (result) {
1530
+ if (index && nodes[index - 1].type === "break") {
1531
+ if (!Array.isArray(result) && result.type === "text") result.value = trimMarkdownSpaceStart(result.value);
1532
+ if (!Array.isArray(result) && result.type === "element") {
1533
+ const head = result.children[0];
1534
+ if (head && head.type === "text") head.value = trimMarkdownSpaceStart(head.value);
1535
+ }
1536
+ }
1537
+ if (Array.isArray(result)) values.push(...result);
1538
+ else values.push(result);
1539
+ }
1540
+ }
1541
+ }
1542
+ return values;
1543
+ }
1544
+ }
1545
+ /**
1546
+ * Copy a node’s positional info.
1547
+ *
1548
+ * @param {MdastNodes} from
1549
+ * mdast node to copy from.
1550
+ * @param {HastNodes} to
1551
+ * hast node to copy into.
1552
+ * @returns {undefined}
1553
+ * Nothing.
1554
+ */
1555
+ function patch(from, to) {
1556
+ if (from.position) to.position = position(from);
1557
+ }
1558
+ /**
1559
+ * Honor the `data` of `from` and maybe generate an element instead of `to`.
1560
+ *
1561
+ * @template {HastNodes} Type
1562
+ * Node type.
1563
+ * @param {MdastNodes} from
1564
+ * mdast node to use data from.
1565
+ * @param {Type} to
1566
+ * hast node to change.
1567
+ * @returns {HastElement | Type}
1568
+ * Nothing.
1569
+ */
1570
+ function applyData(from, to) {
1571
+ /** @type {HastElement | Type} */
1572
+ let result = to;
1573
+ if (from && from.data) {
1574
+ const hName = from.data.hName;
1575
+ const hChildren = from.data.hChildren;
1576
+ const hProperties = from.data.hProperties;
1577
+ if (typeof hName === "string") if (result.type === "element") result.tagName = hName;
1578
+ else result = {
1579
+ type: "element",
1580
+ tagName: hName,
1581
+ properties: {},
1582
+ children: "children" in result ? result.children : [result]
1583
+ };
1584
+ if (result.type === "element" && hProperties) Object.assign(result.properties, esm_default(hProperties));
1585
+ if ("children" in result && result.children && hChildren !== null && hChildren !== void 0) result.children = hChildren;
1586
+ }
1587
+ return result;
1588
+ }
1589
+ /**
1590
+ * Transform an unknown node.
1591
+ *
1592
+ * @param {State} state
1593
+ * Info passed around.
1594
+ * @param {MdastNodes} node
1595
+ * Unknown mdast node.
1596
+ * @returns {HastElement | HastText}
1597
+ * Resulting hast node.
1598
+ */
1599
+ function defaultUnknownHandler(state, node) {
1600
+ const data = node.data || {};
1601
+ /** @type {HastElement | HastText} */
1602
+ const result = "value" in node && !(own.call(data, "hProperties") || own.call(data, "hChildren")) ? {
1603
+ type: "text",
1604
+ value: node.value
1605
+ } : {
1606
+ type: "element",
1607
+ tagName: "div",
1608
+ properties: {},
1609
+ children: state.all(node)
1610
+ };
1611
+ state.patch(node, result);
1612
+ return state.applyData(node, result);
1613
+ }
1614
+ /**
1615
+ * Wrap `nodes` with line endings between each node.
1616
+ *
1617
+ * @template {HastRootContent} Type
1618
+ * Node type.
1619
+ * @param {Array<Type>} nodes
1620
+ * List of nodes to wrap.
1621
+ * @param {boolean | undefined} [loose=false]
1622
+ * Whether to add line endings at start and end (default: `false`).
1623
+ * @returns {Array<HastText | Type>}
1624
+ * Wrapped nodes.
1625
+ */
1626
+ function wrap(nodes, loose) {
1627
+ /** @type {Array<HastText | Type>} */
1628
+ const result = [];
1629
+ let index = -1;
1630
+ if (loose) result.push({
1631
+ type: "text",
1632
+ value: "\n"
1633
+ });
1634
+ while (++index < nodes.length) {
1635
+ if (index) result.push({
1636
+ type: "text",
1637
+ value: "\n"
1638
+ });
1639
+ result.push(nodes[index]);
1640
+ }
1641
+ if (loose && nodes.length > 0) result.push({
1642
+ type: "text",
1643
+ value: "\n"
1644
+ });
1645
+ return result;
1646
+ }
1647
+ /**
1648
+ * Trim spaces and tabs at the start of `value`.
1649
+ *
1650
+ * @param {string} value
1651
+ * Value to trim.
1652
+ * @returns {string}
1653
+ * Result.
1654
+ */
1655
+ function trimMarkdownSpaceStart(value) {
1656
+ let index = 0;
1657
+ let code = value.charCodeAt(index);
1658
+ while (code === 9 || code === 32) {
1659
+ index++;
1660
+ code = value.charCodeAt(index);
1661
+ }
1662
+ return value.slice(index);
1663
+ }
1664
+ //#endregion
1665
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/index.js
1666
+ /**
1667
+ * @import {Nodes as HastNodes} from 'hast'
1668
+ * @import {Nodes as MdastNodes} from 'mdast'
1669
+ * @import {Options} from './state.js'
1670
+ */
1671
+ /**
1672
+ * Transform mdast to hast.
1673
+ *
1674
+ * ##### Notes
1675
+ *
1676
+ * ###### HTML
1677
+ *
1678
+ * Raw HTML is available in mdast as `html` nodes and can be embedded in hast
1679
+ * as semistandard `raw` nodes.
1680
+ * Most utilities ignore `raw` nodes but two notable ones don’t:
1681
+ *
1682
+ * * `hast-util-to-html` also has an option `allowDangerousHtml` which will
1683
+ * output the raw HTML.
1684
+ * This is typically discouraged as noted by the option name but is useful
1685
+ * if you completely trust authors
1686
+ * * `hast-util-raw` can handle the raw embedded HTML strings by parsing them
1687
+ * into standard hast nodes (`element`, `text`, etc).
1688
+ * This is a heavy task as it needs a full HTML parser, but it is the only
1689
+ * way to support untrusted content
1690
+ *
1691
+ * ###### Footnotes
1692
+ *
1693
+ * Many options supported here relate to footnotes.
1694
+ * Footnotes are not specified by CommonMark, which we follow by default.
1695
+ * They are supported by GitHub, so footnotes can be enabled in markdown with
1696
+ * `mdast-util-gfm`.
1697
+ *
1698
+ * The options `footnoteBackLabel` and `footnoteLabel` define natural language
1699
+ * that explains footnotes, which is hidden for sighted users but shown to
1700
+ * assistive technology.
1701
+ * When your page is not in English, you must define translated values.
1702
+ *
1703
+ * Back references use ARIA attributes, but the section label itself uses a
1704
+ * heading that is hidden with an `sr-only` class.
1705
+ * To show it to sighted users, define different attributes in
1706
+ * `footnoteLabelProperties`.
1707
+ *
1708
+ * ###### Clobbering
1709
+ *
1710
+ * Footnotes introduces a problem, as it links footnote calls to footnote
1711
+ * definitions on the page through `id` attributes generated from user content,
1712
+ * which results in DOM clobbering.
1713
+ *
1714
+ * DOM clobbering is this:
1715
+ *
1716
+ * ```html
1717
+ * <p id=x></p>
1718
+ * <script>alert(x) // `x` now refers to the DOM `p#x` element<\/script>
1719
+ * ```
1720
+ *
1721
+ * Elements by their ID are made available by browsers on the `window` object,
1722
+ * which is a security risk.
1723
+ * Using a prefix solves this problem.
1724
+ *
1725
+ * More information on how to handle clobbering and the prefix is explained in
1726
+ * Example: headings (DOM clobbering) in `rehype-sanitize`.
1727
+ *
1728
+ * ###### Unknown nodes
1729
+ *
1730
+ * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.
1731
+ * The default behavior for unknown nodes is:
1732
+ *
1733
+ * * when the node has a `value` (and doesn’t have `data.hName`,
1734
+ * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`
1735
+ * node
1736
+ * * otherwise, create a `<div>` element (which could be changed with
1737
+ * `data.hName`), with its children mapped from mdast to hast as well
1738
+ *
1739
+ * This behavior can be changed by passing an `unknownHandler`.
1740
+ *
1741
+ * @param {MdastNodes} tree
1742
+ * mdast tree.
1743
+ * @param {Options | null | undefined} [options]
1744
+ * Configuration (optional).
1745
+ * @returns {HastNodes}
1746
+ * hast tree.
1747
+ */
1748
+ function toHast(tree, options) {
1749
+ const state = createState(tree, options);
1750
+ const node = state.one(tree, void 0);
1751
+ const foot = footer(state);
1752
+ /** @type {HastNodes} */
1753
+ const result = Array.isArray(node) ? {
1754
+ type: "root",
1755
+ children: node
1756
+ } : node || {
1757
+ type: "root",
1758
+ children: []
1759
+ };
1760
+ if (foot) {
1761
+ "children" in result;
1762
+ result.children.push({
1763
+ type: "text",
1764
+ value: "\n"
1765
+ }, foot);
1766
+ }
1767
+ return result;
1768
+ }
1769
+ //#endregion
1770
+ export { toHast as t };