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