@tempots/beatui 0.30.2 → 0.31.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 (368) hide show
  1. package/dist/2019-BY_FFnZU.cjs +1 -0
  2. package/dist/{2019-Cd9nHhvg.js → 2019-C660mMK6.js} +9 -10
  3. package/dist/{2020-CyKJpuK6.js → 2020-C3P-aGet.js} +30 -31
  4. package/dist/2020-Cyyhc8pv.cjs +1 -0
  5. package/dist/{ar-Dz8Mg5la.js → ar-BUxQ3yNv.js} +30 -15
  6. package/dist/ar-DcFl4tkv.cjs +1 -0
  7. package/dist/auth/index.cjs.js +1 -1
  8. package/dist/auth/index.es.js +85 -84
  9. package/dist/beatui.css +32 -6
  10. package/dist/beatui.tailwind.css +32 -6
  11. package/dist/{de-ToWTQGEo.js → de-CKKQr2-K.js} +27 -12
  12. package/dist/de-DEUS3n0J.cjs +1 -0
  13. package/dist/{es-CruxS0Tz.js → es-C5VUn_X1.js} +27 -12
  14. package/dist/es-CIeoDpkc.cjs +1 -0
  15. package/dist/{fa-Cf0NZLWA.js → fa-Cs2LZsfr.js} +30 -15
  16. package/dist/fa-gXa9Xdjn.cjs +1 -0
  17. package/dist/fr-6SpJ-gVV.cjs +1 -0
  18. package/dist/{fr-YKXmqMGr.js → fr-Dlw8mKFp.js} +20 -5
  19. package/dist/{he-D8ZOduPw.js → he-Cm4NxsyE.js} +30 -15
  20. package/dist/he-D9cwxZOb.cjs +1 -0
  21. package/dist/hi-CNRHnMsQ.cjs +1 -0
  22. package/dist/{hi-CIamzVEf.js → hi-Cjz1aQX2.js} +30 -15
  23. package/dist/index-BI5w0jSz.js +2707 -0
  24. package/dist/index-Bv2gn_kV.cjs +4 -0
  25. package/dist/index-C-FUCwXi.js +14275 -0
  26. package/dist/index-CKyH3jwP.cjs +1 -0
  27. package/dist/index-CXY0yKJD.cjs +34 -0
  28. package/dist/{index-O9BwR_8P.cjs → index-CYY_JLSN.cjs} +1 -1
  29. package/dist/index-DKy2mZws.cjs +1 -0
  30. package/dist/{index-B2079wM-.js → index-DjShJtXp.js} +15 -15
  31. package/dist/index-DwyUOY3r.js +68 -0
  32. package/dist/{index-DDpjzV7E.js → index-Jd2O_Iux.js} +304 -307
  33. package/dist/{index-DFJed4ks.js → index-_Kh76-c2.js} +1 -1
  34. package/dist/index-klVI8k8O.cjs +8 -0
  35. package/dist/index.cjs.js +4 -4
  36. package/dist/index.es.js +1123 -1229
  37. package/dist/it-DvBJ31Ls.cjs +1 -0
  38. package/dist/{it-Bn7tG_KC.js → it-iuFeIEsO.js} +29 -14
  39. package/dist/{ja-i1ULXeiu.js → ja-D6Dd96v-.js} +25 -10
  40. package/dist/ja-FKJGj5My.cjs +1 -0
  41. package/dist/json-schema/index.cjs.js +1 -1
  42. package/dist/json-schema/index.es.js +1 -1
  43. package/dist/{ko-BpKDmtvY.js → ko-C8GOsfIU.js} +30 -15
  44. package/dist/ko-PqVOGPUi.cjs +1 -0
  45. package/dist/markdown/index.cjs.js +1 -2
  46. package/dist/markdown/index.es.js +4 -420
  47. package/dist/{modal-DvGSDVSv.js → modal-CuhK7DqK.js} +14 -13
  48. package/dist/modal-RQtwnFy9.cjs +1 -0
  49. package/dist/{nl-Cs4PDWCJ.js → nl-Ct2cyWWi.js} +31 -16
  50. package/dist/nl-DAhT0vfu.cjs +1 -0
  51. package/dist/notice-BnX2sRrK.cjs +2 -0
  52. package/dist/notice-Dz_BJg8D.js +1467 -0
  53. package/dist/{pl-BFLNf991.js → pl-DewgRE-k.js} +31 -16
  54. package/dist/pl-JgD0mCRa.cjs +1 -0
  55. package/dist/prosemirror/index.cjs.js +1 -0
  56. package/dist/prosemirror/index.es.js +6 -0
  57. package/dist/prosemirror.css +294 -0
  58. package/dist/pt-BkoMl_PC.cjs +1 -0
  59. package/dist/{pt-BRZeOkcE.js → pt-CNyp2zeW.js} +31 -16
  60. package/dist/ru-9OW0HQFS.cjs +1 -0
  61. package/dist/{ru-KI7Gowz-.js → ru-U6PdSzha.js} +35 -20
  62. package/dist/styles-url-CF_019NX.js +4 -0
  63. package/dist/styles-url-DhmSan6u.cjs +1 -0
  64. package/dist/toolbar-D7fDCmUn.cjs +1 -0
  65. package/dist/toolbar-DTh9Ouhs.js +118 -0
  66. package/dist/{tr-CYk8Fua5.js → tr-CQVvooxi.js} +28 -13
  67. package/dist/tr-DsOaoQqh.cjs +1 -0
  68. package/dist/translations-BDRano6u.cjs +1 -0
  69. package/dist/{translations-DdNHXAWr.js → translations-Cic51rHH.js} +1 -1
  70. package/dist/translations-D4PjDB1t.js +831 -0
  71. package/dist/translations-DDFTHcX3.cjs +1 -0
  72. package/dist/types/beatui-i18n/default.d.ts +14 -0
  73. package/dist/types/beatui-i18n/locales/en.d.ts +14 -0
  74. package/dist/types/beatui-i18n/translations.d.ts +14 -0
  75. package/dist/types/components/form/input/input-container.d.ts +3 -1
  76. package/dist/types/components/form/input/input-options.d.ts +6 -0
  77. package/dist/types/components/prosemirror/etoolbar-button.d.ts +11 -0
  78. package/dist/types/components/prosemirror/etoolbar-group.d.ts +4 -0
  79. package/dist/types/components/prosemirror/link-control.d.ts +12 -0
  80. package/dist/types/components/prosemirror/prosemirror-markdown-input.d.ts +76 -0
  81. package/dist/types/components/prosemirror/prosemirror-toolbar.d.ts +18 -0
  82. package/dist/types/components/prosemirror/utils.d.ts +12 -0
  83. package/dist/types/prosemirror/index.d.ts +2 -0
  84. package/dist/{ur-BIcZGLWt.js → ur-C3LypxEh.js} +30 -15
  85. package/dist/ur-C8v4y2tI.cjs +1 -0
  86. package/dist/utils-D8WljbbZ.cjs +1 -0
  87. package/dist/{utils-D1op9R8_.js → utils-DY9kZecl.js} +74 -73
  88. package/dist/vi-DzLo7qhK.cjs +1 -0
  89. package/dist/{vi-BeK62QeB.js → vi-M5ObJg3d.js} +19 -4
  90. package/dist/zh-BXk4IZBo.cjs +1 -0
  91. package/dist/{zh-Dt6yWDu2.js → zh-DGA8R46s.js} +32 -17
  92. package/package.json +20 -13
  93. package/dist/2019-Bl1mhxeM.cjs +0 -1
  94. package/dist/2020-BKqFJLj6.cjs +0 -1
  95. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  96. package/dist/_commonjsHelpers-DwGv2jUC.cjs +0 -1
  97. package/dist/apl-B2DGVGxc.js +0 -76
  98. package/dist/apl-M-DNMvvR.cjs +0 -1
  99. package/dist/ar-CbsALGhG.cjs +0 -1
  100. package/dist/asciiarmor-2LVJmxlE.js +0 -34
  101. package/dist/asciiarmor-BMx3XVjX.cjs +0 -1
  102. package/dist/asn1-OOsVM4yU.cjs +0 -1
  103. package/dist/asn1-jKiBa2Ya.js +0 -95
  104. package/dist/asterisk-B1QUaW1C.cjs +0 -1
  105. package/dist/asterisk-DS281yxp.js +0 -271
  106. package/dist/brainfuck-BjUlYKdF.cjs +0 -1
  107. package/dist/brainfuck-C_p9pTT8.js +0 -34
  108. package/dist/clike-BEMIzMUI.cjs +0 -1
  109. package/dist/clike-DGTaUp48.js +0 -620
  110. package/dist/clojure-Ap_IXD2I.cjs +0 -1
  111. package/dist/clojure-CCKyeQKf.js +0 -800
  112. package/dist/cmake-C4D5_VmS.cjs +0 -1
  113. package/dist/cmake-CuaCgAKt.js +0 -28
  114. package/dist/cobol-BlTKFDRj.js +0 -72
  115. package/dist/cobol-Du-cT2hr.cjs +0 -1
  116. package/dist/coffeescript-BVCvwO8I.js +0 -179
  117. package/dist/coffeescript-DDFAj2ea.cjs +0 -1
  118. package/dist/commonlisp-CXBBRCTx.cjs +0 -1
  119. package/dist/commonlisp-D_kxz07b.js +0 -75
  120. package/dist/crystal-D309uH6_.js +0 -217
  121. package/dist/crystal-DAFWRDbh.cjs +0 -1
  122. package/dist/css-BkF-NPzE.js +0 -1553
  123. package/dist/css-DzFJyRJ8.cjs +0 -1
  124. package/dist/cypher-BMq4Fwjl.js +0 -68
  125. package/dist/cypher-BN0-oCze.cjs +0 -1
  126. package/dist/d-BHsqGcfm.cjs +0 -1
  127. package/dist/d-BZcgY6La.js +0 -127
  128. package/dist/de-MO-u5hoD.cjs +0 -1
  129. package/dist/diff-CemTHKfk.cjs +0 -1
  130. package/dist/diff-Cg9d_RX2.js +0 -18
  131. package/dist/dockerfile-BBTH3voH.cjs +0 -1
  132. package/dist/dockerfile-DIy8NleC.js +0 -194
  133. package/dist/dtd-ChoVQPwv.cjs +0 -1
  134. package/dist/dtd-CtLokQ-U.js +0 -84
  135. package/dist/dylan-QYeExnWK.js +0 -234
  136. package/dist/dylan-apTQIgUA.cjs +0 -1
  137. package/dist/ebnf-DUPDuY4r.js +0 -78
  138. package/dist/ebnf-LYmLy17h.cjs +0 -1
  139. package/dist/ecl-C7WNQq7-.cjs +0 -1
  140. package/dist/ecl-CiXN-g_D.js +0 -121
  141. package/dist/eiffel-BJThA8RG.cjs +0 -1
  142. package/dist/eiffel-yQhjl4T1.js +0 -110
  143. package/dist/elm-CNT9vbN0.js +0 -108
  144. package/dist/elm-CcXP9T36.cjs +0 -1
  145. package/dist/erlang-B6mpcObI.cjs +0 -1
  146. package/dist/erlang-CFOYdy9e.js +0 -487
  147. package/dist/es-CqkWVfis.cjs +0 -1
  148. package/dist/fa-DR8j7v-l.cjs +0 -1
  149. package/dist/factor-B-tsx9yW.cjs +0 -1
  150. package/dist/factor-DDOC7X6P.js +0 -65
  151. package/dist/fcl-BzAKklXo.cjs +0 -1
  152. package/dist/fcl-CPC2WYrI.js +0 -103
  153. package/dist/forth-BmxRyE9S.js +0 -60
  154. package/dist/forth-CPAzyZ_n.cjs +0 -1
  155. package/dist/fortran-9bvPyrOW.js +0 -442
  156. package/dist/fortran-DHiTlGV1.cjs +0 -1
  157. package/dist/fr-ClK0mWTO.cjs +0 -1
  158. package/dist/gas-BiPtGF2E.cjs +0 -1
  159. package/dist/gas-cpmYfFX2.js +0 -183
  160. package/dist/gherkin-CJuwpceU.js +0 -34
  161. package/dist/gherkin-Djo7Y51D.cjs +0 -1
  162. package/dist/groovy-BMVITiCm.cjs +0 -1
  163. package/dist/groovy-DZeT_VM-.js +0 -146
  164. package/dist/haskell-Bvt3Qq1t.js +0 -375
  165. package/dist/haskell-CngODaW-.cjs +0 -1
  166. package/dist/haxe-70NVW1pR.js +0 -359
  167. package/dist/haxe-Dyk-piTh.cjs +0 -1
  168. package/dist/he-DeJMBRTP.cjs +0 -1
  169. package/dist/hi-C9Anq8Ae.cjs +0 -1
  170. package/dist/http-BkLifcnL.cjs +0 -1
  171. package/dist/http-D9LttvKF.js +0 -44
  172. package/dist/idl-B6TRFYjl.js +0 -947
  173. package/dist/idl-FmHDmsE-.cjs +0 -1
  174. package/dist/index-0dpJGQbC.js +0 -94
  175. package/dist/index-52kzSRNb.cjs +0 -1
  176. package/dist/index-5a6_6F3Z.cjs +0 -6
  177. package/dist/index-BGHGZg_7.js +0 -552
  178. package/dist/index-BMn-7Ble.js +0 -1307
  179. package/dist/index-BR0F2BVZ.cjs +0 -1
  180. package/dist/index-BlCmv2EJ.cjs +0 -1
  181. package/dist/index-BlamLFdS.js +0 -76
  182. package/dist/index-By8a3eg5.cjs +0 -1
  183. package/dist/index-C0sjoDdy.js +0 -309
  184. package/dist/index-C9RMQY3t.cjs +0 -1
  185. package/dist/index-CDBeAhhM.js +0 -289
  186. package/dist/index-CH2HgQJF.cjs +0 -1
  187. package/dist/index-CT9YDHSn.js +0 -74
  188. package/dist/index-CUZnWZnQ.cjs +0 -3
  189. package/dist/index-CVNvgkJN.js +0 -342
  190. package/dist/index-C_NT6gCL.cjs +0 -1
  191. package/dist/index-CafCsH0Z.cjs +0 -1
  192. package/dist/index-Cei6J0b_.cjs +0 -8
  193. package/dist/index-CmcOKNW2.js +0 -302
  194. package/dist/index-CvpdOKX2.js +0 -136
  195. package/dist/index-CxE1PN5L.cjs +0 -1
  196. package/dist/index-D2BpI4Zz.cjs +0 -2
  197. package/dist/index-D40RPDMJ.cjs +0 -1
  198. package/dist/index-D5iq4kyE.cjs +0 -1
  199. package/dist/index-DFzKuRY8.cjs +0 -1
  200. package/dist/index-DIO9qaw5.cjs +0 -1
  201. package/dist/index-DIR2rO5B.cjs +0 -1
  202. package/dist/index-DPnQDm6f.js +0 -138
  203. package/dist/index-DU0jpFGR.cjs +0 -1
  204. package/dist/index-DUvVsNDG.cjs +0 -13
  205. package/dist/index-DVZnPL32.js +0 -953
  206. package/dist/index-DiYfLAVQ.js +0 -554
  207. package/dist/index-DnIheaHS.js +0 -251
  208. package/dist/index-Dp2K8q6O.cjs +0 -7
  209. package/dist/index-DrlNzz-e.js +0 -59
  210. package/dist/index-Dx9UDsJi.cjs +0 -1
  211. package/dist/index-DxY-AOQA.js +0 -157
  212. package/dist/index-Mmd0YHPJ.js +0 -960
  213. package/dist/index-NyiYUSW3.js +0 -101
  214. package/dist/index-alBMysbQ.js +0 -1874
  215. package/dist/index-lEkIbMCl.js +0 -612
  216. package/dist/index-qwDdlmIi.js +0 -270
  217. package/dist/index-x3mhc_C_.cjs +0 -1
  218. package/dist/it-5n3LuTHe.cjs +0 -1
  219. package/dist/ja-Bdp4_B8-.cjs +0 -1
  220. package/dist/javascript-C2yteZeJ.js +0 -691
  221. package/dist/javascript-DngSGg_0.cjs +0 -1
  222. package/dist/jinja2-DnB6dQmV.js +0 -154
  223. package/dist/jinja2-wbVbDTNi.cjs +0 -1
  224. package/dist/julia-DA67Qw9E.cjs +0 -1
  225. package/dist/julia-DpvXAuO6.js +0 -241
  226. package/dist/ko-B5SwKB-j.cjs +0 -1
  227. package/dist/livescript-Bg3URadp.cjs +0 -1
  228. package/dist/livescript-CanGTf8u.js +0 -272
  229. package/dist/lua-CIsxjGwi.cjs +0 -1
  230. package/dist/lua-XplVlWi_.js +0 -217
  231. package/dist/mathematica-BG089QIc.cjs +0 -1
  232. package/dist/mathematica-jaRHnSxC.js +0 -35
  233. package/dist/mbox-BctzC1hL.js +0 -76
  234. package/dist/mbox-CySolFFZ.cjs +0 -1
  235. package/dist/milkdown/index.cjs.js +0 -1
  236. package/dist/milkdown/index.es.js +0 -4
  237. package/dist/milkdown-input-Bkgdi-Bv.cjs +0 -944
  238. package/dist/milkdown-input-CciSI_a5.js +0 -63967
  239. package/dist/milkdown-url-D99P-nA-.js +0 -4
  240. package/dist/milkdown-url-DqoUZH3u.cjs +0 -1
  241. package/dist/milkdown.css +0 -1914
  242. package/dist/mirc-BfqEffzk.cjs +0 -1
  243. package/dist/mirc-CFBPAOaF.js +0 -72
  244. package/dist/mllike-BSnXJBGA.js +0 -272
  245. package/dist/mllike-QUjwI6zq.cjs +0 -1
  246. package/dist/modal-CAKAT7wv.cjs +0 -1
  247. package/dist/modelica-B6Zhcb-M.cjs +0 -1
  248. package/dist/modelica-vUgVs--1.js +0 -93
  249. package/dist/mscgen-BToym4Bs.cjs +0 -1
  250. package/dist/mscgen-Cpl0NYLN.js +0 -104
  251. package/dist/mumps-CQoS1kWX.js +0 -25
  252. package/dist/mumps-wfyQdxSu.cjs +0 -1
  253. package/dist/nginx-CwqyBUfA.cjs +0 -1
  254. package/dist/nginx-zDPm3Z74.js +0 -89
  255. package/dist/nl-Cenl4nr6.cjs +0 -1
  256. package/dist/notice-DBME6bFw.cjs +0 -2
  257. package/dist/notice-DVEacWKt.js +0 -2275
  258. package/dist/nsis-DPj2fUaP.cjs +0 -1
  259. package/dist/nsis-fePjrhq7.js +0 -62
  260. package/dist/ntriples-CsNjv2QF.js +0 -79
  261. package/dist/ntriples-DgwJmozm.cjs +0 -1
  262. package/dist/octave-1pkKrgAA.cjs +0 -1
  263. package/dist/octave-C8PmmSRH.js +0 -143
  264. package/dist/oz-BXOZCt0U.cjs +0 -1
  265. package/dist/oz-Ce8aN8oE.js +0 -151
  266. package/dist/pascal-De0D6mP7.js +0 -77
  267. package/dist/pascal-DtY2LEkJ.cjs +0 -1
  268. package/dist/perl-B4bSCe1C.js +0 -915
  269. package/dist/perl-CVDWbEju.cjs +0 -1
  270. package/dist/pig-D24Z8EXi.js +0 -54
  271. package/dist/pig-DMByOrnr.cjs +0 -1
  272. package/dist/pl-7xYNCk-v.cjs +0 -1
  273. package/dist/powershell-BaoYaFvj.cjs +0 -1
  274. package/dist/powershell-DkYVfTzP.js +0 -249
  275. package/dist/preprocess-CvkqwVNt.cjs +0 -3
  276. package/dist/preprocess-D898zxsP.js +0 -2295
  277. package/dist/properties-DXHJZ3WE.cjs +0 -1
  278. package/dist/properties-Dn9wna3M.js +0 -26
  279. package/dist/protobuf-BKhXdfH6.cjs +0 -1
  280. package/dist/protobuf-BPIjwpzm.js +0 -49
  281. package/dist/pt-DOLL0Jpj.cjs +0 -1
  282. package/dist/pug-CwAQJzGR.js +0 -248
  283. package/dist/pug-kEfRDOiF.cjs +0 -1
  284. package/dist/puppet-8mAyuMbW.cjs +0 -1
  285. package/dist/puppet-nyd4dhjf.js +0 -45
  286. package/dist/python-BkR3uSy8.js +0 -313
  287. package/dist/python-D-iU6WXz.cjs +0 -1
  288. package/dist/q-BPQ45Nxu.cjs +0 -1
  289. package/dist/q-DXjKs-tC.js +0 -83
  290. package/dist/r-LKEuhEGI.js +0 -104
  291. package/dist/r-r2_EZsON.cjs +0 -1
  292. package/dist/rpm-IznJm2Xc.js +0 -57
  293. package/dist/rpm-YK81m3qU.cjs +0 -1
  294. package/dist/ru-DoS9XuqG.cjs +0 -1
  295. package/dist/ruby-CcYfvIk6.js +0 -228
  296. package/dist/ruby-Cn1sFkZF.cjs +0 -1
  297. package/dist/sas-7E8yHoCW.js +0 -105
  298. package/dist/sas-DAGcJy94.cjs +0 -1
  299. package/dist/scheme-B0ZrbojV.cjs +0 -1
  300. package/dist/scheme-DjibxsNh.js +0 -124
  301. package/dist/shell-BMYo43V6.cjs +0 -1
  302. package/dist/shell-C0C2sNA_.js +0 -182
  303. package/dist/sieve-Bwz7vjP5.js +0 -72
  304. package/dist/sieve-CIYW-b_H.cjs +0 -1
  305. package/dist/simple-mode-B0dvCdAA.js +0 -89
  306. package/dist/simple-mode-BIKNPBes.cjs +0 -1
  307. package/dist/smalltalk-Bhddl2pB.js +0 -48
  308. package/dist/smalltalk-CSslY-3i.cjs +0 -1
  309. package/dist/solr-A1kSnAwJ.cjs +0 -1
  310. package/dist/solr-BNlsLglM.js +0 -41
  311. package/dist/sparql-DnHMBLLY.cjs +0 -1
  312. package/dist/sparql-FarWu_Gb.js +0 -197
  313. package/dist/spreadsheet-B7_BK8hB.cjs +0 -1
  314. package/dist/spreadsheet-C-cy4P5N.js +0 -49
  315. package/dist/sql-9VmIWHrZ.cjs +0 -1
  316. package/dist/sql-CfG5lQ3l.js +0 -282
  317. package/dist/stex-B4wyjEnp.cjs +0 -1
  318. package/dist/stex-Du4h4KAU.js +0 -129
  319. package/dist/stylus-CAdqWld3.js +0 -250
  320. package/dist/stylus-D6GYOT3Z.cjs +0 -1
  321. package/dist/swift-DGw6Cgu8.cjs +0 -1
  322. package/dist/swift-DSxqR9R6.js +0 -230
  323. package/dist/tcl-ByLXbQFo.cjs +0 -1
  324. package/dist/tcl-xfoLljhY.js +0 -81
  325. package/dist/textile-D1AWE-pc.js +0 -295
  326. package/dist/textile-iryw-lTw.cjs +0 -1
  327. package/dist/tiddlywiki-5wqsXtSk.js +0 -155
  328. package/dist/tiddlywiki-D8IJz1k7.cjs +0 -1
  329. package/dist/tiki-C5p5KSQK.cjs +0 -1
  330. package/dist/tiki-__Kn3CeS.js +0 -181
  331. package/dist/toml-3ZsH_4Qa.cjs +0 -1
  332. package/dist/toml-BHiuTcfn.js +0 -49
  333. package/dist/tr-BVmoz40w.cjs +0 -1
  334. package/dist/translations-Dv56lQia.cjs +0 -1
  335. package/dist/troff-D-3QCOYN.cjs +0 -1
  336. package/dist/troff-D2UO-fKf.js +0 -35
  337. package/dist/ttcn-Bsa4sfRm.js +0 -123
  338. package/dist/ttcn-C2MXAqcM.cjs +0 -1
  339. package/dist/ttcn-cfg-BYqcMRxC.cjs +0 -1
  340. package/dist/ttcn-cfg-Bac_acMi.js +0 -88
  341. package/dist/turtle-DSJNatSv.cjs +0 -1
  342. package/dist/turtle-xwJUxoPV.js +0 -80
  343. package/dist/types/components/milkdown/milkdown-input.d.ts +0 -15
  344. package/dist/types/milkdown/index.d.ts +0 -1
  345. package/dist/ur-orNTOdMP.cjs +0 -1
  346. package/dist/utils-Dobqjl2y.cjs +0 -1
  347. package/dist/vb-c2kQGd6-.js +0 -74
  348. package/dist/vb-qzHzzvyB.cjs +0 -1
  349. package/dist/vbscript-1f_Dhg5H.js +0 -324
  350. package/dist/vbscript-CWm8v9tE.cjs +0 -1
  351. package/dist/velocity-D3_yAIp3.cjs +0 -1
  352. package/dist/velocity-DJd0pTTC.js +0 -96
  353. package/dist/verilog-BOhLNmQo.cjs +0 -1
  354. package/dist/verilog-CiS1jyi5.js +0 -262
  355. package/dist/vhdl-CMFbi8Im.cjs +0 -1
  356. package/dist/vhdl-T9HkrbI2.js +0 -106
  357. package/dist/vi-BWyUDP07.cjs +0 -1
  358. package/dist/webidl-CWb_flNk.cjs +0 -1
  359. package/dist/webidl-CjfDENEo.js +0 -155
  360. package/dist/xquery-BUQdORAS.js +0 -422
  361. package/dist/xquery-Cjw5fRnG.cjs +0 -1
  362. package/dist/yacas-C0absKBh.js +0 -73
  363. package/dist/yacas-urx_N5C8.cjs +0 -1
  364. package/dist/z80-CsG3CM6M.cjs +0 -1
  365. package/dist/z80-Pki2zAjW.js +0 -61
  366. package/dist/zh-RVJj1NQq.cjs +0 -1
  367. /package/dist/types/{components/milkdown/milkdown-url.d.ts → prosemirror/styles-url.d.ts} +0 -0
  368. /package/dist/types/{milkdown → prosemirror}/styles.d.ts +0 -0
@@ -1,2295 +0,0 @@
1
- const kn = document.createElement("i");
2
- function qn(n) {
3
- const r = "&" + n + ";";
4
- kn.innerHTML = r;
5
- const t = kn.textContent;
6
- return (
7
- // @ts-expect-error: TypeScript is wrong that `textContent` on elements can
8
- // yield `null`.
9
- t.charCodeAt(t.length - 1) === 59 && n !== "semi" || t === r ? !1 : t
10
- );
11
- }
12
- function Y(n, r, t, e) {
13
- const i = n.length;
14
- let u = 0, l;
15
- if (r < 0 ? r = -r > i ? 0 : i + r : r = r > i ? i : r, t = t > 0 ? t : 0, e.length < 1e4)
16
- l = Array.from(e), l.unshift(r, t), n.splice(...l);
17
- else
18
- for (t && n.splice(r, t); u < e.length; )
19
- l = e.slice(u, u + 1e4), l.unshift(r, 0), n.splice(...l), u += 1e4, r += 1e4;
20
- }
21
- function j(n, r) {
22
- return n.length > 0 ? (Y(n, n.length, 0, r), n) : r;
23
- }
24
- const hn = {}.hasOwnProperty;
25
- function Dn(n) {
26
- const r = {};
27
- let t = -1;
28
- for (; ++t < n.length; )
29
- Rn(r, n[t]);
30
- return r;
31
- }
32
- function Rn(n, r) {
33
- let t;
34
- for (t in r) {
35
- const i = (hn.call(n, t) ? n[t] : void 0) || (n[t] = {}), u = r[t];
36
- let l;
37
- if (u)
38
- for (l in u) {
39
- hn.call(i, l) || (i[l] = []);
40
- const a = u[l];
41
- Vn(
42
- // @ts-expect-error Looks like a list.
43
- i[l],
44
- Array.isArray(a) ? a : a ? [a] : []
45
- );
46
- }
47
- }
48
- }
49
- function Vn(n, r) {
50
- let t = -1;
51
- const e = [];
52
- for (; ++t < r.length; )
53
- (r[t].add === "after" ? n : e).push(r[t]);
54
- Y(n, 0, 0, e);
55
- }
56
- function Me(n) {
57
- const r = {};
58
- let t = -1;
59
- for (; ++t < n.length; )
60
- Hn(r, n[t]);
61
- return r;
62
- }
63
- function Hn(n, r) {
64
- let t;
65
- for (t in r) {
66
- const i = (hn.call(n, t) ? n[t] : void 0) || (n[t] = {}), u = r[t];
67
- let l;
68
- if (u)
69
- for (l in u)
70
- i[l] = u[l];
71
- }
72
- }
73
- function Ne(n, r) {
74
- const t = Number.parseInt(n, r);
75
- return (
76
- // C0 except for HT, LF, FF, CR, space.
77
- t < 9 || t === 11 || t > 13 && t < 32 || // Control character (DEL) of C0, and C1 controls.
78
- t > 126 && t < 160 || // Lone high surrogates and low surrogates.
79
- t > 55295 && t < 57344 || // Noncharacters.
80
- t > 64975 && t < 65008 || /* eslint-disable no-bitwise */
81
- (t & 65535) === 65535 || (t & 65535) === 65534 || /* eslint-enable no-bitwise */
82
- // Out of range
83
- t > 1114111 ? "�" : String.fromCodePoint(t)
84
- );
85
- }
86
- const Qn = { '"': "quot", "&": "amp", "<": "lt", ">": "gt" };
87
- function Un(n) {
88
- return n.replace(/["&<>]/g, r);
89
- function r(t) {
90
- return "&" + Qn[
91
- /** @type {keyof typeof characterReferences} */
92
- t
93
- ] + ";";
94
- }
95
- }
96
- function xn(n) {
97
- return n.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
98
- }
99
- const W = J(/[A-Za-z]/), U = J(/[\dA-Za-z]/), jn = J(/[#-'*+\--9=?A-Z^-~]/);
100
- function mn(n) {
101
- return (
102
- // Special whitespace codes (which have negative values), C0 and Control
103
- // character DEL
104
- n !== null && (n < 32 || n === 127)
105
- );
106
- }
107
- const pn = J(/\d/), Wn = J(/[\dA-Fa-f]/), Yn = J(/[!-/:-@[-`{-~]/);
108
- function C(n) {
109
- return n !== null && n < -2;
110
- }
111
- function Q(n) {
112
- return n !== null && (n < 0 || n === 32);
113
- }
114
- function w(n) {
115
- return n === -2 || n === -1 || n === 32;
116
- }
117
- const $n = J(new RegExp("\\p{P}|\\p{S}", "u")), Zn = J(/\s/);
118
- function J(n) {
119
- return r;
120
- function r(t) {
121
- return t !== null && t > -1 && n.test(String.fromCharCode(t));
122
- }
123
- }
124
- function qe(n, r) {
125
- const t = Un(Gn(n || ""));
126
- if (!r)
127
- return t;
128
- const e = t.indexOf(":"), i = t.indexOf("?"), u = t.indexOf("#"), l = t.indexOf("/");
129
- return (
130
- // If there is no protocol, it’s relative.
131
- e < 0 || // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.
132
- l > -1 && e > l || i > -1 && e > i || u > -1 && e > u || // It is a protocol, it should be allowed.
133
- r.test(t.slice(0, e)) ? t : ""
134
- );
135
- }
136
- function Gn(n) {
137
- const r = [];
138
- let t = -1, e = 0, i = 0;
139
- for (; ++t < n.length; ) {
140
- const u = n.charCodeAt(t);
141
- let l = "";
142
- if (u === 37 && U(n.charCodeAt(t + 1)) && U(n.charCodeAt(t + 2)))
143
- i = 2;
144
- else if (u < 128)
145
- /[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u)) || (l = String.fromCharCode(u));
146
- else if (u > 55295 && u < 57344) {
147
- const a = n.charCodeAt(t + 1);
148
- u < 56320 && a > 56319 && a < 57344 ? (l = String.fromCharCode(u, a), i = 1) : l = "�";
149
- } else
150
- l = String.fromCharCode(u);
151
- l && (r.push(n.slice(e, t), encodeURIComponent(l)), e = t + i + 1, l = ""), i && (t += i, i = 0);
152
- }
153
- return r.join("") + n.slice(e);
154
- }
155
- function F(n, r, t, e) {
156
- const i = e ? e - 1 : Number.POSITIVE_INFINITY;
157
- let u = 0;
158
- return l;
159
- function l(x) {
160
- return w(x) ? (n.enter(t), a(x)) : r(x);
161
- }
162
- function a(x) {
163
- return w(x) && u++ < i ? (n.consume(x), a) : (n.exit(t), r(x));
164
- }
165
- }
166
- const Jn = {
167
- tokenize: Kn
168
- };
169
- function Kn(n) {
170
- const r = n.attempt(this.parser.constructs.contentInitial, e, i);
171
- let t;
172
- return r;
173
- function e(a) {
174
- if (a === null) {
175
- n.consume(a);
176
- return;
177
- }
178
- return n.enter("lineEnding"), n.consume(a), n.exit("lineEnding"), F(n, r, "linePrefix");
179
- }
180
- function i(a) {
181
- return n.enter("paragraph"), u(a);
182
- }
183
- function u(a) {
184
- const x = n.enter("chunkText", {
185
- contentType: "text",
186
- previous: t
187
- });
188
- return t && (t.next = x), t = x, l(a);
189
- }
190
- function l(a) {
191
- if (a === null) {
192
- n.exit("chunkText"), n.exit("paragraph"), n.consume(a);
193
- return;
194
- }
195
- return C(a) ? (n.consume(a), n.exit("chunkText"), u) : (n.consume(a), l);
196
- }
197
- }
198
- const Xn = {
199
- tokenize: vn
200
- }, Sn = {
201
- tokenize: dn
202
- };
203
- function vn(n) {
204
- const r = this, t = [];
205
- let e = 0, i, u, l;
206
- return a;
207
- function a(S) {
208
- if (e < t.length) {
209
- const _ = t[e];
210
- return r.containerState = _[1], n.attempt(_[0].continuation, x, m)(S);
211
- }
212
- return m(S);
213
- }
214
- function x(S) {
215
- if (e++, r.containerState._closeFlow) {
216
- r.containerState._closeFlow = void 0, i && L();
217
- const _ = r.events.length;
218
- let P = _, f;
219
- for (; P--; )
220
- if (r.events[P][0] === "exit" && r.events[P][1].type === "chunkFlow") {
221
- f = r.events[P][1].end;
222
- break;
223
- }
224
- k(e);
225
- let T = _;
226
- for (; T < r.events.length; )
227
- r.events[T][1].end = {
228
- ...f
229
- }, T++;
230
- return Y(r.events, P + 1, 0, r.events.slice(_)), r.events.length = T, m(S);
231
- }
232
- return a(S);
233
- }
234
- function m(S) {
235
- if (e === t.length) {
236
- if (!i)
237
- return g(S);
238
- if (i.currentConstruct && i.currentConstruct.concrete)
239
- return y(S);
240
- r.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack);
241
- }
242
- return r.containerState = {}, n.check(Sn, c, p)(S);
243
- }
244
- function c(S) {
245
- return i && L(), k(e), g(S);
246
- }
247
- function p(S) {
248
- return r.parser.lazy[r.now().line] = e !== t.length, l = r.now().offset, y(S);
249
- }
250
- function g(S) {
251
- return r.containerState = {}, n.attempt(Sn, h, y)(S);
252
- }
253
- function h(S) {
254
- return e++, t.push([r.currentConstruct, r.containerState]), g(S);
255
- }
256
- function y(S) {
257
- if (S === null) {
258
- i && L(), k(0), n.consume(S);
259
- return;
260
- }
261
- return i = i || r.parser.flow(r.now()), n.enter("chunkFlow", {
262
- _tokenizer: i,
263
- contentType: "flow",
264
- previous: u
265
- }), E(S);
266
- }
267
- function E(S) {
268
- if (S === null) {
269
- B(n.exit("chunkFlow"), !0), k(0), n.consume(S);
270
- return;
271
- }
272
- return C(S) ? (n.consume(S), B(n.exit("chunkFlow")), e = 0, r.interrupt = void 0, a) : (n.consume(S), E);
273
- }
274
- function B(S, _) {
275
- const P = r.sliceStream(S);
276
- if (_ && P.push(null), S.previous = u, u && (u.next = S), u = S, i.defineSkip(S.start), i.write(P), r.parser.lazy[S.start.line]) {
277
- let f = i.events.length;
278
- for (; f--; )
279
- if (
280
- // The token starts before the line ending…
281
- i.events[f][1].start.offset < l && // …and either is not ended yet…
282
- (!i.events[f][1].end || // …or ends after it.
283
- i.events[f][1].end.offset > l)
284
- )
285
- return;
286
- const T = r.events.length;
287
- let O = T, N, q;
288
- for (; O--; )
289
- if (r.events[O][0] === "exit" && r.events[O][1].type === "chunkFlow") {
290
- if (N) {
291
- q = r.events[O][1].end;
292
- break;
293
- }
294
- N = !0;
295
- }
296
- for (k(e), f = T; f < r.events.length; )
297
- r.events[f][1].end = {
298
- ...q
299
- }, f++;
300
- Y(r.events, O + 1, 0, r.events.slice(T)), r.events.length = f;
301
- }
302
- }
303
- function k(S) {
304
- let _ = t.length;
305
- for (; _-- > S; ) {
306
- const P = t[_];
307
- r.containerState = P[1], P[0].exit.call(r, n);
308
- }
309
- t.length = S;
310
- }
311
- function L() {
312
- i.write([null]), u = void 0, i = void 0, r.containerState._closeFlow = void 0;
313
- }
314
- }
315
- function dn(n, r, t) {
316
- return F(n, n.attempt(this.parser.constructs.document, r, t), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
317
- }
318
- function bn(n) {
319
- if (n === null || Q(n) || Zn(n))
320
- return 1;
321
- if ($n(n))
322
- return 2;
323
- }
324
- function gn(n, r, t) {
325
- const e = [];
326
- let i = -1;
327
- for (; ++i < n.length; ) {
328
- const u = n[i].resolveAll;
329
- u && !e.includes(u) && (r = u(r, t), e.push(u));
330
- }
331
- return r;
332
- }
333
- const cn = {
334
- name: "attention",
335
- resolveAll: nt,
336
- tokenize: tt
337
- };
338
- function nt(n, r) {
339
- let t = -1, e, i, u, l, a, x, m, c;
340
- for (; ++t < n.length; )
341
- if (n[t][0] === "enter" && n[t][1].type === "attentionSequence" && n[t][1]._close) {
342
- for (e = t; e--; )
343
- if (n[e][0] === "exit" && n[e][1].type === "attentionSequence" && n[e][1]._open && // If the markers are the same:
344
- r.sliceSerialize(n[e][1]).charCodeAt(0) === r.sliceSerialize(n[t][1]).charCodeAt(0)) {
345
- if ((n[e][1]._close || n[t][1]._open) && (n[t][1].end.offset - n[t][1].start.offset) % 3 && !((n[e][1].end.offset - n[e][1].start.offset + n[t][1].end.offset - n[t][1].start.offset) % 3))
346
- continue;
347
- x = n[e][1].end.offset - n[e][1].start.offset > 1 && n[t][1].end.offset - n[t][1].start.offset > 1 ? 2 : 1;
348
- const p = {
349
- ...n[e][1].end
350
- }, g = {
351
- ...n[t][1].start
352
- };
353
- In(p, -x), In(g, x), l = {
354
- type: x > 1 ? "strongSequence" : "emphasisSequence",
355
- start: p,
356
- end: {
357
- ...n[e][1].end
358
- }
359
- }, a = {
360
- type: x > 1 ? "strongSequence" : "emphasisSequence",
361
- start: {
362
- ...n[t][1].start
363
- },
364
- end: g
365
- }, u = {
366
- type: x > 1 ? "strongText" : "emphasisText",
367
- start: {
368
- ...n[e][1].end
369
- },
370
- end: {
371
- ...n[t][1].start
372
- }
373
- }, i = {
374
- type: x > 1 ? "strong" : "emphasis",
375
- start: {
376
- ...l.start
377
- },
378
- end: {
379
- ...a.end
380
- }
381
- }, n[e][1].end = {
382
- ...l.start
383
- }, n[t][1].start = {
384
- ...a.end
385
- }, m = [], n[e][1].end.offset - n[e][1].start.offset && (m = j(m, [["enter", n[e][1], r], ["exit", n[e][1], r]])), m = j(m, [["enter", i, r], ["enter", l, r], ["exit", l, r], ["enter", u, r]]), m = j(m, gn(r.parser.constructs.insideSpan.null, n.slice(e + 1, t), r)), m = j(m, [["exit", u, r], ["enter", a, r], ["exit", a, r], ["exit", i, r]]), n[t][1].end.offset - n[t][1].start.offset ? (c = 2, m = j(m, [["enter", n[t][1], r], ["exit", n[t][1], r]])) : c = 0, Y(n, e - 1, t - e + 3, m), t = e + m.length - c - 2;
386
- break;
387
- }
388
- }
389
- for (t = -1; ++t < n.length; )
390
- n[t][1].type === "attentionSequence" && (n[t][1].type = "data");
391
- return n;
392
- }
393
- function tt(n, r) {
394
- const t = this.parser.constructs.attentionMarkers.null, e = this.previous, i = bn(e);
395
- let u;
396
- return l;
397
- function l(x) {
398
- return u = x, n.enter("attentionSequence"), a(x);
399
- }
400
- function a(x) {
401
- if (x === u)
402
- return n.consume(x), a;
403
- const m = n.exit("attentionSequence"), c = bn(x), p = !c || c === 2 && i || t.includes(x), g = !i || i === 2 && c || t.includes(e);
404
- return m._open = !!(u === 42 ? p : p && (i || !g)), m._close = !!(u === 42 ? g : g && (c || !p)), r(x);
405
- }
406
- }
407
- function In(n, r) {
408
- n.column += r, n.offset += r, n._bufferIndex += r;
409
- }
410
- const et = {
411
- name: "autolink",
412
- tokenize: rt
413
- };
414
- function rt(n, r, t) {
415
- let e = 0;
416
- return i;
417
- function i(h) {
418
- return n.enter("autolink"), n.enter("autolinkMarker"), n.consume(h), n.exit("autolinkMarker"), n.enter("autolinkProtocol"), u;
419
- }
420
- function u(h) {
421
- return W(h) ? (n.consume(h), l) : h === 64 ? t(h) : m(h);
422
- }
423
- function l(h) {
424
- return h === 43 || h === 45 || h === 46 || U(h) ? (e = 1, a(h)) : m(h);
425
- }
426
- function a(h) {
427
- return h === 58 ? (n.consume(h), e = 0, x) : (h === 43 || h === 45 || h === 46 || U(h)) && e++ < 32 ? (n.consume(h), a) : (e = 0, m(h));
428
- }
429
- function x(h) {
430
- return h === 62 ? (n.exit("autolinkProtocol"), n.enter("autolinkMarker"), n.consume(h), n.exit("autolinkMarker"), n.exit("autolink"), r) : h === null || h === 32 || h === 60 || mn(h) ? t(h) : (n.consume(h), x);
431
- }
432
- function m(h) {
433
- return h === 64 ? (n.consume(h), c) : jn(h) ? (n.consume(h), m) : t(h);
434
- }
435
- function c(h) {
436
- return U(h) ? p(h) : t(h);
437
- }
438
- function p(h) {
439
- return h === 46 ? (n.consume(h), e = 0, c) : h === 62 ? (n.exit("autolinkProtocol").type = "autolinkEmail", n.enter("autolinkMarker"), n.consume(h), n.exit("autolinkMarker"), n.exit("autolink"), r) : g(h);
440
- }
441
- function g(h) {
442
- if ((h === 45 || U(h)) && e++ < 63) {
443
- const y = h === 45 ? g : p;
444
- return n.consume(h), y;
445
- }
446
- return t(h);
447
- }
448
- }
449
- const ln = {
450
- partial: !0,
451
- tokenize: it
452
- };
453
- function it(n, r, t) {
454
- return e;
455
- function e(u) {
456
- return w(u) ? F(n, i, "linePrefix")(u) : i(u);
457
- }
458
- function i(u) {
459
- return u === null || C(u) ? r(u) : t(u);
460
- }
461
- }
462
- const Tn = {
463
- continuation: {
464
- tokenize: lt
465
- },
466
- exit: at,
467
- name: "blockQuote",
468
- tokenize: ut
469
- };
470
- function ut(n, r, t) {
471
- const e = this;
472
- return i;
473
- function i(l) {
474
- if (l === 62) {
475
- const a = e.containerState;
476
- return a.open || (n.enter("blockQuote", {
477
- _container: !0
478
- }), a.open = !0), n.enter("blockQuotePrefix"), n.enter("blockQuoteMarker"), n.consume(l), n.exit("blockQuoteMarker"), u;
479
- }
480
- return t(l);
481
- }
482
- function u(l) {
483
- return w(l) ? (n.enter("blockQuotePrefixWhitespace"), n.consume(l), n.exit("blockQuotePrefixWhitespace"), n.exit("blockQuotePrefix"), r) : (n.exit("blockQuotePrefix"), r(l));
484
- }
485
- }
486
- function lt(n, r, t) {
487
- const e = this;
488
- return i;
489
- function i(l) {
490
- return w(l) ? F(n, u, "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(l) : u(l);
491
- }
492
- function u(l) {
493
- return n.attempt(Tn, r, t)(l);
494
- }
495
- }
496
- function at(n) {
497
- n.exit("blockQuote");
498
- }
499
- const Fn = {
500
- name: "characterEscape",
501
- tokenize: ot
502
- };
503
- function ot(n, r, t) {
504
- return e;
505
- function e(u) {
506
- return n.enter("characterEscape"), n.enter("escapeMarker"), n.consume(u), n.exit("escapeMarker"), i;
507
- }
508
- function i(u) {
509
- return Yn(u) ? (n.enter("characterEscapeValue"), n.consume(u), n.exit("characterEscapeValue"), n.exit("characterEscape"), r) : t(u);
510
- }
511
- }
512
- const _n = {
513
- name: "characterReference",
514
- tokenize: st
515
- };
516
- function st(n, r, t) {
517
- const e = this;
518
- let i = 0, u, l;
519
- return a;
520
- function a(p) {
521
- return n.enter("characterReference"), n.enter("characterReferenceMarker"), n.consume(p), n.exit("characterReferenceMarker"), x;
522
- }
523
- function x(p) {
524
- return p === 35 ? (n.enter("characterReferenceMarkerNumeric"), n.consume(p), n.exit("characterReferenceMarkerNumeric"), m) : (n.enter("characterReferenceValue"), u = 31, l = U, c(p));
525
- }
526
- function m(p) {
527
- return p === 88 || p === 120 ? (n.enter("characterReferenceMarkerHexadecimal"), n.consume(p), n.exit("characterReferenceMarkerHexadecimal"), n.enter("characterReferenceValue"), u = 6, l = Wn, c) : (n.enter("characterReferenceValue"), u = 7, l = pn, c(p));
528
- }
529
- function c(p) {
530
- if (p === 59 && i) {
531
- const g = n.exit("characterReferenceValue");
532
- return l === U && !qn(e.sliceSerialize(g)) ? t(p) : (n.enter("characterReferenceMarker"), n.consume(p), n.exit("characterReferenceMarker"), n.exit("characterReference"), r);
533
- }
534
- return l(p) && i++ < u ? (n.consume(p), c) : t(p);
535
- }
536
- }
537
- const Cn = {
538
- partial: !0,
539
- tokenize: mt
540
- }, zn = {
541
- concrete: !0,
542
- name: "codeFenced",
543
- tokenize: ht
544
- };
545
- function ht(n, r, t) {
546
- const e = this, i = {
547
- partial: !0,
548
- tokenize: P
549
- };
550
- let u = 0, l = 0, a;
551
- return x;
552
- function x(f) {
553
- return m(f);
554
- }
555
- function m(f) {
556
- const T = e.events[e.events.length - 1];
557
- return u = T && T[1].type === "linePrefix" ? T[2].sliceSerialize(T[1], !0).length : 0, a = f, n.enter("codeFenced"), n.enter("codeFencedFence"), n.enter("codeFencedFenceSequence"), c(f);
558
- }
559
- function c(f) {
560
- return f === a ? (l++, n.consume(f), c) : l < 3 ? t(f) : (n.exit("codeFencedFenceSequence"), w(f) ? F(n, p, "whitespace")(f) : p(f));
561
- }
562
- function p(f) {
563
- return f === null || C(f) ? (n.exit("codeFencedFence"), e.interrupt ? r(f) : n.check(Cn, E, _)(f)) : (n.enter("codeFencedFenceInfo"), n.enter("chunkString", {
564
- contentType: "string"
565
- }), g(f));
566
- }
567
- function g(f) {
568
- return f === null || C(f) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"), p(f)) : w(f) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"), F(n, h, "whitespace")(f)) : f === 96 && f === a ? t(f) : (n.consume(f), g);
569
- }
570
- function h(f) {
571
- return f === null || C(f) ? p(f) : (n.enter("codeFencedFenceMeta"), n.enter("chunkString", {
572
- contentType: "string"
573
- }), y(f));
574
- }
575
- function y(f) {
576
- return f === null || C(f) ? (n.exit("chunkString"), n.exit("codeFencedFenceMeta"), p(f)) : f === 96 && f === a ? t(f) : (n.consume(f), y);
577
- }
578
- function E(f) {
579
- return n.attempt(i, _, B)(f);
580
- }
581
- function B(f) {
582
- return n.enter("lineEnding"), n.consume(f), n.exit("lineEnding"), k;
583
- }
584
- function k(f) {
585
- return u > 0 && w(f) ? F(n, L, "linePrefix", u + 1)(f) : L(f);
586
- }
587
- function L(f) {
588
- return f === null || C(f) ? n.check(Cn, E, _)(f) : (n.enter("codeFlowValue"), S(f));
589
- }
590
- function S(f) {
591
- return f === null || C(f) ? (n.exit("codeFlowValue"), L(f)) : (n.consume(f), S);
592
- }
593
- function _(f) {
594
- return n.exit("codeFenced"), r(f);
595
- }
596
- function P(f, T, O) {
597
- let N = 0;
598
- return q;
599
- function q(z) {
600
- return f.enter("lineEnding"), f.consume(z), f.exit("lineEnding"), I;
601
- }
602
- function I(z) {
603
- return f.enter("codeFencedFence"), w(z) ? F(f, b, "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(z) : b(z);
604
- }
605
- function b(z) {
606
- return z === a ? (f.enter("codeFencedFenceSequence"), A(z)) : O(z);
607
- }
608
- function A(z) {
609
- return z === a ? (N++, f.consume(z), A) : N >= l ? (f.exit("codeFencedFenceSequence"), w(z) ? F(f, M, "whitespace")(z) : M(z)) : O(z);
610
- }
611
- function M(z) {
612
- return z === null || C(z) ? (f.exit("codeFencedFence"), T(z)) : O(z);
613
- }
614
- }
615
- }
616
- function mt(n, r, t) {
617
- const e = this;
618
- return i;
619
- function i(l) {
620
- return l === null ? t(l) : (n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), u);
621
- }
622
- function u(l) {
623
- return e.parser.lazy[e.now().line] ? t(l) : r(l);
624
- }
625
- }
626
- const on = {
627
- name: "codeIndented",
628
- tokenize: ct
629
- }, pt = {
630
- partial: !0,
631
- tokenize: xt
632
- };
633
- function ct(n, r, t) {
634
- const e = this;
635
- return i;
636
- function i(m) {
637
- return n.enter("codeIndented"), F(n, u, "linePrefix", 5)(m);
638
- }
639
- function u(m) {
640
- const c = e.events[e.events.length - 1];
641
- return c && c[1].type === "linePrefix" && c[2].sliceSerialize(c[1], !0).length >= 4 ? l(m) : t(m);
642
- }
643
- function l(m) {
644
- return m === null ? x(m) : C(m) ? n.attempt(pt, l, x)(m) : (n.enter("codeFlowValue"), a(m));
645
- }
646
- function a(m) {
647
- return m === null || C(m) ? (n.exit("codeFlowValue"), l(m)) : (n.consume(m), a);
648
- }
649
- function x(m) {
650
- return n.exit("codeIndented"), r(m);
651
- }
652
- }
653
- function xt(n, r, t) {
654
- const e = this;
655
- return i;
656
- function i(l) {
657
- return e.parser.lazy[e.now().line] ? t(l) : C(l) ? (n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), i) : F(n, u, "linePrefix", 5)(l);
658
- }
659
- function u(l) {
660
- const a = e.events[e.events.length - 1];
661
- return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? r(l) : C(l) ? i(l) : t(l);
662
- }
663
- }
664
- const gt = {
665
- name: "codeText",
666
- previous: kt,
667
- resolve: ft,
668
- tokenize: St
669
- };
670
- function ft(n) {
671
- let r = n.length - 4, t = 3, e, i;
672
- if ((n[t][1].type === "lineEnding" || n[t][1].type === "space") && (n[r][1].type === "lineEnding" || n[r][1].type === "space")) {
673
- for (e = t; ++e < r; )
674
- if (n[e][1].type === "codeTextData") {
675
- n[t][1].type = "codeTextPadding", n[r][1].type = "codeTextPadding", t += 2, r -= 2;
676
- break;
677
- }
678
- }
679
- for (e = t - 1, r++; ++e <= r; )
680
- i === void 0 ? e !== r && n[e][1].type !== "lineEnding" && (i = e) : (e === r || n[e][1].type === "lineEnding") && (n[i][1].type = "codeTextData", e !== i + 2 && (n[i][1].end = n[e - 1][1].end, n.splice(i + 2, e - i - 2), r -= e - i - 2, e = i + 2), i = void 0);
681
- return n;
682
- }
683
- function kt(n) {
684
- return n !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
685
- }
686
- function St(n, r, t) {
687
- let e = 0, i, u;
688
- return l;
689
- function l(p) {
690
- return n.enter("codeText"), n.enter("codeTextSequence"), a(p);
691
- }
692
- function a(p) {
693
- return p === 96 ? (n.consume(p), e++, a) : (n.exit("codeTextSequence"), x(p));
694
- }
695
- function x(p) {
696
- return p === null ? t(p) : p === 32 ? (n.enter("space"), n.consume(p), n.exit("space"), x) : p === 96 ? (u = n.enter("codeTextSequence"), i = 0, c(p)) : C(p) ? (n.enter("lineEnding"), n.consume(p), n.exit("lineEnding"), x) : (n.enter("codeTextData"), m(p));
697
- }
698
- function m(p) {
699
- return p === null || p === 32 || p === 96 || C(p) ? (n.exit("codeTextData"), x(p)) : (n.consume(p), m);
700
- }
701
- function c(p) {
702
- return p === 96 ? (n.consume(p), i++, c) : i === e ? (n.exit("codeTextSequence"), n.exit("codeText"), r(p)) : (u.type = "codeTextData", m(p));
703
- }
704
- }
705
- class bt {
706
- /**
707
- * @param {ReadonlyArray<T> | null | undefined} [initial]
708
- * Initial items (optional).
709
- * @returns
710
- * Splice buffer.
711
- */
712
- constructor(r) {
713
- this.left = r ? [...r] : [], this.right = [];
714
- }
715
- /**
716
- * Array access;
717
- * does not move the cursor.
718
- *
719
- * @param {number} index
720
- * Index.
721
- * @return {T}
722
- * Item.
723
- */
724
- get(r) {
725
- if (r < 0 || r >= this.left.length + this.right.length)
726
- throw new RangeError("Cannot access index `" + r + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
727
- return r < this.left.length ? this.left[r] : this.right[this.right.length - r + this.left.length - 1];
728
- }
729
- /**
730
- * The length of the splice buffer, one greater than the largest index in the
731
- * array.
732
- */
733
- get length() {
734
- return this.left.length + this.right.length;
735
- }
736
- /**
737
- * Remove and return `list[0]`;
738
- * moves the cursor to `0`.
739
- *
740
- * @returns {T | undefined}
741
- * Item, optional.
742
- */
743
- shift() {
744
- return this.setCursor(0), this.right.pop();
745
- }
746
- /**
747
- * Slice the buffer to get an array;
748
- * does not move the cursor.
749
- *
750
- * @param {number} start
751
- * Start.
752
- * @param {number | null | undefined} [end]
753
- * End (optional).
754
- * @returns {Array<T>}
755
- * Array of items.
756
- */
757
- slice(r, t) {
758
- const e = t ?? Number.POSITIVE_INFINITY;
759
- return e < this.left.length ? this.left.slice(r, e) : r > this.left.length ? this.right.slice(this.right.length - e + this.left.length, this.right.length - r + this.left.length).reverse() : this.left.slice(r).concat(this.right.slice(this.right.length - e + this.left.length).reverse());
760
- }
761
- /**
762
- * Mimics the behavior of Array.prototype.splice() except for the change of
763
- * interface necessary to avoid segfaults when patching in very large arrays.
764
- *
765
- * This operation moves cursor is moved to `start` and results in the cursor
766
- * placed after any inserted items.
767
- *
768
- * @param {number} start
769
- * Start;
770
- * zero-based index at which to start changing the array;
771
- * negative numbers count backwards from the end of the array and values
772
- * that are out-of bounds are clamped to the appropriate end of the array.
773
- * @param {number | null | undefined} [deleteCount=0]
774
- * Delete count (default: `0`);
775
- * maximum number of elements to delete, starting from start.
776
- * @param {Array<T> | null | undefined} [items=[]]
777
- * Items to include in place of the deleted items (default: `[]`).
778
- * @return {Array<T>}
779
- * Any removed items.
780
- */
781
- splice(r, t, e) {
782
- const i = t || 0;
783
- this.setCursor(Math.trunc(r));
784
- const u = this.right.splice(this.right.length - i, Number.POSITIVE_INFINITY);
785
- return e && d(this.left, e), u.reverse();
786
- }
787
- /**
788
- * Remove and return the highest-numbered item in the array, so
789
- * `list[list.length - 1]`;
790
- * Moves the cursor to `length`.
791
- *
792
- * @returns {T | undefined}
793
- * Item, optional.
794
- */
795
- pop() {
796
- return this.setCursor(Number.POSITIVE_INFINITY), this.left.pop();
797
- }
798
- /**
799
- * Inserts a single item to the high-numbered side of the array;
800
- * moves the cursor to `length`.
801
- *
802
- * @param {T} item
803
- * Item.
804
- * @returns {undefined}
805
- * Nothing.
806
- */
807
- push(r) {
808
- this.setCursor(Number.POSITIVE_INFINITY), this.left.push(r);
809
- }
810
- /**
811
- * Inserts many items to the high-numbered side of the array.
812
- * Moves the cursor to `length`.
813
- *
814
- * @param {Array<T>} items
815
- * Items.
816
- * @returns {undefined}
817
- * Nothing.
818
- */
819
- pushMany(r) {
820
- this.setCursor(Number.POSITIVE_INFINITY), d(this.left, r);
821
- }
822
- /**
823
- * Inserts a single item to the low-numbered side of the array;
824
- * Moves the cursor to `0`.
825
- *
826
- * @param {T} item
827
- * Item.
828
- * @returns {undefined}
829
- * Nothing.
830
- */
831
- unshift(r) {
832
- this.setCursor(0), this.right.push(r);
833
- }
834
- /**
835
- * Inserts many items to the low-numbered side of the array;
836
- * moves the cursor to `0`.
837
- *
838
- * @param {Array<T>} items
839
- * Items.
840
- * @returns {undefined}
841
- * Nothing.
842
- */
843
- unshiftMany(r) {
844
- this.setCursor(0), d(this.right, r.reverse());
845
- }
846
- /**
847
- * Move the cursor to a specific position in the array. Requires
848
- * time proportional to the distance moved.
849
- *
850
- * If `n < 0`, the cursor will end up at the beginning.
851
- * If `n > length`, the cursor will end up at the end.
852
- *
853
- * @param {number} n
854
- * Position.
855
- * @return {undefined}
856
- * Nothing.
857
- */
858
- setCursor(r) {
859
- if (!(r === this.left.length || r > this.left.length && this.right.length === 0 || r < 0 && this.left.length === 0))
860
- if (r < this.left.length) {
861
- const t = this.left.splice(r, Number.POSITIVE_INFINITY);
862
- d(this.right, t.reverse());
863
- } else {
864
- const t = this.right.splice(this.left.length + this.right.length - r, Number.POSITIVE_INFINITY);
865
- d(this.left, t.reverse());
866
- }
867
- }
868
- }
869
- function d(n, r) {
870
- let t = 0;
871
- if (r.length < 1e4)
872
- n.push(...r);
873
- else
874
- for (; t < r.length; )
875
- n.push(...r.slice(t, t + 1e4)), t += 1e4;
876
- }
877
- function An(n) {
878
- const r = {};
879
- let t = -1, e, i, u, l, a, x, m;
880
- const c = new bt(n);
881
- for (; ++t < c.length; ) {
882
- for (; t in r; )
883
- t = r[t];
884
- if (e = c.get(t), t && e[1].type === "chunkFlow" && c.get(t - 1)[1].type === "listItemPrefix" && (x = e[1]._tokenizer.events, u = 0, u < x.length && x[u][1].type === "lineEndingBlank" && (u += 2), u < x.length && x[u][1].type === "content"))
885
- for (; ++u < x.length && x[u][1].type !== "content"; )
886
- x[u][1].type === "chunkText" && (x[u][1]._isInFirstContentOfListItem = !0, u++);
887
- if (e[0] === "enter")
888
- e[1].contentType && (Object.assign(r, It(c, t)), t = r[t], m = !0);
889
- else if (e[1]._container) {
890
- for (u = t, i = void 0; u--; )
891
- if (l = c.get(u), l[1].type === "lineEnding" || l[1].type === "lineEndingBlank")
892
- l[0] === "enter" && (i && (c.get(i)[1].type = "lineEndingBlank"), l[1].type = "lineEnding", i = u);
893
- else if (!(l[1].type === "linePrefix" || l[1].type === "listItemIndent")) break;
894
- i && (e[1].end = {
895
- ...c.get(i)[1].start
896
- }, a = c.slice(i, t), a.unshift(e), c.splice(i, t - i + 1, a));
897
- }
898
- }
899
- return Y(n, 0, Number.POSITIVE_INFINITY, c.slice(0)), !m;
900
- }
901
- function It(n, r) {
902
- const t = n.get(r)[1], e = n.get(r)[2];
903
- let i = r - 1;
904
- const u = [];
905
- let l = t._tokenizer;
906
- l || (l = e.parser[t.contentType](t.start), t._contentTypeTextTrailing && (l._contentTypeTextTrailing = !0));
907
- const a = l.events, x = [], m = {};
908
- let c, p, g = -1, h = t, y = 0, E = 0;
909
- const B = [E];
910
- for (; h; ) {
911
- for (; n.get(++i)[1] !== h; )
912
- ;
913
- u.push(i), h._tokenizer || (c = e.sliceStream(h), h.next || c.push(null), p && l.defineSkip(h.start), h._isInFirstContentOfListItem && (l._gfmTasklistFirstContentOfListItem = !0), l.write(c), h._isInFirstContentOfListItem && (l._gfmTasklistFirstContentOfListItem = void 0)), p = h, h = h.next;
914
- }
915
- for (h = t; ++g < a.length; )
916
- // Find a void token that includes a break.
917
- a[g][0] === "exit" && a[g - 1][0] === "enter" && a[g][1].type === a[g - 1][1].type && a[g][1].start.line !== a[g][1].end.line && (E = g + 1, B.push(E), h._tokenizer = void 0, h.previous = void 0, h = h.next);
918
- for (l.events = [], h ? (h._tokenizer = void 0, h.previous = void 0) : B.pop(), g = B.length; g--; ) {
919
- const k = a.slice(B[g], B[g + 1]), L = u.pop();
920
- x.push([L, L + k.length - 1]), n.splice(L, 2, k);
921
- }
922
- for (x.reverse(), g = -1; ++g < x.length; )
923
- m[y + x[g][0]] = y + x[g][1], y += x[g][1] - x[g][0] - 1;
924
- return m;
925
- }
926
- const Ct = {
927
- resolve: wt,
928
- tokenize: yt
929
- }, zt = {
930
- partial: !0,
931
- tokenize: Et
932
- };
933
- function wt(n) {
934
- return An(n), n;
935
- }
936
- function yt(n, r) {
937
- let t;
938
- return e;
939
- function e(a) {
940
- return n.enter("content"), t = n.enter("chunkContent", {
941
- contentType: "content"
942
- }), i(a);
943
- }
944
- function i(a) {
945
- return a === null ? u(a) : C(a) ? n.check(zt, l, u)(a) : (n.consume(a), i);
946
- }
947
- function u(a) {
948
- return n.exit("chunkContent"), n.exit("content"), r(a);
949
- }
950
- function l(a) {
951
- return n.consume(a), n.exit("chunkContent"), t.next = n.enter("chunkContent", {
952
- contentType: "content",
953
- previous: t
954
- }), t = t.next, i;
955
- }
956
- }
957
- function Et(n, r, t) {
958
- const e = this;
959
- return i;
960
- function i(l) {
961
- return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), F(n, u, "linePrefix");
962
- }
963
- function u(l) {
964
- if (l === null || C(l))
965
- return t(l);
966
- const a = e.events[e.events.length - 1];
967
- return !e.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? r(l) : n.interrupt(e.parser.constructs.flow, t, r)(l);
968
- }
969
- }
970
- function Pn(n, r, t, e, i, u, l, a, x) {
971
- const m = x || Number.POSITIVE_INFINITY;
972
- let c = 0;
973
- return p;
974
- function p(k) {
975
- return k === 60 ? (n.enter(e), n.enter(i), n.enter(u), n.consume(k), n.exit(u), g) : k === null || k === 32 || k === 41 || mn(k) ? t(k) : (n.enter(e), n.enter(l), n.enter(a), n.enter("chunkString", {
976
- contentType: "string"
977
- }), E(k));
978
- }
979
- function g(k) {
980
- return k === 62 ? (n.enter(u), n.consume(k), n.exit(u), n.exit(i), n.exit(e), r) : (n.enter(a), n.enter("chunkString", {
981
- contentType: "string"
982
- }), h(k));
983
- }
984
- function h(k) {
985
- return k === 62 ? (n.exit("chunkString"), n.exit(a), g(k)) : k === null || k === 60 || C(k) ? t(k) : (n.consume(k), k === 92 ? y : h);
986
- }
987
- function y(k) {
988
- return k === 60 || k === 62 || k === 92 ? (n.consume(k), h) : h(k);
989
- }
990
- function E(k) {
991
- return !c && (k === null || k === 41 || Q(k)) ? (n.exit("chunkString"), n.exit(a), n.exit(l), n.exit(e), r(k)) : c < m && k === 40 ? (n.consume(k), c++, E) : k === 41 ? (n.consume(k), c--, E) : k === null || k === 32 || k === 40 || mn(k) ? t(k) : (n.consume(k), k === 92 ? B : E);
992
- }
993
- function B(k) {
994
- return k === 40 || k === 41 || k === 92 ? (n.consume(k), E) : E(k);
995
- }
996
- }
997
- function Bn(n, r, t, e, i, u) {
998
- const l = this;
999
- let a = 0, x;
1000
- return m;
1001
- function m(h) {
1002
- return n.enter(e), n.enter(i), n.consume(h), n.exit(i), n.enter(u), c;
1003
- }
1004
- function c(h) {
1005
- return a > 999 || h === null || h === 91 || h === 93 && !x || // To do: remove in the future once we’ve switched from
1006
- // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
1007
- // which doesn’t need this.
1008
- // Hidden footnotes hook.
1009
- /* c8 ignore next 3 */
1010
- h === 94 && !a && "_hiddenFootnoteSupport" in l.parser.constructs ? t(h) : h === 93 ? (n.exit(u), n.enter(i), n.consume(h), n.exit(i), n.exit(e), r) : C(h) ? (n.enter("lineEnding"), n.consume(h), n.exit("lineEnding"), c) : (n.enter("chunkString", {
1011
- contentType: "string"
1012
- }), p(h));
1013
- }
1014
- function p(h) {
1015
- return h === null || h === 91 || h === 93 || C(h) || a++ > 999 ? (n.exit("chunkString"), c(h)) : (n.consume(h), x || (x = !w(h)), h === 92 ? g : p);
1016
- }
1017
- function g(h) {
1018
- return h === 91 || h === 92 || h === 93 ? (n.consume(h), a++, p) : p(h);
1019
- }
1020
- }
1021
- function Ln(n, r, t, e, i, u) {
1022
- let l;
1023
- return a;
1024
- function a(g) {
1025
- return g === 34 || g === 39 || g === 40 ? (n.enter(e), n.enter(i), n.consume(g), n.exit(i), l = g === 40 ? 41 : g, x) : t(g);
1026
- }
1027
- function x(g) {
1028
- return g === l ? (n.enter(i), n.consume(g), n.exit(i), n.exit(e), r) : (n.enter(u), m(g));
1029
- }
1030
- function m(g) {
1031
- return g === l ? (n.exit(u), x(l)) : g === null ? t(g) : C(g) ? (n.enter("lineEnding"), n.consume(g), n.exit("lineEnding"), F(n, m, "linePrefix")) : (n.enter("chunkString", {
1032
- contentType: "string"
1033
- }), c(g));
1034
- }
1035
- function c(g) {
1036
- return g === l || g === null || C(g) ? (n.exit("chunkString"), m(g)) : (n.consume(g), g === 92 ? p : c);
1037
- }
1038
- function p(g) {
1039
- return g === l || g === 92 ? (n.consume(g), c) : c(g);
1040
- }
1041
- }
1042
- function nn(n, r) {
1043
- let t;
1044
- return e;
1045
- function e(i) {
1046
- return C(i) ? (n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), t = !0, e) : w(i) ? F(n, e, t ? "linePrefix" : "lineSuffix")(i) : r(i);
1047
- }
1048
- }
1049
- const Tt = {
1050
- name: "definition",
1051
- tokenize: _t
1052
- }, Ft = {
1053
- partial: !0,
1054
- tokenize: At
1055
- };
1056
- function _t(n, r, t) {
1057
- const e = this;
1058
- let i;
1059
- return u;
1060
- function u(h) {
1061
- return n.enter("definition"), l(h);
1062
- }
1063
- function l(h) {
1064
- return Bn.call(
1065
- e,
1066
- n,
1067
- a,
1068
- // Note: we don’t need to reset the way `markdown-rs` does.
1069
- t,
1070
- "definitionLabel",
1071
- "definitionLabelMarker",
1072
- "definitionLabelString"
1073
- )(h);
1074
- }
1075
- function a(h) {
1076
- return i = xn(e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1)), h === 58 ? (n.enter("definitionMarker"), n.consume(h), n.exit("definitionMarker"), x) : t(h);
1077
- }
1078
- function x(h) {
1079
- return Q(h) ? nn(n, m)(h) : m(h);
1080
- }
1081
- function m(h) {
1082
- return Pn(
1083
- n,
1084
- c,
1085
- // Note: we don’t need to reset the way `markdown-rs` does.
1086
- t,
1087
- "definitionDestination",
1088
- "definitionDestinationLiteral",
1089
- "definitionDestinationLiteralMarker",
1090
- "definitionDestinationRaw",
1091
- "definitionDestinationString"
1092
- )(h);
1093
- }
1094
- function c(h) {
1095
- return n.attempt(Ft, p, p)(h);
1096
- }
1097
- function p(h) {
1098
- return w(h) ? F(n, g, "whitespace")(h) : g(h);
1099
- }
1100
- function g(h) {
1101
- return h === null || C(h) ? (n.exit("definition"), e.parser.defined.push(i), r(h)) : t(h);
1102
- }
1103
- }
1104
- function At(n, r, t) {
1105
- return e;
1106
- function e(a) {
1107
- return Q(a) ? nn(n, i)(a) : t(a);
1108
- }
1109
- function i(a) {
1110
- return Ln(n, u, t, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(a);
1111
- }
1112
- function u(a) {
1113
- return w(a) ? F(n, l, "whitespace")(a) : l(a);
1114
- }
1115
- function l(a) {
1116
- return a === null || C(a) ? r(a) : t(a);
1117
- }
1118
- }
1119
- const Pt = {
1120
- name: "hardBreakEscape",
1121
- tokenize: Bt
1122
- };
1123
- function Bt(n, r, t) {
1124
- return e;
1125
- function e(u) {
1126
- return n.enter("hardBreakEscape"), n.consume(u), i;
1127
- }
1128
- function i(u) {
1129
- return C(u) ? (n.exit("hardBreakEscape"), r(u)) : t(u);
1130
- }
1131
- }
1132
- const Lt = {
1133
- name: "headingAtx",
1134
- resolve: Ot,
1135
- tokenize: Mt
1136
- };
1137
- function Ot(n, r) {
1138
- let t = n.length - 2, e = 3, i, u;
1139
- return n[e][1].type === "whitespace" && (e += 2), t - 2 > e && n[t][1].type === "whitespace" && (t -= 2), n[t][1].type === "atxHeadingSequence" && (e === t - 1 || t - 4 > e && n[t - 2][1].type === "whitespace") && (t -= e + 1 === t ? 2 : 4), t > e && (i = {
1140
- type: "atxHeadingText",
1141
- start: n[e][1].start,
1142
- end: n[t][1].end
1143
- }, u = {
1144
- type: "chunkText",
1145
- start: n[e][1].start,
1146
- end: n[t][1].end,
1147
- contentType: "text"
1148
- }, Y(n, e, t - e + 1, [["enter", i, r], ["enter", u, r], ["exit", u, r], ["exit", i, r]])), n;
1149
- }
1150
- function Mt(n, r, t) {
1151
- let e = 0;
1152
- return i;
1153
- function i(c) {
1154
- return n.enter("atxHeading"), u(c);
1155
- }
1156
- function u(c) {
1157
- return n.enter("atxHeadingSequence"), l(c);
1158
- }
1159
- function l(c) {
1160
- return c === 35 && e++ < 6 ? (n.consume(c), l) : c === null || Q(c) ? (n.exit("atxHeadingSequence"), a(c)) : t(c);
1161
- }
1162
- function a(c) {
1163
- return c === 35 ? (n.enter("atxHeadingSequence"), x(c)) : c === null || C(c) ? (n.exit("atxHeading"), r(c)) : w(c) ? F(n, a, "whitespace")(c) : (n.enter("atxHeadingText"), m(c));
1164
- }
1165
- function x(c) {
1166
- return c === 35 ? (n.consume(c), x) : (n.exit("atxHeadingSequence"), a(c));
1167
- }
1168
- function m(c) {
1169
- return c === null || c === 35 || Q(c) ? (n.exit("atxHeadingText"), a(c)) : (n.consume(c), m);
1170
- }
1171
- }
1172
- const Nt = [
1173
- "address",
1174
- "article",
1175
- "aside",
1176
- "base",
1177
- "basefont",
1178
- "blockquote",
1179
- "body",
1180
- "caption",
1181
- "center",
1182
- "col",
1183
- "colgroup",
1184
- "dd",
1185
- "details",
1186
- "dialog",
1187
- "dir",
1188
- "div",
1189
- "dl",
1190
- "dt",
1191
- "fieldset",
1192
- "figcaption",
1193
- "figure",
1194
- "footer",
1195
- "form",
1196
- "frame",
1197
- "frameset",
1198
- "h1",
1199
- "h2",
1200
- "h3",
1201
- "h4",
1202
- "h5",
1203
- "h6",
1204
- "head",
1205
- "header",
1206
- "hr",
1207
- "html",
1208
- "iframe",
1209
- "legend",
1210
- "li",
1211
- "link",
1212
- "main",
1213
- "menu",
1214
- "menuitem",
1215
- "nav",
1216
- "noframes",
1217
- "ol",
1218
- "optgroup",
1219
- "option",
1220
- "p",
1221
- "param",
1222
- "search",
1223
- "section",
1224
- "summary",
1225
- "table",
1226
- "tbody",
1227
- "td",
1228
- "tfoot",
1229
- "th",
1230
- "thead",
1231
- "title",
1232
- "tr",
1233
- "track",
1234
- "ul"
1235
- ], wn = ["pre", "script", "style", "textarea"], qt = {
1236
- concrete: !0,
1237
- name: "htmlFlow",
1238
- resolveTo: Vt,
1239
- tokenize: Ht
1240
- }, Dt = {
1241
- partial: !0,
1242
- tokenize: Ut
1243
- }, Rt = {
1244
- partial: !0,
1245
- tokenize: Qt
1246
- };
1247
- function Vt(n) {
1248
- let r = n.length;
1249
- for (; r-- && !(n[r][0] === "enter" && n[r][1].type === "htmlFlow"); )
1250
- ;
1251
- return r > 1 && n[r - 2][1].type === "linePrefix" && (n[r][1].start = n[r - 2][1].start, n[r + 1][1].start = n[r - 2][1].start, n.splice(r - 2, 2)), n;
1252
- }
1253
- function Ht(n, r, t) {
1254
- const e = this;
1255
- let i, u, l, a, x;
1256
- return m;
1257
- function m(s) {
1258
- return c(s);
1259
- }
1260
- function c(s) {
1261
- return n.enter("htmlFlow"), n.enter("htmlFlowData"), n.consume(s), p;
1262
- }
1263
- function p(s) {
1264
- return s === 33 ? (n.consume(s), g) : s === 47 ? (n.consume(s), u = !0, E) : s === 63 ? (n.consume(s), i = 3, e.interrupt ? r : o) : W(s) ? (n.consume(s), l = String.fromCharCode(s), B) : t(s);
1265
- }
1266
- function g(s) {
1267
- return s === 45 ? (n.consume(s), i = 2, h) : s === 91 ? (n.consume(s), i = 5, a = 0, y) : W(s) ? (n.consume(s), i = 4, e.interrupt ? r : o) : t(s);
1268
- }
1269
- function h(s) {
1270
- return s === 45 ? (n.consume(s), e.interrupt ? r : o) : t(s);
1271
- }
1272
- function y(s) {
1273
- const G = "CDATA[";
1274
- return s === G.charCodeAt(a++) ? (n.consume(s), a === G.length ? e.interrupt ? r : b : y) : t(s);
1275
- }
1276
- function E(s) {
1277
- return W(s) ? (n.consume(s), l = String.fromCharCode(s), B) : t(s);
1278
- }
1279
- function B(s) {
1280
- if (s === null || s === 47 || s === 62 || Q(s)) {
1281
- const G = s === 47, tn = l.toLowerCase();
1282
- return !G && !u && wn.includes(tn) ? (i = 1, e.interrupt ? r(s) : b(s)) : Nt.includes(l.toLowerCase()) ? (i = 6, G ? (n.consume(s), k) : e.interrupt ? r(s) : b(s)) : (i = 7, e.interrupt && !e.parser.lazy[e.now().line] ? t(s) : u ? L(s) : S(s));
1283
- }
1284
- return s === 45 || U(s) ? (n.consume(s), l += String.fromCharCode(s), B) : t(s);
1285
- }
1286
- function k(s) {
1287
- return s === 62 ? (n.consume(s), e.interrupt ? r : b) : t(s);
1288
- }
1289
- function L(s) {
1290
- return w(s) ? (n.consume(s), L) : q(s);
1291
- }
1292
- function S(s) {
1293
- return s === 47 ? (n.consume(s), q) : s === 58 || s === 95 || W(s) ? (n.consume(s), _) : w(s) ? (n.consume(s), S) : q(s);
1294
- }
1295
- function _(s) {
1296
- return s === 45 || s === 46 || s === 58 || s === 95 || U(s) ? (n.consume(s), _) : P(s);
1297
- }
1298
- function P(s) {
1299
- return s === 61 ? (n.consume(s), f) : w(s) ? (n.consume(s), P) : S(s);
1300
- }
1301
- function f(s) {
1302
- return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (n.consume(s), x = s, T) : w(s) ? (n.consume(s), f) : O(s);
1303
- }
1304
- function T(s) {
1305
- return s === x ? (n.consume(s), x = null, N) : s === null || C(s) ? t(s) : (n.consume(s), T);
1306
- }
1307
- function O(s) {
1308
- return s === null || s === 34 || s === 39 || s === 47 || s === 60 || s === 61 || s === 62 || s === 96 || Q(s) ? P(s) : (n.consume(s), O);
1309
- }
1310
- function N(s) {
1311
- return s === 47 || s === 62 || w(s) ? S(s) : t(s);
1312
- }
1313
- function q(s) {
1314
- return s === 62 ? (n.consume(s), I) : t(s);
1315
- }
1316
- function I(s) {
1317
- return s === null || C(s) ? b(s) : w(s) ? (n.consume(s), I) : t(s);
1318
- }
1319
- function b(s) {
1320
- return s === 45 && i === 2 ? (n.consume(s), V) : s === 60 && i === 1 ? (n.consume(s), D) : s === 62 && i === 4 ? (n.consume(s), Z) : s === 63 && i === 3 ? (n.consume(s), o) : s === 93 && i === 5 ? (n.consume(s), K) : C(s) && (i === 6 || i === 7) ? (n.exit("htmlFlowData"), n.check(Dt, X, A)(s)) : s === null || C(s) ? (n.exit("htmlFlowData"), A(s)) : (n.consume(s), b);
1321
- }
1322
- function A(s) {
1323
- return n.check(Rt, M, X)(s);
1324
- }
1325
- function M(s) {
1326
- return n.enter("lineEnding"), n.consume(s), n.exit("lineEnding"), z;
1327
- }
1328
- function z(s) {
1329
- return s === null || C(s) ? A(s) : (n.enter("htmlFlowData"), b(s));
1330
- }
1331
- function V(s) {
1332
- return s === 45 ? (n.consume(s), o) : b(s);
1333
- }
1334
- function D(s) {
1335
- return s === 47 ? (n.consume(s), l = "", $) : b(s);
1336
- }
1337
- function $(s) {
1338
- if (s === 62) {
1339
- const G = l.toLowerCase();
1340
- return wn.includes(G) ? (n.consume(s), Z) : b(s);
1341
- }
1342
- return W(s) && l.length < 8 ? (n.consume(s), l += String.fromCharCode(s), $) : b(s);
1343
- }
1344
- function K(s) {
1345
- return s === 93 ? (n.consume(s), o) : b(s);
1346
- }
1347
- function o(s) {
1348
- return s === 62 ? (n.consume(s), Z) : s === 45 && i === 2 ? (n.consume(s), o) : b(s);
1349
- }
1350
- function Z(s) {
1351
- return s === null || C(s) ? (n.exit("htmlFlowData"), X(s)) : (n.consume(s), Z);
1352
- }
1353
- function X(s) {
1354
- return n.exit("htmlFlow"), r(s);
1355
- }
1356
- }
1357
- function Qt(n, r, t) {
1358
- const e = this;
1359
- return i;
1360
- function i(l) {
1361
- return C(l) ? (n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), u) : t(l);
1362
- }
1363
- function u(l) {
1364
- return e.parser.lazy[e.now().line] ? t(l) : r(l);
1365
- }
1366
- }
1367
- function Ut(n, r, t) {
1368
- return e;
1369
- function e(i) {
1370
- return n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), n.attempt(ln, r, t);
1371
- }
1372
- }
1373
- const jt = {
1374
- name: "htmlText",
1375
- tokenize: Wt
1376
- };
1377
- function Wt(n, r, t) {
1378
- const e = this;
1379
- let i, u, l;
1380
- return a;
1381
- function a(o) {
1382
- return n.enter("htmlText"), n.enter("htmlTextData"), n.consume(o), x;
1383
- }
1384
- function x(o) {
1385
- return o === 33 ? (n.consume(o), m) : o === 47 ? (n.consume(o), P) : o === 63 ? (n.consume(o), S) : W(o) ? (n.consume(o), O) : t(o);
1386
- }
1387
- function m(o) {
1388
- return o === 45 ? (n.consume(o), c) : o === 91 ? (n.consume(o), u = 0, y) : W(o) ? (n.consume(o), L) : t(o);
1389
- }
1390
- function c(o) {
1391
- return o === 45 ? (n.consume(o), h) : t(o);
1392
- }
1393
- function p(o) {
1394
- return o === null ? t(o) : o === 45 ? (n.consume(o), g) : C(o) ? (l = p, D(o)) : (n.consume(o), p);
1395
- }
1396
- function g(o) {
1397
- return o === 45 ? (n.consume(o), h) : p(o);
1398
- }
1399
- function h(o) {
1400
- return o === 62 ? V(o) : o === 45 ? g(o) : p(o);
1401
- }
1402
- function y(o) {
1403
- const Z = "CDATA[";
1404
- return o === Z.charCodeAt(u++) ? (n.consume(o), u === Z.length ? E : y) : t(o);
1405
- }
1406
- function E(o) {
1407
- return o === null ? t(o) : o === 93 ? (n.consume(o), B) : C(o) ? (l = E, D(o)) : (n.consume(o), E);
1408
- }
1409
- function B(o) {
1410
- return o === 93 ? (n.consume(o), k) : E(o);
1411
- }
1412
- function k(o) {
1413
- return o === 62 ? V(o) : o === 93 ? (n.consume(o), k) : E(o);
1414
- }
1415
- function L(o) {
1416
- return o === null || o === 62 ? V(o) : C(o) ? (l = L, D(o)) : (n.consume(o), L);
1417
- }
1418
- function S(o) {
1419
- return o === null ? t(o) : o === 63 ? (n.consume(o), _) : C(o) ? (l = S, D(o)) : (n.consume(o), S);
1420
- }
1421
- function _(o) {
1422
- return o === 62 ? V(o) : S(o);
1423
- }
1424
- function P(o) {
1425
- return W(o) ? (n.consume(o), f) : t(o);
1426
- }
1427
- function f(o) {
1428
- return o === 45 || U(o) ? (n.consume(o), f) : T(o);
1429
- }
1430
- function T(o) {
1431
- return C(o) ? (l = T, D(o)) : w(o) ? (n.consume(o), T) : V(o);
1432
- }
1433
- function O(o) {
1434
- return o === 45 || U(o) ? (n.consume(o), O) : o === 47 || o === 62 || Q(o) ? N(o) : t(o);
1435
- }
1436
- function N(o) {
1437
- return o === 47 ? (n.consume(o), V) : o === 58 || o === 95 || W(o) ? (n.consume(o), q) : C(o) ? (l = N, D(o)) : w(o) ? (n.consume(o), N) : V(o);
1438
- }
1439
- function q(o) {
1440
- return o === 45 || o === 46 || o === 58 || o === 95 || U(o) ? (n.consume(o), q) : I(o);
1441
- }
1442
- function I(o) {
1443
- return o === 61 ? (n.consume(o), b) : C(o) ? (l = I, D(o)) : w(o) ? (n.consume(o), I) : N(o);
1444
- }
1445
- function b(o) {
1446
- return o === null || o === 60 || o === 61 || o === 62 || o === 96 ? t(o) : o === 34 || o === 39 ? (n.consume(o), i = o, A) : C(o) ? (l = b, D(o)) : w(o) ? (n.consume(o), b) : (n.consume(o), M);
1447
- }
1448
- function A(o) {
1449
- return o === i ? (n.consume(o), i = void 0, z) : o === null ? t(o) : C(o) ? (l = A, D(o)) : (n.consume(o), A);
1450
- }
1451
- function M(o) {
1452
- return o === null || o === 34 || o === 39 || o === 60 || o === 61 || o === 96 ? t(o) : o === 47 || o === 62 || Q(o) ? N(o) : (n.consume(o), M);
1453
- }
1454
- function z(o) {
1455
- return o === 47 || o === 62 || Q(o) ? N(o) : t(o);
1456
- }
1457
- function V(o) {
1458
- return o === 62 ? (n.consume(o), n.exit("htmlTextData"), n.exit("htmlText"), r) : t(o);
1459
- }
1460
- function D(o) {
1461
- return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(o), n.exit("lineEnding"), $;
1462
- }
1463
- function $(o) {
1464
- return w(o) ? F(n, K, "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(o) : K(o);
1465
- }
1466
- function K(o) {
1467
- return n.enter("htmlTextData"), l(o);
1468
- }
1469
- }
1470
- const fn = {
1471
- name: "labelEnd",
1472
- resolveAll: Gt,
1473
- resolveTo: Jt,
1474
- tokenize: Kt
1475
- }, Yt = {
1476
- tokenize: Xt
1477
- }, $t = {
1478
- tokenize: vt
1479
- }, Zt = {
1480
- tokenize: dt
1481
- };
1482
- function Gt(n) {
1483
- let r = -1;
1484
- const t = [];
1485
- for (; ++r < n.length; ) {
1486
- const e = n[r][1];
1487
- if (t.push(n[r]), e.type === "labelImage" || e.type === "labelLink" || e.type === "labelEnd") {
1488
- const i = e.type === "labelImage" ? 4 : 2;
1489
- e.type = "data", r += i;
1490
- }
1491
- }
1492
- return n.length !== t.length && Y(n, 0, n.length, t), n;
1493
- }
1494
- function Jt(n, r) {
1495
- let t = n.length, e = 0, i, u, l, a;
1496
- for (; t--; )
1497
- if (i = n[t][1], u) {
1498
- if (i.type === "link" || i.type === "labelLink" && i._inactive)
1499
- break;
1500
- n[t][0] === "enter" && i.type === "labelLink" && (i._inactive = !0);
1501
- } else if (l) {
1502
- if (n[t][0] === "enter" && (i.type === "labelImage" || i.type === "labelLink") && !i._balanced && (u = t, i.type !== "labelLink")) {
1503
- e = 2;
1504
- break;
1505
- }
1506
- } else i.type === "labelEnd" && (l = t);
1507
- const x = {
1508
- type: n[u][1].type === "labelLink" ? "link" : "image",
1509
- start: {
1510
- ...n[u][1].start
1511
- },
1512
- end: {
1513
- ...n[n.length - 1][1].end
1514
- }
1515
- }, m = {
1516
- type: "label",
1517
- start: {
1518
- ...n[u][1].start
1519
- },
1520
- end: {
1521
- ...n[l][1].end
1522
- }
1523
- }, c = {
1524
- type: "labelText",
1525
- start: {
1526
- ...n[u + e + 2][1].end
1527
- },
1528
- end: {
1529
- ...n[l - 2][1].start
1530
- }
1531
- };
1532
- return a = [["enter", x, r], ["enter", m, r]], a = j(a, n.slice(u + 1, u + e + 3)), a = j(a, [["enter", c, r]]), a = j(a, gn(r.parser.constructs.insideSpan.null, n.slice(u + e + 4, l - 3), r)), a = j(a, [["exit", c, r], n[l - 2], n[l - 1], ["exit", m, r]]), a = j(a, n.slice(l + 1)), a = j(a, [["exit", x, r]]), Y(n, u, n.length, a), n;
1533
- }
1534
- function Kt(n, r, t) {
1535
- const e = this;
1536
- let i = e.events.length, u, l;
1537
- for (; i--; )
1538
- if ((e.events[i][1].type === "labelImage" || e.events[i][1].type === "labelLink") && !e.events[i][1]._balanced) {
1539
- u = e.events[i][1];
1540
- break;
1541
- }
1542
- return a;
1543
- function a(g) {
1544
- return u ? u._inactive ? p(g) : (l = e.parser.defined.includes(xn(e.sliceSerialize({
1545
- start: u.end,
1546
- end: e.now()
1547
- }))), n.enter("labelEnd"), n.enter("labelMarker"), n.consume(g), n.exit("labelMarker"), n.exit("labelEnd"), x) : t(g);
1548
- }
1549
- function x(g) {
1550
- return g === 40 ? n.attempt(Yt, c, l ? c : p)(g) : g === 91 ? n.attempt($t, c, l ? m : p)(g) : l ? c(g) : p(g);
1551
- }
1552
- function m(g) {
1553
- return n.attempt(Zt, c, p)(g);
1554
- }
1555
- function c(g) {
1556
- return r(g);
1557
- }
1558
- function p(g) {
1559
- return u._balanced = !0, t(g);
1560
- }
1561
- }
1562
- function Xt(n, r, t) {
1563
- return e;
1564
- function e(p) {
1565
- return n.enter("resource"), n.enter("resourceMarker"), n.consume(p), n.exit("resourceMarker"), i;
1566
- }
1567
- function i(p) {
1568
- return Q(p) ? nn(n, u)(p) : u(p);
1569
- }
1570
- function u(p) {
1571
- return p === 41 ? c(p) : Pn(n, l, a, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(p);
1572
- }
1573
- function l(p) {
1574
- return Q(p) ? nn(n, x)(p) : c(p);
1575
- }
1576
- function a(p) {
1577
- return t(p);
1578
- }
1579
- function x(p) {
1580
- return p === 34 || p === 39 || p === 40 ? Ln(n, m, t, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(p) : c(p);
1581
- }
1582
- function m(p) {
1583
- return Q(p) ? nn(n, c)(p) : c(p);
1584
- }
1585
- function c(p) {
1586
- return p === 41 ? (n.enter("resourceMarker"), n.consume(p), n.exit("resourceMarker"), n.exit("resource"), r) : t(p);
1587
- }
1588
- }
1589
- function vt(n, r, t) {
1590
- const e = this;
1591
- return i;
1592
- function i(a) {
1593
- return Bn.call(e, n, u, l, "reference", "referenceMarker", "referenceString")(a);
1594
- }
1595
- function u(a) {
1596
- return e.parser.defined.includes(xn(e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1))) ? r(a) : t(a);
1597
- }
1598
- function l(a) {
1599
- return t(a);
1600
- }
1601
- }
1602
- function dt(n, r, t) {
1603
- return e;
1604
- function e(u) {
1605
- return n.enter("reference"), n.enter("referenceMarker"), n.consume(u), n.exit("referenceMarker"), i;
1606
- }
1607
- function i(u) {
1608
- return u === 93 ? (n.enter("referenceMarker"), n.consume(u), n.exit("referenceMarker"), n.exit("reference"), r) : t(u);
1609
- }
1610
- }
1611
- const ne = {
1612
- name: "labelStartImage",
1613
- resolveAll: fn.resolveAll,
1614
- tokenize: te
1615
- };
1616
- function te(n, r, t) {
1617
- const e = this;
1618
- return i;
1619
- function i(a) {
1620
- return n.enter("labelImage"), n.enter("labelImageMarker"), n.consume(a), n.exit("labelImageMarker"), u;
1621
- }
1622
- function u(a) {
1623
- return a === 91 ? (n.enter("labelMarker"), n.consume(a), n.exit("labelMarker"), n.exit("labelImage"), l) : t(a);
1624
- }
1625
- function l(a) {
1626
- return a === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(a) : r(a);
1627
- }
1628
- }
1629
- const ee = {
1630
- name: "labelStartLink",
1631
- resolveAll: fn.resolveAll,
1632
- tokenize: re
1633
- };
1634
- function re(n, r, t) {
1635
- const e = this;
1636
- return i;
1637
- function i(l) {
1638
- return n.enter("labelLink"), n.enter("labelMarker"), n.consume(l), n.exit("labelMarker"), n.exit("labelLink"), u;
1639
- }
1640
- function u(l) {
1641
- return l === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(l) : r(l);
1642
- }
1643
- }
1644
- const sn = {
1645
- name: "lineEnding",
1646
- tokenize: ie
1647
- };
1648
- function ie(n, r) {
1649
- return t;
1650
- function t(e) {
1651
- return n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"), F(n, r, "linePrefix");
1652
- }
1653
- }
1654
- const un = {
1655
- name: "thematicBreak",
1656
- tokenize: ue
1657
- };
1658
- function ue(n, r, t) {
1659
- let e = 0, i;
1660
- return u;
1661
- function u(m) {
1662
- return n.enter("thematicBreak"), l(m);
1663
- }
1664
- function l(m) {
1665
- return i = m, a(m);
1666
- }
1667
- function a(m) {
1668
- return m === i ? (n.enter("thematicBreakSequence"), x(m)) : e >= 3 && (m === null || C(m)) ? (n.exit("thematicBreak"), r(m)) : t(m);
1669
- }
1670
- function x(m) {
1671
- return m === i ? (n.consume(m), e++, x) : (n.exit("thematicBreakSequence"), w(m) ? F(n, a, "whitespace")(m) : a(m));
1672
- }
1673
- }
1674
- const H = {
1675
- continuation: {
1676
- tokenize: se
1677
- },
1678
- exit: me,
1679
- name: "list",
1680
- tokenize: oe
1681
- }, le = {
1682
- partial: !0,
1683
- tokenize: pe
1684
- }, ae = {
1685
- partial: !0,
1686
- tokenize: he
1687
- };
1688
- function oe(n, r, t) {
1689
- const e = this, i = e.events[e.events.length - 1];
1690
- let u = i && i[1].type === "linePrefix" ? i[2].sliceSerialize(i[1], !0).length : 0, l = 0;
1691
- return a;
1692
- function a(h) {
1693
- const y = e.containerState.type || (h === 42 || h === 43 || h === 45 ? "listUnordered" : "listOrdered");
1694
- if (y === "listUnordered" ? !e.containerState.marker || h === e.containerState.marker : pn(h)) {
1695
- if (e.containerState.type || (e.containerState.type = y, n.enter(y, {
1696
- _container: !0
1697
- })), y === "listUnordered")
1698
- return n.enter("listItemPrefix"), h === 42 || h === 45 ? n.check(un, t, m)(h) : m(h);
1699
- if (!e.interrupt || h === 49)
1700
- return n.enter("listItemPrefix"), n.enter("listItemValue"), x(h);
1701
- }
1702
- return t(h);
1703
- }
1704
- function x(h) {
1705
- return pn(h) && ++l < 10 ? (n.consume(h), x) : (!e.interrupt || l < 2) && (e.containerState.marker ? h === e.containerState.marker : h === 41 || h === 46) ? (n.exit("listItemValue"), m(h)) : t(h);
1706
- }
1707
- function m(h) {
1708
- return n.enter("listItemMarker"), n.consume(h), n.exit("listItemMarker"), e.containerState.marker = e.containerState.marker || h, n.check(
1709
- ln,
1710
- // Can’t be empty when interrupting.
1711
- e.interrupt ? t : c,
1712
- n.attempt(le, g, p)
1713
- );
1714
- }
1715
- function c(h) {
1716
- return e.containerState.initialBlankLine = !0, u++, g(h);
1717
- }
1718
- function p(h) {
1719
- return w(h) ? (n.enter("listItemPrefixWhitespace"), n.consume(h), n.exit("listItemPrefixWhitespace"), g) : t(h);
1720
- }
1721
- function g(h) {
1722
- return e.containerState.size = u + e.sliceSerialize(n.exit("listItemPrefix"), !0).length, r(h);
1723
- }
1724
- }
1725
- function se(n, r, t) {
1726
- const e = this;
1727
- return e.containerState._closeFlow = void 0, n.check(ln, i, u);
1728
- function i(a) {
1729
- return e.containerState.furtherBlankLines = e.containerState.furtherBlankLines || e.containerState.initialBlankLine, F(n, r, "listItemIndent", e.containerState.size + 1)(a);
1730
- }
1731
- function u(a) {
1732
- return e.containerState.furtherBlankLines || !w(a) ? (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, l(a)) : (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, n.attempt(ae, r, l)(a));
1733
- }
1734
- function l(a) {
1735
- return e.containerState._closeFlow = !0, e.interrupt = void 0, F(n, n.attempt(H, r, t), "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(a);
1736
- }
1737
- }
1738
- function he(n, r, t) {
1739
- const e = this;
1740
- return F(n, i, "listItemIndent", e.containerState.size + 1);
1741
- function i(u) {
1742
- const l = e.events[e.events.length - 1];
1743
- return l && l[1].type === "listItemIndent" && l[2].sliceSerialize(l[1], !0).length === e.containerState.size ? r(u) : t(u);
1744
- }
1745
- }
1746
- function me(n) {
1747
- n.exit(this.containerState.type);
1748
- }
1749
- function pe(n, r, t) {
1750
- const e = this;
1751
- return F(n, i, "listItemPrefixWhitespace", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5);
1752
- function i(u) {
1753
- const l = e.events[e.events.length - 1];
1754
- return !w(u) && l && l[1].type === "listItemPrefixWhitespace" ? r(u) : t(u);
1755
- }
1756
- }
1757
- const yn = {
1758
- name: "setextUnderline",
1759
- resolveTo: ce,
1760
- tokenize: xe
1761
- };
1762
- function ce(n, r) {
1763
- let t = n.length, e, i, u;
1764
- for (; t--; )
1765
- if (n[t][0] === "enter") {
1766
- if (n[t][1].type === "content") {
1767
- e = t;
1768
- break;
1769
- }
1770
- n[t][1].type === "paragraph" && (i = t);
1771
- } else
1772
- n[t][1].type === "content" && n.splice(t, 1), !u && n[t][1].type === "definition" && (u = t);
1773
- const l = {
1774
- type: "setextHeading",
1775
- start: {
1776
- ...n[e][1].start
1777
- },
1778
- end: {
1779
- ...n[n.length - 1][1].end
1780
- }
1781
- };
1782
- return n[i][1].type = "setextHeadingText", u ? (n.splice(i, 0, ["enter", l, r]), n.splice(u + 1, 0, ["exit", n[e][1], r]), n[e][1].end = {
1783
- ...n[u][1].end
1784
- }) : n[e][1] = l, n.push(["exit", l, r]), n;
1785
- }
1786
- function xe(n, r, t) {
1787
- const e = this;
1788
- let i;
1789
- return u;
1790
- function u(m) {
1791
- let c = e.events.length, p;
1792
- for (; c--; )
1793
- if (e.events[c][1].type !== "lineEnding" && e.events[c][1].type !== "linePrefix" && e.events[c][1].type !== "content") {
1794
- p = e.events[c][1].type === "paragraph";
1795
- break;
1796
- }
1797
- return !e.parser.lazy[e.now().line] && (e.interrupt || p) ? (n.enter("setextHeadingLine"), i = m, l(m)) : t(m);
1798
- }
1799
- function l(m) {
1800
- return n.enter("setextHeadingLineSequence"), a(m);
1801
- }
1802
- function a(m) {
1803
- return m === i ? (n.consume(m), a) : (n.exit("setextHeadingLineSequence"), w(m) ? F(n, x, "lineSuffix")(m) : x(m));
1804
- }
1805
- function x(m) {
1806
- return m === null || C(m) ? (n.exit("setextHeadingLine"), r(m)) : t(m);
1807
- }
1808
- }
1809
- const ge = {
1810
- tokenize: fe
1811
- };
1812
- function fe(n) {
1813
- const r = this, t = n.attempt(
1814
- // Try to parse a blank line.
1815
- ln,
1816
- e,
1817
- // Try to parse initial flow (essentially, only code).
1818
- n.attempt(this.parser.constructs.flowInitial, i, F(n, n.attempt(this.parser.constructs.flow, i, n.attempt(Ct, i)), "linePrefix"))
1819
- );
1820
- return t;
1821
- function e(u) {
1822
- if (u === null) {
1823
- n.consume(u);
1824
- return;
1825
- }
1826
- return n.enter("lineEndingBlank"), n.consume(u), n.exit("lineEndingBlank"), r.currentConstruct = void 0, t;
1827
- }
1828
- function i(u) {
1829
- if (u === null) {
1830
- n.consume(u);
1831
- return;
1832
- }
1833
- return n.enter("lineEnding"), n.consume(u), n.exit("lineEnding"), r.currentConstruct = void 0, t;
1834
- }
1835
- }
1836
- const ke = {
1837
- resolveAll: Mn()
1838
- }, Se = On("string"), be = On("text");
1839
- function On(n) {
1840
- return {
1841
- resolveAll: Mn(n === "text" ? Ie : void 0),
1842
- tokenize: r
1843
- };
1844
- function r(t) {
1845
- const e = this, i = this.parser.constructs[n], u = t.attempt(i, l, a);
1846
- return l;
1847
- function l(c) {
1848
- return m(c) ? u(c) : a(c);
1849
- }
1850
- function a(c) {
1851
- if (c === null) {
1852
- t.consume(c);
1853
- return;
1854
- }
1855
- return t.enter("data"), t.consume(c), x;
1856
- }
1857
- function x(c) {
1858
- return m(c) ? (t.exit("data"), u(c)) : (t.consume(c), x);
1859
- }
1860
- function m(c) {
1861
- if (c === null)
1862
- return !0;
1863
- const p = i[c];
1864
- let g = -1;
1865
- if (p)
1866
- for (; ++g < p.length; ) {
1867
- const h = p[g];
1868
- if (!h.previous || h.previous.call(e, e.previous))
1869
- return !0;
1870
- }
1871
- return !1;
1872
- }
1873
- }
1874
- }
1875
- function Mn(n) {
1876
- return r;
1877
- function r(t, e) {
1878
- let i = -1, u;
1879
- for (; ++i <= t.length; )
1880
- u === void 0 ? t[i] && t[i][1].type === "data" && (u = i, i++) : (!t[i] || t[i][1].type !== "data") && (i !== u + 2 && (t[u][1].end = t[i - 1][1].end, t.splice(u + 2, i - u - 2), i = u + 2), u = void 0);
1881
- return n ? n(t, e) : t;
1882
- }
1883
- }
1884
- function Ie(n, r) {
1885
- let t = 0;
1886
- for (; ++t <= n.length; )
1887
- if ((t === n.length || n[t][1].type === "lineEnding") && n[t - 1][1].type === "data") {
1888
- const e = n[t - 1][1], i = r.sliceStream(e);
1889
- let u = i.length, l = -1, a = 0, x;
1890
- for (; u--; ) {
1891
- const m = i[u];
1892
- if (typeof m == "string") {
1893
- for (l = m.length; m.charCodeAt(l - 1) === 32; )
1894
- a++, l--;
1895
- if (l) break;
1896
- l = -1;
1897
- } else if (m === -2)
1898
- x = !0, a++;
1899
- else if (m !== -1) {
1900
- u++;
1901
- break;
1902
- }
1903
- }
1904
- if (r._contentTypeTextTrailing && t === n.length && (a = 0), a) {
1905
- const m = {
1906
- type: t === n.length || x || a < 2 ? "lineSuffix" : "hardBreakTrailing",
1907
- start: {
1908
- _bufferIndex: u ? l : e.start._bufferIndex + l,
1909
- _index: e.start._index + u,
1910
- line: e.end.line,
1911
- column: e.end.column - a,
1912
- offset: e.end.offset - a
1913
- },
1914
- end: {
1915
- ...e.end
1916
- }
1917
- };
1918
- e.end = {
1919
- ...m.start
1920
- }, e.start.offset === e.end.offset ? Object.assign(e, m) : (n.splice(t, 0, ["enter", m, r], ["exit", m, r]), t += 2);
1921
- }
1922
- t++;
1923
- }
1924
- return n;
1925
- }
1926
- const Ce = {
1927
- 42: H,
1928
- 43: H,
1929
- 45: H,
1930
- 48: H,
1931
- 49: H,
1932
- 50: H,
1933
- 51: H,
1934
- 52: H,
1935
- 53: H,
1936
- 54: H,
1937
- 55: H,
1938
- 56: H,
1939
- 57: H,
1940
- 62: Tn
1941
- }, ze = {
1942
- 91: Tt
1943
- }, we = {
1944
- [-2]: on,
1945
- [-1]: on,
1946
- 32: on
1947
- }, ye = {
1948
- 35: Lt,
1949
- 42: un,
1950
- 45: [yn, un],
1951
- 60: qt,
1952
- 61: yn,
1953
- 95: un,
1954
- 96: zn,
1955
- 126: zn
1956
- }, Ee = {
1957
- 38: _n,
1958
- 92: Fn
1959
- }, Te = {
1960
- [-5]: sn,
1961
- [-4]: sn,
1962
- [-3]: sn,
1963
- 33: ne,
1964
- 38: _n,
1965
- 42: cn,
1966
- 60: [et, jt],
1967
- 91: ee,
1968
- 92: [Pt, Fn],
1969
- 93: fn,
1970
- 95: cn,
1971
- 96: gt
1972
- }, Fe = {
1973
- null: [cn, ke]
1974
- }, _e = {
1975
- null: [42, 95]
1976
- }, Ae = {
1977
- null: []
1978
- }, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1979
- __proto__: null,
1980
- attentionMarkers: _e,
1981
- contentInitial: ze,
1982
- disable: Ae,
1983
- document: Ce,
1984
- flow: ye,
1985
- flowInitial: we,
1986
- insideSpan: Fe,
1987
- string: Ee,
1988
- text: Te
1989
- }, Symbol.toStringTag, { value: "Module" }));
1990
- function Be(n, r, t) {
1991
- let e = {
1992
- _bufferIndex: -1,
1993
- _index: 0,
1994
- line: t && t.line || 1,
1995
- column: t && t.column || 1,
1996
- offset: t && t.offset || 0
1997
- };
1998
- const i = {}, u = [];
1999
- let l = [], a = [];
2000
- const x = {
2001
- attempt: T(P),
2002
- check: T(f),
2003
- consume: L,
2004
- enter: S,
2005
- exit: _,
2006
- interrupt: T(f, {
2007
- interrupt: !0
2008
- })
2009
- }, m = {
2010
- code: null,
2011
- containerState: {},
2012
- defineSkip: E,
2013
- events: [],
2014
- now: y,
2015
- parser: n,
2016
- previous: null,
2017
- sliceSerialize: g,
2018
- sliceStream: h,
2019
- write: p
2020
- };
2021
- let c = r.tokenize.call(m, x);
2022
- return r.resolveAll && u.push(r), m;
2023
- function p(I) {
2024
- return l = j(l, I), B(), l[l.length - 1] !== null ? [] : (O(r, 0), m.events = gn(u, m.events, m), m.events);
2025
- }
2026
- function g(I, b) {
2027
- return Oe(h(I), b);
2028
- }
2029
- function h(I) {
2030
- return Le(l, I);
2031
- }
2032
- function y() {
2033
- const {
2034
- _bufferIndex: I,
2035
- _index: b,
2036
- line: A,
2037
- column: M,
2038
- offset: z
2039
- } = e;
2040
- return {
2041
- _bufferIndex: I,
2042
- _index: b,
2043
- line: A,
2044
- column: M,
2045
- offset: z
2046
- };
2047
- }
2048
- function E(I) {
2049
- i[I.line] = I.column, q();
2050
- }
2051
- function B() {
2052
- let I;
2053
- for (; e._index < l.length; ) {
2054
- const b = l[e._index];
2055
- if (typeof b == "string")
2056
- for (I = e._index, e._bufferIndex < 0 && (e._bufferIndex = 0); e._index === I && e._bufferIndex < b.length; )
2057
- k(b.charCodeAt(e._bufferIndex));
2058
- else
2059
- k(b);
2060
- }
2061
- }
2062
- function k(I) {
2063
- c = c(I);
2064
- }
2065
- function L(I) {
2066
- C(I) ? (e.line++, e.column = 1, e.offset += I === -3 ? 2 : 1, q()) : I !== -1 && (e.column++, e.offset++), e._bufferIndex < 0 ? e._index++ : (e._bufferIndex++, e._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
2067
- // strings.
2068
- /** @type {string} */
2069
- l[e._index].length && (e._bufferIndex = -1, e._index++)), m.previous = I;
2070
- }
2071
- function S(I, b) {
2072
- const A = b || {};
2073
- return A.type = I, A.start = y(), m.events.push(["enter", A, m]), a.push(A), A;
2074
- }
2075
- function _(I) {
2076
- const b = a.pop();
2077
- return b.end = y(), m.events.push(["exit", b, m]), b;
2078
- }
2079
- function P(I, b) {
2080
- O(I, b.from);
2081
- }
2082
- function f(I, b) {
2083
- b.restore();
2084
- }
2085
- function T(I, b) {
2086
- return A;
2087
- function A(M, z, V) {
2088
- let D, $, K, o;
2089
- return Array.isArray(M) ? (
2090
- /* c8 ignore next 1 */
2091
- X(M)
2092
- ) : "tokenize" in M ? (
2093
- // Looks like a construct.
2094
- X([
2095
- /** @type {Construct} */
2096
- M
2097
- ])
2098
- ) : Z(M);
2099
- function Z(R) {
2100
- return an;
2101
- function an(v) {
2102
- const en = v !== null && R[v], rn = v !== null && R.null, Nn = [
2103
- // To do: add more extension tests.
2104
- /* c8 ignore next 2 */
2105
- ...Array.isArray(en) ? en : en ? [en] : [],
2106
- ...Array.isArray(rn) ? rn : rn ? [rn] : []
2107
- ];
2108
- return X(Nn)(v);
2109
- }
2110
- }
2111
- function X(R) {
2112
- return D = R, $ = 0, R.length === 0 ? V : s(R[$]);
2113
- }
2114
- function s(R) {
2115
- return an;
2116
- function an(v) {
2117
- return o = N(), K = R, R.partial || (m.currentConstruct = R), R.name && m.parser.constructs.disable.null.includes(R.name) ? tn() : R.tokenize.call(
2118
- // If we do have fields, create an object w/ `context` as its
2119
- // prototype.
2120
- // This allows a “live binding”, which is needed for `interrupt`.
2121
- b ? Object.assign(Object.create(m), b) : m,
2122
- x,
2123
- G,
2124
- tn
2125
- )(v);
2126
- }
2127
- }
2128
- function G(R) {
2129
- return I(K, o), z;
2130
- }
2131
- function tn(R) {
2132
- return o.restore(), ++$ < D.length ? s(D[$]) : V;
2133
- }
2134
- }
2135
- }
2136
- function O(I, b) {
2137
- I.resolveAll && !u.includes(I) && u.push(I), I.resolve && Y(m.events, b, m.events.length - b, I.resolve(m.events.slice(b), m)), I.resolveTo && (m.events = I.resolveTo(m.events, m));
2138
- }
2139
- function N() {
2140
- const I = y(), b = m.previous, A = m.currentConstruct, M = m.events.length, z = Array.from(a);
2141
- return {
2142
- from: M,
2143
- restore: V
2144
- };
2145
- function V() {
2146
- e = I, m.previous = b, m.currentConstruct = A, m.events.length = M, a = z, q();
2147
- }
2148
- }
2149
- function q() {
2150
- e.line in i && e.column < 2 && (e.column = i[e.line], e.offset += i[e.line] - 1);
2151
- }
2152
- }
2153
- function Le(n, r) {
2154
- const t = r.start._index, e = r.start._bufferIndex, i = r.end._index, u = r.end._bufferIndex;
2155
- let l;
2156
- if (t === i)
2157
- l = [n[t].slice(e, u)];
2158
- else {
2159
- if (l = n.slice(t, i), e > -1) {
2160
- const a = l[0];
2161
- typeof a == "string" ? l[0] = a.slice(e) : l.shift();
2162
- }
2163
- u > 0 && l.push(n[i].slice(0, u));
2164
- }
2165
- return l;
2166
- }
2167
- function Oe(n, r) {
2168
- let t = -1;
2169
- const e = [];
2170
- let i;
2171
- for (; ++t < n.length; ) {
2172
- const u = n[t];
2173
- let l;
2174
- if (typeof u == "string")
2175
- l = u;
2176
- else switch (u) {
2177
- case -5: {
2178
- l = "\r";
2179
- break;
2180
- }
2181
- case -4: {
2182
- l = `
2183
- `;
2184
- break;
2185
- }
2186
- case -3: {
2187
- l = `\r
2188
- `;
2189
- break;
2190
- }
2191
- case -2: {
2192
- l = r ? " " : " ";
2193
- break;
2194
- }
2195
- case -1: {
2196
- if (!r && i) continue;
2197
- l = " ";
2198
- break;
2199
- }
2200
- default:
2201
- l = String.fromCharCode(u);
2202
- }
2203
- i = u === -2, e.push(l);
2204
- }
2205
- return e.join("");
2206
- }
2207
- function De(n) {
2208
- const e = {
2209
- constructs: (
2210
- /** @type {FullNormalizedExtension} */
2211
- Dn([Pe, ...(n || {}).extensions || []])
2212
- ),
2213
- content: i(Jn),
2214
- defined: [],
2215
- document: i(Xn),
2216
- flow: i(ge),
2217
- lazy: {},
2218
- string: i(Se),
2219
- text: i(be)
2220
- };
2221
- return e;
2222
- function i(u) {
2223
- return l;
2224
- function l(a) {
2225
- return Be(e, u, a);
2226
- }
2227
- }
2228
- }
2229
- function Re(n) {
2230
- for (; !An(n); )
2231
- ;
2232
- return n;
2233
- }
2234
- const En = /[\0\t\n\r]/g;
2235
- function Ve() {
2236
- let n = 1, r = "", t = !0, e;
2237
- return i;
2238
- function i(u, l, a) {
2239
- const x = [];
2240
- let m, c, p, g, h;
2241
- for (u = r + (typeof u == "string" ? u.toString() : new TextDecoder(l || void 0).decode(u)), p = 0, r = "", t && (u.charCodeAt(0) === 65279 && p++, t = void 0); p < u.length; ) {
2242
- if (En.lastIndex = p, m = En.exec(u), g = m && m.index !== void 0 ? m.index : u.length, h = u.charCodeAt(g), !m) {
2243
- r = u.slice(p);
2244
- break;
2245
- }
2246
- if (h === 10 && p === g && e)
2247
- x.push(-3), e = void 0;
2248
- else
2249
- switch (e && (x.push(-5), e = void 0), p < g && (x.push(u.slice(p, g)), n += g - p), h) {
2250
- case 0: {
2251
- x.push(65533), n++;
2252
- break;
2253
- }
2254
- case 9: {
2255
- for (c = Math.ceil(n / 4) * 4, x.push(-2); n++ < c; ) x.push(-1);
2256
- break;
2257
- }
2258
- case 10: {
2259
- x.push(-4), n = 1;
2260
- break;
2261
- }
2262
- default:
2263
- e = !0, n = 1;
2264
- }
2265
- p = g + 1;
2266
- }
2267
- return a && (e && x.push(-5), r && x.push(r), x.push(null)), x;
2268
- }
2269
- }
2270
- export {
2271
- qn as a,
2272
- Re as b,
2273
- Me as c,
2274
- Ne as d,
2275
- Un as e,
2276
- De as f,
2277
- Ve as g,
2278
- U as h,
2279
- W as i,
2280
- $n as j,
2281
- mn as k,
2282
- ln as l,
2283
- Q as m,
2284
- xn as n,
2285
- F as o,
2286
- j as p,
2287
- Y as q,
2288
- gn as r,
2289
- qe as s,
2290
- bn as t,
2291
- Zn as u,
2292
- C as v,
2293
- w,
2294
- Dn as x
2295
- };