@digipair/skill-web-chatbot 0.3.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 (100) hide show
  1. package/SAP-icons.cjs.js +2489 -0
  2. package/SAP-icons.cjs2.js +2489 -0
  3. package/SAP-icons.esm.js +2482 -0
  4. package/SAP-icons.esm2.js +2482 -0
  5. package/arc-da8fd8d8.cjs.js +88 -0
  6. package/arc-da8fd8d8.esm.js +86 -0
  7. package/array-2ff2c7a6.cjs.js +7 -0
  8. package/array-2ff2c7a6.esm.js +5 -0
  9. package/c4Diagram-1bdb45a8.cjs.js +4613 -0
  10. package/c4Diagram-1bdb45a8.esm.js +4611 -0
  11. package/classDiagram-185c1a10.cjs.js +96 -0
  12. package/classDiagram-185c1a10.esm.js +94 -0
  13. package/classDiagram-v2-6dc3b9c3.cjs.js +403 -0
  14. package/classDiagram-v2-6dc3b9c3.esm.js +401 -0
  15. package/constant-2fe7eae5.cjs.js +58 -0
  16. package/constant-2fe7eae5.esm.js +55 -0
  17. package/createText-94e3ebbf.cjs.js +2775 -0
  18. package/createText-94e3ebbf.esm.js +2773 -0
  19. package/debug.html +18 -0
  20. package/edges-558884ee.cjs.js +1450 -0
  21. package/edges-558884ee.esm.js +1436 -0
  22. package/erDiagram-97139f44.cjs.js +1949 -0
  23. package/erDiagram-97139f44.esm.js +1947 -0
  24. package/flowDb-a4faf166.cjs.js +6918 -0
  25. package/flowDb-a4faf166.esm.js +6914 -0
  26. package/flowDiagram-ccbbb58d.cjs.js +999 -0
  27. package/flowDiagram-ccbbb58d.esm.js +997 -0
  28. package/flowDiagram-v2-79ccd6da.cjs.js +29 -0
  29. package/flowDiagram-v2-79ccd6da.esm.js +27 -0
  30. package/flowchart-elk-definition-7863a61f.cjs.js +48577 -0
  31. package/flowchart-elk-definition-7863a61f.esm.js +48575 -0
  32. package/ganttDiagram-3eff0dd8.cjs.js +3855 -0
  33. package/ganttDiagram-3eff0dd8.esm.js +3853 -0
  34. package/gitGraphDiagram-c3fe571f.cjs.js +3863 -0
  35. package/gitGraphDiagram-c3fe571f.esm.js +3861 -0
  36. package/index-d0b453e2.cjs.js +609 -0
  37. package/index-d0b453e2.esm.js +607 -0
  38. package/index.cjs.d.ts +1 -0
  39. package/index.cjs.js +17 -0
  40. package/index.cjs2.js +43619 -0
  41. package/index.d.ts +1 -0
  42. package/index.esm.js +1 -0
  43. package/index.esm2.js +43493 -0
  44. package/infoDiagram-9c10eab1.cjs.js +467 -0
  45. package/infoDiagram-9c10eab1.esm.js +465 -0
  46. package/init-f9637058.cjs.js +17 -0
  47. package/init-f9637058.esm.js +15 -0
  48. package/journeyDiagram-b6904cec.cjs.js +1292 -0
  49. package/journeyDiagram-b6904cec.esm.js +1290 -0
  50. package/layout-c5a37d74.cjs.js +2808 -0
  51. package/layout-c5a37d74.esm.js +2795 -0
  52. package/libs/engine/src/index.d.ts +2 -0
  53. package/libs/engine/src/lib/engine.d.ts +27 -0
  54. package/libs/engine/src/lib/pins-settings.interface.d.ts +20 -0
  55. package/libs/skill-web-chatbot/src/index.d.ts +3 -0
  56. package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +23 -0
  57. package/libs/skill-web-chatbot/src/lib/common.data.d.ts +1 -0
  58. package/libs/skill-web-chatbot/src/lib/config.d.ts +9 -0
  59. package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +1 -0
  60. package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +32 -0
  61. package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +1 -0
  62. package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +39 -0
  63. package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +9 -0
  64. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +5 -0
  65. package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +1 -0
  66. package/line-ce5d1152.cjs.js +34 -0
  67. package/line-ce5d1152.esm.js +32 -0
  68. package/linear-db016d0c.cjs.js +485 -0
  69. package/linear-db016d0c.esm.js +479 -0
  70. package/mindmap-definition-a9d0f378.cjs.js +20225 -0
  71. package/mindmap-definition-a9d0f378.esm.js +20223 -0
  72. package/ordinal-5695958c.cjs.js +331 -0
  73. package/ordinal-5695958c.esm.js +329 -0
  74. package/package.json +8 -0
  75. package/pieDiagram-fd367f1f.cjs.js +1157 -0
  76. package/pieDiagram-fd367f1f.esm.js +1155 -0
  77. package/quadrantDiagram-1763608a.cjs.js +2633 -0
  78. package/quadrantDiagram-1763608a.esm.js +2631 -0
  79. package/requirementDiagram-779d93b3.cjs.js +2451 -0
  80. package/requirementDiagram-779d93b3.esm.js +2449 -0
  81. package/sankeyDiagram-86a66bae.cjs.js +1850 -0
  82. package/sankeyDiagram-86a66bae.esm.js +1848 -0
  83. package/sequenceDiagram-169f11ec.cjs.js +4805 -0
  84. package/sequenceDiagram-169f11ec.esm.js +4803 -0
  85. package/stateDiagram-6f4bb19d.cjs.js +282 -0
  86. package/stateDiagram-6f4bb19d.esm.js +280 -0
  87. package/stateDiagram-v2-d72c79bd.cjs.js +377 -0
  88. package/stateDiagram-v2-d72c79bd.esm.js +375 -0
  89. package/styles-3814544c.cjs.js +534 -0
  90. package/styles-3814544c.esm.js +524 -0
  91. package/styles-3fb7b9cf.cjs.js +2377 -0
  92. package/styles-3fb7b9cf.esm.js +2368 -0
  93. package/styles-659d7242.cjs.js +3919 -0
  94. package/styles-659d7242.esm.js +3915 -0
  95. package/svgDraw-af99a425.cjs.js +144 -0
  96. package/svgDraw-af99a425.esm.js +141 -0
  97. package/svgDrawCommon-ebe6c236.cjs.js +70 -0
  98. package/svgDrawCommon-ebe6c236.esm.js +62 -0
  99. package/timeline-definition-65183566.cjs.js +1394 -0
  100. package/timeline-definition-65183566.esm.js +1392 -0
@@ -0,0 +1,2773 @@
1
+ import { S, a4 as cx, a6 as Pl } from './index.esm2.js';
2
+
3
+ function _array_like_to_array(arr, len) {
4
+ if (len == null || len > arr.length) len = arr.length;
5
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6
+ return arr2;
7
+ }
8
+ function _array_with_holes(arr) {
9
+ if (Array.isArray(arr)) return arr;
10
+ }
11
+ function _array_without_holes(arr) {
12
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
13
+ }
14
+ function _define_property(obj, key, value) {
15
+ if (key in obj) {
16
+ Object.defineProperty(obj, key, {
17
+ value: value,
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true
21
+ });
22
+ } else {
23
+ obj[key] = value;
24
+ }
25
+ return obj;
26
+ }
27
+ function _iterable_to_array(iter) {
28
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
29
+ }
30
+ function _iterable_to_array_limit(arr, i) {
31
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
32
+ if (_i == null) return;
33
+ var _arr = [];
34
+ var _n = true;
35
+ var _d = false;
36
+ var _s, _e;
37
+ try {
38
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
39
+ _arr.push(_s.value);
40
+ if (i && _arr.length === i) break;
41
+ }
42
+ } catch (err) {
43
+ _d = true;
44
+ _e = err;
45
+ } finally{
46
+ try {
47
+ if (!_n && _i["return"] != null) _i["return"]();
48
+ } finally{
49
+ if (_d) throw _e;
50
+ }
51
+ }
52
+ return _arr;
53
+ }
54
+ function _non_iterable_rest() {
55
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
56
+ }
57
+ function _non_iterable_spread() {
58
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
59
+ }
60
+ function _sliced_to_array(arr, i) {
61
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
62
+ }
63
+ function _to_array(arr) {
64
+ return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
65
+ }
66
+ function _to_consumable_array(arr) {
67
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
68
+ }
69
+ function _unsupported_iterable_to_array(o, minLen) {
70
+ if (!o) return;
71
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
72
+ var n = Object.prototype.toString.call(o).slice(8, -1);
73
+ if (n === "Object" && o.constructor) n = o.constructor.name;
74
+ if (n === "Map" || n === "Set") return Array.from(n);
75
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
76
+ }
77
+ function Tt(n, r) {
78
+ var _ref = r || {}, tmp = _ref.includeImageAlt, t = tmp === void 0 ? !0 : tmp;
79
+ return nt(n, t);
80
+ }
81
+ function nt(n, r) {
82
+ return n && typeof n == "object" && // @ts-ignore looks like a literal.
83
+ (n.value || // @ts-ignore looks like an image.
84
+ (r ? n.alt : "") || // @ts-ignore looks like a parent.
85
+ "children" in n && Hn(n.children, r) || Array.isArray(n) && Hn(n, r)) || "";
86
+ }
87
+ function Hn(n, r) {
88
+ for(var t = [], e = -1; ++e < n.length;)t[e] = nt(n[e], r);
89
+ return t.join("");
90
+ }
91
+ function en(n, r, t, e) {
92
+ var u = n.length;
93
+ var l = 0, i;
94
+ if (r < 0 ? r = -r > u ? 0 : u + r : r = r > u ? u : r, t = t > 0 ? t : 0, e.length < 1e4) i = Array.from(e), i.unshift(r, t), [].splice.apply(n, i);
95
+ else for(t && [].splice.apply(n, [
96
+ r,
97
+ t
98
+ ]); l < e.length;)i = e.slice(l, l + 1e4), i.unshift(r, 0), [].splice.apply(n, i), l += 1e4, r += 1e4;
99
+ }
100
+ function Z(n, r) {
101
+ return n.length > 0 ? (en(n, n.length, 0, r), n) : r;
102
+ }
103
+ var Nn = {}.hasOwnProperty;
104
+ function Bt(n) {
105
+ var r = {};
106
+ var t = -1;
107
+ for(; ++t < n.length;)Lt(r, n[t]);
108
+ return r;
109
+ }
110
+ function Lt(n, r) {
111
+ var t;
112
+ for(t in r){
113
+ var u = (Nn.call(n, t) ? n[t] : void 0) || (n[t] = {}), l = r[t];
114
+ var i = void 0;
115
+ for(i in l){
116
+ Nn.call(u, i) || (u[i] = []);
117
+ var a = l[i];
118
+ Ot(// @ts-expect-error Looks like a list.
119
+ u[i], Array.isArray(a) ? a : a ? [
120
+ a
121
+ ] : []);
122
+ }
123
+ }
124
+ }
125
+ function Ot(n, r) {
126
+ var t = -1;
127
+ var e = [];
128
+ for(; ++t < r.length;)(r[t].add === "after" ? n : e).push(r[t]);
129
+ en(n, 0, 0, e);
130
+ }
131
+ var Dt = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\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\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\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]/, tn = sn(/[A-Za-z]/), An = sn(/\d/), Pt = sn(/[\dA-Fa-f]/), v = sn(/[\dA-Za-z]/), _t = sn(/[!-/:-@[-`{-~]/), Vn = sn(/[#-'*+\--9=?A-Z^-~]/);
132
+ function zn(n) {
133
+ return(// Special whitespace codes (which have negative values), C0 and Control
134
+ // character DEL
135
+ n !== null && (n < 32 || n === 127));
136
+ }
137
+ function Y(n) {
138
+ return n !== null && (n < 0 || n === 32);
139
+ }
140
+ function C(n) {
141
+ return n !== null && n < -2;
142
+ }
143
+ function q(n) {
144
+ return n === -2 || n === -1 || n === 32;
145
+ }
146
+ var Mt = sn(/\s/), jt = sn(Dt);
147
+ function sn(n) {
148
+ return r;
149
+ function r(t) {
150
+ return t !== null && n.test(String.fromCharCode(t));
151
+ }
152
+ }
153
+ function T(n, r, t, e) {
154
+ var u = e ? e - 1 : Number.POSITIVE_INFINITY;
155
+ var l = 0;
156
+ return i;
157
+ function i(c) {
158
+ return q(c) ? (n.enter(t), a(c)) : r(c);
159
+ }
160
+ function a(c) {
161
+ return q(c) && l++ < u ? (n.consume(c), a) : (n.exit(t), r(c));
162
+ }
163
+ }
164
+ var Rt = {
165
+ tokenize: qt
166
+ };
167
+ function qt(n) {
168
+ var r = n.attempt(this.parser.constructs.contentInitial, e, u);
169
+ var t;
170
+ return r;
171
+ function e(a) {
172
+ if (a === null) {
173
+ n.consume(a);
174
+ return;
175
+ }
176
+ return n.enter("lineEnding"), n.consume(a), n.exit("lineEnding"), T(n, r, "linePrefix");
177
+ }
178
+ function u(a) {
179
+ return n.enter("paragraph"), l(a);
180
+ }
181
+ function l(a) {
182
+ var c = n.enter("chunkText", {
183
+ contentType: "text",
184
+ previous: t
185
+ });
186
+ return t && (t.next = c), t = c, i(a);
187
+ }
188
+ function i(a) {
189
+ if (a === null) {
190
+ n.exit("chunkText"), n.exit("paragraph"), n.consume(a);
191
+ return;
192
+ }
193
+ return C(a) ? (n.consume(a), n.exit("chunkText"), l) : (n.consume(a), i);
194
+ }
195
+ }
196
+ var Ht = {
197
+ tokenize: Nt
198
+ }, Wn = {
199
+ tokenize: Vt
200
+ };
201
+ function Nt(n) {
202
+ var r = this, t = [];
203
+ var e = 0, u, l, i;
204
+ return a;
205
+ function a(F) {
206
+ if (e < t.length) {
207
+ var L = t[e];
208
+ return r.containerState = L[1], n.attempt(L[0].continuation, c, p)(F);
209
+ }
210
+ return p(F);
211
+ }
212
+ function c(F) {
213
+ if (e++, r.containerState._closeFlow) {
214
+ r.containerState._closeFlow = void 0, u && _();
215
+ var L = r.events.length;
216
+ var O = L, d;
217
+ for(; O--;)if (r.events[O][0] === "exit" && r.events[O][1].type === "chunkFlow") {
218
+ d = r.events[O][1].end;
219
+ break;
220
+ }
221
+ y(e);
222
+ var P = L;
223
+ for(; P < r.events.length;)r.events[P][1].end = Object.assign({}, d), P++;
224
+ return en(r.events, O + 1, 0, r.events.slice(L)), r.events.length = P, p(F);
225
+ }
226
+ return a(F);
227
+ }
228
+ function p(F) {
229
+ if (e === t.length) {
230
+ if (!u) return g(F);
231
+ if (u.currentConstruct && u.currentConstruct.concrete) return k(F);
232
+ r.interrupt = !!(u.currentConstruct && !u._gfmTableDynamicInterruptHack);
233
+ }
234
+ return r.containerState = {}, n.check(Wn, h, x)(F);
235
+ }
236
+ function h(F) {
237
+ return u && _(), y(e), g(F);
238
+ }
239
+ function x(F) {
240
+ return r.parser.lazy[r.now().line] = e !== t.length, i = r.now().offset, k(F);
241
+ }
242
+ function g(F) {
243
+ return r.containerState = {}, n.attempt(Wn, f, k)(F);
244
+ }
245
+ function f(F) {
246
+ return e++, t.push([
247
+ r.currentConstruct,
248
+ r.containerState
249
+ ]), g(F);
250
+ }
251
+ function k(F) {
252
+ if (F === null) {
253
+ u && _(), y(0), n.consume(F);
254
+ return;
255
+ }
256
+ return u = u || r.parser.flow(r.now()), n.enter("chunkFlow", {
257
+ contentType: "flow",
258
+ previous: l,
259
+ _tokenizer: u
260
+ }), B(F);
261
+ }
262
+ function B(F) {
263
+ if (F === null) {
264
+ D(n.exit("chunkFlow"), !0), y(0), n.consume(F);
265
+ return;
266
+ }
267
+ return C(F) ? (n.consume(F), D(n.exit("chunkFlow")), e = 0, r.interrupt = void 0, a) : (n.consume(F), B);
268
+ }
269
+ function D(F, L) {
270
+ var O = r.sliceStream(F);
271
+ if (L && O.push(null), F.previous = l, l && (l.next = F), l = F, u.defineSkip(F.start), u.write(O), r.parser.lazy[F.start.line]) {
272
+ var d = u.events.length;
273
+ for(; d--;)if (// The token starts before the line ending…
274
+ u.events[d][1].start.offset < i && // …and either is not ended yet…
275
+ (!u.events[d][1].end || // …or ends after it.
276
+ u.events[d][1].end.offset > i)) return;
277
+ var P = r.events.length;
278
+ var j = P, R, V;
279
+ for(; j--;)if (r.events[j][0] === "exit" && r.events[j][1].type === "chunkFlow") {
280
+ if (R) {
281
+ V = r.events[j][1].end;
282
+ break;
283
+ }
284
+ R = !0;
285
+ }
286
+ for(y(e), d = P; d < r.events.length;)r.events[d][1].end = Object.assign({}, V), d++;
287
+ en(r.events, j + 1, 0, r.events.slice(P)), r.events.length = d;
288
+ }
289
+ }
290
+ function y(F) {
291
+ var L = t.length;
292
+ for(; L-- > F;){
293
+ var O = t[L];
294
+ r.containerState = O[1], O[0].exit.call(r, n);
295
+ }
296
+ t.length = F;
297
+ }
298
+ function _() {
299
+ u.write([
300
+ null
301
+ ]), l = void 0, u = void 0, r.containerState._closeFlow = void 0;
302
+ }
303
+ }
304
+ function Vt(n, r, t) {
305
+ return T(n, n.attempt(this.parser.constructs.document, r, t), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
306
+ }
307
+ function Qn(n) {
308
+ if (n === null || Y(n) || Mt(n)) return 1;
309
+ if (jt(n)) return 2;
310
+ }
311
+ function Ln(n, r, t) {
312
+ var e = [];
313
+ var u = -1;
314
+ for(; ++u < n.length;){
315
+ var l = n[u].resolveAll;
316
+ l && !e.includes(l) && (r = l(r, t), e.push(l));
317
+ }
318
+ return r;
319
+ }
320
+ var In = {
321
+ name: "attention",
322
+ tokenize: Qt,
323
+ resolveAll: Wt
324
+ };
325
+ function Wt(n, r) {
326
+ var t = -1, e, u, l, i, a, c, p, h;
327
+ for(; ++t < n.length;)if (n[t][0] === "enter" && n[t][1].type === "attentionSequence" && n[t][1]._close) {
328
+ for(e = t; e--;)if (n[e][0] === "exit" && n[e][1].type === "attentionSequence" && n[e][1]._open && // If the markers are the same:
329
+ r.sliceSerialize(n[e][1]).charCodeAt(0) === r.sliceSerialize(n[t][1]).charCodeAt(0)) {
330
+ if ((n[e][1]._close || n[t][1]._open) && (n[t][1].end.offset - n[t][1].start.offset) % 3 && !((n[e][1].end.offset - n[e][1].start.offset + n[t][1].end.offset - n[t][1].start.offset) % 3)) continue;
331
+ c = n[e][1].end.offset - n[e][1].start.offset > 1 && n[t][1].end.offset - n[t][1].start.offset > 1 ? 2 : 1;
332
+ var x = Object.assign({}, n[e][1].end), g = Object.assign({}, n[t][1].start);
333
+ Un(x, -c), Un(g, c), i = {
334
+ type: c > 1 ? "strongSequence" : "emphasisSequence",
335
+ start: x,
336
+ end: Object.assign({}, n[e][1].end)
337
+ }, a = {
338
+ type: c > 1 ? "strongSequence" : "emphasisSequence",
339
+ start: Object.assign({}, n[t][1].start),
340
+ end: g
341
+ }, l = {
342
+ type: c > 1 ? "strongText" : "emphasisText",
343
+ start: Object.assign({}, n[e][1].end),
344
+ end: Object.assign({}, n[t][1].start)
345
+ }, u = {
346
+ type: c > 1 ? "strong" : "emphasis",
347
+ start: Object.assign({}, i.start),
348
+ end: Object.assign({}, a.end)
349
+ }, n[e][1].end = Object.assign({}, i.start), n[t][1].start = Object.assign({}, a.end), p = [], n[e][1].end.offset - n[e][1].start.offset && (p = Z(p, [
350
+ [
351
+ "enter",
352
+ n[e][1],
353
+ r
354
+ ],
355
+ [
356
+ "exit",
357
+ n[e][1],
358
+ r
359
+ ]
360
+ ])), p = Z(p, [
361
+ [
362
+ "enter",
363
+ u,
364
+ r
365
+ ],
366
+ [
367
+ "enter",
368
+ i,
369
+ r
370
+ ],
371
+ [
372
+ "exit",
373
+ i,
374
+ r
375
+ ],
376
+ [
377
+ "enter",
378
+ l,
379
+ r
380
+ ]
381
+ ]), p = Z(p, Ln(r.parser.constructs.insideSpan.null, n.slice(e + 1, t), r)), p = Z(p, [
382
+ [
383
+ "exit",
384
+ l,
385
+ r
386
+ ],
387
+ [
388
+ "enter",
389
+ a,
390
+ r
391
+ ],
392
+ [
393
+ "exit",
394
+ a,
395
+ r
396
+ ],
397
+ [
398
+ "exit",
399
+ u,
400
+ r
401
+ ]
402
+ ]), n[t][1].end.offset - n[t][1].start.offset ? (h = 2, p = Z(p, [
403
+ [
404
+ "enter",
405
+ n[t][1],
406
+ r
407
+ ],
408
+ [
409
+ "exit",
410
+ n[t][1],
411
+ r
412
+ ]
413
+ ])) : h = 0, en(n, e - 1, t - e + 3, p), t = e + p.length - h - 2;
414
+ break;
415
+ }
416
+ }
417
+ for(t = -1; ++t < n.length;)n[t][1].type === "attentionSequence" && (n[t][1].type = "data");
418
+ return n;
419
+ }
420
+ function Qt(n, r) {
421
+ var t = this.parser.constructs.attentionMarkers.null, e = this.previous, u = Qn(e);
422
+ var l;
423
+ return i;
424
+ function i(c) {
425
+ return n.enter("attentionSequence"), l = c, a(c);
426
+ }
427
+ function a(c) {
428
+ if (c === l) return n.consume(c), a;
429
+ var p = n.exit("attentionSequence"), h = Qn(c), x = !h || h === 2 && u || t.includes(c), g = !u || u === 2 && h || t.includes(e);
430
+ return p._open = !!(l === 42 ? x : x && (u || !g)), p._close = !!(l === 42 ? g : g && (h || !x)), r(c);
431
+ }
432
+ }
433
+ function Un(n, r) {
434
+ n.column += r, n.offset += r, n._bufferIndex += r;
435
+ }
436
+ var Ut = {
437
+ name: "autolink",
438
+ tokenize: $t
439
+ };
440
+ function $t(n, r, t) {
441
+ var e = 1;
442
+ return u;
443
+ function u(k) {
444
+ return n.enter("autolink"), n.enter("autolinkMarker"), n.consume(k), n.exit("autolinkMarker"), n.enter("autolinkProtocol"), l;
445
+ }
446
+ function l(k) {
447
+ return tn(k) ? (n.consume(k), i) : Vn(k) ? p(k) : t(k);
448
+ }
449
+ function i(k) {
450
+ return k === 43 || k === 45 || k === 46 || v(k) ? a(k) : p(k);
451
+ }
452
+ function a(k) {
453
+ return k === 58 ? (n.consume(k), c) : (k === 43 || k === 45 || k === 46 || v(k)) && e++ < 32 ? (n.consume(k), a) : p(k);
454
+ }
455
+ function c(k) {
456
+ return k === 62 ? (n.exit("autolinkProtocol"), f(k)) : k === null || k === 32 || k === 60 || zn(k) ? t(k) : (n.consume(k), c);
457
+ }
458
+ function p(k) {
459
+ return k === 64 ? (n.consume(k), e = 0, h) : Vn(k) ? (n.consume(k), p) : t(k);
460
+ }
461
+ function h(k) {
462
+ return v(k) ? x(k) : t(k);
463
+ }
464
+ function x(k) {
465
+ return k === 46 ? (n.consume(k), e = 0, h) : k === 62 ? (n.exit("autolinkProtocol").type = "autolinkEmail", f(k)) : g(k);
466
+ }
467
+ function g(k) {
468
+ return (k === 45 || v(k)) && e++ < 63 ? (n.consume(k), k === 45 ? g : x) : t(k);
469
+ }
470
+ function f(k) {
471
+ return n.enter("autolinkMarker"), n.consume(k), n.exit("autolinkMarker"), n.exit("autolink"), r;
472
+ }
473
+ }
474
+ var Sn = {
475
+ tokenize: Zt,
476
+ partial: !0
477
+ };
478
+ function Zt(n, r, t) {
479
+ return T(n, e, "linePrefix");
480
+ function e(u) {
481
+ return u === null || C(u) ? r(u) : t(u);
482
+ }
483
+ }
484
+ var tt = {
485
+ name: "blockQuote",
486
+ tokenize: Yt,
487
+ continuation: {
488
+ tokenize: Gt
489
+ },
490
+ exit: Jt
491
+ };
492
+ function Yt(n, r, t) {
493
+ var e = this;
494
+ return u;
495
+ function u(i) {
496
+ if (i === 62) {
497
+ var a = e.containerState;
498
+ return a.open || (n.enter("blockQuote", {
499
+ _container: !0
500
+ }), a.open = !0), n.enter("blockQuotePrefix"), n.enter("blockQuoteMarker"), n.consume(i), n.exit("blockQuoteMarker"), l;
501
+ }
502
+ return t(i);
503
+ }
504
+ function l(i) {
505
+ return q(i) ? (n.enter("blockQuotePrefixWhitespace"), n.consume(i), n.exit("blockQuotePrefixWhitespace"), n.exit("blockQuotePrefix"), r) : (n.exit("blockQuotePrefix"), r(i));
506
+ }
507
+ }
508
+ function Gt(n, r, t) {
509
+ return T(n, n.attempt(tt, r, t), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
510
+ }
511
+ function Jt(n) {
512
+ n.exit("blockQuote");
513
+ }
514
+ var et = {
515
+ name: "characterEscape",
516
+ tokenize: Kt
517
+ };
518
+ function Kt(n, r, t) {
519
+ return e;
520
+ function e(l) {
521
+ return n.enter("characterEscape"), n.enter("escapeMarker"), n.consume(l), n.exit("escapeMarker"), u;
522
+ }
523
+ function u(l) {
524
+ return _t(l) ? (n.enter("characterEscapeValue"), n.consume(l), n.exit("characterEscapeValue"), n.exit("characterEscape"), r) : t(l);
525
+ }
526
+ }
527
+ var $n = document.createElement("i");
528
+ function On(n) {
529
+ var r = "&" + n + ";";
530
+ $n.innerHTML = r;
531
+ var t = $n.textContent;
532
+ return t.charCodeAt(t.length - 1) === 59 && n !== "semi" || t === r ? !1 : t;
533
+ }
534
+ var rt = {
535
+ name: "characterReference",
536
+ tokenize: Xt
537
+ };
538
+ function Xt(n, r, t) {
539
+ var e = this;
540
+ var u = 0, l, i;
541
+ return a;
542
+ function a(x) {
543
+ return n.enter("characterReference"), n.enter("characterReferenceMarker"), n.consume(x), n.exit("characterReferenceMarker"), c;
544
+ }
545
+ function c(x) {
546
+ return x === 35 ? (n.enter("characterReferenceMarkerNumeric"), n.consume(x), n.exit("characterReferenceMarkerNumeric"), p) : (n.enter("characterReferenceValue"), l = 31, i = v, h(x));
547
+ }
548
+ function p(x) {
549
+ return x === 88 || x === 120 ? (n.enter("characterReferenceMarkerHexadecimal"), n.consume(x), n.exit("characterReferenceMarkerHexadecimal"), n.enter("characterReferenceValue"), l = 6, i = Pt, h) : (n.enter("characterReferenceValue"), l = 7, i = An, h(x));
550
+ }
551
+ function h(x) {
552
+ var g;
553
+ return x === 59 && u ? (g = n.exit("characterReferenceValue"), i === v && !On(e.sliceSerialize(g)) ? t(x) : (n.enter("characterReferenceMarker"), n.consume(x), n.exit("characterReferenceMarker"), n.exit("characterReference"), r)) : i(x) && u++ < l ? (n.consume(x), h) : t(x);
554
+ }
555
+ }
556
+ var Zn = {
557
+ name: "codeFenced",
558
+ tokenize: vt,
559
+ concrete: !0
560
+ };
561
+ function vt(n, r, t) {
562
+ var e = this, u = {
563
+ tokenize: O,
564
+ partial: !0
565
+ }, l = {
566
+ tokenize: L,
567
+ partial: !0
568
+ }, i = this.events[this.events.length - 1], a = i && i[1].type === "linePrefix" ? i[2].sliceSerialize(i[1], !0).length : 0;
569
+ var c = 0, p;
570
+ return h;
571
+ function h(d) {
572
+ return n.enter("codeFenced"), n.enter("codeFencedFence"), n.enter("codeFencedFenceSequence"), p = d, x(d);
573
+ }
574
+ function x(d) {
575
+ return d === p ? (n.consume(d), c++, x) : (n.exit("codeFencedFenceSequence"), c < 3 ? t(d) : T(n, g, "whitespace")(d));
576
+ }
577
+ function g(d) {
578
+ return d === null || C(d) ? D(d) : (n.enter("codeFencedFenceInfo"), n.enter("chunkString", {
579
+ contentType: "string"
580
+ }), f(d));
581
+ }
582
+ function f(d) {
583
+ return d === null || Y(d) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"), T(n, k, "whitespace")(d)) : d === 96 && d === p ? t(d) : (n.consume(d), f);
584
+ }
585
+ function k(d) {
586
+ return d === null || C(d) ? D(d) : (n.enter("codeFencedFenceMeta"), n.enter("chunkString", {
587
+ contentType: "string"
588
+ }), B(d));
589
+ }
590
+ function B(d) {
591
+ return d === null || C(d) ? (n.exit("chunkString"), n.exit("codeFencedFenceMeta"), D(d)) : d === 96 && d === p ? t(d) : (n.consume(d), B);
592
+ }
593
+ function D(d) {
594
+ return n.exit("codeFencedFence"), e.interrupt ? r(d) : y(d);
595
+ }
596
+ function y(d) {
597
+ return d === null ? F(d) : C(d) ? n.attempt(l, n.attempt(u, F, a ? T(n, y, "linePrefix", a + 1) : y), F)(d) : (n.enter("codeFlowValue"), _(d));
598
+ }
599
+ function _(d) {
600
+ return d === null || C(d) ? (n.exit("codeFlowValue"), y(d)) : (n.consume(d), _);
601
+ }
602
+ function F(d) {
603
+ return n.exit("codeFenced"), r(d);
604
+ }
605
+ function L(d, P, j) {
606
+ var R = this;
607
+ return V;
608
+ function V(E) {
609
+ return d.enter("lineEnding"), d.consume(E), d.exit("lineEnding"), S;
610
+ }
611
+ function S(E) {
612
+ return R.parser.lazy[R.now().line] ? j(E) : P(E);
613
+ }
614
+ }
615
+ function O(d, P, j) {
616
+ var R = 0;
617
+ return T(d, V, "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
618
+ function V(A) {
619
+ return d.enter("codeFencedFence"), d.enter("codeFencedFenceSequence"), S(A);
620
+ }
621
+ function S(A) {
622
+ return A === p ? (d.consume(A), R++, S) : R < c ? j(A) : (d.exit("codeFencedFenceSequence"), T(d, E, "whitespace")(A));
623
+ }
624
+ function E(A) {
625
+ return A === null || C(A) ? (d.exit("codeFencedFence"), P(A)) : j(A);
626
+ }
627
+ }
628
+ }
629
+ var wn = {
630
+ name: "codeIndented",
631
+ tokenize: te
632
+ }, ne = {
633
+ tokenize: ee,
634
+ partial: !0
635
+ };
636
+ function te(n, r, t) {
637
+ var e = this;
638
+ return u;
639
+ function u(p) {
640
+ return n.enter("codeIndented"), T(n, l, "linePrefix", 4 + 1)(p);
641
+ }
642
+ function l(p) {
643
+ var h = e.events[e.events.length - 1];
644
+ return h && h[1].type === "linePrefix" && h[2].sliceSerialize(h[1], !0).length >= 4 ? i(p) : t(p);
645
+ }
646
+ function i(p) {
647
+ return p === null ? c(p) : C(p) ? n.attempt(ne, i, c)(p) : (n.enter("codeFlowValue"), a(p));
648
+ }
649
+ function a(p) {
650
+ return p === null || C(p) ? (n.exit("codeFlowValue"), i(p)) : (n.consume(p), a);
651
+ }
652
+ function c(p) {
653
+ return n.exit("codeIndented"), r(p);
654
+ }
655
+ }
656
+ function ee(n, r, t) {
657
+ var e = this;
658
+ return u;
659
+ function u(i) {
660
+ return e.parser.lazy[e.now().line] ? t(i) : C(i) ? (n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), u) : T(n, l, "linePrefix", 4 + 1)(i);
661
+ }
662
+ function l(i) {
663
+ var a = e.events[e.events.length - 1];
664
+ return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? r(i) : C(i) ? u(i) : t(i);
665
+ }
666
+ }
667
+ var re = {
668
+ name: "codeText",
669
+ tokenize: le,
670
+ resolve: ie,
671
+ previous: ue
672
+ };
673
+ function ie(n) {
674
+ var r = n.length - 4, t = 3, e, u;
675
+ if ((n[t][1].type === "lineEnding" || n[t][1].type === "space") && (n[r][1].type === "lineEnding" || n[r][1].type === "space")) {
676
+ for(e = t; ++e < r;)if (n[e][1].type === "codeTextData") {
677
+ n[t][1].type = "codeTextPadding", n[r][1].type = "codeTextPadding", t += 2, r -= 2;
678
+ break;
679
+ }
680
+ }
681
+ for(e = t - 1, r++; ++e <= r;)u === void 0 ? e !== r && n[e][1].type !== "lineEnding" && (u = e) : (e === r || n[e][1].type === "lineEnding") && (n[u][1].type = "codeTextData", e !== u + 2 && (n[u][1].end = n[e - 1][1].end, n.splice(u + 2, e - u - 2), r -= e - u - 2, e = u + 2), u = void 0);
682
+ return n;
683
+ }
684
+ function ue(n) {
685
+ return n !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
686
+ }
687
+ function le(n, r, t) {
688
+ var e = 0, u, l;
689
+ return i;
690
+ function i(x) {
691
+ return n.enter("codeText"), n.enter("codeTextSequence"), a(x);
692
+ }
693
+ function a(x) {
694
+ return x === 96 ? (n.consume(x), e++, a) : (n.exit("codeTextSequence"), c(x));
695
+ }
696
+ function c(x) {
697
+ return x === null ? t(x) : x === 96 ? (l = n.enter("codeTextSequence"), u = 0, h(x)) : x === 32 ? (n.enter("space"), n.consume(x), n.exit("space"), c) : C(x) ? (n.enter("lineEnding"), n.consume(x), n.exit("lineEnding"), c) : (n.enter("codeTextData"), p(x));
698
+ }
699
+ function p(x) {
700
+ return x === null || x === 32 || x === 96 || C(x) ? (n.exit("codeTextData"), c(x)) : (n.consume(x), p);
701
+ }
702
+ function h(x) {
703
+ return x === 96 ? (n.consume(x), u++, h) : u === e ? (n.exit("codeTextSequence"), n.exit("codeText"), r(x)) : (l.type = "codeTextData", p(x));
704
+ }
705
+ }
706
+ function it(n) {
707
+ var r = {};
708
+ var t = -1, e, u, l, i, a, c, p;
709
+ for(; ++t < n.length;){
710
+ for(; (t in r);)t = r[t];
711
+ if (e = n[t], t && e[1].type === "chunkFlow" && n[t - 1][1].type === "listItemPrefix" && (c = e[1]._tokenizer.events, l = 0, l < c.length && c[l][1].type === "lineEndingBlank" && (l += 2), l < c.length && c[l][1].type === "content")) for(; ++l < c.length && c[l][1].type !== "content";)c[l][1].type === "chunkText" && (c[l][1]._isInFirstContentOfListItem = !0, l++);
712
+ if (e[0] === "enter") e[1].contentType && (Object.assign(r, ae(n, t)), t = r[t], p = !0);
713
+ else if (e[1]._container) {
714
+ for(l = t, u = void 0; l-- && (i = n[l], i[1].type === "lineEnding" || i[1].type === "lineEndingBlank");)i[0] === "enter" && (u && (n[u][1].type = "lineEndingBlank"), i[1].type = "lineEnding", u = l);
715
+ u && (e[1].end = Object.assign({}, n[u][1].start), a = n.slice(u, t), a.unshift(e), en(n, u, t - u + 1, a));
716
+ }
717
+ }
718
+ return !p;
719
+ }
720
+ function ae(n, r) {
721
+ var t = n[r][1], e = n[r][2];
722
+ var u = r - 1;
723
+ var l = [], i = t._tokenizer || e.parser[t.contentType](t.start), a = i.events, c = [], p = {};
724
+ var h, x, g = -1, f = t, k = 0, B = 0;
725
+ var D = [
726
+ B
727
+ ];
728
+ for(; f;){
729
+ for(; n[++u][1] !== f;);
730
+ l.push(u), f._tokenizer || (h = e.sliceStream(f), f.next || h.push(null), x && i.defineSkip(f.start), f._isInFirstContentOfListItem && (i._gfmTasklistFirstContentOfListItem = !0), i.write(h), f._isInFirstContentOfListItem && (i._gfmTasklistFirstContentOfListItem = void 0)), x = f, f = f.next;
731
+ }
732
+ for(f = t; ++g < a.length;)// Find a void token that includes a break.
733
+ a[g][0] === "exit" && a[g - 1][0] === "enter" && a[g][1].type === a[g - 1][1].type && a[g][1].start.line !== a[g][1].end.line && (B = g + 1, D.push(B), f._tokenizer = void 0, f.previous = void 0, f = f.next);
734
+ for(i.events = [], f ? (f._tokenizer = void 0, f.previous = void 0) : D.pop(), g = D.length; g--;){
735
+ var y = a.slice(D[g], D[g + 1]), _ = l.pop();
736
+ c.unshift([
737
+ _,
738
+ _ + y.length - 1
739
+ ]), en(n, _, 2, y);
740
+ }
741
+ for(g = -1; ++g < c.length;)p[k + c[g][0]] = k + c[g][1], k += c[g][1] - c[g][0] - 1;
742
+ return p;
743
+ }
744
+ var oe = {
745
+ tokenize: he,
746
+ resolve: ce
747
+ }, se = {
748
+ tokenize: pe,
749
+ partial: !0
750
+ };
751
+ function ce(n) {
752
+ return it(n), n;
753
+ }
754
+ function he(n, r) {
755
+ var t;
756
+ return e;
757
+ function e(a) {
758
+ return n.enter("content"), t = n.enter("chunkContent", {
759
+ contentType: "content"
760
+ }), u(a);
761
+ }
762
+ function u(a) {
763
+ return a === null ? l(a) : C(a) ? n.check(se, i, l)(a) : (n.consume(a), u);
764
+ }
765
+ function l(a) {
766
+ return n.exit("chunkContent"), n.exit("content"), r(a);
767
+ }
768
+ function i(a) {
769
+ return n.consume(a), n.exit("chunkContent"), t.next = n.enter("chunkContent", {
770
+ contentType: "content",
771
+ previous: t
772
+ }), t = t.next, u;
773
+ }
774
+ }
775
+ function pe(n, r, t) {
776
+ var e = this;
777
+ return u;
778
+ function u(i) {
779
+ return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), T(n, l, "linePrefix");
780
+ }
781
+ function l(i) {
782
+ if (i === null || C(i)) return t(i);
783
+ var a = e.events[e.events.length - 1];
784
+ return !e.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? r(i) : n.interrupt(e.parser.constructs.flow, t, r)(i);
785
+ }
786
+ }
787
+ function ut(n, r, t, e, u, l, i, a, c) {
788
+ var p = c || Number.POSITIVE_INFINITY;
789
+ var h = 0;
790
+ return x;
791
+ function x(y) {
792
+ return y === 60 ? (n.enter(e), n.enter(u), n.enter(l), n.consume(y), n.exit(l), g) : y === null || y === 41 || zn(y) ? t(y) : (n.enter(e), n.enter(i), n.enter(a), n.enter("chunkString", {
793
+ contentType: "string"
794
+ }), B(y));
795
+ }
796
+ function g(y) {
797
+ return y === 62 ? (n.enter(l), n.consume(y), n.exit(l), n.exit(u), n.exit(e), r) : (n.enter(a), n.enter("chunkString", {
798
+ contentType: "string"
799
+ }), f(y));
800
+ }
801
+ function f(y) {
802
+ return y === 62 ? (n.exit("chunkString"), n.exit(a), g(y)) : y === null || y === 60 || C(y) ? t(y) : (n.consume(y), y === 92 ? k : f);
803
+ }
804
+ function k(y) {
805
+ return y === 60 || y === 62 || y === 92 ? (n.consume(y), f) : f(y);
806
+ }
807
+ function B(y) {
808
+ return y === 40 ? ++h > p ? t(y) : (n.consume(y), B) : y === 41 ? h-- ? (n.consume(y), B) : (n.exit("chunkString"), n.exit(a), n.exit(i), n.exit(e), r(y)) : y === null || Y(y) ? h ? t(y) : (n.exit("chunkString"), n.exit(a), n.exit(i), n.exit(e), r(y)) : zn(y) ? t(y) : (n.consume(y), y === 92 ? D : B);
809
+ }
810
+ function D(y) {
811
+ return y === 40 || y === 41 || y === 92 ? (n.consume(y), B) : B(y);
812
+ }
813
+ }
814
+ function lt(n, r, t, e, u, l) {
815
+ var i = this;
816
+ var a = 0, c;
817
+ return p;
818
+ function p(f) {
819
+ return n.enter(e), n.enter(u), n.consume(f), n.exit(u), n.enter(l), h;
820
+ }
821
+ function h(f) {
822
+ return f === null || f === 91 || f === 93 && !c || /* 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 */ /* Hidden footnotes hook */ /* c8 ignore next 3 */ f === 94 && !a && "_hiddenFootnoteSupport" in i.parser.constructs || a > 999 ? t(f) : f === 93 ? (n.exit(l), n.enter(u), n.consume(f), n.exit(u), n.exit(e), r) : C(f) ? (n.enter("lineEnding"), n.consume(f), n.exit("lineEnding"), h) : (n.enter("chunkString", {
825
+ contentType: "string"
826
+ }), x(f));
827
+ }
828
+ function x(f) {
829
+ return f === null || f === 91 || f === 93 || C(f) || a++ > 999 ? (n.exit("chunkString"), h(f)) : (n.consume(f), c = c || !q(f), f === 92 ? g : x);
830
+ }
831
+ function g(f) {
832
+ return f === 91 || f === 92 || f === 93 ? (n.consume(f), a++, x) : x(f);
833
+ }
834
+ }
835
+ function at(n, r, t, e, u, l) {
836
+ var i;
837
+ return a;
838
+ function a(g) {
839
+ return n.enter(e), n.enter(u), n.consume(g), n.exit(u), i = g === 40 ? 41 : g, c;
840
+ }
841
+ function c(g) {
842
+ return g === i ? (n.enter(u), n.consume(g), n.exit(u), n.exit(e), r) : (n.enter(l), p(g));
843
+ }
844
+ function p(g) {
845
+ return g === i ? (n.exit(l), c(i)) : g === null ? t(g) : C(g) ? (n.enter("lineEnding"), n.consume(g), n.exit("lineEnding"), T(n, p, "linePrefix")) : (n.enter("chunkString", {
846
+ contentType: "string"
847
+ }), h(g));
848
+ }
849
+ function h(g) {
850
+ return g === i || g === null || C(g) ? (n.exit("chunkString"), p(g)) : (n.consume(g), g === 92 ? x : h);
851
+ }
852
+ function x(g) {
853
+ return g === i || g === 92 ? (n.consume(g), h) : h(g);
854
+ }
855
+ }
856
+ function dn(n, r) {
857
+ var t;
858
+ return e;
859
+ function e(u) {
860
+ return C(u) ? (n.enter("lineEnding"), n.consume(u), n.exit("lineEnding"), t = !0, e) : q(u) ? T(n, e, t ? "linePrefix" : "lineSuffix")(u) : r(u);
861
+ }
862
+ }
863
+ function fn(n) {
864
+ return n.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
865
+ }
866
+ var me = {
867
+ name: "definition",
868
+ tokenize: xe
869
+ }, fe = {
870
+ tokenize: ge,
871
+ partial: !0
872
+ };
873
+ function xe(n, r, t) {
874
+ var e = this;
875
+ var u;
876
+ return l;
877
+ function l(c) {
878
+ return n.enter("definition"), lt.call(e, n, i, t, "definitionLabel", "definitionLabelMarker", "definitionLabelString")(c);
879
+ }
880
+ function i(c) {
881
+ return u = fn(e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1)), c === 58 ? (n.enter("definitionMarker"), n.consume(c), n.exit("definitionMarker"), dn(n, ut(n, n.attempt(fe, T(n, a, "whitespace"), T(n, a, "whitespace")), t, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", "definitionDestinationRaw", "definitionDestinationString"))) : t(c);
882
+ }
883
+ function a(c) {
884
+ return c === null || C(c) ? (n.exit("definition"), e.parser.defined.includes(u) || e.parser.defined.push(u), r(c)) : t(c);
885
+ }
886
+ }
887
+ function ge(n, r, t) {
888
+ return e;
889
+ function e(i) {
890
+ return Y(i) ? dn(n, u)(i) : t(i);
891
+ }
892
+ function u(i) {
893
+ return i === 34 || i === 39 || i === 40 ? at(n, T(n, l, "whitespace"), t, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(i) : t(i);
894
+ }
895
+ function l(i) {
896
+ return i === null || C(i) ? r(i) : t(i);
897
+ }
898
+ }
899
+ var ke = {
900
+ name: "hardBreakEscape",
901
+ tokenize: de
902
+ };
903
+ function de(n, r, t) {
904
+ return e;
905
+ function e(l) {
906
+ return n.enter("hardBreakEscape"), n.enter("escapeMarker"), n.consume(l), u;
907
+ }
908
+ function u(l) {
909
+ return C(l) ? (n.exit("escapeMarker"), n.exit("hardBreakEscape"), r(l)) : t(l);
910
+ }
911
+ }
912
+ var be = {
913
+ name: "headingAtx",
914
+ tokenize: Se,
915
+ resolve: ye
916
+ };
917
+ function ye(n, r) {
918
+ var t = n.length - 2, e = 3, u, l;
919
+ return n[e][1].type === "whitespace" && (e += 2), t - 2 > e && n[t][1].type === "whitespace" && (t -= 2), n[t][1].type === "atxHeadingSequence" && (e === t - 1 || t - 4 > e && n[t - 2][1].type === "whitespace") && (t -= e + 1 === t ? 2 : 4), t > e && (u = {
920
+ type: "atxHeadingText",
921
+ start: n[e][1].start,
922
+ end: n[t][1].end
923
+ }, l = {
924
+ type: "chunkText",
925
+ start: n[e][1].start,
926
+ end: n[t][1].end,
927
+ // @ts-expect-error Constants are fine to assign.
928
+ contentType: "text"
929
+ }, en(n, e, t - e + 1, [
930
+ [
931
+ "enter",
932
+ u,
933
+ r
934
+ ],
935
+ [
936
+ "enter",
937
+ l,
938
+ r
939
+ ],
940
+ [
941
+ "exit",
942
+ l,
943
+ r
944
+ ],
945
+ [
946
+ "exit",
947
+ u,
948
+ r
949
+ ]
950
+ ])), n;
951
+ }
952
+ function Se(n, r, t) {
953
+ var e = this;
954
+ var u = 0;
955
+ return l;
956
+ function l(h) {
957
+ return n.enter("atxHeading"), n.enter("atxHeadingSequence"), i(h);
958
+ }
959
+ function i(h) {
960
+ return h === 35 && u++ < 6 ? (n.consume(h), i) : h === null || Y(h) ? (n.exit("atxHeadingSequence"), e.interrupt ? r(h) : a(h)) : t(h);
961
+ }
962
+ function a(h) {
963
+ return h === 35 ? (n.enter("atxHeadingSequence"), c(h)) : h === null || C(h) ? (n.exit("atxHeading"), r(h)) : q(h) ? T(n, a, "whitespace")(h) : (n.enter("atxHeadingText"), p(h));
964
+ }
965
+ function c(h) {
966
+ return h === 35 ? (n.consume(h), c) : (n.exit("atxHeadingSequence"), a(h));
967
+ }
968
+ function p(h) {
969
+ return h === null || h === 35 || Y(h) ? (n.exit("atxHeadingText"), a(h)) : (n.consume(h), p);
970
+ }
971
+ }
972
+ var Fe = [
973
+ "address",
974
+ "article",
975
+ "aside",
976
+ "base",
977
+ "basefont",
978
+ "blockquote",
979
+ "body",
980
+ "caption",
981
+ "center",
982
+ "col",
983
+ "colgroup",
984
+ "dd",
985
+ "details",
986
+ "dialog",
987
+ "dir",
988
+ "div",
989
+ "dl",
990
+ "dt",
991
+ "fieldset",
992
+ "figcaption",
993
+ "figure",
994
+ "footer",
995
+ "form",
996
+ "frame",
997
+ "frameset",
998
+ "h1",
999
+ "h2",
1000
+ "h3",
1001
+ "h4",
1002
+ "h5",
1003
+ "h6",
1004
+ "head",
1005
+ "header",
1006
+ "hr",
1007
+ "html",
1008
+ "iframe",
1009
+ "legend",
1010
+ "li",
1011
+ "link",
1012
+ "main",
1013
+ "menu",
1014
+ "menuitem",
1015
+ "nav",
1016
+ "noframes",
1017
+ "ol",
1018
+ "optgroup",
1019
+ "option",
1020
+ "p",
1021
+ "param",
1022
+ "section",
1023
+ "summary",
1024
+ "table",
1025
+ "tbody",
1026
+ "td",
1027
+ "tfoot",
1028
+ "th",
1029
+ "thead",
1030
+ "title",
1031
+ "tr",
1032
+ "track",
1033
+ "ul"
1034
+ ], Yn = [
1035
+ "pre",
1036
+ "script",
1037
+ "style",
1038
+ "textarea"
1039
+ ], Ee = {
1040
+ name: "htmlFlow",
1041
+ tokenize: Ae,
1042
+ resolveTo: Ce,
1043
+ concrete: !0
1044
+ }, we = {
1045
+ tokenize: ze,
1046
+ partial: !0
1047
+ };
1048
+ function Ce(n) {
1049
+ var r = n.length;
1050
+ for(; r-- && !(n[r][0] === "enter" && n[r][1].type === "htmlFlow"););
1051
+ return r > 1 && n[r - 2][1].type === "linePrefix" && (n[r][1].start = n[r - 2][1].start, n[r + 1][1].start = n[r - 2][1].start, n.splice(r - 2, 2)), n;
1052
+ }
1053
+ function Ae(n, r, t) {
1054
+ var e = this;
1055
+ var u, l, i, a, c;
1056
+ return p;
1057
+ function p(o) {
1058
+ return n.enter("htmlFlow"), n.enter("htmlFlowData"), n.consume(o), h;
1059
+ }
1060
+ function h(o) {
1061
+ return o === 33 ? (n.consume(o), x) : o === 47 ? (n.consume(o), k) : o === 63 ? (n.consume(o), u = 3, e.interrupt ? r : U) : tn(o) ? (n.consume(o), i = String.fromCharCode(o), l = !0, B) : t(o);
1062
+ }
1063
+ function x(o) {
1064
+ return o === 45 ? (n.consume(o), u = 2, g) : o === 91 ? (n.consume(o), u = 5, i = "CDATA[", a = 0, f) : tn(o) ? (n.consume(o), u = 4, e.interrupt ? r : U) : t(o);
1065
+ }
1066
+ function g(o) {
1067
+ return o === 45 ? (n.consume(o), e.interrupt ? r : U) : t(o);
1068
+ }
1069
+ function f(o) {
1070
+ return o === i.charCodeAt(a++) ? (n.consume(o), a === i.length ? e.interrupt ? r : S : f) : t(o);
1071
+ }
1072
+ function k(o) {
1073
+ return tn(o) ? (n.consume(o), i = String.fromCharCode(o), B) : t(o);
1074
+ }
1075
+ function B(o) {
1076
+ return o === null || o === 47 || o === 62 || Y(o) ? o !== 47 && l && Yn.includes(i.toLowerCase()) ? (u = 1, e.interrupt ? r(o) : S(o)) : Fe.includes(i.toLowerCase()) ? (u = 6, o === 47 ? (n.consume(o), D) : e.interrupt ? r(o) : S(o)) : (u = 7, e.interrupt && !e.parser.lazy[e.now().line] ? t(o) : l ? _(o) : y(o)) : o === 45 || v(o) ? (n.consume(o), i += String.fromCharCode(o), B) : t(o);
1077
+ }
1078
+ function D(o) {
1079
+ return o === 62 ? (n.consume(o), e.interrupt ? r : S) : t(o);
1080
+ }
1081
+ function y(o) {
1082
+ return q(o) ? (n.consume(o), y) : R(o);
1083
+ }
1084
+ function _(o) {
1085
+ return o === 47 ? (n.consume(o), R) : o === 58 || o === 95 || tn(o) ? (n.consume(o), F) : q(o) ? (n.consume(o), _) : R(o);
1086
+ }
1087
+ function F(o) {
1088
+ return o === 45 || o === 46 || o === 58 || o === 95 || v(o) ? (n.consume(o), F) : L(o);
1089
+ }
1090
+ function L(o) {
1091
+ return o === 61 ? (n.consume(o), O) : q(o) ? (n.consume(o), L) : _(o);
1092
+ }
1093
+ function O(o) {
1094
+ return o === null || o === 60 || o === 61 || o === 62 || o === 96 ? t(o) : o === 34 || o === 39 ? (n.consume(o), c = o, d) : q(o) ? (n.consume(o), O) : (c = null, P(o));
1095
+ }
1096
+ function d(o) {
1097
+ return o === null || C(o) ? t(o) : o === c ? (n.consume(o), j) : (n.consume(o), d);
1098
+ }
1099
+ function P(o) {
1100
+ return o === null || o === 34 || o === 39 || o === 60 || o === 61 || o === 62 || o === 96 || Y(o) ? L(o) : (n.consume(o), P);
1101
+ }
1102
+ function j(o) {
1103
+ return o === 47 || o === 62 || q(o) ? _(o) : t(o);
1104
+ }
1105
+ function R(o) {
1106
+ return o === 62 ? (n.consume(o), V) : t(o);
1107
+ }
1108
+ function V(o) {
1109
+ return q(o) ? (n.consume(o), V) : o === null || C(o) ? S(o) : t(o);
1110
+ }
1111
+ function S(o) {
1112
+ return o === 45 && u === 2 ? (n.consume(o), G) : o === 60 && u === 1 ? (n.consume(o), nn) : o === 62 && u === 4 ? (n.consume(o), H) : o === 63 && u === 3 ? (n.consume(o), U) : o === 93 && u === 5 ? (n.consume(o), W) : C(o) && (u === 6 || u === 7) ? n.check(we, H, E)(o) : o === null || C(o) ? E(o) : (n.consume(o), S);
1113
+ }
1114
+ function E(o) {
1115
+ return n.exit("htmlFlowData"), A(o);
1116
+ }
1117
+ function A(o) {
1118
+ return o === null ? s(o) : C(o) ? n.attempt({
1119
+ tokenize: Q,
1120
+ partial: !0
1121
+ }, A, s)(o) : (n.enter("htmlFlowData"), S(o));
1122
+ }
1123
+ function Q(o, cn, xn) {
1124
+ return hn;
1125
+ function hn(K) {
1126
+ return o.enter("lineEnding"), o.consume(K), o.exit("lineEnding"), N;
1127
+ }
1128
+ function N(K) {
1129
+ return e.parser.lazy[e.now().line] ? xn(K) : cn(K);
1130
+ }
1131
+ }
1132
+ function G(o) {
1133
+ return o === 45 ? (n.consume(o), U) : S(o);
1134
+ }
1135
+ function nn(o) {
1136
+ return o === 47 ? (n.consume(o), i = "", J) : S(o);
1137
+ }
1138
+ function J(o) {
1139
+ return o === 62 && Yn.includes(i.toLowerCase()) ? (n.consume(o), H) : tn(o) && i.length < 8 ? (n.consume(o), i += String.fromCharCode(o), J) : S(o);
1140
+ }
1141
+ function W(o) {
1142
+ return o === 93 ? (n.consume(o), U) : S(o);
1143
+ }
1144
+ function U(o) {
1145
+ return o === 62 ? (n.consume(o), H) : o === 45 && u === 2 ? (n.consume(o), U) : S(o);
1146
+ }
1147
+ function H(o) {
1148
+ return o === null || C(o) ? (n.exit("htmlFlowData"), s(o)) : (n.consume(o), H);
1149
+ }
1150
+ function s(o) {
1151
+ return n.exit("htmlFlow"), r(o);
1152
+ }
1153
+ }
1154
+ function ze(n, r, t) {
1155
+ return e;
1156
+ function e(u) {
1157
+ return n.exit("htmlFlowData"), n.enter("lineEndingBlank"), n.consume(u), n.exit("lineEndingBlank"), n.attempt(Sn, r, t);
1158
+ }
1159
+ }
1160
+ var Ie = {
1161
+ name: "htmlText",
1162
+ tokenize: Te
1163
+ };
1164
+ function Te(n, r, t) {
1165
+ var e = this;
1166
+ var u, l, i, a;
1167
+ return c;
1168
+ function c(s) {
1169
+ return n.enter("htmlText"), n.enter("htmlTextData"), n.consume(s), p;
1170
+ }
1171
+ function p(s) {
1172
+ return s === 33 ? (n.consume(s), h) : s === 47 ? (n.consume(s), P) : s === 63 ? (n.consume(s), O) : tn(s) ? (n.consume(s), V) : t(s);
1173
+ }
1174
+ function h(s) {
1175
+ return s === 45 ? (n.consume(s), x) : s === 91 ? (n.consume(s), l = "CDATA[", i = 0, D) : tn(s) ? (n.consume(s), L) : t(s);
1176
+ }
1177
+ function x(s) {
1178
+ return s === 45 ? (n.consume(s), g) : t(s);
1179
+ }
1180
+ function g(s) {
1181
+ return s === null || s === 62 ? t(s) : s === 45 ? (n.consume(s), f) : k(s);
1182
+ }
1183
+ function f(s) {
1184
+ return s === null || s === 62 ? t(s) : k(s);
1185
+ }
1186
+ function k(s) {
1187
+ return s === null ? t(s) : s === 45 ? (n.consume(s), B) : C(s) ? (a = k, W(s)) : (n.consume(s), k);
1188
+ }
1189
+ function B(s) {
1190
+ return s === 45 ? (n.consume(s), H) : k(s);
1191
+ }
1192
+ function D(s) {
1193
+ return s === l.charCodeAt(i++) ? (n.consume(s), i === l.length ? y : D) : t(s);
1194
+ }
1195
+ function y(s) {
1196
+ return s === null ? t(s) : s === 93 ? (n.consume(s), _) : C(s) ? (a = y, W(s)) : (n.consume(s), y);
1197
+ }
1198
+ function _(s) {
1199
+ return s === 93 ? (n.consume(s), F) : y(s);
1200
+ }
1201
+ function F(s) {
1202
+ return s === 62 ? H(s) : s === 93 ? (n.consume(s), F) : y(s);
1203
+ }
1204
+ function L(s) {
1205
+ return s === null || s === 62 ? H(s) : C(s) ? (a = L, W(s)) : (n.consume(s), L);
1206
+ }
1207
+ function O(s) {
1208
+ return s === null ? t(s) : s === 63 ? (n.consume(s), d) : C(s) ? (a = O, W(s)) : (n.consume(s), O);
1209
+ }
1210
+ function d(s) {
1211
+ return s === 62 ? H(s) : O(s);
1212
+ }
1213
+ function P(s) {
1214
+ return tn(s) ? (n.consume(s), j) : t(s);
1215
+ }
1216
+ function j(s) {
1217
+ return s === 45 || v(s) ? (n.consume(s), j) : R(s);
1218
+ }
1219
+ function R(s) {
1220
+ return C(s) ? (a = R, W(s)) : q(s) ? (n.consume(s), R) : H(s);
1221
+ }
1222
+ function V(s) {
1223
+ return s === 45 || v(s) ? (n.consume(s), V) : s === 47 || s === 62 || Y(s) ? S(s) : t(s);
1224
+ }
1225
+ function S(s) {
1226
+ return s === 47 ? (n.consume(s), H) : s === 58 || s === 95 || tn(s) ? (n.consume(s), E) : C(s) ? (a = S, W(s)) : q(s) ? (n.consume(s), S) : H(s);
1227
+ }
1228
+ function E(s) {
1229
+ return s === 45 || s === 46 || s === 58 || s === 95 || v(s) ? (n.consume(s), E) : A(s);
1230
+ }
1231
+ function A(s) {
1232
+ return s === 61 ? (n.consume(s), Q) : C(s) ? (a = A, W(s)) : q(s) ? (n.consume(s), A) : S(s);
1233
+ }
1234
+ function Q(s) {
1235
+ return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (n.consume(s), u = s, G) : C(s) ? (a = Q, W(s)) : q(s) ? (n.consume(s), Q) : (n.consume(s), u = void 0, J);
1236
+ }
1237
+ function G(s) {
1238
+ return s === u ? (n.consume(s), nn) : s === null ? t(s) : C(s) ? (a = G, W(s)) : (n.consume(s), G);
1239
+ }
1240
+ function nn(s) {
1241
+ return s === 62 || s === 47 || Y(s) ? S(s) : t(s);
1242
+ }
1243
+ function J(s) {
1244
+ return s === null || s === 34 || s === 39 || s === 60 || s === 61 || s === 96 ? t(s) : s === 62 || Y(s) ? S(s) : (n.consume(s), J);
1245
+ }
1246
+ function W(s) {
1247
+ return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(s), n.exit("lineEnding"), T(n, U, "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
1248
+ }
1249
+ function U(s) {
1250
+ return n.enter("htmlTextData"), a(s);
1251
+ }
1252
+ function H(s) {
1253
+ return s === 62 ? (n.consume(s), n.exit("htmlTextData"), n.exit("htmlText"), r) : t(s);
1254
+ }
1255
+ }
1256
+ var Dn = {
1257
+ name: "labelEnd",
1258
+ tokenize: _e,
1259
+ resolveTo: Pe,
1260
+ resolveAll: De
1261
+ }, Be = {
1262
+ tokenize: Me
1263
+ }, Le = {
1264
+ tokenize: je
1265
+ }, Oe = {
1266
+ tokenize: Re
1267
+ };
1268
+ function De(n) {
1269
+ var r = -1, t;
1270
+ for(; ++r < n.length;)t = n[r][1], (t.type === "labelImage" || t.type === "labelLink" || t.type === "labelEnd") && (n.splice(r + 1, t.type === "labelImage" ? 4 : 2), t.type = "data", r++);
1271
+ return n;
1272
+ }
1273
+ function Pe(n, r) {
1274
+ var t = n.length, e = 0, u, l, i, a;
1275
+ for(; t--;)if (u = n[t][1], l) {
1276
+ if (u.type === "link" || u.type === "labelLink" && u._inactive) break;
1277
+ n[t][0] === "enter" && u.type === "labelLink" && (u._inactive = !0);
1278
+ } else if (i) {
1279
+ if (n[t][0] === "enter" && (u.type === "labelImage" || u.type === "labelLink") && !u._balanced && (l = t, u.type !== "labelLink")) {
1280
+ e = 2;
1281
+ break;
1282
+ }
1283
+ } else u.type === "labelEnd" && (i = t);
1284
+ var c = {
1285
+ type: n[l][1].type === "labelLink" ? "link" : "image",
1286
+ start: Object.assign({}, n[l][1].start),
1287
+ end: Object.assign({}, n[n.length - 1][1].end)
1288
+ }, p = {
1289
+ type: "label",
1290
+ start: Object.assign({}, n[l][1].start),
1291
+ end: Object.assign({}, n[i][1].end)
1292
+ }, h = {
1293
+ type: "labelText",
1294
+ start: Object.assign({}, n[l + e + 2][1].end),
1295
+ end: Object.assign({}, n[i - 2][1].start)
1296
+ };
1297
+ return a = [
1298
+ [
1299
+ "enter",
1300
+ c,
1301
+ r
1302
+ ],
1303
+ [
1304
+ "enter",
1305
+ p,
1306
+ r
1307
+ ]
1308
+ ], a = Z(a, n.slice(l + 1, l + e + 3)), a = Z(a, [
1309
+ [
1310
+ "enter",
1311
+ h,
1312
+ r
1313
+ ]
1314
+ ]), a = Z(a, Ln(r.parser.constructs.insideSpan.null, n.slice(l + e + 4, i - 3), r)), a = Z(a, [
1315
+ [
1316
+ "exit",
1317
+ h,
1318
+ r
1319
+ ],
1320
+ n[i - 2],
1321
+ n[i - 1],
1322
+ [
1323
+ "exit",
1324
+ p,
1325
+ r
1326
+ ]
1327
+ ]), a = Z(a, n.slice(i + 1)), a = Z(a, [
1328
+ [
1329
+ "exit",
1330
+ c,
1331
+ r
1332
+ ]
1333
+ ]), en(n, l, n.length, a), n;
1334
+ }
1335
+ function _e(n, r, t) {
1336
+ var e = this;
1337
+ var u = e.events.length, l, i;
1338
+ for(; u--;)if ((e.events[u][1].type === "labelImage" || e.events[u][1].type === "labelLink") && !e.events[u][1]._balanced) {
1339
+ l = e.events[u][1];
1340
+ break;
1341
+ }
1342
+ return a;
1343
+ function a(h) {
1344
+ return l ? l._inactive ? p(h) : (i = e.parser.defined.includes(fn(e.sliceSerialize({
1345
+ start: l.end,
1346
+ end: e.now()
1347
+ }))), n.enter("labelEnd"), n.enter("labelMarker"), n.consume(h), n.exit("labelMarker"), n.exit("labelEnd"), c) : t(h);
1348
+ }
1349
+ function c(h) {
1350
+ return h === 40 ? n.attempt(Be, r, i ? r : p)(h) : h === 91 ? n.attempt(Le, r, i ? n.attempt(Oe, r, p) : p)(h) : i ? r(h) : p(h);
1351
+ }
1352
+ function p(h) {
1353
+ return l._balanced = !0, t(h);
1354
+ }
1355
+ }
1356
+ function Me(n, r, t) {
1357
+ return e;
1358
+ function e(c) {
1359
+ return n.enter("resource"), n.enter("resourceMarker"), n.consume(c), n.exit("resourceMarker"), dn(n, u);
1360
+ }
1361
+ function u(c) {
1362
+ return c === 41 ? a(c) : ut(n, l, t, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(c);
1363
+ }
1364
+ function l(c) {
1365
+ return Y(c) ? dn(n, i)(c) : a(c);
1366
+ }
1367
+ function i(c) {
1368
+ return c === 34 || c === 39 || c === 40 ? at(n, dn(n, a), t, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(c) : a(c);
1369
+ }
1370
+ function a(c) {
1371
+ return c === 41 ? (n.enter("resourceMarker"), n.consume(c), n.exit("resourceMarker"), n.exit("resource"), r) : t(c);
1372
+ }
1373
+ }
1374
+ function je(n, r, t) {
1375
+ var e = this;
1376
+ return u;
1377
+ function u(i) {
1378
+ return lt.call(e, n, l, t, "reference", "referenceMarker", "referenceString")(i);
1379
+ }
1380
+ function l(i) {
1381
+ return e.parser.defined.includes(fn(e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1))) ? r(i) : t(i);
1382
+ }
1383
+ }
1384
+ function Re(n, r, t) {
1385
+ return e;
1386
+ function e(l) {
1387
+ return n.enter("reference"), n.enter("referenceMarker"), n.consume(l), n.exit("referenceMarker"), u;
1388
+ }
1389
+ function u(l) {
1390
+ return l === 93 ? (n.enter("referenceMarker"), n.consume(l), n.exit("referenceMarker"), n.exit("reference"), r) : t(l);
1391
+ }
1392
+ }
1393
+ var qe = {
1394
+ name: "labelStartImage",
1395
+ tokenize: He,
1396
+ resolveAll: Dn.resolveAll
1397
+ };
1398
+ function He(n, r, t) {
1399
+ var e = this;
1400
+ return u;
1401
+ function u(a) {
1402
+ return n.enter("labelImage"), n.enter("labelImageMarker"), n.consume(a), n.exit("labelImageMarker"), l;
1403
+ }
1404
+ function l(a) {
1405
+ return a === 91 ? (n.enter("labelMarker"), n.consume(a), n.exit("labelMarker"), n.exit("labelImage"), i) : t(a);
1406
+ }
1407
+ function i(a) {
1408
+ return a === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(a) : r(a);
1409
+ }
1410
+ }
1411
+ var Ne = {
1412
+ name: "labelStartLink",
1413
+ tokenize: Ve,
1414
+ resolveAll: Dn.resolveAll
1415
+ };
1416
+ function Ve(n, r, t) {
1417
+ var e = this;
1418
+ return u;
1419
+ function u(i) {
1420
+ return n.enter("labelLink"), n.enter("labelMarker"), n.consume(i), n.exit("labelMarker"), n.exit("labelLink"), l;
1421
+ }
1422
+ function l(i) {
1423
+ return i === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(i) : r(i);
1424
+ }
1425
+ }
1426
+ var Cn = {
1427
+ name: "lineEnding",
1428
+ tokenize: We
1429
+ };
1430
+ function We(n, r) {
1431
+ return t;
1432
+ function t(e) {
1433
+ return n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"), T(n, r, "linePrefix");
1434
+ }
1435
+ }
1436
+ var bn = {
1437
+ name: "thematicBreak",
1438
+ tokenize: Qe
1439
+ };
1440
+ function Qe(n, r, t) {
1441
+ var e = 0, u;
1442
+ return l;
1443
+ function l(c) {
1444
+ return n.enter("thematicBreak"), u = c, i(c);
1445
+ }
1446
+ function i(c) {
1447
+ return c === u ? (n.enter("thematicBreakSequence"), a(c)) : q(c) ? T(n, i, "whitespace")(c) : e < 3 || c !== null && !C(c) ? t(c) : (n.exit("thematicBreak"), r(c));
1448
+ }
1449
+ function a(c) {
1450
+ return c === u ? (n.consume(c), e++, a) : (n.exit("thematicBreakSequence"), i(c));
1451
+ }
1452
+ }
1453
+ var $ = {
1454
+ name: "list",
1455
+ tokenize: Ze,
1456
+ continuation: {
1457
+ tokenize: Ye
1458
+ },
1459
+ exit: Je
1460
+ }, Ue = {
1461
+ tokenize: Ke,
1462
+ partial: !0
1463
+ }, $e = {
1464
+ tokenize: Ge,
1465
+ partial: !0
1466
+ };
1467
+ function Ze(n, r, t) {
1468
+ var e = this, u = e.events[e.events.length - 1];
1469
+ var l = u && u[1].type === "linePrefix" ? u[2].sliceSerialize(u[1], !0).length : 0, i = 0;
1470
+ return a;
1471
+ function a(f) {
1472
+ var k = e.containerState.type || (f === 42 || f === 43 || f === 45 ? "listUnordered" : "listOrdered");
1473
+ if (k === "listUnordered" ? !e.containerState.marker || f === e.containerState.marker : An(f)) {
1474
+ if (e.containerState.type || (e.containerState.type = k, n.enter(k, {
1475
+ _container: !0
1476
+ })), k === "listUnordered") return n.enter("listItemPrefix"), f === 42 || f === 45 ? n.check(bn, t, p)(f) : p(f);
1477
+ if (!e.interrupt || f === 49) return n.enter("listItemPrefix"), n.enter("listItemValue"), c(f);
1478
+ }
1479
+ return t(f);
1480
+ }
1481
+ function c(f) {
1482
+ return An(f) && ++i < 10 ? (n.consume(f), c) : (!e.interrupt || i < 2) && (e.containerState.marker ? f === e.containerState.marker : f === 41 || f === 46) ? (n.exit("listItemValue"), p(f)) : t(f);
1483
+ }
1484
+ function p(f) {
1485
+ return n.enter("listItemMarker"), n.consume(f), n.exit("listItemMarker"), e.containerState.marker = e.containerState.marker || f, n.check(Sn, // Can’t be empty when interrupting.
1486
+ e.interrupt ? t : h, n.attempt(Ue, g, x));
1487
+ }
1488
+ function h(f) {
1489
+ return e.containerState.initialBlankLine = !0, l++, g(f);
1490
+ }
1491
+ function x(f) {
1492
+ return q(f) ? (n.enter("listItemPrefixWhitespace"), n.consume(f), n.exit("listItemPrefixWhitespace"), g) : t(f);
1493
+ }
1494
+ function g(f) {
1495
+ return e.containerState.size = l + e.sliceSerialize(n.exit("listItemPrefix"), !0).length, r(f);
1496
+ }
1497
+ }
1498
+ function Ye(n, r, t) {
1499
+ var e = this;
1500
+ return e.containerState._closeFlow = void 0, n.check(Sn, u, l);
1501
+ function u(a) {
1502
+ return e.containerState.furtherBlankLines = e.containerState.furtherBlankLines || e.containerState.initialBlankLine, T(n, r, "listItemIndent", e.containerState.size + 1)(a);
1503
+ }
1504
+ function l(a) {
1505
+ return e.containerState.furtherBlankLines || !q(a) ? (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, i(a)) : (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, n.attempt($e, r, i)(a));
1506
+ }
1507
+ function i(a) {
1508
+ return e.containerState._closeFlow = !0, e.interrupt = void 0, T(n, n.attempt($, r, t), "linePrefix", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(a);
1509
+ }
1510
+ }
1511
+ function Ge(n, r, t) {
1512
+ var e = this;
1513
+ return T(n, u, "listItemIndent", e.containerState.size + 1);
1514
+ function u(l) {
1515
+ var i = e.events[e.events.length - 1];
1516
+ return i && i[1].type === "listItemIndent" && i[2].sliceSerialize(i[1], !0).length === e.containerState.size ? r(l) : t(l);
1517
+ }
1518
+ }
1519
+ function Je(n) {
1520
+ n.exit(this.containerState.type);
1521
+ }
1522
+ function Ke(n, r, t) {
1523
+ var e = this;
1524
+ return T(n, u, "listItemPrefixWhitespace", e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1);
1525
+ function u(l) {
1526
+ var i = e.events[e.events.length - 1];
1527
+ return !q(l) && i && i[1].type === "listItemPrefixWhitespace" ? r(l) : t(l);
1528
+ }
1529
+ }
1530
+ var Gn = {
1531
+ name: "setextUnderline",
1532
+ tokenize: ve,
1533
+ resolveTo: Xe
1534
+ };
1535
+ function Xe(n, r) {
1536
+ var t = n.length, e, u, l;
1537
+ for(; t--;)if (n[t][0] === "enter") {
1538
+ if (n[t][1].type === "content") {
1539
+ e = t;
1540
+ break;
1541
+ }
1542
+ n[t][1].type === "paragraph" && (u = t);
1543
+ } else n[t][1].type === "content" && n.splice(t, 1), !l && n[t][1].type === "definition" && (l = t);
1544
+ var i = {
1545
+ type: "setextHeading",
1546
+ start: Object.assign({}, n[u][1].start),
1547
+ end: Object.assign({}, n[n.length - 1][1].end)
1548
+ };
1549
+ return n[u][1].type = "setextHeadingText", l ? (n.splice(u, 0, [
1550
+ "enter",
1551
+ i,
1552
+ r
1553
+ ]), n.splice(l + 1, 0, [
1554
+ "exit",
1555
+ n[e][1],
1556
+ r
1557
+ ]), n[e][1].end = Object.assign({}, n[l][1].end)) : n[e][1] = i, n.push([
1558
+ "exit",
1559
+ i,
1560
+ r
1561
+ ]), n;
1562
+ }
1563
+ function ve(n, r, t) {
1564
+ var e = this;
1565
+ var u = e.events.length, l, i;
1566
+ for(; u--;)if (e.events[u][1].type !== "lineEnding" && e.events[u][1].type !== "linePrefix" && e.events[u][1].type !== "content") {
1567
+ i = e.events[u][1].type === "paragraph";
1568
+ break;
1569
+ }
1570
+ return a;
1571
+ function a(h) {
1572
+ return !e.parser.lazy[e.now().line] && (e.interrupt || i) ? (n.enter("setextHeadingLine"), n.enter("setextHeadingLineSequence"), l = h, c(h)) : t(h);
1573
+ }
1574
+ function c(h) {
1575
+ return h === l ? (n.consume(h), c) : (n.exit("setextHeadingLineSequence"), T(n, p, "lineSuffix")(h));
1576
+ }
1577
+ function p(h) {
1578
+ return h === null || C(h) ? (n.exit("setextHeadingLine"), r(h)) : t(h);
1579
+ }
1580
+ }
1581
+ var nr = {
1582
+ tokenize: tr
1583
+ };
1584
+ function tr(n) {
1585
+ var r = this, t = n.attempt(// Try to parse a blank line.
1586
+ Sn, e, // Try to parse initial flow (essentially, only code).
1587
+ n.attempt(this.parser.constructs.flowInitial, u, T(n, n.attempt(this.parser.constructs.flow, u, n.attempt(oe, u)), "linePrefix")));
1588
+ return t;
1589
+ function e(l) {
1590
+ if (l === null) {
1591
+ n.consume(l);
1592
+ return;
1593
+ }
1594
+ return n.enter("lineEndingBlank"), n.consume(l), n.exit("lineEndingBlank"), r.currentConstruct = void 0, t;
1595
+ }
1596
+ function u(l) {
1597
+ if (l === null) {
1598
+ n.consume(l);
1599
+ return;
1600
+ }
1601
+ return n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), r.currentConstruct = void 0, t;
1602
+ }
1603
+ }
1604
+ var er = {
1605
+ resolveAll: st()
1606
+ }, rr = ot("string"), ir = ot("text");
1607
+ function ot(n) {
1608
+ return {
1609
+ tokenize: r,
1610
+ resolveAll: st(n === "text" ? ur : void 0)
1611
+ };
1612
+ function r(t) {
1613
+ var e = this, u = this.parser.constructs[n], l = t.attempt(u, i, a);
1614
+ return i;
1615
+ function i(h) {
1616
+ return p(h) ? l(h) : a(h);
1617
+ }
1618
+ function a(h) {
1619
+ if (h === null) {
1620
+ t.consume(h);
1621
+ return;
1622
+ }
1623
+ return t.enter("data"), t.consume(h), c;
1624
+ }
1625
+ function c(h) {
1626
+ return p(h) ? (t.exit("data"), l(h)) : (t.consume(h), c);
1627
+ }
1628
+ function p(h) {
1629
+ if (h === null) return !0;
1630
+ var x = u[h];
1631
+ var g = -1;
1632
+ if (x) for(; ++g < x.length;){
1633
+ var f = x[g];
1634
+ if (!f.previous || f.previous.call(e, e.previous)) return !0;
1635
+ }
1636
+ return !1;
1637
+ }
1638
+ }
1639
+ }
1640
+ function st(n) {
1641
+ return r;
1642
+ function r(t, e) {
1643
+ var u = -1, l;
1644
+ for(; ++u <= t.length;)l === void 0 ? t[u] && t[u][1].type === "data" && (l = u, u++) : (!t[u] || t[u][1].type !== "data") && (u !== l + 2 && (t[l][1].end = t[u - 1][1].end, t.splice(l + 2, u - l - 2), u = l + 2), l = void 0);
1645
+ return n ? n(t, e) : t;
1646
+ }
1647
+ }
1648
+ function ur(n, r) {
1649
+ var t = 0;
1650
+ for(; ++t <= n.length;)if ((t === n.length || n[t][1].type === "lineEnding") && n[t - 1][1].type === "data") {
1651
+ var e = n[t - 1][1], u = r.sliceStream(e);
1652
+ var l = u.length, i = -1, a = 0, c = void 0;
1653
+ for(; l--;){
1654
+ var p = u[l];
1655
+ if (typeof p == "string") {
1656
+ for(i = p.length; p.charCodeAt(i - 1) === 32;)a++, i--;
1657
+ if (i) break;
1658
+ i = -1;
1659
+ } else if (p === -2) c = !0, a++;
1660
+ else if (p !== -1) {
1661
+ l++;
1662
+ break;
1663
+ }
1664
+ }
1665
+ if (a) {
1666
+ var p1 = {
1667
+ type: t === n.length || c || a < 2 ? "lineSuffix" : "hardBreakTrailing",
1668
+ start: {
1669
+ line: e.end.line,
1670
+ column: e.end.column - a,
1671
+ offset: e.end.offset - a,
1672
+ _index: e.start._index + l,
1673
+ _bufferIndex: l ? i : e.start._bufferIndex + i
1674
+ },
1675
+ end: Object.assign({}, e.end)
1676
+ };
1677
+ e.end = Object.assign({}, p1.start), e.start.offset === e.end.offset ? Object.assign(e, p1) : (n.splice(t, 0, [
1678
+ "enter",
1679
+ p1,
1680
+ r
1681
+ ], [
1682
+ "exit",
1683
+ p1,
1684
+ r
1685
+ ]), t += 2);
1686
+ }
1687
+ t++;
1688
+ }
1689
+ return n;
1690
+ }
1691
+ function lr(n, r, t) {
1692
+ var e = Object.assign(t ? Object.assign({}, t) : {
1693
+ line: 1,
1694
+ column: 1,
1695
+ offset: 0
1696
+ }, {
1697
+ _index: 0,
1698
+ _bufferIndex: -1
1699
+ });
1700
+ var u = {}, l = [];
1701
+ var i = [], a = [];
1702
+ var c = {
1703
+ consume: _,
1704
+ enter: F,
1705
+ exit: L,
1706
+ attempt: P(O),
1707
+ check: P(d),
1708
+ interrupt: P(d, {
1709
+ interrupt: !0
1710
+ })
1711
+ }, p = {
1712
+ previous: null,
1713
+ code: null,
1714
+ containerState: {},
1715
+ events: [],
1716
+ parser: n,
1717
+ sliceStream: f,
1718
+ sliceSerialize: g,
1719
+ now: k,
1720
+ defineSkip: B,
1721
+ write: x
1722
+ };
1723
+ var h = r.tokenize.call(p, c);
1724
+ return r.resolveAll && l.push(r), p;
1725
+ function x(S) {
1726
+ return i = Z(i, S), D(), i[i.length - 1] !== null ? [] : (j(r, 0), p.events = Ln(l, p.events, p), p.events);
1727
+ }
1728
+ function g(S, E) {
1729
+ return or(f(S), E);
1730
+ }
1731
+ function f(S) {
1732
+ return ar(i, S);
1733
+ }
1734
+ function k() {
1735
+ return Object.assign({}, e);
1736
+ }
1737
+ function B(S) {
1738
+ u[S.line] = S.column, V();
1739
+ }
1740
+ function D() {
1741
+ var S;
1742
+ for(; e._index < i.length;){
1743
+ var E = i[e._index];
1744
+ if (typeof E == "string") for(S = e._index, e._bufferIndex < 0 && (e._bufferIndex = 0); e._index === S && e._bufferIndex < E.length;)y(E.charCodeAt(e._bufferIndex));
1745
+ else y(E);
1746
+ }
1747
+ }
1748
+ function y(S) {
1749
+ h = h(S);
1750
+ }
1751
+ function _(S) {
1752
+ C(S) ? (e.line++, e.column = 1, e.offset += S === -3 ? 2 : 1, V()) : S !== -1 && (e.column++, e.offset++), e._bufferIndex < 0 ? e._index++ : (e._bufferIndex++, e._bufferIndex === i[e._index].length && (e._bufferIndex = -1, e._index++)), p.previous = S;
1753
+ }
1754
+ function F(S, E) {
1755
+ var A = E || {};
1756
+ return A.type = S, A.start = k(), p.events.push([
1757
+ "enter",
1758
+ A,
1759
+ p
1760
+ ]), a.push(A), A;
1761
+ }
1762
+ function L(S) {
1763
+ var E = a.pop();
1764
+ return E.end = k(), p.events.push([
1765
+ "exit",
1766
+ E,
1767
+ p
1768
+ ]), E;
1769
+ }
1770
+ function O(S, E) {
1771
+ j(S, E.from);
1772
+ }
1773
+ function d(S, E) {
1774
+ E.restore();
1775
+ }
1776
+ function P(S, E) {
1777
+ return A;
1778
+ function A(Q, G, nn) {
1779
+ var J, W, U, H;
1780
+ return Array.isArray(Q) ? /* c8 ignore next 1 */ o(Q) : "tokenize" in Q ? o([
1781
+ Q
1782
+ ]) : s(Q);
1783
+ function s(N) {
1784
+ return K;
1785
+ function K(ln) {
1786
+ var pn = ln !== null && N[ln], mn = ln !== null && N.null, Fn = // To do: add more extension tests.
1787
+ /* c8 ignore next 2 */ _to_consumable_array(Array.isArray(pn) ? pn : pn ? [
1788
+ pn
1789
+ ] : []).concat(_to_consumable_array(Array.isArray(mn) ? mn : mn ? [
1790
+ mn
1791
+ ] : []));
1792
+ return o(Fn)(ln);
1793
+ }
1794
+ }
1795
+ function o(N) {
1796
+ return J = N, W = 0, N.length === 0 ? nn : cn(N[W]);
1797
+ }
1798
+ function cn(N) {
1799
+ return K;
1800
+ function K(ln) {
1801
+ return H = R(), U = N, N.partial || (p.currentConstruct = N), N.name && p.parser.constructs.disable.null.includes(N.name) ? hn() : N.tokenize.call(// If we do have fields, create an object w/ `context` as its
1802
+ // prototype.
1803
+ // This allows a “live binding”, which is needed for `interrupt`.
1804
+ E ? Object.assign(Object.create(p), E) : p, c, xn, hn)(ln);
1805
+ }
1806
+ }
1807
+ function xn(N) {
1808
+ return S(U, H), G;
1809
+ }
1810
+ function hn(N) {
1811
+ return H.restore(), ++W < J.length ? cn(J[W]) : nn;
1812
+ }
1813
+ }
1814
+ }
1815
+ function j(S, E) {
1816
+ S.resolveAll && !l.includes(S) && l.push(S), S.resolve && en(p.events, E, p.events.length - E, S.resolve(p.events.slice(E), p)), S.resolveTo && (p.events = S.resolveTo(p.events, p));
1817
+ }
1818
+ function R() {
1819
+ var S = k(), E = p.previous, A = p.currentConstruct, Q = p.events.length, G = Array.from(a);
1820
+ return {
1821
+ restore: nn,
1822
+ from: Q
1823
+ };
1824
+ function nn() {
1825
+ e = S, p.previous = E, p.currentConstruct = A, p.events.length = Q, a = G, V();
1826
+ }
1827
+ }
1828
+ function V() {
1829
+ e.line in u && e.column < 2 && (e.column = u[e.line], e.offset += u[e.line] - 1);
1830
+ }
1831
+ }
1832
+ function ar(n, r) {
1833
+ var t = r.start._index, e = r.start._bufferIndex, u = r.end._index, l = r.end._bufferIndex;
1834
+ var i;
1835
+ return t === u ? i = [
1836
+ n[t].slice(e, l)
1837
+ ] : (i = n.slice(t, u), e > -1 && (i[0] = i[0].slice(e)), l > 0 && i.push(n[u].slice(0, l))), i;
1838
+ }
1839
+ function or(n, r) {
1840
+ var t = -1;
1841
+ var e = [];
1842
+ var u;
1843
+ for(; ++t < n.length;){
1844
+ var l = n[t];
1845
+ var i = void 0;
1846
+ if (typeof l == "string") i = l;
1847
+ else switch(l){
1848
+ case -5:
1849
+ {
1850
+ i = "\r";
1851
+ break;
1852
+ }
1853
+ case -4:
1854
+ {
1855
+ i = "\n";
1856
+ break;
1857
+ }
1858
+ case -3:
1859
+ {
1860
+ i = "\r\n";
1861
+ break;
1862
+ }
1863
+ case -2:
1864
+ {
1865
+ i = r ? " " : " ";
1866
+ break;
1867
+ }
1868
+ case -1:
1869
+ {
1870
+ if (!r && u) continue;
1871
+ i = " ";
1872
+ break;
1873
+ }
1874
+ default:
1875
+ i = String.fromCharCode(l);
1876
+ }
1877
+ u = l === -2, e.push(i);
1878
+ }
1879
+ return e.join("");
1880
+ }
1881
+ var _obj, _obj1, _obj2, _obj3, _obj4;
1882
+ var sr = (_obj = {}, _define_property(_obj, 42, $), _define_property(_obj, 43, $), _define_property(_obj, 45, $), _define_property(_obj, 48, $), _define_property(_obj, 49, $), _define_property(_obj, 50, $), _define_property(_obj, 51, $), _define_property(_obj, 52, $), _define_property(_obj, 53, $), _define_property(_obj, 54, $), _define_property(_obj, 55, $), _define_property(_obj, 56, $), _define_property(_obj, 57, $), _define_property(_obj, 62, tt), _obj), cr = _define_property({}, 91, me), hr = (_obj1 = {}, _define_property(_obj1, -2, wn), _define_property(_obj1, -1, wn), _define_property(_obj1, 32, wn), _obj1), pr = (_obj2 = {}, _define_property(_obj2, 35, be), _define_property(_obj2, 42, bn), _define_property(_obj2, 45, [
1883
+ Gn,
1884
+ bn
1885
+ ]), _define_property(_obj2, 60, Ee), _define_property(_obj2, 61, Gn), _define_property(_obj2, 95, bn), _define_property(_obj2, 96, Zn), _define_property(_obj2, 126, Zn), _obj2), mr = (_obj3 = {}, _define_property(_obj3, 38, rt), _define_property(_obj3, 92, et), _obj3), fr = (_obj4 = {}, _define_property(_obj4, -5, Cn), _define_property(_obj4, -4, Cn), _define_property(_obj4, -3, Cn), _define_property(_obj4, 33, qe), _define_property(_obj4, 38, rt), _define_property(_obj4, 42, In), _define_property(_obj4, 60, [
1886
+ Ut,
1887
+ Ie
1888
+ ]), _define_property(_obj4, 91, Ne), _define_property(_obj4, 92, [
1889
+ ke,
1890
+ et
1891
+ ]), _define_property(_obj4, 93, Dn), _define_property(_obj4, 95, In), _define_property(_obj4, 96, re), _obj4), xr = {
1892
+ null: [
1893
+ In,
1894
+ er
1895
+ ]
1896
+ }, gr = {
1897
+ null: [
1898
+ 42,
1899
+ 95
1900
+ ]
1901
+ }, kr = {
1902
+ null: []
1903
+ }, dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1904
+ __proto__: null,
1905
+ attentionMarkers: gr,
1906
+ contentInitial: cr,
1907
+ disable: kr,
1908
+ document: sr,
1909
+ flow: pr,
1910
+ flowInitial: hr,
1911
+ insideSpan: xr,
1912
+ string: mr,
1913
+ text: fr
1914
+ }, Symbol.toStringTag, {
1915
+ value: "Module"
1916
+ }));
1917
+ function br() {
1918
+ var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1919
+ var r = Bt(// @ts-expect-error Same as above.
1920
+ [
1921
+ dr
1922
+ ].concat(n.extensions || [])), t = {
1923
+ defined: [],
1924
+ lazy: {},
1925
+ constructs: r,
1926
+ content: e(Rt),
1927
+ document: e(Ht),
1928
+ flow: e(nr),
1929
+ string: e(rr),
1930
+ text: e(ir)
1931
+ };
1932
+ return t;
1933
+ function e(u) {
1934
+ return l;
1935
+ function l(i) {
1936
+ return lr(t, u, i);
1937
+ }
1938
+ }
1939
+ }
1940
+ var Jn = /[\0\t\n\r]/g;
1941
+ function yr() {
1942
+ var n = 1, r = "", t = !0, e;
1943
+ return u;
1944
+ function u(l, i, a) {
1945
+ var c = [];
1946
+ var p, h, x, g, f;
1947
+ for(l = r + l.toString(i), x = 0, r = "", t && (l.charCodeAt(0) === 65279 && x++, t = void 0); x < l.length;){
1948
+ if (Jn.lastIndex = x, p = Jn.exec(l), g = p && p.index !== void 0 ? p.index : l.length, f = l.charCodeAt(g), !p) {
1949
+ r = l.slice(x);
1950
+ break;
1951
+ }
1952
+ if (f === 10 && x === g && e) c.push(-3), e = void 0;
1953
+ else switch(e && (c.push(-5), e = void 0), x < g && (c.push(l.slice(x, g)), n += g - x), f){
1954
+ case 0:
1955
+ {
1956
+ c.push(65533), n++;
1957
+ break;
1958
+ }
1959
+ case 9:
1960
+ {
1961
+ for(h = Math.ceil(n / 4) * 4, c.push(-2); n++ < h;)c.push(-1);
1962
+ break;
1963
+ }
1964
+ case 10:
1965
+ {
1966
+ c.push(-4), n = 1;
1967
+ break;
1968
+ }
1969
+ default:
1970
+ e = !0, n = 1;
1971
+ }
1972
+ x = g + 1;
1973
+ }
1974
+ return a && (e && c.push(-5), r && c.push(r), c.push(null)), c;
1975
+ }
1976
+ }
1977
+ function Sr(n) {
1978
+ for(; !it(n););
1979
+ return n;
1980
+ }
1981
+ function ct(n, r) {
1982
+ var t = Number.parseInt(n, r);
1983
+ return(// C0 except for HT, LF, FF, CR, space
1984
+ t < 9 || t === 11 || t > 13 && t < 32 || // Control character (DEL) of the basic block and C1 controls.
1985
+ t > 126 && t < 160 || // Lone high surrogates and low surrogates.
1986
+ t > 55295 && t < 57344 || // Noncharacters.
1987
+ t > 64975 && t < 65008 || (t & 65535) === 65535 || (t & 65535) === 65534 || // Out of range
1988
+ t > 1114111 ? "�" : String.fromCharCode(t));
1989
+ }
1990
+ var Fr = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
1991
+ function Er(n) {
1992
+ return n.replace(Fr, wr);
1993
+ }
1994
+ function wr(n, r, t) {
1995
+ if (r) return r;
1996
+ if (t.charCodeAt(0) === 35) {
1997
+ var u = t.charCodeAt(1), l = u === 120 || u === 88;
1998
+ return ct(t.slice(l ? 2 : 1), l ? 16 : 10);
1999
+ }
2000
+ return On(t) || n;
2001
+ }
2002
+ function yn(n) {
2003
+ return !n || typeof n != "object" ? "" : "position" in n || "type" in n ? Kn(n.position) : "start" in n || "end" in n ? Kn(n) : "line" in n || "column" in n ? Tn(n) : "";
2004
+ }
2005
+ function Tn(n) {
2006
+ return Xn(n && n.line) + ":" + Xn(n && n.column);
2007
+ }
2008
+ function Kn(n) {
2009
+ return Tn(n && n.start) + "-" + Tn(n && n.end);
2010
+ }
2011
+ function Xn(n) {
2012
+ return n && typeof n == "number" ? n : 1;
2013
+ }
2014
+ var ht = {}.hasOwnProperty, pt = /**
2015
+ * @type {(
2016
+ * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &
2017
+ * ((value: Value, options?: Options | null | undefined) => Root)
2018
+ * )}
2019
+ */ /**
2020
+ * @param {Value} value
2021
+ * @param {Encoding | Options | null | undefined} [encoding]
2022
+ * @param {Options | null | undefined} [options]
2023
+ * @returns {Root}
2024
+ */ function pt(n, r, t) {
2025
+ return typeof r != "string" && (t = r, r = void 0), Cr(t)(Sr(// @ts-expect-error: micromark types need to accept `null`.
2026
+ br(t).document().write(yr()(n, r, !0))));
2027
+ };
2028
+ function Cr(n) {
2029
+ var r = {
2030
+ transforms: [],
2031
+ canContainEols: [
2032
+ "emphasis",
2033
+ "fragment",
2034
+ "heading",
2035
+ "paragraph",
2036
+ "strong"
2037
+ ],
2038
+ enter: {
2039
+ autolink: a(Rn),
2040
+ autolinkProtocol: S,
2041
+ autolinkEmail: S,
2042
+ atxHeading: a(_n),
2043
+ blockQuote: a(Fn),
2044
+ characterEscape: S,
2045
+ characterReference: S,
2046
+ codeFenced: a(Pn),
2047
+ codeFencedFenceInfo: c,
2048
+ codeFencedFenceMeta: c,
2049
+ codeIndented: a(Pn, c),
2050
+ codeText: a(kt, c),
2051
+ codeTextData: S,
2052
+ data: S,
2053
+ codeFlowValue: S,
2054
+ definition: a(dt),
2055
+ definitionDestinationString: c,
2056
+ definitionLabelString: c,
2057
+ definitionTitleString: c,
2058
+ emphasis: a(bt),
2059
+ hardBreakEscape: a(Mn),
2060
+ hardBreakTrailing: a(Mn),
2061
+ htmlFlow: a(jn, c),
2062
+ htmlFlowData: S,
2063
+ htmlText: a(jn, c),
2064
+ htmlTextData: S,
2065
+ image: a(yt),
2066
+ label: c,
2067
+ link: a(Rn),
2068
+ listItem: a(St),
2069
+ listItemValue: k,
2070
+ listOrdered: a(qn, f),
2071
+ listUnordered: a(qn),
2072
+ paragraph: a(Ft),
2073
+ reference: hn,
2074
+ referenceString: c,
2075
+ resourceDestinationString: c,
2076
+ resourceTitleString: c,
2077
+ setextHeading: a(_n),
2078
+ strong: a(Et),
2079
+ thematicBreak: a(Ct)
2080
+ },
2081
+ exit: {
2082
+ atxHeading: h(),
2083
+ atxHeadingSequence: P,
2084
+ autolink: h(),
2085
+ autolinkEmail: mn,
2086
+ autolinkProtocol: pn,
2087
+ blockQuote: h(),
2088
+ characterEscapeValue: E,
2089
+ characterReferenceMarkerHexadecimal: K,
2090
+ characterReferenceMarkerNumeric: K,
2091
+ characterReferenceValue: ln,
2092
+ codeFenced: h(_),
2093
+ codeFencedFence: y,
2094
+ codeFencedFenceInfo: B,
2095
+ codeFencedFenceMeta: D,
2096
+ codeFlowValue: E,
2097
+ codeIndented: h(F),
2098
+ codeText: h(J),
2099
+ codeTextData: E,
2100
+ data: E,
2101
+ definition: h(),
2102
+ definitionDestinationString: d,
2103
+ definitionLabelString: L,
2104
+ definitionTitleString: O,
2105
+ emphasis: h(),
2106
+ hardBreakEscape: h(Q),
2107
+ hardBreakTrailing: h(Q),
2108
+ htmlFlow: h(G),
2109
+ htmlFlowData: E,
2110
+ htmlText: h(nn),
2111
+ htmlTextData: E,
2112
+ image: h(U),
2113
+ label: s,
2114
+ labelText: H,
2115
+ lineEnding: A,
2116
+ link: h(W),
2117
+ listItem: h(),
2118
+ listOrdered: h(),
2119
+ listUnordered: h(),
2120
+ paragraph: h(),
2121
+ referenceString: N,
2122
+ resourceDestinationString: o,
2123
+ resourceTitleString: cn,
2124
+ resource: xn,
2125
+ setextHeading: h(V),
2126
+ setextHeadingLineSequence: R,
2127
+ setextHeadingText: j,
2128
+ strong: h(),
2129
+ thematicBreak: h()
2130
+ }
2131
+ };
2132
+ mt(r, (n || {}).mdastExtensions || []);
2133
+ var t = {};
2134
+ return e;
2135
+ function e(m) {
2136
+ var b = {
2137
+ type: "root",
2138
+ children: []
2139
+ };
2140
+ var w = {
2141
+ stack: [
2142
+ b
2143
+ ],
2144
+ tokenStack: [],
2145
+ config: r,
2146
+ enter: p,
2147
+ exit: x,
2148
+ buffer: c,
2149
+ resume: g,
2150
+ setData: l,
2151
+ getData: i
2152
+ }, z = [];
2153
+ var I = -1;
2154
+ for(; ++I < m.length;)if (m[I][1].type === "listOrdered" || m[I][1].type === "listUnordered") if (m[I][0] === "enter") z.push(I);
2155
+ else {
2156
+ var X = z.pop();
2157
+ I = u(m, X, I);
2158
+ }
2159
+ for(I = -1; ++I < m.length;){
2160
+ var X1 = r[m[I][0]];
2161
+ ht.call(X1, m[I][1].type) && X1[m[I][1].type].call(Object.assign({
2162
+ sliceSerialize: m[I][2].sliceSerialize
2163
+ }, w), m[I][1]);
2164
+ }
2165
+ if (w.tokenStack.length > 0) {
2166
+ var X2 = w.tokenStack[w.tokenStack.length - 1];
2167
+ (X2[1] || vn).call(w, void 0, X2[0]);
2168
+ }
2169
+ for(b.position = {
2170
+ start: on(m.length > 0 ? m[0][1].start : {
2171
+ line: 1,
2172
+ column: 1,
2173
+ offset: 0
2174
+ }),
2175
+ end: on(m.length > 0 ? m[m.length - 2][1].end : {
2176
+ line: 1,
2177
+ column: 1,
2178
+ offset: 0
2179
+ })
2180
+ }, I = -1; ++I < r.transforms.length;)b = r.transforms[I](b) || b;
2181
+ return b;
2182
+ }
2183
+ function u(m, b, w) {
2184
+ var z = b - 1, I = -1, X = !1, an, rn, gn, kn;
2185
+ for(; ++z <= w;){
2186
+ var M = m[z];
2187
+ if (M[1].type === "listUnordered" || M[1].type === "listOrdered" || M[1].type === "blockQuote" ? (M[0] === "enter" ? I++ : I--, kn = void 0) : M[1].type === "lineEndingBlank" ? M[0] === "enter" && (an && !kn && !I && !gn && (gn = z), kn = void 0) : M[1].type === "linePrefix" || M[1].type === "listItemValue" || M[1].type === "listItemMarker" || M[1].type === "listItemPrefix" || M[1].type === "listItemPrefixWhitespace" || (kn = void 0), !I && M[0] === "enter" && M[1].type === "listItemPrefix" || I === -1 && M[0] === "exit" && (M[1].type === "listUnordered" || M[1].type === "listOrdered")) {
2188
+ if (an) {
2189
+ var En = z;
2190
+ for(rn = void 0; En--;){
2191
+ var un = m[En];
2192
+ if (un[1].type === "lineEnding" || un[1].type === "lineEndingBlank") {
2193
+ if (un[0] === "exit") continue;
2194
+ rn && (m[rn][1].type = "lineEndingBlank", X = !0), un[1].type = "lineEnding", rn = En;
2195
+ } else if (!(un[1].type === "linePrefix" || un[1].type === "blockQuotePrefix" || un[1].type === "blockQuotePrefixWhitespace" || un[1].type === "blockQuoteMarker" || un[1].type === "listItemIndent")) break;
2196
+ }
2197
+ gn && (!rn || gn < rn) && (an._spread = !0), an.end = Object.assign({}, rn ? m[rn][1].start : M[1].end), m.splice(rn || z, 0, [
2198
+ "exit",
2199
+ an,
2200
+ M[2]
2201
+ ]), z++, w++;
2202
+ }
2203
+ M[1].type === "listItemPrefix" && (an = {
2204
+ type: "listItem",
2205
+ // @ts-expect-error Patched
2206
+ _spread: !1,
2207
+ start: Object.assign({}, M[1].start)
2208
+ }, m.splice(z, 0, [
2209
+ "enter",
2210
+ an,
2211
+ M[2]
2212
+ ]), z++, w++, gn = void 0, kn = !0);
2213
+ }
2214
+ }
2215
+ return m[b][1]._spread = X, w;
2216
+ }
2217
+ function l(m, b) {
2218
+ t[m] = b;
2219
+ }
2220
+ function i(m) {
2221
+ return t[m];
2222
+ }
2223
+ function a(m, b) {
2224
+ return w;
2225
+ function w(z) {
2226
+ p.call(this, m(z), z), b && b.call(this, z);
2227
+ }
2228
+ }
2229
+ function c() {
2230
+ this.stack.push({
2231
+ type: "fragment",
2232
+ children: []
2233
+ });
2234
+ }
2235
+ function p(m, b, w) {
2236
+ return this.stack[this.stack.length - 1].children.push(m), this.stack.push(m), this.tokenStack.push([
2237
+ b,
2238
+ w
2239
+ ]), m.position = {
2240
+ start: on(b.start)
2241
+ }, m;
2242
+ }
2243
+ function h(m) {
2244
+ return b;
2245
+ function b(w) {
2246
+ m && m.call(this, w), x.call(this, w);
2247
+ }
2248
+ }
2249
+ function x(m, b) {
2250
+ var w = this.stack.pop(), z = this.tokenStack.pop();
2251
+ if (z) z[0].type !== m.type && (b ? b.call(this, m, z[0]) : (z[1] || vn).call(this, m, z[0]));
2252
+ else throw new Error("Cannot close `" + m.type + "` (" + yn({
2253
+ start: m.start,
2254
+ end: m.end
2255
+ }) + "): it’s not open");
2256
+ return w.position.end = on(m.end), w;
2257
+ }
2258
+ function g() {
2259
+ return Tt(this.stack.pop());
2260
+ }
2261
+ function f() {
2262
+ l("expectingFirstListItemValue", !0);
2263
+ }
2264
+ function k(m) {
2265
+ if (i("expectingFirstListItemValue")) {
2266
+ var b = this.stack[this.stack.length - 2];
2267
+ b.start = Number.parseInt(this.sliceSerialize(m), 10), l("expectingFirstListItemValue");
2268
+ }
2269
+ }
2270
+ function B() {
2271
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2272
+ b.lang = m;
2273
+ }
2274
+ function D() {
2275
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2276
+ b.meta = m;
2277
+ }
2278
+ function y() {
2279
+ i("flowCodeInside") || (this.buffer(), l("flowCodeInside", !0));
2280
+ }
2281
+ function _() {
2282
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2283
+ b.value = m.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), l("flowCodeInside");
2284
+ }
2285
+ function F() {
2286
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2287
+ b.value = m.replace(/(\r?\n|\r)$/g, "");
2288
+ }
2289
+ function L(m) {
2290
+ var b = this.resume(), w = this.stack[this.stack.length - 1];
2291
+ w.label = b, w.identifier = fn(this.sliceSerialize(m)).toLowerCase();
2292
+ }
2293
+ function O() {
2294
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2295
+ b.title = m;
2296
+ }
2297
+ function d() {
2298
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2299
+ b.url = m;
2300
+ }
2301
+ function P(m) {
2302
+ var b = this.stack[this.stack.length - 1];
2303
+ if (!b.depth) {
2304
+ var w = this.sliceSerialize(m).length;
2305
+ b.depth = w;
2306
+ }
2307
+ }
2308
+ function j() {
2309
+ l("setextHeadingSlurpLineEnding", !0);
2310
+ }
2311
+ function R(m) {
2312
+ var b = this.stack[this.stack.length - 1];
2313
+ b.depth = this.sliceSerialize(m).charCodeAt(0) === 61 ? 1 : 2;
2314
+ }
2315
+ function V() {
2316
+ l("setextHeadingSlurpLineEnding");
2317
+ }
2318
+ function S(m) {
2319
+ var b = this.stack[this.stack.length - 1];
2320
+ var w = b.children[b.children.length - 1];
2321
+ (!w || w.type !== "text") && (w = wt(), w.position = {
2322
+ start: on(m.start)
2323
+ }, b.children.push(w)), this.stack.push(w);
2324
+ }
2325
+ function E(m) {
2326
+ var b = this.stack.pop();
2327
+ b.value += this.sliceSerialize(m), b.position.end = on(m.end);
2328
+ }
2329
+ function A(m) {
2330
+ var b = this.stack[this.stack.length - 1];
2331
+ if (i("atHardBreak")) {
2332
+ var w = b.children[b.children.length - 1];
2333
+ w.position.end = on(m.end), l("atHardBreak");
2334
+ return;
2335
+ }
2336
+ !i("setextHeadingSlurpLineEnding") && r.canContainEols.includes(b.type) && (S.call(this, m), E.call(this, m));
2337
+ }
2338
+ function Q() {
2339
+ l("atHardBreak", !0);
2340
+ }
2341
+ function G() {
2342
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2343
+ b.value = m;
2344
+ }
2345
+ function nn() {
2346
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2347
+ b.value = m;
2348
+ }
2349
+ function J() {
2350
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2351
+ b.value = m;
2352
+ }
2353
+ function W() {
2354
+ var m = this.stack[this.stack.length - 1];
2355
+ if (i("inReference")) {
2356
+ var b = i("referenceType") || "shortcut";
2357
+ m.type += "Reference", m.referenceType = b, delete m.url, delete m.title;
2358
+ } else delete m.identifier, delete m.label;
2359
+ l("referenceType");
2360
+ }
2361
+ function U() {
2362
+ var m = this.stack[this.stack.length - 1];
2363
+ if (i("inReference")) {
2364
+ var b = i("referenceType") || "shortcut";
2365
+ m.type += "Reference", m.referenceType = b, delete m.url, delete m.title;
2366
+ } else delete m.identifier, delete m.label;
2367
+ l("referenceType");
2368
+ }
2369
+ function H(m) {
2370
+ var b = this.sliceSerialize(m), w = this.stack[this.stack.length - 2];
2371
+ w.label = Er(b), w.identifier = fn(b).toLowerCase();
2372
+ }
2373
+ function s() {
2374
+ var m = this.stack[this.stack.length - 1], b = this.resume(), w = this.stack[this.stack.length - 1];
2375
+ if (l("inReference", !0), w.type === "link") {
2376
+ var z = m.children;
2377
+ w.children = z;
2378
+ } else w.alt = b;
2379
+ }
2380
+ function o() {
2381
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2382
+ b.url = m;
2383
+ }
2384
+ function cn() {
2385
+ var m = this.resume(), b = this.stack[this.stack.length - 1];
2386
+ b.title = m;
2387
+ }
2388
+ function xn() {
2389
+ l("inReference");
2390
+ }
2391
+ function hn() {
2392
+ l("referenceType", "collapsed");
2393
+ }
2394
+ function N(m) {
2395
+ var b = this.resume(), w = this.stack[this.stack.length - 1];
2396
+ w.label = b, w.identifier = fn(this.sliceSerialize(m)).toLowerCase(), l("referenceType", "full");
2397
+ }
2398
+ function K(m) {
2399
+ l("characterReferenceType", m.type);
2400
+ }
2401
+ function ln(m) {
2402
+ var b = this.sliceSerialize(m), w = i("characterReferenceType");
2403
+ var z;
2404
+ w ? (z = ct(b, w === "characterReferenceMarkerNumeric" ? 10 : 16), l("characterReferenceType")) : z = On(b);
2405
+ var I = this.stack.pop();
2406
+ I.value += z, I.position.end = on(m.end);
2407
+ }
2408
+ function pn(m) {
2409
+ E.call(this, m);
2410
+ var b = this.stack[this.stack.length - 1];
2411
+ b.url = this.sliceSerialize(m);
2412
+ }
2413
+ function mn(m) {
2414
+ E.call(this, m);
2415
+ var b = this.stack[this.stack.length - 1];
2416
+ b.url = "mailto:" + this.sliceSerialize(m);
2417
+ }
2418
+ function Fn() {
2419
+ return {
2420
+ type: "blockquote",
2421
+ children: []
2422
+ };
2423
+ }
2424
+ function Pn() {
2425
+ return {
2426
+ type: "code",
2427
+ lang: null,
2428
+ meta: null,
2429
+ value: ""
2430
+ };
2431
+ }
2432
+ function kt() {
2433
+ return {
2434
+ type: "inlineCode",
2435
+ value: ""
2436
+ };
2437
+ }
2438
+ function dt() {
2439
+ return {
2440
+ type: "definition",
2441
+ identifier: "",
2442
+ label: null,
2443
+ title: null,
2444
+ url: ""
2445
+ };
2446
+ }
2447
+ function bt() {
2448
+ return {
2449
+ type: "emphasis",
2450
+ children: []
2451
+ };
2452
+ }
2453
+ function _n() {
2454
+ return {
2455
+ type: "heading",
2456
+ depth: void 0,
2457
+ children: []
2458
+ };
2459
+ }
2460
+ function Mn() {
2461
+ return {
2462
+ type: "break"
2463
+ };
2464
+ }
2465
+ function jn() {
2466
+ return {
2467
+ type: "html",
2468
+ value: ""
2469
+ };
2470
+ }
2471
+ function yt() {
2472
+ return {
2473
+ type: "image",
2474
+ title: null,
2475
+ url: "",
2476
+ alt: null
2477
+ };
2478
+ }
2479
+ function Rn() {
2480
+ return {
2481
+ type: "link",
2482
+ title: null,
2483
+ url: "",
2484
+ children: []
2485
+ };
2486
+ }
2487
+ function qn(m) {
2488
+ return {
2489
+ type: "list",
2490
+ ordered: m.type === "listOrdered",
2491
+ start: null,
2492
+ // @ts-expect-error Patched.
2493
+ spread: m._spread,
2494
+ children: []
2495
+ };
2496
+ }
2497
+ function St(m) {
2498
+ return {
2499
+ type: "listItem",
2500
+ // @ts-expect-error Patched.
2501
+ spread: m._spread,
2502
+ checked: null,
2503
+ children: []
2504
+ };
2505
+ }
2506
+ function Ft() {
2507
+ return {
2508
+ type: "paragraph",
2509
+ children: []
2510
+ };
2511
+ }
2512
+ function Et() {
2513
+ return {
2514
+ type: "strong",
2515
+ children: []
2516
+ };
2517
+ }
2518
+ function wt() {
2519
+ return {
2520
+ type: "text",
2521
+ value: ""
2522
+ };
2523
+ }
2524
+ function Ct() {
2525
+ return {
2526
+ type: "thematicBreak"
2527
+ };
2528
+ }
2529
+ }
2530
+ function on(n) {
2531
+ return {
2532
+ line: n.line,
2533
+ column: n.column,
2534
+ offset: n.offset
2535
+ };
2536
+ }
2537
+ function mt(n, r) {
2538
+ var t = -1;
2539
+ for(; ++t < r.length;){
2540
+ var e = r[t];
2541
+ Array.isArray(e) ? mt(n, e) : Ar(n, e);
2542
+ }
2543
+ }
2544
+ function Ar(n, r) {
2545
+ var t;
2546
+ for(t in r)if (ht.call(r, t)) {
2547
+ if (t === "canContainEols") {
2548
+ var _n_t;
2549
+ var e = r[t];
2550
+ e && (_n_t = n[t]).push.apply(_n_t, _to_consumable_array(e));
2551
+ } else if (t === "transforms") {
2552
+ var _n_t1;
2553
+ var e1 = r[t];
2554
+ e1 && (_n_t1 = n[t]).push.apply(_n_t1, _to_consumable_array(e1));
2555
+ } else if (t === "enter" || t === "exit") {
2556
+ var e2 = r[t];
2557
+ e2 && Object.assign(n[t], e2);
2558
+ }
2559
+ }
2560
+ }
2561
+ function vn(n, r) {
2562
+ throw n ? new Error("Cannot close `" + n.type + "` (" + yn({
2563
+ start: n.start,
2564
+ end: n.end
2565
+ }) + "): a different token (`" + r.type + "`, " + yn({
2566
+ start: r.start,
2567
+ end: r.end
2568
+ }) + ") is open") : new Error("Cannot close document, a token (`" + r.type + "`, " + yn({
2569
+ start: r.start,
2570
+ end: r.end
2571
+ }) + ") is still open");
2572
+ }
2573
+ function zr(n) {
2574
+ var r = n.replace(/\n{2,}/g, "\n");
2575
+ return Pl(r);
2576
+ }
2577
+ function Ir(n) {
2578
+ var r = zr(n), _pt = pt(r), t = _pt.children, e = [
2579
+ []
2580
+ ];
2581
+ var u = 0;
2582
+ function l(i) {
2583
+ var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "normal";
2584
+ i.type === "text" ? i.value.split("\n").forEach(function(p, h) {
2585
+ h !== 0 && (u++, e.push([])), p.split(" ").forEach(function(x) {
2586
+ x && e[u].push({
2587
+ content: x,
2588
+ type: a
2589
+ });
2590
+ });
2591
+ }) : (i.type === "strong" || i.type === "emphasis") && i.children.forEach(function(c) {
2592
+ l(c, i.type);
2593
+ });
2594
+ }
2595
+ return t.forEach(function(i) {
2596
+ i.type === "paragraph" && i.children.forEach(function(a) {
2597
+ l(a);
2598
+ });
2599
+ }), e;
2600
+ }
2601
+ function Tr(n) {
2602
+ var _pt = pt(n), r = _pt.children;
2603
+ function t(e) {
2604
+ return e.type === "text" ? e.value.replace(/\n/g, "<br/>") : e.type === "strong" ? "<strong>".concat(e.children.map(t).join(""), "</strong>") : e.type === "emphasis" ? "<em>".concat(e.children.map(t).join(""), "</em>") : e.type === "paragraph" ? "<p>".concat(e.children.map(t).join(""), "</p>") : "Unsupported markdown: ".concat(e.type);
2605
+ }
2606
+ return r.map(t).join("");
2607
+ }
2608
+ function Br(n) {
2609
+ return Intl.Segmenter ? _to_consumable_array(new Intl.Segmenter().segment(n)).map(function(r) {
2610
+ return r.segment;
2611
+ }) : _to_consumable_array(n);
2612
+ }
2613
+ function Lr(n, r) {
2614
+ var t = Br(r.content);
2615
+ return ft(n, [], t, r.type);
2616
+ }
2617
+ function ft(n, r, t, e) {
2618
+ if (t.length === 0) return [
2619
+ {
2620
+ content: r.join(""),
2621
+ type: e
2622
+ },
2623
+ {
2624
+ content: "",
2625
+ type: e
2626
+ }
2627
+ ];
2628
+ var _t = _to_array(t), u = _t[0], l = _t.slice(1), i = _to_consumable_array(r).concat([
2629
+ u
2630
+ ]);
2631
+ return n([
2632
+ {
2633
+ content: i.join(""),
2634
+ type: e
2635
+ }
2636
+ ]) ? ft(n, i, l, e) : (r.length === 0 && u && (r.push(u), t.shift()), [
2637
+ {
2638
+ content: r.join(""),
2639
+ type: e
2640
+ },
2641
+ {
2642
+ content: t.join(""),
2643
+ type: e
2644
+ }
2645
+ ]);
2646
+ }
2647
+ function Or(n, r) {
2648
+ if (n.some(function(param) {
2649
+ var t = param.content;
2650
+ return t.includes("\n");
2651
+ })) throw new Error("splitLineToFitWidth does not support newlines in the line");
2652
+ return Bn(n, r);
2653
+ }
2654
+ function Bn(n, r) {
2655
+ var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
2656
+ if (n.length === 0) return e.length > 0 && t.push(e), t.length > 0 ? t : [];
2657
+ var u = "";
2658
+ n[0].content === " " && (u = " ", n.shift());
2659
+ var _n_shift;
2660
+ var l = (_n_shift = n.shift()) !== null && _n_shift !== void 0 ? _n_shift : {
2661
+ content: " ",
2662
+ type: "normal"
2663
+ }, i = _to_consumable_array(e);
2664
+ if (u !== "" && i.push({
2665
+ content: u,
2666
+ type: "normal"
2667
+ }), i.push(l), r(i)) return Bn(n, r, t, i);
2668
+ if (e.length > 0) t.push(e), n.unshift(l);
2669
+ else if (l.content) {
2670
+ var _Lr = _sliced_to_array(Lr(r, l), 2), a = _Lr[0], c = _Lr[1];
2671
+ t.push([
2672
+ a
2673
+ ]), c.content && n.unshift(c);
2674
+ }
2675
+ return Bn(n, r, t);
2676
+ }
2677
+ function Dr(n, r) {
2678
+ r && n.attr("style", r);
2679
+ }
2680
+ function Pr(n, r, t, e) {
2681
+ var u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1;
2682
+ var l = n.append("foreignObject"), i = l.append("xhtml:div"), a = r.label, c = r.isNode ? "nodeLabel" : "edgeLabel";
2683
+ i.html('\n <span class="'.concat(c, " ").concat(e, '" ') + (r.labelStyle ? 'style="' + r.labelStyle + '"' : "") + ">" + a + "</span>"), Dr(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");
2684
+ var p = i.node().getBoundingClientRect();
2685
+ return p.width === t && (i.style("display", "table"), i.style("white-space", "break-spaces"), i.style("width", t + "px"), p = i.node().getBoundingClientRect()), l.style("width", p.width), l.style("height", p.height), l.node();
2686
+ }
2687
+ function xt(n, r, t) {
2688
+ return n.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", r * t - 0.1 + "em").attr("dy", t + "em");
2689
+ }
2690
+ function _r(n, r, t) {
2691
+ var e = n.append("text"), u = xt(e, 1, r);
2692
+ gt(u, t);
2693
+ var l = u.node().getComputedTextLength();
2694
+ return e.remove(), l;
2695
+ }
2696
+ function Mr(n, r, t) {
2697
+ var e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
2698
+ var l = r.append("g"), i = l.insert("rect").attr("class", "background"), a = l.append("text").attr("y", "-10.1");
2699
+ var c = 0;
2700
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2701
+ try {
2702
+ for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2703
+ var p = _step.value;
2704
+ var h = function(g) {
2705
+ return _r(l, 1.1, g) <= n;
2706
+ }, x = h(p) ? [
2707
+ p
2708
+ ] : Or(p, h);
2709
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
2710
+ try {
2711
+ for(var _iterator1 = x[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
2712
+ var g = _step1.value;
2713
+ var f = xt(a, c, 1.1);
2714
+ gt(f, g), c++;
2715
+ }
2716
+ } catch (err) {
2717
+ _didIteratorError1 = true;
2718
+ _iteratorError1 = err;
2719
+ } finally{
2720
+ try {
2721
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
2722
+ _iterator1.return();
2723
+ }
2724
+ } finally{
2725
+ if (_didIteratorError1) {
2726
+ throw _iteratorError1;
2727
+ }
2728
+ }
2729
+ }
2730
+ }
2731
+ } catch (err) {
2732
+ _didIteratorError = true;
2733
+ _iteratorError = err;
2734
+ } finally{
2735
+ try {
2736
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2737
+ _iterator.return();
2738
+ }
2739
+ } finally{
2740
+ if (_didIteratorError) {
2741
+ throw _iteratorError;
2742
+ }
2743
+ }
2744
+ }
2745
+ if (e) {
2746
+ var p1 = a.node().getBBox(), h1 = 2;
2747
+ return i.attr("x", -h1).attr("y", -h1).attr("width", p1.width + 2 * h1).attr("height", p1.height + 2 * h1), l.node();
2748
+ } else return a.node();
2749
+ }
2750
+ function gt(n, r) {
2751
+ n.text(""), r.forEach(function(t, e) {
2752
+ var u = n.append("tspan").attr("font-style", t.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", t.type === "strong" ? "bold" : "normal");
2753
+ e === 0 ? u.text(t.content) : u.text(" " + t.content);
2754
+ });
2755
+ }
2756
+ var Rr = function(n) {
2757
+ var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, tmp = _ref.style, t = tmp === void 0 ? "" : tmp, tmp1 = _ref.isTitle, e = tmp1 === void 0 ? !1 : tmp1, tmp2 = _ref.classes, u = tmp2 === void 0 ? "" : tmp2, tmp3 = _ref.useHtmlLabels, l = tmp3 === void 0 ? !0 : tmp3, tmp4 = _ref.isNode, i = tmp4 === void 0 ? !0 : tmp4, tmp5 = _ref.width, a = tmp5 === void 0 ? 200 : tmp5, tmp6 = _ref.addSvgBackground, c = tmp6 === void 0 ? !1 : tmp6;
2758
+ if (S.info("createText", r, t, e, u, l, i, c), l) {
2759
+ var p = Tr(r), h = {
2760
+ isNode: i,
2761
+ label: cx(p).replace(/fa[blrs]?:fa-[\w-]+/g, function(g) {
2762
+ return "<i class='".concat(g.replace(":", " "), "'></i>");
2763
+ }),
2764
+ labelStyle: t.replace("fill:", "color:")
2765
+ };
2766
+ return Pr(n, h, a, u, c);
2767
+ } else {
2768
+ var p1 = Ir(r);
2769
+ return Mr(a, n, p1, c);
2770
+ }
2771
+ };
2772
+
2773
+ export { Rr as R };