@vite-hub/ui 0.6.1 → 0.8.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 (319) hide show
  1. package/README.md +106 -46
  2. package/dist/AttachmentTitle-BWw0ck0T.js +110 -0
  3. package/dist/BubbleContent-B1a4e3vE.js +45 -0
  4. package/dist/Chat-CuSthJVg.js +112 -0
  5. package/dist/ChatMessage-CFQs0v4N.js +94 -0
  6. package/dist/CodeBlockContent-BjXJm8lO.js +92 -0
  7. package/dist/CodeBlockTitle-DIu8Ef3V.js +99 -0
  8. package/dist/CommentRow-XY3FNp30.js +86 -0
  9. package/dist/CopyButton-Bs6DT-Z8.js +188 -0
  10. package/dist/Markdown-Da5t-931.js +70 -0
  11. package/dist/MarkdownCodeBlock-BWDLOWPO.js +127 -0
  12. package/dist/MarkdownImage-CJN3myt4.js +111 -0
  13. package/dist/MessageHeader-CJ9eBHSS.js +61 -0
  14. package/dist/MessageParts-CyJLG34y.js +57 -0
  15. package/dist/MessageScrollerViewport-BaTlWLki.js +142 -0
  16. package/dist/MorphText-B6MWdeIv.js +36 -0
  17. package/dist/RollNumber-CnF52zJM.js +49 -0
  18. package/dist/SwapIcon-CUIq1TU5.js +67 -0
  19. package/dist/TraceTitle-Cp0y7RRD.js +133 -0
  20. package/dist/agent-session-2j2gbGpp.js +875 -0
  21. package/dist/agent-session-BwZSMi4S.d.ts +312 -0
  22. package/dist/appendItems-hQ4aBd9Q.js +4047 -0
  23. package/dist/attachment-BllgHx9Q.d.ts +124 -0
  24. package/dist/attachment-DQMJNfj0.js +35 -0
  25. package/dist/avatar-stack-Bj1xUkzY.d.ts +4 -0
  26. package/dist/avatar-stack-CoLlsmwJ.js +72 -0
  27. package/dist/bubble-D3M2_InY.js +32 -0
  28. package/dist/bubble-DmplVxLr.d.ts +64 -0
  29. package/dist/chat-DWdyMSuj.d.ts +13 -0
  30. package/dist/chat-message-QLHnX_ED.d.ts +11 -0
  31. package/dist/chat-session-BOj5L3Ey.d.ts +29 -0
  32. package/dist/chat-session-cxUzvwdj.js +43 -0
  33. package/dist/choices-input-DqgXl5a-.d.ts +97 -0
  34. package/dist/{vue-d2Td6uu2.js → client-BG-oCUtv-5i4sRwXP.js} +4156 -4156
  35. package/dist/code-block-BqOEVWPh.d.ts +182 -0
  36. package/dist/code-block-CMERLfew.js +14 -0
  37. package/dist/code-view-26RY6dX8.js +137 -0
  38. package/dist/code-view-D8yYdFUc.d.ts +184 -0
  39. package/dist/{comment-composer-DmDM3XYP.d.ts → comment-composer-CsVOvG9j.d.ts} +6 -6
  40. package/dist/{comment-composer-X7vJKh5b.js → comment-composer-D_mcH3Ts.js} +175 -37
  41. package/dist/{comment-layer-KnnVfdRV.d.ts → comment-layer-C3xmg-0_.d.ts} +14 -5
  42. package/dist/comment-layer-Ci6ipGi2.js +1206 -0
  43. package/dist/{comment-panel-DoLDOw3E.d.ts → comment-panel-DxN21VoY.d.ts} +24 -17
  44. package/dist/comment-selection-bar-B_bchB2O.d.ts +33 -0
  45. package/dist/comment-selection-bar-DZAtiRZ9.js +144 -0
  46. package/dist/{comment-thread-DPV2kqA4.d.ts → comment-thread-BmsqcjVQ.d.ts} +9 -8
  47. package/dist/{comment-thread-jqPx6aJ8.js → comment-thread-BzOZVqF2.js} +74 -49
  48. package/dist/comments-BU8cTt5o.d.ts +50 -0
  49. package/dist/{comments-9MDSNm-9.js → comments-BaSrroRV.js} +32 -4
  50. package/dist/{comments-OWjNidkP.d.ts → comments-ZfV6IZs8.d.ts} +9 -2
  51. package/dist/components-B_2Q0dJ3.js +269 -0
  52. package/dist/{config-LRonN53j.js → config-BDQYUjjp.js} +10 -29
  53. package/dist/{config-COSdO-ay.d.ts → config-JmsTI7gs.d.ts} +20 -33
  54. package/dist/connection-status-BVSH2ZVo.js +72 -0
  55. package/dist/connection-status-g62BTn44.d.ts +37 -0
  56. package/dist/copy-button-CRiXUFsl.d.ts +17 -0
  57. package/dist/device-frame-BW6IjB6P.d.ts +78 -0
  58. package/dist/device-frame-DDWoyB-G.js +515 -0
  59. package/dist/diffs-BTKaVnsb.d.ts +272 -0
  60. package/dist/diffs.d.ts +3 -0
  61. package/dist/{pierre-code-view-C49BVDrc.js → diffs.js} +147 -4223
  62. package/dist/drop-field-C0bXv1J-.d.ts +35 -0
  63. package/dist/drop-field-DeIvKoJs.js +77 -0
  64. package/dist/editor-BsOTjnnN.d.ts +540 -0
  65. package/dist/{markdown-editor-D1irG9Xl.js → editor-hXea1i46.js} +833 -106
  66. package/dist/editor.d.ts +2 -0
  67. package/dist/editor.js +3 -0
  68. package/dist/element-BpjNQvZ0.js +6 -0
  69. package/dist/{file-tree-CRFIdtzw.js → file-tree-B4JKbp4r.js} +19 -18
  70. package/dist/{file-tree-DOtkeBaq.d.ts → file-tree-BdnKA6UA.d.ts} +33 -8
  71. package/dist/file-tree-DDSIafDn.d.ts +22 -0
  72. package/dist/file-tree-DS5shGSL.js +46 -0
  73. package/dist/file-tree.d.ts +2 -0
  74. package/dist/file-tree.js +1 -0
  75. package/dist/files-cuVXzWlx.js +30 -0
  76. package/dist/filter-search-C9e6sGij.d.ts +28 -0
  77. package/dist/filter-search-COZsoRiR.js +73 -0
  78. package/dist/formatCSSVariablePrefix-DLS1Ed1_.js +5 -0
  79. package/dist/headless-2IcUWHMq.d.ts +51 -0
  80. package/dist/headless.d.ts +7 -4
  81. package/dist/headless.js +5 -3
  82. package/dist/highlight.d.ts +2 -0
  83. package/dist/highlight.js +1 -0
  84. package/dist/{highlights-C2AbEdDI.js → highlights-8Al0-h-v.js} +3 -2
  85. package/dist/{hold-to-delete-BSMrpE-i.d.ts → hold-to-delete-CQc1JaG_.d.ts} +7 -0
  86. package/dist/{hold-to-delete-Cludb56v.js → hold-to-delete-D1Vy40w5.js} +138 -20
  87. package/dist/hold-to-delete-DazElJT2.js +85 -0
  88. package/dist/hold-to-delete-ksBE7wxc.d.ts +58 -0
  89. package/dist/index-CffOzibW.d.ts +77 -0
  90. package/dist/{index-B2cbt3py.d.ts → index-D3-uYBqH.d.ts} +1 -1
  91. package/dist/index.d.ts +165 -52
  92. package/dist/index.js +126 -670
  93. package/dist/markdown-BLALLOc0.d.ts +45 -0
  94. package/dist/{parts/components/markdown-renderer.d.ts → markdown-DkDxdpMU.d.ts} +10 -7
  95. package/dist/{markdown-renderer-DMyYKeil.js → markdown-_0HhbsOo.js} +125 -127
  96. package/dist/markdown-editor.d.ts +51 -98
  97. package/dist/markdown-editor.js +70 -3
  98. package/dist/markdown.d.ts +2 -0
  99. package/dist/markdown.js +1 -0
  100. package/dist/marker-CvcWZ3Zp.d.ts +59 -0
  101. package/dist/marker-DNL6QR3L.js +63 -0
  102. package/dist/message-BwivYIEl.js +13 -0
  103. package/dist/message-DEq4K5cQ.d.ts +72 -0
  104. package/dist/message-parts-B1BZFVKe.d.ts +3 -0
  105. package/dist/message-parts-CG3gNWn8.d.ts +11 -0
  106. package/dist/message-parts.d.ts +2 -0
  107. package/dist/message-parts.js +1 -0
  108. package/dist/message-scroller-D7AvM31v.d.ts +41 -0
  109. package/dist/motion/core.d.ts +4 -4
  110. package/dist/motion/core.js +5 -11
  111. package/dist/motion-BH6ShUam.d.ts +12 -0
  112. package/dist/{install-C4LwcJda.js → motion-BhARaNBB.js} +1 -1
  113. package/dist/{effects-C1zYpSpg.js → motion-core-JZZiPKEk.js} +1829 -120
  114. package/dist/{motion-core-Dh20n5Se.d.ts → motion-core-gfsTPLbh.d.ts} +35 -74
  115. package/dist/motion-list-9vD1hSS0.js +49 -0
  116. package/dist/motion.d.ts +5 -14
  117. package/dist/motion.js +6 -13
  118. package/dist/nuxt-ui-D3Qda35W.js +22 -0
  119. package/dist/nuxt.d.ts +9 -5
  120. package/dist/nuxt.js +28 -33
  121. package/dist/parts/components/agent-session.d.ts +2 -295
  122. package/dist/parts/components/agent-session.js +1 -659
  123. package/dist/parts/components/attachment.d.ts +2 -85
  124. package/dist/parts/components/attachment.js +3 -72
  125. package/dist/parts/components/avatar-stack.d.ts +3 -2
  126. package/dist/parts/components/avatar-stack.js +1 -60
  127. package/dist/parts/components/bubble.d.ts +2 -69
  128. package/dist/parts/components/bubble.js +3 -52
  129. package/dist/parts/components/chat-message.d.ts +3 -25
  130. package/dist/parts/components/chat-message.js +1 -50
  131. package/dist/parts/components/chat-session.d.ts +2 -26
  132. package/dist/parts/components/chat-session.js +1 -37
  133. package/dist/parts/components/chat.d.ts +3 -52
  134. package/dist/parts/components/chat.js +1 -105
  135. package/dist/parts/components/code-block.d.ts +2 -102
  136. package/dist/parts/components/code-block.js +4 -109
  137. package/dist/parts/components/code-view.d.ts +3 -268
  138. package/dist/parts/components/code-view.js +1 -1
  139. package/dist/parts/components/comment-composer.d.ts +1 -1
  140. package/dist/parts/components/comment-composer.js +1 -1
  141. package/dist/parts/components/comment-layer.d.ts +1 -1
  142. package/dist/parts/components/comment-layer.js +1 -634
  143. package/dist/parts/components/comment-panel.d.ts +2 -2
  144. package/dist/parts/components/comment-panel.js +22 -16
  145. package/dist/parts/components/comment-selection-bar.d.ts +2 -2
  146. package/dist/parts/components/comment-selection-bar.js +1 -116
  147. package/dist/parts/components/comment-thread.d.ts +1 -1
  148. package/dist/parts/components/comment-thread.js +1 -3
  149. package/dist/parts/components/comments.d.ts +8 -9
  150. package/dist/parts/components/comments.js +5 -9
  151. package/dist/parts/components/connection-status.d.ts +2 -36
  152. package/dist/parts/components/connection-status.js +1 -64
  153. package/dist/parts/components/copy-button.d.ts +3 -126
  154. package/dist/parts/components/copy-button.js +1 -226
  155. package/dist/parts/components/device-frame.d.ts +2 -128
  156. package/dist/parts/components/device-frame.js +1 -470
  157. package/dist/parts/components/drop-field.d.ts +2 -67
  158. package/dist/parts/components/drop-field.js +1 -76
  159. package/dist/parts/components/file-tree.d.ts +3 -2
  160. package/dist/parts/components/file-tree.js +3 -1
  161. package/dist/parts/components/filter-search.d.ts +2 -45
  162. package/dist/parts/components/filter-search.js +1 -57
  163. package/dist/parts/components/hold-to-delete.d.ts +2 -80
  164. package/dist/parts/components/hold-to-delete.js +1 -75
  165. package/dist/parts/components/markdown.d.ts +3 -45
  166. package/dist/parts/components/markdown.js +1 -46
  167. package/dist/parts/components/marker.d.ts +2 -32
  168. package/dist/parts/components/marker.js +1 -22
  169. package/dist/parts/components/message-parts.d.ts +3 -25
  170. package/dist/parts/components/message-parts.js +1 -45
  171. package/dist/parts/components/message.d.ts +2 -32
  172. package/dist/parts/components/message.js +3 -22
  173. package/dist/parts/components/motion-list.d.ts +2 -40
  174. package/dist/parts/components/motion-list.js +1 -41
  175. package/dist/parts/components/motion.d.ts +5 -118
  176. package/dist/parts/components/motion.js +5 -163
  177. package/dist/parts/components/patch-parsers.d.ts +1 -1
  178. package/dist/parts/components/progress.d.ts +2 -39
  179. package/dist/parts/components/progress.js +1 -53
  180. package/dist/parts/components/prompt-input.d.ts +2 -134
  181. package/dist/parts/components/prompt-input.js +1 -253
  182. package/dist/parts/components/relative-time.d.ts +2 -71
  183. package/dist/parts/components/relative-time.js +1 -1
  184. package/dist/parts/components/status.d.ts +2 -58
  185. package/dist/parts/components/status.js +1 -47
  186. package/dist/parts/components/sync-status.d.ts +2 -22
  187. package/dist/parts/components/sync-status.js +1 -48
  188. package/dist/parts/components/tool-list.d.ts +2 -28
  189. package/dist/parts/components/tool-list.js +1 -118
  190. package/dist/parts/components/trace-run.d.ts +2 -25
  191. package/dist/parts/components/trace-run.js +1 -89
  192. package/dist/parts/components/trace.d.ts +2 -59
  193. package/dist/parts/components/trace.js +1 -76
  194. package/dist/parts/composables/attachments.js +75 -1
  195. package/dist/parts/headless/choices-input.d.ts +2 -2
  196. package/dist/parts/headless/choices-input.js +49 -37
  197. package/dist/parts/headless/comments.d.ts +1 -1
  198. package/dist/parts/headless/comments.js +1 -1
  199. package/dist/parts/headless/message-scroller.d.ts +2 -2
  200. package/dist/parts/headless/message-scroller.js +211 -309
  201. package/dist/parts/headless/relative-time.d.ts +2 -0
  202. package/dist/parts/headless/relative-time.js +1 -0
  203. package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
  204. package/dist/parts/workspace/browser-support-notice.js +6 -5
  205. package/dist/parts/workspace/connect-panel.js +1 -1
  206. package/dist/parts/workspace/runners/web-container.js +2 -2
  207. package/dist/parts/workspace/workspace-bar.d.ts +1 -1
  208. package/dist/parts/workspace/workspace-bar.js +1 -1
  209. package/dist/parts/workspace/workspace-boot-status.d.ts +1 -1
  210. package/dist/parts/workspace/workspace-boot-status.js +1 -206
  211. package/dist/parts/workspace/workspace-editor-head.d.ts +1 -1
  212. package/dist/parts/workspace/workspace-editor-head.js +1 -1
  213. package/dist/parts/workspace/workspace-editor.d.ts +2 -2
  214. package/dist/parts/workspace/workspace-examples.js +1 -1
  215. package/dist/parts/workspace/workspace-file-tree.d.ts +1 -1
  216. package/dist/parts/workspace/workspace-file-tree.js +3 -2
  217. package/dist/parts/workspace/workspace-guide.d.ts +1 -1
  218. package/dist/parts/workspace/workspace-guide.js +1 -1
  219. package/dist/parts/workspace/workspace-preview.d.ts +1 -1
  220. package/dist/parts/workspace/workspace-preview.js +14 -12
  221. package/dist/parts/workspace/workspace-shell.d.ts +1 -1
  222. package/dist/parts/workspace/workspace-shell.js +11 -11
  223. package/dist/parts/workspace/workspace-sidebar.d.ts +2 -2
  224. package/dist/parts/workspace/workspace-sidebar.js +2 -2
  225. package/dist/parts/workspace/workspace-start.d.ts +1 -1
  226. package/dist/parts/workspace/workspace-start.js +1 -1
  227. package/dist/parts/workspace/workspace-steps.js +1 -1
  228. package/dist/parts/workspace/workspace.d.ts +3 -3
  229. package/dist/parts/workspace/workspace.js +5 -5
  230. package/dist/press-BuEC-XvZ.d.ts +83 -0
  231. package/dist/progress-8P8RLYMy.js +47 -0
  232. package/dist/progress-Ch0fA-bf.d.ts +8 -0
  233. package/dist/prompt-input-CRXEJBAK.js +412 -0
  234. package/dist/prompt-input-j4OFTF5p.d.ts +116 -0
  235. package/dist/relative-time-BnJfjeEm.js +131 -0
  236. package/dist/relative-time-BuP-Gvzn.d.ts +43 -0
  237. package/dist/{relative-time-DJnw45tr.js → relative-time-Dz2DR4eb.js} +64 -114
  238. package/dist/relative-time-grHFu1kY.d.ts +11 -0
  239. package/dist/{ring-GaJsg32c.js → ring-B0nZBnU0.js} +1 -2
  240. package/dist/runtime/nuxt-plugin.js +2 -5
  241. package/dist/{shiki-CbfEu_Az.js → shiki-CxzM_xNo.js} +3 -2
  242. package/dist/stand-ins-CuKM1UH1.js +339 -0
  243. package/dist/status-B2Yhrwv8.js +67 -0
  244. package/dist/status-ySiRa-8O.d.ts +38 -0
  245. package/dist/{stream-tokenizer-ByC3l0HQ.js → stream-tokenizer-BsjV6wxW.js} +1 -1
  246. package/dist/styles.css +4348 -3410
  247. package/dist/sync-status-B29eG_n-.js +59 -0
  248. package/dist/sync-status-D4KdGO6y.d.ts +35 -0
  249. package/dist/theme.css +3 -0
  250. package/dist/theme.d.ts +14 -0
  251. package/dist/theme.js +19 -8
  252. package/dist/{themes-DKugPHlg.js → themes-B0_ioVT0.js} +1 -1
  253. package/dist/tool-list-DDaCqpR6.js +209 -0
  254. package/dist/tool-list-DMRPM0Yi.d.ts +50 -0
  255. package/dist/trace-KCBvOsw_.d.ts +113 -0
  256. package/dist/trace-run-Dk962P5a.d.ts +49 -0
  257. package/dist/trace-run-nh6FIsl6.js +202 -0
  258. package/dist/{opt-out-D66l60sg.js → tween-1W-LlKk9.js} +65 -2
  259. package/dist/types-CMU8Vmew.d.ts +71 -0
  260. package/dist/types-CTk3aNb5.d.ts +15 -0
  261. package/dist/types-D0a3i4Fw.d.ts +21 -0
  262. package/dist/types-DTecvcsZ.d.ts +35 -0
  263. package/dist/types-D_BWab7g.d.ts +75 -0
  264. package/dist/types-RHaQ4gj1.d.ts +27 -0
  265. package/dist/ui-components-CKQAPI-W.js +7 -0
  266. package/dist/unwrapDefault-CExq-4rm.js +5 -0
  267. package/dist/utils-hi9-xROt.js +37 -0
  268. package/dist/vite.d.ts +0 -1
  269. package/dist/vite.js +8 -14
  270. package/dist/{vue-vUGpdMct.js → vue-BdA18K5-.js} +1 -1
  271. package/dist/workspace-boot-status-CyGlJS06.js +216 -0
  272. package/dist/{workspace-shell-ChCwWPyv.d.ts → workspace-shell-B4A7CINd.d.ts} +1 -1
  273. package/dist/workspace.d.ts +1 -1
  274. package/dist/workspace.js +1 -2
  275. package/package.json +46 -15
  276. package/dist/announce-B0DLwflT.js +0 -31
  277. package/dist/attachments-DgwoQZKY.js +0 -88
  278. package/dist/avatar-stack-C0IKwj6g.d.ts +0 -57
  279. package/dist/choices-input-BUf-QqGj.d.ts +0 -92
  280. package/dist/code-view-Cg4nyTNA.js +0 -172
  281. package/dist/comment-attachments-DAzUbRmJ.js +0 -23
  282. package/dist/comment-list-ncwaCSVX.d.ts +0 -60
  283. package/dist/comment-person-D_IyIjXo.js +0 -39
  284. package/dist/comment-pin-hBJFiSYW.d.ts +0 -66
  285. package/dist/comment-row-DPMWI5Z0.js +0 -38
  286. package/dist/comment-selection-bar-CVuS-FNL.d.ts +0 -40
  287. package/dist/comment-send-CUkL3TbZ.js +0 -275
  288. package/dist/comment-send-MmxFsOQf.d.ts +0 -23
  289. package/dist/comment-send.css +0 -267
  290. package/dist/comment-status-nsCdrRk_.js +0 -20
  291. package/dist/drop-field-CNZgwFVO.js +0 -162
  292. package/dist/editor-Dmk3k6f6.js +0 -620
  293. package/dist/format-CPipR1FP.js +0 -19
  294. package/dist/handlers-CnbkvXjX.js +0 -181
  295. package/dist/icon-XZaCUZTG.d.ts +0 -29
  296. package/dist/image-preview-BKVUtfwQ.js +0 -104
  297. package/dist/index-B_PSX-5h.d.ts +0 -69
  298. package/dist/list-DUTAo0uC.js +0 -270
  299. package/dist/markdown-editor-B7gD60tp.d.ts +0 -189
  300. package/dist/message-scroller-BZqS63IX.d.ts +0 -173
  301. package/dist/nuxt-ui-7ByUrymx.js +0 -43
  302. package/dist/parts/components/comment-list.d.ts +0 -2
  303. package/dist/parts/components/comment-list.js +0 -173
  304. package/dist/parts/components/comment-pin.d.ts +0 -2
  305. package/dist/parts/components/comment-pin.js +0 -74
  306. package/dist/parts/components/comment-send.d.ts +0 -2
  307. package/dist/parts/components/comment-send.js +0 -1
  308. package/dist/parts/components/markdown-editor.d.ts +0 -2
  309. package/dist/parts/components/markdown-editor.js +0 -1
  310. package/dist/parts/components/markdown-renderer.js +0 -1
  311. package/dist/payload-text-DQNRbJY5.js +0 -31
  312. package/dist/progress-DL9k-ERG.js +0 -265
  313. package/dist/registry-DAIjCjWd.js +0 -77
  314. package/dist/slot-part-BWHvQ3mK.js +0 -25
  315. package/dist/text-gacox6bp.js +0 -822
  316. package/dist/travel-BliEidau.js +0 -180
  317. package/dist/tween-Dv3IIIQG.js +0 -61
  318. package/dist/types-Ceh7h7NT.d.ts +0 -31
  319. package/dist/visual-copy-CHHBfJ6O.js +0 -14
@@ -0,0 +1,4047 @@
1
+ import { n as __exportAll } from "./rolldown-runtime-CahUhzF3.js";
2
+ import { t as unwrapDefault } from "./unwrapDefault-CExq-4rm.js";
3
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/highlighter/highlighterType.js
4
+ let activeType;
5
+ let holds = 0;
6
+ var HighlighterDisposedError = class extends Error {
7
+ constructor() {
8
+ super("Highlighter is disposed");
9
+ this.name = "HighlighterDisposedError";
10
+ }
11
+ };
12
+ function getHighlighterType() {
13
+ return activeType;
14
+ }
15
+ function resolveHighlighterType(type) {
16
+ return type ?? activeType ?? "shiki-js";
17
+ }
18
+ function assertHighlighterType(type) {
19
+ if (activeType != null && activeType !== type) throw new Error(`Cannot load the "${type}" highlighter while "${activeType}" is in use. Only one highlighter type can be active at a time; dispose every "${activeType}" instance (disposeHighlighter() disposes the shared one) before switching.`);
20
+ }
21
+ function acquireHighlighterType(type) {
22
+ assertHighlighterType(type);
23
+ activeType = type;
24
+ holds++;
25
+ }
26
+ function releaseHighlighterType() {
27
+ holds--;
28
+ if (holds === 0) activeType = void 0;
29
+ }
30
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/isWorkerContext.js
31
+ function isWorkerContext() {
32
+ return typeof WorkerGlobalScope !== "undefined" && typeof self !== "undefined" && self instanceof WorkerGlobalScope;
33
+ }
34
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/highlighter/themes/createCachedLoader.js
35
+ function createCachedLoader(loader) {
36
+ let cached;
37
+ return () => cached ??= loader().then((loaded) => {
38
+ cached = loaded;
39
+ return loaded;
40
+ }, (error) => {
41
+ cached = void 0;
42
+ throw error;
43
+ });
44
+ }
45
+ // ../../node_modules/.pnpm/@pierre+theming@1.0.2_@pierre+theme@2.1.0_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6_shiki@4.6.0/node_modules/@pierre/theming/dist/modules/createThemeResolver.js
46
+ var DuplicateThemeError = class extends Error {
47
+ constructor(name) {
48
+ super(`Theme "${name}" is already registered`);
49
+ this.name = "DuplicateThemeError";
50
+ }
51
+ };
52
+ var UnregisteredThemeError = class extends Error {
53
+ constructor(name) {
54
+ super(`No loader registered for theme "${name}"`);
55
+ this.name = "UnregisteredThemeError";
56
+ }
57
+ };
58
+ var UnresolvedThemeError = class extends Error {
59
+ constructor(name) {
60
+ super(`Theme "${name}" has not been resolved`);
61
+ this.name = "UnresolvedThemeError";
62
+ }
63
+ };
64
+ function createThemeResolver(options = {}) {
65
+ const loaders = /* @__PURE__ */ new Map();
66
+ const resolved = /* @__PURE__ */ new Map();
67
+ const inflight = /* @__PURE__ */ new Map();
68
+ let cacheGeneration = 0;
69
+ function registerTheme(name, loader) {
70
+ if (loaders.has(name)) throw new DuplicateThemeError(name);
71
+ loaders.set(name, loader);
72
+ }
73
+ function registerThemeIfAbsent(name, loader) {
74
+ if (loaders.has(name)) return false;
75
+ loaders.set(name, loader);
76
+ return true;
77
+ }
78
+ function hasRegisteredTheme(name) {
79
+ return loaders.has(name);
80
+ }
81
+ function resolveTheme(name) {
82
+ const cached = resolved.get(name);
83
+ if (cached !== void 0) return Promise.resolve(cached);
84
+ const existing = inflight.get(name);
85
+ if (existing !== void 0) return existing;
86
+ const loader = loaders.get(name);
87
+ if (loader === void 0 && options.fallbackLoader === void 0) return Promise.reject(new UnregisteredThemeError(name));
88
+ const generation = cacheGeneration;
89
+ const promise = Promise.resolve().then(() => loader !== void 0 ? loader() : options.fallbackLoader?.(name)).then(async (result) => {
90
+ if (result === void 0) throw new UnregisteredThemeError(name);
91
+ const loaded = unwrapDefault(result);
92
+ const theme = options.normalizeTheme === void 0 ? loaded : await options.normalizeTheme(loaded, name);
93
+ if (generation === cacheGeneration) resolved.set(name, theme);
94
+ if (inflight.get(name) === promise) inflight.delete(name);
95
+ return theme;
96
+ }).catch((err) => {
97
+ if (inflight.get(name) === promise) inflight.delete(name);
98
+ throw err;
99
+ });
100
+ inflight.set(name, promise);
101
+ return promise;
102
+ }
103
+ function resolveThemes(names) {
104
+ return Promise.all(names.map((name) => resolveTheme(name)));
105
+ }
106
+ function seedResolvedTheme(name, theme) {
107
+ resolved.set(name, theme);
108
+ }
109
+ function seedResolvedThemes(entries) {
110
+ for (const [name, theme] of entries) seedResolvedTheme(name, theme);
111
+ }
112
+ function getResolvedTheme(name) {
113
+ return resolved.get(name);
114
+ }
115
+ function getResolvedThemes(names) {
116
+ const themes = [];
117
+ for (const name of names) {
118
+ const theme = resolved.get(name);
119
+ if (theme === void 0) throw new UnresolvedThemeError(name);
120
+ themes.push(theme);
121
+ }
122
+ return themes;
123
+ }
124
+ function hasResolvedTheme(name) {
125
+ return resolved.has(name);
126
+ }
127
+ function hasResolvedThemes(names) {
128
+ for (const name of names) if (!resolved.has(name)) return false;
129
+ return true;
130
+ }
131
+ function getResolvedOrResolveTheme(name) {
132
+ const cached = resolved.get(name);
133
+ if (cached !== void 0) return cached;
134
+ return resolveTheme(name);
135
+ }
136
+ function clearResolvedThemes() {
137
+ cacheGeneration++;
138
+ resolved.clear();
139
+ inflight.clear();
140
+ }
141
+ return {
142
+ clearResolvedThemes,
143
+ getResolvedOrResolveTheme,
144
+ getResolvedTheme,
145
+ getResolvedThemes,
146
+ hasRegisteredTheme,
147
+ hasResolvedTheme,
148
+ hasResolvedThemes,
149
+ registerTheme,
150
+ registerThemeIfAbsent,
151
+ resolveTheme,
152
+ resolveThemes,
153
+ seedResolvedTheme,
154
+ seedResolvedThemes
155
+ };
156
+ }
157
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/highlighter/themes/themeResolver.js
158
+ const customThemes = /* @__PURE__ */ new Map();
159
+ const resolvers = /* @__PURE__ */ new Map();
160
+ const loadHighlightsThemeCatalog = createCachedLoader(() => import("./loader-CYMEjzwc.js"));
161
+ const loadPierreThemeCatalog = createCachedLoader(() => import("./themes-B0_ioVT0.js"));
162
+ const loadShikiCore = createCachedLoader(() => import("shiki/core"));
163
+ const ZED_COLOR_ALIASES = [
164
+ ["editor.lineHighlightBackground", "editor.active_line.background"],
165
+ ["editor.selectionBackground", "element.selected"],
166
+ ["editor.findMatchHighlightBackground", "search.match_background"],
167
+ ["editorBracketMatch.background", "editor.document_highlight.bracket_background"],
168
+ ["editorError.foreground", "error"],
169
+ ["editorWarning.foreground", "warning"],
170
+ ["editorInfo.foreground", "info"],
171
+ ["editorHint.foreground", "hint"],
172
+ [
173
+ "gitDecoration.addedResourceForeground",
174
+ "created",
175
+ "terminal.ansi.green"
176
+ ],
177
+ [
178
+ "gitDecoration.deletedResourceForeground",
179
+ "deleted",
180
+ "terminal.ansi.red"
181
+ ],
182
+ [
183
+ "gitDecoration.modifiedResourceForeground",
184
+ "modified",
185
+ "terminal.ansi.blue"
186
+ ]
187
+ ];
188
+ function createHighlightsTheme(name, raw) {
189
+ const theme = "themes" in raw ? raw.themes[0] : raw;
190
+ if (theme == null) throw new Error(`Theme "${name}" is an empty Zed theme family.`);
191
+ const zed = {
192
+ ...theme,
193
+ name
194
+ };
195
+ const colors = {};
196
+ for (const [key, value] of Object.entries(zed.style)) if (typeof value === "string") colors[key] = value;
197
+ const player = zed.style.players?.[0];
198
+ if (player?.cursor != null) colors["editorCursor.foreground"] ??= player.cursor;
199
+ if (player?.selection != null) colors["editor.selectionBackground"] ??= player.selection;
200
+ for (const [target, ...sources] of ZED_COLOR_ALIASES) {
201
+ if (colors[target] != null) continue;
202
+ const source = sources.find((key) => colors[key] != null);
203
+ if (source != null) colors[target] = colors[source];
204
+ }
205
+ if (zed.cssVariables === true) {
206
+ colors["editor.foreground"] = "var(--hls-foreground)";
207
+ colors["editor.background"] = "var(--hls-background)";
208
+ } else if (typeof zed.cssVariables === "object") {
209
+ colors["editor.foreground"] ??= colors.text ?? colors.foreground ?? "foreground";
210
+ colors["editor.background"] ??= colors.background ?? "background";
211
+ const { prefix = "--hls-", defaults } = zed.cssVariables;
212
+ for (const [key, value] of Object.entries(colors)) {
213
+ const fallback = defaults?.[value];
214
+ colors[key] = `var(${prefix}${value}${fallback ? `, ${fallback}` : ""})`;
215
+ }
216
+ }
217
+ const type = zed.appearance === "light" ? "light" : "dark";
218
+ return {
219
+ name,
220
+ type,
221
+ colors,
222
+ zed,
223
+ fg: colors["editor.foreground"] ?? colors.text ?? colors.foreground ?? (type === "light" ? "#333333" : "#bbbbbb"),
224
+ bg: colors["editor.background"] ?? colors.background ?? (type === "light" ? "#ffffff" : "#1e1e1e")
225
+ };
226
+ }
227
+ /** Keep caches separate because the same name can have TextMate and Zed palettes. */
228
+ function createDiffsThemeResolver(backend) {
229
+ let resolver = resolvers.get(backend);
230
+ if (resolver != null) return resolver;
231
+ resolver = createThemeResolver({
232
+ fallbackLoader: async (name) => {
233
+ if (typeof __DIFFS_WORKER__ !== "undefined" ? __DIFFS_WORKER__ : isWorkerContext()) throw new Error(`Theme "${name}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedThemes parameter.`);
234
+ const custom = customThemes.get(name);
235
+ if (backend === "highlights") {
236
+ const loader = custom?.zed ?? custom?.diffs;
237
+ if (loader != null) {
238
+ const loaded = await loader();
239
+ const theme = "default" in loaded ? loaded.default : loaded;
240
+ if ("zed" in theme && theme.zed != null) return theme;
241
+ if ("style" in theme || "themes" in theme) return createHighlightsTheme(name, theme);
242
+ throw new Error(`Theme "${name}" is a TextMate theme; register a Zed theme with registerCustomTheme(name, loader, 'zed') for Highlights.`);
243
+ }
244
+ const catalog = loadHighlightsThemeCatalog();
245
+ const { themes } = catalog instanceof Promise ? await catalog : catalog;
246
+ const bundledLoader = themes[name];
247
+ if (bundledLoader != null) return createHighlightsTheme(name, (await bundledLoader()).default);
248
+ if (custom?.textmate != null) throw new Error(`Theme "${name}" is only registered for TextMate; use registerCustomTheme(name, loader, 'zed') for Highlights.`);
249
+ } else {
250
+ const loader = custom?.textmate ?? custom?.diffs;
251
+ let loaded;
252
+ if (loader != null) {
253
+ const result = await loader();
254
+ loaded = "default" in result ? result.default : result;
255
+ } else {
256
+ const catalog = loadPierreThemeCatalog();
257
+ const { themes } = catalog instanceof Promise ? await catalog : catalog;
258
+ const descriptor = themes.getTheme(name);
259
+ if (descriptor == null && custom?.zed != null) throw new Error(`Theme "${name}" is only registered for Zed; use registerCustomTheme(name, loader, 'textmate') for Shiki.`);
260
+ if (descriptor == null) throw new Error(`No valid theme loader registered for "${name}"`);
261
+ const result = await descriptor.load();
262
+ loaded = "default" in result ? result.default : result;
263
+ }
264
+ if ("style" in loaded || "themes" in loaded) throw new Error(`Theme "${name}" is a Zed theme; use preferredHighlighter: 'highlights' or register a TextMate theme for Shiki.`);
265
+ const core = loadShikiCore();
266
+ const { normalizeTheme, createCssVariablesTheme } = core instanceof Promise ? await core : core;
267
+ if ("cssVariables" in loaded && loaded.cssVariables != null) return {
268
+ ...loaded,
269
+ textmate: normalizeTheme(createCssVariablesTheme(loaded.cssVariables))
270
+ };
271
+ if ("textmate" in loaded && loaded.textmate != null) return {
272
+ ...loaded,
273
+ textmate: normalizeTheme(loaded.textmate)
274
+ };
275
+ const textmate = normalizeTheme(loaded);
276
+ return {
277
+ name: textmate.name,
278
+ type: textmate.type,
279
+ fg: textmate.fg,
280
+ bg: textmate.bg,
281
+ colors: textmate.colors,
282
+ textmate
283
+ };
284
+ }
285
+ throw new Error(`No valid theme loader registered for "${name}"`);
286
+ },
287
+ normalizeTheme: (theme, name) => {
288
+ if (theme.name !== name) throw new Error(`resolvedTheme: themeName: ${name} does not match theme.name: ${theme.name}`);
289
+ return theme;
290
+ }
291
+ });
292
+ resolvers.set(backend, resolver);
293
+ return resolver;
294
+ }
295
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/hast_utils.js
296
+ function createTextNodeElement(value) {
297
+ return {
298
+ type: "text",
299
+ value
300
+ };
301
+ }
302
+ function createHastElement({ tagName, children = [], properties = {} }) {
303
+ return {
304
+ type: "element",
305
+ tagName,
306
+ properties,
307
+ children
308
+ };
309
+ }
310
+ function createIconElement({ name, width = 16, height = 16, properties }) {
311
+ return createHastElement({
312
+ tagName: "svg",
313
+ properties: {
314
+ width,
315
+ height,
316
+ viewBox: "0 0 16 16",
317
+ ...properties
318
+ },
319
+ children: [createHastElement({
320
+ tagName: "use",
321
+ properties: { href: `#${name.replace(/^#/, "")}` }
322
+ })]
323
+ });
324
+ }
325
+ function createGutterWrapper(children) {
326
+ return createHastElement({
327
+ tagName: "div",
328
+ properties: { "data-gutter": "" },
329
+ children
330
+ });
331
+ }
332
+ function createGutterItem(lineType, lineNumber, lineIndex, properties = {}) {
333
+ return createHastElement({
334
+ tagName: "div",
335
+ properties: {
336
+ "data-line-type": lineType,
337
+ "data-column-number": lineNumber,
338
+ "data-line-index": lineIndex,
339
+ ...properties
340
+ },
341
+ children: lineNumber != null ? [createHastElement({
342
+ tagName: "span",
343
+ properties: { "data-line-number-content": "" },
344
+ children: [createTextNodeElement(`${lineNumber}`)]
345
+ })] : void 0
346
+ });
347
+ }
348
+ function createGutterGap(type, bufferType, size) {
349
+ return createHastElement({
350
+ tagName: "div",
351
+ properties: {
352
+ "data-gutter-buffer": bufferType,
353
+ "data-buffer-size": size,
354
+ "data-line-type": bufferType === "annotation" ? void 0 : type,
355
+ style: bufferType === "annotation" ? `grid-row: span ${size};` : `grid-row: span ${size};min-height:calc(${size} * 1lh);`
356
+ }
357
+ });
358
+ }
359
+ function createTokenRow(tokens) {
360
+ return createHastElement({
361
+ tagName: "div",
362
+ children: tokens.map(([char, color, text]) => {
363
+ if (char === 0 && color === "") return text === "" ? createHastElement({ tagName: "br" }) : createTextNodeElement(text);
364
+ return createHastElement({
365
+ tagName: "span",
366
+ properties: {
367
+ "data-char": char,
368
+ style: `color:${color};`
369
+ },
370
+ children: [createTextNodeElement(text)]
371
+ });
372
+ })
373
+ });
374
+ }
375
+ function createPlainRow(lineText) {
376
+ return createHastElement({
377
+ tagName: "div",
378
+ children: lineText === "" ? [createHastElement({ tagName: "br" })] : [createHastElement({
379
+ tagName: "span",
380
+ properties: { "data-char": 0 },
381
+ children: [createTextNodeElement(lineText)]
382
+ })]
383
+ });
384
+ }
385
+ // ../../node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js
386
+ /**
387
+ * List of HTML void tag names.
388
+ *
389
+ * @type {Array<string>}
390
+ */
391
+ const htmlVoidElements = [
392
+ "area",
393
+ "base",
394
+ "basefont",
395
+ "bgsound",
396
+ "br",
397
+ "col",
398
+ "command",
399
+ "embed",
400
+ "frame",
401
+ "hr",
402
+ "image",
403
+ "img",
404
+ "input",
405
+ "keygen",
406
+ "link",
407
+ "meta",
408
+ "param",
409
+ "source",
410
+ "track",
411
+ "wbr"
412
+ ];
413
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/schema.js
414
+ /**
415
+ * @import {Schema as SchemaType, Space} from 'property-information'
416
+ */
417
+ /** @type {SchemaType} */
418
+ var Schema = class {
419
+ /**
420
+ * @param {SchemaType['property']} property
421
+ * Property.
422
+ * @param {SchemaType['normal']} normal
423
+ * Normal.
424
+ * @param {Space | undefined} [space]
425
+ * Space.
426
+ * @returns
427
+ * Schema.
428
+ */
429
+ constructor(property, normal, space) {
430
+ this.normal = normal;
431
+ this.property = property;
432
+ if (space) this.space = space;
433
+ }
434
+ };
435
+ Schema.prototype.normal = {};
436
+ Schema.prototype.property = {};
437
+ Schema.prototype.space = void 0;
438
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/merge.js
439
+ /**
440
+ * @import {Info, Space} from 'property-information'
441
+ */
442
+ /**
443
+ * @param {ReadonlyArray<Schema>} definitions
444
+ * Definitions.
445
+ * @param {Space | undefined} [space]
446
+ * Space.
447
+ * @returns {Schema}
448
+ * Schema.
449
+ */
450
+ function merge(definitions, space) {
451
+ /** @type {Record<string, Info>} */
452
+ const property = {};
453
+ /** @type {Record<string, string>} */
454
+ const normal = {};
455
+ for (const definition of definitions) {
456
+ Object.assign(property, definition.property);
457
+ Object.assign(normal, definition.normal);
458
+ }
459
+ return new Schema(property, normal, space);
460
+ }
461
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/normalize.js
462
+ /**
463
+ * Get the cleaned case insensitive form of an attribute or property.
464
+ *
465
+ * @param {string} value
466
+ * An attribute-like or property-like name.
467
+ * @returns {string}
468
+ * Value that can be used to look up the properly cased property on a
469
+ * `Schema`.
470
+ */
471
+ function normalize(value) {
472
+ return value.toLowerCase();
473
+ }
474
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/info.js
475
+ /**
476
+ * @import {Info as InfoType} from 'property-information'
477
+ */
478
+ /** @type {InfoType} */
479
+ var Info = class {
480
+ /**
481
+ * @param {string} property
482
+ * Property.
483
+ * @param {string} attribute
484
+ * Attribute.
485
+ * @returns
486
+ * Info.
487
+ */
488
+ constructor(property, attribute) {
489
+ this.attribute = attribute;
490
+ this.property = property;
491
+ }
492
+ };
493
+ Info.prototype.attribute = "";
494
+ Info.prototype.booleanish = false;
495
+ Info.prototype.boolean = false;
496
+ Info.prototype.commaOrSpaceSeparated = false;
497
+ Info.prototype.commaSeparated = false;
498
+ Info.prototype.defined = false;
499
+ Info.prototype.mustUseProperty = false;
500
+ Info.prototype.number = false;
501
+ Info.prototype.overloadedBoolean = false;
502
+ Info.prototype.property = "";
503
+ Info.prototype.spaceSeparated = false;
504
+ Info.prototype.space = void 0;
505
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/types.js
506
+ var types_exports = /* @__PURE__ */ __exportAll({
507
+ boolean: () => boolean,
508
+ booleanish: () => booleanish,
509
+ commaOrSpaceSeparated: () => commaOrSpaceSeparated,
510
+ commaSeparated: () => commaSeparated,
511
+ number: () => number,
512
+ overloadedBoolean: () => overloadedBoolean,
513
+ spaceSeparated: () => spaceSeparated
514
+ });
515
+ let powers = 0;
516
+ const boolean = increment();
517
+ const booleanish = increment();
518
+ const overloadedBoolean = increment();
519
+ const number = increment();
520
+ const spaceSeparated = increment();
521
+ const commaSeparated = increment();
522
+ const commaOrSpaceSeparated = increment();
523
+ function increment() {
524
+ return 2 ** ++powers;
525
+ }
526
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/defined-info.js
527
+ /**
528
+ * @import {Space} from 'property-information'
529
+ */
530
+ const checks = Object.keys(types_exports);
531
+ var DefinedInfo = class extends Info {
532
+ /**
533
+ * @constructor
534
+ * @param {string} property
535
+ * Property.
536
+ * @param {string} attribute
537
+ * Attribute.
538
+ * @param {number | null | undefined} [mask]
539
+ * Mask.
540
+ * @param {Space | undefined} [space]
541
+ * Space.
542
+ * @returns
543
+ * Info.
544
+ */
545
+ constructor(property, attribute, mask, space) {
546
+ let index = -1;
547
+ super(property, attribute);
548
+ mark(this, "space", space);
549
+ if (typeof mask === "number") while (++index < checks.length) {
550
+ const check = checks[index];
551
+ mark(this, checks[index], (mask & types_exports[check]) === types_exports[check]);
552
+ }
553
+ }
554
+ };
555
+ DefinedInfo.prototype.defined = true;
556
+ /**
557
+ * @template {keyof DefinedInfo} Key
558
+ * Key type.
559
+ * @param {DefinedInfo} values
560
+ * Info.
561
+ * @param {Key} key
562
+ * Key.
563
+ * @param {DefinedInfo[Key]} value
564
+ * Value.
565
+ * @returns {undefined}
566
+ * Nothing.
567
+ */
568
+ function mark(values, key, value) {
569
+ if (value) values[key] = value;
570
+ }
571
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/create.js
572
+ /**
573
+ * @import {Info, Space} from 'property-information'
574
+ */
575
+ /**
576
+ * @typedef Definition
577
+ * Definition of a schema.
578
+ * @property {Record<string, string> | undefined} [attributes]
579
+ * Normalzed names to special attribute case.
580
+ * @property {ReadonlyArray<string> | undefined} [mustUseProperty]
581
+ * Normalized names that must be set as properties.
582
+ * @property {Record<string, number | null>} properties
583
+ * Property names to their types.
584
+ * @property {Space | undefined} [space]
585
+ * Space.
586
+ * @property {Transform} transform
587
+ * Transform a property name.
588
+ */
589
+ /**
590
+ * @callback Transform
591
+ * Transform.
592
+ * @param {Record<string, string>} attributes
593
+ * Attributes.
594
+ * @param {string} property
595
+ * Property.
596
+ * @returns {string}
597
+ * Attribute.
598
+ */
599
+ /**
600
+ * @param {Definition} definition
601
+ * Definition.
602
+ * @returns {Schema}
603
+ * Schema.
604
+ */
605
+ function create(definition) {
606
+ /** @type {Record<string, Info>} */
607
+ const properties = {};
608
+ /** @type {Record<string, string>} */
609
+ const normals = {};
610
+ for (const [property, value] of Object.entries(definition.properties)) {
611
+ const info = new DefinedInfo(property, definition.transform(definition.attributes || {}, property), value, definition.space);
612
+ if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) info.mustUseProperty = true;
613
+ properties[property] = info;
614
+ normals[normalize(property)] = property;
615
+ normals[normalize(info.attribute)] = property;
616
+ }
617
+ return new Schema(properties, normals, definition.space);
618
+ }
619
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/aria.js
620
+ const aria = create({
621
+ properties: {
622
+ ariaActiveDescendant: null,
623
+ ariaAtomic: booleanish,
624
+ ariaAutoComplete: null,
625
+ ariaBusy: booleanish,
626
+ ariaChecked: booleanish,
627
+ ariaColCount: number,
628
+ ariaColIndex: number,
629
+ ariaColSpan: number,
630
+ ariaControls: spaceSeparated,
631
+ ariaCurrent: null,
632
+ ariaDescribedBy: spaceSeparated,
633
+ ariaDetails: null,
634
+ ariaDisabled: booleanish,
635
+ ariaDropEffect: spaceSeparated,
636
+ ariaErrorMessage: null,
637
+ ariaExpanded: booleanish,
638
+ ariaFlowTo: spaceSeparated,
639
+ ariaGrabbed: booleanish,
640
+ ariaHasPopup: null,
641
+ ariaHidden: booleanish,
642
+ ariaInvalid: null,
643
+ ariaKeyShortcuts: null,
644
+ ariaLabel: null,
645
+ ariaLabelledBy: spaceSeparated,
646
+ ariaLevel: number,
647
+ ariaLive: null,
648
+ ariaModal: booleanish,
649
+ ariaMultiLine: booleanish,
650
+ ariaMultiSelectable: booleanish,
651
+ ariaOrientation: null,
652
+ ariaOwns: spaceSeparated,
653
+ ariaPlaceholder: null,
654
+ ariaPosInSet: number,
655
+ ariaPressed: booleanish,
656
+ ariaReadOnly: booleanish,
657
+ ariaRelevant: null,
658
+ ariaRequired: booleanish,
659
+ ariaRoleDescription: spaceSeparated,
660
+ ariaRowCount: number,
661
+ ariaRowIndex: number,
662
+ ariaRowSpan: number,
663
+ ariaSelected: booleanish,
664
+ ariaSetSize: number,
665
+ ariaSort: null,
666
+ ariaValueMax: number,
667
+ ariaValueMin: number,
668
+ ariaValueNow: number,
669
+ ariaValueText: null,
670
+ role: null
671
+ },
672
+ transform(_, property) {
673
+ return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
674
+ }
675
+ });
676
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/case-sensitive-transform.js
677
+ /**
678
+ * @param {Record<string, string>} attributes
679
+ * Attributes.
680
+ * @param {string} attribute
681
+ * Attribute.
682
+ * @returns {string}
683
+ * Transformed attribute.
684
+ */
685
+ function caseSensitiveTransform(attributes, attribute) {
686
+ return attribute in attributes ? attributes[attribute] : attribute;
687
+ }
688
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/case-insensitive-transform.js
689
+ /**
690
+ * @param {Record<string, string>} attributes
691
+ * Attributes.
692
+ * @param {string} property
693
+ * Property.
694
+ * @returns {string}
695
+ * Transformed property.
696
+ */
697
+ function caseInsensitiveTransform(attributes, property) {
698
+ return caseSensitiveTransform(attributes, property.toLowerCase());
699
+ }
700
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/html.js
701
+ const html$3 = create({
702
+ attributes: {
703
+ acceptcharset: "accept-charset",
704
+ classname: "class",
705
+ htmlfor: "for",
706
+ httpequiv: "http-equiv"
707
+ },
708
+ mustUseProperty: [
709
+ "checked",
710
+ "multiple",
711
+ "muted",
712
+ "selected"
713
+ ],
714
+ properties: {
715
+ abbr: null,
716
+ accept: commaSeparated,
717
+ acceptCharset: spaceSeparated,
718
+ accessKey: spaceSeparated,
719
+ action: null,
720
+ allow: null,
721
+ allowFullScreen: boolean,
722
+ allowPaymentRequest: boolean,
723
+ allowUserMedia: boolean,
724
+ alpha: boolean,
725
+ alt: null,
726
+ as: null,
727
+ async: boolean,
728
+ autoCapitalize: null,
729
+ autoComplete: spaceSeparated,
730
+ autoFocus: boolean,
731
+ autoPlay: boolean,
732
+ blocking: spaceSeparated,
733
+ capture: null,
734
+ charSet: null,
735
+ checked: boolean,
736
+ cite: null,
737
+ className: spaceSeparated,
738
+ closedBy: null,
739
+ colorSpace: null,
740
+ cols: number,
741
+ colSpan: number,
742
+ command: null,
743
+ commandFor: null,
744
+ content: null,
745
+ contentEditable: booleanish,
746
+ controls: boolean,
747
+ controlsList: spaceSeparated,
748
+ coords: number | commaSeparated,
749
+ crossOrigin: null,
750
+ data: null,
751
+ dateTime: null,
752
+ decoding: null,
753
+ default: boolean,
754
+ defer: boolean,
755
+ dir: null,
756
+ dirName: null,
757
+ disabled: boolean,
758
+ download: overloadedBoolean,
759
+ draggable: booleanish,
760
+ encType: null,
761
+ enterKeyHint: null,
762
+ fetchPriority: null,
763
+ form: null,
764
+ formAction: null,
765
+ formEncType: null,
766
+ formMethod: null,
767
+ formNoValidate: boolean,
768
+ formTarget: null,
769
+ headers: spaceSeparated,
770
+ height: number,
771
+ hidden: overloadedBoolean,
772
+ high: number,
773
+ href: null,
774
+ hrefLang: null,
775
+ htmlFor: spaceSeparated,
776
+ httpEquiv: spaceSeparated,
777
+ id: null,
778
+ imageSizes: null,
779
+ imageSrcSet: null,
780
+ inert: boolean,
781
+ inputMode: null,
782
+ integrity: null,
783
+ is: null,
784
+ isMap: boolean,
785
+ itemId: null,
786
+ itemProp: spaceSeparated,
787
+ itemRef: spaceSeparated,
788
+ itemScope: boolean,
789
+ itemType: spaceSeparated,
790
+ kind: null,
791
+ label: null,
792
+ lang: null,
793
+ language: null,
794
+ list: null,
795
+ loading: null,
796
+ loop: boolean,
797
+ low: number,
798
+ manifest: null,
799
+ max: null,
800
+ maxLength: number,
801
+ media: null,
802
+ method: null,
803
+ min: null,
804
+ minLength: number,
805
+ multiple: boolean,
806
+ muted: boolean,
807
+ name: null,
808
+ nonce: null,
809
+ noModule: boolean,
810
+ noValidate: boolean,
811
+ onAbort: null,
812
+ onAfterPrint: null,
813
+ onAuxClick: null,
814
+ onBeforeMatch: null,
815
+ onBeforePrint: null,
816
+ onBeforeToggle: null,
817
+ onBeforeUnload: null,
818
+ onBlur: null,
819
+ onCancel: null,
820
+ onCanPlay: null,
821
+ onCanPlayThrough: null,
822
+ onChange: null,
823
+ onClick: null,
824
+ onClose: null,
825
+ onContextLost: null,
826
+ onContextMenu: null,
827
+ onContextRestored: null,
828
+ onCopy: null,
829
+ onCueChange: null,
830
+ onCut: null,
831
+ onDblClick: null,
832
+ onDrag: null,
833
+ onDragEnd: null,
834
+ onDragEnter: null,
835
+ onDragExit: null,
836
+ onDragLeave: null,
837
+ onDragOver: null,
838
+ onDragStart: null,
839
+ onDrop: null,
840
+ onDurationChange: null,
841
+ onEmptied: null,
842
+ onEnded: null,
843
+ onError: null,
844
+ onFocus: null,
845
+ onFormData: null,
846
+ onHashChange: null,
847
+ onInput: null,
848
+ onInvalid: null,
849
+ onKeyDown: null,
850
+ onKeyPress: null,
851
+ onKeyUp: null,
852
+ onLanguageChange: null,
853
+ onLoad: null,
854
+ onLoadedData: null,
855
+ onLoadedMetadata: null,
856
+ onLoadEnd: null,
857
+ onLoadStart: null,
858
+ onMessage: null,
859
+ onMessageError: null,
860
+ onMouseDown: null,
861
+ onMouseEnter: null,
862
+ onMouseLeave: null,
863
+ onMouseMove: null,
864
+ onMouseOut: null,
865
+ onMouseOver: null,
866
+ onMouseUp: null,
867
+ onOffline: null,
868
+ onOnline: null,
869
+ onPageHide: null,
870
+ onPageShow: null,
871
+ onPaste: null,
872
+ onPause: null,
873
+ onPlay: null,
874
+ onPlaying: null,
875
+ onPopState: null,
876
+ onProgress: null,
877
+ onRateChange: null,
878
+ onRejectionHandled: null,
879
+ onReset: null,
880
+ onResize: null,
881
+ onScroll: null,
882
+ onScrollEnd: null,
883
+ onSecurityPolicyViolation: null,
884
+ onSeeked: null,
885
+ onSeeking: null,
886
+ onSelect: null,
887
+ onSlotChange: null,
888
+ onStalled: null,
889
+ onStorage: null,
890
+ onSubmit: null,
891
+ onSuspend: null,
892
+ onTimeUpdate: null,
893
+ onToggle: null,
894
+ onUnhandledRejection: null,
895
+ onUnload: null,
896
+ onVolumeChange: null,
897
+ onWaiting: null,
898
+ onWheel: null,
899
+ open: boolean,
900
+ optimum: number,
901
+ pattern: null,
902
+ ping: spaceSeparated,
903
+ placeholder: null,
904
+ playsInline: boolean,
905
+ popover: null,
906
+ popoverTarget: null,
907
+ popoverTargetAction: null,
908
+ poster: null,
909
+ preload: null,
910
+ readOnly: boolean,
911
+ referrerPolicy: null,
912
+ rel: spaceSeparated,
913
+ required: boolean,
914
+ reversed: boolean,
915
+ rows: number,
916
+ rowSpan: number,
917
+ sandbox: spaceSeparated,
918
+ scope: null,
919
+ scoped: boolean,
920
+ seamless: boolean,
921
+ selected: boolean,
922
+ shadowRootClonable: boolean,
923
+ shadowRootCustomElementRegistry: boolean,
924
+ shadowRootDelegatesFocus: boolean,
925
+ shadowRootMode: null,
926
+ shadowRootSerializable: boolean,
927
+ shape: null,
928
+ size: number,
929
+ sizes: null,
930
+ slot: null,
931
+ span: number,
932
+ spellCheck: booleanish,
933
+ src: null,
934
+ srcDoc: null,
935
+ srcLang: null,
936
+ srcSet: null,
937
+ start: number,
938
+ step: null,
939
+ style: null,
940
+ tabIndex: number,
941
+ target: null,
942
+ title: null,
943
+ translate: null,
944
+ type: null,
945
+ typeMustMatch: boolean,
946
+ useMap: null,
947
+ value: booleanish,
948
+ width: number,
949
+ wrap: null,
950
+ writingSuggestions: null,
951
+ align: null,
952
+ aLink: null,
953
+ archive: spaceSeparated,
954
+ axis: null,
955
+ background: null,
956
+ bgColor: null,
957
+ border: number,
958
+ borderColor: null,
959
+ bottomMargin: number,
960
+ cellPadding: null,
961
+ cellSpacing: null,
962
+ char: null,
963
+ charOff: null,
964
+ classId: null,
965
+ clear: null,
966
+ code: null,
967
+ codeBase: null,
968
+ codeType: null,
969
+ color: null,
970
+ compact: boolean,
971
+ declare: boolean,
972
+ event: null,
973
+ face: null,
974
+ frame: null,
975
+ frameBorder: null,
976
+ hSpace: number,
977
+ leftMargin: number,
978
+ link: null,
979
+ longDesc: null,
980
+ lowSrc: null,
981
+ marginHeight: number,
982
+ marginWidth: number,
983
+ noResize: boolean,
984
+ noHref: boolean,
985
+ noShade: boolean,
986
+ noWrap: boolean,
987
+ object: null,
988
+ profile: null,
989
+ prompt: null,
990
+ rev: null,
991
+ rightMargin: number,
992
+ rules: null,
993
+ scheme: null,
994
+ scrolling: booleanish,
995
+ standby: null,
996
+ summary: null,
997
+ text: null,
998
+ topMargin: number,
999
+ valueType: null,
1000
+ version: null,
1001
+ vAlign: null,
1002
+ vLink: null,
1003
+ vSpace: number,
1004
+ allowTransparency: null,
1005
+ autoCorrect: null,
1006
+ autoSave: null,
1007
+ credentialless: boolean,
1008
+ disablePictureInPicture: boolean,
1009
+ disableRemotePlayback: boolean,
1010
+ exportParts: commaSeparated,
1011
+ part: spaceSeparated,
1012
+ prefix: null,
1013
+ property: null,
1014
+ results: number,
1015
+ security: null,
1016
+ unselectable: null
1017
+ },
1018
+ space: "html",
1019
+ transform: caseInsensitiveTransform
1020
+ });
1021
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/svg.js
1022
+ const svg$1 = create({
1023
+ attributes: {
1024
+ accentHeight: "accent-height",
1025
+ alignmentBaseline: "alignment-baseline",
1026
+ arabicForm: "arabic-form",
1027
+ baselineShift: "baseline-shift",
1028
+ capHeight: "cap-height",
1029
+ className: "class",
1030
+ clipPath: "clip-path",
1031
+ clipRule: "clip-rule",
1032
+ colorInterpolation: "color-interpolation",
1033
+ colorInterpolationFilters: "color-interpolation-filters",
1034
+ colorProfile: "color-profile",
1035
+ colorRendering: "color-rendering",
1036
+ crossOrigin: "crossorigin",
1037
+ dataType: "datatype",
1038
+ dominantBaseline: "dominant-baseline",
1039
+ enableBackground: "enable-background",
1040
+ fillOpacity: "fill-opacity",
1041
+ fillRule: "fill-rule",
1042
+ floodColor: "flood-color",
1043
+ floodOpacity: "flood-opacity",
1044
+ fontFamily: "font-family",
1045
+ fontSize: "font-size",
1046
+ fontSizeAdjust: "font-size-adjust",
1047
+ fontStretch: "font-stretch",
1048
+ fontStyle: "font-style",
1049
+ fontVariant: "font-variant",
1050
+ fontWeight: "font-weight",
1051
+ glyphName: "glyph-name",
1052
+ glyphOrientationHorizontal: "glyph-orientation-horizontal",
1053
+ glyphOrientationVertical: "glyph-orientation-vertical",
1054
+ hrefLang: "hreflang",
1055
+ horizAdvX: "horiz-adv-x",
1056
+ horizOriginX: "horiz-origin-x",
1057
+ horizOriginY: "horiz-origin-y",
1058
+ imageRendering: "image-rendering",
1059
+ letterSpacing: "letter-spacing",
1060
+ lightingColor: "lighting-color",
1061
+ markerEnd: "marker-end",
1062
+ markerMid: "marker-mid",
1063
+ markerStart: "marker-start",
1064
+ maskType: "mask-type",
1065
+ navDown: "nav-down",
1066
+ navDownLeft: "nav-down-left",
1067
+ navDownRight: "nav-down-right",
1068
+ navLeft: "nav-left",
1069
+ navNext: "nav-next",
1070
+ navPrev: "nav-prev",
1071
+ navRight: "nav-right",
1072
+ navUp: "nav-up",
1073
+ navUpLeft: "nav-up-left",
1074
+ navUpRight: "nav-up-right",
1075
+ onAbort: "onabort",
1076
+ onActivate: "onactivate",
1077
+ onAfterPrint: "onafterprint",
1078
+ onBeforePrint: "onbeforeprint",
1079
+ onBegin: "onbegin",
1080
+ onCancel: "oncancel",
1081
+ onCanPlay: "oncanplay",
1082
+ onCanPlayThrough: "oncanplaythrough",
1083
+ onChange: "onchange",
1084
+ onClick: "onclick",
1085
+ onClose: "onclose",
1086
+ onCopy: "oncopy",
1087
+ onCueChange: "oncuechange",
1088
+ onCut: "oncut",
1089
+ onDblClick: "ondblclick",
1090
+ onDrag: "ondrag",
1091
+ onDragEnd: "ondragend",
1092
+ onDragEnter: "ondragenter",
1093
+ onDragExit: "ondragexit",
1094
+ onDragLeave: "ondragleave",
1095
+ onDragOver: "ondragover",
1096
+ onDragStart: "ondragstart",
1097
+ onDrop: "ondrop",
1098
+ onDurationChange: "ondurationchange",
1099
+ onEmptied: "onemptied",
1100
+ onEnd: "onend",
1101
+ onEnded: "onended",
1102
+ onError: "onerror",
1103
+ onFocus: "onfocus",
1104
+ onFocusIn: "onfocusin",
1105
+ onFocusOut: "onfocusout",
1106
+ onHashChange: "onhashchange",
1107
+ onInput: "oninput",
1108
+ onInvalid: "oninvalid",
1109
+ onKeyDown: "onkeydown",
1110
+ onKeyPress: "onkeypress",
1111
+ onKeyUp: "onkeyup",
1112
+ onLoad: "onload",
1113
+ onLoadedData: "onloadeddata",
1114
+ onLoadedMetadata: "onloadedmetadata",
1115
+ onLoadStart: "onloadstart",
1116
+ onMessage: "onmessage",
1117
+ onMouseDown: "onmousedown",
1118
+ onMouseEnter: "onmouseenter",
1119
+ onMouseLeave: "onmouseleave",
1120
+ onMouseMove: "onmousemove",
1121
+ onMouseOut: "onmouseout",
1122
+ onMouseOver: "onmouseover",
1123
+ onMouseUp: "onmouseup",
1124
+ onMouseWheel: "onmousewheel",
1125
+ onOffline: "onoffline",
1126
+ onOnline: "ononline",
1127
+ onPageHide: "onpagehide",
1128
+ onPageShow: "onpageshow",
1129
+ onPaste: "onpaste",
1130
+ onPause: "onpause",
1131
+ onPlay: "onplay",
1132
+ onPlaying: "onplaying",
1133
+ onPopState: "onpopstate",
1134
+ onProgress: "onprogress",
1135
+ onRateChange: "onratechange",
1136
+ onRepeat: "onrepeat",
1137
+ onReset: "onreset",
1138
+ onResize: "onresize",
1139
+ onScroll: "onscroll",
1140
+ onSeeked: "onseeked",
1141
+ onSeeking: "onseeking",
1142
+ onSelect: "onselect",
1143
+ onShow: "onshow",
1144
+ onStalled: "onstalled",
1145
+ onStorage: "onstorage",
1146
+ onSubmit: "onsubmit",
1147
+ onSuspend: "onsuspend",
1148
+ onTimeUpdate: "ontimeupdate",
1149
+ onToggle: "ontoggle",
1150
+ onUnload: "onunload",
1151
+ onVolumeChange: "onvolumechange",
1152
+ onWaiting: "onwaiting",
1153
+ onZoom: "onzoom",
1154
+ overlinePosition: "overline-position",
1155
+ overlineThickness: "overline-thickness",
1156
+ paintOrder: "paint-order",
1157
+ panose1: "panose-1",
1158
+ pointerEvents: "pointer-events",
1159
+ referrerPolicy: "referrerpolicy",
1160
+ renderingIntent: "rendering-intent",
1161
+ shapeRendering: "shape-rendering",
1162
+ stopColor: "stop-color",
1163
+ stopOpacity: "stop-opacity",
1164
+ strikethroughPosition: "strikethrough-position",
1165
+ strikethroughThickness: "strikethrough-thickness",
1166
+ strokeDashArray: "stroke-dasharray",
1167
+ strokeDashOffset: "stroke-dashoffset",
1168
+ strokeLineCap: "stroke-linecap",
1169
+ strokeLineJoin: "stroke-linejoin",
1170
+ strokeMiterLimit: "stroke-miterlimit",
1171
+ strokeOpacity: "stroke-opacity",
1172
+ strokeWidth: "stroke-width",
1173
+ tabIndex: "tabindex",
1174
+ textAnchor: "text-anchor",
1175
+ textDecoration: "text-decoration",
1176
+ textRendering: "text-rendering",
1177
+ transformOrigin: "transform-origin",
1178
+ typeOf: "typeof",
1179
+ underlinePosition: "underline-position",
1180
+ underlineThickness: "underline-thickness",
1181
+ unicodeBidi: "unicode-bidi",
1182
+ unicodeRange: "unicode-range",
1183
+ unitsPerEm: "units-per-em",
1184
+ vAlphabetic: "v-alphabetic",
1185
+ vHanging: "v-hanging",
1186
+ vIdeographic: "v-ideographic",
1187
+ vMathematical: "v-mathematical",
1188
+ vectorEffect: "vector-effect",
1189
+ vertAdvY: "vert-adv-y",
1190
+ vertOriginX: "vert-origin-x",
1191
+ vertOriginY: "vert-origin-y",
1192
+ wordSpacing: "word-spacing",
1193
+ writingMode: "writing-mode",
1194
+ xHeight: "x-height",
1195
+ playbackOrder: "playbackorder",
1196
+ timelineBegin: "timelinebegin"
1197
+ },
1198
+ properties: {
1199
+ about: commaOrSpaceSeparated,
1200
+ accentHeight: number,
1201
+ accumulate: null,
1202
+ additive: null,
1203
+ alignmentBaseline: null,
1204
+ alphabetic: number,
1205
+ amplitude: number,
1206
+ arabicForm: null,
1207
+ ascent: number,
1208
+ attributeName: null,
1209
+ attributeType: null,
1210
+ azimuth: number,
1211
+ bandwidth: null,
1212
+ baselineShift: null,
1213
+ baseFrequency: null,
1214
+ baseProfile: null,
1215
+ bbox: null,
1216
+ begin: null,
1217
+ bias: number,
1218
+ by: null,
1219
+ calcMode: null,
1220
+ capHeight: number,
1221
+ className: spaceSeparated,
1222
+ clip: null,
1223
+ clipPath: null,
1224
+ clipPathUnits: null,
1225
+ clipRule: null,
1226
+ color: null,
1227
+ colorInterpolation: null,
1228
+ colorInterpolationFilters: null,
1229
+ colorProfile: null,
1230
+ colorRendering: null,
1231
+ content: null,
1232
+ contentScriptType: null,
1233
+ contentStyleType: null,
1234
+ crossOrigin: null,
1235
+ cursor: null,
1236
+ cx: null,
1237
+ cy: null,
1238
+ d: null,
1239
+ dataType: null,
1240
+ defaultAction: null,
1241
+ descent: number,
1242
+ diffuseConstant: number,
1243
+ direction: null,
1244
+ display: null,
1245
+ dur: null,
1246
+ divisor: number,
1247
+ dominantBaseline: null,
1248
+ download: boolean,
1249
+ dx: null,
1250
+ dy: null,
1251
+ edgeMode: null,
1252
+ editable: null,
1253
+ elevation: number,
1254
+ enableBackground: null,
1255
+ end: null,
1256
+ event: null,
1257
+ exponent: number,
1258
+ externalResourcesRequired: null,
1259
+ fill: null,
1260
+ fillOpacity: number,
1261
+ fillRule: null,
1262
+ filter: null,
1263
+ filterRes: null,
1264
+ filterUnits: null,
1265
+ floodColor: null,
1266
+ floodOpacity: null,
1267
+ focusable: null,
1268
+ focusHighlight: null,
1269
+ fontFamily: null,
1270
+ fontSize: null,
1271
+ fontSizeAdjust: null,
1272
+ fontStretch: null,
1273
+ fontStyle: null,
1274
+ fontVariant: null,
1275
+ fontWeight: null,
1276
+ format: null,
1277
+ fr: null,
1278
+ from: null,
1279
+ fx: null,
1280
+ fy: null,
1281
+ g1: commaSeparated,
1282
+ g2: commaSeparated,
1283
+ glyphName: commaSeparated,
1284
+ glyphOrientationHorizontal: null,
1285
+ glyphOrientationVertical: null,
1286
+ glyphRef: null,
1287
+ gradientTransform: null,
1288
+ gradientUnits: null,
1289
+ handler: null,
1290
+ hanging: number,
1291
+ hatchContentUnits: null,
1292
+ hatchUnits: null,
1293
+ height: null,
1294
+ href: null,
1295
+ hrefLang: null,
1296
+ horizAdvX: number,
1297
+ horizOriginX: number,
1298
+ horizOriginY: number,
1299
+ id: null,
1300
+ ideographic: number,
1301
+ imageRendering: null,
1302
+ initialVisibility: null,
1303
+ in: null,
1304
+ in2: null,
1305
+ intercept: number,
1306
+ k: number,
1307
+ k1: number,
1308
+ k2: number,
1309
+ k3: number,
1310
+ k4: number,
1311
+ kernelMatrix: commaOrSpaceSeparated,
1312
+ kernelUnitLength: null,
1313
+ keyPoints: null,
1314
+ keySplines: null,
1315
+ keyTimes: null,
1316
+ kerning: null,
1317
+ lang: null,
1318
+ lengthAdjust: null,
1319
+ letterSpacing: null,
1320
+ lightingColor: null,
1321
+ limitingConeAngle: number,
1322
+ local: null,
1323
+ markerEnd: null,
1324
+ markerMid: null,
1325
+ markerStart: null,
1326
+ markerHeight: null,
1327
+ markerUnits: null,
1328
+ markerWidth: null,
1329
+ mask: null,
1330
+ maskContentUnits: null,
1331
+ maskType: null,
1332
+ maskUnits: null,
1333
+ mathematical: null,
1334
+ max: null,
1335
+ media: null,
1336
+ mediaCharacterEncoding: null,
1337
+ mediaContentEncodings: null,
1338
+ mediaSize: number,
1339
+ mediaTime: null,
1340
+ method: null,
1341
+ min: null,
1342
+ mode: null,
1343
+ name: null,
1344
+ navDown: null,
1345
+ navDownLeft: null,
1346
+ navDownRight: null,
1347
+ navLeft: null,
1348
+ navNext: null,
1349
+ navPrev: null,
1350
+ navRight: null,
1351
+ navUp: null,
1352
+ navUpLeft: null,
1353
+ navUpRight: null,
1354
+ numOctaves: null,
1355
+ observer: null,
1356
+ offset: null,
1357
+ onAbort: null,
1358
+ onActivate: null,
1359
+ onAfterPrint: null,
1360
+ onBeforePrint: null,
1361
+ onBegin: null,
1362
+ onCancel: null,
1363
+ onCanPlay: null,
1364
+ onCanPlayThrough: null,
1365
+ onChange: null,
1366
+ onClick: null,
1367
+ onClose: null,
1368
+ onCopy: null,
1369
+ onCueChange: null,
1370
+ onCut: null,
1371
+ onDblClick: null,
1372
+ onDrag: null,
1373
+ onDragEnd: null,
1374
+ onDragEnter: null,
1375
+ onDragExit: null,
1376
+ onDragLeave: null,
1377
+ onDragOver: null,
1378
+ onDragStart: null,
1379
+ onDrop: null,
1380
+ onDurationChange: null,
1381
+ onEmptied: null,
1382
+ onEnd: null,
1383
+ onEnded: null,
1384
+ onError: null,
1385
+ onFocus: null,
1386
+ onFocusIn: null,
1387
+ onFocusOut: null,
1388
+ onHashChange: null,
1389
+ onInput: null,
1390
+ onInvalid: null,
1391
+ onKeyDown: null,
1392
+ onKeyPress: null,
1393
+ onKeyUp: null,
1394
+ onLoad: null,
1395
+ onLoadedData: null,
1396
+ onLoadedMetadata: null,
1397
+ onLoadStart: null,
1398
+ onMessage: null,
1399
+ onMouseDown: null,
1400
+ onMouseEnter: null,
1401
+ onMouseLeave: null,
1402
+ onMouseMove: null,
1403
+ onMouseOut: null,
1404
+ onMouseOver: null,
1405
+ onMouseUp: null,
1406
+ onMouseWheel: null,
1407
+ onOffline: null,
1408
+ onOnline: null,
1409
+ onPageHide: null,
1410
+ onPageShow: null,
1411
+ onPaste: null,
1412
+ onPause: null,
1413
+ onPlay: null,
1414
+ onPlaying: null,
1415
+ onPopState: null,
1416
+ onProgress: null,
1417
+ onRateChange: null,
1418
+ onRepeat: null,
1419
+ onReset: null,
1420
+ onResize: null,
1421
+ onScroll: null,
1422
+ onSeeked: null,
1423
+ onSeeking: null,
1424
+ onSelect: null,
1425
+ onShow: null,
1426
+ onStalled: null,
1427
+ onStorage: null,
1428
+ onSubmit: null,
1429
+ onSuspend: null,
1430
+ onTimeUpdate: null,
1431
+ onToggle: null,
1432
+ onUnload: null,
1433
+ onVolumeChange: null,
1434
+ onWaiting: null,
1435
+ onZoom: null,
1436
+ opacity: null,
1437
+ operator: null,
1438
+ order: null,
1439
+ orient: null,
1440
+ orientation: null,
1441
+ origin: null,
1442
+ overflow: null,
1443
+ overlay: null,
1444
+ overlinePosition: number,
1445
+ overlineThickness: number,
1446
+ paintOrder: null,
1447
+ panose1: null,
1448
+ path: null,
1449
+ pathLength: number,
1450
+ patternContentUnits: null,
1451
+ patternTransform: null,
1452
+ patternUnits: null,
1453
+ phase: null,
1454
+ ping: spaceSeparated,
1455
+ pitch: null,
1456
+ playbackOrder: null,
1457
+ pointerEvents: null,
1458
+ points: null,
1459
+ pointsAtX: number,
1460
+ pointsAtY: number,
1461
+ pointsAtZ: number,
1462
+ preserveAlpha: null,
1463
+ preserveAspectRatio: null,
1464
+ primitiveUnits: null,
1465
+ propagate: null,
1466
+ property: commaOrSpaceSeparated,
1467
+ r: null,
1468
+ radius: null,
1469
+ referrerPolicy: null,
1470
+ refX: null,
1471
+ refY: null,
1472
+ rel: commaOrSpaceSeparated,
1473
+ rev: commaOrSpaceSeparated,
1474
+ renderingIntent: null,
1475
+ repeatCount: null,
1476
+ repeatDur: null,
1477
+ requiredExtensions: commaOrSpaceSeparated,
1478
+ requiredFeatures: commaOrSpaceSeparated,
1479
+ requiredFonts: commaOrSpaceSeparated,
1480
+ requiredFormats: commaOrSpaceSeparated,
1481
+ resource: null,
1482
+ restart: null,
1483
+ result: null,
1484
+ rotate: null,
1485
+ rx: null,
1486
+ ry: null,
1487
+ scale: null,
1488
+ seed: null,
1489
+ shapeRendering: null,
1490
+ side: null,
1491
+ slope: null,
1492
+ snapshotTime: null,
1493
+ specularConstant: number,
1494
+ specularExponent: number,
1495
+ spreadMethod: null,
1496
+ spacing: null,
1497
+ startOffset: null,
1498
+ stdDeviation: null,
1499
+ stemh: null,
1500
+ stemv: null,
1501
+ stitchTiles: null,
1502
+ stopColor: null,
1503
+ stopOpacity: null,
1504
+ strikethroughPosition: number,
1505
+ strikethroughThickness: number,
1506
+ string: null,
1507
+ stroke: null,
1508
+ strokeDashArray: commaOrSpaceSeparated,
1509
+ strokeDashOffset: null,
1510
+ strokeLineCap: null,
1511
+ strokeLineJoin: null,
1512
+ strokeMiterLimit: number,
1513
+ strokeOpacity: number,
1514
+ strokeWidth: null,
1515
+ style: null,
1516
+ surfaceScale: number,
1517
+ syncBehavior: null,
1518
+ syncBehaviorDefault: null,
1519
+ syncMaster: null,
1520
+ syncTolerance: null,
1521
+ syncToleranceDefault: null,
1522
+ systemLanguage: commaOrSpaceSeparated,
1523
+ tabIndex: number,
1524
+ tableValues: null,
1525
+ target: null,
1526
+ targetX: number,
1527
+ targetY: number,
1528
+ textAnchor: null,
1529
+ textDecoration: null,
1530
+ textRendering: null,
1531
+ textLength: null,
1532
+ timelineBegin: null,
1533
+ title: null,
1534
+ transformBehavior: null,
1535
+ type: null,
1536
+ typeOf: commaOrSpaceSeparated,
1537
+ to: null,
1538
+ transform: null,
1539
+ transformOrigin: null,
1540
+ u1: null,
1541
+ u2: null,
1542
+ underlinePosition: number,
1543
+ underlineThickness: number,
1544
+ unicode: null,
1545
+ unicodeBidi: null,
1546
+ unicodeRange: null,
1547
+ unitsPerEm: number,
1548
+ values: null,
1549
+ vAlphabetic: number,
1550
+ vMathematical: number,
1551
+ vectorEffect: null,
1552
+ vHanging: number,
1553
+ vIdeographic: number,
1554
+ version: null,
1555
+ vertAdvY: number,
1556
+ vertOriginX: number,
1557
+ vertOriginY: number,
1558
+ viewBox: null,
1559
+ viewTarget: null,
1560
+ visibility: null,
1561
+ width: null,
1562
+ widths: null,
1563
+ wordSpacing: null,
1564
+ writingMode: null,
1565
+ x: null,
1566
+ x1: null,
1567
+ x2: null,
1568
+ xChannelSelector: null,
1569
+ xHeight: number,
1570
+ y: null,
1571
+ y1: null,
1572
+ y2: null,
1573
+ yChannelSelector: null,
1574
+ z: null,
1575
+ zoomAndPan: null
1576
+ },
1577
+ space: "svg",
1578
+ transform: caseSensitiveTransform
1579
+ });
1580
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/xlink.js
1581
+ const xlink = create({
1582
+ properties: {
1583
+ xLinkActuate: null,
1584
+ xLinkArcRole: null,
1585
+ xLinkHref: null,
1586
+ xLinkRole: null,
1587
+ xLinkShow: null,
1588
+ xLinkTitle: null,
1589
+ xLinkType: null
1590
+ },
1591
+ space: "xlink",
1592
+ transform(_, property) {
1593
+ return "xlink:" + property.slice(5).toLowerCase();
1594
+ }
1595
+ });
1596
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/xmlns.js
1597
+ const xmlns = create({
1598
+ attributes: { xmlnsxlink: "xmlns:xlink" },
1599
+ properties: {
1600
+ xmlnsXLink: null,
1601
+ xmlns: null
1602
+ },
1603
+ space: "xmlns",
1604
+ transform: caseInsensitiveTransform
1605
+ });
1606
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/xml.js
1607
+ const xml = create({
1608
+ properties: {
1609
+ xmlBase: null,
1610
+ xmlLang: null,
1611
+ xmlSpace: null
1612
+ },
1613
+ space: "xml",
1614
+ transform(_, property) {
1615
+ return "xml:" + property.slice(3).toLowerCase();
1616
+ }
1617
+ });
1618
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/find.js
1619
+ /**
1620
+ * @import {Schema} from 'property-information'
1621
+ */
1622
+ const cap = /[A-Z]/g;
1623
+ const dash = /-[a-z]/g;
1624
+ const valid = /^data[-\w.:]+$/i;
1625
+ /**
1626
+ * Look up info on a property.
1627
+ *
1628
+ * In most cases the given `schema` contains info on the property.
1629
+ * All standard,
1630
+ * most legacy,
1631
+ * and some non-standard properties are supported.
1632
+ * For these cases,
1633
+ * the returned `Info` has hints about the value of the property.
1634
+ *
1635
+ * `name` can also be a valid data attribute or property,
1636
+ * in which case an `Info` object with the correctly cased `attribute` and
1637
+ * `property` is returned.
1638
+ *
1639
+ * `name` can be an unknown attribute,
1640
+ * in which case an `Info` object with `attribute` and `property` set to the
1641
+ * given name is returned.
1642
+ * It is not recommended to provide unsupported legacy or recently specced
1643
+ * properties.
1644
+ *
1645
+ *
1646
+ * @param {Schema} schema
1647
+ * Schema;
1648
+ * either the `html` or `svg` export.
1649
+ * @param {string} value
1650
+ * An attribute-like or property-like name;
1651
+ * it will be passed through `normalize` to hopefully find the correct info.
1652
+ * @returns {Info}
1653
+ * Info.
1654
+ */
1655
+ function find(schema, value) {
1656
+ const normal = normalize(value);
1657
+ let property = value;
1658
+ let Type = Info;
1659
+ if (normal in schema.normal) return schema.property[schema.normal[normal]];
1660
+ if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
1661
+ if (value.charAt(4) === "-") {
1662
+ const rest = value.slice(5).replace(dash, camelcase);
1663
+ property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
1664
+ } else {
1665
+ const rest = value.slice(4);
1666
+ if (!dash.test(rest)) {
1667
+ let dashes = rest.replace(cap, kebab);
1668
+ if (dashes.charAt(0) !== "-") dashes = "-" + dashes;
1669
+ value = "data" + dashes;
1670
+ }
1671
+ }
1672
+ Type = DefinedInfo;
1673
+ }
1674
+ return new Type(property, value);
1675
+ }
1676
+ /**
1677
+ * @param {string} $0
1678
+ * Value.
1679
+ * @returns {string}
1680
+ * Kebab.
1681
+ */
1682
+ function kebab($0) {
1683
+ return "-" + $0.toLowerCase();
1684
+ }
1685
+ /**
1686
+ * @param {string} $0
1687
+ * Value.
1688
+ * @returns {string}
1689
+ * Camel.
1690
+ */
1691
+ function camelcase($0) {
1692
+ return $0.charAt(1).toUpperCase();
1693
+ }
1694
+ // ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/index.js
1695
+ const html$2 = merge([
1696
+ aria,
1697
+ html$3,
1698
+ xlink,
1699
+ xmlns,
1700
+ xml
1701
+ ], "html");
1702
+ const svg = merge([
1703
+ aria,
1704
+ svg$1,
1705
+ xlink,
1706
+ xmlns,
1707
+ xml
1708
+ ], "svg");
1709
+ // ../../node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js
1710
+ /**
1711
+ * @callback Handler
1712
+ * Handle a value, with a certain ID field set to a certain value.
1713
+ * The ID field is passed to `zwitch`, and it’s value is this function’s
1714
+ * place on the `handlers` record.
1715
+ * @param {...any} parameters
1716
+ * Arbitrary parameters passed to the zwitch.
1717
+ * The first will be an object with a certain ID field set to a certain value.
1718
+ * @returns {any}
1719
+ * Anything!
1720
+ */
1721
+ /**
1722
+ * @callback UnknownHandler
1723
+ * Handle values that do have a certain ID field, but it’s set to a value
1724
+ * that is not listed in the `handlers` record.
1725
+ * @param {unknown} value
1726
+ * An object with a certain ID field set to an unknown value.
1727
+ * @param {...any} rest
1728
+ * Arbitrary parameters passed to the zwitch.
1729
+ * @returns {any}
1730
+ * Anything!
1731
+ */
1732
+ /**
1733
+ * @callback InvalidHandler
1734
+ * Handle values that do not have a certain ID field.
1735
+ * @param {unknown} value
1736
+ * Any unknown value.
1737
+ * @param {...any} rest
1738
+ * Arbitrary parameters passed to the zwitch.
1739
+ * @returns {void|null|undefined|never}
1740
+ * This should crash or return nothing.
1741
+ */
1742
+ /**
1743
+ * @template {InvalidHandler} [Invalid=InvalidHandler]
1744
+ * @template {UnknownHandler} [Unknown=UnknownHandler]
1745
+ * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]
1746
+ * @typedef Options
1747
+ * Configuration (required).
1748
+ * @property {Invalid} [invalid]
1749
+ * Handler to use for invalid values.
1750
+ * @property {Unknown} [unknown]
1751
+ * Handler to use for unknown values.
1752
+ * @property {Handlers} [handlers]
1753
+ * Handlers to use.
1754
+ */
1755
+ const own$2 = {}.hasOwnProperty;
1756
+ /**
1757
+ * Handle values based on a field.
1758
+ *
1759
+ * @template {InvalidHandler} [Invalid=InvalidHandler]
1760
+ * @template {UnknownHandler} [Unknown=UnknownHandler]
1761
+ * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]
1762
+ * @param {string} key
1763
+ * Field to switch on.
1764
+ * @param {Options<Invalid, Unknown, Handlers>} [options]
1765
+ * Configuration (required).
1766
+ * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}
1767
+ */
1768
+ function zwitch(key, options) {
1769
+ const settings = options || {};
1770
+ /**
1771
+ * Handle one value.
1772
+ *
1773
+ * Based on the bound `key`, a respective handler will be called.
1774
+ * If `value` is not an object, or doesn’t have a `key` property, the special
1775
+ * “invalid” handler will be called.
1776
+ * If `value` has an unknown `key`, the special “unknown” handler will be
1777
+ * called.
1778
+ *
1779
+ * All arguments, and the context object, are passed through to the handler,
1780
+ * and it’s result is returned.
1781
+ *
1782
+ * @this {unknown}
1783
+ * Any context object.
1784
+ * @param {unknown} [value]
1785
+ * Any value.
1786
+ * @param {...unknown} parameters
1787
+ * Arbitrary parameters passed to the zwitch.
1788
+ * @property {Handler} invalid
1789
+ * Handle for values that do not have a certain ID field.
1790
+ * @property {Handler} unknown
1791
+ * Handle values that do have a certain ID field, but it’s set to a value
1792
+ * that is not listed in the `handlers` record.
1793
+ * @property {Handlers} handlers
1794
+ * Record of handlers.
1795
+ * @returns {unknown}
1796
+ * Anything.
1797
+ */
1798
+ function one(value, ...parameters) {
1799
+ /** @type {Handler|undefined} */
1800
+ let fn = one.invalid;
1801
+ const handlers = one.handlers;
1802
+ if (value && own$2.call(value, key)) {
1803
+ const id = String(value[key]);
1804
+ fn = own$2.call(handlers, id) ? handlers[id] : one.unknown;
1805
+ }
1806
+ if (fn) return fn.call(this, value, ...parameters);
1807
+ }
1808
+ one.handlers = settings.handlers || {};
1809
+ one.invalid = settings.invalid;
1810
+ one.unknown = settings.unknown;
1811
+ return one;
1812
+ }
1813
+ // ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js
1814
+ /**
1815
+ * @typedef CoreOptions
1816
+ * @property {ReadonlyArray<string>} [subset=[]]
1817
+ * Whether to only escape the given subset of characters.
1818
+ * @property {boolean} [escapeOnly=false]
1819
+ * Whether to only escape possibly dangerous characters.
1820
+ * Those characters are `"`, `&`, `'`, `<`, `>`, and `` ` ``.
1821
+ *
1822
+ * @typedef FormatOptions
1823
+ * @property {(code: number, next: number, options: CoreWithFormatOptions) => string} format
1824
+ * Format strategy.
1825
+ *
1826
+ * @typedef {CoreOptions & FormatOptions & import('./util/format-smart.js').FormatSmartOptions} CoreWithFormatOptions
1827
+ */
1828
+ const defaultSubsetRegex = /["&'<>`]/g;
1829
+ const surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
1830
+ const controlCharactersRegex = /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
1831
+ const regexEscapeRegex = /[|\\{}()[\]^$+*?.]/g;
1832
+ /** @type {WeakMap<ReadonlyArray<string>, RegExp>} */
1833
+ const subsetToRegexCache = /* @__PURE__ */ new WeakMap();
1834
+ /**
1835
+ * Encode certain characters in `value`.
1836
+ *
1837
+ * @param {string} value
1838
+ * @param {CoreWithFormatOptions} options
1839
+ * @returns {string}
1840
+ */
1841
+ function core(value, options) {
1842
+ value = value.replace(options.subset ? charactersToExpressionCached(options.subset) : defaultSubsetRegex, basic);
1843
+ if (options.subset || options.escapeOnly) return value;
1844
+ return value.replace(surrogatePairsRegex, surrogate).replace(controlCharactersRegex, basic);
1845
+ /**
1846
+ * @param {string} pair
1847
+ * @param {number} index
1848
+ * @param {string} all
1849
+ */
1850
+ function surrogate(pair, index, all) {
1851
+ return options.format((pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536, all.charCodeAt(index + 2), options);
1852
+ }
1853
+ /**
1854
+ * @param {string} character
1855
+ * @param {number} index
1856
+ * @param {string} all
1857
+ */
1858
+ function basic(character, index, all) {
1859
+ return options.format(character.charCodeAt(0), all.charCodeAt(index + 1), options);
1860
+ }
1861
+ }
1862
+ /**
1863
+ * A wrapper function that caches the result of `charactersToExpression` with a WeakMap.
1864
+ * This can improve performance when tooling calls `charactersToExpression` repeatedly
1865
+ * with the same subset.
1866
+ *
1867
+ * @param {ReadonlyArray<string>} subset
1868
+ * @returns {RegExp}
1869
+ */
1870
+ function charactersToExpressionCached(subset) {
1871
+ let cached = subsetToRegexCache.get(subset);
1872
+ if (!cached) {
1873
+ cached = charactersToExpression(subset);
1874
+ subsetToRegexCache.set(subset, cached);
1875
+ }
1876
+ return cached;
1877
+ }
1878
+ /**
1879
+ * @param {ReadonlyArray<string>} subset
1880
+ * @returns {RegExp}
1881
+ */
1882
+ function charactersToExpression(subset) {
1883
+ /** @type {Array<string>} */
1884
+ const groups = [];
1885
+ let index = -1;
1886
+ while (++index < subset.length) groups.push(subset[index].replace(regexEscapeRegex, "\\$&"));
1887
+ return new RegExp("(?:" + groups.join("|") + ")", "g");
1888
+ }
1889
+ // ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js
1890
+ const hexadecimalRegex = /[\dA-Fa-f]/;
1891
+ /**
1892
+ * Configurable ways to encode characters as hexadecimal references.
1893
+ *
1894
+ * @param {number} code
1895
+ * @param {number} next
1896
+ * @param {boolean|undefined} omit
1897
+ * @returns {string}
1898
+ */
1899
+ function toHexadecimal(code, next, omit) {
1900
+ const value = "&#x" + code.toString(16).toUpperCase();
1901
+ return omit && next && !hexadecimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
1902
+ }
1903
+ // ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js
1904
+ const decimalRegex = /\d/;
1905
+ /**
1906
+ * Configurable ways to encode characters as decimal references.
1907
+ *
1908
+ * @param {number} code
1909
+ * @param {number} next
1910
+ * @param {boolean|undefined} omit
1911
+ * @returns {string}
1912
+ */
1913
+ function toDecimal(code, next, omit) {
1914
+ const value = "&#" + String(code);
1915
+ return omit && next && !decimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
1916
+ }
1917
+ // ../../node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js
1918
+ /**
1919
+ * List of legacy HTML named character references that don’t need a trailing semicolon.
1920
+ *
1921
+ * @type {Array<string>}
1922
+ */
1923
+ const characterEntitiesLegacy = [
1924
+ "AElig",
1925
+ "AMP",
1926
+ "Aacute",
1927
+ "Acirc",
1928
+ "Agrave",
1929
+ "Aring",
1930
+ "Atilde",
1931
+ "Auml",
1932
+ "COPY",
1933
+ "Ccedil",
1934
+ "ETH",
1935
+ "Eacute",
1936
+ "Ecirc",
1937
+ "Egrave",
1938
+ "Euml",
1939
+ "GT",
1940
+ "Iacute",
1941
+ "Icirc",
1942
+ "Igrave",
1943
+ "Iuml",
1944
+ "LT",
1945
+ "Ntilde",
1946
+ "Oacute",
1947
+ "Ocirc",
1948
+ "Ograve",
1949
+ "Oslash",
1950
+ "Otilde",
1951
+ "Ouml",
1952
+ "QUOT",
1953
+ "REG",
1954
+ "THORN",
1955
+ "Uacute",
1956
+ "Ucirc",
1957
+ "Ugrave",
1958
+ "Uuml",
1959
+ "Yacute",
1960
+ "aacute",
1961
+ "acirc",
1962
+ "acute",
1963
+ "aelig",
1964
+ "agrave",
1965
+ "amp",
1966
+ "aring",
1967
+ "atilde",
1968
+ "auml",
1969
+ "brvbar",
1970
+ "ccedil",
1971
+ "cedil",
1972
+ "cent",
1973
+ "copy",
1974
+ "curren",
1975
+ "deg",
1976
+ "divide",
1977
+ "eacute",
1978
+ "ecirc",
1979
+ "egrave",
1980
+ "eth",
1981
+ "euml",
1982
+ "frac12",
1983
+ "frac14",
1984
+ "frac34",
1985
+ "gt",
1986
+ "iacute",
1987
+ "icirc",
1988
+ "iexcl",
1989
+ "igrave",
1990
+ "iquest",
1991
+ "iuml",
1992
+ "laquo",
1993
+ "lt",
1994
+ "macr",
1995
+ "micro",
1996
+ "middot",
1997
+ "nbsp",
1998
+ "not",
1999
+ "ntilde",
2000
+ "oacute",
2001
+ "ocirc",
2002
+ "ograve",
2003
+ "ordf",
2004
+ "ordm",
2005
+ "oslash",
2006
+ "otilde",
2007
+ "ouml",
2008
+ "para",
2009
+ "plusmn",
2010
+ "pound",
2011
+ "quot",
2012
+ "raquo",
2013
+ "reg",
2014
+ "sect",
2015
+ "shy",
2016
+ "sup1",
2017
+ "sup2",
2018
+ "sup3",
2019
+ "szlig",
2020
+ "thorn",
2021
+ "times",
2022
+ "uacute",
2023
+ "ucirc",
2024
+ "ugrave",
2025
+ "uml",
2026
+ "uuml",
2027
+ "yacute",
2028
+ "yen",
2029
+ "yuml"
2030
+ ];
2031
+ // ../../node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.js
2032
+ /**
2033
+ * Map of named character references from HTML 4.
2034
+ *
2035
+ * @type {Record<string, string>}
2036
+ */
2037
+ const characterEntitiesHtml4 = {
2038
+ nbsp: "\xA0",
2039
+ iexcl: "¡",
2040
+ cent: "¢",
2041
+ pound: "£",
2042
+ curren: "¤",
2043
+ yen: "¥",
2044
+ brvbar: "¦",
2045
+ sect: "§",
2046
+ uml: "¨",
2047
+ copy: "©",
2048
+ ordf: "ª",
2049
+ laquo: "«",
2050
+ not: "¬",
2051
+ shy: "­",
2052
+ reg: "®",
2053
+ macr: "¯",
2054
+ deg: "°",
2055
+ plusmn: "±",
2056
+ sup2: "²",
2057
+ sup3: "³",
2058
+ acute: "´",
2059
+ micro: "µ",
2060
+ para: "¶",
2061
+ middot: "·",
2062
+ cedil: "¸",
2063
+ sup1: "¹",
2064
+ ordm: "º",
2065
+ raquo: "»",
2066
+ frac14: "¼",
2067
+ frac12: "½",
2068
+ frac34: "¾",
2069
+ iquest: "¿",
2070
+ Agrave: "À",
2071
+ Aacute: "Á",
2072
+ Acirc: "Â",
2073
+ Atilde: "Ã",
2074
+ Auml: "Ä",
2075
+ Aring: "Å",
2076
+ AElig: "Æ",
2077
+ Ccedil: "Ç",
2078
+ Egrave: "È",
2079
+ Eacute: "É",
2080
+ Ecirc: "Ê",
2081
+ Euml: "Ë",
2082
+ Igrave: "Ì",
2083
+ Iacute: "Í",
2084
+ Icirc: "Î",
2085
+ Iuml: "Ï",
2086
+ ETH: "Ð",
2087
+ Ntilde: "Ñ",
2088
+ Ograve: "Ò",
2089
+ Oacute: "Ó",
2090
+ Ocirc: "Ô",
2091
+ Otilde: "Õ",
2092
+ Ouml: "Ö",
2093
+ times: "×",
2094
+ Oslash: "Ø",
2095
+ Ugrave: "Ù",
2096
+ Uacute: "Ú",
2097
+ Ucirc: "Û",
2098
+ Uuml: "Ü",
2099
+ Yacute: "Ý",
2100
+ THORN: "Þ",
2101
+ szlig: "ß",
2102
+ agrave: "à",
2103
+ aacute: "á",
2104
+ acirc: "â",
2105
+ atilde: "ã",
2106
+ auml: "ä",
2107
+ aring: "å",
2108
+ aelig: "æ",
2109
+ ccedil: "ç",
2110
+ egrave: "è",
2111
+ eacute: "é",
2112
+ ecirc: "ê",
2113
+ euml: "ë",
2114
+ igrave: "ì",
2115
+ iacute: "í",
2116
+ icirc: "î",
2117
+ iuml: "ï",
2118
+ eth: "ð",
2119
+ ntilde: "ñ",
2120
+ ograve: "ò",
2121
+ oacute: "ó",
2122
+ ocirc: "ô",
2123
+ otilde: "õ",
2124
+ ouml: "ö",
2125
+ divide: "÷",
2126
+ oslash: "ø",
2127
+ ugrave: "ù",
2128
+ uacute: "ú",
2129
+ ucirc: "û",
2130
+ uuml: "ü",
2131
+ yacute: "ý",
2132
+ thorn: "þ",
2133
+ yuml: "ÿ",
2134
+ fnof: "ƒ",
2135
+ Alpha: "Α",
2136
+ Beta: "Β",
2137
+ Gamma: "Γ",
2138
+ Delta: "Δ",
2139
+ Epsilon: "Ε",
2140
+ Zeta: "Ζ",
2141
+ Eta: "Η",
2142
+ Theta: "Θ",
2143
+ Iota: "Ι",
2144
+ Kappa: "Κ",
2145
+ Lambda: "Λ",
2146
+ Mu: "Μ",
2147
+ Nu: "Ν",
2148
+ Xi: "Ξ",
2149
+ Omicron: "Ο",
2150
+ Pi: "Π",
2151
+ Rho: "Ρ",
2152
+ Sigma: "Σ",
2153
+ Tau: "Τ",
2154
+ Upsilon: "Υ",
2155
+ Phi: "Φ",
2156
+ Chi: "Χ",
2157
+ Psi: "Ψ",
2158
+ Omega: "Ω",
2159
+ alpha: "α",
2160
+ beta: "β",
2161
+ gamma: "γ",
2162
+ delta: "δ",
2163
+ epsilon: "ε",
2164
+ zeta: "ζ",
2165
+ eta: "η",
2166
+ theta: "θ",
2167
+ iota: "ι",
2168
+ kappa: "κ",
2169
+ lambda: "λ",
2170
+ mu: "μ",
2171
+ nu: "ν",
2172
+ xi: "ξ",
2173
+ omicron: "ο",
2174
+ pi: "π",
2175
+ rho: "ρ",
2176
+ sigmaf: "ς",
2177
+ sigma: "σ",
2178
+ tau: "τ",
2179
+ upsilon: "υ",
2180
+ phi: "φ",
2181
+ chi: "χ",
2182
+ psi: "ψ",
2183
+ omega: "ω",
2184
+ thetasym: "ϑ",
2185
+ upsih: "ϒ",
2186
+ piv: "ϖ",
2187
+ bull: "•",
2188
+ hellip: "…",
2189
+ prime: "′",
2190
+ Prime: "″",
2191
+ oline: "‾",
2192
+ frasl: "⁄",
2193
+ weierp: "℘",
2194
+ image: "ℑ",
2195
+ real: "ℜ",
2196
+ trade: "™",
2197
+ alefsym: "ℵ",
2198
+ larr: "←",
2199
+ uarr: "↑",
2200
+ rarr: "→",
2201
+ darr: "↓",
2202
+ harr: "↔",
2203
+ crarr: "↵",
2204
+ lArr: "⇐",
2205
+ uArr: "⇑",
2206
+ rArr: "⇒",
2207
+ dArr: "⇓",
2208
+ hArr: "⇔",
2209
+ forall: "∀",
2210
+ part: "∂",
2211
+ exist: "∃",
2212
+ empty: "∅",
2213
+ nabla: "∇",
2214
+ isin: "∈",
2215
+ notin: "∉",
2216
+ ni: "∋",
2217
+ prod: "∏",
2218
+ sum: "∑",
2219
+ minus: "−",
2220
+ lowast: "∗",
2221
+ radic: "√",
2222
+ prop: "∝",
2223
+ infin: "∞",
2224
+ ang: "∠",
2225
+ and: "∧",
2226
+ or: "∨",
2227
+ cap: "∩",
2228
+ cup: "∪",
2229
+ int: "∫",
2230
+ there4: "∴",
2231
+ sim: "∼",
2232
+ cong: "≅",
2233
+ asymp: "≈",
2234
+ ne: "≠",
2235
+ equiv: "≡",
2236
+ le: "≤",
2237
+ ge: "≥",
2238
+ sub: "⊂",
2239
+ sup: "⊃",
2240
+ nsub: "⊄",
2241
+ sube: "⊆",
2242
+ supe: "⊇",
2243
+ oplus: "⊕",
2244
+ otimes: "⊗",
2245
+ perp: "⊥",
2246
+ sdot: "⋅",
2247
+ lceil: "⌈",
2248
+ rceil: "⌉",
2249
+ lfloor: "⌊",
2250
+ rfloor: "⌋",
2251
+ lang: "〈",
2252
+ rang: "〉",
2253
+ loz: "◊",
2254
+ spades: "♠",
2255
+ clubs: "♣",
2256
+ hearts: "♥",
2257
+ diams: "♦",
2258
+ quot: "\"",
2259
+ amp: "&",
2260
+ lt: "<",
2261
+ gt: ">",
2262
+ OElig: "Œ",
2263
+ oelig: "œ",
2264
+ Scaron: "Š",
2265
+ scaron: "š",
2266
+ Yuml: "Ÿ",
2267
+ circ: "ˆ",
2268
+ tilde: "˜",
2269
+ ensp: " ",
2270
+ emsp: " ",
2271
+ thinsp: " ",
2272
+ zwnj: "‌",
2273
+ zwj: "‍",
2274
+ lrm: "‎",
2275
+ rlm: "‏",
2276
+ ndash: "–",
2277
+ mdash: "—",
2278
+ lsquo: "‘",
2279
+ rsquo: "’",
2280
+ sbquo: "‚",
2281
+ ldquo: "“",
2282
+ rdquo: "”",
2283
+ bdquo: "„",
2284
+ dagger: "†",
2285
+ Dagger: "‡",
2286
+ permil: "‰",
2287
+ lsaquo: "‹",
2288
+ rsaquo: "›",
2289
+ euro: "€"
2290
+ };
2291
+ // ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.js
2292
+ /**
2293
+ * List of legacy (that don’t need a trailing `;`) named references which could,
2294
+ * depending on what follows them, turn into a different meaning
2295
+ *
2296
+ * @type {Array<string>}
2297
+ */
2298
+ const dangerous = [
2299
+ "cent",
2300
+ "copy",
2301
+ "divide",
2302
+ "gt",
2303
+ "lt",
2304
+ "not",
2305
+ "para",
2306
+ "times"
2307
+ ];
2308
+ // ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.js
2309
+ const own$1 = {}.hasOwnProperty;
2310
+ /**
2311
+ * `characterEntitiesHtml4` but inverted.
2312
+ *
2313
+ * @type {Record<string, string>}
2314
+ */
2315
+ const characters = {};
2316
+ /** @type {string} */
2317
+ let key;
2318
+ for (key in characterEntitiesHtml4) if (own$1.call(characterEntitiesHtml4, key)) characters[characterEntitiesHtml4[key]] = key;
2319
+ const notAlphanumericRegex = /[^\dA-Za-z]/;
2320
+ /**
2321
+ * Configurable ways to encode characters as named references.
2322
+ *
2323
+ * @param {number} code
2324
+ * @param {number} next
2325
+ * @param {boolean|undefined} omit
2326
+ * @param {boolean|undefined} attribute
2327
+ * @returns {string}
2328
+ */
2329
+ function toNamed(code, next, omit, attribute) {
2330
+ const character = String.fromCharCode(code);
2331
+ if (own$1.call(characters, character)) {
2332
+ const name = characters[character];
2333
+ const value = "&" + name;
2334
+ if (omit && characterEntitiesLegacy.includes(name) && !dangerous.includes(name) && (!attribute || next && next !== 61 && notAlphanumericRegex.test(String.fromCharCode(next)))) return value;
2335
+ return value + ";";
2336
+ }
2337
+ return "";
2338
+ }
2339
+ // ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js
2340
+ /**
2341
+ * @typedef FormatSmartOptions
2342
+ * @property {boolean} [useNamedReferences=false]
2343
+ * Prefer named character references (`&amp;`) where possible.
2344
+ * @property {boolean} [useShortestReferences=false]
2345
+ * Prefer the shortest possible reference, if that results in less bytes.
2346
+ * **Note**: `useNamedReferences` can be omitted when using `useShortestReferences`.
2347
+ * @property {boolean} [omitOptionalSemicolons=false]
2348
+ * Whether to omit semicolons when possible.
2349
+ * **Note**: This creates what HTML calls “parse errors” but is otherwise still valid HTML — don’t use this except when building a minifier.
2350
+ * Omitting semicolons is possible for certain named and numeric references in some cases.
2351
+ * @property {boolean} [attribute=false]
2352
+ * Create character references which don’t fail in attributes.
2353
+ * **Note**: `attribute` only applies when operating dangerously with
2354
+ * `omitOptionalSemicolons: true`.
2355
+ */
2356
+ /**
2357
+ * Configurable ways to encode a character yielding pretty or small results.
2358
+ *
2359
+ * @param {number} code
2360
+ * @param {number} next
2361
+ * @param {FormatSmartOptions} options
2362
+ * @returns {string}
2363
+ */
2364
+ function formatSmart(code, next, options) {
2365
+ let numeric = toHexadecimal(code, next, options.omitOptionalSemicolons);
2366
+ /** @type {string|undefined} */
2367
+ let named;
2368
+ if (options.useNamedReferences || options.useShortestReferences) named = toNamed(code, next, options.omitOptionalSemicolons, options.attribute);
2369
+ if ((options.useShortestReferences || !named) && options.useShortestReferences) {
2370
+ const decimal = toDecimal(code, next, options.omitOptionalSemicolons);
2371
+ if (decimal.length < numeric.length) numeric = decimal;
2372
+ }
2373
+ return named && (!options.useShortestReferences || named.length < numeric.length) ? named : numeric;
2374
+ }
2375
+ // ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js
2376
+ /**
2377
+ * @typedef {import('./core.js').CoreOptions & import('./util/format-smart.js').FormatSmartOptions} Options
2378
+ * @typedef {import('./core.js').CoreOptions} LightOptions
2379
+ */
2380
+ /**
2381
+ * Encode special characters in `value`.
2382
+ *
2383
+ * @param {string} value
2384
+ * Value to encode.
2385
+ * @param {Options} [options]
2386
+ * Configuration.
2387
+ * @returns {string}
2388
+ * Encoded value.
2389
+ */
2390
+ function stringifyEntities(value, options) {
2391
+ return core(value, Object.assign({ format: formatSmart }, options));
2392
+ }
2393
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js
2394
+ /**
2395
+ * @import {Comment, Parents} from 'hast'
2396
+ * @import {State} from '../index.js'
2397
+ */
2398
+ const htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
2399
+ const bogusCommentEntitySubset = [">"];
2400
+ const commentEntitySubset = ["<", ">"];
2401
+ /**
2402
+ * Serialize a comment.
2403
+ *
2404
+ * @param {Comment} node
2405
+ * Node to handle.
2406
+ * @param {number | undefined} _1
2407
+ * Index of `node` in `parent.
2408
+ * @param {Parents | undefined} _2
2409
+ * Parent of `node`.
2410
+ * @param {State} state
2411
+ * Info passed around about the current state.
2412
+ * @returns {string}
2413
+ * Serialized node.
2414
+ */
2415
+ function comment(node, _1, _2, state) {
2416
+ return state.settings.bogusComments ? "<?" + stringifyEntities(node.value, Object.assign({}, state.settings.characterReferences, { subset: bogusCommentEntitySubset })) + ">" : "<!--" + node.value.replace(htmlCommentRegex, encode) + "-->";
2417
+ /**
2418
+ * @param {string} $0
2419
+ */
2420
+ function encode($0) {
2421
+ return stringifyEntities($0, Object.assign({}, state.settings.characterReferences, { subset: commentEntitySubset }));
2422
+ }
2423
+ }
2424
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js
2425
+ /**
2426
+ * @import {Doctype, Parents} from 'hast'
2427
+ * @import {State} from '../index.js'
2428
+ */
2429
+ /**
2430
+ * Serialize a doctype.
2431
+ *
2432
+ * @param {Doctype} _1
2433
+ * Node to handle.
2434
+ * @param {number | undefined} _2
2435
+ * Index of `node` in `parent.
2436
+ * @param {Parents | undefined} _3
2437
+ * Parent of `node`.
2438
+ * @param {State} state
2439
+ * Info passed around about the current state.
2440
+ * @returns {string}
2441
+ * Serialized node.
2442
+ */
2443
+ function doctype(_1, _2, _3, state) {
2444
+ return "<!" + (state.settings.upperDoctype ? "DOCTYPE" : "doctype") + (state.settings.tightDoctype ? "" : " ") + "html>";
2445
+ }
2446
+ // ../../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
2447
+ /**
2448
+ * Count how often a character (or substring) is used in a string.
2449
+ *
2450
+ * @param {string} value
2451
+ * Value to search in.
2452
+ * @param {string} character
2453
+ * Character (or substring) to look for.
2454
+ * @return {number}
2455
+ * Number of times `character` occurred in `value`.
2456
+ */
2457
+ function ccount(value, character) {
2458
+ const source = String(value);
2459
+ if (typeof character !== "string") throw new TypeError("Expected character");
2460
+ let count = 0;
2461
+ let index = source.indexOf(character);
2462
+ while (index !== -1) {
2463
+ count++;
2464
+ index = source.indexOf(character, index + character.length);
2465
+ }
2466
+ return count;
2467
+ }
2468
+ // ../../node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js
2469
+ /**
2470
+ * Serialize an array of strings or numbers to comma-separated tokens.
2471
+ *
2472
+ * @param {Array<string|number>} values
2473
+ * List of tokens.
2474
+ * @param {Options} [options]
2475
+ * Configuration for `stringify` (optional).
2476
+ * @returns {string}
2477
+ * Comma-separated tokens.
2478
+ */
2479
+ function stringify$1(values, options) {
2480
+ const settings = options || {};
2481
+ return (values[values.length - 1] === "" ? [...values, ""] : values).join((settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")).trim();
2482
+ }
2483
+ // ../../node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js
2484
+ /**
2485
+ * Serialize an array of strings as space separated-tokens.
2486
+ *
2487
+ * @param {Array<string|number>} values
2488
+ * List of tokens.
2489
+ * @returns {string}
2490
+ * Space-separated tokens.
2491
+ */
2492
+ function stringify(values) {
2493
+ return values.join(" ").trim();
2494
+ }
2495
+ // ../../node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js
2496
+ /**
2497
+ * @typedef {import('hast').Nodes} Nodes
2498
+ */
2499
+ const re = /[ \t\n\f\r]/g;
2500
+ /**
2501
+ * Check if the given value is *inter-element whitespace*.
2502
+ *
2503
+ * @param {Nodes | string} thing
2504
+ * Thing to check (`Node` or `string`).
2505
+ * @returns {boolean}
2506
+ * Whether the `value` is inter-element whitespace (`boolean`): consisting of
2507
+ * zero or more of space, tab (`\t`), line feed (`\n`), carriage return
2508
+ * (`\r`), or form feed (`\f`); if a node is passed it must be a `Text` node,
2509
+ * whose `value` field is checked.
2510
+ */
2511
+ function whitespace(thing) {
2512
+ return typeof thing === "object" ? thing.type === "text" ? empty(thing.value) : false : empty(thing);
2513
+ }
2514
+ /**
2515
+ * @param {string} value
2516
+ * @returns {boolean}
2517
+ */
2518
+ function empty(value) {
2519
+ return value.replace(re, "") === "";
2520
+ }
2521
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js
2522
+ /**
2523
+ * @import {Parents, RootContent} from 'hast'
2524
+ */
2525
+ const siblingAfter = siblings(1);
2526
+ const siblingBefore = siblings(-1);
2527
+ /** @type {Array<RootContent>} */
2528
+ const emptyChildren$1 = [];
2529
+ /**
2530
+ * Factory to check siblings in a direction.
2531
+ *
2532
+ * @param {number} increment
2533
+ */
2534
+ function siblings(increment) {
2535
+ return sibling;
2536
+ /**
2537
+ * Find applicable siblings in a direction.
2538
+ *
2539
+ * @template {Parents} Parent
2540
+ * Parent type.
2541
+ * @param {Parent | undefined} parent
2542
+ * Parent.
2543
+ * @param {number | undefined} index
2544
+ * Index of child in `parent`.
2545
+ * @param {boolean | undefined} [includeWhitespace=false]
2546
+ * Whether to include whitespace (default: `false`).
2547
+ * @returns {Parent extends {children: Array<infer Child>} ? Child | undefined : never}
2548
+ * Child of parent.
2549
+ */
2550
+ function sibling(parent, index, includeWhitespace) {
2551
+ const siblings = parent ? parent.children : emptyChildren$1;
2552
+ let offset = (index || 0) + increment;
2553
+ let next = siblings[offset];
2554
+ if (!includeWhitespace) while (next && whitespace(next)) {
2555
+ offset += increment;
2556
+ next = siblings[offset];
2557
+ }
2558
+ return next;
2559
+ }
2560
+ }
2561
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js
2562
+ /**
2563
+ * @import {Element, Parents} from 'hast'
2564
+ */
2565
+ /**
2566
+ * @callback OmitHandle
2567
+ * Check if a tag can be omitted.
2568
+ * @param {Element} element
2569
+ * Element to check.
2570
+ * @param {number | undefined} index
2571
+ * Index of element in parent.
2572
+ * @param {Parents | undefined} parent
2573
+ * Parent of element.
2574
+ * @returns {boolean}
2575
+ * Whether to omit a tag.
2576
+ *
2577
+ */
2578
+ const own = {}.hasOwnProperty;
2579
+ /**
2580
+ * Factory to check if a given node can have a tag omitted.
2581
+ *
2582
+ * @param {Record<string, OmitHandle>} handlers
2583
+ * Omission handlers, where each key is a tag name, and each value is the
2584
+ * corresponding handler.
2585
+ * @returns {OmitHandle}
2586
+ * Whether to omit a tag of an element.
2587
+ */
2588
+ function omission(handlers) {
2589
+ return omit;
2590
+ /**
2591
+ * Check if a given node can have a tag omitted.
2592
+ *
2593
+ * @type {OmitHandle}
2594
+ */
2595
+ function omit(node, index, parent) {
2596
+ return own.call(handlers, node.tagName) && handlers[node.tagName](node, index, parent);
2597
+ }
2598
+ }
2599
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js
2600
+ /**
2601
+ * @import {Element, Parents} from 'hast'
2602
+ */
2603
+ const closing = omission({
2604
+ body: body$1,
2605
+ caption: headOrColgroupOrCaption,
2606
+ colgroup: headOrColgroupOrCaption,
2607
+ dd,
2608
+ dt,
2609
+ head: headOrColgroupOrCaption,
2610
+ html: html$1,
2611
+ li,
2612
+ optgroup,
2613
+ option,
2614
+ p,
2615
+ rp: rubyElement,
2616
+ rt: rubyElement,
2617
+ tbody: tbody$1,
2618
+ td: cells,
2619
+ tfoot,
2620
+ th: cells,
2621
+ thead,
2622
+ tr
2623
+ });
2624
+ /**
2625
+ * Macro for `</head>`, `</colgroup>`, and `</caption>`.
2626
+ *
2627
+ * @param {Element} _
2628
+ * Element.
2629
+ * @param {number | undefined} index
2630
+ * Index of element in parent.
2631
+ * @param {Parents | undefined} parent
2632
+ * Parent of element.
2633
+ * @returns {boolean}
2634
+ * Whether the closing tag can be omitted.
2635
+ */
2636
+ function headOrColgroupOrCaption(_, index, parent) {
2637
+ const next = siblingAfter(parent, index, true);
2638
+ return !next || next.type !== "comment" && !(next.type === "text" && whitespace(next.value.charAt(0)));
2639
+ }
2640
+ /**
2641
+ * Whether to omit `</html>`.
2642
+ *
2643
+ * @param {Element} _
2644
+ * Element.
2645
+ * @param {number | undefined} index
2646
+ * Index of element in parent.
2647
+ * @param {Parents | undefined} parent
2648
+ * Parent of element.
2649
+ * @returns {boolean}
2650
+ * Whether the closing tag can be omitted.
2651
+ */
2652
+ function html$1(_, index, parent) {
2653
+ const next = siblingAfter(parent, index);
2654
+ return !next || next.type !== "comment";
2655
+ }
2656
+ /**
2657
+ * Whether to omit `</body>`.
2658
+ *
2659
+ * @param {Element} _
2660
+ * Element.
2661
+ * @param {number | undefined} index
2662
+ * Index of element in parent.
2663
+ * @param {Parents | undefined} parent
2664
+ * Parent of element.
2665
+ * @returns {boolean}
2666
+ * Whether the closing tag can be omitted.
2667
+ */
2668
+ function body$1(_, index, parent) {
2669
+ const next = siblingAfter(parent, index);
2670
+ return !next || next.type !== "comment";
2671
+ }
2672
+ /**
2673
+ * Whether to omit `</p>`.
2674
+ *
2675
+ * @param {Element} _
2676
+ * Element.
2677
+ * @param {number | undefined} index
2678
+ * Index of element in parent.
2679
+ * @param {Parents | undefined} parent
2680
+ * Parent of element.
2681
+ * @returns {boolean}
2682
+ * Whether the closing tag can be omitted.
2683
+ */
2684
+ function p(_, index, parent) {
2685
+ const next = siblingAfter(parent, index);
2686
+ return next ? next.type === "element" && (next.tagName === "address" || next.tagName === "article" || next.tagName === "aside" || next.tagName === "blockquote" || next.tagName === "details" || next.tagName === "div" || next.tagName === "dl" || next.tagName === "fieldset" || next.tagName === "figcaption" || next.tagName === "figure" || next.tagName === "footer" || next.tagName === "form" || next.tagName === "h1" || next.tagName === "h2" || next.tagName === "h3" || next.tagName === "h4" || next.tagName === "h5" || next.tagName === "h6" || next.tagName === "header" || next.tagName === "hgroup" || next.tagName === "hr" || next.tagName === "main" || next.tagName === "menu" || next.tagName === "nav" || next.tagName === "ol" || next.tagName === "p" || next.tagName === "pre" || next.tagName === "section" || next.tagName === "table" || next.tagName === "ul") : !parent || !(parent.type === "element" && (parent.tagName === "a" || parent.tagName === "audio" || parent.tagName === "del" || parent.tagName === "ins" || parent.tagName === "map" || parent.tagName === "noscript" || parent.tagName === "video"));
2687
+ }
2688
+ /**
2689
+ * Whether to omit `</li>`.
2690
+ *
2691
+ * @param {Element} _
2692
+ * Element.
2693
+ * @param {number | undefined} index
2694
+ * Index of element in parent.
2695
+ * @param {Parents | undefined} parent
2696
+ * Parent of element.
2697
+ * @returns {boolean}
2698
+ * Whether the closing tag can be omitted.
2699
+ */
2700
+ function li(_, index, parent) {
2701
+ const next = siblingAfter(parent, index);
2702
+ return !next || next.type === "element" && next.tagName === "li";
2703
+ }
2704
+ /**
2705
+ * Whether to omit `</dt>`.
2706
+ *
2707
+ * @param {Element} _
2708
+ * Element.
2709
+ * @param {number | undefined} index
2710
+ * Index of element in parent.
2711
+ * @param {Parents | undefined} parent
2712
+ * Parent of element.
2713
+ * @returns {boolean}
2714
+ * Whether the closing tag can be omitted.
2715
+ */
2716
+ function dt(_, index, parent) {
2717
+ const next = siblingAfter(parent, index);
2718
+ return Boolean(next && next.type === "element" && (next.tagName === "dt" || next.tagName === "dd"));
2719
+ }
2720
+ /**
2721
+ * Whether to omit `</dd>`.
2722
+ *
2723
+ * @param {Element} _
2724
+ * Element.
2725
+ * @param {number | undefined} index
2726
+ * Index of element in parent.
2727
+ * @param {Parents | undefined} parent
2728
+ * Parent of element.
2729
+ * @returns {boolean}
2730
+ * Whether the closing tag can be omitted.
2731
+ */
2732
+ function dd(_, index, parent) {
2733
+ const next = siblingAfter(parent, index);
2734
+ return !next || next.type === "element" && (next.tagName === "dt" || next.tagName === "dd");
2735
+ }
2736
+ /**
2737
+ * Whether to omit `</rt>` or `</rp>`.
2738
+ *
2739
+ * @param {Element} _
2740
+ * Element.
2741
+ * @param {number | undefined} index
2742
+ * Index of element in parent.
2743
+ * @param {Parents | undefined} parent
2744
+ * Parent of element.
2745
+ * @returns {boolean}
2746
+ * Whether the closing tag can be omitted.
2747
+ */
2748
+ function rubyElement(_, index, parent) {
2749
+ const next = siblingAfter(parent, index);
2750
+ return !next || next.type === "element" && (next.tagName === "rp" || next.tagName === "rt");
2751
+ }
2752
+ /**
2753
+ * Whether to omit `</optgroup>`.
2754
+ *
2755
+ * @param {Element} _
2756
+ * Element.
2757
+ * @param {number | undefined} index
2758
+ * Index of element in parent.
2759
+ * @param {Parents | undefined} parent
2760
+ * Parent of element.
2761
+ * @returns {boolean}
2762
+ * Whether the closing tag can be omitted.
2763
+ */
2764
+ function optgroup(_, index, parent) {
2765
+ const next = siblingAfter(parent, index);
2766
+ return !next || next.type === "element" && next.tagName === "optgroup";
2767
+ }
2768
+ /**
2769
+ * Whether to omit `</option>`.
2770
+ *
2771
+ * @param {Element} _
2772
+ * Element.
2773
+ * @param {number | undefined} index
2774
+ * Index of element in parent.
2775
+ * @param {Parents | undefined} parent
2776
+ * Parent of element.
2777
+ * @returns {boolean}
2778
+ * Whether the closing tag can be omitted.
2779
+ */
2780
+ function option(_, index, parent) {
2781
+ const next = siblingAfter(parent, index);
2782
+ return !next || next.type === "element" && (next.tagName === "option" || next.tagName === "optgroup");
2783
+ }
2784
+ /**
2785
+ * Whether to omit `</thead>`.
2786
+ *
2787
+ * @param {Element} _
2788
+ * Element.
2789
+ * @param {number | undefined} index
2790
+ * Index of element in parent.
2791
+ * @param {Parents | undefined} parent
2792
+ * Parent of element.
2793
+ * @returns {boolean}
2794
+ * Whether the closing tag can be omitted.
2795
+ */
2796
+ function thead(_, index, parent) {
2797
+ const next = siblingAfter(parent, index);
2798
+ return Boolean(next && next.type === "element" && (next.tagName === "tbody" || next.tagName === "tfoot"));
2799
+ }
2800
+ /**
2801
+ * Whether to omit `</tbody>`.
2802
+ *
2803
+ * @param {Element} _
2804
+ * Element.
2805
+ * @param {number | undefined} index
2806
+ * Index of element in parent.
2807
+ * @param {Parents | undefined} parent
2808
+ * Parent of element.
2809
+ * @returns {boolean}
2810
+ * Whether the closing tag can be omitted.
2811
+ */
2812
+ function tbody$1(_, index, parent) {
2813
+ const next = siblingAfter(parent, index);
2814
+ return !next || next.type === "element" && (next.tagName === "tbody" || next.tagName === "tfoot");
2815
+ }
2816
+ /**
2817
+ * Whether to omit `</tfoot>`.
2818
+ *
2819
+ * @param {Element} _
2820
+ * Element.
2821
+ * @param {number | undefined} index
2822
+ * Index of element in parent.
2823
+ * @param {Parents | undefined} parent
2824
+ * Parent of element.
2825
+ * @returns {boolean}
2826
+ * Whether the closing tag can be omitted.
2827
+ */
2828
+ function tfoot(_, index, parent) {
2829
+ return !siblingAfter(parent, index);
2830
+ }
2831
+ /**
2832
+ * Whether to omit `</tr>`.
2833
+ *
2834
+ * @param {Element} _
2835
+ * Element.
2836
+ * @param {number | undefined} index
2837
+ * Index of element in parent.
2838
+ * @param {Parents | undefined} parent
2839
+ * Parent of element.
2840
+ * @returns {boolean}
2841
+ * Whether the closing tag can be omitted.
2842
+ */
2843
+ function tr(_, index, parent) {
2844
+ const next = siblingAfter(parent, index);
2845
+ return !next || next.type === "element" && next.tagName === "tr";
2846
+ }
2847
+ /**
2848
+ * Whether to omit `</td>` or `</th>`.
2849
+ *
2850
+ * @param {Element} _
2851
+ * Element.
2852
+ * @param {number | undefined} index
2853
+ * Index of element in parent.
2854
+ * @param {Parents | undefined} parent
2855
+ * Parent of element.
2856
+ * @returns {boolean}
2857
+ * Whether the closing tag can be omitted.
2858
+ */
2859
+ function cells(_, index, parent) {
2860
+ const next = siblingAfter(parent, index);
2861
+ return !next || next.type === "element" && (next.tagName === "td" || next.tagName === "th");
2862
+ }
2863
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js
2864
+ /**
2865
+ * @import {Element, Parents} from 'hast'
2866
+ */
2867
+ const opening = omission({
2868
+ body,
2869
+ colgroup,
2870
+ head,
2871
+ html,
2872
+ tbody
2873
+ });
2874
+ /**
2875
+ * Whether to omit `<html>`.
2876
+ *
2877
+ * @param {Element} node
2878
+ * Element.
2879
+ * @returns {boolean}
2880
+ * Whether the opening tag can be omitted.
2881
+ */
2882
+ function html(node) {
2883
+ const head = siblingAfter(node, -1);
2884
+ return !head || head.type !== "comment";
2885
+ }
2886
+ /**
2887
+ * Whether to omit `<head>`.
2888
+ *
2889
+ * @param {Element} node
2890
+ * Element.
2891
+ * @returns {boolean}
2892
+ * Whether the opening tag can be omitted.
2893
+ */
2894
+ function head(node) {
2895
+ /** @type {Set<string>} */
2896
+ const seen = /* @__PURE__ */ new Set();
2897
+ for (const child of node.children) if (child.type === "element" && (child.tagName === "base" || child.tagName === "title")) {
2898
+ if (seen.has(child.tagName)) return false;
2899
+ seen.add(child.tagName);
2900
+ }
2901
+ const child = node.children[0];
2902
+ return !child || child.type === "element";
2903
+ }
2904
+ /**
2905
+ * Whether to omit `<body>`.
2906
+ *
2907
+ * @param {Element} node
2908
+ * Element.
2909
+ * @returns {boolean}
2910
+ * Whether the opening tag can be omitted.
2911
+ */
2912
+ function body(node) {
2913
+ const head = siblingAfter(node, -1, true);
2914
+ return !head || head.type !== "comment" && !(head.type === "text" && whitespace(head.value.charAt(0))) && !(head.type === "element" && (head.tagName === "meta" || head.tagName === "link" || head.tagName === "script" || head.tagName === "style" || head.tagName === "template"));
2915
+ }
2916
+ /**
2917
+ * Whether to omit `<colgroup>`.
2918
+ * The spec describes some logic for the opening tag, but it’s easier to
2919
+ * implement in the closing tag, to the same effect, so we handle it there
2920
+ * instead.
2921
+ *
2922
+ * @param {Element} node
2923
+ * Element.
2924
+ * @param {number | undefined} index
2925
+ * Index of element in parent.
2926
+ * @param {Parents | undefined} parent
2927
+ * Parent of element.
2928
+ * @returns {boolean}
2929
+ * Whether the opening tag can be omitted.
2930
+ */
2931
+ function colgroup(node, index, parent) {
2932
+ const previous = siblingBefore(parent, index);
2933
+ const head = siblingAfter(node, -1, true);
2934
+ if (parent && previous && previous.type === "element" && previous.tagName === "colgroup" && closing(previous, parent.children.indexOf(previous), parent)) return false;
2935
+ return Boolean(head && head.type === "element" && head.tagName === "col");
2936
+ }
2937
+ /**
2938
+ * Whether to omit `<tbody>`.
2939
+ *
2940
+ * @param {Element} node
2941
+ * Element.
2942
+ * @param {number | undefined} index
2943
+ * Index of element in parent.
2944
+ * @param {Parents | undefined} parent
2945
+ * Parent of element.
2946
+ * @returns {boolean}
2947
+ * Whether the opening tag can be omitted.
2948
+ */
2949
+ function tbody(node, index, parent) {
2950
+ const previous = siblingBefore(parent, index);
2951
+ const head = siblingAfter(node, -1);
2952
+ if (parent && previous && previous.type === "element" && (previous.tagName === "thead" || previous.tagName === "tbody") && closing(previous, parent.children.indexOf(previous), parent)) return false;
2953
+ return Boolean(head && head.type === "element" && head.tagName === "tr");
2954
+ }
2955
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js
2956
+ /**
2957
+ * @import {Element, Parents, Properties} from 'hast'
2958
+ * @import {State} from '../index.js'
2959
+ */
2960
+ /**
2961
+ * Maps of subsets.
2962
+ *
2963
+ * Each value is a matrix of tuples.
2964
+ * The value at `0` causes parse errors, the value at `1` is valid.
2965
+ * Of both, the value at `0` is unsafe, and the value at `1` is safe.
2966
+ *
2967
+ * @type {Record<'double' | 'name' | 'single' | 'unquoted', Array<[Array<string>, Array<string>]>>}
2968
+ */
2969
+ const constants = {
2970
+ name: [[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")], ["\0 \n\f\r \"&'/<=>".split(""), "\0 \n\f\r \"&'/<=>`".split("")]],
2971
+ unquoted: [[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")], ["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]],
2972
+ single: [["&'".split(""), "\"&'`".split("")], ["\0&'".split(""), "\0\"&'`".split("")]],
2973
+ double: [["\"&".split(""), "\"&'`".split("")], ["\0\"&".split(""), "\0\"&'`".split("")]]
2974
+ };
2975
+ /**
2976
+ * Serialize an element node.
2977
+ *
2978
+ * @param {Element} node
2979
+ * Node to handle.
2980
+ * @param {number | undefined} index
2981
+ * Index of `node` in `parent.
2982
+ * @param {Parents | undefined} parent
2983
+ * Parent of `node`.
2984
+ * @param {State} state
2985
+ * Info passed around about the current state.
2986
+ * @returns {string}
2987
+ * Serialized node.
2988
+ */
2989
+ function element(node, index, parent, state) {
2990
+ const schema = state.schema;
2991
+ const omit = schema.space === "svg" ? false : state.settings.omitOptionalTags;
2992
+ let selfClosing = schema.space === "svg" ? state.settings.closeEmptyElements : state.settings.voids.includes(node.tagName.toLowerCase());
2993
+ /** @type {Array<string>} */
2994
+ const parts = [];
2995
+ /** @type {string} */
2996
+ let last;
2997
+ if (schema.space === "html" && node.tagName === "svg") state.schema = svg;
2998
+ const attributes = serializeAttributes$1(state, node.properties);
2999
+ const content = state.all(schema.space === "html" && node.tagName === "template" ? node.content : node);
3000
+ state.schema = schema;
3001
+ if (content) selfClosing = false;
3002
+ if (attributes || !omit || !opening(node, index, parent)) {
3003
+ parts.push("<", node.tagName, attributes ? " " + attributes : "");
3004
+ if (selfClosing && (schema.space === "svg" || state.settings.closeSelfClosing)) {
3005
+ last = attributes.charAt(attributes.length - 1);
3006
+ if (!state.settings.tightSelfClosing || last === "/" || last && last !== "\"" && last !== "'") parts.push(" ");
3007
+ parts.push("/");
3008
+ }
3009
+ parts.push(">");
3010
+ }
3011
+ parts.push(content);
3012
+ if (!selfClosing && (!omit || !closing(node, index, parent))) parts.push("</" + node.tagName + ">");
3013
+ return parts.join("");
3014
+ }
3015
+ /**
3016
+ * @param {State} state
3017
+ * @param {Properties | null | undefined} properties
3018
+ * @returns {string}
3019
+ */
3020
+ function serializeAttributes$1(state, properties) {
3021
+ /** @type {Array<string>} */
3022
+ const values = [];
3023
+ let index = -1;
3024
+ /** @type {string} */
3025
+ let key;
3026
+ if (properties) {
3027
+ for (key in properties) if (properties[key] !== null && properties[key] !== void 0) {
3028
+ const value = serializeAttribute(state, key, properties[key]);
3029
+ if (value) values.push(value);
3030
+ }
3031
+ }
3032
+ while (++index < values.length) {
3033
+ const last = state.settings.tightAttributes ? values[index].charAt(values[index].length - 1) : void 0;
3034
+ if (index !== values.length - 1 && last !== "\"" && last !== "'") values[index] += " ";
3035
+ }
3036
+ return values.join("");
3037
+ }
3038
+ /**
3039
+ * @param {State} state
3040
+ * @param {string} key
3041
+ * @param {Properties[keyof Properties]} value
3042
+ * @returns {string}
3043
+ */
3044
+ function serializeAttribute(state, key, value) {
3045
+ const info = find(state.schema, key);
3046
+ const x = state.settings.allowParseErrors && state.schema.space === "html" ? 0 : 1;
3047
+ const y = state.settings.allowDangerousCharacters ? 0 : 1;
3048
+ let quote = state.quote;
3049
+ /** @type {string | undefined} */
3050
+ let result;
3051
+ if (info.overloadedBoolean && (value === info.attribute || value === "")) value = true;
3052
+ else if ((info.boolean || info.overloadedBoolean) && (typeof value !== "string" || value === info.attribute || value === "")) value = Boolean(value);
3053
+ if (value === null || value === void 0 || value === false || typeof value === "number" && Number.isNaN(value)) return "";
3054
+ const name = stringifyEntities(info.attribute, Object.assign({}, state.settings.characterReferences, { subset: constants.name[x][y] }));
3055
+ if (value === true) return name;
3056
+ value = Array.isArray(value) ? (info.commaSeparated ? stringify$1 : stringify)(value, { padLeft: !state.settings.tightCommaSeparatedLists }) : String(value);
3057
+ if (state.settings.collapseEmptyAttributes && !value) return name;
3058
+ if (state.settings.preferUnquoted) result = stringifyEntities(value, Object.assign({}, state.settings.characterReferences, {
3059
+ attribute: true,
3060
+ subset: constants.unquoted[x][y]
3061
+ }));
3062
+ if (result !== value) {
3063
+ if (state.settings.quoteSmart && ccount(value, quote) > ccount(value, state.alternative)) quote = state.alternative;
3064
+ result = quote + stringifyEntities(value, Object.assign({}, state.settings.characterReferences, {
3065
+ subset: (quote === "'" ? constants.single : constants.double)[x][y],
3066
+ attribute: true
3067
+ })) + quote;
3068
+ }
3069
+ return name + (result ? "=" + result : result);
3070
+ }
3071
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js
3072
+ /**
3073
+ * @import {Parents, Text} from 'hast'
3074
+ * @import {Raw} from 'mdast-util-to-hast'
3075
+ * @import {State} from '../index.js'
3076
+ */
3077
+ const textEntitySubset = ["<", "&"];
3078
+ /**
3079
+ * Serialize a text node.
3080
+ *
3081
+ * @param {Raw | Text} node
3082
+ * Node to handle.
3083
+ * @param {number | undefined} _
3084
+ * Index of `node` in `parent.
3085
+ * @param {Parents | undefined} parent
3086
+ * Parent of `node`.
3087
+ * @param {State} state
3088
+ * Info passed around about the current state.
3089
+ * @returns {string}
3090
+ * Serialized node.
3091
+ */
3092
+ function text(node, _, parent, state) {
3093
+ return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : stringifyEntities(node.value, Object.assign({}, state.settings.characterReferences, { subset: textEntitySubset }));
3094
+ }
3095
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js
3096
+ /**
3097
+ * @import {Parents} from 'hast'
3098
+ * @import {Raw} from 'mdast-util-to-hast'
3099
+ * @import {State} from '../index.js'
3100
+ */
3101
+ /**
3102
+ * Serialize a raw node.
3103
+ *
3104
+ * @param {Raw} node
3105
+ * Node to handle.
3106
+ * @param {number | undefined} index
3107
+ * Index of `node` in `parent.
3108
+ * @param {Parents | undefined} parent
3109
+ * Parent of `node`.
3110
+ * @param {State} state
3111
+ * Info passed around about the current state.
3112
+ * @returns {string}
3113
+ * Serialized node.
3114
+ */
3115
+ function raw(node, index, parent, state) {
3116
+ return state.settings.allowDangerousHtml ? node.value : text(node, index, parent, state);
3117
+ }
3118
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js
3119
+ /**
3120
+ * @import {Parents, Root} from 'hast'
3121
+ * @import {State} from '../index.js'
3122
+ */
3123
+ /**
3124
+ * Serialize a root.
3125
+ *
3126
+ * @param {Root} node
3127
+ * Node to handle.
3128
+ * @param {number | undefined} _1
3129
+ * Index of `node` in `parent.
3130
+ * @param {Parents | undefined} _2
3131
+ * Parent of `node`.
3132
+ * @param {State} state
3133
+ * Info passed around about the current state.
3134
+ * @returns {string}
3135
+ * Serialized node.
3136
+ */
3137
+ function root(node, _1, _2, state) {
3138
+ return state.all(node);
3139
+ }
3140
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js
3141
+ /**
3142
+ * @import {Nodes, Parents} from 'hast'
3143
+ * @import {State} from '../index.js'
3144
+ */
3145
+ /**
3146
+ * @type {(node: Nodes, index: number | undefined, parent: Parents | undefined, state: State) => string}
3147
+ */
3148
+ const handle = zwitch("type", {
3149
+ invalid,
3150
+ unknown,
3151
+ handlers: {
3152
+ comment,
3153
+ doctype,
3154
+ element,
3155
+ raw,
3156
+ root,
3157
+ text
3158
+ }
3159
+ });
3160
+ /**
3161
+ * Fail when a non-node is found in the tree.
3162
+ *
3163
+ * @param {unknown} node
3164
+ * Unknown value.
3165
+ * @returns {never}
3166
+ * Never.
3167
+ */
3168
+ function invalid(node) {
3169
+ throw new Error("Expected node, not `" + node + "`");
3170
+ }
3171
+ /**
3172
+ * Fail when a node with an unknown type is found in the tree.
3173
+ *
3174
+ * @param {unknown} node_
3175
+ * Unknown node.
3176
+ * @returns {never}
3177
+ * Never.
3178
+ */
3179
+ function unknown(node_) {
3180
+ throw new Error("Cannot compile unknown node `" + node_.type + "`");
3181
+ }
3182
+ // ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js
3183
+ /**
3184
+ * @import {Nodes, Parents, RootContent} from 'hast'
3185
+ * @import {Schema} from 'property-information'
3186
+ * @import {Options as StringifyEntitiesOptions} from 'stringify-entities'
3187
+ */
3188
+ /**
3189
+ * @typedef {Omit<StringifyEntitiesOptions, 'attribute' | 'escapeOnly' | 'subset'>} CharacterReferences
3190
+ *
3191
+ * @typedef Options
3192
+ * Configuration.
3193
+ * @property {boolean | null | undefined} [allowDangerousCharacters=false]
3194
+ * Do not encode some characters which cause XSS vulnerabilities in older
3195
+ * browsers (default: `false`).
3196
+ *
3197
+ * > ⚠️ **Danger**: only set this if you completely trust the content.
3198
+ * @property {boolean | null | undefined} [allowDangerousHtml=false]
3199
+ * Allow `raw` nodes and insert them as raw HTML (default: `false`).
3200
+ *
3201
+ * When `false`, `Raw` nodes are encoded.
3202
+ *
3203
+ * > ⚠️ **Danger**: only set this if you completely trust the content.
3204
+ * @property {boolean | null | undefined} [allowParseErrors=false]
3205
+ * Do not encode characters which cause parse errors (even though they work),
3206
+ * to save bytes (default: `false`).
3207
+ *
3208
+ * Not used in the SVG space.
3209
+ *
3210
+ * > 👉 **Note**: intentionally creates parse errors in markup (how parse
3211
+ * > errors are handled is well defined, so this works but isn’t pretty).
3212
+ * @property {boolean | null | undefined} [bogusComments=false]
3213
+ * Use “bogus comments” instead of comments to save byes: `<?charlie>`
3214
+ * instead of `<!--charlie-->` (default: `false`).
3215
+ *
3216
+ * > 👉 **Note**: intentionally creates parse errors in markup (how parse
3217
+ * > errors are handled is well defined, so this works but isn’t pretty).
3218
+ * @property {CharacterReferences | null | undefined} [characterReferences]
3219
+ * Configure how to serialize character references (optional).
3220
+ * @property {boolean | null | undefined} [closeEmptyElements=false]
3221
+ * Close SVG elements without any content with slash (`/`) on the opening tag
3222
+ * instead of an end tag: `<circle />` instead of `<circle></circle>`
3223
+ * (default: `false`).
3224
+ *
3225
+ * See `tightSelfClosing` to control whether a space is used before the
3226
+ * slash.
3227
+ *
3228
+ * Not used in the HTML space.
3229
+ * @property {boolean | null | undefined} [closeSelfClosing=false]
3230
+ * Close self-closing nodes with an extra slash (`/`): `<img />` instead of
3231
+ * `<img>` (default: `false`).
3232
+ *
3233
+ * See `tightSelfClosing` to control whether a space is used before the
3234
+ * slash.
3235
+ *
3236
+ * Not used in the SVG space.
3237
+ * @property {boolean | null | undefined} [collapseEmptyAttributes=false]
3238
+ * Collapse empty attributes: get `class` instead of `class=""` (default:
3239
+ * `false`).
3240
+ *
3241
+ * Not used in the SVG space.
3242
+ *
3243
+ * > 👉 **Note**: boolean attributes (such as `hidden`) are always collapsed.
3244
+ * @property {boolean | null | undefined} [omitOptionalTags=false]
3245
+ * Omit optional opening and closing tags (default: `false`).
3246
+ *
3247
+ * For example, in `<ol><li>one</li><li>two</li></ol>`, both `</li>` closing
3248
+ * tags can be omitted.
3249
+ * The first because it’s followed by another `li`, the last because it’s
3250
+ * followed by nothing.
3251
+ *
3252
+ * Not used in the SVG space.
3253
+ * @property {boolean | null | undefined} [preferUnquoted=false]
3254
+ * Leave attributes unquoted if that results in less bytes (default: `false`).
3255
+ *
3256
+ * Not used in the SVG space.
3257
+ * @property {boolean | null | undefined} [quoteSmart=false]
3258
+ * Use the other quote if that results in less bytes (default: `false`).
3259
+ * @property {Quote | null | undefined} [quote='"']
3260
+ * Preferred quote to use (default: `'"'`).
3261
+ * @property {Space | null | undefined} [space='html']
3262
+ * When an `<svg>` element is found in the HTML space, this package already
3263
+ * automatically switches to and from the SVG space when entering and exiting
3264
+ * it (default: `'html'`).
3265
+ *
3266
+ * > 👉 **Note**: hast is not XML.
3267
+ * > It supports SVG as embedded in HTML.
3268
+ * > It does not support the features available in XML.
3269
+ * > Passing SVG might break but fragments of modern SVG should be fine.
3270
+ * > Use [`xast`][xast] if you need to support SVG as XML.
3271
+ * @property {boolean | null | undefined} [tightAttributes=false]
3272
+ * Join attributes together, without whitespace, if possible: get
3273
+ * `class="a b"title="c d"` instead of `class="a b" title="c d"` to save
3274
+ * bytes (default: `false`).
3275
+ *
3276
+ * Not used in the SVG space.
3277
+ *
3278
+ * > 👉 **Note**: intentionally creates parse errors in markup (how parse
3279
+ * > errors are handled is well defined, so this works but isn’t pretty).
3280
+ * @property {boolean | null | undefined} [tightCommaSeparatedLists=false]
3281
+ * Join known comma-separated attribute values with just a comma (`,`),
3282
+ * instead of padding them on the right as well (`,␠`, where `␠` represents a
3283
+ * space) (default: `false`).
3284
+ * @property {boolean | null | undefined} [tightDoctype=false]
3285
+ * Drop unneeded spaces in doctypes: `<!doctypehtml>` instead of
3286
+ * `<!doctype html>` to save bytes (default: `false`).
3287
+ *
3288
+ * > 👉 **Note**: intentionally creates parse errors in markup (how parse
3289
+ * > errors are handled is well defined, so this works but isn’t pretty).
3290
+ * @property {boolean | null | undefined} [tightSelfClosing=false]
3291
+ * Do not use an extra space when closing self-closing elements: `<img/>`
3292
+ * instead of `<img />` (default: `false`).
3293
+ *
3294
+ * > 👉 **Note**: only used if `closeSelfClosing: true` or
3295
+ * > `closeEmptyElements: true`.
3296
+ * @property {boolean | null | undefined} [upperDoctype=false]
3297
+ * Use a `<!DOCTYPE…` instead of `<!doctype…` (default: `false`).
3298
+ *
3299
+ * Useless except for XHTML.
3300
+ * @property {ReadonlyArray<string> | null | undefined} [voids]
3301
+ * Tag names of elements to serialize without closing tag (default: `html-void-elements`).
3302
+ *
3303
+ * Not used in the SVG space.
3304
+ *
3305
+ * > 👉 **Note**: It’s highly unlikely that you want to pass this, because
3306
+ * > hast is not for XML, and HTML will not add more void elements.
3307
+ *
3308
+ * @typedef {'"' | "'"} Quote
3309
+ * HTML quotes for attribute values.
3310
+ *
3311
+ * @typedef {Omit<Required<{[key in keyof Options]: Exclude<Options[key], null | undefined>}>, 'space' | 'quote'>} Settings
3312
+ *
3313
+ * @typedef {'html' | 'svg'} Space
3314
+ * Namespace.
3315
+ *
3316
+ * @typedef State
3317
+ * Info passed around about the current state.
3318
+ * @property {(node: Parents | undefined) => string} all
3319
+ * Serialize the children of a parent node.
3320
+ * @property {Quote} alternative
3321
+ * Alternative quote.
3322
+ * @property {(node: Nodes, index: number | undefined, parent: Parents | undefined) => string} one
3323
+ * Serialize one node.
3324
+ * @property {Quote} quote
3325
+ * Preferred quote.
3326
+ * @property {Schema} schema
3327
+ * Current schema.
3328
+ * @property {Settings} settings
3329
+ * User configuration.
3330
+ */
3331
+ /** @type {Options} */
3332
+ const emptyOptions = {};
3333
+ /** @type {CharacterReferences} */
3334
+ const emptyCharacterReferences = {};
3335
+ /** @type {Array<never>} */
3336
+ const emptyChildren = [];
3337
+ /**
3338
+ * Serialize hast as HTML.
3339
+ *
3340
+ * @param {Array<RootContent> | Nodes} tree
3341
+ * Tree to serialize.
3342
+ * @param {Options | null | undefined} [options]
3343
+ * Configuration (optional).
3344
+ * @returns {string}
3345
+ * Serialized HTML.
3346
+ */
3347
+ function toHtml(tree, options) {
3348
+ const options_ = options || emptyOptions;
3349
+ const quote = options_.quote || "\"";
3350
+ const alternative = quote === "\"" ? "'" : "\"";
3351
+ if (quote !== "\"" && quote !== "'") throw new Error("Invalid quote `" + quote + "`, expected `'` or `\"`");
3352
+ return {
3353
+ one,
3354
+ all,
3355
+ settings: {
3356
+ omitOptionalTags: options_.omitOptionalTags || false,
3357
+ allowParseErrors: options_.allowParseErrors || false,
3358
+ allowDangerousCharacters: options_.allowDangerousCharacters || false,
3359
+ quoteSmart: options_.quoteSmart || false,
3360
+ preferUnquoted: options_.preferUnquoted || false,
3361
+ tightAttributes: options_.tightAttributes || false,
3362
+ upperDoctype: options_.upperDoctype || false,
3363
+ tightDoctype: options_.tightDoctype || false,
3364
+ bogusComments: options_.bogusComments || false,
3365
+ tightCommaSeparatedLists: options_.tightCommaSeparatedLists || false,
3366
+ tightSelfClosing: options_.tightSelfClosing || false,
3367
+ collapseEmptyAttributes: options_.collapseEmptyAttributes || false,
3368
+ allowDangerousHtml: options_.allowDangerousHtml || false,
3369
+ voids: options_.voids || htmlVoidElements,
3370
+ characterReferences: options_.characterReferences || emptyCharacterReferences,
3371
+ closeSelfClosing: options_.closeSelfClosing || false,
3372
+ closeEmptyElements: options_.closeEmptyElements || false
3373
+ },
3374
+ schema: options_.space === "svg" ? svg : html$2,
3375
+ quote,
3376
+ alternative
3377
+ }.one(Array.isArray(tree) ? {
3378
+ type: "root",
3379
+ children: tree
3380
+ } : tree, void 0, void 0);
3381
+ }
3382
+ /**
3383
+ * Serialize a node.
3384
+ *
3385
+ * @this {State}
3386
+ * Info passed around about the current state.
3387
+ * @param {Nodes} node
3388
+ * Node to handle.
3389
+ * @param {number | undefined} index
3390
+ * Index of `node` in `parent.
3391
+ * @param {Parents | undefined} parent
3392
+ * Parent of `node`.
3393
+ * @returns {string}
3394
+ * Serialized node.
3395
+ */
3396
+ function one(node, index, parent) {
3397
+ return handle(node, index, parent, this);
3398
+ }
3399
+ /**
3400
+ * Serialize all children of `parent`.
3401
+ *
3402
+ * @this {State}
3403
+ * Info passed around about the current state.
3404
+ * @param {Parents | undefined} parent
3405
+ * Parent whose children to serialize.
3406
+ * @returns {string}
3407
+ */
3408
+ function all(parent) {
3409
+ /** @type {Array<string>} */
3410
+ const results = [];
3411
+ const children = parent && parent.children || emptyChildren;
3412
+ let index = -1;
3413
+ while (++index < children.length) results[index] = this.one(children[index], index, parent);
3414
+ return results.join("");
3415
+ }
3416
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/hastToHtml.js
3417
+ const VOID_ELEMENTS = /* @__PURE__ */ new Set([
3418
+ "area",
3419
+ "base",
3420
+ "basefont",
3421
+ "bgsound",
3422
+ "br",
3423
+ "col",
3424
+ "command",
3425
+ "embed",
3426
+ "frame",
3427
+ "hr",
3428
+ "image",
3429
+ "img",
3430
+ "input",
3431
+ "keygen",
3432
+ "link",
3433
+ "meta",
3434
+ "param",
3435
+ "source",
3436
+ "track",
3437
+ "wbr"
3438
+ ]);
3439
+ const DELEGATED_TAGS = /* @__PURE__ */ new Set([
3440
+ "svg",
3441
+ "template",
3442
+ "script",
3443
+ "style"
3444
+ ]);
3445
+ const ATTRIBUTE_NAMES = {
3446
+ class: "class",
3447
+ className: "class",
3448
+ contenteditable: "contenteditable",
3449
+ contentEditable: "contenteditable",
3450
+ id: "id",
3451
+ role: "role",
3452
+ style: "style",
3453
+ tabIndex: "tabindex",
3454
+ tabindex: "tabindex",
3455
+ title: "title"
3456
+ };
3457
+ const DATA_ATTRIBUTE = /^data-[\w.:-]+$/;
3458
+ const TEXT_ESCAPE = /[<&]/g;
3459
+ const ATTRIBUTE_ESCAPE = /[\0"&'`]/g;
3460
+ const CHARACTER_REFERENCES = {
3461
+ "<": "&#x3C;",
3462
+ "&": "&#x26;",
3463
+ "\"": "&#x22;",
3464
+ "'": "&#x27;",
3465
+ "`": "&#x60;",
3466
+ "\0": "&#x0;"
3467
+ };
3468
+ const MAX_CACHED_STYLES = 256;
3469
+ /**
3470
+ * Serializes a HAST node or node array to HTML. Common token spans use a fast
3471
+ * path; other nodes and attributes use hast-util-to-html's default serialization.
3472
+ */
3473
+ function hastToHtml(tree) {
3474
+ const styles = /* @__PURE__ */ new Map();
3475
+ return Array.isArray(tree) ? serializeChildren(tree, styles) : serializeNode(tree, styles);
3476
+ }
3477
+ function serializeChildren(children, styles) {
3478
+ let html = "";
3479
+ for (const child of children) html += serializeNode(child, styles);
3480
+ return html;
3481
+ }
3482
+ function serializeNode(node, styles) {
3483
+ switch (node.type) {
3484
+ case "text": return escapeText(node.value);
3485
+ case "element": return serializeElement(node, styles);
3486
+ case "root": return serializeChildren(node.children, styles);
3487
+ default: return toHtml(node);
3488
+ }
3489
+ }
3490
+ function serializeElement(node, styles) {
3491
+ const { tagName } = node;
3492
+ if (tagName === "span" && node.children.length === 1 && node.children[0].type === "text" && typeof node.properties?.style === "string") {
3493
+ let styleOnly = true;
3494
+ for (const key in node.properties) if (key !== "style" && node.properties[key] != null) {
3495
+ styleOnly = false;
3496
+ break;
3497
+ }
3498
+ if (styleOnly) return `<span ${serializeStyle(node.properties.style, styles)}>${escapeText(node.children[0].value)}</span>`;
3499
+ }
3500
+ if (DELEGATED_TAGS.has(tagName)) return toHtml(node);
3501
+ const attributes = serializeAttributes(node.properties, styles);
3502
+ if (attributes == null) return toHtml(node);
3503
+ const open = attributes === "" ? `<${tagName}>` : `<${tagName} ${attributes}>`;
3504
+ const content = serializeChildren(node.children, styles);
3505
+ if (content === "" && VOID_ELEMENTS.has(tagName.toLowerCase())) return open;
3506
+ return `${open}${content}</${tagName}>`;
3507
+ }
3508
+ function serializeStyle(value, styles) {
3509
+ let attribute = styles.get(value);
3510
+ if (attribute == null) {
3511
+ attribute = `style="${escapeAttribute(value)}"`;
3512
+ if (styles.size < MAX_CACHED_STYLES) styles.set(value, attribute);
3513
+ }
3514
+ return attribute;
3515
+ }
3516
+ /**
3517
+ * The attribute a HAST property serializes to: its name and value as the
3518
+ * markup carries them. `null` when the property writes nothing (unset,
3519
+ * false or NaN), undefined when it needs the full HTML schema.
3520
+ */
3521
+ function attributeFor(key, value) {
3522
+ if (value == null) return null;
3523
+ const name = ATTRIBUTE_NAMES[key] ?? (DATA_ATTRIBUTE.test(key) ? key : void 0);
3524
+ if (name == null) return;
3525
+ if (value === false || typeof value === "number" && Number.isNaN(value)) return null;
3526
+ return {
3527
+ name,
3528
+ value: value === true ? "" : Array.isArray(value) ? value.join(" ").trim() : String(value)
3529
+ };
3530
+ }
3531
+ function serializeAttributes(properties, styles) {
3532
+ let attributes = "";
3533
+ for (const key in properties) {
3534
+ const value = properties[key];
3535
+ if (value == null) continue;
3536
+ const name = ATTRIBUTE_NAMES[key] ?? (DATA_ATTRIBUTE.test(key) ? key : void 0);
3537
+ if (name == null) return;
3538
+ if (value === false || typeof value === "number" && Number.isNaN(value)) continue;
3539
+ const attribute = key === "style" && typeof value === "string" ? serializeStyle(value, styles) : value === true ? name : `${name}="${escapeAttribute(Array.isArray(value) ? value.join(" ").trim() : String(value))}"`;
3540
+ attributes += attributes === "" ? attribute : ` ${attribute}`;
3541
+ }
3542
+ return attributes;
3543
+ }
3544
+ function escapeText(value) {
3545
+ return value.indexOf("<") < 0 && value.indexOf("&") < 0 ? value : value.replace(TEXT_ESCAPE, toCharacterReference);
3546
+ }
3547
+ function escapeAttribute(value) {
3548
+ return value.replace(ATTRIBUTE_ESCAPE, toCharacterReference);
3549
+ }
3550
+ function toCharacterReference(character) {
3551
+ return CHARACTER_REFERENCES[character];
3552
+ }
3553
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/lineChanges.js
3554
+ /**
3555
+ * The line changes of a document change. A change made of edits always
3556
+ * carries them; a change with no edits moves no lines.
3557
+ */
3558
+ function lineChangesOf(change) {
3559
+ const { changes, changedLineChanges } = change;
3560
+ if (changedLineChanges != null) return changedLineChanges;
3561
+ if (changes.length > 0) throw new Error("lineChangesOf: a change with edits has no line changes");
3562
+ return [];
3563
+ }
3564
+ /**
3565
+ * Moves one-entry-per-line data through an edit's line changes so every
3566
+ * entry stays with its line, in one pass over the list. The changes come in
3567
+ * document order, each numbered as if the changes before it were already
3568
+ * applied. Within a change the lines that remain keep their entries, first
3569
+ * for first; a line the edit added gets `blank()`; the entries of lines the
3570
+ * edit removed are returned. A list may stop short of the document's last
3571
+ * line; lines added past its end are not added to it.
3572
+ */
3573
+ function moveLineEntries(entries, lineChanges, blank) {
3574
+ const removed = [];
3575
+ if (lineChanges.every(([, , lineDelta]) => lineDelta === 0)) return {
3576
+ entries,
3577
+ removed
3578
+ };
3579
+ const moved = [];
3580
+ let read = 0;
3581
+ let shift = 0;
3582
+ for (const [, end, lineDelta] of lineChanges) {
3583
+ if (lineDelta === 0) continue;
3584
+ const at = (lineDelta > 0 ? end - lineDelta + 1 : end + 1) - shift;
3585
+ if (at < read) throw new Error("moveLineEntries: line changes are out of order");
3586
+ for (; read < at && read < entries.length; read++) moved.push(entries[read]);
3587
+ if (lineDelta > 0) {
3588
+ if (at <= entries.length) for (let count = 0; count < lineDelta; count++) moved.push(blank());
3589
+ } else {
3590
+ const stop = Math.min(at - lineDelta, entries.length);
3591
+ for (; read < stop; read++) removed.push(entries[read]);
3592
+ }
3593
+ shift += lineDelta;
3594
+ }
3595
+ for (; read < entries.length; read++) moved.push(entries[read]);
3596
+ return {
3597
+ entries: moved,
3598
+ removed
3599
+ };
3600
+ }
3601
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/processLine.js
3602
+ function processLine(node, line, state) {
3603
+ const lineInfo = typeof state.lineInfo === "function" ? state.lineInfo(line) : state.lineInfo[line - 1];
3604
+ if (lineInfo == null) {
3605
+ const errorMessage = `processLine: line ${line}, contains no state.lineInfo`;
3606
+ console.error(errorMessage, {
3607
+ node,
3608
+ line,
3609
+ state
3610
+ });
3611
+ throw new Error(errorMessage);
3612
+ }
3613
+ node.tagName = "div";
3614
+ node.properties["data-line"] = lineInfo.lineNumber;
3615
+ node.properties["data-alt-line"] = lineInfo.altLineNumber;
3616
+ node.properties["data-line-type"] = lineInfo.type;
3617
+ node.properties["data-line-index"] = lineInfo.lineIndex;
3618
+ if (node.children.length === 0) node.children.push(createTextNodeElement("\n"));
3619
+ return node;
3620
+ }
3621
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/tokenStyle.js
3622
+ const htmlStyleCache = /* @__PURE__ */ new WeakMap();
3623
+ /**
3624
+ * Returns CSS declarations for a highlighted token. Enable caching only when
3625
+ * htmlStyle objects are immutable and reused across tokens.
3626
+ */
3627
+ function tokenStyle(token, cacheHtmlStyle = false) {
3628
+ const { htmlStyle } = token;
3629
+ if (htmlStyle != null) {
3630
+ let style = cacheHtmlStyle ? htmlStyleCache.get(htmlStyle) : void 0;
3631
+ if (style == null) {
3632
+ style = "";
3633
+ for (const name in htmlStyle) style += `${style === "" ? "" : ";"}${name}:${htmlStyle[name]}`;
3634
+ if (cacheHtmlStyle) htmlStyleCache.set(htmlStyle, style);
3635
+ }
3636
+ return style;
3637
+ }
3638
+ let style = token.color != null ? `color:${token.color}` : "";
3639
+ if (token.bgColor != null) style += `;background-color:${token.bgColor}`;
3640
+ if (token.fontStyle != null) {
3641
+ if ((token.fontStyle & 1) !== 0) style += ";font-style:italic";
3642
+ if ((token.fontStyle & 2) !== 0) style += ";font-weight:bold";
3643
+ const underline = (token.fontStyle & 4) !== 0;
3644
+ const strikethrough = (token.fontStyle & 8) !== 0;
3645
+ if (underline || strikethrough) style += `;text-decoration:${underline ? "underline" : ""}${underline && strikethrough ? " " : ""}${strikethrough ? "line-through" : ""}`;
3646
+ }
3647
+ return style.replace(/^;/, "");
3648
+ }
3649
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/DecoratedLineBuilder.js
3650
+ /**
3651
+ * Builds the children of one line element and wraps each decorated range in
3652
+ * a <span> with that decoration's attributes.
3653
+ *
3654
+ * Add the line's text from left to right. Before adding text at a column,
3655
+ * call `moveTo(column)`, then add the text to `parent`. Text must be split at
3656
+ * `nextEdge`. After the last text, call `moveTo` with the line length.
3657
+ */
3658
+ var DecoratedLineBuilder = class {
3659
+ /** The element that text at the current column should be added to. */
3660
+ parent;
3661
+ /**
3662
+ * The column where the next decoration starts or ends, or the line length
3663
+ * when there are no more. It is never Infinity, because that makes the
3664
+ * callers' text loops noticeably slower.
3665
+ */
3666
+ nextEdge;
3667
+ #line;
3668
+ #lineLength;
3669
+ #boundaries = [];
3670
+ #boundaryIndex = 0;
3671
+ #active = [];
3672
+ #stack = [];
3673
+ constructor(line, spans, lineIndex, lineLength) {
3674
+ this.parent = this.#line = line;
3675
+ this.#lineLength = lineLength;
3676
+ if (spans.length > 1) spans.sort((a, b) => {
3677
+ if (a.start.line !== b.start.line) return a.start.line - b.start.line;
3678
+ if (a.start.character !== b.start.character) return a.start.character - b.start.character;
3679
+ if (a.end.line !== b.end.line) return b.end.line - a.end.line;
3680
+ return b.end.character - a.end.character;
3681
+ });
3682
+ const boundaries = this.#boundaries;
3683
+ for (let order = 0; order < spans.length; order++) {
3684
+ const decoration = spans[order];
3685
+ const range = {
3686
+ decoration,
3687
+ order,
3688
+ from: decoration.start.line === lineIndex ? decoration.start.character : 0,
3689
+ to: decoration.end.line === lineIndex ? decoration.end.character : lineLength
3690
+ };
3691
+ boundaries.push({
3692
+ position: Math.max(0, Math.min(range.from, lineLength)),
3693
+ range,
3694
+ start: true
3695
+ }, {
3696
+ position: Math.max(0, Math.min(range.to, lineLength)),
3697
+ range,
3698
+ start: false
3699
+ });
3700
+ }
3701
+ boundaries.sort((a, b) => a.position - b.position);
3702
+ this.nextEdge = boundaries[0]?.position ?? lineLength;
3703
+ }
3704
+ /** Opens and closes decorations for text that starts at `column`. */
3705
+ moveTo(column) {
3706
+ if (this.nextEdge === column && this.#boundaryIndex < this.#boundaries.length) this.#advance(column);
3707
+ }
3708
+ #advance(position) {
3709
+ const boundaries = this.#boundaries;
3710
+ const lineLength = this.#lineLength;
3711
+ const first = this.#boundaryIndex;
3712
+ let boundaryIndex = first;
3713
+ while (boundaries[boundaryIndex]?.position === position) boundaryIndex++;
3714
+ this.#boundaryIndex = boundaryIndex;
3715
+ this.nextEdge = boundaries[boundaryIndex]?.position ?? this.#lineLength;
3716
+ let hasMarker = false;
3717
+ for (let i = first; i < boundaryIndex; i++) {
3718
+ const { range, start } = boundaries[i];
3719
+ if (!start && range.from !== range.to && position < lineLength) this.#updateActive(range, false);
3720
+ }
3721
+ for (let i = first; i < boundaryIndex; i++) {
3722
+ const { range, start } = boundaries[i];
3723
+ if (start && range.from <= position && range.to >= position && (range.to > position || range.from === position || position === lineLength)) {
3724
+ this.#updateActive(range, true);
3725
+ if (range.from === range.to) hasMarker = true;
3726
+ }
3727
+ }
3728
+ if (hasMarker) {
3729
+ this.#getParent();
3730
+ for (let i = first; i < boundaryIndex; i++) {
3731
+ const { range, start } = boundaries[i];
3732
+ if (start && range.from === range.to) this.#updateActive(range, false);
3733
+ }
3734
+ }
3735
+ if (position < lineLength) this.parent = this.#getParent();
3736
+ }
3737
+ #updateActive(range, add) {
3738
+ const active = this.#active;
3739
+ let low = 0;
3740
+ let high = active.length;
3741
+ while (low < high) {
3742
+ const middle = low + high >>> 1;
3743
+ if (active[middle].order < range.order) low = middle + 1;
3744
+ else high = middle;
3745
+ }
3746
+ if (add) active.splice(low, 0, range);
3747
+ else if (active[low] === range) active.splice(low, 1);
3748
+ }
3749
+ #getParent() {
3750
+ const stack = this.#stack;
3751
+ let parent = this.#line;
3752
+ let depth = 0;
3753
+ for (const range of this.#active) {
3754
+ if (stack[depth]?.range !== range) {
3755
+ stack.length = depth;
3756
+ const wrapper = {
3757
+ type: "element",
3758
+ tagName: "span",
3759
+ properties: { ...range.decoration.properties },
3760
+ children: []
3761
+ };
3762
+ parent.children.push(wrapper);
3763
+ stack.push({
3764
+ range,
3765
+ node: wrapper
3766
+ });
3767
+ }
3768
+ parent = stack[depth++].node;
3769
+ }
3770
+ stack.length = depth;
3771
+ return parent;
3772
+ }
3773
+ };
3774
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/setDeferredArrayItem.js
3775
+ function setDeferredArrayItem(array, index, create, { retain = true } = {}) {
3776
+ let initialized = false;
3777
+ let cached;
3778
+ Object.defineProperty(array, index, {
3779
+ configurable: true,
3780
+ enumerable: true,
3781
+ get() {
3782
+ if (initialized) return cached;
3783
+ const value = create();
3784
+ if (!retain) return value;
3785
+ cached = value;
3786
+ initialized = true;
3787
+ if (Object.getOwnPropertyDescriptor(array, index)?.configurable === true) Object.defineProperty(array, index, {
3788
+ configurable: true,
3789
+ enumerable: true,
3790
+ writable: true,
3791
+ value: cached
3792
+ });
3793
+ return cached;
3794
+ },
3795
+ set(value) {
3796
+ if (Object.getOwnPropertyDescriptor(array, index)?.configurable === true) Object.defineProperty(array, index, {
3797
+ configurable: true,
3798
+ enumerable: true,
3799
+ writable: true,
3800
+ value
3801
+ });
3802
+ else if (Object.isFrozen(array)) throw new TypeError(`Cannot assign to read only array index '${index}'`);
3803
+ else {
3804
+ cached = value;
3805
+ initialized = true;
3806
+ }
3807
+ }
3808
+ });
3809
+ }
3810
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/wrapTokenFragments.js
3811
+ const NO_TOKEN = Symbol("no-token");
3812
+ const MULTIPLE_TOKENS = Symbol("multiple-tokens");
3813
+ function wrapTokenFragments(container) {
3814
+ const ownTokenChar = getTokenChar(container);
3815
+ if (ownTokenChar != null) return ownTokenChar;
3816
+ let containerTokenState = NO_TOKEN;
3817
+ const wrappedChildren = [];
3818
+ let currentTokenChildren = [];
3819
+ let currentTokenChar;
3820
+ const flushTokenChildren = () => {
3821
+ if (currentTokenChildren.length === 0 || currentTokenChar == null) {
3822
+ currentTokenChildren = [];
3823
+ currentTokenChar = void 0;
3824
+ return;
3825
+ }
3826
+ if (currentTokenChildren.length === 1) {
3827
+ const child = currentTokenChildren[0];
3828
+ if (child?.type === "element") {
3829
+ setTokenChar(child, currentTokenChar);
3830
+ for (const grandChild of child.children) stripTokenChar(grandChild);
3831
+ } else stripTokenChar(child);
3832
+ wrappedChildren.push(child);
3833
+ currentTokenChildren = [];
3834
+ currentTokenChar = void 0;
3835
+ return;
3836
+ }
3837
+ for (const child of currentTokenChildren) stripTokenChar(child);
3838
+ wrappedChildren.push(createHastElement({
3839
+ tagName: "span",
3840
+ properties: { "data-char": currentTokenChar },
3841
+ children: currentTokenChildren
3842
+ }));
3843
+ currentTokenChildren = [];
3844
+ currentTokenChar = void 0;
3845
+ };
3846
+ const mergeContainerTokenState = (childTokenState) => {
3847
+ if (childTokenState === NO_TOKEN) return;
3848
+ if (childTokenState === MULTIPLE_TOKENS) {
3849
+ containerTokenState = MULTIPLE_TOKENS;
3850
+ return;
3851
+ }
3852
+ if (containerTokenState === NO_TOKEN) {
3853
+ containerTokenState = childTokenState;
3854
+ return;
3855
+ }
3856
+ if (containerTokenState !== childTokenState) containerTokenState = MULTIPLE_TOKENS;
3857
+ };
3858
+ for (const child of container.children) {
3859
+ const childTokenState = child.type === "element" ? wrapTokenFragments(child) : NO_TOKEN;
3860
+ mergeContainerTokenState(childTokenState);
3861
+ if (typeof childTokenState !== "number") {
3862
+ flushTokenChildren();
3863
+ wrappedChildren.push(child);
3864
+ continue;
3865
+ }
3866
+ if (currentTokenChar != null && currentTokenChar !== childTokenState) flushTokenChildren();
3867
+ currentTokenChar ??= childTokenState;
3868
+ currentTokenChildren.push(child);
3869
+ }
3870
+ flushTokenChildren();
3871
+ container.children = wrappedChildren;
3872
+ return containerTokenState;
3873
+ }
3874
+ function getTokenChar(node) {
3875
+ const value = node.properties["data-char"];
3876
+ if (typeof value === "number") return value;
3877
+ }
3878
+ function stripTokenChar(node) {
3879
+ if (node.type !== "element") return;
3880
+ node.properties["data-char"] = void 0;
3881
+ for (const child of node.children) stripTokenChar(child);
3882
+ }
3883
+ function setTokenChar(node, char) {
3884
+ node.properties["data-char"] = char;
3885
+ }
3886
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/renderTokenLines.js
3887
+ /**
3888
+ * Converts highlighted tokens to one HAST element per line for custom renderers.
3889
+ * Callers provide any line separators and enclosing pre/code elements.
3890
+ */
3891
+ function renderTokenLines(lines, { state, lazyLineAST = false, cacheHtmlStyles = false, useTokenTransformer = false, mergeWhitespaces = "always", decorations = [], lineOffsets = [] }) {
3892
+ let decorationsByLine;
3893
+ for (const decoration of decorations) {
3894
+ const byLine = decorationsByLine ??= /* @__PURE__ */ new Map();
3895
+ const normalized = {
3896
+ ...decoration,
3897
+ start: getDecorationPosition(decoration.start, lineOffsets),
3898
+ end: getDecorationPosition(decoration.end, lineOffsets)
3899
+ };
3900
+ const lastLine = Math.min(normalized.end.line, lines.length - 1);
3901
+ for (let line = normalized.start.line; line <= lastLine; line++) {
3902
+ let spans = byLine.get(line);
3903
+ if (spans == null) byLine.set(line, spans = []);
3904
+ spans.push(normalized);
3905
+ }
3906
+ }
3907
+ const renderLine = (tokens, lineIndex) => {
3908
+ let normalized;
3909
+ if (useTokenTransformer || mergeWhitespaces !== "never") {
3910
+ let pendingWhitespace = "";
3911
+ let whitespaceOffset = 0;
3912
+ for (let i = 0; i < tokens.length; i++) {
3913
+ let token = tokens[i];
3914
+ if (useTokenTransformer) {
3915
+ const content = token.content.trim();
3916
+ if (content !== "" && content !== token.content) {
3917
+ normalized ??= tokens.slice(0, i);
3918
+ const start = token.content.indexOf(content);
3919
+ if (start > 0) normalized.push({
3920
+ content: token.content.slice(0, start),
3921
+ offset: token.offset
3922
+ });
3923
+ normalized.push({
3924
+ ...token,
3925
+ content,
3926
+ offset: token.offset + start
3927
+ });
3928
+ const end = start + content.length;
3929
+ if (end < token.content.length) normalized.push({
3930
+ content: token.content.slice(end),
3931
+ offset: token.offset + end
3932
+ });
3933
+ continue;
3934
+ }
3935
+ } else {
3936
+ const decoratedWhitespace = ((token.fontStyle ?? 0) & 12) !== 0;
3937
+ if (!decoratedWhitespace && /^\s+$/.test(token.content) && i < tokens.length - 1) {
3938
+ normalized ??= tokens.slice(0, i);
3939
+ if (pendingWhitespace === "") whitespaceOffset = token.offset;
3940
+ pendingWhitespace += token.content;
3941
+ continue;
3942
+ }
3943
+ if (pendingWhitespace !== "" && normalized != null) {
3944
+ if (decoratedWhitespace) normalized.push({
3945
+ content: pendingWhitespace,
3946
+ offset: whitespaceOffset
3947
+ });
3948
+ else token = {
3949
+ ...token,
3950
+ content: pendingWhitespace + token.content,
3951
+ offset: whitespaceOffset
3952
+ };
3953
+ pendingWhitespace = "";
3954
+ }
3955
+ }
3956
+ normalized?.push(token);
3957
+ }
3958
+ }
3959
+ normalized ??= tokens;
3960
+ const line = {
3961
+ type: "element",
3962
+ tagName: state == null ? "span" : "div",
3963
+ properties: state == null ? { class: "line" } : {},
3964
+ children: []
3965
+ };
3966
+ const spans = decorationsByLine?.get(lineIndex);
3967
+ const column = spans == null ? appendTokens(line, normalized, useTokenTransformer, cacheHtmlStyles) : appendDecoratedTokens(line, normalized, spans, lineIndex, useTokenTransformer, cacheHtmlStyles);
3968
+ if (useTokenTransformer && column === 0) line.children.push({
3969
+ type: "element",
3970
+ tagName: "br",
3971
+ properties: {},
3972
+ children: []
3973
+ });
3974
+ if (useTokenTransformer && spans != null) wrapTokenFragments(line);
3975
+ return state == null ? line : processLine(line, lineIndex + 1, state);
3976
+ };
3977
+ if (!lazyLineAST) return lines.map(renderLine);
3978
+ const rows = new Array(lines.length);
3979
+ for (let index = 0; index < lines.length; index++) {
3980
+ const tokens = lines[index];
3981
+ setDeferredArrayItem(rows, index, () => renderLine(tokens, index));
3982
+ }
3983
+ return rows;
3984
+ }
3985
+ function appendTokens(line, tokens, useTokenTransformer, cacheHtmlStyles) {
3986
+ let column = 0;
3987
+ for (const token of tokens) {
3988
+ if (token.content === "") continue;
3989
+ line.children.push(createTokenSpan(token, tokenStyle(token, cacheHtmlStyles), token.content, column, useTokenTransformer));
3990
+ column += token.content.length;
3991
+ }
3992
+ return column;
3993
+ }
3994
+ function appendDecoratedTokens(line, tokens, spans, lineIndex, useTokenTransformer, cacheHtmlStyles) {
3995
+ let lineLength = 0;
3996
+ for (const token of tokens) lineLength += token.content.length;
3997
+ const builder = new DecoratedLineBuilder(line, spans, lineIndex, lineLength);
3998
+ let column = 0;
3999
+ for (const token of tokens) {
4000
+ const { content } = token;
4001
+ if (content === "") continue;
4002
+ const start = column;
4003
+ const end = start + content.length;
4004
+ const style = tokenStyle(token, cacheHtmlStyles);
4005
+ while (column < end) {
4006
+ builder.moveTo(column);
4007
+ const to = Math.min(end, builder.nextEdge);
4008
+ builder.parent.children.push(createTokenSpan(token, style, column === start && to === end ? content : content.slice(column - start, to - start), start, useTokenTransformer));
4009
+ column = to;
4010
+ }
4011
+ }
4012
+ builder.moveTo(column);
4013
+ return column;
4014
+ }
4015
+ function createTokenSpan(token, style, text, start, useTokenTransformer) {
4016
+ const properties = token.htmlAttrs != null ? { ...token.htmlAttrs } : {};
4017
+ if (style !== "") properties.style = style;
4018
+ if (useTokenTransformer) properties["data-char"] = start;
4019
+ return {
4020
+ type: "element",
4021
+ tagName: "span",
4022
+ properties,
4023
+ children: [{
4024
+ type: "text",
4025
+ value: text
4026
+ }]
4027
+ };
4028
+ }
4029
+ function getDecorationPosition(position, lineOffsets) {
4030
+ if (typeof position !== "number") return position;
4031
+ let low = 0;
4032
+ let high = lineOffsets.length;
4033
+ while (low + 1 < high) {
4034
+ const middle = low + high >>> 1;
4035
+ if (lineOffsets[middle] <= position) low = middle;
4036
+ else high = middle;
4037
+ }
4038
+ return {
4039
+ line: low,
4040
+ character: position - (lineOffsets[low] ?? 0)
4041
+ };
4042
+ }
4043
+ // ../../node_modules/.pnpm/@pierre+diffs@1.7.1_@shikijs+themes@4.6.0_react-dom@19.2.8_react@19.2.6__react@19.2.6/node_modules/@pierre/diffs/dist/utils/appendItems.js
4044
+ function appendItems(target, items) {
4045
+ for (const item of items) target.push(item);
4046
+ }
4047
+ export { releaseHighlighterType as C, getHighlighterType as S, createTokenRow as _, DecoratedLineBuilder as a, HighlighterDisposedError as b, attributeFor as c, createGutterItem as d, createGutterWrapper as f, createTextNodeElement as g, createPlainRow as h, setDeferredArrayItem as i, hastToHtml as l, createIconElement as m, renderTokenLines as n, lineChangesOf as o, createHastElement as p, wrapTokenFragments as r, moveLineEntries as s, appendItems as t, createGutterGap as u, createDiffsThemeResolver as v, resolveHighlighterType as w, acquireHighlighterType as x, isWorkerContext as y };