@nine-lab/nine-ux 0.1.144 → 0.1.146

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nine-ux.js CHANGED
@@ -3,11 +3,11 @@ var ui = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
5
  var Dl = (r, e, t) => e in r ? vl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var dt = (r, e, t) => Dl(r, typeof e != "symbol" ? e + "" : e, t), _n = (r, e, t) => e.has(r) || ui("Cannot " + t);
7
- var v = (r, e, t) => (_n(r, e, "read from private field"), t ? t.call(r) : e.get(r)), B = (r, e, t) => e.has(r) ? ui("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Y = (r, e, t, n) => (_n(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), A = (r, e, t) => (_n(r, e, "access private method"), t);
6
+ var dt = (r, e, t) => Dl(r, typeof e != "symbol" ? e + "" : e, t), Un = (r, e, t) => e.has(r) || ui("Cannot " + t);
7
+ var v = (r, e, t) => (Un(r, e, "read from private field"), t ? t.call(r) : e.get(r)), B = (r, e, t) => e.has(r) ? ui("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Y = (r, e, t, n) => (Un(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), A = (r, e, t) => (Un(r, e, "access private method"), t);
8
8
  import { nine as As, nineAlertPopup as Il, nineConfirmPopup as Rl } from "@nine-lab/nine-util";
9
9
  const Pl = typeof window < "u" && window.nine ? window.nine : As;
10
- var Ut, _t, mr;
10
+ var Ut, _t, pr;
11
11
  class Bl {
12
12
  constructor() {
13
13
  B(this, _t);
@@ -22,10 +22,10 @@ class Bl {
22
22
  Y(this, Ut, e);
23
23
  }
24
24
  alert(e, t = "Alert") {
25
- return A(this, _t, mr).call(this, "alert", e, t, "classic");
25
+ return A(this, _t, pr).call(this, "alert", e, t, "classic");
26
26
  }
27
27
  confirm(e, t = "Confirm") {
28
- return A(this, _t, mr).call(this, "confirm", e, t, "classic");
28
+ return A(this, _t, pr).call(this, "confirm", e, t, "classic");
29
29
  }
30
30
  /**
31
31
  * 컴포넌트별 CSS 경로 생성 헬퍼 (복구!)
@@ -35,7 +35,7 @@ class Bl {
35
35
  return t ? `${t.endsWith("/") ? t : t + "/"}${e}` : null;
36
36
  }
37
37
  }
38
- Ut = new WeakMap(), _t = new WeakSet(), mr = function(e, t, n, i) {
38
+ Ut = new WeakMap(), _t = new WeakSet(), pr = function(e, t, n, i) {
39
39
  const s = { class: i, animation: "fade-in" }, o = e === "alert" ? Il : Rl;
40
40
  let l = !1;
41
41
  const a = {
@@ -57,8 +57,8 @@ Ut = new WeakMap(), _t = new WeakSet(), mr = function(e, t, n, i) {
57
57
  l || (l = !0, o[e](t, n, s));
58
58
  }), a;
59
59
  };
60
- const kn = new Bl();
61
- var Gt, Xe, Yt, ae, At, gr, yr, Xt, Pn;
60
+ const mr = new Bl();
61
+ var Gt, Xe, Yt, ae, At, gr, yr, Xt, Rn;
62
62
  class Ll extends HTMLElement {
63
63
  constructor() {
64
64
  super();
@@ -105,14 +105,14 @@ class Ll extends HTMLElement {
105
105
  B(this, Xt, (t) => {
106
106
  this.changed = !0;
107
107
  });
108
- B(this, Pn, () => {
108
+ B(this, Rn, () => {
109
109
  for (const t of this.attributes)
110
110
  t.name.startsWith("css-") && this.style.setProperty(t.name.substring(4), t.value);
111
111
  this.originContents = this.innerHTML.trim(), this.innerHTML = "", this.shadowRoot && this.tagName.toLowerCase() === "nx-div" && (this.shadowRoot.innerHTML = this.originContents);
112
112
  });
113
113
  }
114
114
  connectedCallback() {
115
- return v(this, Gt) ? !1 : (this.getAttribute("use-shadow") !== "false" && !this.shadowRoot ? (this.attachShadow({ mode: "open" }), Y(this, Xe, this.shadowRoot)) : Y(this, Xe, this), v(this, Pn).call(this), Y(this, Gt, !0), !0);
115
+ return v(this, Gt) ? !1 : (this.getAttribute("use-shadow") !== "false" && !this.shadowRoot ? (this.attachShadow({ mode: "open" }), Y(this, Xe, this.shadowRoot)) : Y(this, Xe, this), v(this, Rn).call(this), Y(this, Gt, !0), !0);
116
116
  }
117
117
  get changed() {
118
118
  return v(this, Yt);
@@ -155,7 +155,7 @@ yr = function() {
155
155
  A(this, ae, At).call(this).forEach((t) => {
156
156
  t.removeEventListener("input", v(this, Xt)), t.addEventListener("input", v(this, Xt));
157
157
  });
158
- }, Xt = new WeakMap(), Pn = new WeakMap();
158
+ }, Xt = new WeakMap(), Rn = new WeakMap();
159
159
  function j(r) {
160
160
  this.content = r;
161
161
  }
@@ -558,11 +558,11 @@ class b {
558
558
  }
559
559
  }
560
560
  b.empty = new b([], 0);
561
- const Gn = { index: 0, offset: 0 };
561
+ const _n = { index: 0, offset: 0 };
562
562
  function ln(r, e) {
563
- return Gn.index = r, Gn.offset = e, Gn;
563
+ return _n.index = r, _n.offset = e, _n;
564
564
  }
565
- function xn(r, e) {
565
+ function kn(r, e) {
566
566
  if (r === e)
567
567
  return !0;
568
568
  if (!(r && typeof r == "object") || !(e && typeof e == "object"))
@@ -574,11 +574,11 @@ function xn(r, e) {
574
574
  if (r.length != e.length)
575
575
  return !1;
576
576
  for (let n = 0; n < r.length; n++)
577
- if (!xn(r[n], e[n]))
577
+ if (!kn(r[n], e[n]))
578
578
  return !1;
579
579
  } else {
580
580
  for (let n in r)
581
- if (!(n in e) || !xn(r[n], e[n]))
581
+ if (!(n in e) || !kn(r[n], e[n]))
582
582
  return !1;
583
583
  for (let n in e)
584
584
  if (!(n in r))
@@ -640,7 +640,7 @@ let D = class br {
640
640
  another mark.
641
641
  */
642
642
  eq(e) {
643
- return this == e || this.type == e.type && xn(this.attrs, e.attrs);
643
+ return this == e || this.type == e.type && kn(this.attrs, e.attrs);
644
644
  }
645
645
  /**
646
646
  Convert this mark to a JSON-serializeable representation.
@@ -692,7 +692,7 @@ let D = class br {
692
692
  }
693
693
  };
694
694
  D.none = [];
695
- class Sn extends Error {
695
+ class xn extends Error {
696
696
  }
697
697
  class k {
698
698
  /**
@@ -795,9 +795,9 @@ function Is(r, e, t, n) {
795
795
  }
796
796
  function zl(r, e, t) {
797
797
  if (t.openStart > r.depth)
798
- throw new Sn("Inserted content deeper than insertion position");
798
+ throw new xn("Inserted content deeper than insertion position");
799
799
  if (r.depth - t.openStart != e.depth - t.openEnd)
800
- throw new Sn("Inconsistent open depths");
800
+ throw new xn("Inconsistent open depths");
801
801
  return Rs(r, e, t, 0);
802
802
  }
803
803
  function Rs(r, e, t, n) {
@@ -813,11 +813,11 @@ function Rs(r, e, t, n) {
813
813
  let { start: o, end: l } = $l(t, r);
814
814
  return Qe(s, Bs(r, o, l, e, n));
815
815
  }
816
- else return Qe(s, Mn(r, e, n));
816
+ else return Qe(s, Sn(r, e, n));
817
817
  }
818
818
  function Ps(r, e) {
819
819
  if (!e.type.compatibleContent(r.type))
820
- throw new Sn("Cannot join " + e.type.name + " onto " + r.type.name);
820
+ throw new xn("Cannot join " + e.type.name + " onto " + r.type.name);
821
821
  }
822
822
  function kr(r, e, t) {
823
823
  let n = r.node(t);
@@ -839,13 +839,13 @@ function Qe(r, e) {
839
839
  }
840
840
  function Bs(r, e, t, n, i) {
841
841
  let s = r.depth > i && kr(r, e, i + 1), o = n.depth > i && kr(t, n, i + 1), l = [];
842
- return Rt(null, r, i, l), s && o && e.index(i) == t.index(i) ? (Ps(s, o), Ze(Qe(s, Bs(r, e, t, n, i + 1)), l)) : (s && Ze(Qe(s, Mn(r, e, i + 1)), l), Rt(e, t, i, l), o && Ze(Qe(o, Mn(t, n, i + 1)), l)), Rt(n, null, i, l), new b(l);
842
+ return Rt(null, r, i, l), s && o && e.index(i) == t.index(i) ? (Ps(s, o), Ze(Qe(s, Bs(r, e, t, n, i + 1)), l)) : (s && Ze(Qe(s, Sn(r, e, i + 1)), l), Rt(e, t, i, l), o && Ze(Qe(o, Sn(t, n, i + 1)), l)), Rt(n, null, i, l), new b(l);
843
843
  }
844
- function Mn(r, e, t) {
844
+ function Sn(r, e, t) {
845
845
  let n = [];
846
846
  if (Rt(null, r, t, n), r.depth > t) {
847
847
  let i = kr(r, e, t + 1);
848
- Ze(Qe(i, Mn(r, e, t + 1)), n);
848
+ Ze(Qe(i, Sn(r, e, t + 1)), n);
849
849
  }
850
850
  return Rt(e, null, t, n), new b(n);
851
851
  }
@@ -1043,7 +1043,7 @@ class zt {
1043
1043
  return e.blockRange(this);
1044
1044
  for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--)
1045
1045
  if (e.pos <= this.end(n) && (!t || t(this.node(n))))
1046
- return new wn(this, e, n);
1046
+ return new Mn(this, e, n);
1047
1047
  return null;
1048
1048
  }
1049
1049
  /**
@@ -1111,7 +1111,7 @@ class Fl {
1111
1111
  }
1112
1112
  }
1113
1113
  const Vl = 12, fi = /* @__PURE__ */ new WeakMap();
1114
- class wn {
1114
+ class Mn {
1115
1115
  /**
1116
1116
  Construct a node range. `$from` and `$to` should point into the
1117
1117
  same node until at least the given `depth`, since a node range
@@ -1270,7 +1270,7 @@ let ze = class xr {
1270
1270
  attributes, and marks.
1271
1271
  */
1272
1272
  hasMarkup(e, t, n) {
1273
- return this.type == e && xn(this.attrs, t || e.defaultAttrs || Hl) && D.sameSet(this.marks, n || D.none);
1273
+ return this.type == e && kn(this.attrs, t || e.defaultAttrs || Hl) && D.sameSet(this.marks, n || D.none);
1274
1274
  }
1275
1275
  /**
1276
1276
  Create a new node with the same markup as this node, containing
@@ -1522,7 +1522,7 @@ let ze = class xr {
1522
1522
  }
1523
1523
  };
1524
1524
  ze.prototype.text = void 0;
1525
- class Cn extends ze {
1525
+ class wn extends ze {
1526
1526
  /**
1527
1527
  @internal
1528
1528
  */
@@ -1544,10 +1544,10 @@ class Cn extends ze {
1544
1544
  return this.text.length;
1545
1545
  }
1546
1546
  mark(e) {
1547
- return e == this.marks ? this : new Cn(this.type, this.attrs, this.text, e);
1547
+ return e == this.marks ? this : new wn(this.type, this.attrs, this.text, e);
1548
1548
  }
1549
1549
  withText(e) {
1550
- return e == this.text ? this : new Cn(this.type, this.attrs, e, this.marks);
1550
+ return e == this.text ? this : new wn(this.type, this.attrs, e, this.marks);
1551
1551
  }
1552
1552
  cut(e = 0, t = this.text.length) {
1553
1553
  return e == 0 && t == this.text.length ? this : this.withText(this.text.slice(e, t));
@@ -2144,7 +2144,7 @@ class Zl {
2144
2144
  return !this.hasDefault;
2145
2145
  }
2146
2146
  }
2147
- class Bn {
2147
+ class Pn {
2148
2148
  /**
2149
2149
  @internal
2150
2150
  */
@@ -2166,7 +2166,7 @@ class Bn {
2166
2166
  */
2167
2167
  static compile(e, t) {
2168
2168
  let n = /* @__PURE__ */ Object.create(null), i = 0;
2169
- return e.forEach((s, o) => n[s] = new Bn(s, i++, t, o)), n;
2169
+ return e.forEach((s, o) => n[s] = new Pn(s, i++, t, o)), n;
2170
2170
  }
2171
2171
  /**
2172
2172
  When there is a mark of this type in the given set, a new set
@@ -2208,7 +2208,7 @@ class js {
2208
2208
  let t = this.spec = {};
2209
2209
  for (let i in e)
2210
2210
  t[i] = e[i];
2211
- t.nodes = j.from(e.nodes), t.marks = j.from(e.marks || {}), this.nodes = mi.compile(this.spec.nodes, this), this.marks = Bn.compile(this.spec.marks, this);
2211
+ t.nodes = j.from(e.nodes), t.marks = j.from(e.marks || {}), this.nodes = mi.compile(this.spec.nodes, this), this.marks = Pn.compile(this.spec.marks, this);
2212
2212
  let n = /* @__PURE__ */ Object.create(null);
2213
2213
  for (let i in this.nodes) {
2214
2214
  if (i in this.marks)
@@ -2250,7 +2250,7 @@ class js {
2250
2250
  */
2251
2251
  text(e, t) {
2252
2252
  let n = this.nodes.text;
2253
- return new Cn(n, n.defaultAttrs, e, D.setFrom(t));
2253
+ return new wn(n, n.defaultAttrs, e, D.setFrom(t));
2254
2254
  }
2255
2255
  /**
2256
2256
  Create a mark with the given type and attributes.
@@ -2817,7 +2817,7 @@ class ct {
2817
2817
  nodes.
2818
2818
  */
2819
2819
  serializeFragment(e, t = {}, n) {
2820
- n || (n = Yn(t).createDocumentFragment());
2820
+ n || (n = Gn(t).createDocumentFragment());
2821
2821
  let i = n, s = [];
2822
2822
  return e.forEach((o) => {
2823
2823
  if (s.length || o.marks.length) {
@@ -2846,7 +2846,7 @@ class ct {
2846
2846
  @internal
2847
2847
  */
2848
2848
  serializeNodeInner(e, t) {
2849
- let { dom: n, contentDOM: i } = mn(Yn(t), this.nodes[e.type.name](e), null, e.attrs);
2849
+ let { dom: n, contentDOM: i } = mn(Gn(t), this.nodes[e.type.name](e), null, e.attrs);
2850
2850
  if (i) {
2851
2851
  if (e.isLeaf)
2852
2852
  throw new RangeError("Content hole not allowed in a leaf node spec");
@@ -2874,7 +2874,7 @@ class ct {
2874
2874
  */
2875
2875
  serializeMark(e, t, n = {}) {
2876
2876
  let i = this.marks[e.type.name];
2877
- return i && mn(Yn(n), i(e, t), null, e.attrs);
2877
+ return i && mn(Gn(n), i(e, t), null, e.attrs);
2878
2878
  }
2879
2879
  static renderSpec(e, t, n = null, i) {
2880
2880
  return mn(e, t, n, i);
@@ -2909,7 +2909,7 @@ function Si(r) {
2909
2909
  }
2910
2910
  return e;
2911
2911
  }
2912
- function Yn(r) {
2912
+ function Gn(r) {
2913
2913
  return r.document || window.document;
2914
2914
  }
2915
2915
  const Mi = /* @__PURE__ */ new WeakMap();
@@ -3224,7 +3224,7 @@ class Ft {
3224
3224
  return n ? e : new Mr(e, i, null);
3225
3225
  }
3226
3226
  }
3227
- const Xn = /* @__PURE__ */ Object.create(null);
3227
+ const Yn = /* @__PURE__ */ Object.create(null);
3228
3228
  class Q {
3229
3229
  /**
3230
3230
  Get the step map that represents the changes made by this step,
@@ -3249,7 +3249,7 @@ class Q {
3249
3249
  static fromJSON(e, t) {
3250
3250
  if (!t || !t.stepType)
3251
3251
  throw new RangeError("Invalid input for Step.fromJSON");
3252
- let n = Xn[t.stepType];
3252
+ let n = Yn[t.stepType];
3253
3253
  if (!n)
3254
3254
  throw new RangeError(`No step type ${t.stepType} defined`);
3255
3255
  return n.fromJSON(e, t);
@@ -3261,9 +3261,9 @@ class Q {
3261
3261
  that's unlikely to clash with steps from other modules.
3262
3262
  */
3263
3263
  static jsonID(e, t) {
3264
- if (e in Xn)
3264
+ if (e in Yn)
3265
3265
  throw new RangeError("Duplicate use of step JSON ID " + e);
3266
- return Xn[e] = t, t.prototype.jsonID = e, t;
3266
+ return Yn[e] = t, t.prototype.jsonID = e, t;
3267
3267
  }
3268
3268
  }
3269
3269
  class z {
@@ -3294,7 +3294,7 @@ class z {
3294
3294
  try {
3295
3295
  return z.ok(e.replace(t, n, i));
3296
3296
  } catch (s) {
3297
- if (s instanceof Sn)
3297
+ if (s instanceof xn)
3298
3298
  return z.fail(s.message);
3299
3299
  throw s;
3300
3300
  }
@@ -3611,7 +3611,7 @@ function ca(r, e, t, n) {
3611
3611
  return;
3612
3612
  s++;
3613
3613
  let a = null;
3614
- if (n instanceof Bn) {
3614
+ if (n instanceof Pn) {
3615
3615
  let c = o.marks, d;
3616
3616
  for (; d = n.isInSet(c); )
3617
3617
  (a || (a = [])).push(d), c = d.removeFromSet(c);
@@ -3811,7 +3811,7 @@ function ka(r, e) {
3811
3811
  function eo(r, e) {
3812
3812
  return !!(r && e && !r.isLeaf && ka(r, e));
3813
3813
  }
3814
- function Ln(r, e, t = -1) {
3814
+ function Bn(r, e, t = -1) {
3815
3815
  let n = r.resolve(e);
3816
3816
  for (let i = n.depth; ; i--) {
3817
3817
  let s, o, l = n.index(i);
@@ -3884,7 +3884,7 @@ function to(r, e, t) {
3884
3884
  }
3885
3885
  return null;
3886
3886
  }
3887
- function zn(r, e, t = e, n = k.empty) {
3887
+ function Ln(r, e, t = e, n = k.empty) {
3888
3888
  if (e == t && !n.size)
3889
3889
  return null;
3890
3890
  let i = r.resolve(e), s = r.resolve(t);
@@ -3939,7 +3939,7 @@ class Ma {
3939
3939
  for (let t = 1; t <= 2; t++)
3940
3940
  for (let n = t == 1 ? e : this.unplaced.openStart; n >= 0; n--) {
3941
3941
  let i, s = null;
3942
- n ? (s = Zn(this.unplaced.content, n - 1).firstChild, i = s.content) : i = this.unplaced.content;
3942
+ n ? (s = Xn(this.unplaced.content, n - 1).firstChild, i = s.content) : i = this.unplaced.content;
3943
3943
  let o = i.firstChild;
3944
3944
  for (let l = this.depth; l >= 0; l--) {
3945
3945
  let { type: a, match: c } = this.frontier[l], d, u = null;
@@ -3953,11 +3953,11 @@ class Ma {
3953
3953
  }
3954
3954
  }
3955
3955
  openMore() {
3956
- let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Zn(e, t);
3956
+ let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Xn(e, t);
3957
3957
  return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new k(e, t + 1, Math.max(n, i.size + t >= e.size - n ? t + 1 : 0)), !0);
3958
3958
  }
3959
3959
  dropNode() {
3960
- let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Zn(e, t);
3960
+ let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Xn(e, t);
3961
3961
  if (i.childCount <= 1 && t > 0) {
3962
3962
  let s = e.size - t <= t + i.size;
3963
3963
  this.unplaced = new k(Nt(e, t - 1, 1), t - 1, s ? t - 1 : n);
@@ -3998,7 +3998,7 @@ class Ma {
3998
3998
  if (!this.$to.parent.isTextblock)
3999
3999
  return -1;
4000
4000
  let e = this.frontier[this.depth], t;
4001
- if (!e.type.isTextblock || !Qn(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
4001
+ if (!e.type.isTextblock || !Zn(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
4002
4002
  return -1;
4003
4003
  let { depth: n } = this.$to, i = this.$to.after(n);
4004
4004
  for (; n > 1 && i == this.$to.end(--n); )
@@ -4007,10 +4007,10 @@ class Ma {
4007
4007
  }
4008
4008
  findCloseLevel(e) {
4009
4009
  e: for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
4010
- let { match: n, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = Qn(e, t, i, n, s);
4010
+ let { match: n, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = Zn(e, t, i, n, s);
4011
4011
  if (o) {
4012
4012
  for (let l = t - 1; l >= 0; l--) {
4013
- let { match: a, type: c } = this.frontier[l], d = Qn(e, l, c, a, !0);
4013
+ let { match: a, type: c } = this.frontier[l], d = Zn(e, l, c, a, !0);
4014
4014
  if (!d || d.childCount)
4015
4015
  continue e;
4016
4016
  }
@@ -4046,7 +4046,7 @@ function Nt(r, e, t) {
4046
4046
  function vt(r, e, t) {
4047
4047
  return e == 0 ? r.append(t) : r.replaceChild(r.childCount - 1, r.lastChild.copy(vt(r.lastChild.content, e - 1, t)));
4048
4048
  }
4049
- function Zn(r, e) {
4049
+ function Xn(r, e) {
4050
4050
  for (let t = 0; t < e; t++)
4051
4051
  r = r.firstChild.content;
4052
4052
  return r;
@@ -4057,7 +4057,7 @@ function ro(r, e, t) {
4057
4057
  let n = r.content;
4058
4058
  return e > 1 && (n = n.replaceChild(0, ro(n.firstChild, e - 1, n.childCount == 1 ? t - 1 : 0))), e > 0 && (n = r.type.contentMatch.fillBefore(n).append(n), t <= 0 && (n = n.append(r.type.contentMatch.matchFragment(n).fillBefore(b.empty, !0)))), r.copy(n);
4059
4059
  }
4060
- function Qn(r, e, t, n, i) {
4060
+ function Zn(r, e, t, n, i) {
4061
4061
  let s = r.node(e), o = i ? r.indexAfter(e) : r.index(e);
4062
4062
  if (o == s.childCount && !t.compatibleContent(s.type))
4063
4063
  return null;
@@ -4323,7 +4323,7 @@ class Aa {
4323
4323
  given `slice`.
4324
4324
  */
4325
4325
  replace(e, t = e, n = k.empty) {
4326
- let i = zn(this.doc, e, t, n);
4326
+ let i = Ln(this.doc, e, t, n);
4327
4327
  return i && this.step(i), this;
4328
4328
  }
4329
4329
  /**
@@ -4499,7 +4499,7 @@ class Aa {
4499
4499
  return Wr(this, e, t, n), this;
4500
4500
  }
4501
4501
  }
4502
- const er = /* @__PURE__ */ Object.create(null);
4502
+ const Qn = /* @__PURE__ */ Object.create(null);
4503
4503
  class O {
4504
4504
  /**
4505
4505
  Initialize a selection with the head and anchor and ranges. If no
@@ -4635,7 +4635,7 @@ class O {
4635
4635
  static fromJSON(e, t) {
4636
4636
  if (!t || !t.type)
4637
4637
  throw new RangeError("Invalid input for Selection.fromJSON");
4638
- let n = er[t.type];
4638
+ let n = Qn[t.type];
4639
4639
  if (!n)
4640
4640
  throw new RangeError(`No selection type ${t.type} defined`);
4641
4641
  return n.fromJSON(e, t);
@@ -4647,9 +4647,9 @@ class O {
4647
4647
  clash with classes from other modules.
4648
4648
  */
4649
4649
  static jsonID(e, t) {
4650
- if (e in er)
4650
+ if (e in Qn)
4651
4651
  throw new RangeError("Duplicate use of selection JSON ID " + e);
4652
- return er[e] = t, t.prototype.jsonID = e, t;
4652
+ return Qn[e] = t, t.prototype.jsonID = e, t;
4653
4653
  }
4654
4654
  /**
4655
4655
  Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
@@ -4708,7 +4708,7 @@ class M extends O {
4708
4708
  return e instanceof M && e.anchor == this.anchor && e.head == this.head;
4709
4709
  }
4710
4710
  getBookmark() {
4711
- return new $n(this.anchor, this.head);
4711
+ return new zn(this.anchor, this.head);
4712
4712
  }
4713
4713
  toJSON() {
4714
4714
  return { type: "text", anchor: this.anchor, head: this.head };
@@ -4749,12 +4749,12 @@ class M extends O {
4749
4749
  }
4750
4750
  }
4751
4751
  O.jsonID("text", M);
4752
- class $n {
4752
+ class zn {
4753
4753
  constructor(e, t) {
4754
4754
  this.anchor = e, this.head = t;
4755
4755
  }
4756
4756
  map(e) {
4757
- return new $n(e.map(this.anchor), e.map(this.head));
4757
+ return new zn(e.map(this.anchor), e.map(this.head));
4758
4758
  }
4759
4759
  resolve(e) {
4760
4760
  return M.between(e.resolve(this.anchor), e.resolve(this.head));
@@ -4815,7 +4815,7 @@ class jr {
4815
4815
  }
4816
4816
  map(e) {
4817
4817
  let { deleted: t, pos: n } = e.mapResult(this.anchor);
4818
- return t ? new $n(n, n) : new jr(n);
4818
+ return t ? new zn(n, n) : new jr(n);
4819
4819
  }
4820
4820
  resolve(e) {
4821
4821
  let t = e.resolve(this.anchor), n = t.nodeAfter;
@@ -5088,7 +5088,7 @@ const Ia = [
5088
5088
  }
5089
5089
  })
5090
5090
  ];
5091
- class tr {
5091
+ class er {
5092
5092
  constructor(e, t) {
5093
5093
  this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Ia.slice(), t && t.forEach((n) => {
5094
5094
  if (this.pluginsByKey[n.key])
@@ -5189,7 +5189,7 @@ class mt {
5189
5189
  Create a new state.
5190
5190
  */
5191
5191
  static create(e) {
5192
- let t = new tr(e.doc ? e.doc.type.schema : e.schema, e.plugins), n = new mt(t);
5192
+ let t = new er(e.doc ? e.doc.type.schema : e.schema, e.plugins), n = new mt(t);
5193
5193
  for (let i = 0; i < t.fields.length; i++)
5194
5194
  n[t.fields[i].name] = t.fields[i].init(e, n);
5195
5195
  return n;
@@ -5203,7 +5203,7 @@ class mt {
5203
5203
  configuration object..
5204
5204
  */
5205
5205
  reconfigure(e) {
5206
- let t = new tr(this.schema, e.plugins), n = t.fields, i = new mt(t);
5206
+ let t = new er(this.schema, e.plugins), n = t.fields, i = new mt(t);
5207
5207
  for (let s = 0; s < n.length; s++) {
5208
5208
  let o = n[s].name;
5209
5209
  i[o] = this.hasOwnProperty(o) ? this[o] : n[s].init(e, i);
@@ -5240,7 +5240,7 @@ class mt {
5240
5240
  throw new RangeError("Invalid input for EditorState.fromJSON");
5241
5241
  if (!e.schema)
5242
5242
  throw new RangeError("Required config field 'schema' missing");
5243
- let i = new tr(e.schema, e.plugins), s = new mt(i);
5243
+ let i = new er(e.schema, e.plugins), s = new mt(i);
5244
5244
  return i.fields.forEach((o) => {
5245
5245
  if (o.name == "doc")
5246
5246
  s.doc = ze.fromJSON(e.schema, t.doc);
@@ -5283,9 +5283,9 @@ class oe {
5283
5283
  return e[this.key];
5284
5284
  }
5285
5285
  }
5286
- const nr = /* @__PURE__ */ Object.create(null);
5286
+ const tr = /* @__PURE__ */ Object.create(null);
5287
5287
  function lo(r) {
5288
- return r in nr ? r + "$" + ++nr[r] : (nr[r] = 0, r + "$");
5288
+ return r in tr ? r + "$" + ++tr[r] : (tr[r] = 0, r + "$");
5289
5289
  }
5290
5290
  class we {
5291
5291
  /**
@@ -5394,7 +5394,7 @@ function nn(r) {
5394
5394
  ;
5395
5395
  return e && e.node && e.node.isBlock && (e.dom == r || e.contentDOM == r);
5396
5396
  }
5397
- const Fn = function(r) {
5397
+ const $n = function(r) {
5398
5398
  return r.focusNode && st(r.focusNode, r.focusOffset, r.anchorNode, r.anchorOffset);
5399
5399
  };
5400
5400
  function Ke(r, e) {
@@ -5661,14 +5661,14 @@ function go(r, e, t) {
5661
5661
  if (s == null && i && (t < 0 || i == fe(n))) {
5662
5662
  let a = n.childNodes[i - 1];
5663
5663
  if (a.nodeType == 1)
5664
- return rr(a.getBoundingClientRect(), !1);
5664
+ return nr(a.getBoundingClientRect(), !1);
5665
5665
  }
5666
5666
  if (s == null && i < fe(n)) {
5667
5667
  let a = n.childNodes[i];
5668
5668
  if (a.nodeType == 1)
5669
- return rr(a.getBoundingClientRect(), !0);
5669
+ return nr(a.getBoundingClientRect(), !0);
5670
5670
  }
5671
- return rr(n.getBoundingClientRect(), t >= 0);
5671
+ return nr(n.getBoundingClientRect(), t >= 0);
5672
5672
  }
5673
5673
  if (s == null && i && (t < 0 || i == fe(n))) {
5674
5674
  let a = n.childNodes[i - 1], c = a.nodeType == 3 ? Te(a, fe(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
@@ -5691,7 +5691,7 @@ function Et(r, e) {
5691
5691
  let t = e ? r.left : r.right;
5692
5692
  return { top: r.top, bottom: r.bottom, left: t, right: t };
5693
5693
  }
5694
- function rr(r, e) {
5694
+ function nr(r, e) {
5695
5695
  if (r.height == 0)
5696
5696
  return r;
5697
5697
  let t = e ? r.top : r.bottom;
@@ -6228,7 +6228,7 @@ class Ve extends sn {
6228
6228
  } else d || ({ dom: d, contentDOM: u } = ct.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
6229
6229
  !u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
6230
6230
  let f = d;
6231
- return d = Mo(d, n, t), c ? a = new rc(e, t, n, i, d, u || null, f, c, s, o + 1) : t.isText ? new Vn(e, t, n, i, d, f, s) : new Ve(e, t, n, i, d, u || null, f, s, o + 1);
6231
+ return d = Mo(d, n, t), c ? a = new rc(e, t, n, i, d, u || null, f, c, s, o + 1) : t.isText ? new Fn(e, t, n, i, d, f, s) : new Ve(e, t, n, i, d, u || null, f, s, o + 1);
6232
6232
  }
6233
6233
  parseRule() {
6234
6234
  if (this.node.type.spec.reparseInView)
@@ -6251,7 +6251,7 @@ class Ve extends sn {
6251
6251
  return e;
6252
6252
  }
6253
6253
  matchesNode(e, t, n) {
6254
- return this.dirty == me && e.eq(this.node) && Tn(t, this.outerDeco) && n.eq(this.innerDeco);
6254
+ return this.dirty == me && e.eq(this.node) && Cn(t, this.outerDeco) && n.eq(this.innerDeco);
6255
6255
  }
6256
6256
  get size() {
6257
6257
  return this.node.nodeSize;
@@ -6309,7 +6309,7 @@ class Ve extends sn {
6309
6309
  this.updateOuterDeco(t), this.node = e, this.innerDeco = n, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = me;
6310
6310
  }
6311
6311
  updateOuterDeco(e) {
6312
- if (Tn(e, this.outerDeco))
6312
+ if (Cn(e, this.outerDeco))
6313
6313
  return;
6314
6314
  let t = this.nodeDOM.nodeType != 1, n = this.dom;
6315
6315
  this.dom = So(this.dom, this.nodeDOM, Ar(this.outerDeco, this.node, t), Ar(e, this.node, t)), this.dom != n && (n.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
@@ -6331,7 +6331,7 @@ function Fi(r, e, t, n, i) {
6331
6331
  let s = new Ve(void 0, r, e, t, n, n, n, i, 0);
6332
6332
  return s.contentDOM && s.updateChildren(i, 0), s;
6333
6333
  }
6334
- class Vn extends Ve {
6334
+ class Fn extends Ve {
6335
6335
  constructor(e, t, n, i, s, o, l) {
6336
6336
  super(e, t, n, i, s, null, o, l, 0);
6337
6337
  }
@@ -6362,7 +6362,7 @@ class Vn extends Ve {
6362
6362
  }
6363
6363
  slice(e, t, n) {
6364
6364
  let i = this.node.cut(e, t), s = document.createTextNode(i.text);
6365
- return new Vn(this.parent, i, this.outerDeco, this.innerDeco, s, s, n);
6365
+ return new Fn(this.parent, i, this.outerDeco, this.innerDeco, s, s, n);
6366
6366
  }
6367
6367
  markDirty(e, t) {
6368
6368
  super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty = Se);
@@ -6501,7 +6501,7 @@ function ic(r, e, t) {
6501
6501
  function Mo(r, e, t) {
6502
6502
  return So(r, r, Ge, Ar(e, t, r.nodeType != 1));
6503
6503
  }
6504
- function Tn(r, e) {
6504
+ function Cn(r, e) {
6505
6505
  if (r.length != e.length)
6506
6506
  return !1;
6507
6507
  for (let t = 0; t < r.length; t++)
@@ -6604,7 +6604,7 @@ class sc {
6604
6604
  let c = this.preMatch.matched.get(a);
6605
6605
  if (c != null && c != s)
6606
6606
  return !1;
6607
- let d = a.dom, u, f = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Se && Tn(t, a.outerDeco));
6607
+ let d = a.dom, u, f = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Se && Cn(t, a.outerDeco));
6608
6608
  if (!f && a.update(e, t, n, i))
6609
6609
  return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
6610
6610
  if (!f && (u = this.recreateWrapper(a, e, t, n, i, o)))
@@ -6617,7 +6617,7 @@ class sc {
6617
6617
  // When a node with content is replaced by a different node with
6618
6618
  // identical content, move over its children.
6619
6619
  recreateWrapper(e, t, n, i, s, o) {
6620
- if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !Tn(n, e.outerDeco) || !i.eq(e.innerDeco))
6620
+ if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !Cn(n, e.outerDeco) || !i.eq(e.innerDeco))
6621
6621
  return null;
6622
6622
  let l = Ve.create(this.top, t, n, i, s, o);
6623
6623
  if (l.contentDOM) {
@@ -6648,7 +6648,7 @@ class sc {
6648
6648
  for (; e instanceof ot; )
6649
6649
  t = e, e = t.children[t.children.length - 1];
6650
6650
  (!e || // Empty textblock
6651
- !(e instanceof Vn) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Z || U) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
6651
+ !(e instanceof Fn) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Z || U) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
6652
6652
  }
6653
6653
  addHackNode(e, t) {
6654
6654
  if (t == this.top && this.index < t.children.length && t.children[this.index].matchesHack(e))
@@ -6788,7 +6788,7 @@ function Kr(r, e = null) {
6788
6788
  if (o < 0)
6789
6789
  return null;
6790
6790
  let l = n.resolve(o), a, c;
6791
- if (Fn(t)) {
6791
+ if ($n(t)) {
6792
6792
  for (a = o; i && !i.node; )
6793
6793
  i = i.parent;
6794
6794
  let u = i.node;
@@ -6844,15 +6844,15 @@ const Hi = Z || U && co < 63;
6844
6844
  function Wi(r, e) {
6845
6845
  let { node: t, offset: n } = r.docView.domFromPos(e, 0), i = n < t.childNodes.length ? t.childNodes[n] : null, s = n ? t.childNodes[n - 1] : null;
6846
6846
  if (Z && i && i.contentEditable == "false")
6847
- return ir(i);
6847
+ return rr(i);
6848
6848
  if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
6849
6849
  if (i)
6850
- return ir(i);
6850
+ return rr(i);
6851
6851
  if (s)
6852
- return ir(s);
6852
+ return rr(s);
6853
6853
  }
6854
6854
  }
6855
- function ir(r) {
6855
+ function rr(r) {
6856
6856
  return r.contentEditable = "true", Z && r.draggable && (r.draggable = !1, r.wasDraggable = !0), r;
6857
6857
  }
6858
6858
  function qi(r) {
@@ -6942,7 +6942,7 @@ function Ki(r, e, t) {
6942
6942
  }
6943
6943
  }
6944
6944
  }
6945
- function On(r) {
6945
+ function Tn(r) {
6946
6946
  return r.nodeType == 3 ? r.nodeValue.length : r.childNodes.length;
6947
6947
  }
6948
6948
  function Lt(r, e) {
@@ -6957,7 +6957,7 @@ function pc(r) {
6957
6957
  if (!t)
6958
6958
  return;
6959
6959
  let i, s, o = !1;
6960
- for (pe && t.nodeType == 1 && n < On(t) && Lt(t.childNodes[n], -1) && (o = !0); ; )
6960
+ for (pe && t.nodeType == 1 && n < Tn(t) && Lt(t.childNodes[n], -1) && (o = !0); ; )
6961
6961
  if (n > 0) {
6962
6962
  if (t.nodeType != 1)
6963
6963
  break;
@@ -6978,7 +6978,7 @@ function pc(r) {
6978
6978
  for (; l && Lt(l, -1); )
6979
6979
  i = t.parentNode, s = J(l), l = l.previousSibling;
6980
6980
  if (l)
6981
- t = l, n = On(t);
6981
+ t = l, n = Tn(t);
6982
6982
  else {
6983
6983
  if (t = t.parentNode, t == r.dom)
6984
6984
  break;
@@ -6992,7 +6992,7 @@ function mc(r) {
6992
6992
  let e = r.domSelectionRange(), t = e.focusNode, n = e.focusOffset;
6993
6993
  if (!t)
6994
6994
  return;
6995
- let i = On(t), s, o;
6995
+ let i = Tn(t), s, o;
6996
6996
  for (; ; )
6997
6997
  if (n < i) {
6998
6998
  if (t.nodeType != 1)
@@ -7010,7 +7010,7 @@ function mc(r) {
7010
7010
  for (; l && Lt(l, 1); )
7011
7011
  s = l.parentNode, o = J(l) + 1, l = l.nextSibling;
7012
7012
  if (l)
7013
- t = l, n = 0, i = On(t);
7013
+ t = l, n = 0, i = Tn(t);
7014
7014
  else {
7015
7015
  if (t = t.parentNode, t == r.dom)
7016
7016
  break;
@@ -7056,7 +7056,7 @@ function Dr(r, e, t) {
7056
7056
  let n = r.domSelection();
7057
7057
  if (!n)
7058
7058
  return;
7059
- if (Fn(n)) {
7059
+ if ($n(n)) {
7060
7060
  let s = document.createRange();
7061
7061
  s.setEnd(e, t), s.setStart(e, t), n.removeAllRanges(), n.addRange(s);
7062
7062
  } else n.extend && n.extend(e, t);
@@ -7308,10 +7308,10 @@ let Zi = null;
7308
7308
  function Io() {
7309
7309
  return Zi || (Zi = document.implementation.createHTMLDocument("title"));
7310
7310
  }
7311
- let sr = null;
7311
+ let ir = null;
7312
7312
  function wc(r) {
7313
7313
  let e = window.trustedTypes;
7314
- return e ? (sr || (sr = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), sr.createHTML(r)) : r;
7314
+ return e ? (ir || (ir = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), ir.createHTML(r)) : r;
7315
7315
  }
7316
7316
  function Cc(r) {
7317
7317
  let e = /^(\s*<meta [^>]*>)*/.exec(r);
@@ -7423,7 +7423,7 @@ te.keypress = (r, e) => {
7423
7423
  !/[\r\n]/.test(i) && !r.someProp("handleTextInput", (o) => o(r, n.$from.pos, n.$to.pos, i, s)) && r.dispatch(s()), t.preventDefault();
7424
7424
  }
7425
7425
  };
7426
- function Hn(r) {
7426
+ function Vn(r) {
7427
7427
  return { left: r.clientX, top: r.clientY };
7428
7428
  }
7429
7429
  function Rc(r, e) {
@@ -7494,7 +7494,7 @@ function Fc(r, e, t) {
7494
7494
  }
7495
7495
  }
7496
7496
  function Xr(r) {
7497
- return En(r);
7497
+ return On(r);
7498
7498
  }
7499
7499
  const Ro = ue ? "metaKey" : "ctrlKey";
7500
7500
  ee.mousedown = (r, e) => {
@@ -7502,7 +7502,7 @@ ee.mousedown = (r, e) => {
7502
7502
  r.input.shiftKey = t.shiftKey;
7503
7503
  let n = Xr(r), i = Date.now(), s = "singleClick";
7504
7504
  i - r.input.lastClick.time < 500 && Rc(t, r.input.lastClick) && !t[Ro] && r.input.lastClick.button == t.button && (r.input.lastClick.type == "singleClick" ? s = "doubleClick" : r.input.lastClick.type == "doubleClick" && (s = "tripleClick")), r.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
7505
- let o = r.posAtCoords(Hn(t));
7505
+ let o = r.posAtCoords(Vn(t));
7506
7506
  o && (s == "singleClick" ? (r.input.mouseDown && r.input.mouseDown.done(), r.input.mouseDown = new Vc(r, o, t, !!n)) : (s == "doubleClick" ? zc : $c)(r, o.pos, o.inside, t) ? t.preventDefault() : Le(r, "pointer"));
7507
7507
  };
7508
7508
  class Vc {
@@ -7534,7 +7534,7 @@ class Vc {
7534
7534
  if (this.done(), !this.view.dom.contains(e.target))
7535
7535
  return;
7536
7536
  let t = this.pos;
7537
- this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Hn(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Le(this.view, "pointer") : Lc(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
7537
+ this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Vn(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Le(this.view, "pointer") : Lc(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
7538
7538
  Z && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
7539
7539
  // cursor, but still report that the node is selected
7540
7540
  // when asked through getSelection. You'll then get a
@@ -7567,8 +7567,8 @@ te.compositionstart = te.compositionupdate = (r) => {
7567
7567
  r.domObserver.flush();
7568
7568
  let { state: e } = r, t = e.selection.$to;
7569
7569
  if (e.selection instanceof M && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((n) => n.type.spec.inclusive === !1) || U && uo && Wc(r)))
7570
- r.markCursor = r.state.storedMarks || t.marks(), En(r, !0), r.markCursor = null;
7571
- else if (En(r, !e.selection.empty), pe && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
7570
+ r.markCursor = r.state.storedMarks || t.marks(), On(r, !0), r.markCursor = null;
7571
+ else if (On(r, !e.selection.empty), pe && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
7572
7572
  let n = r.domSelectionRange();
7573
7573
  for (let i = n.focusNode, s = n.focusOffset; i && i.nodeType == 1 && s != 0; ) {
7574
7574
  let o = s < 0 ? i.lastChild : i.childNodes[s - 1];
@@ -7597,7 +7597,7 @@ te.compositionend = (r, e) => {
7597
7597
  r.composing && (r.input.composing = !1, r.input.compositionEndedAt = e.timeStamp, r.input.compositionPendingChanges = r.domObserver.pendingRecords().length ? r.input.compositionID : 0, r.input.compositionNode = null, r.input.badSafariComposition ? r.domObserver.forceFlush() : r.input.compositionPendingChanges && Promise.resolve().then(() => r.domObserver.flush()), r.input.compositionID++, Bo(r, 20));
7598
7598
  };
7599
7599
  function Bo(r, e) {
7600
- clearTimeout(r.input.composingTimeout), e > -1 && (r.input.composingTimeout = setTimeout(() => En(r), e));
7600
+ clearTimeout(r.input.composingTimeout), e > -1 && (r.input.composingTimeout = setTimeout(() => On(r), e));
7601
7601
  }
7602
7602
  function Lo(r) {
7603
7603
  for (r.composing && (r.input.composing = !1, r.input.compositionEndedAt = jc()); r.input.compositionNodes.length > 0; )
@@ -7626,7 +7626,7 @@ function jc() {
7626
7626
  let r = document.createEvent("Event");
7627
7627
  return r.initEvent("event", !0, !0), r.timeStamp;
7628
7628
  }
7629
- function En(r, e = !1) {
7629
+ function On(r, e = !1) {
7630
7630
  if (!(Ee && r.domObserver.flushingSoon >= 0)) {
7631
7631
  if (r.domObserver.forceFlush(), Lo(r), e || r.docView && r.docView.dirty) {
7632
7632
  let t = Kr(r), n = r.state.selection;
@@ -7705,7 +7705,7 @@ ee.dragstart = (r, e) => {
7705
7705
  let t = e, n = r.input.mouseDown;
7706
7706
  if (n && n.done(), !t.dataTransfer)
7707
7707
  return;
7708
- let i = r.state.selection, s = i.empty ? null : r.posAtCoords(Hn(t)), o;
7708
+ let i = r.state.selection, s = i.empty ? null : r.posAtCoords(Vn(t)), o;
7709
7709
  if (!(s && s.pos >= i.from && s.pos <= (i instanceof S ? i.to - 1 : i.to))) {
7710
7710
  if (n && n.mightDrag)
7711
7711
  o = S.create(r.state.doc, n.mightDrag.pos);
@@ -7734,7 +7734,7 @@ te.drop = (r, e) => {
7734
7734
  function Gc(r, e, t) {
7735
7735
  if (!e.dataTransfer)
7736
7736
  return;
7737
- let n = r.posAtCoords(Hn(e));
7737
+ let n = r.posAtCoords(Vn(e));
7738
7738
  if (!n)
7739
7739
  return;
7740
7740
  let i = r.state.doc.resolve(n.pos), s = t && t.slice;
@@ -7802,7 +7802,7 @@ function qt(r, e) {
7802
7802
  return !1;
7803
7803
  return !0;
7804
7804
  }
7805
- class An {
7805
+ class En {
7806
7806
  constructor(e, t) {
7807
7807
  this.toDOM = e, this.spec = t || et, this.side = this.spec.side || 0;
7808
7808
  }
@@ -7814,7 +7814,7 @@ class An {
7814
7814
  return !0;
7815
7815
  }
7816
7816
  eq(e) {
7817
- return this == e || e instanceof An && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && qt(this.spec, e.spec));
7817
+ return this == e || e instanceof En && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && qt(this.spec, e.spec));
7818
7818
  }
7819
7819
  destroy(e) {
7820
7820
  this.spec.destroy && this.spec.destroy(e);
@@ -7895,7 +7895,7 @@ class he {
7895
7895
  widget's current document position.
7896
7896
  */
7897
7897
  static widget(e, t, n) {
7898
- return new he(e, e, new An(t, n));
7898
+ return new he(e, e, new En(t, n));
7899
7899
  }
7900
7900
  /**
7901
7901
  Creates an inline decoration, which adds the given attributes to
@@ -7929,7 +7929,7 @@ class he {
7929
7929
  @internal
7930
7930
  */
7931
7931
  get widget() {
7932
- return this.type instanceof An;
7932
+ return this.type instanceof En;
7933
7933
  }
7934
7934
  }
7935
7935
  const pt = [], et = {};
@@ -7946,7 +7946,7 @@ class F {
7946
7946
  you must make a copy if you want need to preserve that.
7947
7947
  */
7948
7948
  static create(e, t) {
7949
- return t.length ? Nn(t, e, 0, et) : X;
7949
+ return t.length ? An(t, e, 0, et) : X;
7950
7950
  }
7951
7951
  /**
7952
7952
  Find all decorations in this set which touch the given range
@@ -8005,7 +8005,7 @@ class F {
8005
8005
  if (d = Ho(t, l, c)) {
8006
8006
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
8007
8007
  s += 3;
8008
- i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Nn(d, l, c + 1, et)), s += 3;
8008
+ i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, An(d, l, c + 1, et)), s += 3;
8009
8009
  }
8010
8010
  });
8011
8011
  let o = Vo(s ? Wo(t) : t, -n);
@@ -8201,7 +8201,7 @@ function Yc(r, e, t, n, i, s, o) {
8201
8201
  a = !0;
8202
8202
  }
8203
8203
  if (a) {
8204
- let c = Xc(l, r, e, t, i, s, o), d = Nn(c, n, 0, o);
8204
+ let c = Xc(l, r, e, t, i, s, o), d = An(c, n, 0, o);
8205
8205
  e = d.local;
8206
8206
  for (let u = 0; u < l.length; u += 3)
8207
8207
  l[u + 1] < 0 && (l.splice(u, 3), u -= 3);
@@ -8251,13 +8251,13 @@ function Wo(r) {
8251
8251
  r[t] != null && e.push(r[t]);
8252
8252
  return e;
8253
8253
  }
8254
- function Nn(r, e, t, n) {
8254
+ function An(r, e, t, n) {
8255
8255
  let i = [], s = !1;
8256
8256
  e.forEach((l, a) => {
8257
8257
  let c = Ho(r, l, a + t);
8258
8258
  if (c) {
8259
8259
  s = !0;
8260
- let d = Nn(c, l, t + a + 1, n);
8260
+ let d = An(c, l, t + a + 1, n);
8261
8261
  d != X && i.push(a, a + l.nodeSize, d);
8262
8262
  }
8263
8263
  });
@@ -8292,7 +8292,7 @@ function Qi(r, e, t) {
8292
8292
  e++;
8293
8293
  r.splice(e, 0, t);
8294
8294
  }
8295
- function or(r) {
8295
+ function sr(r) {
8296
8296
  let e = [];
8297
8297
  return r.someProp("decorations", (t) => {
8298
8298
  let n = t(r.state);
@@ -8440,7 +8440,7 @@ class td {
8440
8440
  }
8441
8441
  }
8442
8442
  let c = null;
8443
- s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Fn(n) && (c = Kr(e)) && c.eq(O.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ne(e), this.currentSelection.set(n), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), nd(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, sd(e, a)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || Ne(e), this.currentSelection.set(n));
8443
+ s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && $n(n) && (c = Kr(e)) && c.eq(O.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ne(e), this.currentSelection.set(n), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), nd(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, sd(e, a)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || Ne(e), this.currentSelection.set(n));
8444
8444
  }
8445
8445
  registerMutation(e, t) {
8446
8446
  if (t.indexOf(e.target) > -1)
@@ -8530,7 +8530,7 @@ function sd(r, e) {
8530
8530
  }
8531
8531
  function od(r, e, t) {
8532
8532
  let { node: n, fromOffset: i, toOffset: s, from: o, to: l } = r.docView.parseRange(e, t), a = r.domSelectionRange(), c, d = a.anchorNode;
8533
- if (d && r.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Fn(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), U && r.input.lastKeyCode === 8)
8533
+ if (d && r.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], $n(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), U && r.input.lastKeyCode === 8)
8534
8534
  for (let g = s; g > i; g--) {
8535
8535
  let y = n.childNodes[g - 1], T = y.pmViewDesc;
8536
8536
  if (y.nodeName == "BR" && !T) {
@@ -8673,7 +8673,7 @@ function ud(r, e, t, n, i) {
8673
8673
  if (
8674
8674
  // The content must have shrunk
8675
8675
  t - e <= i.pos - n.pos || // newEnd must point directly at or after the end of the block that newStart points into
8676
- lr(n, !0, !1) < i.pos
8676
+ or(n, !0, !1) < i.pos
8677
8677
  )
8678
8678
  return !1;
8679
8679
  let s = r.resolve(e);
@@ -8683,10 +8683,10 @@ function ud(r, e, t, n, i) {
8683
8683
  }
8684
8684
  if (s.parentOffset < s.parent.content.size || !s.parent.isTextblock)
8685
8685
  return !1;
8686
- let o = r.resolve(lr(s, !0, !0));
8687
- return !o.parent.isTextblock || o.pos > t || lr(o, !0, !1) < t ? !1 : n.parent.content.cut(n.parentOffset).eq(o.parent.content);
8686
+ let o = r.resolve(or(s, !0, !0));
8687
+ return !o.parent.isTextblock || o.pos > t || or(o, !0, !1) < t ? !1 : n.parent.content.cut(n.parentOffset).eq(o.parent.content);
8688
8688
  }
8689
- function lr(r, e, t) {
8689
+ function or(r, e, t) {
8690
8690
  let n = r.depth, i = e ? r.end() : r.pos;
8691
8691
  for (; n > 0 && (e || r.indexAfter(n) == r.node(n).childCount); )
8692
8692
  n--, i++, e = !1;
@@ -8730,7 +8730,7 @@ class qo {
8730
8730
  added to the document.
8731
8731
  */
8732
8732
  constructor(e, t) {
8733
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Ac(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(ds), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = as(this), ls(this), this.nodeViews = cs(this), this.docView = Fi(this.state.doc, ss(this), or(this), this.dom, this), this.domObserver = new td(this, (n, i, s, o) => cd(this, n, i, s, o)), this.domObserver.start(), Nc(this), this.updatePluginViews();
8733
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Ac(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(ds), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = as(this), ls(this), this.nodeViews = cs(this), this.docView = Fi(this.state.doc, ss(this), sr(this), this.dom, this), this.domObserver = new td(this, (n, i, s, o) => cd(this, n, i, s, o)), this.domObserver.start(), Nc(this), this.updatePluginViews();
8734
8734
  }
8735
8735
  /**
8736
8736
  Holds `true` when a
@@ -8793,7 +8793,7 @@ class qo {
8793
8793
  pd(h, this.nodeViews) && (this.nodeViews = h, s = !0);
8794
8794
  }
8795
8795
  (l || t.handleDOMEvents != this._props.handleDOMEvents) && Rr(this), this.editable = as(this), ls(this);
8796
- let a = or(this), c = ss(this), d = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", u = s || !this.docView.matchesNode(e.doc, c, a);
8796
+ let a = sr(this), c = ss(this), d = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", u = s || !this.docView.matchesNode(e.doc, c, a);
8797
8797
  (u || !e.selection.eq(i.selection)) && (o = !0);
8798
8798
  let f = d == "preserve" && o && this.dom.style.overflowAnchor == null && qa(this);
8799
8799
  if (o) {
@@ -9023,7 +9023,7 @@ class qo {
9023
9023
  views](https://prosemirror.net/docs/ref/#view.NodeView).
9024
9024
  */
9025
9025
  destroy() {
9026
- this.docView && (vc(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], or(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Ra());
9026
+ this.docView && (vc(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], sr(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Ra());
9027
9027
  }
9028
9028
  /**
9029
9029
  This is true when the view has been
@@ -9155,7 +9155,7 @@ var We = {
9155
9155
  220: "\\",
9156
9156
  221: "]",
9157
9157
  222: "'"
9158
- }, vn = {
9158
+ }, Nn = {
9159
9159
  48: ")",
9160
9160
  49: "!",
9161
9161
  50: "@",
@@ -9184,10 +9184,10 @@ var We = {
9184
9184
  for (var K = 0; K < 10; K++) We[48 + K] = We[96 + K] = String(K);
9185
9185
  for (var K = 1; K <= 24; K++) We[K + 111] = "F" + K;
9186
9186
  for (var K = 65; K <= 90; K++)
9187
- We[K] = String.fromCharCode(K + 32), vn[K] = String.fromCharCode(K);
9188
- for (var ar in We) vn.hasOwnProperty(ar) || (vn[ar] = We[ar]);
9187
+ We[K] = String.fromCharCode(K + 32), Nn[K] = String.fromCharCode(K);
9188
+ for (var lr in We) Nn.hasOwnProperty(lr) || (Nn[lr] = We[lr]);
9189
9189
  function yd(r) {
9190
- var e = md && r.metaKey && r.shiftKey && !r.ctrlKey && !r.altKey || gd && r.shiftKey && r.key && r.key.length == 1 || r.key == "Unidentified", t = !e && r.key || (r.shiftKey ? vn : We)[r.keyCode] || r.key || "Unidentified";
9190
+ var e = md && r.metaKey && r.shiftKey && !r.ctrlKey && !r.altKey || gd && r.shiftKey && r.key && r.key.length == 1 || r.key == "Unidentified", t = !e && r.key || (r.shiftKey ? Nn : We)[r.keyCode] || r.key || "Unidentified";
9191
9191
  return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
9192
9192
  }
9193
9193
  const bd = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), kd = typeof navigator < "u" && /Win/.test(navigator.platform);
@@ -9218,7 +9218,7 @@ function Sd(r) {
9218
9218
  e[xd(t)] = r[t];
9219
9219
  return e;
9220
9220
  }
9221
- function cr(r, e, t = !0) {
9221
+ function ar(r, e, t = !0) {
9222
9222
  return e.altKey && (r = "Alt-" + r), e.ctrlKey && (r = "Ctrl-" + r), e.metaKey && (r = "Meta-" + r), t && e.shiftKey && (r = "Shift-" + r), r;
9223
9223
  }
9224
9224
  function Md(r) {
@@ -9227,18 +9227,18 @@ function Md(r) {
9227
9227
  function jo(r) {
9228
9228
  let e = Sd(r);
9229
9229
  return function(t, n) {
9230
- let i = yd(n), s, o = e[cr(i, n)];
9230
+ let i = yd(n), s, o = e[ar(i, n)];
9231
9231
  if (o && o(t.state, t.dispatch, t))
9232
9232
  return !0;
9233
9233
  if (i.length == 1 && i != " ") {
9234
9234
  if (n.shiftKey) {
9235
- let l = e[cr(i, n, !1)];
9235
+ let l = e[ar(i, n, !1)];
9236
9236
  if (l && l(t.state, t.dispatch, t))
9237
9237
  return !0;
9238
9238
  }
9239
9239
  if ((n.altKey || n.metaKey || n.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
9240
9240
  !(kd && n.ctrlKey && n.altKey) && (s = We[n.keyCode]) && s != i) {
9241
- let l = e[cr(s, n)];
9241
+ let l = e[ar(s, n)];
9242
9242
  if (l && l(t.state, t.dispatch, t))
9243
9243
  return !0;
9244
9244
  }
@@ -9265,7 +9265,7 @@ const Ko = (r, e, t) => {
9265
9265
  return !0;
9266
9266
  if (n.parent.content.size == 0 && (Tt(s, "end") || S.isSelectable(s)))
9267
9267
  for (let o = n.depth; ; o--) {
9268
- let l = zn(r.doc, n.before(o), n.after(o), k.empty);
9268
+ let l = Ln(r.doc, n.before(o), n.after(o), k.empty);
9269
9269
  if (l && l.slice.size < l.to - l.from) {
9270
9270
  if (e) {
9271
9271
  let a = r.tr.step(l);
@@ -9309,7 +9309,7 @@ function Uo(r, e, t) {
9309
9309
  return !1;
9310
9310
  l = d;
9311
9311
  }
9312
- let c = zn(r.doc, s, a, k.empty);
9312
+ let c = Ln(r.doc, s, a, k.empty);
9313
9313
  if (!c || c.from != s || c instanceof L && c.slice.size >= a - s)
9314
9314
  return !1;
9315
9315
  if (t) {
@@ -9364,7 +9364,7 @@ const Yo = (r, e, t) => {
9364
9364
  if (tl(r, i, e, 1))
9365
9365
  return !0;
9366
9366
  if (n.parent.content.size == 0 && (Tt(s, "start") || S.isSelectable(s))) {
9367
- let o = zn(r.doc, n.before(), n.after(), k.empty);
9367
+ let o = Ln(r.doc, n.before(), n.after(), k.empty);
9368
9368
  if (o && o.slice.size < o.to - o.from) {
9369
9369
  if (e) {
9370
9370
  let l = r.tr.step(o);
@@ -9403,7 +9403,7 @@ const Td = (r, e) => {
9403
9403
  if (t.node.isTextblock || !qe(r.doc, t.from))
9404
9404
  return !1;
9405
9405
  i = t.from;
9406
- } else if (i = Ln(r.doc, t.from, -1), i == null)
9406
+ } else if (i = Bn(r.doc, t.from, -1), i == null)
9407
9407
  return !1;
9408
9408
  if (e) {
9409
9409
  let s = r.tr.join(i);
@@ -9416,7 +9416,7 @@ const Td = (r, e) => {
9416
9416
  if (t.node.isTextblock || !qe(r.doc, t.to))
9417
9417
  return !1;
9418
9418
  n = t.to;
9419
- } else if (n = Ln(r.doc, t.to, 1), n == null)
9419
+ } else if (n = Bn(r.doc, t.to, 1), n == null)
9420
9420
  return !1;
9421
9421
  return e && e(r.tr.join(n).scrollIntoView()), !0;
9422
9422
  }, Ed = (r, e) => {
@@ -9622,7 +9622,7 @@ function zd(r, e, t, n = null) {
9622
9622
  if (e.$from.index(e.depth - 1) == 0)
9623
9623
  return !1;
9624
9624
  let a = o.resolve(e.start - 2);
9625
- s = new wn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new wn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
9625
+ s = new Mn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new Mn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
9626
9626
  }
9627
9627
  let l = qr(s, t, n, e);
9628
9628
  return l ? (r && $d(r, e, l, i, t), !0) : !1;
@@ -9648,7 +9648,7 @@ function Fd(r) {
9648
9648
  }
9649
9649
  function Vd(r, e, t, n) {
9650
9650
  let i = r.tr, s = n.end, o = n.$to.end(n.depth);
9651
- s < o && (i.step(new V(s - 1, o, s, o, new k(b.from(t.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new wn(i.doc.resolve(n.$from.pos), i.doc.resolve(o), n.depth));
9651
+ s < o && (i.step(new V(s - 1, o, s, o, new k(b.from(t.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new Mn(i.doc.resolve(n.$from.pos), i.doc.resolve(o), n.depth));
9652
9652
  const l = Ot(n);
9653
9653
  if (l == null)
9654
9654
  return !1;
@@ -9687,7 +9687,7 @@ function Wd(r) {
9687
9687
  return !0;
9688
9688
  };
9689
9689
  }
9690
- function Wn(r) {
9690
+ function Hn(r) {
9691
9691
  const { state: e, transaction: t } = r;
9692
9692
  let { selection: n } = t, { doc: i } = t, { storedMarks: s } = t;
9693
9693
  return {
@@ -9712,7 +9712,7 @@ function Wn(r) {
9712
9712
  }
9713
9713
  };
9714
9714
  }
9715
- class qn {
9715
+ class Wn {
9716
9716
  constructor(e) {
9717
9717
  this.editor = e.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = e.state;
9718
9718
  }
@@ -9757,7 +9757,7 @@ class qn {
9757
9757
  tr: e,
9758
9758
  editor: i,
9759
9759
  view: o,
9760
- state: Wn({
9760
+ state: Hn({
9761
9761
  state: s,
9762
9762
  transaction: e
9763
9763
  }),
@@ -9803,7 +9803,7 @@ function x(r, e, t) {
9803
9803
  parent: r.parent ? x(r.parent, e, t) : null
9804
9804
  }) : r.config[e];
9805
9805
  }
9806
- function jn(r) {
9806
+ function qn(r) {
9807
9807
  const e = r.filter((i) => i.type === "extension"), t = r.filter((i) => i.type === "node"), n = r.filter((i) => i.type === "mark");
9808
9808
  return {
9809
9809
  baseExtensions: e,
@@ -9812,7 +9812,7 @@ function jn(r) {
9812
9812
  };
9813
9813
  }
9814
9814
  function rl(r) {
9815
- const e = [], { nodeExtensions: t, markExtensions: n } = jn(r), i = [...t, ...n], s = {
9815
+ const e = [], { nodeExtensions: t, markExtensions: n } = qn(r), i = [...t, ...n], s = {
9816
9816
  default: null,
9817
9817
  rendered: !0,
9818
9818
  renderHTML: null,
@@ -9941,7 +9941,7 @@ function hs(r) {
9941
9941
  }
9942
9942
  function Kd(r, e) {
9943
9943
  var t;
9944
- const n = rl(r), { nodeExtensions: i, markExtensions: s } = jn(r), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
9944
+ const n = rl(r), { nodeExtensions: i, markExtensions: s } = qn(r), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
9945
9945
  const d = n.filter((y) => y.type === c.name), u = {
9946
9946
  name: c.name,
9947
9947
  options: c.options,
@@ -10017,7 +10017,7 @@ function Kd(r, e) {
10017
10017
  marks: a
10018
10018
  });
10019
10019
  }
10020
- function dr(r, e) {
10020
+ function cr(r, e) {
10021
10021
  return e.nodes[r] || e.marks[r] || null;
10022
10022
  }
10023
10023
  function ps(r, e) {
@@ -10044,7 +10044,7 @@ const Ud = (r, e = 500) => {
10044
10044
  function oi(r) {
10045
10045
  return Object.prototype.toString.call(r) === "[object RegExp]";
10046
10046
  }
10047
- class Jn {
10047
+ class jn {
10048
10048
  constructor(e) {
10049
10049
  this.find = e.find, this.handler = e.handler;
10050
10050
  }
@@ -10077,13 +10077,13 @@ function dn(r) {
10077
10077
  const h = _d(u, f.find);
10078
10078
  if (!h)
10079
10079
  return;
10080
- const p = a.state.tr, m = Wn({
10080
+ const p = a.state.tr, m = Hn({
10081
10081
  state: a.state,
10082
10082
  transaction: p
10083
10083
  }), g = {
10084
10084
  from: n - (h[0].length - s.length),
10085
10085
  to: i
10086
- }, { commands: y, chain: T, can: w } = new qn({
10086
+ }, { commands: y, chain: T, can: w } = new Wn({
10087
10087
  editor: t,
10088
10088
  state: m
10089
10089
  });
@@ -10180,10 +10180,10 @@ function Yd(r) {
10180
10180
  function un(r) {
10181
10181
  return Yd(r) !== "Object" ? !1 : r.constructor === Object && Object.getPrototypeOf(r) === Object.prototype;
10182
10182
  }
10183
- function Kn(r, e) {
10183
+ function Jn(r, e) {
10184
10184
  const t = { ...r };
10185
10185
  return un(r) && un(e) && Object.keys(e).forEach((n) => {
10186
- un(e[n]) && un(r[n]) ? t[n] = Kn(r[n], e[n]) : t[n] = e[n];
10186
+ un(e[n]) && un(r[n]) ? t[n] = Jn(r[n], e[n]) : t[n] = e[n];
10187
10187
  }), t;
10188
10188
  }
10189
10189
  class Me {
@@ -10207,7 +10207,7 @@ class Me {
10207
10207
  configure(e = {}) {
10208
10208
  const t = this.extend({
10209
10209
  ...this.config,
10210
- addOptions: () => Kn(this.options, e)
10210
+ addOptions: () => Jn(this.options, e)
10211
10211
  });
10212
10212
  return t.name = this.name, t.parent = this.parent, t;
10213
10213
  }
@@ -10250,7 +10250,7 @@ const Qd = (r, e, t) => {
10250
10250
  }) : [];
10251
10251
  };
10252
10252
  function eu(r) {
10253
- const { editor: e, state: t, from: n, to: i, rule: s, pasteEvent: o, dropEvent: l } = r, { commands: a, chain: c, can: d } = new qn({
10253
+ const { editor: e, state: t, from: n, to: i, rule: s, pasteEvent: o, dropEvent: l } = r, { commands: a, chain: c, can: d } = new Wn({
10254
10254
  editor: e,
10255
10255
  state: t
10256
10256
  }), u = [];
@@ -10295,7 +10295,7 @@ function nu(r) {
10295
10295
  l = null;
10296
10296
  }
10297
10297
  const a = ({ state: d, from: u, to: f, rule: h, pasteEvt: p }) => {
10298
- const m = d.tr, g = Wn({
10298
+ const m = d.tr, g = Hn({
10299
10299
  state: d,
10300
10300
  transaction: m
10301
10301
  });
@@ -10433,7 +10433,7 @@ class gt {
10433
10433
  options: t.options,
10434
10434
  storage: t.storage,
10435
10435
  editor: this.editor,
10436
- type: dr(t.name, this.schema)
10436
+ type: cr(t.name, this.schema)
10437
10437
  }, i = x(t, "addCommands", n);
10438
10438
  return i ? {
10439
10439
  ...e,
@@ -10452,7 +10452,7 @@ class gt {
10452
10452
  options: o.options,
10453
10453
  storage: o.storage,
10454
10454
  editor: e,
10455
- type: dr(o.name, this.schema)
10455
+ type: cr(o.name, this.schema)
10456
10456
  }, a = [], c = x(o, "addKeyboardShortcuts", l);
10457
10457
  let d = {};
10458
10458
  if (o.type === "mark" && x(o, "exitable", l) && (d.ArrowRight = () => Me.handleExit({ editor: e, mark: o })), c) {
@@ -10496,7 +10496,7 @@ class gt {
10496
10496
  * @returns An object with all node views where the key is the node name and the value is the node view function
10497
10497
  */
10498
10498
  get nodeViews() {
10499
- const { editor: e } = this, { nodeExtensions: t } = jn(this.extensions);
10499
+ const { editor: e } = this, { nodeExtensions: t } = qn(this.extensions);
10500
10500
  return Object.fromEntries(t.filter((n) => !!x(n, "addNodeView")).map((n) => {
10501
10501
  const i = this.attributes.filter((a) => a.type === n.name), s = {
10502
10502
  name: n.name,
@@ -10538,7 +10538,7 @@ class gt {
10538
10538
  options: e.options,
10539
10539
  storage: e.storage,
10540
10540
  editor: this.editor,
10541
- type: dr(e.name, this.schema)
10541
+ type: cr(e.name, this.schema)
10542
10542
  };
10543
10543
  e.type === "mark" && (!((t = E(x(e, "keepOnSplit", n))) !== null && t !== void 0) || t) && this.splittableMarks.push(e.name);
10544
10544
  const i = x(e, "onBeforeCreate", n), s = x(e, "onCreate", n), o = x(e, "onUpdate", n), l = x(e, "onSelectionUpdate", n), a = x(e, "onTransaction", n), c = x(e, "onFocus", n), d = x(e, "onBlur", n), u = x(e, "onDestroy", n);
@@ -10567,7 +10567,7 @@ class _ {
10567
10567
  configure(e = {}) {
10568
10568
  const t = this.extend({
10569
10569
  ...this.config,
10570
- addOptions: () => Kn(this.options, e)
10570
+ addOptions: () => Jn(this.options, e)
10571
10571
  });
10572
10572
  return t.name = this.name, t.parent = this.parent, t;
10573
10573
  }
@@ -10681,12 +10681,12 @@ const iu = _.create({
10681
10681
  const { from: n, to: i } = r;
10682
10682
  return t && e.delete(n, i), !0;
10683
10683
  }, pu = () => ({ state: r, dispatch: e }) => ei(r, e), mu = () => ({ commands: r }) => r.keyboardShortcut("Enter"), gu = () => ({ state: r, dispatch: e }) => Ad(r, e);
10684
- function Dn(r, e, t = { strict: !0 }) {
10684
+ function vn(r, e, t = { strict: !0 }) {
10685
10685
  const n = Object.keys(e);
10686
10686
  return n.length ? n.every((i) => t.strict ? e[i] === r[i] : oi(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
10687
10687
  }
10688
10688
  function ll(r, e, t = {}) {
10689
- return r.find((n) => n.type === e && Dn(
10689
+ return r.find((n) => n.type === e && vn(
10690
10690
  // Only check equality for the attributes that are provided
10691
10691
  Object.fromEntries(Object.keys(t).map((i) => [i, n.attrs[i]])),
10692
10692
  t
@@ -10757,7 +10757,7 @@ function cl(r, e = null) {
10757
10757
  function gs() {
10758
10758
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
10759
10759
  }
10760
- function In() {
10760
+ function Dn() {
10761
10761
  return [
10762
10762
  "iPad Simulator",
10763
10763
  "iPhone Simulator",
@@ -10776,8 +10776,8 @@ const xu = (r = null, e = {}) => ({ editor: t, view: n, tr: i, dispatch: s }) =>
10776
10776
  ...e
10777
10777
  };
10778
10778
  const o = () => {
10779
- (In() || gs()) && n.dom.focus(), requestAnimationFrame(() => {
10780
- t.isDestroyed || (n.focus(), ku() && !In() && !gs() && n.dom.focus({ preventScroll: !0 }));
10779
+ (Dn() || gs()) && n.dom.focus(), requestAnimationFrame(() => {
10780
+ t.isDestroyed || (n.focus(), ku() && !Dn() && !gs() && n.dom.focus({ preventScroll: !0 }));
10781
10781
  });
10782
10782
  };
10783
10783
  if (n.hasFocus() && r === null || r === !1)
@@ -10925,14 +10925,14 @@ const Cu = (r) => !("type" in r), Tu = (r, e, t) => ({ tr: n, dispatch: i, edito
10925
10925
  return !0;
10926
10926
  }, Ou = () => ({ state: r, dispatch: e }) => Td(r, e), Eu = () => ({ state: r, dispatch: e }) => Od(r, e), Au = () => ({ state: r, dispatch: e }) => Ko(r, e), Nu = () => ({ state: r, dispatch: e }) => Yo(r, e), vu = () => ({ state: r, dispatch: e, tr: t }) => {
10927
10927
  try {
10928
- const n = Ln(r.doc, r.selection.$from.pos, -1);
10928
+ const n = Bn(r.doc, r.selection.$from.pos, -1);
10929
10929
  return n == null ? !1 : (t.join(n, 2), e && e(t), !0);
10930
10930
  } catch {
10931
10931
  return !1;
10932
10932
  }
10933
10933
  }, Du = () => ({ state: r, dispatch: e, tr: t }) => {
10934
10934
  try {
10935
- const n = Ln(r.doc, r.selection.$from.pos, 1);
10935
+ const n = Bn(r.doc, r.selection.$from.pos, 1);
10936
10936
  return n == null ? !1 : (t.join(n, 2), e && e(t), !0);
10937
10937
  } catch {
10938
10938
  return !1;
@@ -10957,7 +10957,7 @@ function Pu(r) {
10957
10957
  else if (/^s(hift)?$/i.test(a))
10958
10958
  s = !0;
10959
10959
  else if (/^mod$/i.test(a))
10960
- In() || ul() ? o = !0 : i = !0;
10960
+ Dn() || ul() ? o = !0 : i = !0;
10961
10961
  else
10962
10962
  throw new Error(`Unrecognized modifier name: ${a}`);
10963
10963
  }
@@ -10992,7 +10992,7 @@ function Jt(r, e, t = {}) {
10992
10992
  to: p
10993
10993
  });
10994
10994
  });
10995
- const a = i - n, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => Dn(u.node.attrs, t, { strict: !1 }));
10995
+ const a = i - n, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => vn(u.node.attrs, t, { strict: !1 }));
10996
10996
  return s ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= a;
10997
10997
  }
10998
10998
  const Lu = (r, e = {}) => ({ state: t, dispatch: n }) => {
@@ -11002,7 +11002,7 @@ const Lu = (r, e = {}) => ({ state: t, dispatch: n }) => {
11002
11002
  const n = W(r, e.schema);
11003
11003
  return Fd(n)(e, t);
11004
11004
  }, Fu = () => ({ state: r, dispatch: e }) => Zo(r, e);
11005
- function Un(r, e) {
11005
+ function Kn(r, e) {
11006
11006
  return e.nodes[r] ? "node" : e.marks[r] ? "mark" : null;
11007
11007
  }
11008
11008
  function ys(r, e) {
@@ -11011,7 +11011,7 @@ function ys(r, e) {
11011
11011
  }
11012
11012
  const Vu = (r, e) => ({ tr: t, state: n, dispatch: i }) => {
11013
11013
  let s = null, o = null;
11014
- const l = Un(typeof r == "string" ? r : r.name, n.schema);
11014
+ const l = Kn(typeof r == "string" ? r : r.name, n.schema);
11015
11015
  return l ? (l === "node" && (s = W(r, n.schema)), l === "mark" && (o = Je(r, n.schema)), i && t.selection.ranges.forEach((a) => {
11016
11016
  n.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, d) => {
11017
11017
  s && s === c.type && t.setNodeMarkup(d, void 0, ys(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
@@ -11094,7 +11094,7 @@ function Zu(r, e) {
11094
11094
  return o ? { ...o.attrs } : {};
11095
11095
  }
11096
11096
  function Qu(r, e) {
11097
- const t = Un(typeof e == "string" ? e : e.name, r.schema);
11097
+ const t = Kn(typeof e == "string" ? e : e.name, r.schema);
11098
11098
  return t === "node" ? Zu(r, e) : t === "mark" ? fl(r, e) : {};
11099
11099
  }
11100
11100
  function hl(r, e, t) {
@@ -11122,7 +11122,7 @@ function yn(r, e, t) {
11122
11122
  function Lr(r, e, t = {}) {
11123
11123
  const { empty: n, ranges: i } = r.selection, s = e ? Je(e, r.schema) : null;
11124
11124
  if (n)
11125
- return !!(r.storedMarks || r.selection.$from.marks()).filter((u) => s ? s.name === u.type.name : !0).find((u) => Dn(u.attrs, t, { strict: !1 }));
11125
+ return !!(r.storedMarks || r.selection.$from.marks()).filter((u) => s ? s.name === u.type.name : !0).find((u) => vn(u.attrs, t, { strict: !1 }));
11126
11126
  let o = 0;
11127
11127
  const l = [];
11128
11128
  if (i.forEach(({ $from: u, $to: f }) => {
@@ -11139,17 +11139,17 @@ function Lr(r, e, t = {}) {
11139
11139
  });
11140
11140
  }), o === 0)
11141
11141
  return !1;
11142
- const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => Dn(u.mark.attrs, t, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, f) => u + f.to - f.from, 0);
11142
+ const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => vn(u.mark.attrs, t, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, f) => u + f.to - f.from, 0);
11143
11143
  return (a > 0 ? a + c : a) >= o;
11144
11144
  }
11145
11145
  function ef(r, e, t = {}) {
11146
11146
  if (!e)
11147
11147
  return Jt(r, null, t) || Lr(r, null, t);
11148
- const n = Un(e, r.schema);
11148
+ const n = Kn(e, r.schema);
11149
11149
  return n === "node" ? Jt(r, e, t) : n === "mark" ? Lr(r, e, t) : !1;
11150
11150
  }
11151
11151
  function bs(r, e) {
11152
- const { nodeExtensions: t } = jn(e), n = t.find((o) => o.name === r);
11152
+ const { nodeExtensions: t } = qn(e), n = t.find((o) => o.name === r);
11153
11153
  if (!n)
11154
11154
  return !1;
11155
11155
  const i = {
@@ -11337,7 +11337,7 @@ const df = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11337
11337
  t.ensureMarks(I);
11338
11338
  }
11339
11339
  return !0;
11340
- }, ur = (r, e) => {
11340
+ }, dr = (r, e) => {
11341
11341
  const t = ai((o) => o.type === e)(r.selection);
11342
11342
  if (!t)
11343
11343
  return !0;
@@ -11346,7 +11346,7 @@ const df = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11346
11346
  return !0;
11347
11347
  const i = r.doc.nodeAt(n);
11348
11348
  return t.node.type === (i == null ? void 0 : i.type) && qe(r.doc, t.pos) && r.join(t.pos), !0;
11349
- }, fr = (r, e) => {
11349
+ }, ur = (r, e) => {
11350
11350
  const t = ai((o) => o.type === e)(r.selection);
11351
11351
  if (!t)
11352
11352
  return !0;
@@ -11364,12 +11364,12 @@ const df = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11364
11364
  if (I.node.type === h)
11365
11365
  return c.liftListItem(p);
11366
11366
  if (bs(I.node.type.name, u) && h.validContent(I.node.content) && l)
11367
- return a().command(() => (s.setNodeMarkup(I.pos, h), !0)).command(() => ur(s, h)).command(() => fr(s, h)).run();
11367
+ return a().command(() => (s.setNodeMarkup(I.pos, h), !0)).command(() => dr(s, h)).command(() => ur(s, h)).run();
11368
11368
  }
11369
- return !t || !R || !l ? a().command(() => d().wrapInList(h, n) ? !0 : c.clearNodes()).wrapInList(h, n).command(() => ur(s, h)).command(() => fr(s, h)).run() : a().command(() => {
11369
+ return !t || !R || !l ? a().command(() => d().wrapInList(h, n) ? !0 : c.clearNodes()).wrapInList(h, n).command(() => dr(s, h)).command(() => ur(s, h)).run() : a().command(() => {
11370
11370
  const $ = d().wrapInList(h, n), C = R.filter((N) => f.includes(N.type.name));
11371
11371
  return s.ensureMarks(C), $ ? !0 : c.clearNodes();
11372
- }).wrapInList(h, n).command(() => ur(s, h)).command(() => fr(s, h)).run();
11372
+ }).wrapInList(h, n).command(() => dr(s, h)).command(() => ur(s, h)).run();
11373
11373
  }, hf = (r, e = {}, t = {}) => ({ state: n, commands: i }) => {
11374
11374
  const { extendEmptyMarkRange: s = !1 } = t, o = Je(r, n.schema);
11375
11375
  return Lr(n, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
@@ -11421,7 +11421,7 @@ const df = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11421
11421
  return t.removeStoredMark(a), !0;
11422
11422
  }, kf = (r, e = {}) => ({ tr: t, state: n, dispatch: i }) => {
11423
11423
  let s = null, o = null;
11424
- const l = Un(typeof r == "string" ? r : r.name, n.schema);
11424
+ const l = Kn(typeof r == "string" ? r : r.name, n.schema);
11425
11425
  return l ? (l === "node" && (s = W(r, n.schema)), l === "mark" && (o = Je(r, n.schema)), i && t.selection.ranges.forEach((a) => {
11426
11426
  const c = a.$from.pos, d = a.$to.pos;
11427
11427
  let u, f, h, p;
@@ -11625,7 +11625,7 @@ const wf = _.create({
11625
11625
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
11626
11626
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
11627
11627
  };
11628
- return In() || ul() ? s : i;
11628
+ return Dn() || ul() ? s : i;
11629
11629
  },
11630
11630
  addProseMirrorPlugins() {
11631
11631
  return [
@@ -11645,10 +11645,10 @@ const wf = _.create({
11645
11645
  const { empty: s, from: o, to: l } = e.selection, a = O.atStart(e.doc).from, c = O.atEnd(e.doc).to;
11646
11646
  if (s || !(o === a && l === c) || !ci(t.doc))
11647
11647
  return;
11648
- const f = t.tr, h = Wn({
11648
+ const f = t.tr, h = Hn({
11649
11649
  state: t,
11650
11650
  transaction: f
11651
- }), { commands: p } = new qn({
11651
+ }), { commands: p } = new Wn({
11652
11652
  editor: this.editor,
11653
11653
  state: h
11654
11654
  });
@@ -12046,7 +12046,7 @@ class Rf extends qd {
12046
12046
  * Creates an command manager.
12047
12047
  */
12048
12048
  createCommandManager() {
12049
- this.commandManager = new qn({
12049
+ this.commandManager = new Wn({
12050
12050
  editor: this
12051
12051
  });
12052
12052
  }
@@ -12245,7 +12245,7 @@ class Rf extends qd {
12245
12245
  }
12246
12246
  }
12247
12247
  function lt(r) {
12248
- return new Jn({
12248
+ return new jn({
12249
12249
  find: r.find,
12250
12250
  handler: ({ state: e, range: t, match: n }) => {
12251
12251
  const i = E(r.getAttributes, void 0, n);
@@ -12264,7 +12264,7 @@ function lt(r) {
12264
12264
  });
12265
12265
  }
12266
12266
  function pl(r) {
12267
- return new Jn({
12267
+ return new jn({
12268
12268
  find: r.find,
12269
12269
  handler: ({ state: e, range: t, match: n }) => {
12270
12270
  const i = E(r.getAttributes, void 0, n) || {}, { tr: s } = e, o = t.from;
@@ -12285,7 +12285,7 @@ function pl(r) {
12285
12285
  });
12286
12286
  }
12287
12287
  function zr(r) {
12288
- return new Jn({
12288
+ return new jn({
12289
12289
  find: r.find,
12290
12290
  handler: ({ state: e, range: t, match: n }) => {
12291
12291
  const i = e.doc.resolve(t.from), s = E(r.getAttributes, void 0, n) || {};
@@ -12296,7 +12296,7 @@ function zr(r) {
12296
12296
  });
12297
12297
  }
12298
12298
  function Kt(r) {
12299
- return new Jn({
12299
+ return new jn({
12300
12300
  find: r.find,
12301
12301
  handler: ({ state: e, range: t, match: n, chain: i }) => {
12302
12302
  const s = E(r.getAttributes, void 0, n) || {}, o = e.tr.delete(t.from, t.to), a = o.doc.resolve(t.from).blockRange(), c = a && qr(a, r.type, s);
@@ -12339,7 +12339,7 @@ class ne {
12339
12339
  configure(e = {}) {
12340
12340
  const t = this.extend({
12341
12341
  ...this.config,
12342
- addOptions: () => Kn(this.options, e)
12342
+ addOptions: () => Jn(this.options, e)
12343
12343
  });
12344
12344
  return t.name = this.name, t.parent = this.parent, t;
12345
12345
  }
@@ -13126,10 +13126,10 @@ const lh = _.create({
13126
13126
  }));
13127
13127
  }
13128
13128
  });
13129
- var Rn = 200, H = function() {
13129
+ var In = 200, H = function() {
13130
13130
  };
13131
13131
  H.prototype.append = function(e) {
13132
- return e.length ? (e = H.from(e), !this.length && e || e.length < Rn && this.leafAppend(e) || this.length < Rn && e.leafPrepend(this) || this.appendInner(e)) : this;
13132
+ return e.length ? (e = H.from(e), !this.length && e || e.length < In && this.leafAppend(e) || this.length < In && e.leafPrepend(this) || this.appendInner(e)) : this;
13133
13133
  };
13134
13134
  H.prototype.prepend = function(e) {
13135
13135
  return e.length ? H.from(e).append(this) : this;
@@ -13178,10 +13178,10 @@ var gl = /* @__PURE__ */ function(r) {
13178
13178
  if (i(this.values[a], l + a) === !1)
13179
13179
  return !1;
13180
13180
  }, e.prototype.leafAppend = function(i) {
13181
- if (this.length + i.length <= Rn)
13181
+ if (this.length + i.length <= In)
13182
13182
  return new e(this.values.concat(i.flatten()));
13183
13183
  }, e.prototype.leafPrepend = function(i) {
13184
- if (this.length + i.length <= Rn)
13184
+ if (this.length + i.length <= In)
13185
13185
  return new e(i.flatten().concat(this.values));
13186
13186
  }, t.length.get = function() {
13187
13187
  return this.values.length;
@@ -13373,9 +13373,9 @@ function ph(r, e, t, n) {
13373
13373
  if (o && o.getMeta(nt))
13374
13374
  return o.getMeta(nt).redo ? new Ie(r.done.addTransform(t, void 0, n, bn(e)), r.undone, Ms(t.mapping.maps), r.prevTime, r.prevComposition) : new Ie(r.done, r.undone.addTransform(t, void 0, n, bn(e)), null, r.prevTime, r.prevComposition);
13375
13375
  if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
13376
- let l = t.getMeta("composition"), a = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !mh(t, r.prevRanges)), c = o ? hr(r.prevRanges, t.mapping) : Ms(t.mapping.maps);
13376
+ let l = t.getMeta("composition"), a = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !mh(t, r.prevRanges)), c = o ? fr(r.prevRanges, t.mapping) : Ms(t.mapping.maps);
13377
13377
  return new Ie(r.done.addTransform(t, a ? e.selection.getBookmark() : void 0, n, bn(e)), ge.empty, c, t.time, l ?? r.prevComposition);
13378
- } else return (s = t.getMeta("rebased")) ? new Ie(r.done.rebased(t, s), r.undone.rebased(t, s), hr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new Ie(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), hr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
13378
+ } else return (s = t.getMeta("rebased")) ? new Ie(r.done.rebased(t, s), r.undone.rebased(t, s), fr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new Ie(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), fr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
13379
13379
  }
13380
13380
  function mh(r, e) {
13381
13381
  if (!e)
@@ -13394,7 +13394,7 @@ function Ms(r) {
13394
13394
  r[t].forEach((n, i, s, o) => e.push(s, o));
13395
13395
  return e;
13396
13396
  }
13397
- function hr(r, e) {
13397
+ function fr(r, e) {
13398
13398
  if (!r)
13399
13399
  return null;
13400
13400
  let t = [];
@@ -13411,18 +13411,18 @@ function gh(r, e, t) {
13411
13411
  let o = s.selection.resolve(s.transform.doc), l = (t ? r.done : r.undone).addTransform(s.transform, e.selection.getBookmark(), i, n), a = new Ie(t ? l : s.remaining, t ? s.remaining : l, null, 0, -1);
13412
13412
  return s.transform.setSelection(o).setMeta(nt, { redo: t, historyState: a });
13413
13413
  }
13414
- let pr = !1, ws = null;
13414
+ let hr = !1, ws = null;
13415
13415
  function bn(r) {
13416
13416
  let e = r.plugins;
13417
13417
  if (ws != e) {
13418
- pr = !1, ws = e;
13418
+ hr = !1, ws = e;
13419
13419
  for (let t = 0; t < e.length; t++)
13420
13420
  if (e[t].spec.historyPreserveItems) {
13421
- pr = !0;
13421
+ hr = !0;
13422
13422
  break;
13423
13423
  }
13424
13424
  }
13425
- return pr;
13425
+ return hr;
13426
13426
  }
13427
13427
  const nt = new we("history"), yh = new we("closeHistory");
13428
13428
  function bh(r = {}) {
@@ -14079,10 +14079,10 @@ $r = function() {
14079
14079
  n && (n.style.display = t ? "none" : "flex");
14080
14080
  }
14081
14081
  }, xl = function() {
14082
- const t = kn.getComponentCssPath("nineEditor.css"), n = t ? `@import "${t}";` : "";
14082
+ const t = mr.getComponentCssPath("nineEditor.css"), n = t ? `@import "${t}";` : "";
14083
14083
  this.shadowRoot.innerHTML = `
14084
14084
  <style>
14085
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.144/dist/css/nineEditor.css";
14085
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.146/dist/css/nineEditor.css";
14086
14086
  ${n}
14087
14087
  </style>
14088
14088
 
@@ -14190,7 +14190,7 @@ const Oe = typeof window < "u" && window.nine ? window.nine : As, Os = {
14190
14190
  var t;
14191
14191
  console.log(Oe, window.nine);
14192
14192
  const { nativeOverride: r } = ((t = Oe == null ? void 0 : Oe.config) == null ? void 0 : t.ux) || {}, e = Array.isArray(r) ? r : r === !0 ? ["alert", "confirm"] : [];
14193
- console.log(Oe, e), window.alert = e.includes("alert") ? (n) => kn.alert(n) : Os.alert, window.confirm = e.includes("confirm") ? async (n) => await kn.confirm(n) : Os.confirm, Oe.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
14193
+ console.log(Oe, e), window.alert = e.includes("alert") ? (n) => mr.alert(n) : Os.alert, window.confirm = e.includes("confirm") ? async (n) => await mr.confirm(n) : Os.confirm, Oe.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
14194
14194
  }, Jh = () => {
14195
14195
  Es(), Oe == null || Oe.subscribeConfig((r) => {
14196
14196
  (r === "ux" || r === "config") && Es();
@@ -14229,7 +14229,7 @@ kt = new WeakMap(), xt = new WeakMap(), ye = new WeakSet(), Cl = async function(
14229
14229
  const t = this.getAttribute("lang") || "Bash", n = this.getAttribute("code") || this.textContent.trim() || "", i = this.getAttribute("css-path");
14230
14230
  v(this, xt).innerHTML = `
14231
14231
  <style>
14232
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.144/dist/css/nine-code-block.css";
14232
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.146/dist/css/nine-code-block.css";
14233
14233
  ${i ? `@import "${i}";` : ""}
14234
14234
  </style>
14235
14235
 
@@ -14255,13 +14255,13 @@ kt = new WeakMap(), xt = new WeakMap(), ye = new WeakSet(), Cl = async function(
14255
14255
  typeof window < "u" && (customElements.get("nine-code-block") || customElements.define("nine-code-block", Kh));
14256
14256
  var en, tn, St, se, Ol, El, Fr, Al, Vr;
14257
14257
  class Uh extends HTMLElement {
14258
+ // ❌ constructor 내부의 this.attachShadow({ mode: 'open' }) 구문을 완벽히 삭제했습니다.
14258
14259
  constructor() {
14259
14260
  super();
14260
14261
  B(this, se);
14261
14262
  B(this, en);
14262
14263
  B(this, tn);
14263
14264
  B(this, St, []);
14264
- this.attachShadow({ mode: "open" });
14265
14265
  }
14266
14266
  set data(t) {
14267
14267
  Y(this, St, t), A(this, se, El).call(this), A(this, se, Fr).call(this);
@@ -14281,15 +14281,7 @@ class Uh extends HTMLElement {
14281
14281
  }
14282
14282
  }
14283
14283
  en = new WeakMap(), tn = new WeakMap(), St = new WeakMap(), se = new WeakSet(), Ol = function() {
14284
- Y(this, en, Number(this.getAttribute("min-width") || 48)), Y(this, tn, Number(this.getAttribute("max-width") || 256));
14285
- const t = kn.getComponentCssPath("nineMenu.css");
14286
- this.shadowRoot.innerHTML = `
14287
- <style>
14288
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.144/dist/css/nineMenu.css";
14289
- ${t ? `@import "${t}";` : ""}
14290
- </style>
14291
- <slot></slot>
14292
- `, this.addEventListener("mouseover", () => this.classList.add("hover")), this.addEventListener("mouseout", () => this.classList.remove("hover")), document.body.style.float = "right", document.body.style.transition = "width 0.5s ease-in-out", this.collapse();
14284
+ Y(this, en, Number(this.getAttribute("min-width") || 48)), Y(this, tn, Number(this.getAttribute("max-width") || 256)), this.addEventListener("mouseover", () => this.classList.add("hover")), this.addEventListener("mouseout", () => this.classList.remove("hover")), document.body.style.float = "right", document.body.style.transition = "width 0.5s ease-in-out", this.collapse();
14293
14285
  }, El = function() {
14294
14286
  if (!v(this, St).length) return;
14295
14287
  let t = this.querySelector("nine-side-menu-body");