@kong-ui-public/documentation 0.3.42 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/Tableau10-GLA_9iAD-BMurskAd.js +9 -0
  2. package/dist/arc-BSRpyMf3-C5dasNo_.js +86 -0
  3. package/dist/array-CqVTtuYm-fKLgkG2b.js +6 -0
  4. package/dist/astro-mwoSwJnq-CNh-xuM0.js +27 -0
  5. package/dist/blockDiagram-6b2b5046-D02VCbQO-CPmGy0xX.js +1224 -0
  6. package/dist/c-eDnjw9rh-eDnjw9rh.js +87 -0
  7. package/dist/c4Diagram-b947cdbb-gYcL5VzP-DIDY83e1.js +1578 -0
  8. package/dist/channel-DHTQ8Ynn-7OPGex2S.js +5 -0
  9. package/dist/classDiagram-35230388-JdSKLSZv-D2crBRy-.js +217 -0
  10. package/dist/classDiagram-v2-412acd34-DFFRHXE_-B6aCxlD1.js +200 -0
  11. package/dist/clone-p6h9XXNm-3JQ-HRC6.js +8 -0
  12. package/dist/coffee-CRlSxcc3-CY091_1T.js +108 -0
  13. package/dist/cpp-DizfY48B-CA38N4Mn.js +208 -0
  14. package/dist/createText-423428c9-LivTKT7b-BXNfjcdp.js +2964 -0
  15. package/dist/csharp-uGDiXTZn-uGDiXTZn.js +762 -0
  16. package/dist/css-CAzixsid-CEpuX1HY.js +511 -0
  17. package/dist/csv-D4BoHddH-D4BoHddH.js +7 -0
  18. package/dist/diff-Bo5iyMQ2-Bo5iyMQ2.js +7 -0
  19. package/dist/docker-B10O2enb-B10O2enb.js +7 -0
  20. package/dist/documentation.es.js +5 -3130
  21. package/dist/documentation.umd.js +10152 -50
  22. package/dist/edges-d417c7a0-C1ggiwWz-Aj0OUf7e.js +1082 -0
  23. package/dist/erDiagram-0ea73325-mz0Z_-DA-Dr01LsTB.js +924 -0
  24. package/dist/flowDb-d35e309a-CPyxEMIt-lofeyUuw.js +1126 -0
  25. package/dist/flowDiagram-d949d7c1-DqCa0HNN-BK5wNO9Z.js +782 -0
  26. package/dist/flowDiagram-v2-49332944-UMosz1sZ-BG39AuNP.js +17 -0
  27. package/dist/flowchart-elk-definition-27cc417a-D2UKpS6N-r2p34307.js +48387 -0
  28. package/dist/ganttDiagram-5c869e3b-CVBHw4pG-CaG9QXQM.js +2490 -0
  29. package/dist/git-commit-CWf81VOF-DtOZSoIU.js +9 -0
  30. package/dist/git-rebase-sR-yVH_J-D5M2oE9O.js +9 -0
  31. package/dist/gitGraphDiagram-b9d81de9-BGm3fU0n-CbCpf-4j.js +1262 -0
  32. package/dist/go-BCCWZWY1-BCCWZWY1.js +7 -0
  33. package/dist/graph-4FyIWFHN-774TpNLL.js +870 -0
  34. package/dist/graphql-CT32SSoq-1pBWfpcR.js +18 -0
  35. package/dist/haml-8RvrfhLO-Bbc4xoLP.js +19 -0
  36. package/dist/handlebars-Cr5ro0bH-CLcCNLtV.js +15 -0
  37. package/dist/haskell-BfFu8DD8-BmkPJdLL.js +565 -0
  38. package/dist/html-BZB5lEhh-B74zAnWx.js +84 -0
  39. package/dist/html-derivative-0y7sV5Qc-D8-muTWn.js +9 -0
  40. package/dist/index-8fae9850-_CN7MNjP-Cq-s0PmS.js +373 -0
  41. package/dist/index-B-5DuDrq.js +29996 -0
  42. package/dist/infoDiagram-db7b18fc-V446j9uR-GSa8bniv.js +319 -0
  43. package/dist/ini-BsUFIxsI-BsUFIxsI.js +7 -0
  44. package/dist/init-DjUOC4st-C8Nwz6AJ.js +16 -0
  45. package/dist/java-Bk2JzfKB-Bk2JzfKB.js +74 -0
  46. package/dist/javascript-DqVBMyXe-DqVBMyXe.js +705 -0
  47. package/dist/journeyDiagram-d5636530-CFiu7dnV-DJMu6A22.js +803 -0
  48. package/dist/json-B12k4-6m-B12k4-6m.js +31 -0
  49. package/dist/json5-CvqQZK9I-CvqQZK9I.js +23 -0
  50. package/dist/jsonc-v2qGKRJY-v2qGKRJY.js +31 -0
  51. package/dist/jsonl-izxnMeZX-izxnMeZX.js +31 -0
  52. package/dist/jsx-aDp7j9_Z-aDp7j9_Z.js +705 -0
  53. package/dist/kotlin-NOMOielb-NOMOielb.js +7 -0
  54. package/dist/latex-Bw_ghldO-BlUAi6pB.js +339 -0
  55. package/dist/layout-2-aEcfuw-BqqWy5wB.js +1524 -0
  56. package/dist/less-CW2GmQHL-CW2GmQHL.js +165 -0
  57. package/dist/line-nVq5kEiy-DtZd3PHZ.js +34 -0
  58. package/dist/linear-Bz4oRFvQ-C869GXbm.js +447 -0
  59. package/dist/liquid-DJ2rh7oT-FwZwa67Y.js +28 -0
  60. package/dist/lua-5TZ-G8Be-CogscVHC.js +9 -0
  61. package/dist/make-whncTQWE-whncTQWE.js +7 -0
  62. package/dist/markdown-DYKdIx5--DYKdIx5-.js +135 -0
  63. package/dist/material-theme-lighter-BRE1Bis3-BRE1Bis3.js +769 -0
  64. package/dist/material-theme-palenight-Dhz61Tee-Dhz61Tee.js +769 -0
  65. package/dist/mdc-D0DPLwil-BfE3hy8_.js +88 -0
  66. package/dist/mdx-CKDMxEaL-CKDMxEaL.js +7 -0
  67. package/dist/mermaid-BxNM-z-u-BxNM-z-u.js +7 -0
  68. package/dist/mindmap-definition-377f8f1f-C2vFYDMs-B71SGbvx.js +19078 -0
  69. package/dist/nginx-C082G13W-vryM9k1W.js +9 -0
  70. package/dist/objective-c-BVtzkNiv-BVtzkNiv.js +115 -0
  71. package/dist/onig-BonMD2gC-BonMD2gC.js +4 -0
  72. package/dist/ordinal-MUacOSdK-B1MUT0BL.js +65 -0
  73. package/dist/pascal-CrvtytWS-CrvtytWS.js +7 -0
  74. package/dist/path-Crsf9Nsj-SiSjwXsf.js +91 -0
  75. package/dist/perl-D29UPKP6-Dez6-HRy.js +17 -0
  76. package/dist/php-D7Tl-iS7-BtPFrDEt.js +789 -0
  77. package/dist/pieDiagram-b0208e96-DhA_SoTh-CfDd9YdA.js +501 -0
  78. package/dist/plsql-8SPzZKaa-8SPzZKaa.js +7 -0
  79. package/dist/postcss-Cz2vjx_4-Cz2vjx_4.js +7 -0
  80. package/dist/powershell-B0buHCuS-B0buHCuS.js +7 -0
  81. package/dist/proto-6YaU_lta-6YaU_lta.js +7 -0
  82. package/dist/pug-DbFO7359-duYD8LVa.js +21 -0
  83. package/dist/python-BQXev0_W-BQXev0_W.js +524 -0
  84. package/dist/quadrantDiagram-0332be45-C8q96Ohm-DMblaqnx.js +903 -0
  85. package/dist/r-DU7Q70f1-DU7Q70f1.js +7 -0
  86. package/dist/reg-DoGLEyFr-DoGLEyFr.js +7 -0
  87. package/dist/requirementDiagram-bf7890df-D30zCZjB-B_JBC9RM.js +767 -0
  88. package/dist/rst-Bm1i8IkK-C9EaDq6g.js +26 -0
  89. package/dist/ruby-CZZKXaz8-BxaDEkRP.js +102 -0
  90. package/dist/rust-CIl6NRUt-CIl6NRUt.js +7 -0
  91. package/dist/sankeyDiagram-0acdec17-B4vNjMaS-Bauvtonp.js +816 -0
  92. package/dist/sass-LqXmC1Fh-LqXmC1Fh.js +8 -0
  93. package/dist/scss-DjxgF7f7-DGTzny6p.js +98 -0
  94. package/dist/sequenceDiagram-c18d009d-BniqGSPK-DuYYUmiZ.js +2201 -0
  95. package/dist/shellscript-CUUTQKn5-CUUTQKn5.js +7 -0
  96. package/dist/shellsession-BIPXtZci-D6avbCwN.js +9 -0
  97. package/dist/splunk-C0K00wNV-C0K00wNV.js +7 -0
  98. package/dist/sql-DkzN59UV-DkzN59UV.js +27 -0
  99. package/dist/ssh-config-BbWAW6SY-BbWAW6SY.js +7 -0
  100. package/dist/stateDiagram-43596fc0-F0V9suMd-L2Ywe-J_.js +266 -0
  101. package/dist/stateDiagram-v2-2ead4f9c-DUgJH8tF-BVo1q2i1.js +184 -0
  102. package/dist/style.css +1 -1
  103. package/dist/styles-6860f46c-Dflmq0ac-BRNSwis6.js +1089 -0
  104. package/dist/styles-7383a064-Dg7mXkpq-C4bItohl.js +430 -0
  105. package/dist/styles-b2c874b6-HpcOhE4Y-Bj0upXzO.js +960 -0
  106. package/dist/stylus-CAHdVuhm-CAHdVuhm.js +21 -0
  107. package/dist/svelte-DAxjO8Sh-D0e501jC.js +29 -0
  108. package/dist/svgDrawCommon-0ee1b4e9-CNkCfzsJ-Bz_doYLk.js +64 -0
  109. package/dist/swift-x2DVyVjN-Bz5PC9YM.js +550 -0
  110. package/dist/timeline-definition-d977decf-Cl38e_0g-D_Dlqa-R.js +794 -0
  111. package/dist/toml-Dbtbfmwk-Dbtbfmwk.js +75 -0
  112. package/dist/tsx-BmwsDeeh-BmwsDeeh.js +705 -0
  113. package/dist/twig-B_Gr-ODl-Cl9Q0GWo.js +58 -0
  114. package/dist/types/components/DocumentationContent.vue.d.ts +8 -1
  115. package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -1
  116. package/dist/types/components/DocumentationDisplay.vue.d.ts +5 -1
  117. package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -1
  118. package/dist/types/components/ProductDocumentModal.vue.d.ts +1 -1
  119. package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -1
  120. package/dist/types/composables/useI18n.d.ts +4 -0
  121. package/dist/types/composables/useI18n.d.ts.map +1 -1
  122. package/dist/typescript-AEg-ehu7-AEg-ehu7.js +672 -0
  123. package/dist/v-BuvBsUKm-BuvBsUKm.js +7 -0
  124. package/dist/vb-cqjo5dul-cqjo5dul.js +7 -0
  125. package/dist/viml-h3ATW6He-h3ATW6He.js +7 -0
  126. package/dist/vue-Dz-azHaT-B9qBHMZi.js +71 -0
  127. package/dist/vue-html-DIGKAAs4-BeHSIJcx.js +11 -0
  128. package/dist/wasm-xOGcJ9Ts-xOGcJ9Ts.js +7 -0
  129. package/dist/wgsl-hGLOfCya-hGLOfCya.js +7 -0
  130. package/dist/xml-CfRpfi_B-BH3JRQfc.js +9 -0
  131. package/dist/xsl-BAqhSCYL-BTKPZRNQ.js +9 -0
  132. package/dist/xychartDiagram-e50adddc-JdLmRUgg-HmDalTeo.js +1282 -0
  133. package/dist/yaml-PGla5xPP-HJurM_FJ.js +206 -0
  134. package/package.json +13 -13
  135. package/dist/prism-bash.min-DDo5CyRs-DihCfXgx.js +0 -7
  136. package/dist/prism-css.min-BrrzZC7b-BrrzZC7b.js +0 -7
  137. package/dist/prism-docker.min-DnIEokC3-D0v8IWN_.js +0 -22
  138. package/dist/prism-go.min-C7UmK6TW-C7UmK6TW.js +0 -1
  139. package/dist/prism-http.min-CsU3-jB8-CQ8PCDXl.js +0 -23
  140. package/dist/prism-javascript.min-CEqHqgbm-CEqHqgbm.js +0 -8
  141. package/dist/prism-jq.min-Q555vXZm-Q555vXZm.js +0 -8
  142. package/dist/prism-json.min-B1GJqK1k-B1GJqK1k.js +0 -1
  143. package/dist/prism-log.min-SDopTpKN-SDopTpKN.js +0 -1
  144. package/dist/prism-lua.min-DwRnUVfS-DwRnUVfS.js +0 -1
  145. package/dist/prism-makefile.min-DyutknhE-DyutknhE.js +0 -1
  146. package/dist/prism-markdown.min-B7US-xc7-DB9aF_ZA.js +0 -63
  147. package/dist/prism-python.min-BIfpAh5K-BIfpAh5K.js +0 -1
  148. package/dist/prism-regex.min-f8DNqi8X-f8DNqi8X.js +0 -4
  149. package/dist/prism-rest.min-B6veHRJF-B6veHRJF.js +0 -1
  150. package/dist/prism-rust.min-Cb-Mi-h0-Cb-Mi-h0.js +0 -9
  151. package/dist/prism-scss.min-B0csyGJo-B0csyGJo.js +0 -1
  152. package/dist/prism-sql.min-BHXzX-c_-BHXzX-c_.js +0 -1
  153. package/dist/prism-typescript.min-oSVeWCAd-oSVeWCAd.js +0 -5
  154. package/dist/prism-xml-doc.min-yj0YzRGe-KgTQx-dc.js +0 -7
  155. package/dist/prism-yaml.min-CTetcdKA-C1YzP_OY.js +0 -28
@@ -0,0 +1,2964 @@
1
+ import { l as At, an as It, ap as Tt } from "./index-B-5DuDrq.js";
2
+ const Ct = {};
3
+ function wt(e, r) {
4
+ const t = r || Ct, n = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, u = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
5
+ return tt(e, n, u);
6
+ }
7
+ function tt(e, r, t) {
8
+ if (zt(e)) {
9
+ if ("value" in e)
10
+ return e.type === "html" && !t ? "" : e.value;
11
+ if (r && "alt" in e && e.alt)
12
+ return e.alt;
13
+ if ("children" in e)
14
+ return qe(e.children, r, t);
15
+ }
16
+ return Array.isArray(e) ? qe(e, r, t) : "";
17
+ }
18
+ function qe(e, r, t) {
19
+ const n = [];
20
+ let u = -1;
21
+ for (; ++u < e.length; )
22
+ n[u] = tt(e[u], r, t);
23
+ return n.join("");
24
+ }
25
+ function zt(e) {
26
+ return !!(e && typeof e == "object");
27
+ }
28
+ function te(e, r, t, n) {
29
+ const u = e.length;
30
+ let c = 0, i;
31
+ if (r < 0 ? r = -r > u ? 0 : u + r : r = r > u ? u : r, t = t > 0 ? t : 0, n.length < 1e4)
32
+ i = Array.from(n), i.unshift(r, t), e.splice(...i);
33
+ else
34
+ for (t && e.splice(r, t); c < n.length; )
35
+ i = n.slice(c, c + 1e4), i.unshift(r, 0), e.splice(...i), c += 1e4, r += 1e4;
36
+ }
37
+ function K(e, r) {
38
+ return e.length > 0 ? (te(e, e.length, 0, r), e) : r;
39
+ }
40
+ const Ve = {}.hasOwnProperty;
41
+ function Dt(e) {
42
+ const r = {};
43
+ let t = -1;
44
+ for (; ++t < e.length; )
45
+ _t(r, e[t]);
46
+ return r;
47
+ }
48
+ function _t(e, r) {
49
+ let t;
50
+ for (t in r) {
51
+ const n = (Ve.call(e, t) ? e[t] : void 0) || (e[t] = {}), u = r[t];
52
+ let c;
53
+ if (u)
54
+ for (c in u) {
55
+ Ve.call(n, c) || (n[c] = []);
56
+ const i = u[c];
57
+ Bt(
58
+ // @ts-expect-error Looks like a list.
59
+ n[c],
60
+ Array.isArray(i) ? i : i ? [i] : []
61
+ );
62
+ }
63
+ }
64
+ }
65
+ function Bt(e, r) {
66
+ let t = -1;
67
+ const n = [];
68
+ for (; ++t < r.length; )
69
+ (r[t].add === "after" ? e : n).push(r[t]);
70
+ te(e, 0, 0, n);
71
+ }
72
+ const Mt = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/, ee = se(/[A-Za-z]/), Z = se(/[\dA-Za-z]/), Pt = se(/[#-'*+\--9=?A-Z^-~]/);
73
+ function Ae(e) {
74
+ return (
75
+ // Special whitespace codes (which have negative values), C0 and Control
76
+ // character DEL
77
+ e !== null && (e < 32 || e === 127)
78
+ );
79
+ }
80
+ const Ie = se(/\d/), Lt = se(/[\dA-Fa-f]/), jt = se(/[!-/:-@[-`{-~]/);
81
+ function E(e) {
82
+ return e !== null && e < -2;
83
+ }
84
+ function $(e) {
85
+ return e !== null && (e < 0 || e === 32);
86
+ }
87
+ function T(e) {
88
+ return e === -2 || e === -1 || e === 32;
89
+ }
90
+ const Ot = se(Mt), Ht = se(/\s/);
91
+ function se(e) {
92
+ return r;
93
+ function r(t) {
94
+ return t !== null && e.test(String.fromCharCode(t));
95
+ }
96
+ }
97
+ function _(e, r, t, n) {
98
+ const u = n ? n - 1 : Number.POSITIVE_INFINITY;
99
+ let c = 0;
100
+ return i;
101
+ function i(p) {
102
+ return T(p) ? (e.enter(t), o(p)) : r(p);
103
+ }
104
+ function o(p) {
105
+ return T(p) && c++ < u ? (e.consume(p), o) : (e.exit(t), r(p));
106
+ }
107
+ }
108
+ const Rt = {
109
+ tokenize: qt
110
+ };
111
+ function qt(e) {
112
+ const r = e.attempt(
113
+ this.parser.constructs.contentInitial,
114
+ n,
115
+ u
116
+ );
117
+ let t;
118
+ return r;
119
+ function n(o) {
120
+ if (o === null) {
121
+ e.consume(o);
122
+ return;
123
+ }
124
+ return e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), _(e, r, "linePrefix");
125
+ }
126
+ function u(o) {
127
+ return e.enter("paragraph"), c(o);
128
+ }
129
+ function c(o) {
130
+ const p = e.enter("chunkText", {
131
+ contentType: "text",
132
+ previous: t
133
+ });
134
+ return t && (t.next = p), t = p, i(o);
135
+ }
136
+ function i(o) {
137
+ if (o === null) {
138
+ e.exit("chunkText"), e.exit("paragraph"), e.consume(o);
139
+ return;
140
+ }
141
+ return E(o) ? (e.consume(o), e.exit("chunkText"), c) : (e.consume(o), i);
142
+ }
143
+ }
144
+ const Vt = {
145
+ tokenize: Nt
146
+ }, Ne = {
147
+ tokenize: Ut
148
+ };
149
+ function Nt(e) {
150
+ const r = this, t = [];
151
+ let n = 0, u, c, i;
152
+ return o;
153
+ function o(S) {
154
+ if (n < t.length) {
155
+ const B = t[n];
156
+ return r.containerState = B[1], e.attempt(
157
+ B[0].continuation,
158
+ p,
159
+ a
160
+ )(S);
161
+ }
162
+ return a(S);
163
+ }
164
+ function p(S) {
165
+ if (n++, r.containerState._closeFlow) {
166
+ r.containerState._closeFlow = void 0, u && j();
167
+ const B = r.events.length;
168
+ let P = B, x;
169
+ for (; P--; )
170
+ if (r.events[P][0] === "exit" && r.events[P][1].type === "chunkFlow") {
171
+ x = r.events[P][1].end;
172
+ break;
173
+ }
174
+ y(n);
175
+ let w = B;
176
+ for (; w < r.events.length; )
177
+ r.events[w][1].end = Object.assign({}, x), w++;
178
+ return te(
179
+ r.events,
180
+ P + 1,
181
+ 0,
182
+ r.events.slice(B)
183
+ ), r.events.length = w, a(S);
184
+ }
185
+ return o(S);
186
+ }
187
+ function a(S) {
188
+ if (n === t.length) {
189
+ if (!u)
190
+ return g(S);
191
+ if (u.currentConstruct && u.currentConstruct.concrete)
192
+ return I(S);
193
+ r.interrupt = !!(u.currentConstruct && !u._gfmTableDynamicInterruptHack);
194
+ }
195
+ return r.containerState = {}, e.check(
196
+ Ne,
197
+ d,
198
+ h
199
+ )(S);
200
+ }
201
+ function d(S) {
202
+ return u && j(), y(n), g(S);
203
+ }
204
+ function h(S) {
205
+ return r.parser.lazy[r.now().line] = n !== t.length, i = r.now().offset, I(S);
206
+ }
207
+ function g(S) {
208
+ return r.containerState = {}, e.attempt(
209
+ Ne,
210
+ f,
211
+ I
212
+ )(S);
213
+ }
214
+ function f(S) {
215
+ return n++, t.push([r.currentConstruct, r.containerState]), g(S);
216
+ }
217
+ function I(S) {
218
+ if (S === null) {
219
+ u && j(), y(0), e.consume(S);
220
+ return;
221
+ }
222
+ return u = u || r.parser.flow(r.now()), e.enter("chunkFlow", {
223
+ contentType: "flow",
224
+ previous: c,
225
+ _tokenizer: u
226
+ }), C(S);
227
+ }
228
+ function C(S) {
229
+ if (S === null) {
230
+ L(e.exit("chunkFlow"), !0), y(0), e.consume(S);
231
+ return;
232
+ }
233
+ return E(S) ? (e.consume(S), L(e.exit("chunkFlow")), n = 0, r.interrupt = void 0, o) : (e.consume(S), C);
234
+ }
235
+ function L(S, B) {
236
+ const P = r.sliceStream(S);
237
+ if (B && P.push(null), S.previous = c, c && (c.next = S), c = S, u.defineSkip(S.start), u.write(P), r.parser.lazy[S.start.line]) {
238
+ let x = u.events.length;
239
+ for (; x--; )
240
+ if (
241
+ // The token starts before the line ending…
242
+ u.events[x][1].start.offset < i && // …and either is not ended yet…
243
+ (!u.events[x][1].end || // …or ends after it.
244
+ u.events[x][1].end.offset > i)
245
+ )
246
+ return;
247
+ const w = r.events.length;
248
+ let R = w, q, V;
249
+ for (; R--; )
250
+ if (r.events[R][0] === "exit" && r.events[R][1].type === "chunkFlow") {
251
+ if (q) {
252
+ V = r.events[R][1].end;
253
+ break;
254
+ }
255
+ q = !0;
256
+ }
257
+ for (y(n), x = w; x < r.events.length; )
258
+ r.events[x][1].end = Object.assign({}, V), x++;
259
+ te(
260
+ r.events,
261
+ R + 1,
262
+ 0,
263
+ r.events.slice(w)
264
+ ), r.events.length = x;
265
+ }
266
+ }
267
+ function y(S) {
268
+ let B = t.length;
269
+ for (; B-- > S; ) {
270
+ const P = t[B];
271
+ r.containerState = P[1], P[0].exit.call(r, e);
272
+ }
273
+ t.length = S;
274
+ }
275
+ function j() {
276
+ u.write([null]), c = void 0, u = void 0, r.containerState._closeFlow = void 0;
277
+ }
278
+ }
279
+ function Ut(e, r, t) {
280
+ return _(
281
+ e,
282
+ e.attempt(this.parser.constructs.document, r, t),
283
+ "linePrefix",
284
+ this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
285
+ );
286
+ }
287
+ function Ue(e) {
288
+ if (e === null || $(e) || Ht(e))
289
+ return 1;
290
+ if (Ot(e))
291
+ return 2;
292
+ }
293
+ function ze(e, r, t) {
294
+ const n = [];
295
+ let u = -1;
296
+ for (; ++u < e.length; ) {
297
+ const c = e[u].resolveAll;
298
+ c && !n.includes(c) && (r = c(r, t), n.push(c));
299
+ }
300
+ return r;
301
+ }
302
+ const Te = {
303
+ name: "attention",
304
+ tokenize: Wt,
305
+ resolveAll: Qt
306
+ };
307
+ function Qt(e, r) {
308
+ let t = -1, n, u, c, i, o, p, a, d;
309
+ for (; ++t < e.length; )
310
+ if (e[t][0] === "enter" && e[t][1].type === "attentionSequence" && e[t][1]._close) {
311
+ for (n = t; n--; )
312
+ if (e[n][0] === "exit" && e[n][1].type === "attentionSequence" && e[n][1]._open && // If the markers are the same:
313
+ r.sliceSerialize(e[n][1]).charCodeAt(0) === r.sliceSerialize(e[t][1]).charCodeAt(0)) {
314
+ if ((e[n][1]._close || e[t][1]._open) && (e[t][1].end.offset - e[t][1].start.offset) % 3 && !((e[n][1].end.offset - e[n][1].start.offset + e[t][1].end.offset - e[t][1].start.offset) % 3))
315
+ continue;
316
+ p = e[n][1].end.offset - e[n][1].start.offset > 1 && e[t][1].end.offset - e[t][1].start.offset > 1 ? 2 : 1;
317
+ const h = Object.assign({}, e[n][1].end), g = Object.assign({}, e[t][1].start);
318
+ Qe(h, -p), Qe(g, p), i = {
319
+ type: p > 1 ? "strongSequence" : "emphasisSequence",
320
+ start: h,
321
+ end: Object.assign({}, e[n][1].end)
322
+ }, o = {
323
+ type: p > 1 ? "strongSequence" : "emphasisSequence",
324
+ start: Object.assign({}, e[t][1].start),
325
+ end: g
326
+ }, c = {
327
+ type: p > 1 ? "strongText" : "emphasisText",
328
+ start: Object.assign({}, e[n][1].end),
329
+ end: Object.assign({}, e[t][1].start)
330
+ }, u = {
331
+ type: p > 1 ? "strong" : "emphasis",
332
+ start: Object.assign({}, i.start),
333
+ end: Object.assign({}, o.end)
334
+ }, e[n][1].end = Object.assign({}, i.start), e[t][1].start = Object.assign({}, o.end), a = [], e[n][1].end.offset - e[n][1].start.offset && (a = K(a, [
335
+ ["enter", e[n][1], r],
336
+ ["exit", e[n][1], r]
337
+ ])), a = K(a, [
338
+ ["enter", u, r],
339
+ ["enter", i, r],
340
+ ["exit", i, r],
341
+ ["enter", c, r]
342
+ ]), a = K(
343
+ a,
344
+ ze(
345
+ r.parser.constructs.insideSpan.null,
346
+ e.slice(n + 1, t),
347
+ r
348
+ )
349
+ ), a = K(a, [
350
+ ["exit", c, r],
351
+ ["enter", o, r],
352
+ ["exit", o, r],
353
+ ["exit", u, r]
354
+ ]), e[t][1].end.offset - e[t][1].start.offset ? (d = 2, a = K(a, [
355
+ ["enter", e[t][1], r],
356
+ ["exit", e[t][1], r]
357
+ ])) : d = 0, te(e, n - 1, t - n + 3, a), t = n + a.length - d - 2;
358
+ break;
359
+ }
360
+ }
361
+ for (t = -1; ++t < e.length; )
362
+ e[t][1].type === "attentionSequence" && (e[t][1].type = "data");
363
+ return e;
364
+ }
365
+ function Wt(e, r) {
366
+ const t = this.parser.constructs.attentionMarkers.null, n = this.previous, u = Ue(n);
367
+ let c;
368
+ return i;
369
+ function i(p) {
370
+ return c = p, e.enter("attentionSequence"), o(p);
371
+ }
372
+ function o(p) {
373
+ if (p === c)
374
+ return e.consume(p), o;
375
+ const a = e.exit("attentionSequence"), d = Ue(p), h = !d || d === 2 && u || t.includes(p), g = !u || u === 2 && d || t.includes(n);
376
+ return a._open = !!(c === 42 ? h : h && (u || !g)), a._close = !!(c === 42 ? g : g && (d || !h)), r(p);
377
+ }
378
+ }
379
+ function Qe(e, r) {
380
+ e.column += r, e.offset += r, e._bufferIndex += r;
381
+ }
382
+ const $t = {
383
+ name: "autolink",
384
+ tokenize: Kt
385
+ };
386
+ function Kt(e, r, t) {
387
+ let n = 0;
388
+ return u;
389
+ function u(f) {
390
+ return e.enter("autolink"), e.enter("autolinkMarker"), e.consume(f), e.exit("autolinkMarker"), e.enter("autolinkProtocol"), c;
391
+ }
392
+ function c(f) {
393
+ return ee(f) ? (e.consume(f), i) : a(f);
394
+ }
395
+ function i(f) {
396
+ return f === 43 || f === 45 || f === 46 || Z(f) ? (n = 1, o(f)) : a(f);
397
+ }
398
+ function o(f) {
399
+ return f === 58 ? (e.consume(f), n = 0, p) : (f === 43 || f === 45 || f === 46 || Z(f)) && n++ < 32 ? (e.consume(f), o) : (n = 0, a(f));
400
+ }
401
+ function p(f) {
402
+ return f === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(f), e.exit("autolinkMarker"), e.exit("autolink"), r) : f === null || f === 32 || f === 60 || Ae(f) ? t(f) : (e.consume(f), p);
403
+ }
404
+ function a(f) {
405
+ return f === 64 ? (e.consume(f), d) : Pt(f) ? (e.consume(f), a) : t(f);
406
+ }
407
+ function d(f) {
408
+ return Z(f) ? h(f) : t(f);
409
+ }
410
+ function h(f) {
411
+ return f === 46 ? (e.consume(f), n = 0, d) : f === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(f), e.exit("autolinkMarker"), e.exit("autolink"), r) : g(f);
412
+ }
413
+ function g(f) {
414
+ if ((f === 45 || Z(f)) && n++ < 63) {
415
+ const I = f === 45 ? g : h;
416
+ return e.consume(f), I;
417
+ }
418
+ return t(f);
419
+ }
420
+ }
421
+ const Fe = {
422
+ tokenize: Gt,
423
+ partial: !0
424
+ };
425
+ function Gt(e, r, t) {
426
+ return n;
427
+ function n(c) {
428
+ return T(c) ? _(e, u, "linePrefix")(c) : u(c);
429
+ }
430
+ function u(c) {
431
+ return c === null || E(c) ? r(c) : t(c);
432
+ }
433
+ }
434
+ const nt = {
435
+ name: "blockQuote",
436
+ tokenize: Jt,
437
+ continuation: {
438
+ tokenize: Xt
439
+ },
440
+ exit: Zt
441
+ };
442
+ function Jt(e, r, t) {
443
+ const n = this;
444
+ return u;
445
+ function u(i) {
446
+ if (i === 62) {
447
+ const o = n.containerState;
448
+ return o.open || (e.enter("blockQuote", {
449
+ _container: !0
450
+ }), o.open = !0), e.enter("blockQuotePrefix"), e.enter("blockQuoteMarker"), e.consume(i), e.exit("blockQuoteMarker"), c;
451
+ }
452
+ return t(i);
453
+ }
454
+ function c(i) {
455
+ return T(i) ? (e.enter("blockQuotePrefixWhitespace"), e.consume(i), e.exit("blockQuotePrefixWhitespace"), e.exit("blockQuotePrefix"), r) : (e.exit("blockQuotePrefix"), r(i));
456
+ }
457
+ }
458
+ function Xt(e, r, t) {
459
+ const n = this;
460
+ return u;
461
+ function u(i) {
462
+ return T(i) ? _(
463
+ e,
464
+ c,
465
+ "linePrefix",
466
+ n.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
467
+ )(i) : c(i);
468
+ }
469
+ function c(i) {
470
+ return e.attempt(nt, r, t)(i);
471
+ }
472
+ }
473
+ function Zt(e) {
474
+ e.exit("blockQuote");
475
+ }
476
+ const rt = {
477
+ name: "characterEscape",
478
+ tokenize: Yt
479
+ };
480
+ function Yt(e, r, t) {
481
+ return n;
482
+ function n(c) {
483
+ return e.enter("characterEscape"), e.enter("escapeMarker"), e.consume(c), e.exit("escapeMarker"), u;
484
+ }
485
+ function u(c) {
486
+ return jt(c) ? (e.enter("characterEscapeValue"), e.consume(c), e.exit("characterEscapeValue"), e.exit("characterEscape"), r) : t(c);
487
+ }
488
+ }
489
+ const We = document.createElement("i");
490
+ function De(e) {
491
+ const r = "&" + e + ";";
492
+ We.innerHTML = r;
493
+ const t = We.textContent;
494
+ return t.charCodeAt(t.length - 1) === 59 && e !== "semi" || t === r ? !1 : t;
495
+ }
496
+ const it = {
497
+ name: "characterReference",
498
+ tokenize: en
499
+ };
500
+ function en(e, r, t) {
501
+ const n = this;
502
+ let u = 0, c, i;
503
+ return o;
504
+ function o(h) {
505
+ return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(h), e.exit("characterReferenceMarker"), p;
506
+ }
507
+ function p(h) {
508
+ return h === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(h), e.exit("characterReferenceMarkerNumeric"), a) : (e.enter("characterReferenceValue"), c = 31, i = Z, d(h));
509
+ }
510
+ function a(h) {
511
+ return h === 88 || h === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(h), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), c = 6, i = Lt, d) : (e.enter("characterReferenceValue"), c = 7, i = Ie, d(h));
512
+ }
513
+ function d(h) {
514
+ if (h === 59 && u) {
515
+ const g = e.exit("characterReferenceValue");
516
+ return i === Z && !De(n.sliceSerialize(g)) ? t(h) : (e.enter("characterReferenceMarker"), e.consume(h), e.exit("characterReferenceMarker"), e.exit("characterReference"), r);
517
+ }
518
+ return i(h) && u++ < c ? (e.consume(h), d) : t(h);
519
+ }
520
+ }
521
+ const $e = {
522
+ tokenize: nn,
523
+ partial: !0
524
+ }, Ke = {
525
+ name: "codeFenced",
526
+ tokenize: tn,
527
+ concrete: !0
528
+ };
529
+ function tn(e, r, t) {
530
+ const n = this, u = {
531
+ tokenize: P,
532
+ partial: !0
533
+ };
534
+ let c = 0, i = 0, o;
535
+ return p;
536
+ function p(x) {
537
+ return a(x);
538
+ }
539
+ function a(x) {
540
+ const w = n.events[n.events.length - 1];
541
+ return c = w && w[1].type === "linePrefix" ? w[2].sliceSerialize(w[1], !0).length : 0, o = x, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), d(x);
542
+ }
543
+ function d(x) {
544
+ return x === o ? (i++, e.consume(x), d) : i < 3 ? t(x) : (e.exit("codeFencedFenceSequence"), T(x) ? _(e, h, "whitespace")(x) : h(x));
545
+ }
546
+ function h(x) {
547
+ return x === null || E(x) ? (e.exit("codeFencedFence"), n.interrupt ? r(x) : e.check($e, C, B)(x)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
548
+ contentType: "string"
549
+ }), g(x));
550
+ }
551
+ function g(x) {
552
+ return x === null || E(x) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), h(x)) : T(x) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), _(e, f, "whitespace")(x)) : x === 96 && x === o ? t(x) : (e.consume(x), g);
553
+ }
554
+ function f(x) {
555
+ return x === null || E(x) ? h(x) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
556
+ contentType: "string"
557
+ }), I(x));
558
+ }
559
+ function I(x) {
560
+ return x === null || E(x) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), h(x)) : x === 96 && x === o ? t(x) : (e.consume(x), I);
561
+ }
562
+ function C(x) {
563
+ return e.attempt(u, B, L)(x);
564
+ }
565
+ function L(x) {
566
+ return e.enter("lineEnding"), e.consume(x), e.exit("lineEnding"), y;
567
+ }
568
+ function y(x) {
569
+ return c > 0 && T(x) ? _(
570
+ e,
571
+ j,
572
+ "linePrefix",
573
+ c + 1
574
+ )(x) : j(x);
575
+ }
576
+ function j(x) {
577
+ return x === null || E(x) ? e.check($e, C, B)(x) : (e.enter("codeFlowValue"), S(x));
578
+ }
579
+ function S(x) {
580
+ return x === null || E(x) ? (e.exit("codeFlowValue"), j(x)) : (e.consume(x), S);
581
+ }
582
+ function B(x) {
583
+ return e.exit("codeFenced"), r(x);
584
+ }
585
+ function P(x, w, R) {
586
+ let q = 0;
587
+ return V;
588
+ function V(A) {
589
+ return x.enter("lineEnding"), x.consume(A), x.exit("lineEnding"), F;
590
+ }
591
+ function F(A) {
592
+ return x.enter("codeFencedFence"), T(A) ? _(
593
+ x,
594
+ v,
595
+ "linePrefix",
596
+ n.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
597
+ )(A) : v(A);
598
+ }
599
+ function v(A) {
600
+ return A === o ? (x.enter("codeFencedFenceSequence"), M(A)) : R(A);
601
+ }
602
+ function M(A) {
603
+ return A === o ? (q++, x.consume(A), M) : q >= i ? (x.exit("codeFencedFenceSequence"), T(A) ? _(x, O, "whitespace")(A) : O(A)) : R(A);
604
+ }
605
+ function O(A) {
606
+ return A === null || E(A) ? (x.exit("codeFencedFence"), w(A)) : R(A);
607
+ }
608
+ }
609
+ }
610
+ function nn(e, r, t) {
611
+ const n = this;
612
+ return u;
613
+ function u(i) {
614
+ return i === null ? t(i) : (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), c);
615
+ }
616
+ function c(i) {
617
+ return n.parser.lazy[n.now().line] ? t(i) : r(i);
618
+ }
619
+ }
620
+ const be = {
621
+ name: "codeIndented",
622
+ tokenize: un
623
+ }, rn = {
624
+ tokenize: cn,
625
+ partial: !0
626
+ };
627
+ function un(e, r, t) {
628
+ const n = this;
629
+ return u;
630
+ function u(a) {
631
+ return e.enter("codeIndented"), _(e, c, "linePrefix", 5)(a);
632
+ }
633
+ function c(a) {
634
+ const d = n.events[n.events.length - 1];
635
+ return d && d[1].type === "linePrefix" && d[2].sliceSerialize(d[1], !0).length >= 4 ? i(a) : t(a);
636
+ }
637
+ function i(a) {
638
+ return a === null ? p(a) : E(a) ? e.attempt(rn, i, p)(a) : (e.enter("codeFlowValue"), o(a));
639
+ }
640
+ function o(a) {
641
+ return a === null || E(a) ? (e.exit("codeFlowValue"), i(a)) : (e.consume(a), o);
642
+ }
643
+ function p(a) {
644
+ return e.exit("codeIndented"), r(a);
645
+ }
646
+ }
647
+ function cn(e, r, t) {
648
+ const n = this;
649
+ return u;
650
+ function u(i) {
651
+ return n.parser.lazy[n.now().line] ? t(i) : E(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), u) : _(e, c, "linePrefix", 5)(i);
652
+ }
653
+ function c(i) {
654
+ const o = n.events[n.events.length - 1];
655
+ return o && o[1].type === "linePrefix" && o[2].sliceSerialize(o[1], !0).length >= 4 ? r(i) : E(i) ? u(i) : t(i);
656
+ }
657
+ }
658
+ const on = {
659
+ name: "codeText",
660
+ tokenize: an,
661
+ resolve: sn,
662
+ previous: ln
663
+ };
664
+ function sn(e) {
665
+ let r = e.length - 4, t = 3, n, u;
666
+ if ((e[t][1].type === "lineEnding" || e[t][1].type === "space") && (e[r][1].type === "lineEnding" || e[r][1].type === "space")) {
667
+ for (n = t; ++n < r; )
668
+ if (e[n][1].type === "codeTextData") {
669
+ e[t][1].type = "codeTextPadding", e[r][1].type = "codeTextPadding", t += 2, r -= 2;
670
+ break;
671
+ }
672
+ }
673
+ for (n = t - 1, r++; ++n <= r; )
674
+ u === void 0 ? n !== r && e[n][1].type !== "lineEnding" && (u = n) : (n === r || e[n][1].type === "lineEnding") && (e[u][1].type = "codeTextData", n !== u + 2 && (e[u][1].end = e[n - 1][1].end, e.splice(u + 2, n - u - 2), r -= n - u - 2, n = u + 2), u = void 0);
675
+ return e;
676
+ }
677
+ function ln(e) {
678
+ return e !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
679
+ }
680
+ function an(e, r, t) {
681
+ let n = 0, u, c;
682
+ return i;
683
+ function i(h) {
684
+ return e.enter("codeText"), e.enter("codeTextSequence"), o(h);
685
+ }
686
+ function o(h) {
687
+ return h === 96 ? (e.consume(h), n++, o) : (e.exit("codeTextSequence"), p(h));
688
+ }
689
+ function p(h) {
690
+ return h === null ? t(h) : h === 32 ? (e.enter("space"), e.consume(h), e.exit("space"), p) : h === 96 ? (c = e.enter("codeTextSequence"), u = 0, d(h)) : E(h) ? (e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), p) : (e.enter("codeTextData"), a(h));
691
+ }
692
+ function a(h) {
693
+ return h === null || h === 32 || h === 96 || E(h) ? (e.exit("codeTextData"), p(h)) : (e.consume(h), a);
694
+ }
695
+ function d(h) {
696
+ return h === 96 ? (e.consume(h), u++, d) : u === n ? (e.exit("codeTextSequence"), e.exit("codeText"), r(h)) : (c.type = "codeTextData", a(h));
697
+ }
698
+ }
699
+ function ut(e) {
700
+ const r = {};
701
+ let t = -1, n, u, c, i, o, p, a;
702
+ for (; ++t < e.length; ) {
703
+ for (; t in r; )
704
+ t = r[t];
705
+ if (n = e[t], t && n[1].type === "chunkFlow" && e[t - 1][1].type === "listItemPrefix" && (p = n[1]._tokenizer.events, c = 0, c < p.length && p[c][1].type === "lineEndingBlank" && (c += 2), c < p.length && p[c][1].type === "content"))
706
+ for (; ++c < p.length && p[c][1].type !== "content"; )
707
+ p[c][1].type === "chunkText" && (p[c][1]._isInFirstContentOfListItem = !0, c++);
708
+ if (n[0] === "enter")
709
+ n[1].contentType && (Object.assign(r, fn(e, t)), t = r[t], a = !0);
710
+ else if (n[1]._container) {
711
+ for (c = t, u = void 0; c-- && (i = e[c], i[1].type === "lineEnding" || i[1].type === "lineEndingBlank"); )
712
+ i[0] === "enter" && (u && (e[u][1].type = "lineEndingBlank"), i[1].type = "lineEnding", u = c);
713
+ u && (n[1].end = Object.assign({}, e[u][1].start), o = e.slice(u, t), o.unshift(n), te(e, u, t - u + 1, o));
714
+ }
715
+ }
716
+ return !a;
717
+ }
718
+ function fn(e, r) {
719
+ const t = e[r][1], n = e[r][2];
720
+ let u = r - 1;
721
+ const c = [], i = t._tokenizer || n.parser[t.contentType](t.start), o = i.events, p = [], a = {};
722
+ let d, h, g = -1, f = t, I = 0, C = 0;
723
+ const L = [C];
724
+ for (; f; ) {
725
+ for (; e[++u][1] !== f; )
726
+ ;
727
+ c.push(u), f._tokenizer || (d = n.sliceStream(f), f.next || d.push(null), h && i.defineSkip(f.start), f._isInFirstContentOfListItem && (i._gfmTasklistFirstContentOfListItem = !0), i.write(d), f._isInFirstContentOfListItem && (i._gfmTasklistFirstContentOfListItem = void 0)), h = f, f = f.next;
728
+ }
729
+ for (f = t; ++g < o.length; )
730
+ o[g][0] === "exit" && o[g - 1][0] === "enter" && o[g][1].type === o[g - 1][1].type && o[g][1].start.line !== o[g][1].end.line && (C = g + 1, L.push(C), f._tokenizer = void 0, f.previous = void 0, f = f.next);
731
+ for (i.events = [], f ? (f._tokenizer = void 0, f.previous = void 0) : L.pop(), g = L.length; g--; ) {
732
+ const y = o.slice(L[g], L[g + 1]), j = c.pop();
733
+ p.unshift([j, j + y.length - 1]), te(e, j, 2, y);
734
+ }
735
+ for (g = -1; ++g < p.length; )
736
+ a[I + p[g][0]] = I + p[g][1], I += p[g][1] - p[g][0] - 1;
737
+ return a;
738
+ }
739
+ const dn = {
740
+ tokenize: mn,
741
+ resolve: hn
742
+ }, pn = {
743
+ tokenize: gn,
744
+ partial: !0
745
+ };
746
+ function hn(e) {
747
+ return ut(e), e;
748
+ }
749
+ function mn(e, r) {
750
+ let t;
751
+ return n;
752
+ function n(o) {
753
+ return e.enter("content"), t = e.enter("chunkContent", {
754
+ contentType: "content"
755
+ }), u(o);
756
+ }
757
+ function u(o) {
758
+ return o === null ? c(o) : E(o) ? e.check(
759
+ pn,
760
+ i,
761
+ c
762
+ )(o) : (e.consume(o), u);
763
+ }
764
+ function c(o) {
765
+ return e.exit("chunkContent"), e.exit("content"), r(o);
766
+ }
767
+ function i(o) {
768
+ return e.consume(o), e.exit("chunkContent"), t.next = e.enter("chunkContent", {
769
+ contentType: "content",
770
+ previous: t
771
+ }), t = t.next, u;
772
+ }
773
+ }
774
+ function gn(e, r, t) {
775
+ const n = this;
776
+ return u;
777
+ function u(i) {
778
+ return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), _(e, c, "linePrefix");
779
+ }
780
+ function c(i) {
781
+ if (i === null || E(i))
782
+ return t(i);
783
+ const o = n.events[n.events.length - 1];
784
+ return !n.parser.constructs.disable.null.includes("codeIndented") && o && o[1].type === "linePrefix" && o[2].sliceSerialize(o[1], !0).length >= 4 ? r(i) : e.interrupt(n.parser.constructs.flow, t, r)(i);
785
+ }
786
+ }
787
+ function ct(e, r, t, n, u, c, i, o, p) {
788
+ const a = p || Number.POSITIVE_INFINITY;
789
+ let d = 0;
790
+ return h;
791
+ function h(y) {
792
+ return y === 60 ? (e.enter(n), e.enter(u), e.enter(c), e.consume(y), e.exit(c), g) : y === null || y === 32 || y === 41 || Ae(y) ? t(y) : (e.enter(n), e.enter(i), e.enter(o), e.enter("chunkString", {
793
+ contentType: "string"
794
+ }), C(y));
795
+ }
796
+ function g(y) {
797
+ return y === 62 ? (e.enter(c), e.consume(y), e.exit(c), e.exit(u), e.exit(n), r) : (e.enter(o), e.enter("chunkString", {
798
+ contentType: "string"
799
+ }), f(y));
800
+ }
801
+ function f(y) {
802
+ return y === 62 ? (e.exit("chunkString"), e.exit(o), g(y)) : y === null || y === 60 || E(y) ? t(y) : (e.consume(y), y === 92 ? I : f);
803
+ }
804
+ function I(y) {
805
+ return y === 60 || y === 62 || y === 92 ? (e.consume(y), f) : f(y);
806
+ }
807
+ function C(y) {
808
+ return !d && (y === null || y === 41 || $(y)) ? (e.exit("chunkString"), e.exit(o), e.exit(i), e.exit(n), r(y)) : d < a && y === 40 ? (e.consume(y), d++, C) : y === 41 ? (e.consume(y), d--, C) : y === null || y === 32 || y === 40 || Ae(y) ? t(y) : (e.consume(y), y === 92 ? L : C);
809
+ }
810
+ function L(y) {
811
+ return y === 40 || y === 41 || y === 92 ? (e.consume(y), C) : C(y);
812
+ }
813
+ }
814
+ function ot(e, r, t, n, u, c) {
815
+ const i = this;
816
+ let o = 0, p;
817
+ return a;
818
+ function a(f) {
819
+ return e.enter(n), e.enter(u), e.consume(f), e.exit(u), e.enter(c), d;
820
+ }
821
+ function d(f) {
822
+ return o > 999 || f === null || f === 91 || f === 93 && !p || // To do: remove in the future once we’ve switched from
823
+ // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
824
+ // which doesn’t need this.
825
+ // Hidden footnotes hook.
826
+ /* c8 ignore next 3 */
827
+ f === 94 && !o && "_hiddenFootnoteSupport" in i.parser.constructs ? t(f) : f === 93 ? (e.exit(c), e.enter(u), e.consume(f), e.exit(u), e.exit(n), r) : E(f) ? (e.enter("lineEnding"), e.consume(f), e.exit("lineEnding"), d) : (e.enter("chunkString", {
828
+ contentType: "string"
829
+ }), h(f));
830
+ }
831
+ function h(f) {
832
+ return f === null || f === 91 || f === 93 || E(f) || o++ > 999 ? (e.exit("chunkString"), d(f)) : (e.consume(f), p || (p = !T(f)), f === 92 ? g : h);
833
+ }
834
+ function g(f) {
835
+ return f === 91 || f === 92 || f === 93 ? (e.consume(f), o++, h) : h(f);
836
+ }
837
+ }
838
+ function st(e, r, t, n, u, c) {
839
+ let i;
840
+ return o;
841
+ function o(g) {
842
+ return g === 34 || g === 39 || g === 40 ? (e.enter(n), e.enter(u), e.consume(g), e.exit(u), i = g === 40 ? 41 : g, p) : t(g);
843
+ }
844
+ function p(g) {
845
+ return g === i ? (e.enter(u), e.consume(g), e.exit(u), e.exit(n), r) : (e.enter(c), a(g));
846
+ }
847
+ function a(g) {
848
+ return g === i ? (e.exit(c), p(i)) : g === null ? t(g) : E(g) ? (e.enter("lineEnding"), e.consume(g), e.exit("lineEnding"), _(e, a, "linePrefix")) : (e.enter("chunkString", {
849
+ contentType: "string"
850
+ }), d(g));
851
+ }
852
+ function d(g) {
853
+ return g === i || g === null || E(g) ? (e.exit("chunkString"), a(g)) : (e.consume(g), g === 92 ? h : d);
854
+ }
855
+ function h(g) {
856
+ return g === i || g === 92 ? (e.consume(g), d) : d(g);
857
+ }
858
+ }
859
+ function xe(e, r) {
860
+ let t;
861
+ return n;
862
+ function n(u) {
863
+ return E(u) ? (e.enter("lineEnding"), e.consume(u), e.exit("lineEnding"), t = !0, n) : T(u) ? _(
864
+ e,
865
+ n,
866
+ t ? "linePrefix" : "lineSuffix"
867
+ )(u) : r(u);
868
+ }
869
+ }
870
+ function he(e) {
871
+ return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
872
+ }
873
+ const xn = {
874
+ name: "definition",
875
+ tokenize: yn
876
+ }, kn = {
877
+ tokenize: Fn,
878
+ partial: !0
879
+ };
880
+ function yn(e, r, t) {
881
+ const n = this;
882
+ let u;
883
+ return c;
884
+ function c(f) {
885
+ return e.enter("definition"), i(f);
886
+ }
887
+ function i(f) {
888
+ return ot.call(
889
+ n,
890
+ e,
891
+ o,
892
+ // Note: we don’t need to reset the way `markdown-rs` does.
893
+ t,
894
+ "definitionLabel",
895
+ "definitionLabelMarker",
896
+ "definitionLabelString"
897
+ )(f);
898
+ }
899
+ function o(f) {
900
+ return u = he(
901
+ n.sliceSerialize(n.events[n.events.length - 1][1]).slice(1, -1)
902
+ ), f === 58 ? (e.enter("definitionMarker"), e.consume(f), e.exit("definitionMarker"), p) : t(f);
903
+ }
904
+ function p(f) {
905
+ return $(f) ? xe(e, a)(f) : a(f);
906
+ }
907
+ function a(f) {
908
+ return ct(
909
+ e,
910
+ d,
911
+ // Note: we don’t need to reset the way `markdown-rs` does.
912
+ t,
913
+ "definitionDestination",
914
+ "definitionDestinationLiteral",
915
+ "definitionDestinationLiteralMarker",
916
+ "definitionDestinationRaw",
917
+ "definitionDestinationString"
918
+ )(f);
919
+ }
920
+ function d(f) {
921
+ return e.attempt(kn, h, h)(f);
922
+ }
923
+ function h(f) {
924
+ return T(f) ? _(e, g, "whitespace")(f) : g(f);
925
+ }
926
+ function g(f) {
927
+ return f === null || E(f) ? (e.exit("definition"), n.parser.defined.push(u), r(f)) : t(f);
928
+ }
929
+ }
930
+ function Fn(e, r, t) {
931
+ return n;
932
+ function n(o) {
933
+ return $(o) ? xe(e, u)(o) : t(o);
934
+ }
935
+ function u(o) {
936
+ return st(
937
+ e,
938
+ c,
939
+ t,
940
+ "definitionTitle",
941
+ "definitionTitleMarker",
942
+ "definitionTitleString"
943
+ )(o);
944
+ }
945
+ function c(o) {
946
+ return T(o) ? _(e, i, "whitespace")(o) : i(o);
947
+ }
948
+ function i(o) {
949
+ return o === null || E(o) ? r(o) : t(o);
950
+ }
951
+ }
952
+ const vn = {
953
+ name: "hardBreakEscape",
954
+ tokenize: Sn
955
+ };
956
+ function Sn(e, r, t) {
957
+ return n;
958
+ function n(c) {
959
+ return e.enter("hardBreakEscape"), e.consume(c), u;
960
+ }
961
+ function u(c) {
962
+ return E(c) ? (e.exit("hardBreakEscape"), r(c)) : t(c);
963
+ }
964
+ }
965
+ const bn = {
966
+ name: "headingAtx",
967
+ tokenize: An,
968
+ resolve: En
969
+ };
970
+ function En(e, r) {
971
+ let t = e.length - 2, n = 3, u, c;
972
+ return e[n][1].type === "whitespace" && (n += 2), t - 2 > n && e[t][1].type === "whitespace" && (t -= 2), e[t][1].type === "atxHeadingSequence" && (n === t - 1 || t - 4 > n && e[t - 2][1].type === "whitespace") && (t -= n + 1 === t ? 2 : 4), t > n && (u = {
973
+ type: "atxHeadingText",
974
+ start: e[n][1].start,
975
+ end: e[t][1].end
976
+ }, c = {
977
+ type: "chunkText",
978
+ start: e[n][1].start,
979
+ end: e[t][1].end,
980
+ contentType: "text"
981
+ }, te(e, n, t - n + 1, [
982
+ ["enter", u, r],
983
+ ["enter", c, r],
984
+ ["exit", c, r],
985
+ ["exit", u, r]
986
+ ])), e;
987
+ }
988
+ function An(e, r, t) {
989
+ let n = 0;
990
+ return u;
991
+ function u(d) {
992
+ return e.enter("atxHeading"), c(d);
993
+ }
994
+ function c(d) {
995
+ return e.enter("atxHeadingSequence"), i(d);
996
+ }
997
+ function i(d) {
998
+ return d === 35 && n++ < 6 ? (e.consume(d), i) : d === null || $(d) ? (e.exit("atxHeadingSequence"), o(d)) : t(d);
999
+ }
1000
+ function o(d) {
1001
+ return d === 35 ? (e.enter("atxHeadingSequence"), p(d)) : d === null || E(d) ? (e.exit("atxHeading"), r(d)) : T(d) ? _(e, o, "whitespace")(d) : (e.enter("atxHeadingText"), a(d));
1002
+ }
1003
+ function p(d) {
1004
+ return d === 35 ? (e.consume(d), p) : (e.exit("atxHeadingSequence"), o(d));
1005
+ }
1006
+ function a(d) {
1007
+ return d === null || d === 35 || $(d) ? (e.exit("atxHeadingText"), o(d)) : (e.consume(d), a);
1008
+ }
1009
+ }
1010
+ const In = [
1011
+ "address",
1012
+ "article",
1013
+ "aside",
1014
+ "base",
1015
+ "basefont",
1016
+ "blockquote",
1017
+ "body",
1018
+ "caption",
1019
+ "center",
1020
+ "col",
1021
+ "colgroup",
1022
+ "dd",
1023
+ "details",
1024
+ "dialog",
1025
+ "dir",
1026
+ "div",
1027
+ "dl",
1028
+ "dt",
1029
+ "fieldset",
1030
+ "figcaption",
1031
+ "figure",
1032
+ "footer",
1033
+ "form",
1034
+ "frame",
1035
+ "frameset",
1036
+ "h1",
1037
+ "h2",
1038
+ "h3",
1039
+ "h4",
1040
+ "h5",
1041
+ "h6",
1042
+ "head",
1043
+ "header",
1044
+ "hr",
1045
+ "html",
1046
+ "iframe",
1047
+ "legend",
1048
+ "li",
1049
+ "link",
1050
+ "main",
1051
+ "menu",
1052
+ "menuitem",
1053
+ "nav",
1054
+ "noframes",
1055
+ "ol",
1056
+ "optgroup",
1057
+ "option",
1058
+ "p",
1059
+ "param",
1060
+ "search",
1061
+ "section",
1062
+ "summary",
1063
+ "table",
1064
+ "tbody",
1065
+ "td",
1066
+ "tfoot",
1067
+ "th",
1068
+ "thead",
1069
+ "title",
1070
+ "tr",
1071
+ "track",
1072
+ "ul"
1073
+ ], Ge = ["pre", "script", "style", "textarea"], Tn = {
1074
+ name: "htmlFlow",
1075
+ tokenize: Dn,
1076
+ resolveTo: zn,
1077
+ concrete: !0
1078
+ }, Cn = {
1079
+ tokenize: Bn,
1080
+ partial: !0
1081
+ }, wn = {
1082
+ tokenize: _n,
1083
+ partial: !0
1084
+ };
1085
+ function zn(e) {
1086
+ let r = e.length;
1087
+ for (; r-- && !(e[r][0] === "enter" && e[r][1].type === "htmlFlow"); )
1088
+ ;
1089
+ return r > 1 && e[r - 2][1].type === "linePrefix" && (e[r][1].start = e[r - 2][1].start, e[r + 1][1].start = e[r - 2][1].start, e.splice(r - 2, 2)), e;
1090
+ }
1091
+ function Dn(e, r, t) {
1092
+ const n = this;
1093
+ let u, c, i, o, p;
1094
+ return a;
1095
+ function a(l) {
1096
+ return d(l);
1097
+ }
1098
+ function d(l) {
1099
+ return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(l), h;
1100
+ }
1101
+ function h(l) {
1102
+ return l === 33 ? (e.consume(l), g) : l === 47 ? (e.consume(l), c = !0, C) : l === 63 ? (e.consume(l), u = 3, n.interrupt ? r : s) : ee(l) ? (e.consume(l), i = String.fromCharCode(l), L) : t(l);
1103
+ }
1104
+ function g(l) {
1105
+ return l === 45 ? (e.consume(l), u = 2, f) : l === 91 ? (e.consume(l), u = 5, o = 0, I) : ee(l) ? (e.consume(l), u = 4, n.interrupt ? r : s) : t(l);
1106
+ }
1107
+ function f(l) {
1108
+ return l === 45 ? (e.consume(l), n.interrupt ? r : s) : t(l);
1109
+ }
1110
+ function I(l) {
1111
+ const X = "CDATA[";
1112
+ return l === X.charCodeAt(o++) ? (e.consume(l), o === X.length ? n.interrupt ? r : v : I) : t(l);
1113
+ }
1114
+ function C(l) {
1115
+ return ee(l) ? (e.consume(l), i = String.fromCharCode(l), L) : t(l);
1116
+ }
1117
+ function L(l) {
1118
+ if (l === null || l === 47 || l === 62 || $(l)) {
1119
+ const X = l === 47, ae = i.toLowerCase();
1120
+ return !X && !c && Ge.includes(ae) ? (u = 1, n.interrupt ? r(l) : v(l)) : In.includes(i.toLowerCase()) ? (u = 6, X ? (e.consume(l), y) : n.interrupt ? r(l) : v(l)) : (u = 7, n.interrupt && !n.parser.lazy[n.now().line] ? t(l) : c ? j(l) : S(l));
1121
+ }
1122
+ return l === 45 || Z(l) ? (e.consume(l), i += String.fromCharCode(l), L) : t(l);
1123
+ }
1124
+ function y(l) {
1125
+ return l === 62 ? (e.consume(l), n.interrupt ? r : v) : t(l);
1126
+ }
1127
+ function j(l) {
1128
+ return T(l) ? (e.consume(l), j) : V(l);
1129
+ }
1130
+ function S(l) {
1131
+ return l === 47 ? (e.consume(l), V) : l === 58 || l === 95 || ee(l) ? (e.consume(l), B) : T(l) ? (e.consume(l), S) : V(l);
1132
+ }
1133
+ function B(l) {
1134
+ return l === 45 || l === 46 || l === 58 || l === 95 || Z(l) ? (e.consume(l), B) : P(l);
1135
+ }
1136
+ function P(l) {
1137
+ return l === 61 ? (e.consume(l), x) : T(l) ? (e.consume(l), P) : S(l);
1138
+ }
1139
+ function x(l) {
1140
+ return l === null || l === 60 || l === 61 || l === 62 || l === 96 ? t(l) : l === 34 || l === 39 ? (e.consume(l), p = l, w) : T(l) ? (e.consume(l), x) : R(l);
1141
+ }
1142
+ function w(l) {
1143
+ return l === p ? (e.consume(l), p = null, q) : l === null || E(l) ? t(l) : (e.consume(l), w);
1144
+ }
1145
+ function R(l) {
1146
+ return l === null || l === 34 || l === 39 || l === 47 || l === 60 || l === 61 || l === 62 || l === 96 || $(l) ? P(l) : (e.consume(l), R);
1147
+ }
1148
+ function q(l) {
1149
+ return l === 47 || l === 62 || T(l) ? S(l) : t(l);
1150
+ }
1151
+ function V(l) {
1152
+ return l === 62 ? (e.consume(l), F) : t(l);
1153
+ }
1154
+ function F(l) {
1155
+ return l === null || E(l) ? v(l) : T(l) ? (e.consume(l), F) : t(l);
1156
+ }
1157
+ function v(l) {
1158
+ return l === 45 && u === 2 ? (e.consume(l), Q) : l === 60 && u === 1 ? (e.consume(l), N) : l === 62 && u === 4 ? (e.consume(l), J) : l === 63 && u === 3 ? (e.consume(l), s) : l === 93 && u === 5 ? (e.consume(l), ne) : E(l) && (u === 6 || u === 7) ? (e.exit("htmlFlowData"), e.check(
1159
+ Cn,
1160
+ re,
1161
+ M
1162
+ )(l)) : l === null || E(l) ? (e.exit("htmlFlowData"), M(l)) : (e.consume(l), v);
1163
+ }
1164
+ function M(l) {
1165
+ return e.check(
1166
+ wn,
1167
+ O,
1168
+ re
1169
+ )(l);
1170
+ }
1171
+ function O(l) {
1172
+ return e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), A;
1173
+ }
1174
+ function A(l) {
1175
+ return l === null || E(l) ? M(l) : (e.enter("htmlFlowData"), v(l));
1176
+ }
1177
+ function Q(l) {
1178
+ return l === 45 ? (e.consume(l), s) : v(l);
1179
+ }
1180
+ function N(l) {
1181
+ return l === 47 ? (e.consume(l), i = "", G) : v(l);
1182
+ }
1183
+ function G(l) {
1184
+ if (l === 62) {
1185
+ const X = i.toLowerCase();
1186
+ return Ge.includes(X) ? (e.consume(l), J) : v(l);
1187
+ }
1188
+ return ee(l) && i.length < 8 ? (e.consume(l), i += String.fromCharCode(l), G) : v(l);
1189
+ }
1190
+ function ne(l) {
1191
+ return l === 93 ? (e.consume(l), s) : v(l);
1192
+ }
1193
+ function s(l) {
1194
+ return l === 62 ? (e.consume(l), J) : l === 45 && u === 2 ? (e.consume(l), s) : v(l);
1195
+ }
1196
+ function J(l) {
1197
+ return l === null || E(l) ? (e.exit("htmlFlowData"), re(l)) : (e.consume(l), J);
1198
+ }
1199
+ function re(l) {
1200
+ return e.exit("htmlFlow"), r(l);
1201
+ }
1202
+ }
1203
+ function _n(e, r, t) {
1204
+ const n = this;
1205
+ return u;
1206
+ function u(i) {
1207
+ return E(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), c) : t(i);
1208
+ }
1209
+ function c(i) {
1210
+ return n.parser.lazy[n.now().line] ? t(i) : r(i);
1211
+ }
1212
+ }
1213
+ function Bn(e, r, t) {
1214
+ return n;
1215
+ function n(u) {
1216
+ return e.enter("lineEnding"), e.consume(u), e.exit("lineEnding"), e.attempt(Fe, r, t);
1217
+ }
1218
+ }
1219
+ const Mn = {
1220
+ name: "htmlText",
1221
+ tokenize: Pn
1222
+ };
1223
+ function Pn(e, r, t) {
1224
+ const n = this;
1225
+ let u, c, i;
1226
+ return o;
1227
+ function o(s) {
1228
+ return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(s), p;
1229
+ }
1230
+ function p(s) {
1231
+ return s === 33 ? (e.consume(s), a) : s === 47 ? (e.consume(s), P) : s === 63 ? (e.consume(s), S) : ee(s) ? (e.consume(s), R) : t(s);
1232
+ }
1233
+ function a(s) {
1234
+ return s === 45 ? (e.consume(s), d) : s === 91 ? (e.consume(s), c = 0, I) : ee(s) ? (e.consume(s), j) : t(s);
1235
+ }
1236
+ function d(s) {
1237
+ return s === 45 ? (e.consume(s), f) : t(s);
1238
+ }
1239
+ function h(s) {
1240
+ return s === null ? t(s) : s === 45 ? (e.consume(s), g) : E(s) ? (i = h, N(s)) : (e.consume(s), h);
1241
+ }
1242
+ function g(s) {
1243
+ return s === 45 ? (e.consume(s), f) : h(s);
1244
+ }
1245
+ function f(s) {
1246
+ return s === 62 ? Q(s) : s === 45 ? g(s) : h(s);
1247
+ }
1248
+ function I(s) {
1249
+ const J = "CDATA[";
1250
+ return s === J.charCodeAt(c++) ? (e.consume(s), c === J.length ? C : I) : t(s);
1251
+ }
1252
+ function C(s) {
1253
+ return s === null ? t(s) : s === 93 ? (e.consume(s), L) : E(s) ? (i = C, N(s)) : (e.consume(s), C);
1254
+ }
1255
+ function L(s) {
1256
+ return s === 93 ? (e.consume(s), y) : C(s);
1257
+ }
1258
+ function y(s) {
1259
+ return s === 62 ? Q(s) : s === 93 ? (e.consume(s), y) : C(s);
1260
+ }
1261
+ function j(s) {
1262
+ return s === null || s === 62 ? Q(s) : E(s) ? (i = j, N(s)) : (e.consume(s), j);
1263
+ }
1264
+ function S(s) {
1265
+ return s === null ? t(s) : s === 63 ? (e.consume(s), B) : E(s) ? (i = S, N(s)) : (e.consume(s), S);
1266
+ }
1267
+ function B(s) {
1268
+ return s === 62 ? Q(s) : S(s);
1269
+ }
1270
+ function P(s) {
1271
+ return ee(s) ? (e.consume(s), x) : t(s);
1272
+ }
1273
+ function x(s) {
1274
+ return s === 45 || Z(s) ? (e.consume(s), x) : w(s);
1275
+ }
1276
+ function w(s) {
1277
+ return E(s) ? (i = w, N(s)) : T(s) ? (e.consume(s), w) : Q(s);
1278
+ }
1279
+ function R(s) {
1280
+ return s === 45 || Z(s) ? (e.consume(s), R) : s === 47 || s === 62 || $(s) ? q(s) : t(s);
1281
+ }
1282
+ function q(s) {
1283
+ return s === 47 ? (e.consume(s), Q) : s === 58 || s === 95 || ee(s) ? (e.consume(s), V) : E(s) ? (i = q, N(s)) : T(s) ? (e.consume(s), q) : Q(s);
1284
+ }
1285
+ function V(s) {
1286
+ return s === 45 || s === 46 || s === 58 || s === 95 || Z(s) ? (e.consume(s), V) : F(s);
1287
+ }
1288
+ function F(s) {
1289
+ return s === 61 ? (e.consume(s), v) : E(s) ? (i = F, N(s)) : T(s) ? (e.consume(s), F) : q(s);
1290
+ }
1291
+ function v(s) {
1292
+ return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (e.consume(s), u = s, M) : E(s) ? (i = v, N(s)) : T(s) ? (e.consume(s), v) : (e.consume(s), O);
1293
+ }
1294
+ function M(s) {
1295
+ return s === u ? (e.consume(s), u = void 0, A) : s === null ? t(s) : E(s) ? (i = M, N(s)) : (e.consume(s), M);
1296
+ }
1297
+ function O(s) {
1298
+ return s === null || s === 34 || s === 39 || s === 60 || s === 61 || s === 96 ? t(s) : s === 47 || s === 62 || $(s) ? q(s) : (e.consume(s), O);
1299
+ }
1300
+ function A(s) {
1301
+ return s === 47 || s === 62 || $(s) ? q(s) : t(s);
1302
+ }
1303
+ function Q(s) {
1304
+ return s === 62 ? (e.consume(s), e.exit("htmlTextData"), e.exit("htmlText"), r) : t(s);
1305
+ }
1306
+ function N(s) {
1307
+ return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(s), e.exit("lineEnding"), G;
1308
+ }
1309
+ function G(s) {
1310
+ return T(s) ? _(
1311
+ e,
1312
+ ne,
1313
+ "linePrefix",
1314
+ n.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
1315
+ )(s) : ne(s);
1316
+ }
1317
+ function ne(s) {
1318
+ return e.enter("htmlTextData"), i(s);
1319
+ }
1320
+ }
1321
+ const _e = {
1322
+ name: "labelEnd",
1323
+ tokenize: qn,
1324
+ resolveTo: Rn,
1325
+ resolveAll: Hn
1326
+ }, Ln = {
1327
+ tokenize: Vn
1328
+ }, jn = {
1329
+ tokenize: Nn
1330
+ }, On = {
1331
+ tokenize: Un
1332
+ };
1333
+ function Hn(e) {
1334
+ let r = -1;
1335
+ for (; ++r < e.length; ) {
1336
+ const t = e[r][1];
1337
+ (t.type === "labelImage" || t.type === "labelLink" || t.type === "labelEnd") && (e.splice(r + 1, t.type === "labelImage" ? 4 : 2), t.type = "data", r++);
1338
+ }
1339
+ return e;
1340
+ }
1341
+ function Rn(e, r) {
1342
+ let t = e.length, n = 0, u, c, i, o;
1343
+ for (; t--; )
1344
+ if (u = e[t][1], c) {
1345
+ if (u.type === "link" || u.type === "labelLink" && u._inactive)
1346
+ break;
1347
+ e[t][0] === "enter" && u.type === "labelLink" && (u._inactive = !0);
1348
+ } else if (i) {
1349
+ if (e[t][0] === "enter" && (u.type === "labelImage" || u.type === "labelLink") && !u._balanced && (c = t, u.type !== "labelLink")) {
1350
+ n = 2;
1351
+ break;
1352
+ }
1353
+ } else
1354
+ u.type === "labelEnd" && (i = t);
1355
+ const p = {
1356
+ type: e[c][1].type === "labelLink" ? "link" : "image",
1357
+ start: Object.assign({}, e[c][1].start),
1358
+ end: Object.assign({}, e[e.length - 1][1].end)
1359
+ }, a = {
1360
+ type: "label",
1361
+ start: Object.assign({}, e[c][1].start),
1362
+ end: Object.assign({}, e[i][1].end)
1363
+ }, d = {
1364
+ type: "labelText",
1365
+ start: Object.assign({}, e[c + n + 2][1].end),
1366
+ end: Object.assign({}, e[i - 2][1].start)
1367
+ };
1368
+ return o = [
1369
+ ["enter", p, r],
1370
+ ["enter", a, r]
1371
+ ], o = K(o, e.slice(c + 1, c + n + 3)), o = K(o, [["enter", d, r]]), o = K(
1372
+ o,
1373
+ ze(
1374
+ r.parser.constructs.insideSpan.null,
1375
+ e.slice(c + n + 4, i - 3),
1376
+ r
1377
+ )
1378
+ ), o = K(o, [
1379
+ ["exit", d, r],
1380
+ e[i - 2],
1381
+ e[i - 1],
1382
+ ["exit", a, r]
1383
+ ]), o = K(o, e.slice(i + 1)), o = K(o, [["exit", p, r]]), te(e, c, e.length, o), e;
1384
+ }
1385
+ function qn(e, r, t) {
1386
+ const n = this;
1387
+ let u = n.events.length, c, i;
1388
+ for (; u--; )
1389
+ if ((n.events[u][1].type === "labelImage" || n.events[u][1].type === "labelLink") && !n.events[u][1]._balanced) {
1390
+ c = n.events[u][1];
1391
+ break;
1392
+ }
1393
+ return o;
1394
+ function o(g) {
1395
+ return c ? c._inactive ? h(g) : (i = n.parser.defined.includes(
1396
+ he(
1397
+ n.sliceSerialize({
1398
+ start: c.end,
1399
+ end: n.now()
1400
+ })
1401
+ )
1402
+ ), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(g), e.exit("labelMarker"), e.exit("labelEnd"), p) : t(g);
1403
+ }
1404
+ function p(g) {
1405
+ return g === 40 ? e.attempt(
1406
+ Ln,
1407
+ d,
1408
+ i ? d : h
1409
+ )(g) : g === 91 ? e.attempt(
1410
+ jn,
1411
+ d,
1412
+ i ? a : h
1413
+ )(g) : i ? d(g) : h(g);
1414
+ }
1415
+ function a(g) {
1416
+ return e.attempt(
1417
+ On,
1418
+ d,
1419
+ h
1420
+ )(g);
1421
+ }
1422
+ function d(g) {
1423
+ return r(g);
1424
+ }
1425
+ function h(g) {
1426
+ return c._balanced = !0, t(g);
1427
+ }
1428
+ }
1429
+ function Vn(e, r, t) {
1430
+ return n;
1431
+ function n(h) {
1432
+ return e.enter("resource"), e.enter("resourceMarker"), e.consume(h), e.exit("resourceMarker"), u;
1433
+ }
1434
+ function u(h) {
1435
+ return $(h) ? xe(e, c)(h) : c(h);
1436
+ }
1437
+ function c(h) {
1438
+ return h === 41 ? d(h) : ct(
1439
+ e,
1440
+ i,
1441
+ o,
1442
+ "resourceDestination",
1443
+ "resourceDestinationLiteral",
1444
+ "resourceDestinationLiteralMarker",
1445
+ "resourceDestinationRaw",
1446
+ "resourceDestinationString",
1447
+ 32
1448
+ )(h);
1449
+ }
1450
+ function i(h) {
1451
+ return $(h) ? xe(e, p)(h) : d(h);
1452
+ }
1453
+ function o(h) {
1454
+ return t(h);
1455
+ }
1456
+ function p(h) {
1457
+ return h === 34 || h === 39 || h === 40 ? st(
1458
+ e,
1459
+ a,
1460
+ t,
1461
+ "resourceTitle",
1462
+ "resourceTitleMarker",
1463
+ "resourceTitleString"
1464
+ )(h) : d(h);
1465
+ }
1466
+ function a(h) {
1467
+ return $(h) ? xe(e, d)(h) : d(h);
1468
+ }
1469
+ function d(h) {
1470
+ return h === 41 ? (e.enter("resourceMarker"), e.consume(h), e.exit("resourceMarker"), e.exit("resource"), r) : t(h);
1471
+ }
1472
+ }
1473
+ function Nn(e, r, t) {
1474
+ const n = this;
1475
+ return u;
1476
+ function u(o) {
1477
+ return ot.call(
1478
+ n,
1479
+ e,
1480
+ c,
1481
+ i,
1482
+ "reference",
1483
+ "referenceMarker",
1484
+ "referenceString"
1485
+ )(o);
1486
+ }
1487
+ function c(o) {
1488
+ return n.parser.defined.includes(
1489
+ he(
1490
+ n.sliceSerialize(n.events[n.events.length - 1][1]).slice(1, -1)
1491
+ )
1492
+ ) ? r(o) : t(o);
1493
+ }
1494
+ function i(o) {
1495
+ return t(o);
1496
+ }
1497
+ }
1498
+ function Un(e, r, t) {
1499
+ return n;
1500
+ function n(c) {
1501
+ return e.enter("reference"), e.enter("referenceMarker"), e.consume(c), e.exit("referenceMarker"), u;
1502
+ }
1503
+ function u(c) {
1504
+ return c === 93 ? (e.enter("referenceMarker"), e.consume(c), e.exit("referenceMarker"), e.exit("reference"), r) : t(c);
1505
+ }
1506
+ }
1507
+ const Qn = {
1508
+ name: "labelStartImage",
1509
+ tokenize: Wn,
1510
+ resolveAll: _e.resolveAll
1511
+ };
1512
+ function Wn(e, r, t) {
1513
+ const n = this;
1514
+ return u;
1515
+ function u(o) {
1516
+ return e.enter("labelImage"), e.enter("labelImageMarker"), e.consume(o), e.exit("labelImageMarker"), c;
1517
+ }
1518
+ function c(o) {
1519
+ return o === 91 ? (e.enter("labelMarker"), e.consume(o), e.exit("labelMarker"), e.exit("labelImage"), i) : t(o);
1520
+ }
1521
+ function i(o) {
1522
+ return o === 94 && "_hiddenFootnoteSupport" in n.parser.constructs ? t(o) : r(o);
1523
+ }
1524
+ }
1525
+ const $n = {
1526
+ name: "labelStartLink",
1527
+ tokenize: Kn,
1528
+ resolveAll: _e.resolveAll
1529
+ };
1530
+ function Kn(e, r, t) {
1531
+ const n = this;
1532
+ return u;
1533
+ function u(i) {
1534
+ return e.enter("labelLink"), e.enter("labelMarker"), e.consume(i), e.exit("labelMarker"), e.exit("labelLink"), c;
1535
+ }
1536
+ function c(i) {
1537
+ return i === 94 && "_hiddenFootnoteSupport" in n.parser.constructs ? t(i) : r(i);
1538
+ }
1539
+ }
1540
+ const Ee = {
1541
+ name: "lineEnding",
1542
+ tokenize: Gn
1543
+ };
1544
+ function Gn(e, r) {
1545
+ return t;
1546
+ function t(n) {
1547
+ return e.enter("lineEnding"), e.consume(n), e.exit("lineEnding"), _(e, r, "linePrefix");
1548
+ }
1549
+ }
1550
+ const ke = {
1551
+ name: "thematicBreak",
1552
+ tokenize: Jn
1553
+ };
1554
+ function Jn(e, r, t) {
1555
+ let n = 0, u;
1556
+ return c;
1557
+ function c(a) {
1558
+ return e.enter("thematicBreak"), i(a);
1559
+ }
1560
+ function i(a) {
1561
+ return u = a, o(a);
1562
+ }
1563
+ function o(a) {
1564
+ return a === u ? (e.enter("thematicBreakSequence"), p(a)) : n >= 3 && (a === null || E(a)) ? (e.exit("thematicBreak"), r(a)) : t(a);
1565
+ }
1566
+ function p(a) {
1567
+ return a === u ? (e.consume(a), n++, p) : (e.exit("thematicBreakSequence"), T(a) ? _(e, o, "whitespace")(a) : o(a));
1568
+ }
1569
+ }
1570
+ const W = {
1571
+ name: "list",
1572
+ tokenize: Yn,
1573
+ continuation: {
1574
+ tokenize: er
1575
+ },
1576
+ exit: nr
1577
+ }, Xn = {
1578
+ tokenize: rr,
1579
+ partial: !0
1580
+ }, Zn = {
1581
+ tokenize: tr,
1582
+ partial: !0
1583
+ };
1584
+ function Yn(e, r, t) {
1585
+ const n = this, u = n.events[n.events.length - 1];
1586
+ let c = u && u[1].type === "linePrefix" ? u[2].sliceSerialize(u[1], !0).length : 0, i = 0;
1587
+ return o;
1588
+ function o(f) {
1589
+ const I = n.containerState.type || (f === 42 || f === 43 || f === 45 ? "listUnordered" : "listOrdered");
1590
+ if (I === "listUnordered" ? !n.containerState.marker || f === n.containerState.marker : Ie(f)) {
1591
+ if (n.containerState.type || (n.containerState.type = I, e.enter(I, {
1592
+ _container: !0
1593
+ })), I === "listUnordered")
1594
+ return e.enter("listItemPrefix"), f === 42 || f === 45 ? e.check(ke, t, a)(f) : a(f);
1595
+ if (!n.interrupt || f === 49)
1596
+ return e.enter("listItemPrefix"), e.enter("listItemValue"), p(f);
1597
+ }
1598
+ return t(f);
1599
+ }
1600
+ function p(f) {
1601
+ return Ie(f) && ++i < 10 ? (e.consume(f), p) : (!n.interrupt || i < 2) && (n.containerState.marker ? f === n.containerState.marker : f === 41 || f === 46) ? (e.exit("listItemValue"), a(f)) : t(f);
1602
+ }
1603
+ function a(f) {
1604
+ return e.enter("listItemMarker"), e.consume(f), e.exit("listItemMarker"), n.containerState.marker = n.containerState.marker || f, e.check(
1605
+ Fe,
1606
+ // Can’t be empty when interrupting.
1607
+ n.interrupt ? t : d,
1608
+ e.attempt(
1609
+ Xn,
1610
+ g,
1611
+ h
1612
+ )
1613
+ );
1614
+ }
1615
+ function d(f) {
1616
+ return n.containerState.initialBlankLine = !0, c++, g(f);
1617
+ }
1618
+ function h(f) {
1619
+ return T(f) ? (e.enter("listItemPrefixWhitespace"), e.consume(f), e.exit("listItemPrefixWhitespace"), g) : t(f);
1620
+ }
1621
+ function g(f) {
1622
+ return n.containerState.size = c + n.sliceSerialize(e.exit("listItemPrefix"), !0).length, r(f);
1623
+ }
1624
+ }
1625
+ function er(e, r, t) {
1626
+ const n = this;
1627
+ return n.containerState._closeFlow = void 0, e.check(Fe, u, c);
1628
+ function u(o) {
1629
+ return n.containerState.furtherBlankLines = n.containerState.furtherBlankLines || n.containerState.initialBlankLine, _(
1630
+ e,
1631
+ r,
1632
+ "listItemIndent",
1633
+ n.containerState.size + 1
1634
+ )(o);
1635
+ }
1636
+ function c(o) {
1637
+ return n.containerState.furtherBlankLines || !T(o) ? (n.containerState.furtherBlankLines = void 0, n.containerState.initialBlankLine = void 0, i(o)) : (n.containerState.furtherBlankLines = void 0, n.containerState.initialBlankLine = void 0, e.attempt(Zn, r, i)(o));
1638
+ }
1639
+ function i(o) {
1640
+ return n.containerState._closeFlow = !0, n.interrupt = void 0, _(
1641
+ e,
1642
+ e.attempt(W, r, t),
1643
+ "linePrefix",
1644
+ n.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
1645
+ )(o);
1646
+ }
1647
+ }
1648
+ function tr(e, r, t) {
1649
+ const n = this;
1650
+ return _(
1651
+ e,
1652
+ u,
1653
+ "listItemIndent",
1654
+ n.containerState.size + 1
1655
+ );
1656
+ function u(c) {
1657
+ const i = n.events[n.events.length - 1];
1658
+ return i && i[1].type === "listItemIndent" && i[2].sliceSerialize(i[1], !0).length === n.containerState.size ? r(c) : t(c);
1659
+ }
1660
+ }
1661
+ function nr(e) {
1662
+ e.exit(this.containerState.type);
1663
+ }
1664
+ function rr(e, r, t) {
1665
+ const n = this;
1666
+ return _(
1667
+ e,
1668
+ u,
1669
+ "listItemPrefixWhitespace",
1670
+ n.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5
1671
+ );
1672
+ function u(c) {
1673
+ const i = n.events[n.events.length - 1];
1674
+ return !T(c) && i && i[1].type === "listItemPrefixWhitespace" ? r(c) : t(c);
1675
+ }
1676
+ }
1677
+ const Je = {
1678
+ name: "setextUnderline",
1679
+ tokenize: ur,
1680
+ resolveTo: ir
1681
+ };
1682
+ function ir(e, r) {
1683
+ let t = e.length, n, u, c;
1684
+ for (; t--; )
1685
+ if (e[t][0] === "enter") {
1686
+ if (e[t][1].type === "content") {
1687
+ n = t;
1688
+ break;
1689
+ }
1690
+ e[t][1].type === "paragraph" && (u = t);
1691
+ } else
1692
+ e[t][1].type === "content" && e.splice(t, 1), !c && e[t][1].type === "definition" && (c = t);
1693
+ const i = {
1694
+ type: "setextHeading",
1695
+ start: Object.assign({}, e[u][1].start),
1696
+ end: Object.assign({}, e[e.length - 1][1].end)
1697
+ };
1698
+ return e[u][1].type = "setextHeadingText", c ? (e.splice(u, 0, ["enter", i, r]), e.splice(c + 1, 0, ["exit", e[n][1], r]), e[n][1].end = Object.assign({}, e[c][1].end)) : e[n][1] = i, e.push(["exit", i, r]), e;
1699
+ }
1700
+ function ur(e, r, t) {
1701
+ const n = this;
1702
+ let u;
1703
+ return c;
1704
+ function c(a) {
1705
+ let d = n.events.length, h;
1706
+ for (; d--; )
1707
+ if (n.events[d][1].type !== "lineEnding" && n.events[d][1].type !== "linePrefix" && n.events[d][1].type !== "content") {
1708
+ h = n.events[d][1].type === "paragraph";
1709
+ break;
1710
+ }
1711
+ return !n.parser.lazy[n.now().line] && (n.interrupt || h) ? (e.enter("setextHeadingLine"), u = a, i(a)) : t(a);
1712
+ }
1713
+ function i(a) {
1714
+ return e.enter("setextHeadingLineSequence"), o(a);
1715
+ }
1716
+ function o(a) {
1717
+ return a === u ? (e.consume(a), o) : (e.exit("setextHeadingLineSequence"), T(a) ? _(e, p, "lineSuffix")(a) : p(a));
1718
+ }
1719
+ function p(a) {
1720
+ return a === null || E(a) ? (e.exit("setextHeadingLine"), r(a)) : t(a);
1721
+ }
1722
+ }
1723
+ const cr = {
1724
+ tokenize: or
1725
+ };
1726
+ function or(e) {
1727
+ const r = this, t = e.attempt(
1728
+ // Try to parse a blank line.
1729
+ Fe,
1730
+ n,
1731
+ // Try to parse initial flow (essentially, only code).
1732
+ e.attempt(
1733
+ this.parser.constructs.flowInitial,
1734
+ u,
1735
+ _(
1736
+ e,
1737
+ e.attempt(
1738
+ this.parser.constructs.flow,
1739
+ u,
1740
+ e.attempt(dn, u)
1741
+ ),
1742
+ "linePrefix"
1743
+ )
1744
+ )
1745
+ );
1746
+ return t;
1747
+ function n(c) {
1748
+ if (c === null) {
1749
+ e.consume(c);
1750
+ return;
1751
+ }
1752
+ return e.enter("lineEndingBlank"), e.consume(c), e.exit("lineEndingBlank"), r.currentConstruct = void 0, t;
1753
+ }
1754
+ function u(c) {
1755
+ if (c === null) {
1756
+ e.consume(c);
1757
+ return;
1758
+ }
1759
+ return e.enter("lineEnding"), e.consume(c), e.exit("lineEnding"), r.currentConstruct = void 0, t;
1760
+ }
1761
+ }
1762
+ const sr = {
1763
+ resolveAll: at()
1764
+ }, lr = lt("string"), ar = lt("text");
1765
+ function lt(e) {
1766
+ return {
1767
+ tokenize: r,
1768
+ resolveAll: at(
1769
+ e === "text" ? fr : void 0
1770
+ )
1771
+ };
1772
+ function r(t) {
1773
+ const n = this, u = this.parser.constructs[e], c = t.attempt(u, i, o);
1774
+ return i;
1775
+ function i(d) {
1776
+ return a(d) ? c(d) : o(d);
1777
+ }
1778
+ function o(d) {
1779
+ if (d === null) {
1780
+ t.consume(d);
1781
+ return;
1782
+ }
1783
+ return t.enter("data"), t.consume(d), p;
1784
+ }
1785
+ function p(d) {
1786
+ return a(d) ? (t.exit("data"), c(d)) : (t.consume(d), p);
1787
+ }
1788
+ function a(d) {
1789
+ if (d === null)
1790
+ return !0;
1791
+ const h = u[d];
1792
+ let g = -1;
1793
+ if (h)
1794
+ for (; ++g < h.length; ) {
1795
+ const f = h[g];
1796
+ if (!f.previous || f.previous.call(n, n.previous))
1797
+ return !0;
1798
+ }
1799
+ return !1;
1800
+ }
1801
+ }
1802
+ }
1803
+ function at(e) {
1804
+ return r;
1805
+ function r(t, n) {
1806
+ let u = -1, c;
1807
+ for (; ++u <= t.length; )
1808
+ c === void 0 ? t[u] && t[u][1].type === "data" && (c = u, u++) : (!t[u] || t[u][1].type !== "data") && (u !== c + 2 && (t[c][1].end = t[u - 1][1].end, t.splice(c + 2, u - c - 2), u = c + 2), c = void 0);
1809
+ return e ? e(t, n) : t;
1810
+ }
1811
+ }
1812
+ function fr(e, r) {
1813
+ let t = 0;
1814
+ for (; ++t <= e.length; )
1815
+ if ((t === e.length || e[t][1].type === "lineEnding") && e[t - 1][1].type === "data") {
1816
+ const n = e[t - 1][1], u = r.sliceStream(n);
1817
+ let c = u.length, i = -1, o = 0, p;
1818
+ for (; c--; ) {
1819
+ const a = u[c];
1820
+ if (typeof a == "string") {
1821
+ for (i = a.length; a.charCodeAt(i - 1) === 32; )
1822
+ o++, i--;
1823
+ if (i)
1824
+ break;
1825
+ i = -1;
1826
+ } else if (a === -2)
1827
+ p = !0, o++;
1828
+ else if (a !== -1) {
1829
+ c++;
1830
+ break;
1831
+ }
1832
+ }
1833
+ if (o) {
1834
+ const a = {
1835
+ type: t === e.length || p || o < 2 ? "lineSuffix" : "hardBreakTrailing",
1836
+ start: {
1837
+ line: n.end.line,
1838
+ column: n.end.column - o,
1839
+ offset: n.end.offset - o,
1840
+ _index: n.start._index + c,
1841
+ _bufferIndex: c ? i : n.start._bufferIndex + i
1842
+ },
1843
+ end: Object.assign({}, n.end)
1844
+ };
1845
+ n.end = Object.assign({}, a.start), n.start.offset === n.end.offset ? Object.assign(n, a) : (e.splice(
1846
+ t,
1847
+ 0,
1848
+ ["enter", a, r],
1849
+ ["exit", a, r]
1850
+ ), t += 2);
1851
+ }
1852
+ t++;
1853
+ }
1854
+ return e;
1855
+ }
1856
+ function dr(e, r, t) {
1857
+ let n = Object.assign(
1858
+ t ? Object.assign({}, t) : {
1859
+ line: 1,
1860
+ column: 1,
1861
+ offset: 0
1862
+ },
1863
+ {
1864
+ _index: 0,
1865
+ _bufferIndex: -1
1866
+ }
1867
+ );
1868
+ const u = {}, c = [];
1869
+ let i = [], o = [];
1870
+ const p = {
1871
+ consume: j,
1872
+ enter: S,
1873
+ exit: B,
1874
+ attempt: w(P),
1875
+ check: w(x),
1876
+ interrupt: w(x, {
1877
+ interrupt: !0
1878
+ })
1879
+ }, a = {
1880
+ previous: null,
1881
+ code: null,
1882
+ containerState: {},
1883
+ events: [],
1884
+ parser: e,
1885
+ sliceStream: f,
1886
+ sliceSerialize: g,
1887
+ now: I,
1888
+ defineSkip: C,
1889
+ write: h
1890
+ };
1891
+ let d = r.tokenize.call(a, p);
1892
+ return r.resolveAll && c.push(r), a;
1893
+ function h(F) {
1894
+ return i = K(i, F), L(), i[i.length - 1] !== null ? [] : (R(r, 0), a.events = ze(c, a.events, a), a.events);
1895
+ }
1896
+ function g(F, v) {
1897
+ return hr(f(F), v);
1898
+ }
1899
+ function f(F) {
1900
+ return pr(i, F);
1901
+ }
1902
+ function I() {
1903
+ const { line: F, column: v, offset: M, _index: O, _bufferIndex: A } = n;
1904
+ return {
1905
+ line: F,
1906
+ column: v,
1907
+ offset: M,
1908
+ _index: O,
1909
+ _bufferIndex: A
1910
+ };
1911
+ }
1912
+ function C(F) {
1913
+ u[F.line] = F.column, V();
1914
+ }
1915
+ function L() {
1916
+ let F;
1917
+ for (; n._index < i.length; ) {
1918
+ const v = i[n._index];
1919
+ if (typeof v == "string")
1920
+ for (F = n._index, n._bufferIndex < 0 && (n._bufferIndex = 0); n._index === F && n._bufferIndex < v.length; )
1921
+ y(v.charCodeAt(n._bufferIndex));
1922
+ else
1923
+ y(v);
1924
+ }
1925
+ }
1926
+ function y(F) {
1927
+ d = d(F);
1928
+ }
1929
+ function j(F) {
1930
+ E(F) ? (n.line++, n.column = 1, n.offset += F === -3 ? 2 : 1, V()) : F !== -1 && (n.column++, n.offset++), n._bufferIndex < 0 ? n._index++ : (n._bufferIndex++, n._bufferIndex === i[n._index].length && (n._bufferIndex = -1, n._index++)), a.previous = F;
1931
+ }
1932
+ function S(F, v) {
1933
+ const M = v || {};
1934
+ return M.type = F, M.start = I(), a.events.push(["enter", M, a]), o.push(M), M;
1935
+ }
1936
+ function B(F) {
1937
+ const v = o.pop();
1938
+ return v.end = I(), a.events.push(["exit", v, a]), v;
1939
+ }
1940
+ function P(F, v) {
1941
+ R(F, v.from);
1942
+ }
1943
+ function x(F, v) {
1944
+ v.restore();
1945
+ }
1946
+ function w(F, v) {
1947
+ return M;
1948
+ function M(O, A, Q) {
1949
+ let N, G, ne, s;
1950
+ return Array.isArray(O) ? re(O) : "tokenize" in O ? (
1951
+ // @ts-expect-error Looks like a construct.
1952
+ re([O])
1953
+ ) : J(O);
1954
+ function J(U) {
1955
+ return fe;
1956
+ function fe(ce) {
1957
+ const de = ce !== null && U[ce], pe = ce !== null && U.null, ve = [
1958
+ // To do: add more extension tests.
1959
+ /* c8 ignore next 2 */
1960
+ ...Array.isArray(de) ? de : de ? [de] : [],
1961
+ ...Array.isArray(pe) ? pe : pe ? [pe] : []
1962
+ ];
1963
+ return re(ve)(ce);
1964
+ }
1965
+ }
1966
+ function re(U) {
1967
+ return N = U, G = 0, U.length === 0 ? Q : l(U[G]);
1968
+ }
1969
+ function l(U) {
1970
+ return fe;
1971
+ function fe(ce) {
1972
+ return s = q(), ne = U, U.partial || (a.currentConstruct = U), U.name && a.parser.constructs.disable.null.includes(U.name) ? ae() : U.tokenize.call(
1973
+ // If we do have fields, create an object w/ `context` as its
1974
+ // prototype.
1975
+ // This allows a “live binding”, which is needed for `interrupt`.
1976
+ v ? Object.assign(Object.create(a), v) : a,
1977
+ p,
1978
+ X,
1979
+ ae
1980
+ )(ce);
1981
+ }
1982
+ }
1983
+ function X(U) {
1984
+ return F(ne, s), A;
1985
+ }
1986
+ function ae(U) {
1987
+ return s.restore(), ++G < N.length ? l(N[G]) : Q;
1988
+ }
1989
+ }
1990
+ }
1991
+ function R(F, v) {
1992
+ F.resolveAll && !c.includes(F) && c.push(F), F.resolve && te(
1993
+ a.events,
1994
+ v,
1995
+ a.events.length - v,
1996
+ F.resolve(a.events.slice(v), a)
1997
+ ), F.resolveTo && (a.events = F.resolveTo(a.events, a));
1998
+ }
1999
+ function q() {
2000
+ const F = I(), v = a.previous, M = a.currentConstruct, O = a.events.length, A = Array.from(o);
2001
+ return {
2002
+ restore: Q,
2003
+ from: O
2004
+ };
2005
+ function Q() {
2006
+ n = F, a.previous = v, a.currentConstruct = M, a.events.length = O, o = A, V();
2007
+ }
2008
+ }
2009
+ function V() {
2010
+ n.line in u && n.column < 2 && (n.column = u[n.line], n.offset += u[n.line] - 1);
2011
+ }
2012
+ }
2013
+ function pr(e, r) {
2014
+ const t = r.start._index, n = r.start._bufferIndex, u = r.end._index, c = r.end._bufferIndex;
2015
+ let i;
2016
+ if (t === u)
2017
+ i = [e[t].slice(n, c)];
2018
+ else {
2019
+ if (i = e.slice(t, u), n > -1) {
2020
+ const o = i[0];
2021
+ typeof o == "string" ? i[0] = o.slice(n) : i.shift();
2022
+ }
2023
+ c > 0 && i.push(e[u].slice(0, c));
2024
+ }
2025
+ return i;
2026
+ }
2027
+ function hr(e, r) {
2028
+ let t = -1;
2029
+ const n = [];
2030
+ let u;
2031
+ for (; ++t < e.length; ) {
2032
+ const c = e[t];
2033
+ let i;
2034
+ if (typeof c == "string")
2035
+ i = c;
2036
+ else
2037
+ switch (c) {
2038
+ case -5: {
2039
+ i = "\r";
2040
+ break;
2041
+ }
2042
+ case -4: {
2043
+ i = `
2044
+ `;
2045
+ break;
2046
+ }
2047
+ case -3: {
2048
+ i = `\r
2049
+ `;
2050
+ break;
2051
+ }
2052
+ case -2: {
2053
+ i = r ? " " : " ";
2054
+ break;
2055
+ }
2056
+ case -1: {
2057
+ if (!r && u)
2058
+ continue;
2059
+ i = " ";
2060
+ break;
2061
+ }
2062
+ default:
2063
+ i = String.fromCharCode(c);
2064
+ }
2065
+ u = c === -2, n.push(i);
2066
+ }
2067
+ return n.join("");
2068
+ }
2069
+ const mr = {
2070
+ 42: W,
2071
+ 43: W,
2072
+ 45: W,
2073
+ 48: W,
2074
+ 49: W,
2075
+ 50: W,
2076
+ 51: W,
2077
+ 52: W,
2078
+ 53: W,
2079
+ 54: W,
2080
+ 55: W,
2081
+ 56: W,
2082
+ 57: W,
2083
+ 62: nt
2084
+ }, gr = {
2085
+ 91: xn
2086
+ }, xr = {
2087
+ [-2]: be,
2088
+ [-1]: be,
2089
+ 32: be
2090
+ }, kr = {
2091
+ 35: bn,
2092
+ 42: ke,
2093
+ 45: [Je, ke],
2094
+ 60: Tn,
2095
+ 61: Je,
2096
+ 95: ke,
2097
+ 96: Ke,
2098
+ 126: Ke
2099
+ }, yr = {
2100
+ 38: it,
2101
+ 92: rt
2102
+ }, Fr = {
2103
+ [-5]: Ee,
2104
+ [-4]: Ee,
2105
+ [-3]: Ee,
2106
+ 33: Qn,
2107
+ 38: it,
2108
+ 42: Te,
2109
+ 60: [$t, Mn],
2110
+ 91: $n,
2111
+ 92: [vn, rt],
2112
+ 93: _e,
2113
+ 95: Te,
2114
+ 96: on
2115
+ }, vr = {
2116
+ null: [Te, sr]
2117
+ }, Sr = {
2118
+ null: [42, 95]
2119
+ }, br = {
2120
+ null: []
2121
+ }, Er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2122
+ __proto__: null,
2123
+ attentionMarkers: Sr,
2124
+ contentInitial: gr,
2125
+ disable: br,
2126
+ document: mr,
2127
+ flow: kr,
2128
+ flowInitial: xr,
2129
+ insideSpan: vr,
2130
+ string: yr,
2131
+ text: Fr
2132
+ }, Symbol.toStringTag, { value: "Module" }));
2133
+ function Ar(e) {
2134
+ const r = (
2135
+ /** @type {FullNormalizedExtension} */
2136
+ Dt([Er, ...(e || {}).extensions || []])
2137
+ ), t = {
2138
+ defined: [],
2139
+ lazy: {},
2140
+ constructs: r,
2141
+ content: n(Rt),
2142
+ document: n(Vt),
2143
+ flow: n(cr),
2144
+ string: n(lr),
2145
+ text: n(ar)
2146
+ };
2147
+ return t;
2148
+ function n(u) {
2149
+ return c;
2150
+ function c(i) {
2151
+ return dr(t, u, i);
2152
+ }
2153
+ }
2154
+ }
2155
+ const Xe = /[\0\t\n\r]/g;
2156
+ function Ir() {
2157
+ let e = 1, r = "", t = !0, n;
2158
+ return u;
2159
+ function u(c, i, o) {
2160
+ const p = [];
2161
+ let a, d, h, g, f;
2162
+ for (c = r + c.toString(i), h = 0, r = "", t && (c.charCodeAt(0) === 65279 && h++, t = void 0); h < c.length; ) {
2163
+ if (Xe.lastIndex = h, a = Xe.exec(c), g = a && a.index !== void 0 ? a.index : c.length, f = c.charCodeAt(g), !a) {
2164
+ r = c.slice(h);
2165
+ break;
2166
+ }
2167
+ if (f === 10 && h === g && n)
2168
+ p.push(-3), n = void 0;
2169
+ else
2170
+ switch (n && (p.push(-5), n = void 0), h < g && (p.push(c.slice(h, g)), e += g - h), f) {
2171
+ case 0: {
2172
+ p.push(65533), e++;
2173
+ break;
2174
+ }
2175
+ case 9: {
2176
+ for (d = Math.ceil(e / 4) * 4, p.push(-2); e++ < d; )
2177
+ p.push(-1);
2178
+ break;
2179
+ }
2180
+ case 10: {
2181
+ p.push(-4), e = 1;
2182
+ break;
2183
+ }
2184
+ default:
2185
+ n = !0, e = 1;
2186
+ }
2187
+ h = g + 1;
2188
+ }
2189
+ return o && (n && p.push(-5), r && p.push(r), p.push(null)), p;
2190
+ }
2191
+ }
2192
+ function Tr(e) {
2193
+ for (; !ut(e); )
2194
+ ;
2195
+ return e;
2196
+ }
2197
+ function ft(e, r) {
2198
+ const t = Number.parseInt(e, r);
2199
+ return (
2200
+ // C0 except for HT, LF, FF, CR, space.
2201
+ t < 9 || t === 11 || t > 13 && t < 32 || // Control character (DEL) of C0, and C1 controls.
2202
+ t > 126 && t < 160 || // Lone high surrogates and low surrogates.
2203
+ t > 55295 && t < 57344 || // Noncharacters.
2204
+ t > 64975 && t < 65008 || (t & 65535) === 65535 || (t & 65535) === 65534 || // Out of range
2205
+ t > 1114111 ? "�" : String.fromCharCode(t)
2206
+ );
2207
+ }
2208
+ const Cr = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
2209
+ function wr(e) {
2210
+ return e.replace(Cr, zr);
2211
+ }
2212
+ function zr(e, r, t) {
2213
+ if (r)
2214
+ return r;
2215
+ if (t.charCodeAt(0) === 35) {
2216
+ const n = t.charCodeAt(1), u = n === 120 || n === 88;
2217
+ return ft(t.slice(u ? 2 : 1), u ? 16 : 10);
2218
+ }
2219
+ return De(t) || e;
2220
+ }
2221
+ function ye(e) {
2222
+ return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? Ze(e.position) : "start" in e || "end" in e ? Ze(e) : "line" in e || "column" in e ? Ce(e) : "";
2223
+ }
2224
+ function Ce(e) {
2225
+ return Ye(e && e.line) + ":" + Ye(e && e.column);
2226
+ }
2227
+ function Ze(e) {
2228
+ return Ce(e && e.start) + "-" + Ce(e && e.end);
2229
+ }
2230
+ function Ye(e) {
2231
+ return e && typeof e == "number" ? e : 1;
2232
+ }
2233
+ const dt = {}.hasOwnProperty, pt = (
2234
+ /**
2235
+ * @type {(
2236
+ * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &
2237
+ * ((value: Value, options?: Options | null | undefined) => Root)
2238
+ * )}
2239
+ */
2240
+ /**
2241
+ * @param {Value} value
2242
+ * @param {Encoding | Options | null | undefined} [encoding]
2243
+ * @param {Options | null | undefined} [options]
2244
+ * @returns {Root}
2245
+ */
2246
+ function(e, r, t) {
2247
+ return typeof r != "string" && (t = r, r = void 0), Dr(t)(
2248
+ Tr(
2249
+ Ar(t).document().write(Ir()(e, r, !0))
2250
+ )
2251
+ );
2252
+ }
2253
+ );
2254
+ function Dr(e) {
2255
+ const r = {
2256
+ transforms: [],
2257
+ canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
2258
+ enter: {
2259
+ autolink: o(He),
2260
+ autolinkProtocol: F,
2261
+ autolinkEmail: F,
2262
+ atxHeading: o(Le),
2263
+ blockQuote: o(ve),
2264
+ characterEscape: F,
2265
+ characterReference: F,
2266
+ codeFenced: o(Pe),
2267
+ codeFencedFenceInfo: p,
2268
+ codeFencedFenceMeta: p,
2269
+ codeIndented: o(Pe, p),
2270
+ codeText: o(gt, p),
2271
+ codeTextData: F,
2272
+ data: F,
2273
+ codeFlowValue: F,
2274
+ definition: o(xt),
2275
+ definitionDestinationString: p,
2276
+ definitionLabelString: p,
2277
+ definitionTitleString: p,
2278
+ emphasis: o(kt),
2279
+ hardBreakEscape: o(je),
2280
+ hardBreakTrailing: o(je),
2281
+ htmlFlow: o(Oe, p),
2282
+ htmlFlowData: F,
2283
+ htmlText: o(Oe, p),
2284
+ htmlTextData: F,
2285
+ image: o(yt),
2286
+ label: p,
2287
+ link: o(He),
2288
+ listItem: o(Ft),
2289
+ listItemValue: I,
2290
+ listOrdered: o(Re, f),
2291
+ listUnordered: o(Re),
2292
+ paragraph: o(vt),
2293
+ reference: ae,
2294
+ referenceString: p,
2295
+ resourceDestinationString: p,
2296
+ resourceTitleString: p,
2297
+ setextHeading: o(Le),
2298
+ strong: o(St),
2299
+ thematicBreak: o(Et)
2300
+ },
2301
+ exit: {
2302
+ atxHeading: d(),
2303
+ atxHeadingSequence: w,
2304
+ autolink: d(),
2305
+ autolinkEmail: pe,
2306
+ autolinkProtocol: de,
2307
+ blockQuote: d(),
2308
+ characterEscapeValue: v,
2309
+ characterReferenceMarkerHexadecimal: fe,
2310
+ characterReferenceMarkerNumeric: fe,
2311
+ characterReferenceValue: ce,
2312
+ codeFenced: d(j),
2313
+ codeFencedFence: y,
2314
+ codeFencedFenceInfo: C,
2315
+ codeFencedFenceMeta: L,
2316
+ codeFlowValue: v,
2317
+ codeIndented: d(S),
2318
+ codeText: d(N),
2319
+ codeTextData: v,
2320
+ data: v,
2321
+ definition: d(),
2322
+ definitionDestinationString: x,
2323
+ definitionLabelString: B,
2324
+ definitionTitleString: P,
2325
+ emphasis: d(),
2326
+ hardBreakEscape: d(O),
2327
+ hardBreakTrailing: d(O),
2328
+ htmlFlow: d(A),
2329
+ htmlFlowData: v,
2330
+ htmlText: d(Q),
2331
+ htmlTextData: v,
2332
+ image: d(ne),
2333
+ label: J,
2334
+ labelText: s,
2335
+ lineEnding: M,
2336
+ link: d(G),
2337
+ listItem: d(),
2338
+ listOrdered: d(),
2339
+ listUnordered: d(),
2340
+ paragraph: d(),
2341
+ referenceString: U,
2342
+ resourceDestinationString: re,
2343
+ resourceTitleString: l,
2344
+ resource: X,
2345
+ setextHeading: d(V),
2346
+ setextHeadingLineSequence: q,
2347
+ setextHeadingText: R,
2348
+ strong: d(),
2349
+ thematicBreak: d()
2350
+ }
2351
+ };
2352
+ ht(r, (e || {}).mdastExtensions || []);
2353
+ const t = {};
2354
+ return n;
2355
+ function n(m) {
2356
+ let k = {
2357
+ type: "root",
2358
+ children: []
2359
+ };
2360
+ const b = {
2361
+ stack: [k],
2362
+ tokenStack: [],
2363
+ config: r,
2364
+ enter: a,
2365
+ exit: h,
2366
+ buffer: p,
2367
+ resume: g,
2368
+ setData: c,
2369
+ getData: i
2370
+ }, z = [];
2371
+ let D = -1;
2372
+ for (; ++D < m.length; )
2373
+ if (m[D][1].type === "listOrdered" || m[D][1].type === "listUnordered")
2374
+ if (m[D][0] === "enter")
2375
+ z.push(D);
2376
+ else {
2377
+ const Y = z.pop();
2378
+ D = u(m, Y, D);
2379
+ }
2380
+ for (D = -1; ++D < m.length; ) {
2381
+ const Y = r[m[D][0]];
2382
+ dt.call(Y, m[D][1].type) && Y[m[D][1].type].call(
2383
+ Object.assign(
2384
+ {
2385
+ sliceSerialize: m[D][2].sliceSerialize
2386
+ },
2387
+ b
2388
+ ),
2389
+ m[D][1]
2390
+ );
2391
+ }
2392
+ if (b.tokenStack.length > 0) {
2393
+ const Y = b.tokenStack[b.tokenStack.length - 1];
2394
+ (Y[1] || et).call(b, void 0, Y[0]);
2395
+ }
2396
+ for (k.position = {
2397
+ start: oe(
2398
+ m.length > 0 ? m[0][1].start : {
2399
+ line: 1,
2400
+ column: 1,
2401
+ offset: 0
2402
+ }
2403
+ ),
2404
+ end: oe(
2405
+ m.length > 0 ? m[m.length - 2][1].end : {
2406
+ line: 1,
2407
+ column: 1,
2408
+ offset: 0
2409
+ }
2410
+ )
2411
+ }, D = -1; ++D < r.transforms.length; )
2412
+ k = r.transforms[D](k) || k;
2413
+ return k;
2414
+ }
2415
+ function u(m, k, b) {
2416
+ let z = k - 1, D = -1, Y = !1, le, ie, me, ge;
2417
+ for (; ++z <= b; ) {
2418
+ const H = m[z];
2419
+ if (H[1].type === "listUnordered" || H[1].type === "listOrdered" || H[1].type === "blockQuote" ? (H[0] === "enter" ? D++ : D--, ge = void 0) : H[1].type === "lineEndingBlank" ? H[0] === "enter" && (le && !ge && !D && !me && (me = z), ge = void 0) : H[1].type === "linePrefix" || H[1].type === "listItemValue" || H[1].type === "listItemMarker" || H[1].type === "listItemPrefix" || H[1].type === "listItemPrefixWhitespace" || (ge = void 0), !D && H[0] === "enter" && H[1].type === "listItemPrefix" || D === -1 && H[0] === "exit" && (H[1].type === "listUnordered" || H[1].type === "listOrdered")) {
2420
+ if (le) {
2421
+ let Se = z;
2422
+ for (ie = void 0; Se--; ) {
2423
+ const ue = m[Se];
2424
+ if (ue[1].type === "lineEnding" || ue[1].type === "lineEndingBlank") {
2425
+ if (ue[0] === "exit")
2426
+ continue;
2427
+ ie && (m[ie][1].type = "lineEndingBlank", Y = !0), ue[1].type = "lineEnding", ie = Se;
2428
+ } else if (!(ue[1].type === "linePrefix" || ue[1].type === "blockQuotePrefix" || ue[1].type === "blockQuotePrefixWhitespace" || ue[1].type === "blockQuoteMarker" || ue[1].type === "listItemIndent"))
2429
+ break;
2430
+ }
2431
+ me && (!ie || me < ie) && (le._spread = !0), le.end = Object.assign(
2432
+ {},
2433
+ ie ? m[ie][1].start : H[1].end
2434
+ ), m.splice(ie || z, 0, ["exit", le, H[2]]), z++, b++;
2435
+ }
2436
+ H[1].type === "listItemPrefix" && (le = {
2437
+ type: "listItem",
2438
+ _spread: !1,
2439
+ start: Object.assign({}, H[1].start),
2440
+ // @ts-expect-error: we’ll add `end` in a second.
2441
+ end: void 0
2442
+ }, m.splice(z, 0, ["enter", le, H[2]]), z++, b++, me = void 0, ge = !0);
2443
+ }
2444
+ }
2445
+ return m[k][1]._spread = Y, b;
2446
+ }
2447
+ function c(m, k) {
2448
+ t[m] = k;
2449
+ }
2450
+ function i(m) {
2451
+ return t[m];
2452
+ }
2453
+ function o(m, k) {
2454
+ return b;
2455
+ function b(z) {
2456
+ a.call(this, m(z), z), k && k.call(this, z);
2457
+ }
2458
+ }
2459
+ function p() {
2460
+ this.stack.push({
2461
+ type: "fragment",
2462
+ children: []
2463
+ });
2464
+ }
2465
+ function a(m, k, b) {
2466
+ return this.stack[this.stack.length - 1].children.push(m), this.stack.push(m), this.tokenStack.push([k, b]), m.position = {
2467
+ start: oe(k.start)
2468
+ }, m;
2469
+ }
2470
+ function d(m) {
2471
+ return k;
2472
+ function k(b) {
2473
+ m && m.call(this, b), h.call(this, b);
2474
+ }
2475
+ }
2476
+ function h(m, k) {
2477
+ const b = this.stack.pop(), z = this.tokenStack.pop();
2478
+ if (z)
2479
+ z[0].type !== m.type && (k ? k.call(this, m, z[0]) : (z[1] || et).call(this, m, z[0]));
2480
+ else
2481
+ throw new Error(
2482
+ "Cannot close `" + m.type + "` (" + ye({
2483
+ start: m.start,
2484
+ end: m.end
2485
+ }) + "): it’s not open"
2486
+ );
2487
+ return b.position.end = oe(m.end), b;
2488
+ }
2489
+ function g() {
2490
+ return wt(this.stack.pop());
2491
+ }
2492
+ function f() {
2493
+ c("expectingFirstListItemValue", !0);
2494
+ }
2495
+ function I(m) {
2496
+ if (i("expectingFirstListItemValue")) {
2497
+ const k = this.stack[this.stack.length - 2];
2498
+ k.start = Number.parseInt(this.sliceSerialize(m), 10), c("expectingFirstListItemValue");
2499
+ }
2500
+ }
2501
+ function C() {
2502
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2503
+ k.lang = m;
2504
+ }
2505
+ function L() {
2506
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2507
+ k.meta = m;
2508
+ }
2509
+ function y() {
2510
+ i("flowCodeInside") || (this.buffer(), c("flowCodeInside", !0));
2511
+ }
2512
+ function j() {
2513
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2514
+ k.value = m.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), c("flowCodeInside");
2515
+ }
2516
+ function S() {
2517
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2518
+ k.value = m.replace(/(\r?\n|\r)$/g, "");
2519
+ }
2520
+ function B(m) {
2521
+ const k = this.resume(), b = this.stack[this.stack.length - 1];
2522
+ b.label = k, b.identifier = he(
2523
+ this.sliceSerialize(m)
2524
+ ).toLowerCase();
2525
+ }
2526
+ function P() {
2527
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2528
+ k.title = m;
2529
+ }
2530
+ function x() {
2531
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2532
+ k.url = m;
2533
+ }
2534
+ function w(m) {
2535
+ const k = this.stack[this.stack.length - 1];
2536
+ if (!k.depth) {
2537
+ const b = this.sliceSerialize(m).length;
2538
+ k.depth = b;
2539
+ }
2540
+ }
2541
+ function R() {
2542
+ c("setextHeadingSlurpLineEnding", !0);
2543
+ }
2544
+ function q(m) {
2545
+ const k = this.stack[this.stack.length - 1];
2546
+ k.depth = this.sliceSerialize(m).charCodeAt(0) === 61 ? 1 : 2;
2547
+ }
2548
+ function V() {
2549
+ c("setextHeadingSlurpLineEnding");
2550
+ }
2551
+ function F(m) {
2552
+ const k = this.stack[this.stack.length - 1];
2553
+ let b = k.children[k.children.length - 1];
2554
+ (!b || b.type !== "text") && (b = bt(), b.position = {
2555
+ start: oe(m.start)
2556
+ }, k.children.push(b)), this.stack.push(b);
2557
+ }
2558
+ function v(m) {
2559
+ const k = this.stack.pop();
2560
+ k.value += this.sliceSerialize(m), k.position.end = oe(m.end);
2561
+ }
2562
+ function M(m) {
2563
+ const k = this.stack[this.stack.length - 1];
2564
+ if (i("atHardBreak")) {
2565
+ const b = k.children[k.children.length - 1];
2566
+ b.position.end = oe(m.end), c("atHardBreak");
2567
+ return;
2568
+ }
2569
+ !i("setextHeadingSlurpLineEnding") && r.canContainEols.includes(k.type) && (F.call(this, m), v.call(this, m));
2570
+ }
2571
+ function O() {
2572
+ c("atHardBreak", !0);
2573
+ }
2574
+ function A() {
2575
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2576
+ k.value = m;
2577
+ }
2578
+ function Q() {
2579
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2580
+ k.value = m;
2581
+ }
2582
+ function N() {
2583
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2584
+ k.value = m;
2585
+ }
2586
+ function G() {
2587
+ const m = this.stack[this.stack.length - 1];
2588
+ if (i("inReference")) {
2589
+ const k = i("referenceType") || "shortcut";
2590
+ m.type += "Reference", m.referenceType = k, delete m.url, delete m.title;
2591
+ } else
2592
+ delete m.identifier, delete m.label;
2593
+ c("referenceType");
2594
+ }
2595
+ function ne() {
2596
+ const m = this.stack[this.stack.length - 1];
2597
+ if (i("inReference")) {
2598
+ const k = i("referenceType") || "shortcut";
2599
+ m.type += "Reference", m.referenceType = k, delete m.url, delete m.title;
2600
+ } else
2601
+ delete m.identifier, delete m.label;
2602
+ c("referenceType");
2603
+ }
2604
+ function s(m) {
2605
+ const k = this.sliceSerialize(m), b = this.stack[this.stack.length - 2];
2606
+ b.label = wr(k), b.identifier = he(k).toLowerCase();
2607
+ }
2608
+ function J() {
2609
+ const m = this.stack[this.stack.length - 1], k = this.resume(), b = this.stack[this.stack.length - 1];
2610
+ if (c("inReference", !0), b.type === "link") {
2611
+ const z = m.children;
2612
+ b.children = z;
2613
+ } else
2614
+ b.alt = k;
2615
+ }
2616
+ function re() {
2617
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2618
+ k.url = m;
2619
+ }
2620
+ function l() {
2621
+ const m = this.resume(), k = this.stack[this.stack.length - 1];
2622
+ k.title = m;
2623
+ }
2624
+ function X() {
2625
+ c("inReference");
2626
+ }
2627
+ function ae() {
2628
+ c("referenceType", "collapsed");
2629
+ }
2630
+ function U(m) {
2631
+ const k = this.resume(), b = this.stack[this.stack.length - 1];
2632
+ b.label = k, b.identifier = he(
2633
+ this.sliceSerialize(m)
2634
+ ).toLowerCase(), c("referenceType", "full");
2635
+ }
2636
+ function fe(m) {
2637
+ c("characterReferenceType", m.type);
2638
+ }
2639
+ function ce(m) {
2640
+ const k = this.sliceSerialize(m), b = i("characterReferenceType");
2641
+ let z;
2642
+ b ? (z = ft(
2643
+ k,
2644
+ b === "characterReferenceMarkerNumeric" ? 10 : 16
2645
+ ), c("characterReferenceType")) : z = De(k);
2646
+ const D = this.stack.pop();
2647
+ D.value += z, D.position.end = oe(m.end);
2648
+ }
2649
+ function de(m) {
2650
+ v.call(this, m);
2651
+ const k = this.stack[this.stack.length - 1];
2652
+ k.url = this.sliceSerialize(m);
2653
+ }
2654
+ function pe(m) {
2655
+ v.call(this, m);
2656
+ const k = this.stack[this.stack.length - 1];
2657
+ k.url = "mailto:" + this.sliceSerialize(m);
2658
+ }
2659
+ function ve() {
2660
+ return {
2661
+ type: "blockquote",
2662
+ children: []
2663
+ };
2664
+ }
2665
+ function Pe() {
2666
+ return {
2667
+ type: "code",
2668
+ lang: null,
2669
+ meta: null,
2670
+ value: ""
2671
+ };
2672
+ }
2673
+ function gt() {
2674
+ return {
2675
+ type: "inlineCode",
2676
+ value: ""
2677
+ };
2678
+ }
2679
+ function xt() {
2680
+ return {
2681
+ type: "definition",
2682
+ identifier: "",
2683
+ label: null,
2684
+ title: null,
2685
+ url: ""
2686
+ };
2687
+ }
2688
+ function kt() {
2689
+ return {
2690
+ type: "emphasis",
2691
+ children: []
2692
+ };
2693
+ }
2694
+ function Le() {
2695
+ return {
2696
+ type: "heading",
2697
+ depth: void 0,
2698
+ children: []
2699
+ };
2700
+ }
2701
+ function je() {
2702
+ return {
2703
+ type: "break"
2704
+ };
2705
+ }
2706
+ function Oe() {
2707
+ return {
2708
+ type: "html",
2709
+ value: ""
2710
+ };
2711
+ }
2712
+ function yt() {
2713
+ return {
2714
+ type: "image",
2715
+ title: null,
2716
+ url: "",
2717
+ alt: null
2718
+ };
2719
+ }
2720
+ function He() {
2721
+ return {
2722
+ type: "link",
2723
+ title: null,
2724
+ url: "",
2725
+ children: []
2726
+ };
2727
+ }
2728
+ function Re(m) {
2729
+ return {
2730
+ type: "list",
2731
+ ordered: m.type === "listOrdered",
2732
+ start: null,
2733
+ spread: m._spread,
2734
+ children: []
2735
+ };
2736
+ }
2737
+ function Ft(m) {
2738
+ return {
2739
+ type: "listItem",
2740
+ spread: m._spread,
2741
+ checked: null,
2742
+ children: []
2743
+ };
2744
+ }
2745
+ function vt() {
2746
+ return {
2747
+ type: "paragraph",
2748
+ children: []
2749
+ };
2750
+ }
2751
+ function St() {
2752
+ return {
2753
+ type: "strong",
2754
+ children: []
2755
+ };
2756
+ }
2757
+ function bt() {
2758
+ return {
2759
+ type: "text",
2760
+ value: ""
2761
+ };
2762
+ }
2763
+ function Et() {
2764
+ return {
2765
+ type: "thematicBreak"
2766
+ };
2767
+ }
2768
+ }
2769
+ function oe(e) {
2770
+ return {
2771
+ line: e.line,
2772
+ column: e.column,
2773
+ offset: e.offset
2774
+ };
2775
+ }
2776
+ function ht(e, r) {
2777
+ let t = -1;
2778
+ for (; ++t < r.length; ) {
2779
+ const n = r[t];
2780
+ Array.isArray(n) ? ht(e, n) : _r(e, n);
2781
+ }
2782
+ }
2783
+ function _r(e, r) {
2784
+ let t;
2785
+ for (t in r)
2786
+ if (dt.call(r, t)) {
2787
+ if (t === "canContainEols") {
2788
+ const n = r[t];
2789
+ n && e[t].push(...n);
2790
+ } else if (t === "transforms") {
2791
+ const n = r[t];
2792
+ n && e[t].push(...n);
2793
+ } else if (t === "enter" || t === "exit") {
2794
+ const n = r[t];
2795
+ n && Object.assign(e[t], n);
2796
+ }
2797
+ }
2798
+ }
2799
+ function et(e, r) {
2800
+ throw e ? new Error(
2801
+ "Cannot close `" + e.type + "` (" + ye({
2802
+ start: e.start,
2803
+ end: e.end
2804
+ }) + "): a different token (`" + r.type + "`, " + ye({
2805
+ start: r.start,
2806
+ end: r.end
2807
+ }) + ") is open"
2808
+ ) : new Error(
2809
+ "Cannot close document, a token (`" + r.type + "`, " + ye({
2810
+ start: r.start,
2811
+ end: r.end
2812
+ }) + ") is still open"
2813
+ );
2814
+ }
2815
+ function Br(e) {
2816
+ const r = e.replace(/\n{2,}/g, `
2817
+ `);
2818
+ return Tt(r);
2819
+ }
2820
+ function Mr(e) {
2821
+ const r = Br(e), { children: t } = pt(r), n = [[]];
2822
+ let u = 0;
2823
+ function c(i, o = "normal") {
2824
+ i.type === "text" ? i.value.split(`
2825
+ `).forEach((p, a) => {
2826
+ a !== 0 && (u++, n.push([])), p.split(" ").forEach((d) => {
2827
+ d && n[u].push({ content: d, type: o });
2828
+ });
2829
+ }) : (i.type === "strong" || i.type === "emphasis") && i.children.forEach((p) => {
2830
+ c(p, i.type);
2831
+ });
2832
+ }
2833
+ return t.forEach((i) => {
2834
+ i.type === "paragraph" && i.children.forEach((o) => {
2835
+ c(o);
2836
+ });
2837
+ }), n;
2838
+ }
2839
+ function Pr(e) {
2840
+ const { children: r } = pt(e);
2841
+ function t(n) {
2842
+ return n.type === "text" ? n.value.replace(/\n/g, "<br/>") : n.type === "strong" ? `<strong>${n.children.map(t).join("")}</strong>` : n.type === "emphasis" ? `<em>${n.children.map(t).join("")}</em>` : n.type === "paragraph" ? `<p>${n.children.map(t).join("")}</p>` : `Unsupported markdown: ${n.type}`;
2843
+ }
2844
+ return r.map(t).join("");
2845
+ }
2846
+ function Lr(e) {
2847
+ return Intl.Segmenter ? [...new Intl.Segmenter().segment(e)].map((r) => r.segment) : [...e];
2848
+ }
2849
+ function jr(e, r) {
2850
+ const t = Lr(r.content);
2851
+ return mt(e, [], t, r.type);
2852
+ }
2853
+ function mt(e, r, t, n) {
2854
+ if (t.length === 0)
2855
+ return [
2856
+ { content: r.join(""), type: n },
2857
+ { content: "", type: n }
2858
+ ];
2859
+ const [u, ...c] = t, i = [...r, u];
2860
+ return e([{ content: i.join(""), type: n }]) ? mt(e, i, c, n) : (r.length === 0 && u && (r.push(u), t.shift()), [
2861
+ { content: r.join(""), type: n },
2862
+ { content: t.join(""), type: n }
2863
+ ]);
2864
+ }
2865
+ function Or(e, r) {
2866
+ if (e.some(({ content: t }) => t.includes(`
2867
+ `)))
2868
+ throw new Error("splitLineToFitWidth does not support newlines in the line");
2869
+ return we(e, r);
2870
+ }
2871
+ function we(e, r, t = [], n = []) {
2872
+ if (e.length === 0)
2873
+ return n.length > 0 && t.push(n), t.length > 0 ? t : [];
2874
+ let u = "";
2875
+ e[0].content === " " && (u = " ", e.shift());
2876
+ const c = e.shift() ?? { content: " ", type: "normal" }, i = [...n];
2877
+ if (u !== "" && i.push({ content: u, type: "normal" }), i.push(c), r(i))
2878
+ return we(e, r, t, i);
2879
+ if (n.length > 0)
2880
+ t.push(n), e.unshift(c);
2881
+ else if (c.content) {
2882
+ const [o, p] = jr(r, c);
2883
+ t.push([o]), p.content && e.unshift(p);
2884
+ }
2885
+ return we(e, r, t);
2886
+ }
2887
+ function Hr(e, r) {
2888
+ r && e.attr("style", r);
2889
+ }
2890
+ function Rr(e, r, t, n, u = !1) {
2891
+ const c = e.append("foreignObject"), i = c.append("xhtml:div"), o = r.label, p = r.isNode ? "nodeLabel" : "edgeLabel";
2892
+ i.html(
2893
+ `
2894
+ <span class="${p} ${n}" ` + (r.labelStyle ? 'style="' + r.labelStyle + '"' : "") + ">" + o + "</span>"
2895
+ ), Hr(i, r.labelStyle), i.style("display", "table-cell"), i.style("white-space", "nowrap"), i.style("max-width", t + "px"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), u && i.attr("class", "labelBkg");
2896
+ let a = i.node().getBoundingClientRect();
2897
+ return a.width === t && (i.style("display", "table"), i.style("white-space", "break-spaces"), i.style("width", t + "px"), a = i.node().getBoundingClientRect()), c.style("width", a.width), c.style("height", a.height), c.node();
2898
+ }
2899
+ function Be(e, r, t) {
2900
+ return e.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", r * t - 0.1 + "em").attr("dy", t + "em");
2901
+ }
2902
+ function qr(e, r, t) {
2903
+ const n = e.append("text"), u = Be(n, 1, r);
2904
+ Me(u, t);
2905
+ const c = u.node().getComputedTextLength();
2906
+ return n.remove(), c;
2907
+ }
2908
+ function Ur(e, r, t) {
2909
+ var n;
2910
+ const u = e.append("text"), c = Be(u, 1, r);
2911
+ Me(c, [{ content: t, type: "normal" }]);
2912
+ const i = (n = c.node()) == null ? void 0 : n.getBoundingClientRect();
2913
+ return i && u.remove(), i;
2914
+ }
2915
+ function Vr(e, r, t, n = !1) {
2916
+ const u = r.append("g"), c = u.insert("rect").attr("class", "background"), i = u.append("text").attr("y", "-10.1");
2917
+ let o = 0;
2918
+ for (const p of t) {
2919
+ const a = (h) => qr(u, 1.1, h) <= e, d = a(p) ? [p] : Or(p, a);
2920
+ for (const h of d) {
2921
+ const g = Be(i, o, 1.1);
2922
+ Me(g, h), o++;
2923
+ }
2924
+ }
2925
+ if (n) {
2926
+ const p = i.node().getBBox(), a = 2;
2927
+ return c.attr("x", -a).attr("y", -a).attr("width", p.width + 2 * a).attr("height", p.height + 2 * a), u.node();
2928
+ } else
2929
+ return i.node();
2930
+ }
2931
+ function Me(e, r) {
2932
+ e.text(""), r.forEach((t, n) => {
2933
+ const u = e.append("tspan").attr("font-style", t.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", t.type === "strong" ? "bold" : "normal");
2934
+ n === 0 ? u.text(t.content) : u.text(" " + t.content);
2935
+ });
2936
+ }
2937
+ const Qr = (e, r = "", {
2938
+ style: t = "",
2939
+ isTitle: n = !1,
2940
+ classes: u = "",
2941
+ useHtmlLabels: c = !0,
2942
+ isNode: i = !0,
2943
+ width: o = 200,
2944
+ addSvgBackground: p = !1
2945
+ } = {}) => {
2946
+ if (At.info("createText", r, t, n, u, c, i, p), c) {
2947
+ const a = Pr(r), d = {
2948
+ isNode: i,
2949
+ label: It(a).replace(
2950
+ /fa[blrs]?:fa-[\w-]+/g,
2951
+ (h) => `<i class='${h.replace(":", " ")}'></i>`
2952
+ ),
2953
+ labelStyle: t.replace("fill:", "color:")
2954
+ };
2955
+ return Rr(e, d, o, u, p);
2956
+ } else {
2957
+ const a = Mr(r);
2958
+ return Vr(o, e, a, p);
2959
+ }
2960
+ };
2961
+ export {
2962
+ Ur as Q,
2963
+ Qr as U
2964
+ };