@airalogy/aimd-editor 1.7.1 → 1.9.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.
@@ -118,6 +118,7 @@ const jy = {
118
118
  dragToReorder: "Drag to reorder",
119
119
  answer: "Answer",
120
120
  correct: "Correct",
121
+ correctAnswer: "Correct Answer",
121
122
  optionsHint: "Use unique keys (A/B/C), then mark answer directly in each row.",
122
123
  blanks: "Blanks",
123
124
  blanksHint: "Use keys like b1, b2 and refer to them in stem as [[b1]], [[b2]].",
@@ -312,6 +313,7 @@ const jy = {
312
313
  dragToReorder: "拖拽排序",
313
314
  answer: "答案",
314
315
  correct: "正确",
316
+ correctAnswer: "正确答案",
315
317
  optionsHint: "请使用唯一键(A/B/C),并直接在每一行标记答案。",
316
318
  blanks: "填空项",
317
319
  blanksHint: "请使用 b1、b2 这样的键,并在题干中写成 [[b1]]、[[b2]]。",
@@ -496,7 +498,7 @@ function e1(t = hn) {
496
498
  };
497
499
  });
498
500
  }
499
- function aI(t = hn, e = []) {
501
+ function cI(t = hn, e = []) {
500
502
  const n = [
501
503
  { key: "str", value: "str", ...t.varTypePresets.str },
502
504
  { key: "int", value: "int", ...t.varTypePresets.int },
@@ -530,7 +532,7 @@ function aI(t = hn, e = []) {
530
532
  function Zc(t) {
531
533
  return t.trim().toLowerCase().replace(/[\s_-]/g, "");
532
534
  }
533
- const cI = Qy(hn), uI = e1(hn);
535
+ const uI = Qy(hn), fI = e1(hn);
534
536
  function nn(t) {
535
537
  const e = t.trim();
536
538
  return e ? /[:#\[\]\{\},&*!?|><=@`]/.test(e) || /^\s|\s$/.test(t) || /["']/.test(e) ? JSON.stringify(e) : e : '""';
@@ -560,7 +562,7 @@ function n1(t, e) {
560
562
  }
561
563
  function r1(t) {
562
564
  const e = t.split(",").map((n) => n.trim()).filter(Boolean);
563
- return e.length === 0 ? [{ key: "b1", answer: "21%" }] : e.map((n, r) => {
565
+ return e.length === 0 ? [{ key: "b1", answer: "" }] : e.map((n, r) => {
564
566
  const i = n.indexOf(":");
565
567
  if (i > 0) {
566
568
  const o = n.slice(0, i).trim() || `b${r + 1}`, s = n.slice(i + 1).trim() || "";
@@ -576,24 +578,29 @@ function i1(t) {
576
578
  const n = Number(e);
577
579
  return Number.isNaN(n) || n < 0 ? null : String(n);
578
580
  }
579
- function fI(t, e) {
581
+ function dI(t, e, n) {
580
582
  switch (t) {
581
583
  case "var":
582
584
  return { name: "", type: "str", default: "", title: "" };
583
585
  case "var_table":
584
586
  return { name: "", subvars: "" };
585
- case "quiz":
587
+ case "quiz": {
588
+ const r = "choice", i = `quiz_${r}`;
589
+ let o = 1;
590
+ for (; n?.has(`${i}_${o}`); )
591
+ o += 1;
586
592
  return {
587
- id: "quiz_choice_1",
588
- quizType: "choice",
593
+ id: `${i}_${o}`,
594
+ quizType: r,
589
595
  mode: "single",
590
596
  stem: e?.defaults.questionStem || hn.defaults.questionStem,
591
597
  options: `A:${tr("A", e)}, B:${tr("B", e)}`,
592
598
  answer: "A",
593
- blanks: "b1:21%",
599
+ blanks: "b1:",
594
600
  rubric: "",
595
601
  score: ""
596
602
  };
603
+ }
597
604
  case "step":
598
605
  return { name: "", level: "1" };
599
606
  case "check":
@@ -610,7 +617,7 @@ function fI(t, e) {
610
617
  return { name: "" };
611
618
  }
612
619
  }
613
- function dI(t, e, n) {
620
+ function hI(t, e, n) {
614
621
  switch (t) {
615
622
  case "var": {
616
623
  let r = (e.name || "").trim() || "my_var";
@@ -676,7 +683,7 @@ function dI(t, e, n) {
676
683
  return `{{${t}|${e.name || "id"}}}`;
677
684
  }
678
685
  }
679
- function hI(t, e) {
686
+ function pI(t, e) {
680
687
  return {
681
688
  var: "{{var|var_id: str}}",
682
689
  var_table: "{{var_table|table_id, subvars=[col1, col2, col3]}}",
@@ -704,32 +711,176 @@ function hI(t, e) {
704
711
  cite: "{{cite|ref1}}"
705
712
  }[t] || `{{${t}|id}}`;
706
713
  }
714
+ const cs = (
715
+ // Note: overloads in JSDoc can’t yet use different `@template`s.
716
+ /**
717
+ * @type {(
718
+ * (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
719
+ * (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
720
+ * (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
721
+ * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
722
+ * ((test?: Test) => Check)
723
+ * )}
724
+ */
725
+ /**
726
+ * @param {Test} [test]
727
+ * @returns {Check}
728
+ */
729
+ (function(t) {
730
+ if (t == null)
731
+ return a1;
732
+ if (typeof t == "function")
733
+ return us(t);
734
+ if (typeof t == "object")
735
+ return Array.isArray(t) ? o1(t) : (
736
+ // Cast because `ReadonlyArray` goes into the above but `isArray`
737
+ // narrows to `Array`.
738
+ s1(
739
+ /** @type {Props} */
740
+ t
741
+ )
742
+ );
743
+ if (typeof t == "string")
744
+ return l1(t);
745
+ throw new Error("Expected function, string, or object as test");
746
+ })
747
+ );
748
+ function o1(t) {
749
+ const e = [];
750
+ let n = -1;
751
+ for (; ++n < t.length; )
752
+ e[n] = cs(t[n]);
753
+ return us(r);
754
+ function r(...i) {
755
+ let o = -1;
756
+ for (; ++o < e.length; )
757
+ if (e[o].apply(this, i)) return !0;
758
+ return !1;
759
+ }
760
+ }
761
+ function s1(t) {
762
+ const e = (
763
+ /** @type {Record<string, unknown>} */
764
+ t
765
+ );
766
+ return us(n);
767
+ function n(r) {
768
+ const i = (
769
+ /** @type {Record<string, unknown>} */
770
+ /** @type {unknown} */
771
+ r
772
+ );
773
+ let o;
774
+ for (o in t)
775
+ if (i[o] !== e[o]) return !1;
776
+ return !0;
777
+ }
778
+ }
779
+ function l1(t) {
780
+ return us(e);
781
+ function e(n) {
782
+ return n && n.type === t;
783
+ }
784
+ }
785
+ function us(t) {
786
+ return e;
787
+ function e(n, r, i) {
788
+ return !!(c1(n) && t.call(
789
+ this,
790
+ n,
791
+ typeof r == "number" ? r : void 0,
792
+ i || void 0
793
+ ));
794
+ }
795
+ }
796
+ function a1() {
797
+ return !0;
798
+ }
799
+ function c1(t) {
800
+ return t !== null && typeof t == "object" && "type" in t;
801
+ }
802
+ const wd = [], u1 = !0, Yl = !1, Xl = "skip";
803
+ function Wa(t, e, n, r) {
804
+ let i;
805
+ typeof e == "function" && typeof n != "function" ? (r = n, n = e) : i = e;
806
+ const o = cs(i), s = r ? -1 : 1;
807
+ l(t, void 0, [])();
808
+ function l(a, c, u) {
809
+ const f = (
810
+ /** @type {Record<string, unknown>} */
811
+ a && typeof a == "object" ? a : {}
812
+ );
813
+ if (typeof f.type == "string") {
814
+ const h = (
815
+ // `hast`
816
+ typeof f.tagName == "string" ? f.tagName : (
817
+ // `xast`
818
+ typeof f.name == "string" ? f.name : void 0
819
+ )
820
+ );
821
+ Object.defineProperty(d, "name", {
822
+ value: "node (" + (a.type + (h ? "<" + h + ">" : "")) + ")"
823
+ });
824
+ }
825
+ return d;
826
+ function d() {
827
+ let h = wd, p, m, g;
828
+ if ((!e || o(a, c, u[u.length - 1] || void 0)) && (h = f1(n(a, u)), h[0] === Yl))
829
+ return h;
830
+ if ("children" in a && a.children) {
831
+ const y = (
832
+ /** @type {UnistParent} */
833
+ a
834
+ );
835
+ if (y.children && h[0] !== Xl)
836
+ for (m = (r ? y.children.length : -1) + s, g = u.concat(y); m > -1 && m < y.children.length; ) {
837
+ const A = y.children[m];
838
+ if (p = l(A, m, g)(), p[0] === Yl)
839
+ return p;
840
+ m = typeof p[1] == "number" ? p[1] : m + s;
841
+ }
842
+ }
843
+ return h;
844
+ }
845
+ }
846
+ }
847
+ function f1(t) {
848
+ return Array.isArray(t) ? t : typeof t == "number" ? [u1, t] : t == null ? wd : [t];
849
+ }
850
+ function jr(t, e, n, r) {
851
+ let i, o, s;
852
+ typeof e == "function" && typeof n != "function" ? (o = void 0, s = e, i = n) : (o = e, s = n, i = r), Wa(t, o, l, i);
853
+ function l(a, c) {
854
+ const u = c[c.length - 1], f = u ? u.children.indexOf(a) : void 0;
855
+ return s(a, f, u);
856
+ }
857
+ }
707
858
  var Mt = /* @__PURE__ */ ((t) => (t.docTypeError = "docTypeError", t.contextNotFound = "contextNotFound", t.timerNotFound = "timerNotFound", t.ctxCallOutOfScope = "ctxCallOutOfScope", t.createNodeInParserFail = "createNodeInParserFail", t.stackOverFlow = "stackOverFlow", t.parserMatchError = "parserMatchError", t.serializerMatchError = "serializerMatchError", t.getAtomFromSchemaFail = "getAtomFromSchemaFail", t.expectDomTypeError = "expectDomTypeError", t.callCommandBeforeEditorView = "callCommandBeforeEditorView", t.missingRootElement = "missingRootElement", t.missingNodeInSchema = "missingNodeInSchema", t.missingMarkInSchema = "missingMarkInSchema", t.ctxNotBind = "ctxNotBind", t.missingYjsDoc = "missingYjsDoc", t))(Mt || {});
708
859
  class Lt extends Error {
709
860
  constructor(e, n) {
710
861
  super(n), this.name = "MilkdownError", this.code = e;
711
862
  }
712
863
  }
713
- const o1 = (t, e) => typeof e == "function" ? "[Function]" : e, cs = (t) => JSON.stringify(t, o1);
714
- function s1(t) {
864
+ const d1 = (t, e) => typeof e == "function" ? "[Function]" : e, fs = (t) => JSON.stringify(t, d1);
865
+ function h1(t) {
715
866
  return new Lt(
716
867
  Mt.docTypeError,
717
- `Doc type error, unsupported type: ${cs(t)}`
868
+ `Doc type error, unsupported type: ${fs(t)}`
718
869
  );
719
870
  }
720
- function l1(t) {
871
+ function p1(t) {
721
872
  return new Lt(
722
873
  Mt.contextNotFound,
723
874
  `Context "${t}" not found, do you forget to inject it?`
724
875
  );
725
876
  }
726
- function us() {
877
+ function ds() {
727
878
  return new Lt(
728
879
  Mt.ctxCallOutOfScope,
729
880
  "Should not call a context out of the plugin."
730
881
  );
731
882
  }
732
- function a1(t, e, n) {
883
+ function m1(t, e, n) {
733
884
  const i = `Cannot create node for ${"name" in t ? t.name : t}`, o = (u) => {
734
885
  if (u == null) return "null";
735
886
  if (Array.isArray(u))
@@ -761,28 +912,28 @@ function a1(t, e, n) {
761
912
  `)
762
913
  );
763
914
  }
764
- function wd() {
915
+ function xd() {
765
916
  return new Lt(
766
917
  Mt.stackOverFlow,
767
918
  "Stack over flow, cannot pop on an empty stack."
768
919
  );
769
920
  }
770
- function c1(t) {
921
+ function g1(t) {
771
922
  return new Lt(
772
923
  Mt.parserMatchError,
773
- `Cannot match target parser for node: ${cs(t)}.`
924
+ `Cannot match target parser for node: ${fs(t)}.`
774
925
  );
775
926
  }
776
- function u1(t) {
927
+ function y1(t) {
777
928
  return new Lt(
778
929
  Mt.serializerMatchError,
779
- `Cannot match target serializer for node: ${cs(t)}.`
930
+ `Cannot match target serializer for node: ${fs(t)}.`
780
931
  );
781
932
  }
782
933
  function Yt(t) {
783
934
  return new Lt(
784
935
  Mt.expectDomTypeError,
785
- `Expect to be a dom, but get: ${cs(t)}.`
936
+ `Expect to be a dom, but get: ${fs(t)}.`
786
937
  );
787
938
  }
788
939
  function Us() {
@@ -791,25 +942,25 @@ function Us() {
791
942
  "You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized"
792
943
  );
793
944
  }
794
- function f1(t) {
945
+ function k1(t) {
795
946
  return new Lt(
796
947
  Mt.missingNodeInSchema,
797
948
  `Missing node in schema, milkdown cannot find "${t}" in schema.`
798
949
  );
799
950
  }
800
- function d1(t) {
951
+ function b1(t) {
801
952
  return new Lt(
802
953
  Mt.missingMarkInSchema,
803
954
  `Missing mark in schema, milkdown cannot find "${t}" in schema.`
804
955
  );
805
956
  }
806
- class h1 {
957
+ class w1 {
807
958
  constructor() {
808
959
  this.sliceMap = /* @__PURE__ */ new Map(), this.get = (e) => {
809
960
  const n = typeof e == "string" ? [...this.sliceMap.values()].find((r) => r.type.name === e) : this.sliceMap.get(e.id);
810
961
  if (!n) {
811
962
  const r = typeof e == "string" ? e : e.name;
812
- throw l1(r);
963
+ throw p1(r);
813
964
  }
814
965
  return n;
815
966
  }, this.remove = (e) => {
@@ -818,7 +969,7 @@ class h1 {
818
969
  }, this.has = (e) => typeof e == "string" ? [...this.sliceMap.values()].some((n) => n.type.name === e) : this.sliceMap.has(e.id);
819
970
  }
820
971
  }
821
- let p1 = class {
972
+ let x1 = class {
822
973
  /// @internal
823
974
  constructor(e, n, r) {
824
975
  this.#t = [], this.#n = () => {
@@ -858,22 +1009,22 @@ let p1 = class {
858
1009
  this.#t = [];
859
1010
  }
860
1011
  };
861
- class m1 {
1012
+ class C1 {
862
1013
  /// Create a slice type with a default value and a name.
863
1014
  /// The name should be unique in the container.
864
1015
  constructor(e, n) {
865
1016
  this.id = /* @__PURE__ */ Symbol(`Context-${n}`), this.name = n, this._defaultValue = e, this._typeInfo = () => {
866
- throw us();
1017
+ throw ds();
867
1018
  };
868
1019
  }
869
1020
  /// Create a slice with a container.
870
1021
  /// You can also pass a value to override the default value.
871
1022
  create(e, n = this._defaultValue) {
872
- return new p1(e, n, this);
1023
+ return new x1(e, n, this);
873
1024
  }
874
1025
  }
875
- const oe = (t, e) => new m1(t, e);
876
- class g1 {
1026
+ const oe = (t, e) => new C1(t, e);
1027
+ class S1 {
877
1028
  /// @internal
878
1029
  constructor(e, n) {
879
1030
  this.#t = null, this.#e = null, this.#r = "pending", this.start = () => (this.#t ??= new Promise((r, i) => {
@@ -908,14 +1059,14 @@ class g1 {
908
1059
  #i;
909
1060
  #o;
910
1061
  }
911
- class y1 {
1062
+ class T1 {
912
1063
  /// Create a timer type with a name and a timeout.
913
1064
  /// The name should be unique in the clock.
914
1065
  constructor(e, n = 3e3) {
915
- this.create = (r) => new g1(r, this), this.id = /* @__PURE__ */ Symbol(`Timer-${e}`), this.name = e, this.timeout = n;
1066
+ this.create = (r) => new S1(r, this), this.id = /* @__PURE__ */ Symbol(`Timer-${e}`), this.name = e, this.timeout = n;
916
1067
  }
917
1068
  }
918
- const Xt = (t, e = 3e3) => new y1(t, e);
1069
+ const Xt = (t, e = 3e3) => new T1(t, e);
919
1070
  function Ee(t) {
920
1071
  this.content = t;
921
1072
  }
@@ -1016,7 +1167,7 @@ Ee.from = function(t) {
1016
1167
  if (t) for (var n in t) e.push(n, t[n]);
1017
1168
  return new Ee(e);
1018
1169
  };
1019
- function xd(t, e, n) {
1170
+ function Cd(t, e, n) {
1020
1171
  for (let r = 0; ; r++) {
1021
1172
  if (r == t.childCount || r == e.childCount)
1022
1173
  return t.childCount == e.childCount ? null : n;
@@ -1033,14 +1184,14 @@ function xd(t, e, n) {
1033
1184
  return n;
1034
1185
  }
1035
1186
  if (i.content.size || o.content.size) {
1036
- let s = xd(i.content, o.content, n + 1);
1187
+ let s = Cd(i.content, o.content, n + 1);
1037
1188
  if (s != null)
1038
1189
  return s;
1039
1190
  }
1040
1191
  n += i.nodeSize;
1041
1192
  }
1042
1193
  }
1043
- function Cd(t, e, n, r) {
1194
+ function Sd(t, e, n, r) {
1044
1195
  for (let i = t.childCount, o = e.childCount; ; ) {
1045
1196
  if (i == 0 || o == 0)
1046
1197
  return i == o ? null : { a: n, b: r };
@@ -1058,7 +1209,7 @@ function Cd(t, e, n, r) {
1058
1209
  return { a: n, b: r };
1059
1210
  }
1060
1211
  if (s.content.size || l.content.size) {
1061
- let c = Cd(s.content, l.content, n - 1, r - 1);
1212
+ let c = Sd(s.content, l.content, n - 1, r - 1);
1062
1213
  if (c)
1063
1214
  return c;
1064
1215
  }
@@ -1227,7 +1378,7 @@ class O {
1227
1378
  fragment differ, or `null` if they are the same.
1228
1379
  */
1229
1380
  findDiffStart(e, n = 0) {
1230
- return xd(this, e, n);
1381
+ return Cd(this, e, n);
1231
1382
  }
1232
1383
  /**
1233
1384
  Find the first position, searching from the end, at which this
@@ -1236,7 +1387,7 @@ class O {
1236
1387
  nodes, an object with two separate positions is returned.
1237
1388
  */
1238
1389
  findDiffEnd(e, n = this.size, r = e.size) {
1239
- return Cd(this, e, n, r);
1390
+ return Sd(this, e, n, r);
1240
1391
  }
1241
1392
  /**
1242
1393
  Find the index and inner offset corresponding to a given relative
@@ -1480,14 +1631,14 @@ class L {
1480
1631
  @internal
1481
1632
  */
1482
1633
  insertAt(e, n) {
1483
- let r = Td(this.content, e + this.openStart, n);
1634
+ let r = Md(this.content, e + this.openStart, n);
1484
1635
  return r && new L(r, this.openStart, this.openEnd);
1485
1636
  }
1486
1637
  /**
1487
1638
  @internal
1488
1639
  */
1489
1640
  removeBetween(e, n) {
1490
- return new L(Sd(this.content, e + this.openStart, n + this.openStart), this.openStart, this.openEnd);
1641
+ return new L(Td(this.content, e + this.openStart, n + this.openStart), this.openStart, this.openEnd);
1491
1642
  }
1492
1643
  /**
1493
1644
  Tests whether this slice is equal to another slice.
@@ -1535,7 +1686,7 @@ class L {
1535
1686
  }
1536
1687
  }
1537
1688
  L.empty = new L(O.empty, 0, 0);
1538
- function Sd(t, e, n) {
1689
+ function Td(t, e, n) {
1539
1690
  let { index: r, offset: i } = t.findIndex(e), o = t.maybeChild(r), { index: s, offset: l } = t.findIndex(n);
1540
1691
  if (i == e || o.isText) {
1541
1692
  if (l != n && !t.child(s).isText)
@@ -1544,44 +1695,44 @@ function Sd(t, e, n) {
1544
1695
  }
1545
1696
  if (r != s)
1546
1697
  throw new RangeError("Removing non-flat range");
1547
- return t.replaceChild(r, o.copy(Sd(o.content, e - i - 1, n - i - 1)));
1698
+ return t.replaceChild(r, o.copy(Td(o.content, e - i - 1, n - i - 1)));
1548
1699
  }
1549
- function Td(t, e, n, r) {
1700
+ function Md(t, e, n, r) {
1550
1701
  let { index: i, offset: o } = t.findIndex(e), s = t.maybeChild(i);
1551
1702
  if (o == e || s.isText)
1552
1703
  return r && !r.canReplace(i, i, n) ? null : t.cut(0, e).append(n).append(t.cut(e));
1553
- let l = Td(s.content, e - o - 1, n, s);
1704
+ let l = Md(s.content, e - o - 1, n, s);
1554
1705
  return l && t.replaceChild(i, s.copy(l));
1555
1706
  }
1556
- function k1(t, e, n) {
1707
+ function M1(t, e, n) {
1557
1708
  if (n.openStart > t.depth)
1558
1709
  throw new Vo("Inserted content deeper than insertion position");
1559
1710
  if (t.depth - n.openStart != e.depth - n.openEnd)
1560
1711
  throw new Vo("Inconsistent open depths");
1561
- return Md(t, e, n, 0);
1712
+ return Ad(t, e, n, 0);
1562
1713
  }
1563
- function Md(t, e, n, r) {
1714
+ function Ad(t, e, n, r) {
1564
1715
  let i = t.index(r), o = t.node(r);
1565
1716
  if (i == e.index(r) && r < t.depth - n.openStart) {
1566
- let s = Md(t, e, n, r + 1);
1717
+ let s = Ad(t, e, n, r + 1);
1567
1718
  return o.copy(o.content.replaceChild(i, s));
1568
1719
  } else if (n.content.size)
1569
1720
  if (!n.openStart && !n.openEnd && t.depth == r && e.depth == r) {
1570
1721
  let s = t.parent, l = s.content;
1571
1722
  return rr(s, l.cut(0, t.parentOffset).append(n.content).append(l.cut(e.parentOffset)));
1572
1723
  } else {
1573
- let { start: s, end: l } = b1(n, t);
1574
- return rr(o, Nd(t, s, l, e, r));
1724
+ let { start: s, end: l } = A1(n, t);
1725
+ return rr(o, Ed(t, s, l, e, r));
1575
1726
  }
1576
1727
  else return rr(o, Wo(t, e, r));
1577
1728
  }
1578
- function Ad(t, e) {
1729
+ function Nd(t, e) {
1579
1730
  if (!e.type.compatibleContent(t.type))
1580
1731
  throw new Vo("Cannot join " + e.type.name + " onto " + t.type.name);
1581
1732
  }
1582
- function Yl(t, e, n) {
1733
+ function Ql(t, e, n) {
1583
1734
  let r = t.node(n);
1584
- return Ad(r, e.node(n)), r;
1735
+ return Nd(r, e.node(n)), r;
1585
1736
  }
1586
1737
  function nr(t, e) {
1587
1738
  let n = e.length - 1;
@@ -1597,19 +1748,19 @@ function Si(t, e, n, r) {
1597
1748
  function rr(t, e) {
1598
1749
  return t.type.checkContent(e), t.copy(e);
1599
1750
  }
1600
- function Nd(t, e, n, r, i) {
1601
- let o = t.depth > i && Yl(t, e, i + 1), s = r.depth > i && Yl(n, r, i + 1), l = [];
1602
- return Si(null, t, i, l), o && s && e.index(i) == n.index(i) ? (Ad(o, s), nr(rr(o, Nd(t, e, n, r, i + 1)), l)) : (o && nr(rr(o, Wo(t, e, i + 1)), l), Si(e, n, i, l), s && nr(rr(s, Wo(n, r, i + 1)), l)), Si(r, null, i, l), new O(l);
1751
+ function Ed(t, e, n, r, i) {
1752
+ let o = t.depth > i && Ql(t, e, i + 1), s = r.depth > i && Ql(n, r, i + 1), l = [];
1753
+ return Si(null, t, i, l), o && s && e.index(i) == n.index(i) ? (Nd(o, s), nr(rr(o, Ed(t, e, n, r, i + 1)), l)) : (o && nr(rr(o, Wo(t, e, i + 1)), l), Si(e, n, i, l), s && nr(rr(s, Wo(n, r, i + 1)), l)), Si(r, null, i, l), new O(l);
1603
1754
  }
1604
1755
  function Wo(t, e, n) {
1605
1756
  let r = [];
1606
1757
  if (Si(null, t, n, r), t.depth > n) {
1607
- let i = Yl(t, e, n + 1);
1758
+ let i = Ql(t, e, n + 1);
1608
1759
  nr(rr(i, Wo(t, e, n + 1)), r);
1609
1760
  }
1610
1761
  return Si(e, null, n, r), new O(r);
1611
1762
  }
1612
- function b1(t, e) {
1763
+ function A1(t, e) {
1613
1764
  let n = e.depth - t.openStart, i = e.node(n).copy(t.content);
1614
1765
  for (let o = n - 1; o >= 0; o--)
1615
1766
  i = e.node(o).copy(O.from(i));
@@ -1803,7 +1954,7 @@ class Li {
1803
1954
  return e.blockRange(this);
1804
1955
  for (let r = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); r >= 0; r--)
1805
1956
  if (e.pos <= this.end(r) && (!n || n(this.node(r))))
1806
- return new Ed(this, e, r);
1957
+ return new Id(this, e, r);
1807
1958
  return null;
1808
1959
  }
1809
1960
  /**
@@ -1860,18 +2011,18 @@ class Li {
1860
2011
  return s;
1861
2012
  }
1862
2013
  else
1863
- eu.set(e, r = new w1());
2014
+ eu.set(e, r = new N1());
1864
2015
  let i = r.elts[r.i] = Li.resolve(e, n);
1865
- return r.i = (r.i + 1) % x1, i;
2016
+ return r.i = (r.i + 1) % E1, i;
1866
2017
  }
1867
2018
  }
1868
- class w1 {
2019
+ class N1 {
1869
2020
  constructor() {
1870
2021
  this.elts = [], this.i = 0;
1871
2022
  }
1872
2023
  }
1873
- const x1 = 12, eu = /* @__PURE__ */ new WeakMap();
1874
- class Ed {
2024
+ const E1 = 12, eu = /* @__PURE__ */ new WeakMap();
2025
+ class Id {
1875
2026
  /**
1876
2027
  Construct a node range. `$from` and `$to` should point into the
1877
2028
  same node until at least the given `depth`, since a node range
@@ -1911,8 +2062,8 @@ class Ed {
1911
2062
  return this.$to.indexAfter(this.depth);
1912
2063
  }
1913
2064
  }
1914
- const C1 = /* @__PURE__ */ Object.create(null);
1915
- let En = class Xl {
2065
+ const I1 = /* @__PURE__ */ Object.create(null);
2066
+ let En = class Zl {
1916
2067
  /**
1917
2068
  @internal
1918
2069
  */
@@ -2030,21 +2181,21 @@ let En = class Xl {
2030
2181
  attributes, and marks.
2031
2182
  */
2032
2183
  hasMarkup(e, n, r) {
2033
- return this.type == e && $o(this.attrs, n || e.defaultAttrs || C1) && ne.sameSet(this.marks, r || ne.none);
2184
+ return this.type == e && $o(this.attrs, n || e.defaultAttrs || I1) && ne.sameSet(this.marks, r || ne.none);
2034
2185
  }
2035
2186
  /**
2036
2187
  Create a new node with the same markup as this node, containing
2037
2188
  the given content (or empty, if no content is given).
2038
2189
  */
2039
2190
  copy(e = null) {
2040
- return e == this.content ? this : new Xl(this.type, this.attrs, e, this.marks);
2191
+ return e == this.content ? this : new Zl(this.type, this.attrs, e, this.marks);
2041
2192
  }
2042
2193
  /**
2043
2194
  Create a copy of this node, with the given set of marks instead
2044
2195
  of the node's own marks.
2045
2196
  */
2046
2197
  mark(e) {
2047
- return e == this.marks ? this : new Xl(this.type, this.attrs, this.content, e);
2198
+ return e == this.marks ? this : new Zl(this.type, this.attrs, this.content, e);
2048
2199
  }
2049
2200
  /**
2050
2201
  Create a copy of this node with only the content between the
@@ -2073,7 +2224,7 @@ let En = class Xl {
2073
2224
  [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
2074
2225
  */
2075
2226
  replace(e, n, r) {
2076
- return k1(this.resolve(e), this.resolve(n), r);
2227
+ return M1(this.resolve(e), this.resolve(n), r);
2077
2228
  }
2078
2229
  /**
2079
2230
  Find the node directly after the given position.
@@ -2188,7 +2339,7 @@ let En = class Xl {
2188
2339
  if (this.type.spec.toDebugString)
2189
2340
  return this.type.spec.toDebugString(this);
2190
2341
  let e = this.type.name;
2191
- return this.content.size && (e += "(" + this.content.toStringInner() + ")"), Id(this.marks, e);
2342
+ return this.content.size && (e += "(" + this.content.toStringInner() + ")"), vd(this.marks, e);
2192
2343
  }
2193
2344
  /**
2194
2345
  Get the content match in this node at the given index.
@@ -2292,7 +2443,7 @@ class qo extends En {
2292
2443
  this.text = r;
2293
2444
  }
2294
2445
  toString() {
2295
- return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : Id(this.marks, JSON.stringify(this.text));
2446
+ return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : vd(this.marks, JSON.stringify(this.text));
2296
2447
  }
2297
2448
  get textContent() {
2298
2449
  return this.text;
@@ -2320,7 +2471,7 @@ class qo extends En {
2320
2471
  return e.text = this.text, e;
2321
2472
  }
2322
2473
  }
2323
- function Id(t, e) {
2474
+ function vd(t, e) {
2324
2475
  for (let n = t.length - 1; n >= 0; n--)
2325
2476
  e = t[n].type.name + "(" + e + ")";
2326
2477
  return e;
@@ -2336,13 +2487,13 @@ class sr {
2336
2487
  @internal
2337
2488
  */
2338
2489
  static parse(e, n) {
2339
- let r = new S1(e, n);
2490
+ let r = new v1(e, n);
2340
2491
  if (r.next == null)
2341
2492
  return sr.empty;
2342
- let i = vd(r);
2493
+ let i = Od(r);
2343
2494
  r.next && r.err("Unexpected trailing text");
2344
- let o = v1(I1(i));
2345
- return O1(o, r), o;
2495
+ let o = z1(P1(i));
2496
+ return B1(o, r), o;
2346
2497
  }
2347
2498
  /**
2348
2499
  Match a node type, returning a match after that node if
@@ -2488,7 +2639,7 @@ class sr {
2488
2639
  }
2489
2640
  }
2490
2641
  sr.empty = new sr(!0);
2491
- class S1 {
2642
+ class v1 {
2492
2643
  constructor(e, n) {
2493
2644
  this.string = e, this.nodeTypes = n, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
2494
2645
  }
@@ -2502,22 +2653,22 @@ class S1 {
2502
2653
  throw new SyntaxError(e + " (in content expression '" + this.string + "')");
2503
2654
  }
2504
2655
  }
2505
- function vd(t) {
2656
+ function Od(t) {
2506
2657
  let e = [];
2507
2658
  do
2508
- e.push(T1(t));
2659
+ e.push(O1(t));
2509
2660
  while (t.eat("|"));
2510
2661
  return e.length == 1 ? e[0] : { type: "choice", exprs: e };
2511
2662
  }
2512
- function T1(t) {
2663
+ function O1(t) {
2513
2664
  let e = [];
2514
2665
  do
2515
- e.push(M1(t));
2666
+ e.push(R1(t));
2516
2667
  while (t.next && t.next != ")" && t.next != "|");
2517
2668
  return e.length == 1 ? e[0] : { type: "seq", exprs: e };
2518
2669
  }
2519
- function M1(t) {
2520
- let e = E1(t);
2670
+ function R1(t) {
2671
+ let e = L1(t);
2521
2672
  for (; ; )
2522
2673
  if (t.eat("+"))
2523
2674
  e = { type: "plus", expr: e };
@@ -2526,7 +2677,7 @@ function M1(t) {
2526
2677
  else if (t.eat("?"))
2527
2678
  e = { type: "opt", expr: e };
2528
2679
  else if (t.eat("{"))
2529
- e = A1(t, e);
2680
+ e = D1(t, e);
2530
2681
  else
2531
2682
  break;
2532
2683
  return e;
@@ -2536,11 +2687,11 @@ function tu(t) {
2536
2687
  let e = Number(t.next);
2537
2688
  return t.pos++, e;
2538
2689
  }
2539
- function A1(t, e) {
2690
+ function D1(t, e) {
2540
2691
  let n = tu(t), r = n;
2541
2692
  return t.eat(",") && (t.next != "}" ? r = tu(t) : r = -1), t.eat("}") || t.err("Unclosed braced range"), { type: "range", min: n, max: r, expr: e };
2542
2693
  }
2543
- function N1(t, e) {
2694
+ function _1(t, e) {
2544
2695
  let n = t.nodeTypes, r = n[e];
2545
2696
  if (r)
2546
2697
  return [r];
@@ -2551,18 +2702,18 @@ function N1(t, e) {
2551
2702
  }
2552
2703
  return i.length == 0 && t.err("No node type or group '" + e + "' found"), i;
2553
2704
  }
2554
- function E1(t) {
2705
+ function L1(t) {
2555
2706
  if (t.eat("(")) {
2556
- let e = vd(t);
2707
+ let e = Od(t);
2557
2708
  return t.eat(")") || t.err("Missing closing paren"), e;
2558
2709
  } else if (/\W/.test(t.next))
2559
2710
  t.err("Unexpected token '" + t.next + "'");
2560
2711
  else {
2561
- let e = N1(t, t.next).map((n) => (t.inline == null ? t.inline = n.isInline : t.inline != n.isInline && t.err("Mixing inline and block content"), { type: "name", value: n }));
2712
+ let e = _1(t, t.next).map((n) => (t.inline == null ? t.inline = n.isInline : t.inline != n.isInline && t.err("Mixing inline and block content"), { type: "name", value: n }));
2562
2713
  return t.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
2563
2714
  }
2564
2715
  }
2565
- function I1(t) {
2716
+ function P1(t) {
2566
2717
  let e = [[]];
2567
2718
  return i(o(t, 0), n()), e;
2568
2719
  function n() {
@@ -2616,12 +2767,12 @@ function I1(t) {
2616
2767
  }
2617
2768
  }
2618
2769
  }
2619
- function Od(t, e) {
2770
+ function Rd(t, e) {
2620
2771
  return e - t;
2621
2772
  }
2622
2773
  function nu(t, e) {
2623
2774
  let n = [];
2624
- return r(e), n.sort(Od);
2775
+ return r(e), n.sort(Rd);
2625
2776
  function r(i) {
2626
2777
  let o = t[i];
2627
2778
  if (o.length == 1 && !o[0].term)
@@ -2633,7 +2784,7 @@ function nu(t, e) {
2633
2784
  }
2634
2785
  }
2635
2786
  }
2636
- function v1(t) {
2787
+ function z1(t) {
2637
2788
  let e = /* @__PURE__ */ Object.create(null);
2638
2789
  return n(nu(t, 0));
2639
2790
  function n(r) {
@@ -2652,13 +2803,13 @@ function v1(t) {
2652
2803
  });
2653
2804
  let o = e[r.join(",")] = new sr(r.indexOf(t.length - 1) > -1);
2654
2805
  for (let s = 0; s < i.length; s++) {
2655
- let l = i[s][1].sort(Od);
2806
+ let l = i[s][1].sort(Rd);
2656
2807
  o.next.push({ type: i[s][0], next: e[l.join(",")] || n(l) });
2657
2808
  }
2658
2809
  return o;
2659
2810
  }
2660
2811
  }
2661
- function O1(t, e) {
2812
+ function B1(t, e) {
2662
2813
  for (let n = 0, r = [t]; n < r.length; n++) {
2663
2814
  let i = r[n], o = !i.validEnd, s = [];
2664
2815
  for (let l = 0; l < i.next.length; l++) {
@@ -2668,7 +2819,7 @@ function O1(t, e) {
2668
2819
  o && e.err("Only non-generatable nodes (" + s.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)");
2669
2820
  }
2670
2821
  }
2671
- function Rd(t) {
2822
+ function Dd(t) {
2672
2823
  let e = /* @__PURE__ */ Object.create(null);
2673
2824
  for (let n in t) {
2674
2825
  let r = t[n];
@@ -2678,7 +2829,7 @@ function Rd(t) {
2678
2829
  }
2679
2830
  return e;
2680
2831
  }
2681
- function Dd(t, e) {
2832
+ function _d(t, e) {
2682
2833
  let n = /* @__PURE__ */ Object.create(null);
2683
2834
  for (let r in t) {
2684
2835
  let i = e && e[r];
@@ -2693,7 +2844,7 @@ function Dd(t, e) {
2693
2844
  }
2694
2845
  return n;
2695
2846
  }
2696
- function _d(t, e, n, r) {
2847
+ function Ld(t, e, n, r) {
2697
2848
  for (let i in e)
2698
2849
  if (!(i in t))
2699
2850
  throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);
@@ -2702,19 +2853,19 @@ function _d(t, e, n, r) {
2702
2853
  o.validate && o.validate(e[i]);
2703
2854
  }
2704
2855
  }
2705
- function Ld(t, e) {
2856
+ function Pd(t, e) {
2706
2857
  let n = /* @__PURE__ */ Object.create(null);
2707
2858
  if (e)
2708
2859
  for (let r in e)
2709
- n[r] = new D1(t, r, e[r]);
2860
+ n[r] = new H1(t, r, e[r]);
2710
2861
  return n;
2711
2862
  }
2712
- let jo = class Pd {
2863
+ let jo = class zd {
2713
2864
  /**
2714
2865
  @internal
2715
2866
  */
2716
2867
  constructor(e, n, r) {
2717
- this.name = e, this.schema = n, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = Ld(e, r.attrs), this.defaultAttrs = Rd(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
2868
+ this.name = e, this.schema = n, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = Pd(e, r.attrs), this.defaultAttrs = Dd(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
2718
2869
  }
2719
2870
  /**
2720
2871
  True if this is an inline type.
@@ -2775,7 +2926,7 @@ let jo = class Pd {
2775
2926
  @internal
2776
2927
  */
2777
2928
  computeAttrs(e) {
2778
- return !e && this.defaultAttrs ? this.defaultAttrs : Dd(this.attrs, e);
2929
+ return !e && this.defaultAttrs ? this.defaultAttrs : _d(this.attrs, e);
2779
2930
  }
2780
2931
  /**
2781
2932
  Create a `Node` of this type. The given attributes are
@@ -2842,7 +2993,7 @@ let jo = class Pd {
2842
2993
  @internal
2843
2994
  */
2844
2995
  checkAttrs(e) {
2845
- _d(this.attrs, e, "node", this.name);
2996
+ Ld(this.attrs, e, "node", this.name);
2846
2997
  }
2847
2998
  /**
2848
2999
  Check whether the given mark type is allowed in this node.
@@ -2877,7 +3028,7 @@ let jo = class Pd {
2877
3028
  */
2878
3029
  static compile(e, n) {
2879
3030
  let r = /* @__PURE__ */ Object.create(null);
2880
- e.forEach((o, s) => r[o] = new Pd(o, n, s));
3031
+ e.forEach((o, s) => r[o] = new zd(o, n, s));
2881
3032
  let i = n.spec.topNode || "doc";
2882
3033
  if (!r[i])
2883
3034
  throw new RangeError("Schema is missing its top node type ('" + i + "')");
@@ -2888,7 +3039,7 @@ let jo = class Pd {
2888
3039
  return r;
2889
3040
  }
2890
3041
  };
2891
- function R1(t, e, n) {
3042
+ function F1(t, e, n) {
2892
3043
  let r = n.split("|");
2893
3044
  return (i) => {
2894
3045
  let o = i === null ? "null" : typeof i;
@@ -2896,21 +3047,21 @@ function R1(t, e, n) {
2896
3047
  throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`);
2897
3048
  };
2898
3049
  }
2899
- class D1 {
3050
+ class H1 {
2900
3051
  constructor(e, n, r) {
2901
- this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ? R1(e, n, r.validate) : r.validate;
3052
+ this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ? F1(e, n, r.validate) : r.validate;
2902
3053
  }
2903
3054
  get isRequired() {
2904
3055
  return !this.hasDefault;
2905
3056
  }
2906
3057
  }
2907
- class fs {
3058
+ class hs {
2908
3059
  /**
2909
3060
  @internal
2910
3061
  */
2911
3062
  constructor(e, n, r, i) {
2912
- this.name = e, this.rank = n, this.schema = r, this.spec = i, this.attrs = Ld(e, i.attrs), this.excluded = null;
2913
- let o = Rd(this.attrs);
3063
+ this.name = e, this.rank = n, this.schema = r, this.spec = i, this.attrs = Pd(e, i.attrs), this.excluded = null;
3064
+ let o = Dd(this.attrs);
2914
3065
  this.instance = o ? new ne(this, o) : null;
2915
3066
  }
2916
3067
  /**
@@ -2919,14 +3070,14 @@ class fs {
2919
3070
  they have defaults, will be added.
2920
3071
  */
2921
3072
  create(e = null) {
2922
- return !e && this.instance ? this.instance : new ne(this, Dd(this.attrs, e));
3073
+ return !e && this.instance ? this.instance : new ne(this, _d(this.attrs, e));
2923
3074
  }
2924
3075
  /**
2925
3076
  @internal
2926
3077
  */
2927
3078
  static compile(e, n) {
2928
3079
  let r = /* @__PURE__ */ Object.create(null), i = 0;
2929
- return e.forEach((o, s) => r[o] = new fs(o, i++, n, s)), r;
3080
+ return e.forEach((o, s) => r[o] = new hs(o, i++, n, s)), r;
2930
3081
  }
2931
3082
  /**
2932
3083
  When there is a mark of this type in the given set, a new set
@@ -2949,7 +3100,7 @@ class fs {
2949
3100
  @internal
2950
3101
  */
2951
3102
  checkAttrs(e) {
2952
- _d(this.attrs, e, "mark", this.name);
3103
+ Ld(this.attrs, e, "mark", this.name);
2953
3104
  }
2954
3105
  /**
2955
3106
  Queries whether a given mark type is
@@ -2959,7 +3110,7 @@ class fs {
2959
3110
  return this.excluded.indexOf(e) > -1;
2960
3111
  }
2961
3112
  }
2962
- class _1 {
3113
+ class $1 {
2963
3114
  /**
2964
3115
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
2965
3116
  */
@@ -2968,7 +3119,7 @@ class _1 {
2968
3119
  let n = this.spec = {};
2969
3120
  for (let i in e)
2970
3121
  n[i] = e[i];
2971
- n.nodes = Ee.from(e.nodes), n.marks = Ee.from(e.marks || {}), this.nodes = jo.compile(this.spec.nodes, this), this.marks = fs.compile(this.spec.marks, this);
3122
+ n.nodes = Ee.from(e.nodes), n.marks = Ee.from(e.marks || {}), this.nodes = jo.compile(this.spec.nodes, this), this.marks = hs.compile(this.spec.marks, this);
2972
3123
  let r = /* @__PURE__ */ Object.create(null);
2973
3124
  for (let i in this.nodes) {
2974
3125
  if (i in this.marks)
@@ -3044,10 +3195,10 @@ function ru(t, e) {
3044
3195
  }
3045
3196
  return n;
3046
3197
  }
3047
- function L1(t) {
3198
+ function V1(t) {
3048
3199
  return t.tag != null;
3049
3200
  }
3050
- function P1(t) {
3201
+ function W1(t) {
3051
3202
  return t.style != null;
3052
3203
  }
3053
3204
  class Pr {
@@ -3059,9 +3210,9 @@ class Pr {
3059
3210
  this.schema = e, this.rules = n, this.tags = [], this.styles = [];
3060
3211
  let r = this.matchedStyles = [];
3061
3212
  n.forEach((i) => {
3062
- if (L1(i))
3213
+ if (V1(i))
3063
3214
  this.tags.push(i);
3064
- else if (P1(i)) {
3215
+ else if (W1(i)) {
3065
3216
  let o = /[^=]*/.exec(i.style)[0];
3066
3217
  r.indexOf(o) < 0 && r.push(o), this.styles.push(i);
3067
3218
  }
@@ -3097,7 +3248,7 @@ class Pr {
3097
3248
  matchTag(e, n, r) {
3098
3249
  for (let i = r ? this.tags.indexOf(r) + 1 : 0; i < this.tags.length; i++) {
3099
3250
  let o = this.tags[i];
3100
- if (F1(e, o.tag) && (o.namespace === void 0 || e.namespaceURI == o.namespace) && (!o.context || n.matchesContext(o.context))) {
3251
+ if (U1(e, o.tag) && (o.namespace === void 0 || e.namespaceURI == o.namespace) && (!o.context || n.matchesContext(o.context))) {
3101
3252
  if (o.getAttrs) {
3102
3253
  let s = o.getAttrs(e);
3103
3254
  if (s === !1)
@@ -3165,7 +3316,7 @@ class Pr {
3165
3316
  return e.cached.domParser || (e.cached.domParser = new Pr(e, Pr.schemaRules(e)));
3166
3317
  }
3167
3318
  }
3168
- const zd = {
3319
+ const Bd = {
3169
3320
  address: !0,
3170
3321
  article: !0,
3171
3322
  aside: !0,
@@ -3198,16 +3349,16 @@ const zd = {
3198
3349
  table: !0,
3199
3350
  tfoot: !0,
3200
3351
  ul: !0
3201
- }, z1 = {
3352
+ }, q1 = {
3202
3353
  head: !0,
3203
3354
  noscript: !0,
3204
3355
  object: !0,
3205
3356
  script: !0,
3206
3357
  style: !0,
3207
3358
  title: !0
3208
- }, Bd = { ol: !0, ul: !0 }, Pi = 1, Ql = 2, Ti = 4;
3359
+ }, Fd = { ol: !0, ul: !0 }, Pi = 1, ea = 2, Ti = 4;
3209
3360
  function iu(t, e, n) {
3210
- return e != null ? (e ? Pi : 0) | (e === "full" ? Ql : 0) : t && t.whitespace == "pre" ? Pi | Ql : n & ~Ti;
3361
+ return e != null ? (e ? Pi : 0) | (e === "full" ? ea : 0) : t && t.whitespace == "pre" ? Pi | ea : n & ~Ti;
3211
3362
  }
3212
3363
  class fo {
3213
3364
  constructor(e, n, r, i, o, s) {
@@ -3239,7 +3390,7 @@ class fo {
3239
3390
  return !e && this.match && (n = n.append(this.match.fillBefore(O.empty, !0))), this.type ? this.type.create(this.attrs, n, this.marks) : n;
3240
3391
  }
3241
3392
  inlineContext(e) {
3242
- return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !zd.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
3393
+ return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Bd.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
3243
3394
  }
3244
3395
  }
3245
3396
  class ou {
@@ -3258,7 +3409,7 @@ class ou {
3258
3409
  e.nodeType == 3 ? this.addTextNode(e, n) : e.nodeType == 1 && this.addElement(e, n);
3259
3410
  }
3260
3411
  addTextNode(e, n) {
3261
- let r = e.nodeValue, i = this.top, o = i.options & Ql ? "full" : this.localPreserveWS || (i.options & Pi) > 0, { schema: s } = this.parser;
3412
+ let r = e.nodeValue, i = this.top, o = i.options & ea ? "full" : this.localPreserveWS || (i.options & Pi) > 0, { schema: s } = this.parser;
3262
3413
  if (o === "full" || i.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
3263
3414
  if (o)
3264
3415
  if (o === "full")
@@ -3285,14 +3436,14 @@ class ou {
3285
3436
  let i = this.localPreserveWS, o = this.top;
3286
3437
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
3287
3438
  let s = e.nodeName.toLowerCase(), l;
3288
- Bd.hasOwnProperty(s) && this.parser.normalizeLists && B1(e);
3439
+ Fd.hasOwnProperty(s) && this.parser.normalizeLists && j1(e);
3289
3440
  let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
3290
- e: if (a ? a.ignore : z1.hasOwnProperty(s))
3441
+ e: if (a ? a.ignore : q1.hasOwnProperty(s))
3291
3442
  this.findInside(e), this.ignoreFallback(e, n);
3292
3443
  else if (!a || a.skip || a.closeParent) {
3293
3444
  a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
3294
3445
  let c, u = this.needsBlock;
3295
- if (zd.hasOwnProperty(s))
3446
+ if (Bd.hasOwnProperty(s))
3296
3447
  o.content.length && o.content[0].isInline && this.open && (this.open--, o = this.top), c = !0, o.type || (this.needsBlock = !0);
3297
3448
  else if (!e.firstChild) {
3298
3449
  this.leafFallback(e, n);
@@ -3524,13 +3675,13 @@ class ou {
3524
3675
  }
3525
3676
  }
3526
3677
  }
3527
- function B1(t) {
3678
+ function j1(t) {
3528
3679
  for (let e = t.firstChild, n = null; e; e = e.nextSibling) {
3529
3680
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
3530
- r && Bd.hasOwnProperty(r) && n ? (n.appendChild(e), e = n) : r == "li" ? n = e : r && (n = null);
3681
+ r && Fd.hasOwnProperty(r) && n ? (n.appendChild(e), e = n) : r == "li" ? n = e : r && (n = null);
3531
3682
  }
3532
3683
  }
3533
- function F1(t, e) {
3684
+ function U1(t, e) {
3534
3685
  return (t.matches || t.msMatchesSelector || t.webkitMatchesSelector || t.mozMatchesSelector).call(t, e);
3535
3686
  }
3536
3687
  function su(t) {
@@ -3557,7 +3708,7 @@ function lu(t, e) {
3557
3708
  return !0;
3558
3709
  }
3559
3710
  }
3560
- class jr {
3711
+ class Ur {
3561
3712
  /**
3562
3713
  Create a serializer. `nodes` should map node names to functions
3563
3714
  that take a node and return a description of the corresponding
@@ -3644,7 +3795,7 @@ class jr {
3644
3795
  properties in a schema's node and mark specs.
3645
3796
  */
3646
3797
  static fromSchema(e) {
3647
- return e.cached.domSerializer || (e.cached.domSerializer = new jr(this.nodesFromSchema(e), this.marksFromSchema(e)));
3798
+ return e.cached.domSerializer || (e.cached.domSerializer = new Ur(this.nodesFromSchema(e), this.marksFromSchema(e)));
3648
3799
  }
3649
3800
  /**
3650
3801
  Gather the serializers in a schema's node specs into an object.
@@ -3673,11 +3824,11 @@ function Js(t) {
3673
3824
  return t.document || window.document;
3674
3825
  }
3675
3826
  const cu = /* @__PURE__ */ new WeakMap();
3676
- function H1(t) {
3827
+ function K1(t) {
3677
3828
  let e = cu.get(t);
3678
- return e === void 0 && cu.set(t, e = $1(t)), e;
3829
+ return e === void 0 && cu.set(t, e = J1(t)), e;
3679
3830
  }
3680
- function $1(t) {
3831
+ function J1(t) {
3681
3832
  let e = null;
3682
3833
  function n(r) {
3683
3834
  if (r && typeof r == "object")
@@ -3703,7 +3854,7 @@ function xo(t, e, n, r) {
3703
3854
  let i = e[0], o;
3704
3855
  if (typeof i != "string")
3705
3856
  throw new RangeError("Invalid array passed to renderSpec");
3706
- if (r && (o = H1(r)) && o.indexOf(e) > -1)
3857
+ if (r && (o = K1(r)) && o.indexOf(e) > -1)
3707
3858
  throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
3708
3859
  let s = i.indexOf(" ");
3709
3860
  s > 0 && (n = i.slice(0, s), i = i.slice(s + 1));
@@ -3733,13 +3884,13 @@ function xo(t, e, n, r) {
3733
3884
  }
3734
3885
  return { dom: a, contentDOM: l };
3735
3886
  }
3736
- const V1 = {};
3737
- function Wa(t, e) {
3738
- const n = V1, r = typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, i = typeof n.includeHtml == "boolean" ? n.includeHtml : !0;
3739
- return Fd(t, r, i);
3887
+ const G1 = {};
3888
+ function qa(t, e) {
3889
+ const n = G1, r = typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, i = typeof n.includeHtml == "boolean" ? n.includeHtml : !0;
3890
+ return Hd(t, r, i);
3740
3891
  }
3741
- function Fd(t, e, n) {
3742
- if (W1(t)) {
3892
+ function Hd(t, e, n) {
3893
+ if (Y1(t)) {
3743
3894
  if ("value" in t)
3744
3895
  return t.type === "html" && !n ? "" : t.value;
3745
3896
  if (e && "alt" in t && t.alt)
@@ -3753,14 +3904,14 @@ function uu(t, e, n) {
3753
3904
  const r = [];
3754
3905
  let i = -1;
3755
3906
  for (; ++i < t.length; )
3756
- r[i] = Fd(t[i], e, n);
3907
+ r[i] = Hd(t[i], e, n);
3757
3908
  return r.join("");
3758
3909
  }
3759
- function W1(t) {
3910
+ function Y1(t) {
3760
3911
  return !!(t && typeof t == "object");
3761
3912
  }
3762
3913
  const fu = document.createElement("i");
3763
- function qa(t) {
3914
+ function ja(t) {
3764
3915
  const e = "&" + t + ";";
3765
3916
  fu.innerHTML = e;
3766
3917
  const n = fu.textContent;
@@ -3779,14 +3930,14 @@ function bt(t, e) {
3779
3930
  return t.length > 0 ? (at(t, t.length, 0, e), t) : e;
3780
3931
  }
3781
3932
  const du = {}.hasOwnProperty;
3782
- function Hd(t) {
3933
+ function $d(t) {
3783
3934
  const e = {};
3784
3935
  let n = -1;
3785
3936
  for (; ++n < t.length; )
3786
- q1(e, t[n]);
3937
+ X1(e, t[n]);
3787
3938
  return e;
3788
3939
  }
3789
- function q1(t, e) {
3940
+ function X1(t, e) {
3790
3941
  let n;
3791
3942
  for (n in e) {
3792
3943
  const i = (du.call(t, n) ? t[n] : void 0) || (t[n] = {}), o = e[n];
@@ -3795,7 +3946,7 @@ function q1(t, e) {
3795
3946
  for (s in o) {
3796
3947
  du.call(i, s) || (i[s] = []);
3797
3948
  const l = o[s];
3798
- j1(
3949
+ Q1(
3799
3950
  // @ts-expect-error Looks like a list.
3800
3951
  i[s],
3801
3952
  Array.isArray(l) ? l : l ? [l] : []
@@ -3803,14 +3954,14 @@ function q1(t, e) {
3803
3954
  }
3804
3955
  }
3805
3956
  }
3806
- function j1(t, e) {
3957
+ function Q1(t, e) {
3807
3958
  let n = -1;
3808
3959
  const r = [];
3809
3960
  for (; ++n < e.length; )
3810
3961
  (e[n].add === "after" ? t : r).push(e[n]);
3811
3962
  at(t, 0, 0, r);
3812
3963
  }
3813
- function $d(t, e) {
3964
+ function Vd(t, e) {
3814
3965
  const n = Number.parseInt(t, e);
3815
3966
  return (
3816
3967
  // C0 except for HT, LF, FF, CR, space.
@@ -3826,7 +3977,7 @@ function $d(t, e) {
3826
3977
  function Rt(t) {
3827
3978
  return t.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
3828
3979
  }
3829
- const We = Bn(/[A-Za-z]/), Ze = Bn(/[\dA-Za-z]/), U1 = Bn(/[#-'*+\--9=?A-Z^-~]/);
3980
+ const We = Bn(/[A-Za-z]/), Ze = Bn(/[\dA-Za-z]/), Z1 = Bn(/[#-'*+\--9=?A-Z^-~]/);
3830
3981
  function Uo(t) {
3831
3982
  return (
3832
3983
  // Special whitespace codes (which have negative values), C0 and Control
@@ -3834,7 +3985,7 @@ function Uo(t) {
3834
3985
  t !== null && (t < 32 || t === 127)
3835
3986
  );
3836
3987
  }
3837
- const Zl = Bn(/\d/), K1 = Bn(/[\dA-Fa-f]/), J1 = Bn(/[!-/:-@[-`{-~]/);
3988
+ const ta = Bn(/\d/), ek = Bn(/[\dA-Fa-f]/), tk = Bn(/[!-/:-@[-`{-~]/);
3838
3989
  function $(t) {
3839
3990
  return t !== null && t < -2;
3840
3991
  }
@@ -3844,7 +3995,7 @@ function de(t) {
3844
3995
  function Z(t) {
3845
3996
  return t === -2 || t === -1 || t === 32;
3846
3997
  }
3847
- const ds = Bn(new RegExp("\\p{P}|\\p{S}", "u")), lr = Bn(/\s/);
3998
+ const ps = Bn(new RegExp("\\p{P}|\\p{S}", "u")), lr = Bn(/\s/);
3848
3999
  function Bn(t) {
3849
4000
  return e;
3850
4001
  function e(n) {
@@ -3862,10 +4013,10 @@ function re(t, e, n, r) {
3862
4013
  return Z(a) && o++ < i ? (t.consume(a), l) : (t.exit(n), e(a));
3863
4014
  }
3864
4015
  }
3865
- const G1 = {
3866
- tokenize: Y1
4016
+ const nk = {
4017
+ tokenize: rk
3867
4018
  };
3868
- function Y1(t) {
4019
+ function rk(t) {
3869
4020
  const e = t.attempt(this.parser.constructs.contentInitial, r, i);
3870
4021
  let n;
3871
4022
  return e;
@@ -3894,12 +4045,12 @@ function Y1(t) {
3894
4045
  return $(l) ? (t.consume(l), t.exit("chunkText"), o) : (t.consume(l), s);
3895
4046
  }
3896
4047
  }
3897
- const X1 = {
3898
- tokenize: Q1
4048
+ const ik = {
4049
+ tokenize: ok
3899
4050
  }, hu = {
3900
- tokenize: Z1
4051
+ tokenize: sk
3901
4052
  };
3902
- function Q1(t) {
4053
+ function ok(t) {
3903
4054
  const e = this, n = [];
3904
4055
  let r = 0, i, o, s;
3905
4056
  return l;
@@ -4011,16 +4162,16 @@ function Q1(t) {
4011
4162
  i.write([null]), o = void 0, i = void 0, e.containerState._closeFlow = void 0;
4012
4163
  }
4013
4164
  }
4014
- function Z1(t, e, n) {
4165
+ function sk(t, e, n) {
4015
4166
  return re(t, t.attempt(this.parser.constructs.document, e, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
4016
4167
  }
4017
4168
  function zr(t) {
4018
4169
  if (t === null || de(t) || lr(t))
4019
4170
  return 1;
4020
- if (ds(t))
4171
+ if (ps(t))
4021
4172
  return 2;
4022
4173
  }
4023
- function hs(t, e, n) {
4174
+ function ms(t, e, n) {
4024
4175
  const r = [];
4025
4176
  let i = -1;
4026
4177
  for (; ++i < t.length; ) {
@@ -4029,12 +4180,12 @@ function hs(t, e, n) {
4029
4180
  }
4030
4181
  return e;
4031
4182
  }
4032
- const ea = {
4183
+ const na = {
4033
4184
  name: "attention",
4034
- resolveAll: ek,
4035
- tokenize: tk
4185
+ resolveAll: lk,
4186
+ tokenize: ak
4036
4187
  };
4037
- function ek(t, e) {
4188
+ function lk(t, e) {
4038
4189
  let n = -1, r, i, o, s, l, a, c, u;
4039
4190
  for (; ++n < t.length; )
4040
4191
  if (t[n][0] === "enter" && t[n][1].type === "attentionSequence" && t[n][1]._close) {
@@ -4081,7 +4232,7 @@ function ek(t, e) {
4081
4232
  ...s.start
4082
4233
  }, t[n][1].start = {
4083
4234
  ...l.end
4084
- }, c = [], t[r][1].end.offset - t[r][1].start.offset && (c = bt(c, [["enter", t[r][1], e], ["exit", t[r][1], e]])), c = bt(c, [["enter", i, e], ["enter", s, e], ["exit", s, e], ["enter", o, e]]), c = bt(c, hs(e.parser.constructs.insideSpan.null, t.slice(r + 1, n), e)), c = bt(c, [["exit", o, e], ["enter", l, e], ["exit", l, e], ["exit", i, e]]), t[n][1].end.offset - t[n][1].start.offset ? (u = 2, c = bt(c, [["enter", t[n][1], e], ["exit", t[n][1], e]])) : u = 0, at(t, r - 1, n - r + 3, c), n = r + c.length - u - 2;
4235
+ }, c = [], t[r][1].end.offset - t[r][1].start.offset && (c = bt(c, [["enter", t[r][1], e], ["exit", t[r][1], e]])), c = bt(c, [["enter", i, e], ["enter", s, e], ["exit", s, e], ["enter", o, e]]), c = bt(c, ms(e.parser.constructs.insideSpan.null, t.slice(r + 1, n), e)), c = bt(c, [["exit", o, e], ["enter", l, e], ["exit", l, e], ["exit", i, e]]), t[n][1].end.offset - t[n][1].start.offset ? (u = 2, c = bt(c, [["enter", t[n][1], e], ["exit", t[n][1], e]])) : u = 0, at(t, r - 1, n - r + 3, c), n = r + c.length - u - 2;
4085
4236
  break;
4086
4237
  }
4087
4238
  }
@@ -4089,7 +4240,7 @@ function ek(t, e) {
4089
4240
  t[n][1].type === "attentionSequence" && (t[n][1].type = "data");
4090
4241
  return t;
4091
4242
  }
4092
- function tk(t, e) {
4243
+ function ak(t, e) {
4093
4244
  const n = this.parser.constructs.attentionMarkers.null, r = this.previous, i = zr(r);
4094
4245
  let o;
4095
4246
  return s;
@@ -4106,11 +4257,11 @@ function tk(t, e) {
4106
4257
  function pu(t, e) {
4107
4258
  t.column += e, t.offset += e, t._bufferIndex += e;
4108
4259
  }
4109
- const nk = {
4260
+ const ck = {
4110
4261
  name: "autolink",
4111
- tokenize: rk
4262
+ tokenize: uk
4112
4263
  };
4113
- function rk(t, e, n) {
4264
+ function uk(t, e, n) {
4114
4265
  let r = 0;
4115
4266
  return i;
4116
4267
  function i(h) {
@@ -4129,7 +4280,7 @@ function rk(t, e, n) {
4129
4280
  return h === 62 ? (t.exit("autolinkProtocol"), t.enter("autolinkMarker"), t.consume(h), t.exit("autolinkMarker"), t.exit("autolink"), e) : h === null || h === 32 || h === 60 || Uo(h) ? n(h) : (t.consume(h), a);
4130
4281
  }
4131
4282
  function c(h) {
4132
- return h === 64 ? (t.consume(h), u) : U1(h) ? (t.consume(h), c) : n(h);
4283
+ return h === 64 ? (t.consume(h), u) : Z1(h) ? (t.consume(h), c) : n(h);
4133
4284
  }
4134
4285
  function u(h) {
4135
4286
  return Ze(h) ? f(h) : n(h);
@@ -4147,9 +4298,9 @@ function rk(t, e, n) {
4147
4298
  }
4148
4299
  const ji = {
4149
4300
  partial: !0,
4150
- tokenize: ik
4301
+ tokenize: fk
4151
4302
  };
4152
- function ik(t, e, n) {
4303
+ function fk(t, e, n) {
4153
4304
  return r;
4154
4305
  function r(o) {
4155
4306
  return Z(o) ? re(t, i, "linePrefix")(o) : i(o);
@@ -4158,15 +4309,15 @@ function ik(t, e, n) {
4158
4309
  return o === null || $(o) ? e(o) : n(o);
4159
4310
  }
4160
4311
  }
4161
- const Vd = {
4312
+ const Wd = {
4162
4313
  continuation: {
4163
- tokenize: sk
4314
+ tokenize: hk
4164
4315
  },
4165
- exit: lk,
4316
+ exit: pk,
4166
4317
  name: "blockQuote",
4167
- tokenize: ok
4318
+ tokenize: dk
4168
4319
  };
4169
- function ok(t, e, n) {
4320
+ function dk(t, e, n) {
4170
4321
  const r = this;
4171
4322
  return i;
4172
4323
  function i(s) {
@@ -4182,37 +4333,37 @@ function ok(t, e, n) {
4182
4333
  return Z(s) ? (t.enter("blockQuotePrefixWhitespace"), t.consume(s), t.exit("blockQuotePrefixWhitespace"), t.exit("blockQuotePrefix"), e) : (t.exit("blockQuotePrefix"), e(s));
4183
4334
  }
4184
4335
  }
4185
- function sk(t, e, n) {
4336
+ function hk(t, e, n) {
4186
4337
  const r = this;
4187
4338
  return i;
4188
4339
  function i(s) {
4189
4340
  return Z(s) ? re(t, o, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(s) : o(s);
4190
4341
  }
4191
4342
  function o(s) {
4192
- return t.attempt(Vd, e, n)(s);
4343
+ return t.attempt(Wd, e, n)(s);
4193
4344
  }
4194
4345
  }
4195
- function lk(t) {
4346
+ function pk(t) {
4196
4347
  t.exit("blockQuote");
4197
4348
  }
4198
- const Wd = {
4349
+ const qd = {
4199
4350
  name: "characterEscape",
4200
- tokenize: ak
4351
+ tokenize: mk
4201
4352
  };
4202
- function ak(t, e, n) {
4353
+ function mk(t, e, n) {
4203
4354
  return r;
4204
4355
  function r(o) {
4205
4356
  return t.enter("characterEscape"), t.enter("escapeMarker"), t.consume(o), t.exit("escapeMarker"), i;
4206
4357
  }
4207
4358
  function i(o) {
4208
- return J1(o) ? (t.enter("characterEscapeValue"), t.consume(o), t.exit("characterEscapeValue"), t.exit("characterEscape"), e) : n(o);
4359
+ return tk(o) ? (t.enter("characterEscapeValue"), t.consume(o), t.exit("characterEscapeValue"), t.exit("characterEscape"), e) : n(o);
4209
4360
  }
4210
4361
  }
4211
- const qd = {
4362
+ const jd = {
4212
4363
  name: "characterReference",
4213
- tokenize: ck
4364
+ tokenize: gk
4214
4365
  };
4215
- function ck(t, e, n) {
4366
+ function gk(t, e, n) {
4216
4367
  const r = this;
4217
4368
  let i = 0, o, s;
4218
4369
  return l;
@@ -4223,25 +4374,25 @@ function ck(t, e, n) {
4223
4374
  return f === 35 ? (t.enter("characterReferenceMarkerNumeric"), t.consume(f), t.exit("characterReferenceMarkerNumeric"), c) : (t.enter("characterReferenceValue"), o = 31, s = Ze, u(f));
4224
4375
  }
4225
4376
  function c(f) {
4226
- return f === 88 || f === 120 ? (t.enter("characterReferenceMarkerHexadecimal"), t.consume(f), t.exit("characterReferenceMarkerHexadecimal"), t.enter("characterReferenceValue"), o = 6, s = K1, u) : (t.enter("characterReferenceValue"), o = 7, s = Zl, u(f));
4377
+ return f === 88 || f === 120 ? (t.enter("characterReferenceMarkerHexadecimal"), t.consume(f), t.exit("characterReferenceMarkerHexadecimal"), t.enter("characterReferenceValue"), o = 6, s = ek, u) : (t.enter("characterReferenceValue"), o = 7, s = ta, u(f));
4227
4378
  }
4228
4379
  function u(f) {
4229
4380
  if (f === 59 && i) {
4230
4381
  const d = t.exit("characterReferenceValue");
4231
- return s === Ze && !qa(r.sliceSerialize(d)) ? n(f) : (t.enter("characterReferenceMarker"), t.consume(f), t.exit("characterReferenceMarker"), t.exit("characterReference"), e);
4382
+ return s === Ze && !ja(r.sliceSerialize(d)) ? n(f) : (t.enter("characterReferenceMarker"), t.consume(f), t.exit("characterReferenceMarker"), t.exit("characterReference"), e);
4232
4383
  }
4233
4384
  return s(f) && i++ < o ? (t.consume(f), u) : n(f);
4234
4385
  }
4235
4386
  }
4236
4387
  const mu = {
4237
4388
  partial: !0,
4238
- tokenize: fk
4389
+ tokenize: kk
4239
4390
  }, gu = {
4240
4391
  concrete: !0,
4241
4392
  name: "codeFenced",
4242
- tokenize: uk
4393
+ tokenize: yk
4243
4394
  };
4244
- function uk(t, e, n) {
4395
+ function yk(t, e, n) {
4245
4396
  const r = this, i = {
4246
4397
  partial: !0,
4247
4398
  tokenize: v
@@ -4312,7 +4463,7 @@ function uk(t, e, n) {
4312
4463
  }
4313
4464
  }
4314
4465
  }
4315
- function fk(t, e, n) {
4466
+ function kk(t, e, n) {
4316
4467
  const r = this;
4317
4468
  return i;
4318
4469
  function i(s) {
@@ -4324,12 +4475,12 @@ function fk(t, e, n) {
4324
4475
  }
4325
4476
  const Gs = {
4326
4477
  name: "codeIndented",
4327
- tokenize: hk
4328
- }, dk = {
4478
+ tokenize: wk
4479
+ }, bk = {
4329
4480
  partial: !0,
4330
- tokenize: pk
4481
+ tokenize: xk
4331
4482
  };
4332
- function hk(t, e, n) {
4483
+ function wk(t, e, n) {
4333
4484
  const r = this;
4334
4485
  return i;
4335
4486
  function i(c) {
@@ -4340,7 +4491,7 @@ function hk(t, e, n) {
4340
4491
  return u && u[1].type === "linePrefix" && u[2].sliceSerialize(u[1], !0).length >= 4 ? s(c) : n(c);
4341
4492
  }
4342
4493
  function s(c) {
4343
- return c === null ? a(c) : $(c) ? t.attempt(dk, s, a)(c) : (t.enter("codeFlowValue"), l(c));
4494
+ return c === null ? a(c) : $(c) ? t.attempt(bk, s, a)(c) : (t.enter("codeFlowValue"), l(c));
4344
4495
  }
4345
4496
  function l(c) {
4346
4497
  return c === null || $(c) ? (t.exit("codeFlowValue"), s(c)) : (t.consume(c), l);
@@ -4349,7 +4500,7 @@ function hk(t, e, n) {
4349
4500
  return t.exit("codeIndented"), e(c);
4350
4501
  }
4351
4502
  }
4352
- function pk(t, e, n) {
4503
+ function xk(t, e, n) {
4353
4504
  const r = this;
4354
4505
  return i;
4355
4506
  function i(s) {
@@ -4360,13 +4511,13 @@ function pk(t, e, n) {
4360
4511
  return l && l[1].type === "linePrefix" && l[2].sliceSerialize(l[1], !0).length >= 4 ? e(s) : $(s) ? i(s) : n(s);
4361
4512
  }
4362
4513
  }
4363
- const mk = {
4514
+ const Ck = {
4364
4515
  name: "codeText",
4365
- previous: yk,
4366
- resolve: gk,
4367
- tokenize: kk
4516
+ previous: Tk,
4517
+ resolve: Sk,
4518
+ tokenize: Mk
4368
4519
  };
4369
- function gk(t) {
4520
+ function Sk(t) {
4370
4521
  let e = t.length - 4, n = 3, r, i;
4371
4522
  if ((t[n][1].type === "lineEnding" || t[n][1].type === "space") && (t[e][1].type === "lineEnding" || t[e][1].type === "space")) {
4372
4523
  for (r = n; ++r < e; )
@@ -4379,10 +4530,10 @@ function gk(t) {
4379
4530
  i === void 0 ? r !== e && t[r][1].type !== "lineEnding" && (i = r) : (r === e || t[r][1].type === "lineEnding") && (t[i][1].type = "codeTextData", r !== i + 2 && (t[i][1].end = t[r - 1][1].end, t.splice(i + 2, r - i - 2), e -= r - i - 2, r = i + 2), i = void 0);
4380
4531
  return t;
4381
4532
  }
4382
- function yk(t) {
4533
+ function Tk(t) {
4383
4534
  return t !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
4384
4535
  }
4385
- function kk(t, e, n) {
4536
+ function Mk(t, e, n) {
4386
4537
  let r = 0, i, o;
4387
4538
  return s;
4388
4539
  function s(f) {
@@ -4401,7 +4552,7 @@ function kk(t, e, n) {
4401
4552
  return f === 96 ? (t.consume(f), i++, u) : i === r ? (t.exit("codeTextSequence"), t.exit("codeText"), e(f)) : (o.type = "codeTextData", c(f));
4402
4553
  }
4403
4554
  }
4404
- class bk {
4555
+ class Ak {
4405
4556
  /**
4406
4557
  * @param {ReadonlyArray<T> | null | undefined} [initial]
4407
4558
  * Initial items (optional).
@@ -4573,10 +4724,10 @@ function ii(t, e) {
4573
4724
  for (; n < e.length; )
4574
4725
  t.push(...e.slice(n, n + 1e4)), n += 1e4;
4575
4726
  }
4576
- function jd(t) {
4727
+ function Ud(t) {
4577
4728
  const e = {};
4578
4729
  let n = -1, r, i, o, s, l, a, c;
4579
- const u = new bk(t);
4730
+ const u = new Ak(t);
4580
4731
  for (; ++n < u.length; ) {
4581
4732
  for (; n in e; )
4582
4733
  n = e[n];
@@ -4584,7 +4735,7 @@ function jd(t) {
4584
4735
  for (; ++o < a.length && a[o][1].type !== "content"; )
4585
4736
  a[o][1].type === "chunkText" && (a[o][1]._isInFirstContentOfListItem = !0, o++);
4586
4737
  if (r[0] === "enter")
4587
- r[1].contentType && (Object.assign(e, wk(u, n)), n = e[n], c = !0);
4738
+ r[1].contentType && (Object.assign(e, Nk(u, n)), n = e[n], c = !0);
4588
4739
  else if (r[1]._container) {
4589
4740
  for (o = n, i = void 0; o--; )
4590
4741
  if (s = u.get(o), s[1].type === "lineEnding" || s[1].type === "lineEndingBlank")
@@ -4597,7 +4748,7 @@ function jd(t) {
4597
4748
  }
4598
4749
  return at(t, 0, Number.POSITIVE_INFINITY, u.slice(0)), !c;
4599
4750
  }
4600
- function wk(t, e) {
4751
+ function Nk(t, e) {
4601
4752
  const n = t.get(e)[1], r = t.get(e)[2];
4602
4753
  let i = e - 1;
4603
4754
  const o = [];
@@ -4622,17 +4773,17 @@ function wk(t, e) {
4622
4773
  c[p + a[d][0]] = p + a[d][1], p += a[d][1] - a[d][0] - 1;
4623
4774
  return c;
4624
4775
  }
4625
- const xk = {
4626
- resolve: Sk,
4627
- tokenize: Tk
4628
- }, Ck = {
4776
+ const Ek = {
4777
+ resolve: vk,
4778
+ tokenize: Ok
4779
+ }, Ik = {
4629
4780
  partial: !0,
4630
- tokenize: Mk
4781
+ tokenize: Rk
4631
4782
  };
4632
- function Sk(t) {
4633
- return jd(t), t;
4783
+ function vk(t) {
4784
+ return Ud(t), t;
4634
4785
  }
4635
- function Tk(t, e) {
4786
+ function Ok(t, e) {
4636
4787
  let n;
4637
4788
  return r;
4638
4789
  function r(l) {
@@ -4641,7 +4792,7 @@ function Tk(t, e) {
4641
4792
  }), i(l);
4642
4793
  }
4643
4794
  function i(l) {
4644
- return l === null ? o(l) : $(l) ? t.check(Ck, s, o)(l) : (t.consume(l), i);
4795
+ return l === null ? o(l) : $(l) ? t.check(Ik, s, o)(l) : (t.consume(l), i);
4645
4796
  }
4646
4797
  function o(l) {
4647
4798
  return t.exit("chunkContent"), t.exit("content"), e(l);
@@ -4653,7 +4804,7 @@ function Tk(t, e) {
4653
4804
  }), n = n.next, i;
4654
4805
  }
4655
4806
  }
4656
- function Mk(t, e, n) {
4807
+ function Rk(t, e, n) {
4657
4808
  const r = this;
4658
4809
  return i;
4659
4810
  function i(s) {
@@ -4666,7 +4817,7 @@ function Mk(t, e, n) {
4666
4817
  return !r.parser.constructs.disable.null.includes("codeIndented") && l && l[1].type === "linePrefix" && l[2].sliceSerialize(l[1], !0).length >= 4 ? e(s) : t.interrupt(r.parser.constructs.flow, n, e)(s);
4667
4818
  }
4668
4819
  }
4669
- function Ud(t, e, n, r, i, o, s, l, a) {
4820
+ function Kd(t, e, n, r, i, o, s, l, a) {
4670
4821
  const c = a || Number.POSITIVE_INFINITY;
4671
4822
  let u = 0;
4672
4823
  return f;
@@ -4693,7 +4844,7 @@ function Ud(t, e, n, r, i, o, s, l, a) {
4693
4844
  return y === 40 || y === 41 || y === 92 ? (t.consume(y), m) : m(y);
4694
4845
  }
4695
4846
  }
4696
- function Kd(t, e, n, r, i, o) {
4847
+ function Jd(t, e, n, r, i, o) {
4697
4848
  const s = this;
4698
4849
  let l = 0, a;
4699
4850
  return c;
@@ -4717,7 +4868,7 @@ function Kd(t, e, n, r, i, o) {
4717
4868
  return h === 91 || h === 92 || h === 93 ? (t.consume(h), l++, f) : f(h);
4718
4869
  }
4719
4870
  }
4720
- function Jd(t, e, n, r, i, o) {
4871
+ function Gd(t, e, n, r, i, o) {
4721
4872
  let s;
4722
4873
  return l;
4723
4874
  function l(d) {
@@ -4745,14 +4896,14 @@ function Mi(t, e) {
4745
4896
  return $(i) ? (t.enter("lineEnding"), t.consume(i), t.exit("lineEnding"), n = !0, r) : Z(i) ? re(t, r, n ? "linePrefix" : "lineSuffix")(i) : e(i);
4746
4897
  }
4747
4898
  }
4748
- const Ak = {
4899
+ const Dk = {
4749
4900
  name: "definition",
4750
- tokenize: Ek
4751
- }, Nk = {
4901
+ tokenize: Lk
4902
+ }, _k = {
4752
4903
  partial: !0,
4753
- tokenize: Ik
4904
+ tokenize: Pk
4754
4905
  };
4755
- function Ek(t, e, n) {
4906
+ function Lk(t, e, n) {
4756
4907
  const r = this;
4757
4908
  let i;
4758
4909
  return o;
@@ -4760,7 +4911,7 @@ function Ek(t, e, n) {
4760
4911
  return t.enter("definition"), s(h);
4761
4912
  }
4762
4913
  function s(h) {
4763
- return Kd.call(
4914
+ return Jd.call(
4764
4915
  r,
4765
4916
  t,
4766
4917
  l,
@@ -4778,7 +4929,7 @@ function Ek(t, e, n) {
4778
4929
  return de(h) ? Mi(t, c)(h) : c(h);
4779
4930
  }
4780
4931
  function c(h) {
4781
- return Ud(
4932
+ return Kd(
4782
4933
  t,
4783
4934
  u,
4784
4935
  // Note: we don’t need to reset the way `markdown-rs` does.
@@ -4791,7 +4942,7 @@ function Ek(t, e, n) {
4791
4942
  )(h);
4792
4943
  }
4793
4944
  function u(h) {
4794
- return t.attempt(Nk, f, f)(h);
4945
+ return t.attempt(_k, f, f)(h);
4795
4946
  }
4796
4947
  function f(h) {
4797
4948
  return Z(h) ? re(t, d, "whitespace")(h) : d(h);
@@ -4800,13 +4951,13 @@ function Ek(t, e, n) {
4800
4951
  return h === null || $(h) ? (t.exit("definition"), r.parser.defined.push(i), e(h)) : n(h);
4801
4952
  }
4802
4953
  }
4803
- function Ik(t, e, n) {
4954
+ function Pk(t, e, n) {
4804
4955
  return r;
4805
4956
  function r(l) {
4806
4957
  return de(l) ? Mi(t, i)(l) : n(l);
4807
4958
  }
4808
4959
  function i(l) {
4809
- return Jd(t, o, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(l);
4960
+ return Gd(t, o, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(l);
4810
4961
  }
4811
4962
  function o(l) {
4812
4963
  return Z(l) ? re(t, s, "whitespace")(l) : s(l);
@@ -4815,11 +4966,11 @@ function Ik(t, e, n) {
4815
4966
  return l === null || $(l) ? e(l) : n(l);
4816
4967
  }
4817
4968
  }
4818
- const vk = {
4969
+ const zk = {
4819
4970
  name: "hardBreakEscape",
4820
- tokenize: Ok
4971
+ tokenize: Bk
4821
4972
  };
4822
- function Ok(t, e, n) {
4973
+ function Bk(t, e, n) {
4823
4974
  return r;
4824
4975
  function r(o) {
4825
4976
  return t.enter("hardBreakEscape"), t.consume(o), i;
@@ -4828,12 +4979,12 @@ function Ok(t, e, n) {
4828
4979
  return $(o) ? (t.exit("hardBreakEscape"), e(o)) : n(o);
4829
4980
  }
4830
4981
  }
4831
- const Rk = {
4982
+ const Fk = {
4832
4983
  name: "headingAtx",
4833
- resolve: Dk,
4834
- tokenize: _k
4984
+ resolve: Hk,
4985
+ tokenize: $k
4835
4986
  };
4836
- function Dk(t, e) {
4987
+ function Hk(t, e) {
4837
4988
  let n = t.length - 2, r = 3, i, o;
4838
4989
  return t[r][1].type === "whitespace" && (r += 2), n - 2 > r && t[n][1].type === "whitespace" && (n -= 2), t[n][1].type === "atxHeadingSequence" && (r === n - 1 || n - 4 > r && t[n - 2][1].type === "whitespace") && (n -= r + 1 === n ? 2 : 4), n > r && (i = {
4839
4990
  type: "atxHeadingText",
@@ -4846,7 +4997,7 @@ function Dk(t, e) {
4846
4997
  contentType: "text"
4847
4998
  }, at(t, r, n - r + 1, [["enter", i, e], ["enter", o, e], ["exit", o, e], ["exit", i, e]])), t;
4848
4999
  }
4849
- function _k(t, e, n) {
5000
+ function $k(t, e, n) {
4850
5001
  let r = 0;
4851
5002
  return i;
4852
5003
  function i(u) {
@@ -4868,7 +5019,7 @@ function _k(t, e, n) {
4868
5019
  return u === null || u === 35 || de(u) ? (t.exit("atxHeadingText"), l(u)) : (t.consume(u), c);
4869
5020
  }
4870
5021
  }
4871
- const Lk = [
5022
+ const Vk = [
4872
5023
  "address",
4873
5024
  "article",
4874
5025
  "aside",
@@ -4931,25 +5082,25 @@ const Lk = [
4931
5082
  "tr",
4932
5083
  "track",
4933
5084
  "ul"
4934
- ], yu = ["pre", "script", "style", "textarea"], Pk = {
5085
+ ], yu = ["pre", "script", "style", "textarea"], Wk = {
4935
5086
  concrete: !0,
4936
5087
  name: "htmlFlow",
4937
- resolveTo: Fk,
4938
- tokenize: Hk
4939
- }, zk = {
5088
+ resolveTo: Uk,
5089
+ tokenize: Kk
5090
+ }, qk = {
4940
5091
  partial: !0,
4941
- tokenize: Vk
4942
- }, Bk = {
5092
+ tokenize: Gk
5093
+ }, jk = {
4943
5094
  partial: !0,
4944
- tokenize: $k
5095
+ tokenize: Jk
4945
5096
  };
4946
- function Fk(t) {
5097
+ function Uk(t) {
4947
5098
  let e = t.length;
4948
5099
  for (; e-- && !(t[e][0] === "enter" && t[e][1].type === "htmlFlow"); )
4949
5100
  ;
4950
5101
  return e > 1 && t[e - 2][1].type === "linePrefix" && (t[e][1].start = t[e - 2][1].start, t[e + 1][1].start = t[e - 2][1].start, t.splice(e - 2, 2)), t;
4951
5102
  }
4952
- function Hk(t, e, n) {
5103
+ function Kk(t, e, n) {
4953
5104
  const r = this;
4954
5105
  let i, o, s, l, a;
4955
5106
  return c;
@@ -4978,7 +5129,7 @@ function Hk(t, e, n) {
4978
5129
  function g(k) {
4979
5130
  if (k === null || k === 47 || k === 62 || de(k)) {
4980
5131
  const Ce = k === 47, ie = s.toLowerCase();
4981
- return !Ce && !o && yu.includes(ie) ? (i = 1, r.interrupt ? e(k) : M(k)) : Lk.includes(s.toLowerCase()) ? (i = 6, Ce ? (t.consume(k), y) : r.interrupt ? e(k) : M(k)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(k) : o ? A(k) : C(k));
5132
+ return !Ce && !o && yu.includes(ie) ? (i = 1, r.interrupt ? e(k) : M(k)) : Vk.includes(s.toLowerCase()) ? (i = 6, Ce ? (t.consume(k), y) : r.interrupt ? e(k) : M(k)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(k) : o ? A(k) : C(k));
4982
5133
  }
4983
5134
  return k === 45 || Ze(k) ? (t.consume(k), s += String.fromCharCode(k), g) : n(k);
4984
5135
  }
@@ -5016,10 +5167,10 @@ function Hk(t, e, n) {
5016
5167
  return k === null || $(k) ? M(k) : Z(k) ? (t.consume(k), S) : n(k);
5017
5168
  }
5018
5169
  function M(k) {
5019
- return k === 45 && i === 2 ? (t.consume(k), pe) : k === 60 && i === 1 ? (t.consume(k), ue) : k === 62 && i === 4 ? (t.consume(k), X) : k === 63 && i === 3 ? (t.consume(k), b) : k === 93 && i === 5 ? (t.consume(k), be) : $(k) && (i === 6 || i === 7) ? (t.exit("htmlFlowData"), t.check(zk, De, H)(k)) : k === null || $(k) ? (t.exit("htmlFlowData"), H(k)) : (t.consume(k), M);
5170
+ return k === 45 && i === 2 ? (t.consume(k), pe) : k === 60 && i === 1 ? (t.consume(k), ue) : k === 62 && i === 4 ? (t.consume(k), X) : k === 63 && i === 3 ? (t.consume(k), b) : k === 93 && i === 5 ? (t.consume(k), be) : $(k) && (i === 6 || i === 7) ? (t.exit("htmlFlowData"), t.check(qk, De, H)(k)) : k === null || $(k) ? (t.exit("htmlFlowData"), H(k)) : (t.consume(k), M);
5020
5171
  }
5021
5172
  function H(k) {
5022
- return t.check(Bk, K, De)(k);
5173
+ return t.check(jk, K, De)(k);
5023
5174
  }
5024
5175
  function K(k) {
5025
5176
  return t.enter("lineEnding"), t.consume(k), t.exit("lineEnding"), W;
@@ -5053,7 +5204,7 @@ function Hk(t, e, n) {
5053
5204
  return t.exit("htmlFlow"), e(k);
5054
5205
  }
5055
5206
  }
5056
- function $k(t, e, n) {
5207
+ function Jk(t, e, n) {
5057
5208
  const r = this;
5058
5209
  return i;
5059
5210
  function i(s) {
@@ -5063,17 +5214,17 @@ function $k(t, e, n) {
5063
5214
  return r.parser.lazy[r.now().line] ? n(s) : e(s);
5064
5215
  }
5065
5216
  }
5066
- function Vk(t, e, n) {
5217
+ function Gk(t, e, n) {
5067
5218
  return r;
5068
5219
  function r(i) {
5069
5220
  return t.enter("lineEnding"), t.consume(i), t.exit("lineEnding"), t.attempt(ji, e, n);
5070
5221
  }
5071
5222
  }
5072
- const Wk = {
5223
+ const Yk = {
5073
5224
  name: "htmlText",
5074
- tokenize: qk
5225
+ tokenize: Xk
5075
5226
  };
5076
- function qk(t, e, n) {
5227
+ function Xk(t, e, n) {
5077
5228
  const r = this;
5078
5229
  let i, o, s;
5079
5230
  return l;
@@ -5166,19 +5317,19 @@ function qk(t, e, n) {
5166
5317
  return t.enter("htmlTextData"), s(b);
5167
5318
  }
5168
5319
  }
5169
- const ja = {
5320
+ const Ua = {
5170
5321
  name: "labelEnd",
5171
- resolveAll: Jk,
5172
- resolveTo: Gk,
5173
- tokenize: Yk
5174
- }, jk = {
5175
- tokenize: Xk
5176
- }, Uk = {
5177
- tokenize: Qk
5178
- }, Kk = {
5179
- tokenize: Zk
5322
+ resolveAll: tb,
5323
+ resolveTo: nb,
5324
+ tokenize: rb
5325
+ }, Qk = {
5326
+ tokenize: ib
5327
+ }, Zk = {
5328
+ tokenize: ob
5329
+ }, eb = {
5330
+ tokenize: sb
5180
5331
  };
5181
- function Jk(t) {
5332
+ function tb(t) {
5182
5333
  let e = -1;
5183
5334
  const n = [];
5184
5335
  for (; ++e < t.length; ) {
@@ -5190,7 +5341,7 @@ function Jk(t) {
5190
5341
  }
5191
5342
  return t.length !== n.length && at(t, 0, t.length, n), t;
5192
5343
  }
5193
- function Gk(t, e) {
5344
+ function nb(t, e) {
5194
5345
  let n = t.length, r = 0, i, o, s, l;
5195
5346
  for (; n--; )
5196
5347
  if (i = t[n][1], o) {
@@ -5228,9 +5379,9 @@ function Gk(t, e) {
5228
5379
  ...t[s - 2][1].start
5229
5380
  }
5230
5381
  };
5231
- return l = [["enter", a, e], ["enter", c, e]], l = bt(l, t.slice(o + 1, o + r + 3)), l = bt(l, [["enter", u, e]]), l = bt(l, hs(e.parser.constructs.insideSpan.null, t.slice(o + r + 4, s - 3), e)), l = bt(l, [["exit", u, e], t[s - 2], t[s - 1], ["exit", c, e]]), l = bt(l, t.slice(s + 1)), l = bt(l, [["exit", a, e]]), at(t, o, t.length, l), t;
5382
+ return l = [["enter", a, e], ["enter", c, e]], l = bt(l, t.slice(o + 1, o + r + 3)), l = bt(l, [["enter", u, e]]), l = bt(l, ms(e.parser.constructs.insideSpan.null, t.slice(o + r + 4, s - 3), e)), l = bt(l, [["exit", u, e], t[s - 2], t[s - 1], ["exit", c, e]]), l = bt(l, t.slice(s + 1)), l = bt(l, [["exit", a, e]]), at(t, o, t.length, l), t;
5232
5383
  }
5233
- function Yk(t, e, n) {
5384
+ function rb(t, e, n) {
5234
5385
  const r = this;
5235
5386
  let i = r.events.length, o, s;
5236
5387
  for (; i--; )
@@ -5246,10 +5397,10 @@ function Yk(t, e, n) {
5246
5397
  }))), t.enter("labelEnd"), t.enter("labelMarker"), t.consume(d), t.exit("labelMarker"), t.exit("labelEnd"), a) : n(d);
5247
5398
  }
5248
5399
  function a(d) {
5249
- return d === 40 ? t.attempt(jk, u, s ? u : f)(d) : d === 91 ? t.attempt(Uk, u, s ? c : f)(d) : s ? u(d) : f(d);
5400
+ return d === 40 ? t.attempt(Qk, u, s ? u : f)(d) : d === 91 ? t.attempt(Zk, u, s ? c : f)(d) : s ? u(d) : f(d);
5250
5401
  }
5251
5402
  function c(d) {
5252
- return t.attempt(Kk, u, f)(d);
5403
+ return t.attempt(eb, u, f)(d);
5253
5404
  }
5254
5405
  function u(d) {
5255
5406
  return e(d);
@@ -5258,7 +5409,7 @@ function Yk(t, e, n) {
5258
5409
  return o._balanced = !0, n(d);
5259
5410
  }
5260
5411
  }
5261
- function Xk(t, e, n) {
5412
+ function ib(t, e, n) {
5262
5413
  return r;
5263
5414
  function r(f) {
5264
5415
  return t.enter("resource"), t.enter("resourceMarker"), t.consume(f), t.exit("resourceMarker"), i;
@@ -5267,7 +5418,7 @@ function Xk(t, e, n) {
5267
5418
  return de(f) ? Mi(t, o)(f) : o(f);
5268
5419
  }
5269
5420
  function o(f) {
5270
- return f === 41 ? u(f) : Ud(t, s, l, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(f);
5421
+ return f === 41 ? u(f) : Kd(t, s, l, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(f);
5271
5422
  }
5272
5423
  function s(f) {
5273
5424
  return de(f) ? Mi(t, a)(f) : u(f);
@@ -5276,7 +5427,7 @@ function Xk(t, e, n) {
5276
5427
  return n(f);
5277
5428
  }
5278
5429
  function a(f) {
5279
- return f === 34 || f === 39 || f === 40 ? Jd(t, c, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(f) : u(f);
5430
+ return f === 34 || f === 39 || f === 40 ? Gd(t, c, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(f) : u(f);
5280
5431
  }
5281
5432
  function c(f) {
5282
5433
  return de(f) ? Mi(t, u)(f) : u(f);
@@ -5285,11 +5436,11 @@ function Xk(t, e, n) {
5285
5436
  return f === 41 ? (t.enter("resourceMarker"), t.consume(f), t.exit("resourceMarker"), t.exit("resource"), e) : n(f);
5286
5437
  }
5287
5438
  }
5288
- function Qk(t, e, n) {
5439
+ function ob(t, e, n) {
5289
5440
  const r = this;
5290
5441
  return i;
5291
5442
  function i(l) {
5292
- return Kd.call(r, t, o, s, "reference", "referenceMarker", "referenceString")(l);
5443
+ return Jd.call(r, t, o, s, "reference", "referenceMarker", "referenceString")(l);
5293
5444
  }
5294
5445
  function o(l) {
5295
5446
  return r.parser.defined.includes(Rt(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1))) ? e(l) : n(l);
@@ -5298,7 +5449,7 @@ function Qk(t, e, n) {
5298
5449
  return n(l);
5299
5450
  }
5300
5451
  }
5301
- function Zk(t, e, n) {
5452
+ function sb(t, e, n) {
5302
5453
  return r;
5303
5454
  function r(o) {
5304
5455
  return t.enter("reference"), t.enter("referenceMarker"), t.consume(o), t.exit("referenceMarker"), i;
@@ -5307,12 +5458,12 @@ function Zk(t, e, n) {
5307
5458
  return o === 93 ? (t.enter("referenceMarker"), t.consume(o), t.exit("referenceMarker"), t.exit("reference"), e) : n(o);
5308
5459
  }
5309
5460
  }
5310
- const eb = {
5461
+ const lb = {
5311
5462
  name: "labelStartImage",
5312
- resolveAll: ja.resolveAll,
5313
- tokenize: tb
5463
+ resolveAll: Ua.resolveAll,
5464
+ tokenize: ab
5314
5465
  };
5315
- function tb(t, e, n) {
5466
+ function ab(t, e, n) {
5316
5467
  const r = this;
5317
5468
  return i;
5318
5469
  function i(l) {
@@ -5325,12 +5476,12 @@ function tb(t, e, n) {
5325
5476
  return l === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? n(l) : e(l);
5326
5477
  }
5327
5478
  }
5328
- const nb = {
5479
+ const cb = {
5329
5480
  name: "labelStartLink",
5330
- resolveAll: ja.resolveAll,
5331
- tokenize: rb
5481
+ resolveAll: Ua.resolveAll,
5482
+ tokenize: ub
5332
5483
  };
5333
- function rb(t, e, n) {
5484
+ function ub(t, e, n) {
5334
5485
  const r = this;
5335
5486
  return i;
5336
5487
  function i(s) {
@@ -5342,9 +5493,9 @@ function rb(t, e, n) {
5342
5493
  }
5343
5494
  const Ys = {
5344
5495
  name: "lineEnding",
5345
- tokenize: ib
5496
+ tokenize: fb
5346
5497
  };
5347
- function ib(t, e) {
5498
+ function fb(t, e) {
5348
5499
  return n;
5349
5500
  function n(r) {
5350
5501
  return t.enter("lineEnding"), t.consume(r), t.exit("lineEnding"), re(t, e, "linePrefix");
@@ -5352,9 +5503,9 @@ function ib(t, e) {
5352
5503
  }
5353
5504
  const Co = {
5354
5505
  name: "thematicBreak",
5355
- tokenize: ob
5506
+ tokenize: db
5356
5507
  };
5357
- function ob(t, e, n) {
5508
+ function db(t, e, n) {
5358
5509
  let r = 0, i;
5359
5510
  return o;
5360
5511
  function o(c) {
@@ -5372,25 +5523,25 @@ function ob(t, e, n) {
5372
5523
  }
5373
5524
  const Qe = {
5374
5525
  continuation: {
5375
- tokenize: cb
5526
+ tokenize: gb
5376
5527
  },
5377
- exit: fb,
5528
+ exit: kb,
5378
5529
  name: "list",
5379
- tokenize: ab
5380
- }, sb = {
5530
+ tokenize: mb
5531
+ }, hb = {
5381
5532
  partial: !0,
5382
- tokenize: db
5383
- }, lb = {
5533
+ tokenize: bb
5534
+ }, pb = {
5384
5535
  partial: !0,
5385
- tokenize: ub
5536
+ tokenize: yb
5386
5537
  };
5387
- function ab(t, e, n) {
5538
+ function mb(t, e, n) {
5388
5539
  const r = this, i = r.events[r.events.length - 1];
5389
5540
  let o = i && i[1].type === "linePrefix" ? i[2].sliceSerialize(i[1], !0).length : 0, s = 0;
5390
5541
  return l;
5391
5542
  function l(h) {
5392
5543
  const p = r.containerState.type || (h === 42 || h === 43 || h === 45 ? "listUnordered" : "listOrdered");
5393
- if (p === "listUnordered" ? !r.containerState.marker || h === r.containerState.marker : Zl(h)) {
5544
+ if (p === "listUnordered" ? !r.containerState.marker || h === r.containerState.marker : ta(h)) {
5394
5545
  if (r.containerState.type || (r.containerState.type = p, t.enter(p, {
5395
5546
  _container: !0
5396
5547
  })), p === "listUnordered")
@@ -5401,14 +5552,14 @@ function ab(t, e, n) {
5401
5552
  return n(h);
5402
5553
  }
5403
5554
  function a(h) {
5404
- return Zl(h) && ++s < 10 ? (t.consume(h), a) : (!r.interrupt || s < 2) && (r.containerState.marker ? h === r.containerState.marker : h === 41 || h === 46) ? (t.exit("listItemValue"), c(h)) : n(h);
5555
+ return ta(h) && ++s < 10 ? (t.consume(h), a) : (!r.interrupt || s < 2) && (r.containerState.marker ? h === r.containerState.marker : h === 41 || h === 46) ? (t.exit("listItemValue"), c(h)) : n(h);
5405
5556
  }
5406
5557
  function c(h) {
5407
5558
  return t.enter("listItemMarker"), t.consume(h), t.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || h, t.check(
5408
5559
  ji,
5409
5560
  // Can’t be empty when interrupting.
5410
5561
  r.interrupt ? n : u,
5411
- t.attempt(sb, d, f)
5562
+ t.attempt(hb, d, f)
5412
5563
  );
5413
5564
  }
5414
5565
  function u(h) {
@@ -5421,20 +5572,20 @@ function ab(t, e, n) {
5421
5572
  return r.containerState.size = o + r.sliceSerialize(t.exit("listItemPrefix"), !0).length, e(h);
5422
5573
  }
5423
5574
  }
5424
- function cb(t, e, n) {
5575
+ function gb(t, e, n) {
5425
5576
  const r = this;
5426
5577
  return r.containerState._closeFlow = void 0, t.check(ji, i, o);
5427
5578
  function i(l) {
5428
5579
  return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, re(t, e, "listItemIndent", r.containerState.size + 1)(l);
5429
5580
  }
5430
5581
  function o(l) {
5431
- return r.containerState.furtherBlankLines || !Z(l) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, s(l)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, t.attempt(lb, e, s)(l));
5582
+ return r.containerState.furtherBlankLines || !Z(l) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, s(l)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, t.attempt(pb, e, s)(l));
5432
5583
  }
5433
5584
  function s(l) {
5434
5585
  return r.containerState._closeFlow = !0, r.interrupt = void 0, re(t, t.attempt(Qe, e, n), "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(l);
5435
5586
  }
5436
5587
  }
5437
- function ub(t, e, n) {
5588
+ function yb(t, e, n) {
5438
5589
  const r = this;
5439
5590
  return re(t, i, "listItemIndent", r.containerState.size + 1);
5440
5591
  function i(o) {
@@ -5442,10 +5593,10 @@ function ub(t, e, n) {
5442
5593
  return s && s[1].type === "listItemIndent" && s[2].sliceSerialize(s[1], !0).length === r.containerState.size ? e(o) : n(o);
5443
5594
  }
5444
5595
  }
5445
- function fb(t) {
5596
+ function kb(t) {
5446
5597
  t.exit(this.containerState.type);
5447
5598
  }
5448
- function db(t, e, n) {
5599
+ function bb(t, e, n) {
5449
5600
  const r = this;
5450
5601
  return re(t, i, "listItemPrefixWhitespace", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5);
5451
5602
  function i(o) {
@@ -5455,10 +5606,10 @@ function db(t, e, n) {
5455
5606
  }
5456
5607
  const ku = {
5457
5608
  name: "setextUnderline",
5458
- resolveTo: hb,
5459
- tokenize: pb
5609
+ resolveTo: wb,
5610
+ tokenize: xb
5460
5611
  };
5461
- function hb(t, e) {
5612
+ function wb(t, e) {
5462
5613
  let n = t.length, r, i, o;
5463
5614
  for (; n--; )
5464
5615
  if (t[n][0] === "enter") {
@@ -5482,7 +5633,7 @@ function hb(t, e) {
5482
5633
  ...t[o][1].end
5483
5634
  }) : t[r][1] = s, t.push(["exit", s, e]), t;
5484
5635
  }
5485
- function pb(t, e, n) {
5636
+ function xb(t, e, n) {
5486
5637
  const r = this;
5487
5638
  let i;
5488
5639
  return o;
@@ -5505,16 +5656,16 @@ function pb(t, e, n) {
5505
5656
  return c === null || $(c) ? (t.exit("setextHeadingLine"), e(c)) : n(c);
5506
5657
  }
5507
5658
  }
5508
- const mb = {
5509
- tokenize: gb
5659
+ const Cb = {
5660
+ tokenize: Sb
5510
5661
  };
5511
- function gb(t) {
5662
+ function Sb(t) {
5512
5663
  const e = this, n = t.attempt(
5513
5664
  // Try to parse a blank line.
5514
5665
  ji,
5515
5666
  r,
5516
5667
  // Try to parse initial flow (essentially, only code).
5517
- t.attempt(this.parser.constructs.flowInitial, i, re(t, t.attempt(this.parser.constructs.flow, i, t.attempt(xk, i)), "linePrefix"))
5668
+ t.attempt(this.parser.constructs.flowInitial, i, re(t, t.attempt(this.parser.constructs.flow, i, t.attempt(Ek, i)), "linePrefix"))
5518
5669
  );
5519
5670
  return n;
5520
5671
  function r(o) {
@@ -5532,12 +5683,12 @@ function gb(t) {
5532
5683
  return t.enter("lineEnding"), t.consume(o), t.exit("lineEnding"), e.currentConstruct = void 0, n;
5533
5684
  }
5534
5685
  }
5535
- const yb = {
5536
- resolveAll: Yd()
5537
- }, kb = Gd("string"), bb = Gd("text");
5538
- function Gd(t) {
5686
+ const Tb = {
5687
+ resolveAll: Xd()
5688
+ }, Mb = Yd("string"), Ab = Yd("text");
5689
+ function Yd(t) {
5539
5690
  return {
5540
- resolveAll: Yd(t === "text" ? wb : void 0),
5691
+ resolveAll: Xd(t === "text" ? Nb : void 0),
5541
5692
  tokenize: e
5542
5693
  };
5543
5694
  function e(n) {
@@ -5571,7 +5722,7 @@ function Gd(t) {
5571
5722
  }
5572
5723
  }
5573
5724
  }
5574
- function Yd(t) {
5725
+ function Xd(t) {
5575
5726
  return e;
5576
5727
  function e(n, r) {
5577
5728
  let i = -1, o;
@@ -5580,7 +5731,7 @@ function Yd(t) {
5580
5731
  return t ? t(n, r) : n;
5581
5732
  }
5582
5733
  }
5583
- function wb(t, e) {
5734
+ function Nb(t, e) {
5584
5735
  let n = 0;
5585
5736
  for (; ++n <= t.length; )
5586
5737
  if ((n === t.length || t[n][1].type === "lineEnding") && t[n - 1][1].type === "data") {
@@ -5622,7 +5773,7 @@ function wb(t, e) {
5622
5773
  }
5623
5774
  return t;
5624
5775
  }
5625
- const xb = {
5776
+ const Eb = {
5626
5777
  42: Qe,
5627
5778
  43: Qe,
5628
5779
  45: Qe,
@@ -5636,57 +5787,57 @@ const xb = {
5636
5787
  55: Qe,
5637
5788
  56: Qe,
5638
5789
  57: Qe,
5639
- 62: Vd
5640
- }, Cb = {
5641
- 91: Ak
5642
- }, Sb = {
5790
+ 62: Wd
5791
+ }, Ib = {
5792
+ 91: Dk
5793
+ }, vb = {
5643
5794
  [-2]: Gs,
5644
5795
  [-1]: Gs,
5645
5796
  32: Gs
5646
- }, Tb = {
5647
- 35: Rk,
5797
+ }, Ob = {
5798
+ 35: Fk,
5648
5799
  42: Co,
5649
5800
  45: [ku, Co],
5650
- 60: Pk,
5801
+ 60: Wk,
5651
5802
  61: ku,
5652
5803
  95: Co,
5653
5804
  96: gu,
5654
5805
  126: gu
5655
- }, Mb = {
5656
- 38: qd,
5657
- 92: Wd
5658
- }, Ab = {
5806
+ }, Rb = {
5807
+ 38: jd,
5808
+ 92: qd
5809
+ }, Db = {
5659
5810
  [-5]: Ys,
5660
5811
  [-4]: Ys,
5661
5812
  [-3]: Ys,
5662
- 33: eb,
5663
- 38: qd,
5664
- 42: ea,
5665
- 60: [nk, Wk],
5666
- 91: nb,
5667
- 92: [vk, Wd],
5668
- 93: ja,
5669
- 95: ea,
5670
- 96: mk
5671
- }, Nb = {
5672
- null: [ea, yb]
5673
- }, Eb = {
5813
+ 33: lb,
5814
+ 38: jd,
5815
+ 42: na,
5816
+ 60: [ck, Yk],
5817
+ 91: cb,
5818
+ 92: [zk, qd],
5819
+ 93: Ua,
5820
+ 95: na,
5821
+ 96: Ck
5822
+ }, _b = {
5823
+ null: [na, Tb]
5824
+ }, Lb = {
5674
5825
  null: [42, 95]
5675
- }, Ib = {
5826
+ }, Pb = {
5676
5827
  null: []
5677
- }, vb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5828
+ }, zb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5678
5829
  __proto__: null,
5679
- attentionMarkers: Eb,
5680
- contentInitial: Cb,
5681
- disable: Ib,
5682
- document: xb,
5683
- flow: Tb,
5684
- flowInitial: Sb,
5685
- insideSpan: Nb,
5686
- string: Mb,
5687
- text: Ab
5830
+ attentionMarkers: Lb,
5831
+ contentInitial: Ib,
5832
+ disable: Pb,
5833
+ document: Eb,
5834
+ flow: Ob,
5835
+ flowInitial: vb,
5836
+ insideSpan: _b,
5837
+ string: Rb,
5838
+ text: Db
5688
5839
  }, Symbol.toStringTag, { value: "Module" }));
5689
- function Ob(t, e, n) {
5840
+ function Bb(t, e, n) {
5690
5841
  let r = {
5691
5842
  _bufferIndex: -1,
5692
5843
  _index: 0,
@@ -5720,13 +5871,13 @@ function Ob(t, e, n) {
5720
5871
  let u = e.tokenize.call(c, a);
5721
5872
  return e.resolveAll && o.push(e), c;
5722
5873
  function f(S) {
5723
- return s = bt(s, S), g(), s[s.length - 1] !== null ? [] : (P(e, 0), c.events = hs(o, c.events, c), c.events);
5874
+ return s = bt(s, S), g(), s[s.length - 1] !== null ? [] : (P(e, 0), c.events = ms(o, c.events, c), c.events);
5724
5875
  }
5725
5876
  function d(S, M) {
5726
- return Db(h(S), M);
5877
+ return Hb(h(S), M);
5727
5878
  }
5728
5879
  function h(S) {
5729
- return Rb(s, S);
5880
+ return Fb(s, S);
5730
5881
  }
5731
5882
  function p() {
5732
5883
  const {
@@ -5849,7 +6000,7 @@ function Ob(t, e, n) {
5849
6000
  r.line in i && r.column < 2 && (r.column = i[r.line], r.offset += i[r.line] - 1);
5850
6001
  }
5851
6002
  }
5852
- function Rb(t, e) {
6003
+ function Fb(t, e) {
5853
6004
  const n = e.start._index, r = e.start._bufferIndex, i = e.end._index, o = e.end._bufferIndex;
5854
6005
  let s;
5855
6006
  if (n === i)
@@ -5863,7 +6014,7 @@ function Rb(t, e) {
5863
6014
  }
5864
6015
  return s;
5865
6016
  }
5866
- function Db(t, e) {
6017
+ function Hb(t, e) {
5867
6018
  let n = -1;
5868
6019
  const r = [];
5869
6020
  let i;
@@ -5903,35 +6054,35 @@ function Db(t, e) {
5903
6054
  }
5904
6055
  return r.join("");
5905
6056
  }
5906
- function _b(t) {
6057
+ function $b(t) {
5907
6058
  const r = {
5908
6059
  constructs: (
5909
6060
  /** @type {FullNormalizedExtension} */
5910
- Hd([vb, ...(t || {}).extensions || []])
6061
+ $d([zb, ...(t || {}).extensions || []])
5911
6062
  ),
5912
- content: i(G1),
6063
+ content: i(nk),
5913
6064
  defined: [],
5914
- document: i(X1),
5915
- flow: i(mb),
6065
+ document: i(ik),
6066
+ flow: i(Cb),
5916
6067
  lazy: {},
5917
- string: i(kb),
5918
- text: i(bb)
6068
+ string: i(Mb),
6069
+ text: i(Ab)
5919
6070
  };
5920
6071
  return r;
5921
6072
  function i(o) {
5922
6073
  return s;
5923
6074
  function s(l) {
5924
- return Ob(r, o, l);
6075
+ return Bb(r, o, l);
5925
6076
  }
5926
6077
  }
5927
6078
  }
5928
- function Lb(t) {
5929
- for (; !jd(t); )
6079
+ function Vb(t) {
6080
+ for (; !Ud(t); )
5930
6081
  ;
5931
6082
  return t;
5932
6083
  }
5933
6084
  const bu = /[\0\t\n\r]/g;
5934
- function Pb() {
6085
+ function Wb() {
5935
6086
  let t = 1, e = "", n = !0, r;
5936
6087
  return i;
5937
6088
  function i(o, s, l) {
@@ -5966,36 +6117,36 @@ function Pb() {
5966
6117
  return l && (r && a.push(-5), e && a.push(e), a.push(null)), a;
5967
6118
  }
5968
6119
  }
5969
- const zb = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
5970
- function Xd(t) {
5971
- return t.replace(zb, Bb);
6120
+ const qb = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
6121
+ function Qd(t) {
6122
+ return t.replace(qb, jb);
5972
6123
  }
5973
- function Bb(t, e, n) {
6124
+ function jb(t, e, n) {
5974
6125
  if (e)
5975
6126
  return e;
5976
6127
  if (n.charCodeAt(0) === 35) {
5977
6128
  const i = n.charCodeAt(1), o = i === 120 || i === 88;
5978
- return $d(n.slice(o ? 2 : 1), o ? 16 : 10);
6129
+ return Vd(n.slice(o ? 2 : 1), o ? 16 : 10);
5979
6130
  }
5980
- return qa(n) || t;
6131
+ return ja(n) || t;
5981
6132
  }
5982
6133
  function Ai(t) {
5983
- return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? wu(t.position) : "start" in t || "end" in t ? wu(t) : "line" in t || "column" in t ? ta(t) : "";
6134
+ return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? wu(t.position) : "start" in t || "end" in t ? wu(t) : "line" in t || "column" in t ? ra(t) : "";
5984
6135
  }
5985
- function ta(t) {
6136
+ function ra(t) {
5986
6137
  return xu(t && t.line) + ":" + xu(t && t.column);
5987
6138
  }
5988
6139
  function wu(t) {
5989
- return ta(t && t.start) + "-" + ta(t && t.end);
6140
+ return ra(t && t.start) + "-" + ra(t && t.end);
5990
6141
  }
5991
6142
  function xu(t) {
5992
6143
  return t && typeof t == "number" ? t : 1;
5993
6144
  }
5994
- const Qd = {}.hasOwnProperty;
5995
- function Fb(t, e, n) {
5996
- return typeof e != "string" && (n = e, e = void 0), Hb(n)(Lb(_b(n).document().write(Pb()(t, e, !0))));
6145
+ const Zd = {}.hasOwnProperty;
6146
+ function Ub(t, e, n) {
6147
+ return typeof e != "string" && (n = e, e = void 0), Kb(n)(Vb($b(n).document().write(Wb()(t, e, !0))));
5997
6148
  }
5998
- function Hb(t) {
6149
+ function Kb(t) {
5999
6150
  const e = {
6000
6151
  transforms: [],
6001
6152
  canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
@@ -6094,7 +6245,7 @@ function Hb(t) {
6094
6245
  thematicBreak: a()
6095
6246
  }
6096
6247
  };
6097
- Zd(e, (t || {}).mdastExtensions || []);
6248
+ eh(e, (t || {}).mdastExtensions || []);
6098
6249
  const n = {};
6099
6250
  return r;
6100
6251
  function r(N) {
@@ -6123,7 +6274,7 @@ function Hb(t) {
6123
6274
  }
6124
6275
  for (se = -1; ++se < N.length; ) {
6125
6276
  const Ge = e[N[se][0]];
6126
- Qd.call(Ge, N[se][1].type) && Ge[N[se][1].type].call(Object.assign({
6277
+ Zd.call(Ge, N[se][1].type) && Ge[N[se][1].type].call(Object.assign({
6127
6278
  sliceSerialize: N[se][2].sliceSerialize
6128
6279
  }, q), N[se][1]);
6129
6280
  }
@@ -6232,7 +6383,7 @@ function Hb(t) {
6232
6383
  q.position.end = xn(N.end);
6233
6384
  }
6234
6385
  function u() {
6235
- return Wa(this.stack.pop());
6386
+ return qa(this.stack.pop());
6236
6387
  }
6237
6388
  function f() {
6238
6389
  this.data.expectingFirstListItemValue = !0;
@@ -6348,7 +6499,7 @@ function Hb(t) {
6348
6499
  }
6349
6500
  function ce(N) {
6350
6501
  const _ = this.sliceSerialize(N), q = this.stack[this.stack.length - 2];
6351
- q.label = Xd(_), q.identifier = Rt(_).toLowerCase();
6502
+ q.label = Qd(_), q.identifier = Rt(_).toLowerCase();
6352
6503
  }
6353
6504
  function be() {
6354
6505
  const N = this.stack[this.stack.length - 1], _ = this.resume(), q = this.stack[this.stack.length - 1];
@@ -6382,7 +6533,7 @@ function Hb(t) {
6382
6533
  function fe(N) {
6383
6534
  const _ = this.sliceSerialize(N), q = this.data.characterReferenceType;
6384
6535
  let G;
6385
- q ? (G = $d(_, q === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : G = qa(_);
6536
+ q ? (G = Vd(_, q === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : G = ja(_);
6386
6537
  const se = this.stack[this.stack.length - 1];
6387
6538
  se.value += G;
6388
6539
  }
@@ -6518,17 +6669,17 @@ function xn(t) {
6518
6669
  offset: t.offset
6519
6670
  };
6520
6671
  }
6521
- function Zd(t, e) {
6672
+ function eh(t, e) {
6522
6673
  let n = -1;
6523
6674
  for (; ++n < e.length; ) {
6524
6675
  const r = e[n];
6525
- Array.isArray(r) ? Zd(t, r) : $b(t, r);
6676
+ Array.isArray(r) ? eh(t, r) : Jb(t, r);
6526
6677
  }
6527
6678
  }
6528
- function $b(t, e) {
6679
+ function Jb(t, e) {
6529
6680
  let n;
6530
6681
  for (n in e)
6531
- if (Qd.call(e, n))
6682
+ if (Zd.call(e, n))
6532
6683
  switch (n) {
6533
6684
  case "canContainEols": {
6534
6685
  const r = e[n];
@@ -6560,11 +6711,11 @@ function Cu(t, e) {
6560
6711
  end: e.end
6561
6712
  }) + ") is still open");
6562
6713
  }
6563
- function Vb(t) {
6714
+ function Gb(t) {
6564
6715
  const e = this;
6565
6716
  e.parser = n;
6566
6717
  function n(r) {
6567
- return Fb(r, {
6718
+ return Ub(r, {
6568
6719
  ...e.data("settings"),
6569
6720
  ...t,
6570
6721
  // Note: these options are not in the readme.
@@ -6576,7 +6727,7 @@ function Vb(t) {
6576
6727
  }
6577
6728
  }
6578
6729
  const Su = {}.hasOwnProperty;
6579
- function Wb(t, e) {
6730
+ function Yb(t, e) {
6580
6731
  const n = e || {};
6581
6732
  function r(i, ...o) {
6582
6733
  let s = r.invalid;
@@ -6590,14 +6741,14 @@ function Wb(t, e) {
6590
6741
  }
6591
6742
  return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
6592
6743
  }
6593
- const qb = {}.hasOwnProperty;
6594
- function eh(t, e) {
6744
+ const Xb = {}.hasOwnProperty;
6745
+ function th(t, e) {
6595
6746
  let n = -1, r;
6596
6747
  if (e.extensions)
6597
6748
  for (; ++n < e.extensions.length; )
6598
- eh(t, e.extensions[n]);
6749
+ th(t, e.extensions[n]);
6599
6750
  for (r in e)
6600
- if (qb.call(e, r))
6751
+ if (Xb.call(e, r))
6601
6752
  switch (r) {
6602
6753
  case "extensions":
6603
6754
  break;
@@ -6611,7 +6762,7 @@ function eh(t, e) {
6611
6762
  break;
6612
6763
  }
6613
6764
  case "handlers": {
6614
- jb(t[r], e[r]);
6765
+ Qb(t[r], e[r]);
6615
6766
  break;
6616
6767
  }
6617
6768
  default:
@@ -6622,22 +6773,22 @@ function eh(t, e) {
6622
6773
  function Tu(t, e) {
6623
6774
  e && t.push(...e);
6624
6775
  }
6625
- function jb(t, e) {
6776
+ function Qb(t, e) {
6626
6777
  e && Object.assign(t, e);
6627
6778
  }
6628
- function Ub(t, e, n, r) {
6779
+ function Zb(t, e, n, r) {
6629
6780
  const i = n.enter("blockquote"), o = n.createTracker(r);
6630
6781
  o.move("> "), o.shift(2);
6631
6782
  const s = n.indentLines(
6632
6783
  n.containerFlow(t, o.current()),
6633
- Kb
6784
+ e0
6634
6785
  );
6635
6786
  return i(), s;
6636
6787
  }
6637
- function Kb(t, e, n) {
6788
+ function e0(t, e, n) {
6638
6789
  return ">" + (n ? "" : " ") + t;
6639
6790
  }
6640
- function th(t, e) {
6791
+ function nh(t, e) {
6641
6792
  return Mu(t, e.inConstruct, !0) && !Mu(t, e.notInConstruct, !1);
6642
6793
  }
6643
6794
  function Mu(t, e, n) {
@@ -6653,12 +6804,12 @@ function Au(t, e, n, r) {
6653
6804
  let i = -1;
6654
6805
  for (; ++i < n.unsafe.length; )
6655
6806
  if (n.unsafe[i].character === `
6656
- ` && th(n.stack, n.unsafe[i]))
6807
+ ` && nh(n.stack, n.unsafe[i]))
6657
6808
  return /[ \t]/.test(r.before) ? "" : " ";
6658
6809
  return `\\
6659
6810
  `;
6660
6811
  }
6661
- function Jb(t, e) {
6812
+ function t0(t, e) {
6662
6813
  const n = String(t);
6663
6814
  let r = n.indexOf(e), i = r, o = 0, s = 0;
6664
6815
  if (typeof e != "string")
@@ -6667,13 +6818,13 @@ function Jb(t, e) {
6667
6818
  r === i ? ++o > s && (s = o) : o = 1, i = r + e.length, r = n.indexOf(e, i);
6668
6819
  return s;
6669
6820
  }
6670
- function na(t, e) {
6821
+ function ia(t, e) {
6671
6822
  return !!(e.options.fences === !1 && t.value && // If there’s no info…
6672
6823
  !t.lang && // And there’s a non-whitespace character…
6673
6824
  /[^ \r\n]/.test(t.value) && // And the value doesn’t start or end in a blank…
6674
6825
  !/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value));
6675
6826
  }
6676
- function Gb(t) {
6827
+ function n0(t) {
6677
6828
  const e = t.options.fence || "`";
6678
6829
  if (e !== "`" && e !== "~")
6679
6830
  throw new Error(
@@ -6681,13 +6832,13 @@ function Gb(t) {
6681
6832
  );
6682
6833
  return e;
6683
6834
  }
6684
- function Yb(t, e, n, r) {
6685
- const i = Gb(n), o = t.value || "", s = i === "`" ? "GraveAccent" : "Tilde";
6686
- if (na(t, n)) {
6687
- const f = n.enter("codeIndented"), d = n.indentLines(o, Xb);
6835
+ function r0(t, e, n, r) {
6836
+ const i = n0(n), o = t.value || "", s = i === "`" ? "GraveAccent" : "Tilde";
6837
+ if (ia(t, n)) {
6838
+ const f = n.enter("codeIndented"), d = n.indentLines(o, i0);
6688
6839
  return f(), d;
6689
6840
  }
6690
- const l = n.createTracker(r), a = i.repeat(Math.max(Jb(o, i) + 1, 3)), c = n.enter("codeFenced");
6841
+ const l = n.createTracker(r), a = i.repeat(Math.max(t0(o, i) + 1, 3)), c = n.enter("codeFenced");
6691
6842
  let u = l.move(a);
6692
6843
  if (t.lang) {
6693
6844
  const f = n.enter(`codeFencedLang${s}`);
@@ -6716,10 +6867,10 @@ function Yb(t, e, n, r) {
6716
6867
  `), o && (u += l.move(o + `
6717
6868
  `)), u += l.move(a), c(), u;
6718
6869
  }
6719
- function Xb(t, e, n) {
6870
+ function i0(t, e, n) {
6720
6871
  return (n ? "" : " ") + t;
6721
6872
  }
6722
- function Ua(t) {
6873
+ function Ka(t) {
6723
6874
  const e = t.options.quote || '"';
6724
6875
  if (e !== '"' && e !== "'")
6725
6876
  throw new Error(
@@ -6727,8 +6878,8 @@ function Ua(t) {
6727
6878
  );
6728
6879
  return e;
6729
6880
  }
6730
- function Qb(t, e, n, r) {
6731
- const i = Ua(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.enter("definition");
6881
+ function o0(t, e, n, r) {
6882
+ const i = Ka(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.enter("definition");
6732
6883
  let l = n.enter("label");
6733
6884
  const a = n.createTracker(r);
6734
6885
  let c = a.move("[");
@@ -6757,7 +6908,7 @@ function Qb(t, e, n, r) {
6757
6908
  })
6758
6909
  ), c += a.move(i), l()), s(), c;
6759
6910
  }
6760
- function Zb(t) {
6911
+ function s0(t) {
6761
6912
  const e = t.options.emphasis || "*";
6762
6913
  if (e !== "*" && e !== "_")
6763
6914
  throw new Error(
@@ -6801,9 +6952,9 @@ function Ko(t, e, n) {
6801
6952
  { inside: !1, outside: !1 }
6802
6953
  );
6803
6954
  }
6804
- nh.peek = e0;
6805
- function nh(t, e, n, r) {
6806
- const i = Zb(n), o = n.enter("emphasis"), s = n.createTracker(r), l = s.move(i);
6955
+ rh.peek = l0;
6956
+ function rh(t, e, n, r) {
6957
+ const i = s0(n), o = n.enter("emphasis"), s = n.createTracker(r), l = s.move(i);
6807
6958
  let a = s.move(
6808
6959
  n.containerPhrasing(t, {
6809
6960
  after: i,
@@ -6825,159 +6976,15 @@ function nh(t, e, n, r) {
6825
6976
  before: u.outside
6826
6977
  }, l + a + h;
6827
6978
  }
6828
- function e0(t, e, n) {
6979
+ function l0(t, e, n) {
6829
6980
  return n.options.emphasis || "*";
6830
6981
  }
6831
- const ps = (
6832
- // Note: overloads in JSDoc can’t yet use different `@template`s.
6833
- /**
6834
- * @type {(
6835
- * (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
6836
- * (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
6837
- * (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
6838
- * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
6839
- * ((test?: Test) => Check)
6840
- * )}
6841
- */
6842
- /**
6843
- * @param {Test} [test]
6844
- * @returns {Check}
6845
- */
6846
- (function(t) {
6847
- if (t == null)
6848
- return i0;
6849
- if (typeof t == "function")
6850
- return ms(t);
6851
- if (typeof t == "object")
6852
- return Array.isArray(t) ? t0(t) : (
6853
- // Cast because `ReadonlyArray` goes into the above but `isArray`
6854
- // narrows to `Array`.
6855
- n0(
6856
- /** @type {Props} */
6857
- t
6858
- )
6859
- );
6860
- if (typeof t == "string")
6861
- return r0(t);
6862
- throw new Error("Expected function, string, or object as test");
6863
- })
6864
- );
6865
- function t0(t) {
6866
- const e = [];
6867
- let n = -1;
6868
- for (; ++n < t.length; )
6869
- e[n] = ps(t[n]);
6870
- return ms(r);
6871
- function r(...i) {
6872
- let o = -1;
6873
- for (; ++o < e.length; )
6874
- if (e[o].apply(this, i)) return !0;
6875
- return !1;
6876
- }
6877
- }
6878
- function n0(t) {
6879
- const e = (
6880
- /** @type {Record<string, unknown>} */
6881
- t
6882
- );
6883
- return ms(n);
6884
- function n(r) {
6885
- const i = (
6886
- /** @type {Record<string, unknown>} */
6887
- /** @type {unknown} */
6888
- r
6889
- );
6890
- let o;
6891
- for (o in t)
6892
- if (i[o] !== e[o]) return !1;
6893
- return !0;
6894
- }
6895
- }
6896
- function r0(t) {
6897
- return ms(e);
6898
- function e(n) {
6899
- return n && n.type === t;
6900
- }
6901
- }
6902
- function ms(t) {
6903
- return e;
6904
- function e(n, r, i) {
6905
- return !!(o0(n) && t.call(
6906
- this,
6907
- n,
6908
- typeof r == "number" ? r : void 0,
6909
- i || void 0
6910
- ));
6911
- }
6912
- }
6913
- function i0() {
6914
- return !0;
6915
- }
6916
- function o0(t) {
6917
- return t !== null && typeof t == "object" && "type" in t;
6918
- }
6919
- const rh = [], s0 = !0, ra = !1, ia = "skip";
6920
- function Ka(t, e, n, r) {
6921
- let i;
6922
- typeof e == "function" && typeof n != "function" ? (r = n, n = e) : i = e;
6923
- const o = ps(i), s = r ? -1 : 1;
6924
- l(t, void 0, [])();
6925
- function l(a, c, u) {
6926
- const f = (
6927
- /** @type {Record<string, unknown>} */
6928
- a && typeof a == "object" ? a : {}
6929
- );
6930
- if (typeof f.type == "string") {
6931
- const h = (
6932
- // `hast`
6933
- typeof f.tagName == "string" ? f.tagName : (
6934
- // `xast`
6935
- typeof f.name == "string" ? f.name : void 0
6936
- )
6937
- );
6938
- Object.defineProperty(d, "name", {
6939
- value: "node (" + (a.type + (h ? "<" + h + ">" : "")) + ")"
6940
- });
6941
- }
6942
- return d;
6943
- function d() {
6944
- let h = rh, p, m, g;
6945
- if ((!e || o(a, c, u[u.length - 1] || void 0)) && (h = l0(n(a, u)), h[0] === ra))
6946
- return h;
6947
- if ("children" in a && a.children) {
6948
- const y = (
6949
- /** @type {UnistParent} */
6950
- a
6951
- );
6952
- if (y.children && h[0] !== ia)
6953
- for (m = (r ? y.children.length : -1) + s, g = u.concat(y); m > -1 && m < y.children.length; ) {
6954
- const A = y.children[m];
6955
- if (p = l(A, m, g)(), p[0] === ra)
6956
- return p;
6957
- m = typeof p[1] == "number" ? p[1] : m + s;
6958
- }
6959
- }
6960
- return h;
6961
- }
6962
- }
6963
- }
6964
- function l0(t) {
6965
- return Array.isArray(t) ? t : typeof t == "number" ? [s0, t] : t == null ? rh : [t];
6966
- }
6967
- function Ur(t, e, n, r) {
6968
- let i, o, s;
6969
- typeof e == "function" && typeof n != "function" ? (o = void 0, s = e, i = n) : (o = e, s = n, i = r), Ka(t, o, l, i);
6970
- function l(a, c) {
6971
- const u = c[c.length - 1], f = u ? u.children.indexOf(a) : void 0;
6972
- return s(a, f, u);
6973
- }
6974
- }
6975
6982
  function ih(t, e) {
6976
6983
  let n = !1;
6977
- return Ur(t, function(r) {
6984
+ return jr(t, function(r) {
6978
6985
  if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
6979
- return n = !0, ra;
6980
- }), !!((!t.depth || t.depth < 3) && Wa(t) && (e.options.setext || n));
6986
+ return n = !0, Yl;
6987
+ }), !!((!t.depth || t.depth < 3) && qa(t) && (e.options.setext || n));
6981
6988
  }
6982
6989
  function a0(t, e, n, r) {
6983
6990
  const i = Math.max(Math.min(6, t.depth || 1), 1), o = n.createTracker(r);
@@ -7017,7 +7024,7 @@ function c0() {
7017
7024
  }
7018
7025
  sh.peek = u0;
7019
7026
  function sh(t, e, n, r) {
7020
- const i = Ua(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.enter("image");
7027
+ const i = Ka(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.enter("image");
7021
7028
  let l = n.enter("label");
7022
7029
  const a = n.createTracker(r);
7023
7030
  let c = a.move("![");
@@ -7088,7 +7095,7 @@ function d0() {
7088
7095
  return "`";
7089
7096
  }
7090
7097
  function ch(t, e) {
7091
- const n = Wa(t);
7098
+ const n = qa(t);
7092
7099
  return !!(!e.options.resourceLink && // If there’s a url…
7093
7100
  t.url && // And there’s a no title…
7094
7101
  !t.title && // And the content of `node` is a single text node…
@@ -7100,7 +7107,7 @@ function ch(t, e) {
7100
7107
  }
7101
7108
  uh.peek = h0;
7102
7109
  function uh(t, e, n, r) {
7103
- const i = Ua(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.createTracker(r);
7110
+ const i = Ka(n), o = i === '"' ? "Quote" : "Apostrophe", s = n.createTracker(r);
7104
7111
  let l, a;
7105
7112
  if (ch(t, n)) {
7106
7113
  const u = n.stack;
@@ -7264,7 +7271,7 @@ function w0(t, e, n, r) {
7264
7271
  }
7265
7272
  const x0 = (
7266
7273
  /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
7267
- ps([
7274
+ cs([
7268
7275
  "break",
7269
7276
  "delete",
7270
7277
  "emphasis",
@@ -7344,11 +7351,11 @@ function N0(t, e, n) {
7344
7351
  return n.options.ruleSpaces ? r.slice(0, -1) : r;
7345
7352
  }
7346
7353
  const Ga = {
7347
- blockquote: Ub,
7354
+ blockquote: Zb,
7348
7355
  break: Au,
7349
- code: Yb,
7350
- definition: Qb,
7351
- emphasis: nh,
7356
+ code: r0,
7357
+ definition: o0,
7358
+ emphasis: rh,
7352
7359
  hardBreak: Au,
7353
7360
  heading: a0,
7354
7361
  html: oh,
@@ -7366,7 +7373,7 @@ const Ga = {
7366
7373
  thematicBreak: N0
7367
7374
  }, E0 = [I0];
7368
7375
  function I0(t, e, n, r) {
7369
- if (e.type === "code" && na(e, r) && (t.type === "list" || t.type === e.type && na(t, r)))
7376
+ if (e.type === "code" && ia(e, r) && (t.type === "list" || t.type === e.type && ia(t, r)))
7370
7377
  return !1;
7371
7378
  if ("spread" in n && typeof n.spread == "boolean")
7372
7379
  return t.type === "paragraph" && // Two paragraphs.
@@ -7511,7 +7518,7 @@ const Un = [
7511
7518
  { atBreak: !0, character: "~" }
7512
7519
  ];
7513
7520
  function O0(t) {
7514
- return t.label || !t.identifier ? t.label || "" : Xd(t.identifier);
7521
+ return t.label || !t.identifier ? t.label || "" : Qd(t.identifier);
7515
7522
  }
7516
7523
  function R0(t) {
7517
7524
  if (!t._compiled) {
@@ -7613,7 +7620,7 @@ function B0(t, e, n) {
7613
7620
  let l = -1;
7614
7621
  for (; ++l < t.unsafe.length; ) {
7615
7622
  const u = t.unsafe[l];
7616
- if (!th(t.stack, u))
7623
+ if (!nh(t.stack, u))
7617
7624
  continue;
7618
7625
  const f = t.compilePattern(u);
7619
7626
  let d;
@@ -7679,7 +7686,7 @@ function $0(t, e) {
7679
7686
  stack: [],
7680
7687
  unsafe: [...v0]
7681
7688
  };
7682
- eh(r, n), r.options.tightDefinitions && r.join.push(q0), r.handle = Wb("type", {
7689
+ th(r, n), r.options.tightDefinitions && r.join.push(q0), r.handle = Yb("type", {
7683
7690
  invalid: V0,
7684
7691
  unknown: W0,
7685
7692
  handlers: r.handlers
@@ -9040,7 +9047,7 @@ class yh {
9040
9047
  this.elements.push(e);
9041
9048
  }, this.close = () => {
9042
9049
  const e = this.elements.pop();
9043
- if (!e) throw wd();
9050
+ if (!e) throw xd();
9044
9051
  return e;
9045
9052
  };
9046
9053
  }
@@ -9070,7 +9077,7 @@ const la = class extends yh {
9070
9077
  ...this.schema.nodes,
9071
9078
  ...this.schema.marks
9072
9079
  }).find((i) => i.spec.parseMarkdown.match(n));
9073
- if (!r) throw c1(n);
9080
+ if (!r) throw g1(n);
9074
9081
  return r;
9075
9082
  }), ge(this, Mo, (n) => {
9076
9083
  const r = Y(this, To).call(this, n);
@@ -9088,7 +9095,7 @@ const la = class extends yh {
9088
9095
  return this;
9089
9096
  }, ge(this, pi, (n, r, i) => {
9090
9097
  const o = n.createAndFill(r, i, Y(this, Vt));
9091
- if (!o) throw a1(n, r, i);
9098
+ if (!o) throw m1(n, r, i);
9092
9099
  return this.push(o), o;
9093
9100
  }), this.addNode = (n, r, i) => {
9094
9101
  try {
@@ -9103,7 +9110,7 @@ const la = class extends yh {
9103
9110
  }, this.closeMark = (n) => (ge(this, Vt, n.removeFromSet(Y(this, Vt))), this), this.addText = (n) => {
9104
9111
  try {
9105
9112
  const r = this.top();
9106
- if (!r) throw wd();
9113
+ if (!r) throw xd();
9107
9114
  const i = r.pop(), o = this.schema.text(n, Y(this, Vt));
9108
9115
  if (!i)
9109
9116
  return r.push(o), this;
@@ -9156,7 +9163,7 @@ const bw = (t) => Object.prototype.hasOwnProperty.call(t, "size"), ca = class ex
9156
9163
  ...this.schema.nodes,
9157
9164
  ...this.schema.marks
9158
9165
  }).find((i) => i.spec.toMarkdown.match(n));
9159
- if (!r) throw u1(n.type);
9166
+ if (!r) throw y1(n.type);
9160
9167
  return r;
9161
9168
  }), ge(this, Ao, (n) => Y(this, mi).call(this, n).spec.toMarkdown.runner(this, n)), ge(this, No, (n, r) => Y(this, mi).call(this, n).spec.toMarkdown.runner(this, n, r)), ge(this, gi, (n) => {
9162
9169
  const { marks: r } = n, i = (l) => l.type.spec.priority ?? 50;
@@ -9894,7 +9901,7 @@ function Tw(t, e, n, r) {
9894
9901
  return;
9895
9902
  o++;
9896
9903
  let a = null;
9897
- if (r instanceof fs) {
9904
+ if (r instanceof hs) {
9898
9905
  let c = s.marks, u;
9899
9906
  for (; u = r.isInSet(c); )
9900
9907
  (a || (a = [])).push(u), c = u.removeFromSet(c);
@@ -13161,7 +13168,7 @@ class ur extends Yi {
13161
13168
  }
13162
13169
  static create(e, n, r, i) {
13163
13170
  let o = i.nodeViews[n.type.name], s = o && o(n, i, r);
13164
- return (!s || !s.dom) && (s = jr.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new ur(e, n, s.dom, s.contentDOM || s.dom, s);
13171
+ return (!s || !s.dom) && (s = Ur.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new ur(e, n, s.dom, s.contentDOM || s.dom, s);
13165
13172
  }
13166
13173
  parseRule() {
13167
13174
  return this.dirty & Jt || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
@@ -13216,7 +13223,7 @@ class On extends Yi {
13216
13223
  u = document.createTextNode(n.text);
13217
13224
  else if (u.nodeType != 3)
13218
13225
  throw new RangeError("Text must be rendered as a DOM text node");
13219
- } else u || ({ dom: u, contentDOM: f } = jr.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
13226
+ } else u || ({ dom: u, contentDOM: f } = Ur.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
13220
13227
  !f && !n.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), n.type.spec.draggable && (u.draggable = !0));
13221
13228
  let d = u;
13222
13229
  return u = ip(u, r, n), c ? a = new nC(e, n, r, i, u, f || null, d, c, o, s + 1) : n.isText ? new Cs(e, n, r, i, u, d, o) : new On(e, n, r, i, u, f || null, d, o, s + 1);
@@ -14158,7 +14165,7 @@ function uc(t, e) {
14158
14165
  let h = r.firstChild;
14159
14166
  n.push(h.type.name, h.attrs != h.type.defaultAttrs ? h.attrs : null), r = h.content;
14160
14167
  }
14161
- let s = t.someProp("clipboardSerializer") || jr.fromSchema(t.state.schema), l = pp(), a = l.createElement("div");
14168
+ let s = t.someProp("clipboardSerializer") || Ur.fromSchema(t.state.schema), l = pp(), a = l.createElement("div");
14162
14169
  a.appendChild(s.serializeFragment(r, { document: l }));
14163
14170
  let c = a.firstChild, u, f = 0;
14164
14171
  for (; c && c.nodeType == 1 && (u = hp[c.nodeName.toLowerCase()]); ) {
@@ -14193,7 +14200,7 @@ function cp(t, e, n, r, i) {
14193
14200
  if (f)
14194
14201
  l = f;
14195
14202
  else {
14196
- let d = i.marks(), { schema: h } = t.state, p = jr.fromSchema(h);
14203
+ let d = i.marks(), { schema: h } = t.state, p = Ur.fromSchema(h);
14197
14204
  s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
14198
14205
  let g = s.appendChild(document.createElement("p"));
14199
14206
  m && g.appendChild(p.serializeNode(h.text(m, d)));
@@ -16123,7 +16130,7 @@ const pS = {
16123
16130
  [],
16124
16131
  "remarkPlugins"
16125
16132
  ), Aa = oe([], "nodeView"), Na = oe([], "markView"), ts = oe(
16126
- pw().use(Vb).use(J0),
16133
+ pw().use(Gb).use(J0),
16127
16134
  "remark"
16128
16135
  ), Ap = oe(
16129
16136
  {
@@ -16151,7 +16158,7 @@ const mS = (t) => (t.inject(Dn, {}).inject(vi, []).inject(Oi, []).inject(wl, [gc
16151
16158
  t.get(vi).map(([l, a]) => [l, Mf(a)])
16152
16159
  ), o = Object.fromEntries(
16153
16160
  t.get(Oi).map(([l, a]) => [l, Mf(a)])
16154
- ), s = new _1({ nodes: i, marks: o });
16161
+ ), s = new $1({ nodes: i, marks: o });
16155
16162
  return t.set(Dn, s), t.done(ut), () => {
16156
16163
  t.remove(Dn).remove(vi).remove(Oi).remove(wl).clearTimer(ut);
16157
16164
  };
@@ -16161,7 +16168,7 @@ hr(mS, {
16161
16168
  });
16162
16169
  class Np {
16163
16170
  constructor() {
16164
- this.#t = new h1(), this.#e = null, this.setCtx = (e) => {
16171
+ this.#t = new w1(), this.#e = null, this.setCtx = (e) => {
16165
16172
  this.#e = e;
16166
16173
  }, this.chain = () => {
16167
16174
  if (this.#e == null) throw Us();
@@ -16267,7 +16274,7 @@ class bS {
16267
16274
  );
16268
16275
  return [r, (l, a, c) => {
16269
16276
  const u = this.#t;
16270
- if (u == null) throw us();
16277
+ if (u == null) throw ds();
16271
16278
  const f = o.map((h) => h.onRun(u));
16272
16279
  return Kr(...f)(l, a, c);
16273
16280
  }];
@@ -16282,7 +16289,7 @@ class bS {
16282
16289
  }
16283
16290
  }
16284
16291
  const Ep = oe(new bS(), "keymap"), Ip = Xt("KeymapReady"), Do = Xt("ParserReady"), vp = (() => {
16285
- throw us();
16292
+ throw ds();
16286
16293
  }), _o = oe(vp, "parser"), Cl = oe([], "parserTimer"), wS = (t) => (t.inject(_o, vp).inject(Cl, [ut]).record(Do), async () => {
16287
16294
  await t.waitTimers(Cl);
16288
16295
  const e = t.get(ts), n = t.get(Dn);
@@ -16297,7 +16304,7 @@ const Lo = Xt("SerializerReady"), Sl = oe(
16297
16304
  [],
16298
16305
  "serializerTimer"
16299
16306
  ), Op = (() => {
16300
- throw us();
16307
+ throw ds();
16301
16308
  }), Tl = oe(
16302
16309
  Op,
16303
16310
  "serializer"
@@ -16324,7 +16331,7 @@ function CS(t, e, n) {
16324
16331
  return Pr.fromSchema(n).parse(t.dom);
16325
16332
  if (t.type === "json")
16326
16333
  return En.fromJSON(n, t.value);
16327
- throw s1(t);
16334
+ throw h1(t);
16328
16335
  }
16329
16336
  const SS = new ht("MILKDOWN_STATE_TRACKER"), TS = (t) => (t.inject(Ml, "").inject(Ci, {}).inject(Al, (e) => e).inject(Nl, [
16330
16337
  Do,
@@ -16468,7 +16475,7 @@ function OS(t, e) {
16468
16475
  };
16469
16476
  return n.type = (r) => {
16470
16477
  const i = r.get(Dn).marks[t];
16471
- if (!i) throw d1(t);
16478
+ if (!i) throw b1(t);
16472
16479
  return i;
16473
16480
  }, n;
16474
16481
  }
@@ -16484,7 +16491,7 @@ function yc(t, e) {
16484
16491
  };
16485
16492
  return n.type = (r) => {
16486
16493
  const i = r.get(Dn).nodes[t];
16487
- if (!i) throw f1(t);
16494
+ if (!i) throw k1(t);
16488
16495
  return i;
16489
16496
  }, n;
16490
16497
  }
@@ -16618,7 +16625,7 @@ function LS(t) {
16618
16625
  }
16619
16626
  function PS(t, e, n, r) {
16620
16627
  let i = t.tr, o = r.end, s = r.$to.end(r.depth);
16621
- o < s && (i.step(new Be(o - 1, s, o, s, new L(O.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Ed(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth));
16628
+ o < s && (i.step(new Be(o - 1, s, o, s, new L(O.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Id(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth));
16622
16629
  const l = gs(r);
16623
16630
  if (l == null)
16624
16631
  return !1;
@@ -16661,7 +16668,7 @@ function FS(t) {
16661
16668
  const e = /* @__PURE__ */ new Map();
16662
16669
  if (!t || !t.type)
16663
16670
  throw new Error("mdast-util-definitions expected node");
16664
- return Ur(t, "definition", function(r) {
16671
+ return jr(t, "definition", function(r) {
16665
16672
  const i = Af(r.identifier);
16666
16673
  i && !e.get(i) && e.set(i, r);
16667
16674
  }), n;
@@ -16676,9 +16683,9 @@ function Af(t) {
16676
16683
  function HS() {
16677
16684
  return function(t) {
16678
16685
  const e = FS(t);
16679
- Ur(t, function(n, r, i) {
16686
+ jr(t, function(n, r, i) {
16680
16687
  if (n.type === "definition" && i !== void 0 && typeof r == "number")
16681
- return i.children.splice(r, 1), [ia, r];
16688
+ return i.children.splice(r, 1), [Xl, r];
16682
16689
  if (n.type === "imageReference" || n.type === "linkReference") {
16683
16690
  const o = e(n.identifier);
16684
16691
  if (o && i && typeof r == "number")
@@ -16687,7 +16694,7 @@ function HS() {
16687
16694
  url: o.url,
16688
16695
  title: o.title,
16689
16696
  children: n.children
16690
- }, [ia, r];
16697
+ }, [Xl, r];
16691
16698
  }
16692
16699
  });
16693
16700
  };
@@ -17044,7 +17051,7 @@ E(KS, {
17044
17051
  group: "Doc"
17045
17052
  });
17046
17053
  function JS(t) {
17047
- return Ka(
17054
+ return Wa(
17048
17055
  t,
17049
17056
  (e) => e.type === "html" && ["<br />", "<br>", "<br >", "<br/>"].includes(
17050
17057
  e.value?.trim()
@@ -18160,7 +18167,7 @@ E(km.ctx, {
18160
18167
  const bm = pr(
18161
18168
  "remarkAddOrderInList",
18162
18169
  () => () => (t) => {
18163
- Ur(t, "list", (e) => {
18170
+ jr(t, "list", (e) => {
18164
18171
  if (e.ordered) {
18165
18172
  const n = e.start ?? 1;
18166
18173
  e.children.forEach((r, i) => {
@@ -18182,7 +18189,7 @@ const wm = pr(
18182
18189
  "remarkLineBreak",
18183
18190
  () => () => (t) => {
18184
18191
  const e = /[\t ]*(?:\r?\n|\r)/g;
18185
- Ur(
18192
+ jr(
18186
18193
  t,
18187
18194
  "text",
18188
18195
  (n, r, i) => {
@@ -18264,7 +18271,7 @@ const Sm = pr(
18264
18271
  "remarkMarker",
18265
18272
  () => () => (t, e) => {
18266
18273
  const n = (r) => e.value.charAt(r.position.start.offset);
18267
- Ur(
18274
+ jr(
18268
18275
  t,
18269
18276
  (r) => ["strong", "emphasis"].includes(r.type),
18270
18277
  (r) => {
@@ -20105,10 +20112,10 @@ function v2(t) {
20105
20112
  return t.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
20106
20113
  }
20107
20114
  function O2(t, e, n) {
20108
- const i = ps((n || {}).ignore || []), o = R2(e);
20115
+ const i = cs((n || {}).ignore || []), o = R2(e);
20109
20116
  let s = -1;
20110
20117
  for (; ++s < o.length; )
20111
- Ka(t, "text", l);
20118
+ Wa(t, "text", l);
20112
20119
  function l(c, u) {
20113
20120
  let f = -1, d;
20114
20121
  for (; ++f < u.length; ) {
@@ -20287,7 +20294,7 @@ function U2(t) {
20287
20294
  }
20288
20295
  function Pm(t, e) {
20289
20296
  const n = t.input.charCodeAt(t.index - 1);
20290
- return (t.index === 0 || lr(n) || ds(n)) && // If it’s an email, the previous character should not be a slash.
20297
+ return (t.index === 0 || lr(n) || ps(n)) && // If it’s an email, the previous character should not be a slash.
20291
20298
  (!e || n !== 47);
20292
20299
  }
20293
20300
  zm.peek = tM;
@@ -20792,7 +20799,7 @@ function RM(t, e, n) {
20792
20799
  return f === 47 ? (t.consume(f), o ? c : (o = !0, a)) : n(f);
20793
20800
  }
20794
20801
  function c(f) {
20795
- return f === null || Uo(f) || de(f) || lr(f) || ds(f) ? n(f) : t.attempt(Hm, t.attempt($m, u), n)(f);
20802
+ return f === null || Uo(f) || de(f) || lr(f) || ps(f) ? n(f) : t.attempt(Hm, t.attempt($m, u), n)(f);
20796
20803
  }
20797
20804
  function u(f) {
20798
20805
  return t.exit("literalAutolinkHttp"), t.exit("literalAutolink"), e(f);
@@ -20812,7 +20819,7 @@ function _M(t, e, n) {
20812
20819
  let r, i, o;
20813
20820
  return s;
20814
20821
  function s(c) {
20815
- return c === 46 || c === 95 ? t.check(Vm, a, l)(c) : c === null || de(c) || lr(c) || c !== 45 && ds(c) ? a(c) : (o = !0, t.consume(c), s);
20822
+ return c === 46 || c === 95 ? t.check(Vm, a, l)(c) : c === null || de(c) || lr(c) || c !== 45 && ps(c) ? a(c) : (o = !0, t.consume(c), s);
20816
20823
  }
20817
20824
  function l(c) {
20818
20825
  return c === 95 ? r = !0 : (i = r, r = void 0), t.consume(c), s;
@@ -21107,7 +21114,7 @@ function KM(t) {
21107
21114
  start: Object.assign({}, s[c][1].end),
21108
21115
  end: Object.assign({}, s[a][1].start)
21109
21116
  }, d = [["enter", u, l], ["enter", s[c][1], l], ["exit", s[c][1], l], ["enter", f, l]], h = l.parser.constructs.insideSpan.null;
21110
- h && at(d, d.length, 0, hs(h, s.slice(c + 1, a), l)), at(d, d.length, 0, [["exit", f, l], ["enter", s[a][1], l], ["exit", s[a][1], l], ["exit", u, l]]), at(s, c - 1, a - c + 3, d), a = c + d.length - 2;
21117
+ h && at(d, d.length, 0, ms(h, s.slice(c + 1, a), l)), at(d, d.length, 0, [["exit", f, l], ["enter", s[a][1], l], ["exit", s[a][1], l], ["exit", u, l]]), at(s, c - 1, a - c + 3, d), a = c + d.length - 2;
21111
21118
  break;
21112
21119
  }
21113
21120
  }
@@ -21399,7 +21406,7 @@ function rA(t, e, n) {
21399
21406
  }
21400
21407
  }
21401
21408
  function iA(t) {
21402
- return Hd([
21409
+ return $d([
21403
21410
  IM(),
21404
21411
  FM(),
21405
21412
  KM(t),
@@ -24602,20 +24609,20 @@ function PE(t = LE) {
24602
24609
  }
24603
24610
  };
24604
24611
  }
24605
- const zE = /\{\{(var_table|var|step|check|ref_step|ref_var|ref_fig|cite)\s*\|[^}]+?\}\}/g, BE = /\\([\\!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-])/g;
24606
- function FE(t) {
24607
- return t.replace(BE, "$1");
24608
- }
24612
+ const zE = String.raw`(?:var(?:\\?_table)?|step|check|ref\\?_(?:step|var|fig)|cite)`, BE = new RegExp(String.raw`\{\{${zE}\s*\|[^}]+?\}\}`, "g"), FE = /\\([\\!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-])/g;
24609
24613
  function HE(t) {
24610
- return t.replace(zE, FE);
24614
+ return t.replace(FE, "$1");
24615
+ }
24616
+ function $E(t) {
24617
+ return t.replace(BE, HE);
24611
24618
  }
24612
24619
  function Jn(t) {
24613
- return HE(yd(t));
24620
+ return $E(yd(t));
24614
24621
  }
24615
- const $E = {
24622
+ const VE = {
24616
24623
  key: 0,
24617
24624
  class: "aimd-block-add-menu-divider"
24618
- }, VE = { class: "aimd-block-add-menu-group-label" }, WE = ["onClick"], qE = ["innerHTML"], jE = 420, kI = /* @__PURE__ */ Jl({
24625
+ }, WE = { class: "aimd-block-add-menu-group-label" }, qE = ["onClick"], jE = ["innerHTML"], UE = 420, bI = /* @__PURE__ */ Jl({
24619
24626
  __name: "AimdWysiwygEditor",
24620
24627
  props: {
24621
24628
  content: {},
@@ -24914,7 +24921,7 @@ const $E = {
24914
24921
  A = !0;
24915
24922
  try {
24916
24923
  const M = Jn(S);
24917
- v = Date.now() + jE, I.track(M), y.value.action(zy(o(S))), C = M;
24924
+ v = Date.now() + UE, I.track(M), y.value.action(zy(o(S))), C = M;
24918
24925
  } catch {
24919
24926
  return A = !1, !1;
24920
24927
  }
@@ -24969,8 +24976,8 @@ const $E = {
24969
24976
  (wn(!0), jn(ao, null, Kc(f.value, (H, K) => (wn(), jn(ao, {
24970
24977
  key: H.label
24971
24978
  }, [
24972
- K > 0 ? (wn(), jn("div", $E)) : Jc("", !0),
24973
- co("div", VE, Gc(H.label), 1),
24979
+ K > 0 ? (wn(), jn("div", VE)) : Jc("", !0),
24980
+ co("div", WE, Gc(H.label), 1),
24974
24981
  (wn(!0), jn(ao, null, Kc(H.items, (W) => (wn(), jn("button", {
24975
24982
  key: W.label,
24976
24983
  class: "aimd-block-add-menu-item",
@@ -24979,9 +24986,9 @@ const $E = {
24979
24986
  co("span", {
24980
24987
  class: "aimd-block-add-menu-icon",
24981
24988
  innerHTML: W.icon
24982
- }, null, 8, qE),
24989
+ }, null, 8, jE),
24983
24990
  co("span", null, Gc(W.label), 1)
24984
- ], 8, WE))), 128))
24991
+ ], 8, qE))), 128))
24985
24992
  ], 64))), 128))
24986
24993
  ], 4)) : Jc("", !0)
24987
24994
  ]))
@@ -24989,10 +24996,10 @@ const $E = {
24989
24996
  }
24990
24997
  });
24991
24998
  export {
24992
- cI as A,
24999
+ uI as A,
24993
25000
  kd as D,
24994
- uI as M,
24995
- kI as _,
25001
+ fI as M,
25002
+ bI as _,
24996
25003
  Yy as a,
24997
25004
  Xy as b,
24998
25005
  DE as c,
@@ -25000,13 +25007,13 @@ export {
25000
25007
  OE as e,
25001
25008
  _E as f,
25002
25009
  IE as g,
25003
- dI as h,
25010
+ hI as h,
25004
25011
  Gy as i,
25005
25012
  Qy as j,
25006
- aI as k,
25013
+ cI as k,
25007
25014
  e1 as l,
25008
- fI as m,
25009
- hI as n,
25010
- HE as o,
25015
+ dI as m,
25016
+ pI as n,
25017
+ $E as o,
25011
25018
  Jy as r
25012
25019
  };