@kerebron/legacy-compat 0.7.5 → 0.7.7

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 (435) hide show
  1. package/dist/kerebron-light.css +1 -1
  2. package/dist/kerebron.cjs +196 -1
  3. package/dist/kerebron.css +1 -1
  4. package/dist/kerebron.js +35005 -5
  5. package/dist/kerebron3.cjs.map +1 -1
  6. package/dist/kerebron3.js.map +1 -1
  7. package/package.json +1 -1
  8. package/dist/__vite-browser-external-DEj2HSsT.cjs +0 -235
  9. package/dist/__vite-browser-external-DEj2HSsT.cjs.map +0 -1
  10. package/dist/__vite-browser-external-ZW37Brf4.js +0 -56473
  11. package/dist/__vite-browser-external-ZW37Brf4.js.map +0 -1
  12. package/dist/apl-B2DGVGxc.js +0 -77
  13. package/dist/apl-B2DGVGxc.js.map +0 -1
  14. package/dist/apl-M-DNMvvR.cjs +0 -2
  15. package/dist/apl-M-DNMvvR.cjs.map +0 -1
  16. package/dist/asciiarmor-2LVJmxlE.js +0 -35
  17. package/dist/asciiarmor-2LVJmxlE.js.map +0 -1
  18. package/dist/asciiarmor-BMx3XVjX.cjs +0 -2
  19. package/dist/asciiarmor-BMx3XVjX.cjs.map +0 -1
  20. package/dist/asn1-OOsVM4yU.cjs +0 -2
  21. package/dist/asn1-OOsVM4yU.cjs.map +0 -1
  22. package/dist/asn1-jKiBa2Ya.js +0 -96
  23. package/dist/asn1-jKiBa2Ya.js.map +0 -1
  24. package/dist/asterisk-B1QUaW1C.cjs +0 -2
  25. package/dist/asterisk-B1QUaW1C.cjs.map +0 -1
  26. package/dist/asterisk-DS281yxp.js +0 -272
  27. package/dist/asterisk-DS281yxp.js.map +0 -1
  28. package/dist/brainfuck-BjUlYKdF.cjs +0 -2
  29. package/dist/brainfuck-BjUlYKdF.cjs.map +0 -1
  30. package/dist/brainfuck-C_p9pTT8.js +0 -35
  31. package/dist/brainfuck-C_p9pTT8.js.map +0 -1
  32. package/dist/clike-DE3V9X8-.js +0 -616
  33. package/dist/clike-DE3V9X8-.js.map +0 -1
  34. package/dist/clike-DLHgOXgk.cjs +0 -2
  35. package/dist/clike-DLHgOXgk.cjs.map +0 -1
  36. package/dist/clojure-Ap_IXD2I.cjs +0 -2
  37. package/dist/clojure-Ap_IXD2I.cjs.map +0 -1
  38. package/dist/clojure-CCKyeQKf.js +0 -801
  39. package/dist/clojure-CCKyeQKf.js.map +0 -1
  40. package/dist/cmake-C4D5_VmS.cjs +0 -2
  41. package/dist/cmake-C4D5_VmS.cjs.map +0 -1
  42. package/dist/cmake-CuaCgAKt.js +0 -29
  43. package/dist/cmake-CuaCgAKt.js.map +0 -1
  44. package/dist/cobol-BlTKFDRj.js +0 -73
  45. package/dist/cobol-BlTKFDRj.js.map +0 -1
  46. package/dist/cobol-Du-cT2hr.cjs +0 -2
  47. package/dist/cobol-Du-cT2hr.cjs.map +0 -1
  48. package/dist/coffeescript-BVCvwO8I.js +0 -180
  49. package/dist/coffeescript-BVCvwO8I.js.map +0 -1
  50. package/dist/coffeescript-DDFAj2ea.cjs +0 -2
  51. package/dist/coffeescript-DDFAj2ea.cjs.map +0 -1
  52. package/dist/commonlisp-CXBBRCTx.cjs +0 -2
  53. package/dist/commonlisp-CXBBRCTx.cjs.map +0 -1
  54. package/dist/commonlisp-D_kxz07b.js +0 -76
  55. package/dist/commonlisp-D_kxz07b.js.map +0 -1
  56. package/dist/crystal-D309uH6_.js +0 -218
  57. package/dist/crystal-D309uH6_.js.map +0 -1
  58. package/dist/crystal-DAFWRDbh.cjs +0 -2
  59. package/dist/crystal-DAFWRDbh.cjs.map +0 -1
  60. package/dist/cypher-BMq4Fwjl.js +0 -69
  61. package/dist/cypher-BMq4Fwjl.js.map +0 -1
  62. package/dist/cypher-BN0-oCze.cjs +0 -2
  63. package/dist/cypher-BN0-oCze.cjs.map +0 -1
  64. package/dist/d-BHsqGcfm.cjs +0 -2
  65. package/dist/d-BHsqGcfm.cjs.map +0 -1
  66. package/dist/d-BZcgY6La.js +0 -128
  67. package/dist/d-BZcgY6La.js.map +0 -1
  68. package/dist/diff-CemTHKfk.cjs +0 -2
  69. package/dist/diff-CemTHKfk.cjs.map +0 -1
  70. package/dist/diff-Cg9d_RX2.js +0 -19
  71. package/dist/diff-Cg9d_RX2.js.map +0 -1
  72. package/dist/dockerfile-BBTH3voH.cjs +0 -2
  73. package/dist/dockerfile-BBTH3voH.cjs.map +0 -1
  74. package/dist/dockerfile-DIy8NleC.js +0 -195
  75. package/dist/dockerfile-DIy8NleC.js.map +0 -1
  76. package/dist/dtd-ChoVQPwv.cjs +0 -2
  77. package/dist/dtd-ChoVQPwv.cjs.map +0 -1
  78. package/dist/dtd-CtLokQ-U.js +0 -85
  79. package/dist/dtd-CtLokQ-U.js.map +0 -1
  80. package/dist/dylan-QYeExnWK.js +0 -235
  81. package/dist/dylan-QYeExnWK.js.map +0 -1
  82. package/dist/dylan-apTQIgUA.cjs +0 -2
  83. package/dist/dylan-apTQIgUA.cjs.map +0 -1
  84. package/dist/ebnf-DUPDuY4r.js +0 -79
  85. package/dist/ebnf-DUPDuY4r.js.map +0 -1
  86. package/dist/ebnf-LYmLy17h.cjs +0 -2
  87. package/dist/ebnf-LYmLy17h.cjs.map +0 -1
  88. package/dist/ecl-C7WNQq7-.cjs +0 -2
  89. package/dist/ecl-C7WNQq7-.cjs.map +0 -1
  90. package/dist/ecl-CiXN-g_D.js +0 -122
  91. package/dist/ecl-CiXN-g_D.js.map +0 -1
  92. package/dist/eiffel-BJThA8RG.cjs +0 -2
  93. package/dist/eiffel-BJThA8RG.cjs.map +0 -1
  94. package/dist/eiffel-yQhjl4T1.js +0 -111
  95. package/dist/eiffel-yQhjl4T1.js.map +0 -1
  96. package/dist/elm-CNT9vbN0.js +0 -109
  97. package/dist/elm-CNT9vbN0.js.map +0 -1
  98. package/dist/elm-CcXP9T36.cjs +0 -2
  99. package/dist/elm-CcXP9T36.cjs.map +0 -1
  100. package/dist/erlang-B6mpcObI.cjs +0 -2
  101. package/dist/erlang-B6mpcObI.cjs.map +0 -1
  102. package/dist/erlang-CFOYdy9e.js +0 -488
  103. package/dist/erlang-CFOYdy9e.js.map +0 -1
  104. package/dist/factor-B-tsx9yW.cjs +0 -2
  105. package/dist/factor-B-tsx9yW.cjs.map +0 -1
  106. package/dist/factor-DDOC7X6P.js +0 -66
  107. package/dist/factor-DDOC7X6P.js.map +0 -1
  108. package/dist/fcl-BzAKklXo.cjs +0 -2
  109. package/dist/fcl-BzAKklXo.cjs.map +0 -1
  110. package/dist/fcl-CPC2WYrI.js +0 -104
  111. package/dist/fcl-CPC2WYrI.js.map +0 -1
  112. package/dist/forth-BmxRyE9S.js +0 -61
  113. package/dist/forth-BmxRyE9S.js.map +0 -1
  114. package/dist/forth-CPAzyZ_n.cjs +0 -2
  115. package/dist/forth-CPAzyZ_n.cjs.map +0 -1
  116. package/dist/fortran-9bvPyrOW.js +0 -443
  117. package/dist/fortran-9bvPyrOW.js.map +0 -1
  118. package/dist/fortran-DHiTlGV1.cjs +0 -2
  119. package/dist/fortran-DHiTlGV1.cjs.map +0 -1
  120. package/dist/gas-BiPtGF2E.cjs +0 -2
  121. package/dist/gas-BiPtGF2E.cjs.map +0 -1
  122. package/dist/gas-cpmYfFX2.js +0 -184
  123. package/dist/gas-cpmYfFX2.js.map +0 -1
  124. package/dist/gherkin-CJuwpceU.js +0 -35
  125. package/dist/gherkin-CJuwpceU.js.map +0 -1
  126. package/dist/gherkin-Djo7Y51D.cjs +0 -2
  127. package/dist/gherkin-Djo7Y51D.cjs.map +0 -1
  128. package/dist/go-BHVhI2MG.js +0 -156
  129. package/dist/go-BHVhI2MG.js.map +0 -1
  130. package/dist/go-BgtlNyKc.cjs +0 -2
  131. package/dist/go-BgtlNyKc.cjs.map +0 -1
  132. package/dist/groovy-BMVITiCm.cjs +0 -2
  133. package/dist/groovy-BMVITiCm.cjs.map +0 -1
  134. package/dist/groovy-DZeT_VM-.js +0 -147
  135. package/dist/groovy-DZeT_VM-.js.map +0 -1
  136. package/dist/haskell-C46lNFBv.cjs +0 -2
  137. package/dist/haskell-C46lNFBv.cjs.map +0 -1
  138. package/dist/haskell-CxiO_7JL.js +0 -376
  139. package/dist/haskell-CxiO_7JL.js.map +0 -1
  140. package/dist/haxe-BhV0x0nk.js +0 -337
  141. package/dist/haxe-BhV0x0nk.js.map +0 -1
  142. package/dist/haxe-G9XvbXZx.cjs +0 -2
  143. package/dist/haxe-G9XvbXZx.cjs.map +0 -1
  144. package/dist/http-BkLifcnL.cjs +0 -2
  145. package/dist/http-BkLifcnL.cjs.map +0 -1
  146. package/dist/http-D9LttvKF.js +0 -45
  147. package/dist/http-D9LttvKF.js.map +0 -1
  148. package/dist/idl-B6TRFYjl.js +0 -948
  149. package/dist/idl-B6TRFYjl.js.map +0 -1
  150. package/dist/idl-FmHDmsE-.cjs +0 -2
  151. package/dist/idl-FmHDmsE-.cjs.map +0 -1
  152. package/dist/index-1FwPug-t.js +0 -961
  153. package/dist/index-1FwPug-t.js.map +0 -1
  154. package/dist/index-B6dEzV2b.cjs +0 -2
  155. package/dist/index-B6dEzV2b.cjs.map +0 -1
  156. package/dist/index-B7gU7Fh_.js +0 -613
  157. package/dist/index-B7gU7Fh_.js.map +0 -1
  158. package/dist/index-B8srnV19.js +0 -1306
  159. package/dist/index-B8srnV19.js.map +0 -1
  160. package/dist/index-BBMh0BvB.js +0 -63
  161. package/dist/index-BBMh0BvB.js.map +0 -1
  162. package/dist/index-BQ530BQl.cjs +0 -2
  163. package/dist/index-BQ530BQl.cjs.map +0 -1
  164. package/dist/index-BUEvxYg1.cjs +0 -4
  165. package/dist/index-BUEvxYg1.cjs.map +0 -1
  166. package/dist/index-BZ5P3Kv0.cjs +0 -7
  167. package/dist/index-BZ5P3Kv0.cjs.map +0 -1
  168. package/dist/index-BvLgnTK0.cjs +0 -2
  169. package/dist/index-BvLgnTK0.cjs.map +0 -1
  170. package/dist/index-Byc1bIE2.js +0 -310
  171. package/dist/index-Byc1bIE2.js.map +0 -1
  172. package/dist/index-BzuM7CSO.js +0 -77
  173. package/dist/index-BzuM7CSO.js.map +0 -1
  174. package/dist/index-CQpRl1to.js +0 -303
  175. package/dist/index-CQpRl1to.js.map +0 -1
  176. package/dist/index-CYSjCryY.cjs +0 -2
  177. package/dist/index-CYSjCryY.cjs.map +0 -1
  178. package/dist/index-Cb9pkCYO.js +0 -158
  179. package/dist/index-Cb9pkCYO.js.map +0 -1
  180. package/dist/index-CcIqnmcV.js +0 -60
  181. package/dist/index-CcIqnmcV.js.map +0 -1
  182. package/dist/index-CdGHKsNJ.cjs +0 -2
  183. package/dist/index-CdGHKsNJ.cjs.map +0 -1
  184. package/dist/index-CsNjufUm.cjs +0 -3
  185. package/dist/index-CsNjufUm.cjs.map +0 -1
  186. package/dist/index-D0nsdJs5.js +0 -95
  187. package/dist/index-D0nsdJs5.js.map +0 -1
  188. package/dist/index-D203InKa.cjs +0 -2
  189. package/dist/index-D203InKa.cjs.map +0 -1
  190. package/dist/index-DBCbd-3W.cjs +0 -2
  191. package/dist/index-DBCbd-3W.cjs.map +0 -1
  192. package/dist/index-DPNQvgDc.cjs +0 -14
  193. package/dist/index-DPNQvgDc.cjs.map +0 -1
  194. package/dist/index-D__6kAHa.js +0 -1918
  195. package/dist/index-D__6kAHa.js.map +0 -1
  196. package/dist/index-DjzVrRux.cjs +0 -2
  197. package/dist/index-DjzVrRux.cjs.map +0 -1
  198. package/dist/index-DkicjISi.cjs +0 -2
  199. package/dist/index-DkicjISi.cjs.map +0 -1
  200. package/dist/index-DvZkiV6W.cjs +0 -2
  201. package/dist/index-DvZkiV6W.cjs.map +0 -1
  202. package/dist/index-E9rwTPVg.cjs +0 -2
  203. package/dist/index-E9rwTPVg.cjs.map +0 -1
  204. package/dist/index-Hy59UYbT.js +0 -566
  205. package/dist/index-Hy59UYbT.js.map +0 -1
  206. package/dist/index-MOkOI4Tj.js +0 -554
  207. package/dist/index-MOkOI4Tj.js.map +0 -1
  208. package/dist/index-qEqiXfAO.js +0 -946
  209. package/dist/index-qEqiXfAO.js.map +0 -1
  210. package/dist/index-yxAWy9bG.js +0 -139
  211. package/dist/index-yxAWy9bG.js.map +0 -1
  212. package/dist/jinja2-DnB6dQmV.js +0 -155
  213. package/dist/jinja2-DnB6dQmV.js.map +0 -1
  214. package/dist/jinja2-wbVbDTNi.cjs +0 -2
  215. package/dist/jinja2-wbVbDTNi.cjs.map +0 -1
  216. package/dist/julia-DA67Qw9E.cjs +0 -2
  217. package/dist/julia-DA67Qw9E.cjs.map +0 -1
  218. package/dist/julia-DpvXAuO6.js +0 -242
  219. package/dist/julia-DpvXAuO6.js.map +0 -1
  220. package/dist/livescript-Bg3URadp.cjs +0 -2
  221. package/dist/livescript-Bg3URadp.cjs.map +0 -1
  222. package/dist/livescript-CanGTf8u.js +0 -273
  223. package/dist/livescript-CanGTf8u.js.map +0 -1
  224. package/dist/lua-CIsxjGwi.cjs +0 -2
  225. package/dist/lua-CIsxjGwi.cjs.map +0 -1
  226. package/dist/lua-XplVlWi_.js +0 -218
  227. package/dist/lua-XplVlWi_.js.map +0 -1
  228. package/dist/mathematica-BG089QIc.cjs +0 -2
  229. package/dist/mathematica-BG089QIc.cjs.map +0 -1
  230. package/dist/mathematica-jaRHnSxC.js +0 -36
  231. package/dist/mathematica-jaRHnSxC.js.map +0 -1
  232. package/dist/mbox-BctzC1hL.js +0 -77
  233. package/dist/mbox-BctzC1hL.js.map +0 -1
  234. package/dist/mbox-CySolFFZ.cjs +0 -2
  235. package/dist/mbox-CySolFFZ.cjs.map +0 -1
  236. package/dist/mirc-BfqEffzk.cjs +0 -2
  237. package/dist/mirc-BfqEffzk.cjs.map +0 -1
  238. package/dist/mirc-CFBPAOaF.js +0 -73
  239. package/dist/mirc-CFBPAOaF.js.map +0 -1
  240. package/dist/mllike-CBK_zjnT.cjs +0 -2
  241. package/dist/mllike-CBK_zjnT.cjs.map +0 -1
  242. package/dist/mllike-gvRenHsu.js +0 -273
  243. package/dist/mllike-gvRenHsu.js.map +0 -1
  244. package/dist/modelica-B6Zhcb-M.cjs +0 -2
  245. package/dist/modelica-B6Zhcb-M.cjs.map +0 -1
  246. package/dist/modelica-vUgVs--1.js +0 -94
  247. package/dist/modelica-vUgVs--1.js.map +0 -1
  248. package/dist/mscgen-B_Dg_s1G.cjs +0 -2
  249. package/dist/mscgen-B_Dg_s1G.cjs.map +0 -1
  250. package/dist/mscgen-ucEwbOaK.js +0 -82
  251. package/dist/mscgen-ucEwbOaK.js.map +0 -1
  252. package/dist/mumps-CQoS1kWX.js +0 -26
  253. package/dist/mumps-CQoS1kWX.js.map +0 -1
  254. package/dist/mumps-wfyQdxSu.cjs +0 -2
  255. package/dist/mumps-wfyQdxSu.cjs.map +0 -1
  256. package/dist/nginx-CwqyBUfA.cjs +0 -2
  257. package/dist/nginx-CwqyBUfA.cjs.map +0 -1
  258. package/dist/nginx-zDPm3Z74.js +0 -90
  259. package/dist/nginx-zDPm3Z74.js.map +0 -1
  260. package/dist/nsis-DPj2fUaP.cjs +0 -2
  261. package/dist/nsis-DPj2fUaP.cjs.map +0 -1
  262. package/dist/nsis-fePjrhq7.js +0 -63
  263. package/dist/nsis-fePjrhq7.js.map +0 -1
  264. package/dist/ntriples-CsNjv2QF.js +0 -80
  265. package/dist/ntriples-CsNjv2QF.js.map +0 -1
  266. package/dist/ntriples-DgwJmozm.cjs +0 -2
  267. package/dist/ntriples-DgwJmozm.cjs.map +0 -1
  268. package/dist/octave-1pkKrgAA.cjs +0 -2
  269. package/dist/octave-1pkKrgAA.cjs.map +0 -1
  270. package/dist/octave-C8PmmSRH.js +0 -144
  271. package/dist/octave-C8PmmSRH.js.map +0 -1
  272. package/dist/oz-BXOZCt0U.cjs +0 -2
  273. package/dist/oz-BXOZCt0U.cjs.map +0 -1
  274. package/dist/oz-Ce8aN8oE.js +0 -152
  275. package/dist/oz-Ce8aN8oE.js.map +0 -1
  276. package/dist/pascal-De0D6mP7.js +0 -78
  277. package/dist/pascal-De0D6mP7.js.map +0 -1
  278. package/dist/pascal-DtY2LEkJ.cjs +0 -2
  279. package/dist/pascal-DtY2LEkJ.cjs.map +0 -1
  280. package/dist/perl-B4bSCe1C.js +0 -916
  281. package/dist/perl-B4bSCe1C.js.map +0 -1
  282. package/dist/perl-CVDWbEju.cjs +0 -2
  283. package/dist/perl-CVDWbEju.cjs.map +0 -1
  284. package/dist/pig-D24Z8EXi.js +0 -55
  285. package/dist/pig-D24Z8EXi.js.map +0 -1
  286. package/dist/pig-DMByOrnr.cjs +0 -2
  287. package/dist/pig-DMByOrnr.cjs.map +0 -1
  288. package/dist/powershell-BaoYaFvj.cjs +0 -2
  289. package/dist/powershell-BaoYaFvj.cjs.map +0 -1
  290. package/dist/powershell-DkYVfTzP.js +0 -250
  291. package/dist/powershell-DkYVfTzP.js.map +0 -1
  292. package/dist/properties-DXHJZ3WE.cjs +0 -2
  293. package/dist/properties-DXHJZ3WE.cjs.map +0 -1
  294. package/dist/properties-Dn9wna3M.js +0 -27
  295. package/dist/properties-Dn9wna3M.js.map +0 -1
  296. package/dist/protobuf-BKhXdfH6.cjs +0 -2
  297. package/dist/protobuf-BKhXdfH6.cjs.map +0 -1
  298. package/dist/protobuf-BPIjwpzm.js +0 -50
  299. package/dist/protobuf-BPIjwpzm.js.map +0 -1
  300. package/dist/puppet-8mAyuMbW.cjs +0 -2
  301. package/dist/puppet-8mAyuMbW.cjs.map +0 -1
  302. package/dist/puppet-nyd4dhjf.js +0 -46
  303. package/dist/puppet-nyd4dhjf.js.map +0 -1
  304. package/dist/q-BPQ45Nxu.cjs +0 -2
  305. package/dist/q-BPQ45Nxu.cjs.map +0 -1
  306. package/dist/q-DXjKs-tC.js +0 -84
  307. package/dist/q-DXjKs-tC.js.map +0 -1
  308. package/dist/r-LKEuhEGI.js +0 -105
  309. package/dist/r-LKEuhEGI.js.map +0 -1
  310. package/dist/r-r2_EZsON.cjs +0 -2
  311. package/dist/r-r2_EZsON.cjs.map +0 -1
  312. package/dist/rpm-BoAefZZ1.js +0 -50
  313. package/dist/rpm-BoAefZZ1.js.map +0 -1
  314. package/dist/rpm-C6UDHByS.cjs +0 -2
  315. package/dist/rpm-C6UDHByS.cjs.map +0 -1
  316. package/dist/ruby-CcYfvIk6.js +0 -229
  317. package/dist/ruby-CcYfvIk6.js.map +0 -1
  318. package/dist/ruby-Cn1sFkZF.cjs +0 -2
  319. package/dist/ruby-Cn1sFkZF.cjs.map +0 -1
  320. package/dist/sas-7E8yHoCW.js +0 -106
  321. package/dist/sas-7E8yHoCW.js.map +0 -1
  322. package/dist/sas-DAGcJy94.cjs +0 -2
  323. package/dist/sas-DAGcJy94.cjs.map +0 -1
  324. package/dist/scheme-B0ZrbojV.cjs +0 -2
  325. package/dist/scheme-B0ZrbojV.cjs.map +0 -1
  326. package/dist/scheme-DjibxsNh.js +0 -125
  327. package/dist/scheme-DjibxsNh.js.map +0 -1
  328. package/dist/shell-BMYo43V6.cjs +0 -2
  329. package/dist/shell-BMYo43V6.cjs.map +0 -1
  330. package/dist/shell-C0C2sNA_.js +0 -183
  331. package/dist/shell-C0C2sNA_.js.map +0 -1
  332. package/dist/simple-mode-B0dvCdAA.js +0 -90
  333. package/dist/simple-mode-B0dvCdAA.js.map +0 -1
  334. package/dist/simple-mode-BIKNPBes.cjs +0 -2
  335. package/dist/simple-mode-BIKNPBes.cjs.map +0 -1
  336. package/dist/smalltalk-Bhddl2pB.js +0 -49
  337. package/dist/smalltalk-Bhddl2pB.js.map +0 -1
  338. package/dist/smalltalk-CSslY-3i.cjs +0 -2
  339. package/dist/smalltalk-CSslY-3i.cjs.map +0 -1
  340. package/dist/solr-A1kSnAwJ.cjs +0 -2
  341. package/dist/solr-A1kSnAwJ.cjs.map +0 -1
  342. package/dist/solr-BNlsLglM.js +0 -42
  343. package/dist/solr-BNlsLglM.js.map +0 -1
  344. package/dist/sparql-DnHMBLLY.cjs +0 -2
  345. package/dist/sparql-DnHMBLLY.cjs.map +0 -1
  346. package/dist/sparql-FarWu_Gb.js +0 -198
  347. package/dist/sparql-FarWu_Gb.js.map +0 -1
  348. package/dist/spreadsheet-B7_BK8hB.cjs +0 -2
  349. package/dist/spreadsheet-B7_BK8hB.cjs.map +0 -1
  350. package/dist/spreadsheet-C-cy4P5N.js +0 -50
  351. package/dist/spreadsheet-C-cy4P5N.js.map +0 -1
  352. package/dist/stex-B4wyjEnp.cjs +0 -2
  353. package/dist/stex-B4wyjEnp.cjs.map +0 -1
  354. package/dist/stex-Du4h4KAU.js +0 -130
  355. package/dist/stex-Du4h4KAU.js.map +0 -1
  356. package/dist/stylus-B3vYZZY8.cjs +0 -2
  357. package/dist/stylus-B3vYZZY8.cjs.map +0 -1
  358. package/dist/stylus-DRcbY16X.js +0 -251
  359. package/dist/stylus-DRcbY16X.js.map +0 -1
  360. package/dist/swift-DGw6Cgu8.cjs +0 -2
  361. package/dist/swift-DGw6Cgu8.cjs.map +0 -1
  362. package/dist/swift-DSxqR9R6.js +0 -231
  363. package/dist/swift-DSxqR9R6.js.map +0 -1
  364. package/dist/tcl-ByLXbQFo.cjs +0 -2
  365. package/dist/tcl-ByLXbQFo.cjs.map +0 -1
  366. package/dist/tcl-xfoLljhY.js +0 -82
  367. package/dist/tcl-xfoLljhY.js.map +0 -1
  368. package/dist/textile-D1AWE-pc.js +0 -296
  369. package/dist/textile-D1AWE-pc.js.map +0 -1
  370. package/dist/textile-iryw-lTw.cjs +0 -2
  371. package/dist/textile-iryw-lTw.cjs.map +0 -1
  372. package/dist/tiddlywiki-5wqsXtSk.js +0 -156
  373. package/dist/tiddlywiki-5wqsXtSk.js.map +0 -1
  374. package/dist/tiddlywiki-D8IJz1k7.cjs +0 -2
  375. package/dist/tiddlywiki-D8IJz1k7.cjs.map +0 -1
  376. package/dist/tiki-C5p5KSQK.cjs +0 -2
  377. package/dist/tiki-C5p5KSQK.cjs.map +0 -1
  378. package/dist/tiki-__Kn3CeS.js +0 -182
  379. package/dist/tiki-__Kn3CeS.js.map +0 -1
  380. package/dist/toml-3ZsH_4Qa.cjs +0 -2
  381. package/dist/toml-3ZsH_4Qa.cjs.map +0 -1
  382. package/dist/toml-BHiuTcfn.js +0 -50
  383. package/dist/toml-BHiuTcfn.js.map +0 -1
  384. package/dist/troff-D-3QCOYN.cjs +0 -2
  385. package/dist/troff-D-3QCOYN.cjs.map +0 -1
  386. package/dist/troff-D2UO-fKf.js +0 -36
  387. package/dist/troff-D2UO-fKf.js.map +0 -1
  388. package/dist/ttcn-Bsa4sfRm.js +0 -124
  389. package/dist/ttcn-Bsa4sfRm.js.map +0 -1
  390. package/dist/ttcn-C2MXAqcM.cjs +0 -2
  391. package/dist/ttcn-C2MXAqcM.cjs.map +0 -1
  392. package/dist/turtle-DSJNatSv.cjs +0 -2
  393. package/dist/turtle-DSJNatSv.cjs.map +0 -1
  394. package/dist/turtle-xwJUxoPV.js +0 -81
  395. package/dist/turtle-xwJUxoPV.js.map +0 -1
  396. package/dist/vb-c2kQGd6-.js +0 -75
  397. package/dist/vb-c2kQGd6-.js.map +0 -1
  398. package/dist/vb-qzHzzvyB.cjs +0 -2
  399. package/dist/vb-qzHzzvyB.cjs.map +0 -1
  400. package/dist/vbscript-1f_Dhg5H.js +0 -325
  401. package/dist/vbscript-1f_Dhg5H.js.map +0 -1
  402. package/dist/vbscript-CWm8v9tE.cjs +0 -2
  403. package/dist/vbscript-CWm8v9tE.cjs.map +0 -1
  404. package/dist/velocity-D3_yAIp3.cjs +0 -2
  405. package/dist/velocity-D3_yAIp3.cjs.map +0 -1
  406. package/dist/velocity-DJd0pTTC.js +0 -97
  407. package/dist/velocity-DJd0pTTC.js.map +0 -1
  408. package/dist/verilog-BOhLNmQo.cjs +0 -2
  409. package/dist/verilog-BOhLNmQo.cjs.map +0 -1
  410. package/dist/verilog-CiS1jyi5.js +0 -263
  411. package/dist/verilog-CiS1jyi5.js.map +0 -1
  412. package/dist/vhdl-CMFbi8Im.cjs +0 -2
  413. package/dist/vhdl-CMFbi8Im.cjs.map +0 -1
  414. package/dist/vhdl-T9HkrbI2.js +0 -107
  415. package/dist/vhdl-T9HkrbI2.js.map +0 -1
  416. package/dist/webidl-CWb_flNk.cjs +0 -2
  417. package/dist/webidl-CWb_flNk.cjs.map +0 -1
  418. package/dist/webidl-CjfDENEo.js +0 -156
  419. package/dist/webidl-CjfDENEo.js.map +0 -1
  420. package/dist/xquery-Ct6lEb4B.js +0 -423
  421. package/dist/xquery-Ct6lEb4B.js.map +0 -1
  422. package/dist/xquery-mbJFEpkV.cjs +0 -2
  423. package/dist/xquery-mbJFEpkV.cjs.map +0 -1
  424. package/dist/yacas-C0absKBh.js +0 -74
  425. package/dist/yacas-C0absKBh.js.map +0 -1
  426. package/dist/yacas-urx_N5C8.cjs +0 -2
  427. package/dist/yacas-urx_N5C8.cjs.map +0 -1
  428. package/dist/yaml-CSixJMdf.cjs +0 -2
  429. package/dist/yaml-CSixJMdf.cjs.map +0 -1
  430. package/dist/yaml-Dt6Tp2eU.js +0 -54
  431. package/dist/yaml-Dt6Tp2eU.js.map +0 -1
  432. package/dist/z80-CsG3CM6M.cjs +0 -2
  433. package/dist/z80-CsG3CM6M.cjs.map +0 -1
  434. package/dist/z80-Pki2zAjW.js +0 -62
  435. package/dist/z80-Pki2zAjW.js.map +0 -1
@@ -1,1918 +0,0 @@
1
- import { P as st, j as Q, k as v, o as it, N as Ee, s as Ie, p as ot, t as m, T as H, E as at, q as lt, L as fe, r as ht, u as ft, v as ut, w as dt, e as X, m as P, x as z, y as pt, f as Me, i as ct, z as mt, C as gt, A as kt, B as ue, F as Lt } from "./__vite-browser-external-ZW37Brf4.js";
2
- import { html as bt, htmlCompletionSource as wt } from "./index-qEqiXfAO.js";
3
- class U {
4
- static create(e, r, n, s, i) {
5
- let o = s + (s << 8) + e + (r << 4) | 0;
6
- return new U(e, r, n, o, i, [], []);
7
- }
8
- constructor(e, r, n, s, i, o, a) {
9
- this.type = e, this.value = r, this.from = n, this.hash = s, this.end = i, this.children = o, this.positions = a, this.hashProp = [[v.contextHash, s]];
10
- }
11
- addChild(e, r) {
12
- e.prop(v.contextHash) != this.hash && (e = new H(e.type, e.children, e.positions, e.length, this.hashProp)), this.children.push(e), this.positions.push(r);
13
- }
14
- toTree(e, r = this.end) {
15
- let n = this.children.length - 1;
16
- return n >= 0 && (r = Math.max(r, this.positions[n] + this.children[n].length + this.from)), new H(e.types[this.type], this.children, this.positions, r - this.from).balance({
17
- makeTree: (s, i, o) => new H(Q.none, s, i, o, this.hashProp)
18
- });
19
- }
20
- }
21
- var u;
22
- (function(t) {
23
- t[t.Document = 1] = "Document", t[t.CodeBlock = 2] = "CodeBlock", t[t.FencedCode = 3] = "FencedCode", t[t.Blockquote = 4] = "Blockquote", t[t.HorizontalRule = 5] = "HorizontalRule", t[t.BulletList = 6] = "BulletList", t[t.OrderedList = 7] = "OrderedList", t[t.ListItem = 8] = "ListItem", t[t.ATXHeading1 = 9] = "ATXHeading1", t[t.ATXHeading2 = 10] = "ATXHeading2", t[t.ATXHeading3 = 11] = "ATXHeading3", t[t.ATXHeading4 = 12] = "ATXHeading4", t[t.ATXHeading5 = 13] = "ATXHeading5", t[t.ATXHeading6 = 14] = "ATXHeading6", t[t.SetextHeading1 = 15] = "SetextHeading1", t[t.SetextHeading2 = 16] = "SetextHeading2", t[t.HTMLBlock = 17] = "HTMLBlock", t[t.LinkReference = 18] = "LinkReference", t[t.Paragraph = 19] = "Paragraph", t[t.CommentBlock = 20] = "CommentBlock", t[t.ProcessingInstructionBlock = 21] = "ProcessingInstructionBlock", t[t.Escape = 22] = "Escape", t[t.Entity = 23] = "Entity", t[t.HardBreak = 24] = "HardBreak", t[t.Emphasis = 25] = "Emphasis", t[t.StrongEmphasis = 26] = "StrongEmphasis", t[t.Link = 27] = "Link", t[t.Image = 28] = "Image", t[t.InlineCode = 29] = "InlineCode", t[t.HTMLTag = 30] = "HTMLTag", t[t.Comment = 31] = "Comment", t[t.ProcessingInstruction = 32] = "ProcessingInstruction", t[t.Autolink = 33] = "Autolink", t[t.HeaderMark = 34] = "HeaderMark", t[t.QuoteMark = 35] = "QuoteMark", t[t.ListMark = 36] = "ListMark", t[t.LinkMark = 37] = "LinkMark", t[t.EmphasisMark = 38] = "EmphasisMark", t[t.CodeMark = 39] = "CodeMark", t[t.CodeText = 40] = "CodeText", t[t.CodeInfo = 41] = "CodeInfo", t[t.LinkTitle = 42] = "LinkTitle", t[t.LinkLabel = 43] = "LinkLabel", t[t.URL = 44] = "URL";
24
- })(u || (u = {}));
25
- class St {
26
- /**
27
- @internal
28
- */
29
- constructor(e, r) {
30
- this.start = e, this.content = r, this.marks = [], this.parsers = [];
31
- }
32
- }
33
- class Ct {
34
- constructor() {
35
- this.text = "", this.baseIndent = 0, this.basePos = 0, this.depth = 0, this.markers = [], this.pos = 0, this.indent = 0, this.next = -1;
36
- }
37
- /**
38
- @internal
39
- */
40
- forward() {
41
- this.basePos > this.pos && this.forwardInner();
42
- }
43
- /**
44
- @internal
45
- */
46
- forwardInner() {
47
- let e = this.skipSpace(this.basePos);
48
- this.indent = this.countIndent(e, this.pos, this.indent), this.pos = e, this.next = e == this.text.length ? -1 : this.text.charCodeAt(e);
49
- }
50
- /**
51
- Skip whitespace after the given position, return the position of
52
- the next non-space character or the end of the line if there's
53
- only space after `from`.
54
- */
55
- skipSpace(e) {
56
- return O(this.text, e);
57
- }
58
- /**
59
- @internal
60
- */
61
- reset(e) {
62
- for (this.text = e, this.baseIndent = this.basePos = this.pos = this.indent = 0, this.forwardInner(), this.depth = 1; this.markers.length; )
63
- this.markers.pop();
64
- }
65
- /**
66
- Move the line's base position forward to the given position.
67
- This should only be called by composite [block
68
- parsers](#BlockParser.parse) or [markup skipping
69
- functions](#NodeSpec.composite).
70
- */
71
- moveBase(e) {
72
- this.basePos = e, this.baseIndent = this.countIndent(e, this.pos, this.indent);
73
- }
74
- /**
75
- Move the line's base position forward to the given _column_.
76
- */
77
- moveBaseColumn(e) {
78
- this.baseIndent = e, this.basePos = this.findColumn(e);
79
- }
80
- /**
81
- Store a composite-block-level marker. Should be called from
82
- [markup skipping functions](#NodeSpec.composite) when they
83
- consume any non-whitespace characters.
84
- */
85
- addMarker(e) {
86
- this.markers.push(e);
87
- }
88
- /**
89
- Find the column position at `to`, optionally starting at a given
90
- position and column.
91
- */
92
- countIndent(e, r = 0, n = 0) {
93
- for (let s = r; s < e; s++)
94
- n += this.text.charCodeAt(s) == 9 ? 4 - n % 4 : 1;
95
- return n;
96
- }
97
- /**
98
- Find the position corresponding to the given column.
99
- */
100
- findColumn(e) {
101
- let r = 0;
102
- for (let n = 0; r < this.text.length && n < e; r++)
103
- n += this.text.charCodeAt(r) == 9 ? 4 - n % 4 : 1;
104
- return r;
105
- }
106
- /**
107
- @internal
108
- */
109
- scrub() {
110
- if (!this.baseIndent)
111
- return this.text;
112
- let e = "";
113
- for (let r = 0; r < this.basePos; r++)
114
- e += " ";
115
- return e + this.text.slice(this.basePos);
116
- }
117
- }
118
- function de(t, e, r) {
119
- if (r.pos == r.text.length || t != e.block && r.indent >= e.stack[r.depth + 1].value + r.baseIndent)
120
- return !0;
121
- if (r.indent >= r.baseIndent + 4)
122
- return !1;
123
- let n = (t.type == u.OrderedList ? oe : ie)(r, e, !1);
124
- return n > 0 && (t.type != u.BulletList || se(r, e, !1) < 0) && r.text.charCodeAt(r.pos + n - 1) == t.value;
125
- }
126
- const He = {
127
- [u.Blockquote](t, e, r) {
128
- return r.next != 62 ? !1 : (r.markers.push(g(u.QuoteMark, e.lineStart + r.pos, e.lineStart + r.pos + 1)), r.moveBase(r.pos + (x(r.text.charCodeAt(r.pos + 1)) ? 2 : 1)), t.end = e.lineStart + r.text.length, !0);
129
- },
130
- [u.ListItem](t, e, r) {
131
- return r.indent < r.baseIndent + t.value && r.next > -1 ? !1 : (r.moveBaseColumn(r.baseIndent + t.value), !0);
132
- },
133
- [u.OrderedList]: de,
134
- [u.BulletList]: de,
135
- [u.Document]() {
136
- return !0;
137
- }
138
- };
139
- function x(t) {
140
- return t == 32 || t == 9 || t == 10 || t == 13;
141
- }
142
- function O(t, e = 0) {
143
- for (; e < t.length && x(t.charCodeAt(e)); )
144
- e++;
145
- return e;
146
- }
147
- function pe(t, e, r) {
148
- for (; e > r && x(t.charCodeAt(e - 1)); )
149
- e--;
150
- return e;
151
- }
152
- function Pe(t) {
153
- if (t.next != 96 && t.next != 126)
154
- return -1;
155
- let e = t.pos + 1;
156
- for (; e < t.text.length && t.text.charCodeAt(e) == t.next; )
157
- e++;
158
- if (e < t.pos + 3)
159
- return -1;
160
- if (t.next == 96) {
161
- for (let r = e; r < t.text.length; r++)
162
- if (t.text.charCodeAt(r) == 96)
163
- return -1;
164
- }
165
- return e;
166
- }
167
- function ve(t) {
168
- return t.next != 62 ? -1 : t.text.charCodeAt(t.pos + 1) == 32 ? 2 : 1;
169
- }
170
- function se(t, e, r) {
171
- if (t.next != 42 && t.next != 45 && t.next != 95)
172
- return -1;
173
- let n = 1;
174
- for (let s = t.pos + 1; s < t.text.length; s++) {
175
- let i = t.text.charCodeAt(s);
176
- if (i == t.next)
177
- n++;
178
- else if (!x(i))
179
- return -1;
180
- }
181
- return r && t.next == 45 && Re(t) > -1 && t.depth == e.stack.length && e.parser.leafBlockParsers.indexOf(De.SetextHeading) > -1 || n < 3 ? -1 : 1;
182
- }
183
- function Ne(t, e) {
184
- for (let r = t.stack.length - 1; r >= 0; r--)
185
- if (t.stack[r].type == e)
186
- return !0;
187
- return !1;
188
- }
189
- function ie(t, e, r) {
190
- return (t.next == 45 || t.next == 43 || t.next == 42) && (t.pos == t.text.length - 1 || x(t.text.charCodeAt(t.pos + 1))) && (!r || Ne(e, u.BulletList) || t.skipSpace(t.pos + 2) < t.text.length) ? 1 : -1;
191
- }
192
- function oe(t, e, r) {
193
- let n = t.pos, s = t.next;
194
- for (; s >= 48 && s <= 57; ) {
195
- n++;
196
- if (n == t.text.length)
197
- return -1;
198
- s = t.text.charCodeAt(n);
199
- }
200
- return n == t.pos || n > t.pos + 9 || s != 46 && s != 41 || n < t.text.length - 1 && !x(t.text.charCodeAt(n + 1)) || r && !Ne(e, u.OrderedList) && (t.skipSpace(n + 1) == t.text.length || n > t.pos + 1 || t.next != 49) ? -1 : n + 1 - t.pos;
201
- }
202
- function ye(t) {
203
- if (t.next != 35)
204
- return -1;
205
- let e = t.pos + 1;
206
- for (; e < t.text.length && t.text.charCodeAt(e) == 35; )
207
- e++;
208
- if (e < t.text.length && t.text.charCodeAt(e) != 32)
209
- return -1;
210
- let r = e - t.pos;
211
- return r > 6 ? -1 : r;
212
- }
213
- function Re(t) {
214
- if (t.next != 45 && t.next != 61 || t.indent >= t.baseIndent + 4)
215
- return -1;
216
- let e = t.pos + 1;
217
- for (; e < t.text.length && t.text.charCodeAt(e) == t.next; )
218
- e++;
219
- let r = e;
220
- for (; e < t.text.length && x(t.text.charCodeAt(e)); )
221
- e++;
222
- return e == t.text.length ? r : -1;
223
- }
224
- const W = /^[ \t]*$/, Oe = /-->/, Te = /\?>/, ee = [
225
- [/^<(?:script|pre|style)(?:\s|>|$)/i, /<\/(?:script|pre|style)>/i],
226
- [/^\s*<!--/, Oe],
227
- [/^\s*<\?/, Te],
228
- [/^\s*<![A-Z]/, />/],
229
- [/^\s*<!\[CDATA\[/, /\]\]>/],
230
- [/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i, W],
231
- [/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i, W]
232
- ];
233
- function ze(t, e, r) {
234
- if (t.next != 60)
235
- return -1;
236
- let n = t.text.slice(t.pos);
237
- for (let s = 0, i = ee.length - (r ? 1 : 0); s < i; s++)
238
- if (ee[s][0].test(n))
239
- return s;
240
- return -1;
241
- }
242
- function ce(t, e) {
243
- let r = t.countIndent(e, t.pos, t.indent), n = t.countIndent(t.skipSpace(e), e, r);
244
- return n >= r + 5 ? r + 1 : n;
245
- }
246
- function I(t, e, r) {
247
- let n = t.length - 1;
248
- n >= 0 && t[n].to == e && t[n].type == u.CodeText ? t[n].to = r : t.push(g(u.CodeText, e, r));
249
- }
250
- const $ = {
251
- LinkReference: void 0,
252
- IndentedCode(t, e) {
253
- let r = e.baseIndent + 4;
254
- if (e.indent < r)
255
- return !1;
256
- let n = e.findColumn(r), s = t.lineStart + n, i = t.lineStart + e.text.length, o = [], a = [];
257
- for (I(o, s, i); t.nextLine() && e.depth >= t.stack.length; )
258
- if (e.pos == e.text.length) {
259
- I(a, t.lineStart - 1, t.lineStart);
260
- for (let l of e.markers)
261
- a.push(l);
262
- } else {
263
- if (e.indent < r)
264
- break;
265
- {
266
- if (a.length) {
267
- for (let h of a)
268
- h.type == u.CodeText ? I(o, h.from, h.to) : o.push(h);
269
- a = [];
270
- }
271
- I(o, t.lineStart - 1, t.lineStart);
272
- for (let h of e.markers)
273
- o.push(h);
274
- i = t.lineStart + e.text.length;
275
- let l = t.lineStart + e.findColumn(e.baseIndent + 4);
276
- l < i && I(o, l, i);
277
- }
278
- }
279
- return a.length && (a = a.filter((l) => l.type != u.CodeText), a.length && (e.markers = a.concat(e.markers))), t.addNode(t.buffer.writeElements(o, -s).finish(u.CodeBlock, i - s), s), !0;
280
- },
281
- FencedCode(t, e) {
282
- let r = Pe(e);
283
- if (r < 0)
284
- return !1;
285
- let n = t.lineStart + e.pos, s = e.next, i = r - e.pos, o = e.skipSpace(r), a = pe(e.text, e.text.length, o), l = [g(u.CodeMark, n, n + i)];
286
- o < a && l.push(g(u.CodeInfo, t.lineStart + o, t.lineStart + a));
287
- for (let h = !0; t.nextLine() && e.depth >= t.stack.length; h = !1) {
288
- let f = e.pos;
289
- if (e.indent - e.baseIndent < 4)
290
- for (; f < e.text.length && e.text.charCodeAt(f) == s; )
291
- f++;
292
- if (f - e.pos >= i && e.skipSpace(f) == e.text.length) {
293
- for (let p of e.markers)
294
- l.push(p);
295
- l.push(g(u.CodeMark, t.lineStart + e.pos, t.lineStart + f)), t.nextLine();
296
- break;
297
- } else {
298
- h || I(l, t.lineStart - 1, t.lineStart);
299
- for (let c of e.markers)
300
- l.push(c);
301
- let p = t.lineStart + e.basePos, d = t.lineStart + e.text.length;
302
- p < d && I(l, p, d);
303
- }
304
- }
305
- return t.addNode(t.buffer.writeElements(l, -n).finish(u.FencedCode, t.prevLineEnd() - n), n), !0;
306
- },
307
- Blockquote(t, e) {
308
- let r = ve(e);
309
- return r < 0 ? !1 : (t.startContext(u.Blockquote, e.pos), t.addNode(u.QuoteMark, t.lineStart + e.pos, t.lineStart + e.pos + 1), e.moveBase(e.pos + r), null);
310
- },
311
- HorizontalRule(t, e) {
312
- if (se(e, t, !1) < 0)
313
- return !1;
314
- let r = t.lineStart + e.pos;
315
- return t.nextLine(), t.addNode(u.HorizontalRule, r), !0;
316
- },
317
- BulletList(t, e) {
318
- let r = ie(e, t, !1);
319
- if (r < 0)
320
- return !1;
321
- t.block.type != u.BulletList && t.startContext(u.BulletList, e.basePos, e.next);
322
- let n = ce(e, e.pos + 1);
323
- return t.startContext(u.ListItem, e.basePos, n - e.baseIndent), t.addNode(u.ListMark, t.lineStart + e.pos, t.lineStart + e.pos + r), e.moveBaseColumn(n), null;
324
- },
325
- OrderedList(t, e) {
326
- let r = oe(e, t, !1);
327
- if (r < 0)
328
- return !1;
329
- t.block.type != u.OrderedList && t.startContext(u.OrderedList, e.basePos, e.text.charCodeAt(e.pos + r - 1));
330
- let n = ce(e, e.pos + r);
331
- return t.startContext(u.ListItem, e.basePos, n - e.baseIndent), t.addNode(u.ListMark, t.lineStart + e.pos, t.lineStart + e.pos + r), e.moveBaseColumn(n), null;
332
- },
333
- ATXHeading(t, e) {
334
- let r = ye(e);
335
- if (r < 0)
336
- return !1;
337
- let n = e.pos, s = t.lineStart + n, i = pe(e.text, e.text.length, n), o = i;
338
- for (; o > n && e.text.charCodeAt(o - 1) == e.next; )
339
- o--;
340
- (o == i || o == n || !x(e.text.charCodeAt(o - 1))) && (o = e.text.length);
341
- let a = t.buffer.write(u.HeaderMark, 0, r).writeElements(t.parser.parseInline(e.text.slice(n + r + 1, o), s + r + 1), -s);
342
- o < e.text.length && a.write(u.HeaderMark, o - n, i - n);
343
- let l = a.finish(u.ATXHeading1 - 1 + r, e.text.length - n);
344
- return t.nextLine(), t.addNode(l, s), !0;
345
- },
346
- HTMLBlock(t, e) {
347
- let r = ze(e, t, !1);
348
- if (r < 0)
349
- return !1;
350
- let n = t.lineStart + e.pos, s = ee[r][1], i = [], o = s != W;
351
- for (; !s.test(e.text) && t.nextLine(); ) {
352
- if (e.depth < t.stack.length) {
353
- o = !1;
354
- break;
355
- }
356
- for (let h of e.markers)
357
- i.push(h);
358
- }
359
- o && t.nextLine();
360
- let a = s == Oe ? u.CommentBlock : s == Te ? u.ProcessingInstructionBlock : u.HTMLBlock, l = t.prevLineEnd();
361
- return t.addNode(t.buffer.writeElements(i, -n).finish(a, l - n), n), !0;
362
- },
363
- SetextHeading: void 0
364
- // Specifies relative precedence for block-continue function
365
- };
366
- class xt {
367
- constructor(e) {
368
- this.stage = 0, this.elts = [], this.pos = 0, this.start = e.start, this.advance(e.content);
369
- }
370
- nextLine(e, r, n) {
371
- if (this.stage == -1)
372
- return !1;
373
- let s = n.content + `
374
- ` + r.scrub(), i = this.advance(s);
375
- return i > -1 && i < s.length ? this.complete(e, n, i) : !1;
376
- }
377
- finish(e, r) {
378
- return (this.stage == 2 || this.stage == 3) && O(r.content, this.pos) == r.content.length ? this.complete(e, r, r.content.length) : !1;
379
- }
380
- complete(e, r, n) {
381
- return e.addLeafElement(r, g(u.LinkReference, this.start, this.start + n, this.elts)), !0;
382
- }
383
- nextStage(e) {
384
- return e ? (this.pos = e.to - this.start, this.elts.push(e), this.stage++, !0) : (e === !1 && (this.stage = -1), !1);
385
- }
386
- advance(e) {
387
- for (; ; ) {
388
- if (this.stage == -1)
389
- return -1;
390
- if (this.stage == 0) {
391
- if (!this.nextStage(Ze(e, this.pos, this.start, !0)))
392
- return -1;
393
- if (e.charCodeAt(this.pos) != 58)
394
- return this.stage = -1;
395
- this.elts.push(g(u.LinkMark, this.pos + this.start, this.pos + this.start + 1)), this.pos++;
396
- } else if (this.stage == 1) {
397
- if (!this.nextStage(qe(e, O(e, this.pos), this.start)))
398
- return -1;
399
- } else if (this.stage == 2) {
400
- let r = O(e, this.pos), n = 0;
401
- if (r > this.pos) {
402
- let s = Qe(e, r, this.start);
403
- if (s) {
404
- let i = V(e, s.to - this.start);
405
- i > 0 && (this.nextStage(s), n = i);
406
- }
407
- }
408
- return n || (n = V(e, this.pos)), n > 0 && n < e.length ? n : -1;
409
- } else
410
- return V(e, this.pos);
411
- }
412
- }
413
- }
414
- function V(t, e) {
415
- for (; e < t.length; e++) {
416
- let r = t.charCodeAt(e);
417
- if (r == 10)
418
- break;
419
- if (!x(r))
420
- return -1;
421
- }
422
- return e;
423
- }
424
- class At {
425
- nextLine(e, r, n) {
426
- let s = r.depth < e.stack.length ? -1 : Re(r), i = r.next;
427
- if (s < 0)
428
- return !1;
429
- let o = g(u.HeaderMark, e.lineStart + r.pos, e.lineStart + s);
430
- return e.nextLine(), e.addLeafElement(n, g(i == 61 ? u.SetextHeading1 : u.SetextHeading2, n.start, e.prevLineEnd(), [
431
- ...e.parser.parseInline(n.content, n.start),
432
- o
433
- ])), !0;
434
- }
435
- finish() {
436
- return !1;
437
- }
438
- }
439
- const De = {
440
- LinkReference(t, e) {
441
- return e.content.charCodeAt(0) == 91 ? new xt(e) : null;
442
- },
443
- SetextHeading() {
444
- return new At();
445
- }
446
- }, Bt = [
447
- (t, e) => ye(e) >= 0,
448
- (t, e) => Pe(e) >= 0,
449
- (t, e) => ve(e) >= 0,
450
- (t, e) => ie(e, t, !0) >= 0,
451
- (t, e) => oe(e, t, !0) >= 0,
452
- (t, e) => se(e, t, !0) >= 0,
453
- (t, e) => ze(e, t, !0) >= 0
454
- ], Et = { text: "", end: 0 };
455
- class It {
456
- /**
457
- @internal
458
- */
459
- constructor(e, r, n, s) {
460
- this.parser = e, this.input = r, this.ranges = s, this.line = new Ct(), this.atEnd = !1, this.reusePlaceholders = /* @__PURE__ */ new Map(), this.stoppedAt = null, this.rangeI = 0, this.to = s[s.length - 1].to, this.lineStart = this.absoluteLineStart = this.absoluteLineEnd = s[0].from, this.block = U.create(u.Document, 0, this.lineStart, 0, 0), this.stack = [this.block], this.fragments = n.length ? new Pt(n, r) : null, this.readLine();
461
- }
462
- get parsedPos() {
463
- return this.absoluteLineStart;
464
- }
465
- advance() {
466
- if (this.stoppedAt != null && this.absoluteLineStart > this.stoppedAt)
467
- return this.finish();
468
- let { line: e } = this;
469
- for (; ; ) {
470
- for (let n = 0; ; ) {
471
- let s = e.depth < this.stack.length ? this.stack[this.stack.length - 1] : null;
472
- for (; n < e.markers.length && (!s || e.markers[n].from < s.end); ) {
473
- let i = e.markers[n++];
474
- this.addNode(i.type, i.from, i.to);
475
- }
476
- if (!s)
477
- break;
478
- this.finishContext();
479
- }
480
- if (e.pos < e.text.length)
481
- break;
482
- if (!this.nextLine())
483
- return this.finish();
484
- }
485
- if (this.fragments && this.reuseFragment(e.basePos))
486
- return null;
487
- e: for (; ; ) {
488
- for (let n of this.parser.blockParsers)
489
- if (n) {
490
- let s = n(this, e);
491
- if (s != !1) {
492
- if (s == !0)
493
- return null;
494
- e.forward();
495
- continue e;
496
- }
497
- }
498
- break;
499
- }
500
- let r = new St(this.lineStart + e.pos, e.text.slice(e.pos));
501
- for (let n of this.parser.leafBlockParsers)
502
- if (n) {
503
- let s = n(this, r);
504
- s && r.parsers.push(s);
505
- }
506
- e: for (; this.nextLine() && e.pos != e.text.length; ) {
507
- if (e.indent < e.baseIndent + 4) {
508
- for (let n of this.parser.endLeafBlock)
509
- if (n(this, e, r))
510
- break e;
511
- }
512
- for (let n of r.parsers)
513
- if (n.nextLine(this, e, r))
514
- return null;
515
- r.content += `
516
- ` + e.scrub();
517
- for (let n of e.markers)
518
- r.marks.push(n);
519
- }
520
- return this.finishLeaf(r), null;
521
- }
522
- stopAt(e) {
523
- if (this.stoppedAt != null && this.stoppedAt < e)
524
- throw new RangeError("Can't move stoppedAt forward");
525
- this.stoppedAt = e;
526
- }
527
- reuseFragment(e) {
528
- if (!this.fragments.moveTo(this.absoluteLineStart + e, this.absoluteLineStart) || !this.fragments.matches(this.block.hash))
529
- return !1;
530
- let r = this.fragments.takeNodes(this);
531
- return r ? (this.absoluteLineStart += r, this.lineStart = Ve(this.absoluteLineStart, this.ranges), this.moveRangeI(), this.absoluteLineStart < this.to ? (this.lineStart++, this.absoluteLineStart++, this.readLine()) : (this.atEnd = !0, this.readLine()), !0) : !1;
532
- }
533
- /**
534
- The number of parent blocks surrounding the current block.
535
- */
536
- get depth() {
537
- return this.stack.length;
538
- }
539
- /**
540
- Get the type of the parent block at the given depth. When no
541
- depth is passed, return the type of the innermost parent.
542
- */
543
- parentType(e = this.depth - 1) {
544
- return this.parser.nodeSet.types[this.stack[e].type];
545
- }
546
- /**
547
- Move to the next input line. This should only be called by
548
- (non-composite) [block parsers](#BlockParser.parse) that consume
549
- the line directly, or leaf block parser
550
- [`nextLine`](#LeafBlockParser.nextLine) methods when they
551
- consume the current line (and return true).
552
- */
553
- nextLine() {
554
- return this.lineStart += this.line.text.length, this.absoluteLineEnd >= this.to ? (this.absoluteLineStart = this.absoluteLineEnd, this.atEnd = !0, this.readLine(), !1) : (this.lineStart++, this.absoluteLineStart = this.absoluteLineEnd + 1, this.moveRangeI(), this.readLine(), !0);
555
- }
556
- /**
557
- Retrieve the text of the line after the current one, without
558
- actually moving the context's current line forward.
559
- */
560
- peekLine() {
561
- return this.scanLine(this.absoluteLineEnd + 1).text;
562
- }
563
- moveRangeI() {
564
- for (; this.rangeI < this.ranges.length - 1 && this.absoluteLineStart >= this.ranges[this.rangeI].to; )
565
- this.rangeI++, this.absoluteLineStart = Math.max(this.absoluteLineStart, this.ranges[this.rangeI].from);
566
- }
567
- /**
568
- @internal
569
- Collect the text for the next line.
570
- */
571
- scanLine(e) {
572
- let r = Et;
573
- if (r.end = e, e >= this.to)
574
- r.text = "";
575
- else if (r.text = this.lineChunkAt(e), r.end += r.text.length, this.ranges.length > 1) {
576
- let n = this.absoluteLineStart, s = this.rangeI;
577
- for (; this.ranges[s].to < r.end; ) {
578
- s++;
579
- let i = this.ranges[s].from, o = this.lineChunkAt(i);
580
- r.end = i + o.length, r.text = r.text.slice(0, this.ranges[s - 1].to - n) + o, n = r.end - r.text.length;
581
- }
582
- }
583
- return r;
584
- }
585
- /**
586
- @internal
587
- Populate this.line with the content of the next line. Skip
588
- leading characters covered by composite blocks.
589
- */
590
- readLine() {
591
- let { line: e } = this, { text: r, end: n } = this.scanLine(this.absoluteLineStart);
592
- for (this.absoluteLineEnd = n, e.reset(r); e.depth < this.stack.length; e.depth++) {
593
- let s = this.stack[e.depth], i = this.parser.skipContextMarkup[s.type];
594
- if (!i)
595
- throw new Error("Unhandled block context " + u[s.type]);
596
- let o = this.line.markers.length;
597
- if (!i(s, this, e)) {
598
- this.line.markers.length > o && (s.end = this.line.markers[this.line.markers.length - 1].to);
599
- break;
600
- }
601
- e.forward();
602
- }
603
- }
604
- lineChunkAt(e) {
605
- let r = this.input.chunk(e), n;
606
- if (this.input.lineChunks)
607
- n = r == `
608
- ` ? "" : r;
609
- else {
610
- let s = r.indexOf(`
611
- `);
612
- n = s < 0 ? r : r.slice(0, s);
613
- }
614
- return e + n.length > this.to ? n.slice(0, this.to - e) : n;
615
- }
616
- /**
617
- The end position of the previous line.
618
- */
619
- prevLineEnd() {
620
- return this.atEnd ? this.lineStart : this.lineStart - 1;
621
- }
622
- /**
623
- @internal
624
- */
625
- startContext(e, r, n = 0) {
626
- this.block = U.create(e, n, this.lineStart + r, this.block.hash, this.lineStart + this.line.text.length), this.stack.push(this.block);
627
- }
628
- /**
629
- Start a composite block. Should only be called from [block
630
- parser functions](#BlockParser.parse) that return null.
631
- */
632
- startComposite(e, r, n = 0) {
633
- this.startContext(this.parser.getNodeType(e), r, n);
634
- }
635
- /**
636
- @internal
637
- */
638
- addNode(e, r, n) {
639
- typeof e == "number" && (e = new H(this.parser.nodeSet.types[e], N, N, (n ?? this.prevLineEnd()) - r)), this.block.addChild(e, r - this.block.from);
640
- }
641
- /**
642
- Add a block element. Can be called by [block
643
- parsers](#BlockParser.parse).
644
- */
645
- addElement(e) {
646
- this.block.addChild(e.toTree(this.parser.nodeSet), e.from - this.block.from);
647
- }
648
- /**
649
- Add a block element from a [leaf parser](#LeafBlockParser). This
650
- makes sure any extra composite block markup (such as blockquote
651
- markers) inside the block are also added to the syntax tree.
652
- */
653
- addLeafElement(e, r) {
654
- this.addNode(this.buffer.writeElements(re(r.children, e.marks), -r.from).finish(r.type, r.to - r.from), r.from);
655
- }
656
- /**
657
- @internal
658
- */
659
- finishContext() {
660
- let e = this.stack.pop(), r = this.stack[this.stack.length - 1];
661
- r.addChild(e.toTree(this.parser.nodeSet), e.from - r.from), this.block = r;
662
- }
663
- finish() {
664
- for (; this.stack.length > 1; )
665
- this.finishContext();
666
- return this.addGaps(this.block.toTree(this.parser.nodeSet, this.lineStart));
667
- }
668
- addGaps(e) {
669
- return this.ranges.length > 1 ? Fe(this.ranges, 0, e.topNode, this.ranges[0].from, this.reusePlaceholders) : e;
670
- }
671
- /**
672
- @internal
673
- */
674
- finishLeaf(e) {
675
- for (let n of e.parsers)
676
- if (n.finish(this, e))
677
- return;
678
- let r = re(this.parser.parseInline(e.content, e.start), e.marks);
679
- this.addNode(this.buffer.writeElements(r, -e.start).finish(u.Paragraph, e.content.length), e.start);
680
- }
681
- elt(e, r, n, s) {
682
- return typeof e == "string" ? g(this.parser.getNodeType(e), r, n, s) : new je(e, r);
683
- }
684
- /**
685
- @internal
686
- */
687
- get buffer() {
688
- return new $e(this.parser.nodeSet);
689
- }
690
- }
691
- function Fe(t, e, r, n, s) {
692
- let i = t[e].to, o = [], a = [], l = r.from + n;
693
- function h(f, p) {
694
- for (; p ? f >= i : f > i; ) {
695
- let d = t[e + 1].from - i;
696
- n += d, f += d, e++, i = t[e].to;
697
- }
698
- }
699
- for (let f = r.firstChild; f; f = f.nextSibling) {
700
- h(f.from + n, !0);
701
- let p = f.from + n, d, c = s.get(f.tree);
702
- c ? d = c : f.to + n > i ? (d = Fe(t, e, f, n, s), h(f.to + n, !1)) : d = f.toTree(), o.push(d), a.push(p - l);
703
- }
704
- return h(r.to + n, !1), new H(r.type, o, a, r.to + n - l, r.tree ? r.tree.propValues : void 0);
705
- }
706
- class Z extends st {
707
- /**
708
- @internal
709
- */
710
- constructor(e, r, n, s, i, o, a, l, h) {
711
- super(), this.nodeSet = e, this.blockParsers = r, this.leafBlockParsers = n, this.blockNames = s, this.endLeafBlock = i, this.skipContextMarkup = o, this.inlineParsers = a, this.inlineNames = l, this.wrappers = h, this.nodeTypes = /* @__PURE__ */ Object.create(null);
712
- for (let f of e.types)
713
- this.nodeTypes[f.name] = f.id;
714
- }
715
- createParse(e, r, n) {
716
- let s = new It(this, e, r, n);
717
- for (let i of this.wrappers)
718
- s = i(s, e, r, n);
719
- return s;
720
- }
721
- /**
722
- Reconfigure the parser.
723
- */
724
- configure(e) {
725
- let r = te(e);
726
- if (!r)
727
- return this;
728
- let { nodeSet: n, skipContextMarkup: s } = this, i = this.blockParsers.slice(), o = this.leafBlockParsers.slice(), a = this.blockNames.slice(), l = this.inlineParsers.slice(), h = this.inlineNames.slice(), f = this.endLeafBlock.slice(), p = this.wrappers;
729
- if (R(r.defineNodes)) {
730
- s = Object.assign({}, s);
731
- let d = n.types.slice(), c;
732
- for (let b of r.defineNodes) {
733
- let { name: k, block: A, composite: w, style: S } = typeof b == "string" ? { name: b } : b;
734
- if (d.some((E) => E.name == k))
735
- continue;
736
- w && (s[d.length] = (E, y, nt) => w(y, nt, E.value));
737
- let L = d.length, B = w ? ["Block", "BlockContext"] : A ? L >= u.ATXHeading1 && L <= u.SetextHeading2 ? ["Block", "LeafBlock", "Heading"] : ["Block", "LeafBlock"] : void 0;
738
- d.push(Q.define({
739
- id: L,
740
- name: k,
741
- props: B && [[v.group, B]]
742
- })), S && (c || (c = {}), Array.isArray(S) || S instanceof it ? c[k] = S : Object.assign(c, S));
743
- }
744
- n = new Ee(d), c && (n = n.extend(Ie(c)));
745
- }
746
- if (R(r.props) && (n = n.extend(...r.props)), R(r.remove))
747
- for (let d of r.remove) {
748
- let c = this.blockNames.indexOf(d), b = this.inlineNames.indexOf(d);
749
- c > -1 && (i[c] = o[c] = void 0), b > -1 && (l[b] = void 0);
750
- }
751
- if (R(r.parseBlock))
752
- for (let d of r.parseBlock) {
753
- let c = a.indexOf(d.name);
754
- if (c > -1)
755
- i[c] = d.parse, o[c] = d.leaf;
756
- else {
757
- let b = d.before ? j(a, d.before) : d.after ? j(a, d.after) + 1 : a.length - 1;
758
- i.splice(b, 0, d.parse), o.splice(b, 0, d.leaf), a.splice(b, 0, d.name);
759
- }
760
- d.endLeaf && f.push(d.endLeaf);
761
- }
762
- if (R(r.parseInline))
763
- for (let d of r.parseInline) {
764
- let c = h.indexOf(d.name);
765
- if (c > -1)
766
- l[c] = d.parse;
767
- else {
768
- let b = d.before ? j(h, d.before) : d.after ? j(h, d.after) + 1 : h.length - 1;
769
- l.splice(b, 0, d.parse), h.splice(b, 0, d.name);
770
- }
771
- }
772
- return r.wrap && (p = p.concat(r.wrap)), new Z(n, i, o, a, f, s, l, h, p);
773
- }
774
- /**
775
- @internal
776
- */
777
- getNodeType(e) {
778
- let r = this.nodeTypes[e];
779
- if (r == null)
780
- throw new RangeError(`Unknown node type '${e}'`);
781
- return r;
782
- }
783
- /**
784
- Parse the given piece of inline text at the given offset,
785
- returning an array of [`Element`](#Element) objects representing
786
- the inline content.
787
- */
788
- parseInline(e, r) {
789
- let n = new ae(this, e, r);
790
- e: for (let s = r; s < n.end; ) {
791
- let i = n.char(s);
792
- for (let o of this.inlineParsers)
793
- if (o) {
794
- let a = o(n, i, s);
795
- if (a >= 0) {
796
- s = a;
797
- continue e;
798
- }
799
- }
800
- s++;
801
- }
802
- return n.resolveMarkers(0);
803
- }
804
- }
805
- function R(t) {
806
- return t != null && t.length > 0;
807
- }
808
- function te(t) {
809
- if (!Array.isArray(t))
810
- return t;
811
- if (t.length == 0)
812
- return null;
813
- let e = te(t[0]);
814
- if (t.length == 1)
815
- return e;
816
- let r = te(t.slice(1));
817
- if (!r || !e)
818
- return e || r;
819
- let n = (o, a) => (o || N).concat(a || N), s = e.wrap, i = r.wrap;
820
- return {
821
- props: n(e.props, r.props),
822
- defineNodes: n(e.defineNodes, r.defineNodes),
823
- parseBlock: n(e.parseBlock, r.parseBlock),
824
- parseInline: n(e.parseInline, r.parseInline),
825
- remove: n(e.remove, r.remove),
826
- wrap: s ? i ? (o, a, l, h) => s(i(o, a, l, h), a, l, h) : s : i
827
- };
828
- }
829
- function j(t, e) {
830
- let r = t.indexOf(e);
831
- if (r < 0)
832
- throw new RangeError(`Position specified relative to unknown parser ${e}`);
833
- return r;
834
- }
835
- let Xe = [Q.none];
836
- for (let t = 1, e; e = u[t]; t++)
837
- Xe[t] = Q.define({
838
- id: t,
839
- name: e,
840
- props: t >= u.Escape ? [] : [[v.group, t in He ? ["Block", "BlockContext"] : ["Block", "LeafBlock"]]],
841
- top: e == "Document"
842
- });
843
- const N = [];
844
- class $e {
845
- constructor(e) {
846
- this.nodeSet = e, this.content = [], this.nodes = [];
847
- }
848
- write(e, r, n, s = 0) {
849
- return this.content.push(e, r, n, 4 + s * 4), this;
850
- }
851
- writeElements(e, r = 0) {
852
- for (let n of e)
853
- n.writeTo(this, r);
854
- return this;
855
- }
856
- finish(e, r) {
857
- return H.build({
858
- buffer: this.content,
859
- nodeSet: this.nodeSet,
860
- reused: this.nodes,
861
- topID: e,
862
- length: r
863
- });
864
- }
865
- }
866
- class D {
867
- /**
868
- @internal
869
- */
870
- constructor(e, r, n, s = N) {
871
- this.type = e, this.from = r, this.to = n, this.children = s;
872
- }
873
- /**
874
- @internal
875
- */
876
- writeTo(e, r) {
877
- let n = e.content.length;
878
- e.writeElements(this.children, r), e.content.push(this.type, this.from + r, this.to + r, e.content.length + 4 - n);
879
- }
880
- /**
881
- @internal
882
- */
883
- toTree(e) {
884
- return new $e(e).writeElements(this.children, -this.from).finish(this.type, this.to - this.from);
885
- }
886
- }
887
- class je {
888
- constructor(e, r) {
889
- this.tree = e, this.from = r;
890
- }
891
- get to() {
892
- return this.from + this.tree.length;
893
- }
894
- get type() {
895
- return this.tree.type.id;
896
- }
897
- get children() {
898
- return N;
899
- }
900
- writeTo(e, r) {
901
- e.nodes.push(this.tree), e.content.push(e.nodes.length - 1, this.from + r, this.to + r, -1);
902
- }
903
- toTree() {
904
- return this.tree;
905
- }
906
- }
907
- function g(t, e, r, n) {
908
- return new D(t, e, r, n);
909
- }
910
- const Ue = { resolve: "Emphasis", mark: "EmphasisMark" }, _e = { resolve: "Emphasis", mark: "EmphasisMark" }, M = {}, _ = {};
911
- class C {
912
- constructor(e, r, n, s) {
913
- this.type = e, this.from = r, this.to = n, this.side = s;
914
- }
915
- }
916
- const me = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
917
- let F = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;
918
- try {
919
- F = new RegExp("[\\p{S}|\\p{P}]", "u");
920
- } catch {
921
- }
922
- const G = {
923
- Escape(t, e, r) {
924
- if (e != 92 || r == t.end - 1)
925
- return -1;
926
- let n = t.char(r + 1);
927
- for (let s = 0; s < me.length; s++)
928
- if (me.charCodeAt(s) == n)
929
- return t.append(g(u.Escape, r, r + 2));
930
- return -1;
931
- },
932
- Entity(t, e, r) {
933
- if (e != 38)
934
- return -1;
935
- let n = /^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(r + 1, r + 31));
936
- return n ? t.append(g(u.Entity, r, r + 1 + n[0].length)) : -1;
937
- },
938
- InlineCode(t, e, r) {
939
- if (e != 96 || r && t.char(r - 1) == 96)
940
- return -1;
941
- let n = r + 1;
942
- for (; n < t.end && t.char(n) == 96; )
943
- n++;
944
- let s = n - r, i = 0;
945
- for (; n < t.end; n++)
946
- if (t.char(n) == 96) {
947
- if (i++, i == s && t.char(n + 1) != 96)
948
- return t.append(g(u.InlineCode, r, n + 1, [
949
- g(u.CodeMark, r, r + s),
950
- g(u.CodeMark, n + 1 - s, n + 1)
951
- ]));
952
- } else
953
- i = 0;
954
- return -1;
955
- },
956
- HTMLTag(t, e, r) {
957
- if (e != 60 || r == t.end - 1)
958
- return -1;
959
- let n = t.slice(r + 1, t.end), s = /^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);
960
- if (s)
961
- return t.append(g(u.Autolink, r, r + 1 + s[0].length, [
962
- g(u.LinkMark, r, r + 1),
963
- // url[0] includes the closing bracket, so exclude it from this slice
964
- g(u.URL, r + 1, r + s[0].length),
965
- g(u.LinkMark, r + s[0].length, r + 1 + s[0].length)
966
- ]));
967
- let i = /^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);
968
- if (i)
969
- return t.append(g(u.Comment, r, r + 1 + i[0].length));
970
- let o = /^\?[^]*?\?>/.exec(n);
971
- if (o)
972
- return t.append(g(u.ProcessingInstruction, r, r + 1 + o[0].length));
973
- let a = /^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);
974
- return a ? t.append(g(u.HTMLTag, r, r + 1 + a[0].length)) : -1;
975
- },
976
- Emphasis(t, e, r) {
977
- if (e != 95 && e != 42)
978
- return -1;
979
- let n = r + 1;
980
- for (; t.char(n) == e; )
981
- n++;
982
- let s = t.slice(r - 1, r), i = t.slice(n, n + 1), o = F.test(s), a = F.test(i), l = /\s|^$/.test(s), h = /\s|^$/.test(i), f = !h && (!a || l || o), p = !l && (!o || h || a), d = f && (e == 42 || !p || o), c = p && (e == 42 || !f || a);
983
- return t.append(new C(e == 95 ? Ue : _e, r, n, (d ? 1 : 0) | (c ? 2 : 0)));
984
- },
985
- HardBreak(t, e, r) {
986
- if (e == 92 && t.char(r + 1) == 10)
987
- return t.append(g(u.HardBreak, r, r + 2));
988
- if (e == 32) {
989
- let n = r + 1;
990
- for (; t.char(n) == 32; )
991
- n++;
992
- if (t.char(n) == 10 && n >= r + 2)
993
- return t.append(g(u.HardBreak, r, n + 1));
994
- }
995
- return -1;
996
- },
997
- Link(t, e, r) {
998
- return e == 91 ? t.append(new C(
999
- M,
1000
- r,
1001
- r + 1,
1002
- 1
1003
- /* Mark.Open */
1004
- )) : -1;
1005
- },
1006
- Image(t, e, r) {
1007
- return e == 33 && t.char(r + 1) == 91 ? t.append(new C(
1008
- _,
1009
- r,
1010
- r + 2,
1011
- 1
1012
- /* Mark.Open */
1013
- )) : -1;
1014
- },
1015
- LinkEnd(t, e, r) {
1016
- if (e != 93)
1017
- return -1;
1018
- for (let n = t.parts.length - 1; n >= 0; n--) {
1019
- let s = t.parts[n];
1020
- if (s instanceof C && (s.type == M || s.type == _)) {
1021
- if (!s.side || t.skipSpace(s.to) == r && !/[(\[]/.test(t.slice(r + 1, r + 2)))
1022
- return t.parts[n] = null, -1;
1023
- let i = t.takeContent(n), o = t.parts[n] = Mt(t, i, s.type == M ? u.Link : u.Image, s.from, r + 1);
1024
- if (s.type == M)
1025
- for (let a = 0; a < n; a++) {
1026
- let l = t.parts[a];
1027
- l instanceof C && l.type == M && (l.side = 0);
1028
- }
1029
- return o.to;
1030
- }
1031
- }
1032
- return -1;
1033
- }
1034
- };
1035
- function Mt(t, e, r, n, s) {
1036
- let { text: i } = t, o = t.char(s), a = s;
1037
- if (e.unshift(g(u.LinkMark, n, n + (r == u.Image ? 2 : 1))), e.push(g(u.LinkMark, s - 1, s)), o == 40) {
1038
- let l = t.skipSpace(s + 1), h = qe(i, l - t.offset, t.offset), f;
1039
- h && (l = t.skipSpace(h.to), l != h.to && (f = Qe(i, l - t.offset, t.offset), f && (l = t.skipSpace(f.to)))), t.char(l) == 41 && (e.push(g(u.LinkMark, s, s + 1)), a = l + 1, h && e.push(h), f && e.push(f), e.push(g(u.LinkMark, l, a)));
1040
- } else if (o == 91) {
1041
- let l = Ze(i, s - t.offset, t.offset, !1);
1042
- l && (e.push(l), a = l.to);
1043
- }
1044
- return g(r, n, a, e);
1045
- }
1046
- function qe(t, e, r) {
1047
- if (t.charCodeAt(e) == 60) {
1048
- for (let s = e + 1; s < t.length; s++) {
1049
- let i = t.charCodeAt(s);
1050
- if (i == 62)
1051
- return g(u.URL, e + r, s + 1 + r);
1052
- if (i == 60 || i == 10)
1053
- return !1;
1054
- }
1055
- return null;
1056
- } else {
1057
- let s = 0, i = e;
1058
- for (let o = !1; i < t.length; i++) {
1059
- let a = t.charCodeAt(i);
1060
- if (x(a))
1061
- break;
1062
- if (o)
1063
- o = !1;
1064
- else if (a == 40)
1065
- s++;
1066
- else if (a == 41) {
1067
- if (!s)
1068
- break;
1069
- s--;
1070
- } else a == 92 && (o = !0);
1071
- }
1072
- return i > e ? g(u.URL, e + r, i + r) : i == t.length ? null : !1;
1073
- }
1074
- }
1075
- function Qe(t, e, r) {
1076
- let n = t.charCodeAt(e);
1077
- if (n != 39 && n != 34 && n != 40)
1078
- return !1;
1079
- let s = n == 40 ? 41 : n;
1080
- for (let i = e + 1, o = !1; i < t.length; i++) {
1081
- let a = t.charCodeAt(i);
1082
- if (o)
1083
- o = !1;
1084
- else {
1085
- if (a == s)
1086
- return g(u.LinkTitle, e + r, i + 1 + r);
1087
- a == 92 && (o = !0);
1088
- }
1089
- }
1090
- return null;
1091
- }
1092
- function Ze(t, e, r, n) {
1093
- for (let s = !1, i = e + 1, o = Math.min(t.length, i + 999); i < o; i++) {
1094
- let a = t.charCodeAt(i);
1095
- if (s)
1096
- s = !1;
1097
- else {
1098
- if (a == 93)
1099
- return n ? !1 : g(u.LinkLabel, e + r, i + 1 + r);
1100
- if (n && !x(a) && (n = !1), a == 91)
1101
- return !1;
1102
- a == 92 && (s = !0);
1103
- }
1104
- }
1105
- return null;
1106
- }
1107
- class ae {
1108
- /**
1109
- @internal
1110
- */
1111
- constructor(e, r, n) {
1112
- this.parser = e, this.text = r, this.offset = n, this.parts = [];
1113
- }
1114
- /**
1115
- Get the character code at the given (document-relative)
1116
- position.
1117
- */
1118
- char(e) {
1119
- return e >= this.end ? -1 : this.text.charCodeAt(e - this.offset);
1120
- }
1121
- /**
1122
- The position of the end of this inline section.
1123
- */
1124
- get end() {
1125
- return this.offset + this.text.length;
1126
- }
1127
- /**
1128
- Get a substring of this inline section. Again uses
1129
- document-relative positions.
1130
- */
1131
- slice(e, r) {
1132
- return this.text.slice(e - this.offset, r - this.offset);
1133
- }
1134
- /**
1135
- @internal
1136
- */
1137
- append(e) {
1138
- return this.parts.push(e), e.to;
1139
- }
1140
- /**
1141
- Add a [delimiter](#DelimiterType) at this given position. `open`
1142
- and `close` indicate whether this delimiter is opening, closing,
1143
- or both. Returns the end of the delimiter, for convenient
1144
- returning from [parse functions](#InlineParser.parse).
1145
- */
1146
- addDelimiter(e, r, n, s, i) {
1147
- return this.append(new C(e, r, n, (s ? 1 : 0) | (i ? 2 : 0)));
1148
- }
1149
- /**
1150
- Returns true when there is an unmatched link or image opening
1151
- token before the current position.
1152
- */
1153
- get hasOpenLink() {
1154
- for (let e = this.parts.length - 1; e >= 0; e--) {
1155
- let r = this.parts[e];
1156
- if (r instanceof C && (r.type == M || r.type == _))
1157
- return !0;
1158
- }
1159
- return !1;
1160
- }
1161
- /**
1162
- Add an inline element. Returns the end of the element.
1163
- */
1164
- addElement(e) {
1165
- return this.append(e);
1166
- }
1167
- /**
1168
- Resolve markers between this.parts.length and from, wrapping matched markers in the
1169
- appropriate node and updating the content of this.parts. @internal
1170
- */
1171
- resolveMarkers(e) {
1172
- for (let n = e; n < this.parts.length; n++) {
1173
- let s = this.parts[n];
1174
- if (!(s instanceof C && s.type.resolve && s.side & 2))
1175
- continue;
1176
- let i = s.type == Ue || s.type == _e, o = s.to - s.from, a, l = n - 1;
1177
- for (; l >= e; l--) {
1178
- let k = this.parts[l];
1179
- if (k instanceof C && k.side & 1 && k.type == s.type && // Ignore emphasis delimiters where the character count doesn't match
1180
- !(i && (s.side & 1 || k.side & 2) && (k.to - k.from + o) % 3 == 0 && ((k.to - k.from) % 3 || o % 3))) {
1181
- a = k;
1182
- break;
1183
- }
1184
- }
1185
- if (!a)
1186
- continue;
1187
- let h = s.type.resolve, f = [], p = a.from, d = s.to;
1188
- if (i) {
1189
- let k = Math.min(2, a.to - a.from, o);
1190
- p = a.to - k, d = s.from + k, h = k == 1 ? "Emphasis" : "StrongEmphasis";
1191
- }
1192
- a.type.mark && f.push(this.elt(a.type.mark, p, a.to));
1193
- for (let k = l + 1; k < n; k++)
1194
- this.parts[k] instanceof D && f.push(this.parts[k]), this.parts[k] = null;
1195
- s.type.mark && f.push(this.elt(s.type.mark, s.from, d));
1196
- let c = this.elt(h, p, d, f);
1197
- this.parts[l] = i && a.from != p ? new C(a.type, a.from, p, a.side) : null, (this.parts[n] = i && s.to != d ? new C(s.type, d, s.to, s.side) : null) ? this.parts.splice(n, 0, c) : this.parts[n] = c;
1198
- }
1199
- let r = [];
1200
- for (let n = e; n < this.parts.length; n++) {
1201
- let s = this.parts[n];
1202
- s instanceof D && r.push(s);
1203
- }
1204
- return r;
1205
- }
1206
- /**
1207
- Find an opening delimiter of the given type. Returns `null` if
1208
- no delimiter is found, or an index that can be passed to
1209
- [`takeContent`](#InlineContext.takeContent) otherwise.
1210
- */
1211
- findOpeningDelimiter(e) {
1212
- for (let r = this.parts.length - 1; r >= 0; r--) {
1213
- let n = this.parts[r];
1214
- if (n instanceof C && n.type == e && n.side & 1)
1215
- return r;
1216
- }
1217
- return null;
1218
- }
1219
- /**
1220
- Remove all inline elements and delimiters starting from the
1221
- given index (which you should get from
1222
- [`findOpeningDelimiter`](#InlineContext.findOpeningDelimiter),
1223
- resolve delimiters inside of them, and return them as an array
1224
- of elements.
1225
- */
1226
- takeContent(e) {
1227
- let r = this.resolveMarkers(e);
1228
- return this.parts.length = e, r;
1229
- }
1230
- /**
1231
- Return the delimiter at the given index. Mostly useful to get
1232
- additional info out of a delimiter index returned by
1233
- [`findOpeningDelimiter`](#InlineContext.findOpeningDelimiter).
1234
- Returns null if there is no delimiter at this index.
1235
- */
1236
- getDelimiterAt(e) {
1237
- let r = this.parts[e];
1238
- return r instanceof C ? r : null;
1239
- }
1240
- /**
1241
- Skip space after the given (document) position, returning either
1242
- the position of the next non-space character or the end of the
1243
- section.
1244
- */
1245
- skipSpace(e) {
1246
- return O(this.text, e - this.offset) + this.offset;
1247
- }
1248
- elt(e, r, n, s) {
1249
- return typeof e == "string" ? g(this.parser.getNodeType(e), r, n, s) : new je(e, r);
1250
- }
1251
- }
1252
- ae.linkStart = M;
1253
- ae.imageStart = _;
1254
- function re(t, e) {
1255
- if (!e.length)
1256
- return t;
1257
- if (!t.length)
1258
- return e;
1259
- let r = t.slice(), n = 0;
1260
- for (let s of e) {
1261
- for (; n < r.length && r[n].to < s.to; )
1262
- n++;
1263
- if (n < r.length && r[n].from < s.from) {
1264
- let i = r[n];
1265
- i instanceof D && (r[n] = new D(i.type, i.from, i.to, re(i.children, [s])));
1266
- } else
1267
- r.splice(n++, 0, s);
1268
- }
1269
- return r;
1270
- }
1271
- const Ht = [u.CodeBlock, u.ListItem, u.OrderedList, u.BulletList];
1272
- class Pt {
1273
- constructor(e, r) {
1274
- this.fragments = e, this.input = r, this.i = 0, this.fragment = null, this.fragmentEnd = -1, this.cursor = null, e.length && (this.fragment = e[this.i++]);
1275
- }
1276
- nextFragment() {
1277
- this.fragment = this.i < this.fragments.length ? this.fragments[this.i++] : null, this.cursor = null, this.fragmentEnd = -1;
1278
- }
1279
- moveTo(e, r) {
1280
- for (; this.fragment && this.fragment.to <= e; )
1281
- this.nextFragment();
1282
- if (!this.fragment || this.fragment.from > (e ? e - 1 : 0))
1283
- return !1;
1284
- if (this.fragmentEnd < 0) {
1285
- let i = this.fragment.to;
1286
- for (; i > 0 && this.input.read(i - 1, i) != `
1287
- `; )
1288
- i--;
1289
- this.fragmentEnd = i ? i - 1 : 0;
1290
- }
1291
- let n = this.cursor;
1292
- n || (n = this.cursor = this.fragment.tree.cursor(), n.firstChild());
1293
- let s = e + this.fragment.offset;
1294
- for (; n.to <= s; )
1295
- if (!n.parent())
1296
- return !1;
1297
- for (; ; ) {
1298
- if (n.from >= s)
1299
- return this.fragment.from <= r;
1300
- if (!n.childAfter(s))
1301
- return !1;
1302
- }
1303
- }
1304
- matches(e) {
1305
- let r = this.cursor.tree;
1306
- return r && r.prop(v.contextHash) == e;
1307
- }
1308
- takeNodes(e) {
1309
- let r = this.cursor, n = this.fragment.offset, s = this.fragmentEnd - (this.fragment.openEnd ? 1 : 0), i = e.absoluteLineStart, o = i, a = e.block.children.length, l = o, h = a;
1310
- for (; ; ) {
1311
- if (r.to - n > s) {
1312
- if (r.type.isAnonymous && r.firstChild())
1313
- continue;
1314
- break;
1315
- }
1316
- let f = Ve(r.from - n, e.ranges);
1317
- if (r.to - n <= e.ranges[e.rangeI].to)
1318
- e.addNode(r.tree, f);
1319
- else {
1320
- let p = new H(e.parser.nodeSet.types[u.Paragraph], [], [], 0, e.block.hashProp);
1321
- e.reusePlaceholders.set(p, r.tree), e.addNode(p, f);
1322
- }
1323
- if (r.type.is("Block") && (Ht.indexOf(r.type.id) < 0 ? (o = r.to - n, a = e.block.children.length) : (o = l, a = h, l = r.to - n, h = e.block.children.length)), !r.nextSibling())
1324
- break;
1325
- }
1326
- for (; e.block.children.length > a; )
1327
- e.block.children.pop(), e.block.positions.pop();
1328
- return o - i;
1329
- }
1330
- }
1331
- function Ve(t, e) {
1332
- let r = t;
1333
- for (let n = 1; n < e.length; n++) {
1334
- let s = e[n - 1].to, i = e[n].from;
1335
- s < t && (r -= i - s);
1336
- }
1337
- return r;
1338
- }
1339
- const vt = Ie({
1340
- "Blockquote/...": m.quote,
1341
- HorizontalRule: m.contentSeparator,
1342
- "ATXHeading1/... SetextHeading1/...": m.heading1,
1343
- "ATXHeading2/... SetextHeading2/...": m.heading2,
1344
- "ATXHeading3/...": m.heading3,
1345
- "ATXHeading4/...": m.heading4,
1346
- "ATXHeading5/...": m.heading5,
1347
- "ATXHeading6/...": m.heading6,
1348
- "Comment CommentBlock": m.comment,
1349
- Escape: m.escape,
1350
- Entity: m.character,
1351
- "Emphasis/...": m.emphasis,
1352
- "StrongEmphasis/...": m.strong,
1353
- "Link/... Image/...": m.link,
1354
- "OrderedList/... BulletList/...": m.list,
1355
- "BlockQuote/...": m.quote,
1356
- "InlineCode CodeText": m.monospace,
1357
- "URL Autolink": m.url,
1358
- "HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark": m.processingInstruction,
1359
- "CodeInfo LinkLabel": m.labelName,
1360
- LinkTitle: m.string,
1361
- Paragraph: m.content
1362
- }), Nt = new Z(new Ee(Xe).extend(vt), Object.keys($).map((t) => $[t]), Object.keys($).map((t) => De[t]), Object.keys($), Bt, He, Object.keys(G).map((t) => G[t]), Object.keys(G), []);
1363
- function yt(t, e, r) {
1364
- let n = [];
1365
- for (let s = t.firstChild, i = e; ; s = s.nextSibling) {
1366
- let o = s ? s.from : r;
1367
- if (o > i && n.push({ from: i, to: o }), !s)
1368
- break;
1369
- i = s.to;
1370
- }
1371
- return n;
1372
- }
1373
- function Rt(t) {
1374
- let { codeParser: e, htmlParser: r } = t;
1375
- return { wrap: ot((s, i) => {
1376
- let o = s.type.id;
1377
- if (e && (o == u.CodeBlock || o == u.FencedCode)) {
1378
- let a = "";
1379
- if (o == u.FencedCode) {
1380
- let h = s.node.getChild(u.CodeInfo);
1381
- h && (a = i.read(h.from, h.to));
1382
- }
1383
- let l = e(a);
1384
- if (l)
1385
- return { parser: l, overlay: (h) => h.type.id == u.CodeText };
1386
- } else if (r && (o == u.HTMLBlock || o == u.HTMLTag || o == u.CommentBlock))
1387
- return { parser: r, overlay: yt(s.node, s.from, s.to) };
1388
- return null;
1389
- }) };
1390
- }
1391
- const Ot = { resolve: "Strikethrough", mark: "StrikethroughMark" }, Tt = {
1392
- defineNodes: [{
1393
- name: "Strikethrough",
1394
- style: { "Strikethrough/...": m.strikethrough }
1395
- }, {
1396
- name: "StrikethroughMark",
1397
- style: m.processingInstruction
1398
- }],
1399
- parseInline: [{
1400
- name: "Strikethrough",
1401
- parse(t, e, r) {
1402
- if (e != 126 || t.char(r + 1) != 126 || t.char(r + 2) == 126)
1403
- return -1;
1404
- let n = t.slice(r - 1, r), s = t.slice(r + 2, r + 3), i = /\s|^$/.test(n), o = /\s|^$/.test(s), a = F.test(n), l = F.test(s);
1405
- return t.addDelimiter(Ot, r, r + 2, !o && (!l || i || a), !i && (!a || o || l));
1406
- },
1407
- after: "Emphasis"
1408
- }]
1409
- };
1410
- function T(t, e, r = 0, n, s = 0) {
1411
- let i = 0, o = !0, a = -1, l = -1, h = !1, f = () => {
1412
- n.push(t.elt("TableCell", s + a, s + l, t.parser.parseInline(e.slice(a, l), s + a)));
1413
- };
1414
- for (let p = r; p < e.length; p++) {
1415
- let d = e.charCodeAt(p);
1416
- d == 124 && !h ? ((!o || a > -1) && i++, o = !1, n && (a > -1 && f(), n.push(t.elt("TableDelimiter", p + s, p + s + 1))), a = l = -1) : (h || d != 32 && d != 9) && (a < 0 && (a = p), l = p + 1), h = !h && d == 92;
1417
- }
1418
- return a > -1 && (i++, n && f()), i;
1419
- }
1420
- function ge(t, e) {
1421
- for (let r = e; r < t.length; r++) {
1422
- let n = t.charCodeAt(r);
1423
- if (n == 124)
1424
- return !0;
1425
- n == 92 && r++;
1426
- }
1427
- return !1;
1428
- }
1429
- const Ge = /^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;
1430
- class ke {
1431
- constructor() {
1432
- this.rows = null;
1433
- }
1434
- nextLine(e, r, n) {
1435
- if (this.rows == null) {
1436
- this.rows = !1;
1437
- let s;
1438
- if ((r.next == 45 || r.next == 58 || r.next == 124) && Ge.test(s = r.text.slice(r.pos))) {
1439
- let i = [];
1440
- T(e, n.content, 0, i, n.start) == T(e, s, r.pos) && (this.rows = [
1441
- e.elt("TableHeader", n.start, n.start + n.content.length, i),
1442
- e.elt("TableDelimiter", e.lineStart + r.pos, e.lineStart + r.text.length)
1443
- ]);
1444
- }
1445
- } else if (this.rows) {
1446
- let s = [];
1447
- T(e, r.text, r.pos, s, e.lineStart), this.rows.push(e.elt("TableRow", e.lineStart + r.pos, e.lineStart + r.text.length, s));
1448
- }
1449
- return !1;
1450
- }
1451
- finish(e, r) {
1452
- return this.rows ? (e.addLeafElement(r, e.elt("Table", r.start, r.start + r.content.length, this.rows)), !0) : !1;
1453
- }
1454
- }
1455
- const zt = {
1456
- defineNodes: [
1457
- { name: "Table", block: !0 },
1458
- { name: "TableHeader", style: { "TableHeader/...": m.heading } },
1459
- "TableRow",
1460
- { name: "TableCell", style: m.content },
1461
- { name: "TableDelimiter", style: m.processingInstruction }
1462
- ],
1463
- parseBlock: [{
1464
- name: "Table",
1465
- leaf(t, e) {
1466
- return ge(e.content, 0) ? new ke() : null;
1467
- },
1468
- endLeaf(t, e, r) {
1469
- if (r.parsers.some((s) => s instanceof ke) || !ge(e.text, e.basePos))
1470
- return !1;
1471
- let n = t.peekLine();
1472
- return Ge.test(n) && T(t, e.text, e.basePos) == T(t, n, e.basePos);
1473
- },
1474
- before: "SetextHeading"
1475
- }]
1476
- };
1477
- class Dt {
1478
- nextLine() {
1479
- return !1;
1480
- }
1481
- finish(e, r) {
1482
- return e.addLeafElement(r, e.elt("Task", r.start, r.start + r.content.length, [
1483
- e.elt("TaskMarker", r.start, r.start + 3),
1484
- ...e.parser.parseInline(r.content.slice(3), r.start + 3)
1485
- ])), !0;
1486
- }
1487
- }
1488
- const Ft = {
1489
- defineNodes: [
1490
- { name: "Task", block: !0, style: m.list },
1491
- { name: "TaskMarker", style: m.atom }
1492
- ],
1493
- parseBlock: [{
1494
- name: "TaskList",
1495
- leaf(t, e) {
1496
- return /^\[[ xX]\][ \t]/.test(e.content) && t.parentType().name == "ListItem" ? new Dt() : null;
1497
- },
1498
- after: "SetextHeading"
1499
- }]
1500
- }, Le = /(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy, be = /[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy, Xt = /[\w-]+\.[\w-]+($|\/)/, we = /[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy, Se = /\/[a-zA-Z\d@.]+/gy;
1501
- function Ce(t, e, r, n) {
1502
- let s = 0;
1503
- for (let i = e; i < r; i++)
1504
- t[i] == n && s++;
1505
- return s;
1506
- }
1507
- function $t(t, e) {
1508
- be.lastIndex = e;
1509
- let r = be.exec(t);
1510
- if (!r || Xt.exec(r[0])[0].indexOf("_") > -1)
1511
- return -1;
1512
- let n = e + r[0].length;
1513
- for (; ; ) {
1514
- let s = t[n - 1], i;
1515
- if (/[?!.,:*_~]/.test(s) || s == ")" && Ce(t, e, n, ")") > Ce(t, e, n, "("))
1516
- n--;
1517
- else if (s == ";" && (i = /&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e, n))))
1518
- n = e + i.index;
1519
- else
1520
- break;
1521
- }
1522
- return n;
1523
- }
1524
- function xe(t, e) {
1525
- we.lastIndex = e;
1526
- let r = we.exec(t);
1527
- if (!r)
1528
- return -1;
1529
- let n = r[0][r[0].length - 1];
1530
- return n == "_" || n == "-" ? -1 : e + r[0].length - (n == "." ? 1 : 0);
1531
- }
1532
- const jt = {
1533
- parseInline: [{
1534
- name: "Autolink",
1535
- parse(t, e, r) {
1536
- let n = r - t.offset;
1537
- if (n && /\w/.test(t.text[n - 1]))
1538
- return -1;
1539
- Le.lastIndex = n;
1540
- let s = Le.exec(t.text), i = -1;
1541
- if (!s)
1542
- return -1;
1543
- if (s[1] || s[2]) {
1544
- if (i = $t(t.text, n + s[0].length), i > -1 && t.hasOpenLink) {
1545
- let o = /([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(n, i));
1546
- i = n + o[0].length;
1547
- }
1548
- } else s[3] ? i = xe(t.text, n) : (i = xe(t.text, n + s[0].length), i > -1 && s[0] == "xmpp:" && (Se.lastIndex = i, s = Se.exec(t.text), s && (i = s.index + s[0].length)));
1549
- return i < 0 ? -1 : (t.addElement(t.elt("URL", r, i + t.offset)), i + t.offset);
1550
- }
1551
- }]
1552
- }, Ut = [zt, Ft, Tt, jt];
1553
- function Ke(t, e, r) {
1554
- return (n, s, i) => {
1555
- if (s != t || n.char(i + 1) == t)
1556
- return -1;
1557
- let o = [n.elt(r, i, i + 1)];
1558
- for (let a = i + 1; a < n.end; a++) {
1559
- let l = n.char(a);
1560
- if (l == t)
1561
- return n.addElement(n.elt(e, i, a + 1, o.concat(n.elt(r, a, a + 1))));
1562
- if (l == 92 && o.push(n.elt("Escape", a, a++ + 2)), x(l))
1563
- break;
1564
- }
1565
- return -1;
1566
- };
1567
- }
1568
- const _t = {
1569
- defineNodes: [
1570
- { name: "Superscript", style: m.special(m.content) },
1571
- { name: "SuperscriptMark", style: m.processingInstruction }
1572
- ],
1573
- parseInline: [{
1574
- name: "Superscript",
1575
- parse: Ke(94, "Superscript", "SuperscriptMark")
1576
- }]
1577
- }, qt = {
1578
- defineNodes: [
1579
- { name: "Subscript", style: m.special(m.content) },
1580
- { name: "SubscriptMark", style: m.processingInstruction }
1581
- ],
1582
- parseInline: [{
1583
- name: "Subscript",
1584
- parse: Ke(126, "Subscript", "SubscriptMark")
1585
- }]
1586
- }, Qt = {
1587
- defineNodes: [{ name: "Emoji", style: m.character }],
1588
- parseInline: [{
1589
- name: "Emoji",
1590
- parse(t, e, r) {
1591
- let n;
1592
- return e != 58 || !(n = /^[a-zA-Z_0-9]+:/.exec(t.slice(r + 1, t.end))) ? -1 : t.addElement(t.elt("Emoji", r, r + 1 + n[0].length));
1593
- }
1594
- }]
1595
- }, Je = /* @__PURE__ */ dt({ commentTokens: { block: { open: "<!--", close: "-->" } } }), Ye = /* @__PURE__ */ new v(), We = /* @__PURE__ */ Nt.configure({
1596
- props: [
1597
- /* @__PURE__ */ Me.add((t) => !t.is("Block") || t.is("Document") || ne(t) != null || Zt(t) ? void 0 : (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })),
1598
- /* @__PURE__ */ Ye.add(ne),
1599
- /* @__PURE__ */ ct.add({
1600
- Document: () => null
1601
- }),
1602
- /* @__PURE__ */ mt.add({
1603
- Document: Je
1604
- })
1605
- ]
1606
- });
1607
- function ne(t) {
1608
- let e = /^(?:ATX|Setext)Heading(\d)$/.exec(t.name);
1609
- return e ? +e[1] : void 0;
1610
- }
1611
- function Zt(t) {
1612
- return t.name == "OrderedList" || t.name == "BulletList";
1613
- }
1614
- function Vt(t, e) {
1615
- let r = t;
1616
- for (; ; ) {
1617
- let n = r.nextSibling, s;
1618
- if (!n || (s = ne(n.type)) != null && s <= e)
1619
- break;
1620
- r = n;
1621
- }
1622
- return r.to;
1623
- }
1624
- const Gt = /* @__PURE__ */ lt.of((t, e, r) => {
1625
- for (let n = X(t).resolveInner(r, -1); n && !(n.from < e); n = n.parent) {
1626
- let s = n.type.prop(Ye);
1627
- if (s == null)
1628
- continue;
1629
- let i = Vt(n, s);
1630
- if (i > r)
1631
- return { from: r, to: i };
1632
- }
1633
- return null;
1634
- });
1635
- function le(t) {
1636
- return new ut(Je, t, [], "markdown");
1637
- }
1638
- const Kt = /* @__PURE__ */ le(We), Jt = /* @__PURE__ */ We.configure([Ut, qt, _t, Qt, {
1639
- props: [
1640
- /* @__PURE__ */ Me.add({
1641
- Table: (t, e) => ({ from: e.doc.lineAt(t.from).to, to: t.to })
1642
- })
1643
- ]
1644
- }]), q = /* @__PURE__ */ le(Jt);
1645
- function Yt(t, e) {
1646
- return (r) => {
1647
- if (r && t) {
1648
- let n = null;
1649
- if (r = /\S*/.exec(r)[0], typeof t == "function" ? n = t(r) : n = ue.matchLanguageName(t, r, !0), n instanceof ue)
1650
- return n.support ? n.support.language.parser : Lt.getSkippingParser(n.load());
1651
- if (n)
1652
- return n.parser;
1653
- }
1654
- return e ? e.parser : null;
1655
- };
1656
- }
1657
- class K {
1658
- constructor(e, r, n, s, i, o, a) {
1659
- this.node = e, this.from = r, this.to = n, this.spaceBefore = s, this.spaceAfter = i, this.type = o, this.item = a;
1660
- }
1661
- blank(e, r = !0) {
1662
- let n = this.spaceBefore + (this.node.name == "Blockquote" ? ">" : "");
1663
- if (e != null) {
1664
- for (; n.length < e; )
1665
- n += " ";
1666
- return n;
1667
- } else {
1668
- for (let s = this.to - this.from - n.length - this.spaceAfter.length; s > 0; s--)
1669
- n += " ";
1670
- return n + (r ? this.spaceAfter : "");
1671
- }
1672
- }
1673
- marker(e, r) {
1674
- let n = this.node.name == "OrderedList" ? String(+tt(this.item, e)[2] + r) : "";
1675
- return this.spaceBefore + n + this.type + this.spaceAfter;
1676
- }
1677
- }
1678
- function et(t, e) {
1679
- let r = [], n = [];
1680
- for (let s = t; s; s = s.parent) {
1681
- if (s.name == "FencedCode")
1682
- return n;
1683
- (s.name == "ListItem" || s.name == "Blockquote") && r.push(s);
1684
- }
1685
- for (let s = r.length - 1; s >= 0; s--) {
1686
- let i = r[s], o, a = e.lineAt(i.from), l = i.from - a.from;
1687
- if (i.name == "Blockquote" && (o = /^ *>( ?)/.exec(a.text.slice(l))))
1688
- n.push(new K(i, l, l + o[0].length, "", o[1], ">", null));
1689
- else if (i.name == "ListItem" && i.parent.name == "OrderedList" && (o = /^( *)\d+([.)])( *)/.exec(a.text.slice(l)))) {
1690
- let h = o[3], f = o[0].length;
1691
- h.length >= 4 && (h = h.slice(0, h.length - 4), f -= 4), n.push(new K(i.parent, l, l + f, o[1], h, o[2], i));
1692
- } else if (i.name == "ListItem" && i.parent.name == "BulletList" && (o = /^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))) {
1693
- let h = o[4], f = o[0].length;
1694
- h.length > 4 && (h = h.slice(0, h.length - 4), f -= 4);
1695
- let p = o[2];
1696
- o[3] && (p += o[3].replace(/[xX]/, " ")), n.push(new K(i.parent, l, l + f, o[1], h, p, i));
1697
- }
1698
- }
1699
- return n;
1700
- }
1701
- function tt(t, e) {
1702
- return /^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from, t.from + 10));
1703
- }
1704
- function J(t, e, r, n = 0) {
1705
- for (let s = -1, i = t; ; ) {
1706
- if (i.name == "ListItem") {
1707
- let a = tt(i, e), l = +a[2];
1708
- if (s >= 0) {
1709
- if (l != s + 1)
1710
- return;
1711
- r.push({ from: i.from + a[1].length, to: i.from + a[0].length, insert: String(s + 2 + n) });
1712
- }
1713
- s = l;
1714
- }
1715
- let o = i.nextSibling;
1716
- if (!o)
1717
- break;
1718
- i = o;
1719
- }
1720
- }
1721
- function he(t, e) {
1722
- let r = /^[ \t]*/.exec(t)[0].length;
1723
- if (!r || e.facet(pt) != " ")
1724
- return t;
1725
- let n = z(t, 4, r), s = "";
1726
- for (let i = n; i > 0; )
1727
- i >= 4 ? (s += " ", i -= 4) : (s += " ", i--);
1728
- return s + t.slice(r);
1729
- }
1730
- const Wt = (t = {}) => ({ state: e, dispatch: r }) => {
1731
- let n = X(e), { doc: s } = e, i = null, o = e.changeByRange((a) => {
1732
- if (!a.empty || !q.isActiveAt(e, a.from, -1) && !q.isActiveAt(e, a.from, 1))
1733
- return i = { range: a };
1734
- let l = a.from, h = s.lineAt(l), f = et(n.resolveInner(l, -1), s);
1735
- for (; f.length && f[f.length - 1].from > l - h.from; )
1736
- f.pop();
1737
- if (!f.length)
1738
- return i = { range: a };
1739
- let p = f[f.length - 1];
1740
- if (p.to - p.spaceAfter.length > l - h.from)
1741
- return i = { range: a };
1742
- let d = l >= p.to - p.spaceAfter.length && !/\S/.test(h.text.slice(p.to));
1743
- if (p.item && d) {
1744
- let w = p.node.firstChild, S = p.node.getChild("ListItem", "ListItem");
1745
- if (w.to >= l || S && S.to < l || h.from > 0 && !/[^\s>]/.test(s.lineAt(h.from - 1).text) || t.nonTightLists === !1) {
1746
- let L = f.length > 1 ? f[f.length - 2] : null, B, E = "";
1747
- L && L.item ? (B = h.from + L.from, E = L.marker(s, 1)) : B = h.from + (L ? L.to : 0);
1748
- let y = [{ from: B, to: l, insert: E }];
1749
- return p.node.name == "OrderedList" && J(p.item, s, y, -2), L && L.node.name == "OrderedList" && J(L.item, s, y), { range: P.cursor(B + E.length), changes: y };
1750
- } else {
1751
- let L = Be(f, e, h);
1752
- return {
1753
- range: P.cursor(l + L.length + 1),
1754
- changes: { from: h.from, insert: L + e.lineBreak }
1755
- };
1756
- }
1757
- }
1758
- if (p.node.name == "Blockquote" && d && h.from) {
1759
- let w = s.lineAt(h.from - 1), S = />\s*$/.exec(w.text);
1760
- if (S && S.index == p.from) {
1761
- let L = e.changes([
1762
- { from: w.from + S.index, to: w.to },
1763
- { from: h.from + p.from, to: h.to }
1764
- ]);
1765
- return { range: a.map(L), changes: L };
1766
- }
1767
- }
1768
- let c = [];
1769
- p.node.name == "OrderedList" && J(p.item, s, c);
1770
- let b = p.item && p.item.from < h.from, k = "";
1771
- if (!b || /^[\s\d.)\-+*>]*/.exec(h.text)[0].length >= p.to)
1772
- for (let w = 0, S = f.length - 1; w <= S; w++)
1773
- k += w == S && !b ? f[w].marker(s, 1) : f[w].blank(w < S ? z(h.text, 4, f[w + 1].from) - k.length : null);
1774
- let A = l;
1775
- for (; A > h.from && /\s/.test(h.text.charAt(A - h.from - 1)); )
1776
- A--;
1777
- return k = he(k, e), tr(p.node, e.doc) && (k = Be(f, e, h) + e.lineBreak + k), c.push({ from: A, to: l, insert: e.lineBreak + k }), { range: P.cursor(A + k.length + 1), changes: c };
1778
- });
1779
- return i ? !1 : (r(e.update(o, { scrollIntoView: !0, userEvent: "input" })), !0);
1780
- }, er = /* @__PURE__ */ Wt();
1781
- function Ae(t) {
1782
- return t.name == "QuoteMark" || t.name == "ListMark";
1783
- }
1784
- function tr(t, e) {
1785
- if (t.name != "OrderedList" && t.name != "BulletList")
1786
- return !1;
1787
- let r = t.firstChild, n = t.getChild("ListItem", "ListItem");
1788
- if (!n)
1789
- return !1;
1790
- let s = e.lineAt(r.to), i = e.lineAt(n.from), o = /^[\s>]*$/.test(s.text);
1791
- return s.number + (o ? 0 : 1) < i.number;
1792
- }
1793
- function Be(t, e, r) {
1794
- let n = "";
1795
- for (let s = 0, i = t.length - 2; s <= i; s++)
1796
- n += t[s].blank(s < i ? z(r.text, 4, t[s + 1].from) - n.length : null, s < i);
1797
- return he(n, e);
1798
- }
1799
- function rr(t, e) {
1800
- let r = t.resolveInner(e, -1), n = e;
1801
- Ae(r) && (n = r.from, r = r.parent);
1802
- for (let s; s = r.childBefore(n); )
1803
- if (Ae(s))
1804
- n = s.from;
1805
- else if (s.name == "OrderedList" || s.name == "BulletList")
1806
- r = s.lastChild, n = r.to;
1807
- else
1808
- break;
1809
- return r;
1810
- }
1811
- const nr = ({ state: t, dispatch: e }) => {
1812
- let r = X(t), n = null, s = t.changeByRange((i) => {
1813
- let o = i.from, { doc: a } = t;
1814
- if (i.empty && q.isActiveAt(t, i.from)) {
1815
- let l = a.lineAt(o), h = et(rr(r, o), a);
1816
- if (h.length) {
1817
- let f = h[h.length - 1], p = f.to - f.spaceAfter.length + (f.spaceAfter ? 1 : 0);
1818
- if (o - l.from > p && !/\S/.test(l.text.slice(p, o - l.from)))
1819
- return {
1820
- range: P.cursor(l.from + p),
1821
- changes: { from: l.from + p, to: o }
1822
- };
1823
- if (o - l.from == p && // Only apply this if we're on the line that has the
1824
- // construct's syntax, or there's only indentation in the
1825
- // target range
1826
- (!f.item || l.from <= f.item.from || !/\S/.test(l.text.slice(0, f.to)))) {
1827
- let d = l.from + f.from;
1828
- if (f.item && f.node.from < f.item.from && /\S/.test(l.text.slice(f.from, f.to))) {
1829
- let c = f.blank(z(l.text, 4, f.to) - z(l.text, 4, f.from));
1830
- return d == l.from && (c = he(c, t)), {
1831
- range: P.cursor(d + c.length),
1832
- changes: { from: d, to: l.from + f.to, insert: c }
1833
- };
1834
- }
1835
- if (d < o)
1836
- return { range: P.cursor(d), changes: { from: d, to: o } };
1837
- }
1838
- }
1839
- }
1840
- return n = { range: i };
1841
- });
1842
- return n ? !1 : (e(t.update(s, { scrollIntoView: !0, userEvent: "delete" })), !0);
1843
- }, sr = [
1844
- { key: "Enter", run: er },
1845
- { key: "Backspace", run: nr }
1846
- ], rt = /* @__PURE__ */ bt({ matchClosingTags: !1 });
1847
- function ur(t = {}) {
1848
- let { codeLanguages: e, defaultCodeLanguage: r, addKeymap: n = !0, base: { parser: s } = Kt, completeHTMLTags: i = !0, pasteURLAsLink: o = !0, htmlTagLanguage: a = rt } = t;
1849
- if (!(s instanceof Z))
1850
- throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");
1851
- let l = t.extensions ? [t.extensions] : [], h = [a.support, Gt], f;
1852
- o && h.push(lr), r instanceof fe ? (h.push(r.support), f = r.language) : r && (f = r);
1853
- let p = e || f ? Yt(e, f) : void 0;
1854
- l.push(Rt({ codeParser: p, htmlParser: a.language.parser })), n && h.push(ht.high(ft.of(sr)));
1855
- let d = le(s.configure(l));
1856
- return i && h.push(d.data.of({ autocomplete: ir })), new fe(d, h);
1857
- }
1858
- function ir(t) {
1859
- let { state: e, pos: r } = t, n = /<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r - 25, r));
1860
- if (!n)
1861
- return null;
1862
- let s = X(e).resolveInner(r, -1);
1863
- for (; s && !s.type.isTop; ) {
1864
- if (s.name == "CodeBlock" || s.name == "FencedCode" || s.name == "ProcessingInstructionBlock" || s.name == "CommentBlock" || s.name == "Link" || s.name == "Image")
1865
- return null;
1866
- s = s.parent;
1867
- }
1868
- return {
1869
- from: r - n[0].length,
1870
- to: r,
1871
- options: or(),
1872
- validFor: /^<[:\-\.\w\u00b7-\uffff]*$/
1873
- };
1874
- }
1875
- let Y = null;
1876
- function or() {
1877
- if (Y)
1878
- return Y;
1879
- let t = wt(new gt(kt.create({ extensions: rt }), 0, !0));
1880
- return Y = t ? t.options : [];
1881
- }
1882
- const ar = /code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i, lr = /* @__PURE__ */ at.domEventHandlers({
1883
- paste: (t, e) => {
1884
- var r;
1885
- let { main: n } = e.state.selection;
1886
- if (n.empty)
1887
- return !1;
1888
- let s = (r = t.clipboardData) === null || r === void 0 ? void 0 : r.getData("text/plain");
1889
- if (!s || !/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(s) || (/^www\./.test(s) && (s = "https://" + s), !q.isActiveAt(e.state, n.from, 1)))
1890
- return !1;
1891
- let i = X(e.state), o = !1;
1892
- return i.iterate({
1893
- from: n.from,
1894
- to: n.to,
1895
- enter: (a) => {
1896
- (a.from > n.from || ar.test(a.name)) && (o = !0);
1897
- },
1898
- leave: (a) => {
1899
- a.to < n.to && (o = !0);
1900
- }
1901
- }), o ? !1 : (e.dispatch({
1902
- changes: [{ from: n.from, insert: "[" }, { from: n.to, insert: `](${s})` }],
1903
- userEvent: "input.paste",
1904
- scrollIntoView: !0
1905
- }), !0);
1906
- }
1907
- });
1908
- export {
1909
- Kt as commonmarkLanguage,
1910
- nr as deleteMarkupBackward,
1911
- er as insertNewlineContinueMarkup,
1912
- Wt as insertNewlineContinueMarkupCommand,
1913
- ur as markdown,
1914
- sr as markdownKeymap,
1915
- q as markdownLanguage,
1916
- lr as pasteURLAsLink
1917
- };
1918
- //# sourceMappingURL=index-D__6kAHa.js.map