@qwanyx/stack 0.2.20 → 0.2.21

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/index.esm.js CHANGED
@@ -4097,18 +4097,18 @@ function ha() {
4097
4097
  }
4098
4098
  return null;
4099
4099
  }
4100
- var I = Object.assign, W = 0, ne, Se, Me, vt, ut, ae, $e;
4101
- function qe() {
4100
+ var I = Object.assign, W = 0, ee, Se, Me, vt, ut, ae, Xe;
4101
+ function $e() {
4102
4102
  }
4103
- qe.__reactDisabledLog = !0;
4103
+ $e.__reactDisabledLog = !0;
4104
4104
  function lt() {
4105
4105
  {
4106
4106
  if (W === 0) {
4107
- ne = console.log, Se = console.info, Me = console.warn, vt = console.error, ut = console.group, ae = console.groupCollapsed, $e = console.groupEnd;
4107
+ ee = console.log, Se = console.info, Me = console.warn, vt = console.error, ut = console.group, ae = console.groupCollapsed, Xe = console.groupEnd;
4108
4108
  var m = {
4109
4109
  configurable: !0,
4110
4110
  enumerable: !0,
4111
- value: qe,
4111
+ value: $e,
4112
4112
  writable: !0
4113
4113
  };
4114
4114
  Object.defineProperties(console, {
@@ -4134,7 +4134,7 @@ function ha() {
4134
4134
  };
4135
4135
  Object.defineProperties(console, {
4136
4136
  log: I({}, m, {
4137
- value: ne
4137
+ value: ee
4138
4138
  }),
4139
4139
  info: I({}, m, {
4140
4140
  value: Se
@@ -4152,7 +4152,7 @@ function ha() {
4152
4152
  value: ae
4153
4153
  }),
4154
4154
  groupEnd: I({}, m, {
4155
- value: $e
4155
+ value: Xe
4156
4156
  })
4157
4157
  });
4158
4158
  }
@@ -4173,13 +4173,13 @@ function ha() {
4173
4173
  ` + Ze + m;
4174
4174
  }
4175
4175
  }
4176
- var ze = !1, et;
4176
+ var qe = !1, et;
4177
4177
  {
4178
4178
  var Gn = typeof WeakMap == "function" ? WeakMap : Map;
4179
4179
  et = new Gn();
4180
4180
  }
4181
4181
  function Hr(m, T) {
4182
- if (!m || ze)
4182
+ if (!m || qe)
4183
4183
  return "";
4184
4184
  {
4185
4185
  var R = et.get(m);
@@ -4187,7 +4187,7 @@ function ha() {
4187
4187
  return R;
4188
4188
  }
4189
4189
  var q;
4190
- ze = !0;
4190
+ qe = !0;
4191
4191
  var J = Error.prepareStackTrace;
4192
4192
  Error.prepareStackTrace = void 0;
4193
4193
  var X;
@@ -4244,7 +4244,7 @@ function ha() {
4244
4244
  }
4245
4245
  }
4246
4246
  } finally {
4247
- ze = !1, ve.current = X, at(), Error.prepareStackTrace = J;
4247
+ qe = !1, ve.current = X, at(), Error.prepareStackTrace = J;
4248
4248
  }
4249
4249
  var qt = m ? m.displayName || m.name : "", Dt = qt ? Te(qt) : "";
4250
4250
  return typeof m == "function" && et.set(m, Dt), Dt;
@@ -4336,7 +4336,7 @@ function ha() {
4336
4336
  if (se(m))
4337
4337
  return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", z(m)), Be(m);
4338
4338
  }
4339
- var Ue = D.ReactCurrentOwner, Zn = {
4339
+ var ze = D.ReactCurrentOwner, Zn = {
4340
4340
  key: !0,
4341
4341
  ref: !0,
4342
4342
  __self: !0,
@@ -4359,7 +4359,7 @@ function ha() {
4359
4359
  return m.key !== void 0;
4360
4360
  }
4361
4361
  function bl(m, T) {
4362
- typeof m.ref == "string" && Ue.current;
4362
+ typeof m.ref == "string" && ze.current;
4363
4363
  }
4364
4364
  function Dl(m, T) {
4365
4365
  {
@@ -4427,7 +4427,7 @@ function ha() {
4427
4427
  var oe = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
4428
4428
  V && Dl(K, oe), me && wl(K, oe);
4429
4429
  }
4430
- return Cl(m, V, me, J, q, Ue.current, K);
4430
+ return Cl(m, V, me, J, q, ze.current, K);
4431
4431
  }
4432
4432
  }
4433
4433
  var es = D.ReactCurrentOwner, Di = D.ReactDebugCurrentFrame;
@@ -4828,11 +4828,11 @@ function hf({
4828
4828
  borderBottom: t === "list" ? `1px solid ${F.border}` : "none",
4829
4829
  transition: "all 0.15s ease"
4830
4830
  },
4831
- onMouseEnter: (ne) => {
4832
- d && (ne.currentTarget.style.background = F.border);
4831
+ onMouseEnter: (ee) => {
4832
+ d && (ee.currentTarget.style.background = F.border);
4833
4833
  },
4834
- onMouseLeave: (ne) => {
4835
- ne.currentTarget.style.background = F.cardBackground;
4834
+ onMouseLeave: (ee) => {
4835
+ ee.currentTarget.style.background = F.cardBackground;
4836
4836
  },
4837
4837
  children: $(I, W)
4838
4838
  },
@@ -5032,8 +5032,8 @@ function mf({
5032
5032
  }), f((P) => {
5033
5033
  const F = [...P], $ = [
5034
5034
  (S ? c[b] : l[b])._id,
5035
- ...l.filter((W, ne) => ne !== b).map((W) => W._id),
5036
- ...P.filter((W, ne) => ne !== b).map((W) => W._id)
5035
+ ...l.filter((W, ee) => ee !== b).map((W) => W._id),
5036
+ ...P.filter((W, ee) => ee !== b).map((W) => W._id)
5037
5037
  ], I = D($);
5038
5038
  return I && (F[b] = I), F;
5039
5039
  }), setTimeout(() => {
@@ -5197,7 +5197,7 @@ function yf({
5197
5197
  renderLoading: y,
5198
5198
  theme: w = {}
5199
5199
  }) {
5200
- const x = { ...ga, ...w }, [C, b] = Q([]), [k, A] = Q(!1), [S, P] = Q(null), [F, U] = Q(/* @__PURE__ */ new Set()), [$, I] = Q(null), [W, ne] = Q(null), [Se, Me] = Q(null), [vt, ut] = Q(!1), ae = Pt(() => e ? new la({ baseUrl: r, system_id: e }) : null, [r, e]), $e = Z(async () => {
5200
+ const x = { ...ga, ...w }, [C, b] = Q([]), [k, A] = Q(!1), [S, P] = Q(null), [F, U] = Q(/* @__PURE__ */ new Set()), [$, I] = Q(null), [W, ee] = Q(null), [Se, Me] = Q(null), [vt, ut] = Q(!1), ae = Pt(() => e ? new la({ baseUrl: r, system_id: e }) : null, [r, e]), Xe = Z(async () => {
5201
5201
  if (ae) {
5202
5202
  A(!0), P(null);
5203
5203
  try {
@@ -5211,11 +5211,11 @@ function yf({
5211
5211
  }
5212
5212
  }, [ae, t, n, s, d, h]);
5213
5213
  ge(() => {
5214
- l && $e();
5215
- }, [l, $e]);
5216
- const qe = Z(async (M) => {
5214
+ b([]), U(/* @__PURE__ */ new Set()), ee(null), P(null), l && Xe();
5215
+ }, [s, l]);
5216
+ const $e = Z(async (M) => {
5217
5217
  if (ae) {
5218
- ne(M), Me(null), ut(!0);
5218
+ ee(M), Me(null), ut(!0);
5219
5219
  try {
5220
5220
  const z = await ae.getEmailParsed(t, M.uid, s || "INBOX");
5221
5221
  z != null && z.body && Me(z.body);
@@ -5225,20 +5225,20 @@ function yf({
5225
5225
  ut(!1);
5226
5226
  }
5227
5227
  }, [ae, t, s]), lt = Z((M) => {
5228
- a == null || a(M), i && qe(M);
5229
- }, [a, i, qe]), at = Z((M, z, se) => {
5228
+ a == null || a(M), i && $e(M);
5229
+ }, [a, i, $e]), at = Z((M, z, se) => {
5230
5230
  if (!o) {
5231
- a == null || a(M), i && qe(M);
5231
+ a == null || a(M), i && $e(M);
5232
5232
  return;
5233
5233
  }
5234
5234
  const Be = M.uid;
5235
5235
  if (se.shiftKey && $ !== null) {
5236
- const Ae = Math.min($, z), Ue = Math.max($, z), Zn = C.slice(Ae, Ue + 1).map((Qr) => Qr.uid), ir = new Set(Zn);
5236
+ const Ae = Math.min($, z), ze = Math.max($, z), Zn = C.slice(Ae, ze + 1).map((Qr) => Qr.uid), ir = new Set(Zn);
5237
5237
  U(ir), c == null || c(Array.from(ir));
5238
5238
  } else if (se.ctrlKey || se.metaKey)
5239
5239
  U((Ae) => {
5240
- const Ue = new Set(Ae);
5241
- return Ue.has(Be) ? Ue.delete(Be) : Ue.add(Be), c == null || c(Array.from(Ue)), Ue;
5240
+ const ze = new Set(Ae);
5241
+ return ze.has(Be) ? ze.delete(Be) : ze.add(Be), c == null || c(Array.from(ze)), ze;
5242
5242
  }), I(z);
5243
5243
  else {
5244
5244
  const Ae = /* @__PURE__ */ new Set([Be]);
@@ -5281,14 +5281,14 @@ function yf({
5281
5281
  const M = new Set(C.map((z) => z.uid));
5282
5282
  U(M), c == null || c(Array.from(M));
5283
5283
  }
5284
- }, [C, F.size, c]), ze = Z(() => {
5284
+ }, [C, F.size, c]), qe = Z(() => {
5285
5285
  U(/* @__PURE__ */ new Set()), c == null || c([]);
5286
5286
  }, [c]), et = {
5287
5287
  delete: ve,
5288
5288
  archive: Ze,
5289
- refresh: $e,
5289
+ refresh: Xe,
5290
5290
  selectAll: Te,
5291
- clearSelection: ze
5291
+ clearSelection: qe
5292
5292
  }, Gn = (M) => {
5293
5293
  if (!M) return "";
5294
5294
  const z = new Date(M), se = /* @__PURE__ */ new Date();
@@ -5599,7 +5599,7 @@ function _a(r, e) {
5599
5599
  return e ?? null;
5600
5600
  } };
5601
5601
  }
5602
- function Ye() {
5602
+ function Qe() {
5603
5603
  const r = Ml(eu);
5604
5604
  return r == null && ya(8), r;
5605
5605
  }
@@ -5708,7 +5708,7 @@ function mu(r, e, t) {
5708
5708
  }
5709
5709
  t.takeRecords();
5710
5710
  }
5711
- s !== null && (a && (s.dirty = !0, Ge(s)), mt && Su(r) && s.insertRawText(c));
5711
+ s !== null && (a && (s.dirty = !0, He(s)), mt && Su(r) && s.insertRawText(c));
5712
5712
  });
5713
5713
  } finally {
5714
5714
  Es = !1;
@@ -5730,7 +5730,7 @@ function $i(r, e) {
5730
5730
  return !(t !== null && t !== o || n !== null && n !== i || s !== null && s !== u);
5731
5731
  }
5732
5732
  function qi(r, e) {
5733
- const t = r.mergeWithSibling(e), n = te()._normalizedNodes;
5733
+ const t = r.mergeWithSibling(e), n = re()._normalizedNodes;
5734
5734
  return n.add(r.__key), n.add(e.__key), t;
5735
5735
  }
5736
5736
  function zi(r) {
@@ -5832,7 +5832,7 @@ function bu(r) {
5832
5832
  function nc(r, e) {
5833
5833
  if (e != null) return void (r.__key = e);
5834
5834
  De(), Gu();
5835
- const t = te(), n = it(), s = "" + ec++;
5835
+ const t = re(), n = it(), s = "" + ec++;
5836
5836
  n._nodeMap.set(s, r), E(r) ? t._dirtyElements.set(s, !0) : t._dirtyLeaves.add(s), t._cloneNotNeeded.add(s), t._dirtyType = hu, r.__key = s;
5837
5837
  }
5838
5838
  function kt(r) {
@@ -5868,7 +5868,7 @@ function kt(r) {
5868
5868
  }
5869
5869
  function xn(r) {
5870
5870
  Gu();
5871
- const e = r.getLatest(), t = e.__parent, n = it(), s = te(), o = n._nodeMap, i = s._dirtyElements;
5871
+ const e = r.getLatest(), t = e.__parent, n = it(), s = re(), o = n._nodeMap, i = s._dirtyElements;
5872
5872
  t !== null && function(l, a, c) {
5873
5873
  let f = l;
5874
5874
  for (; f !== null; ) {
@@ -5883,7 +5883,7 @@ function xn(r) {
5883
5883
  }
5884
5884
  function he(r) {
5885
5885
  De();
5886
- const e = te(), t = e._compositionKey;
5886
+ const e = re(), t = e._compositionKey;
5887
5887
  if (r !== t) {
5888
5888
  if (e._compositionKey = r, t !== null) {
5889
5889
  const n = pe(t);
@@ -5896,14 +5896,14 @@ function he(r) {
5896
5896
  }
5897
5897
  }
5898
5898
  function ht() {
5899
- return Ur() ? null : te()._compositionKey;
5899
+ return Ur() ? null : re()._compositionKey;
5900
5900
  }
5901
5901
  function pe(r, e) {
5902
5902
  const t = (e || it())._nodeMap.get(r);
5903
5903
  return t === void 0 ? null : t;
5904
5904
  }
5905
5905
  function Du(r, e) {
5906
- const t = jn(r, te());
5906
+ const t = jn(r, re());
5907
5907
  return t !== void 0 ? pe(t, e) : null;
5908
5908
  }
5909
5909
  function jn(r, e) {
@@ -5923,21 +5923,21 @@ function wu(r) {
5923
5923
  return r._pendingDecorators = t, t;
5924
5924
  }
5925
5925
  function Wi(r) {
5926
- return r.read(() => re().getTextContent());
5926
+ return r.read(() => ne().getTextContent());
5927
5927
  }
5928
- function re() {
5928
+ function ne() {
5929
5929
  return Cu(it());
5930
5930
  }
5931
5931
  function Cu(r) {
5932
5932
  return r._nodeMap.get("root");
5933
5933
  }
5934
- function Ge(r) {
5934
+ function He(r) {
5935
5935
  De();
5936
5936
  const e = it();
5937
5937
  r !== null && (r.dirty = !0, r.setCachedNodes(null)), e._selection = r;
5938
5938
  }
5939
5939
  function Vt(r) {
5940
- const e = te(), t = function(n, s) {
5940
+ const e = re(), t = function(n, s) {
5941
5941
  let o = n;
5942
5942
  for (; o != null; ) {
5943
5943
  const i = jn(o, s);
@@ -5994,7 +5994,7 @@ function ci(r, e, t, n, s) {
5994
5994
  if (u === "") {
5995
5995
  if (he(null), Pn || Or || Ys) o.remove();
5996
5996
  else {
5997
- const g = te();
5997
+ const g = re();
5998
5998
  setTimeout(() => {
5999
5999
  g.update(() => {
6000
6000
  o.isAttached() && o.remove();
@@ -6046,8 +6046,8 @@ function Ji(r, e, t) {
6046
6046
  return r.toLowerCase() === "a" && gr(e, t);
6047
6047
  }
6048
6048
  function ic() {
6049
- const r = re();
6050
- Ge(xu(r.select(0, r.getChildrenSize())));
6049
+ const r = ne();
6050
+ He(xu(r.select(0, r.getChildrenSize())));
6051
6051
  }
6052
6052
  function br(r, e) {
6053
6053
  r.__lexicalClassNameCache === void 0 && (r.__lexicalClassNameCache = {});
@@ -6121,16 +6121,16 @@ function Mn(r) {
6121
6121
  function oc(r) {
6122
6122
  let e = r.getParentOrThrow();
6123
6123
  for (; e !== null; ) {
6124
- if (Je(e)) return e;
6124
+ if (Ge(e)) return e;
6125
6125
  e = e.getParentOrThrow();
6126
6126
  }
6127
6127
  return e;
6128
6128
  }
6129
- function Je(r) {
6129
+ function Ge(r) {
6130
6130
  return _e(r) || E(r) && r.isShadowRoot();
6131
6131
  }
6132
- function Xe(r) {
6133
- const e = te(), t = r.constructor.getType(), n = e._nodes.get(t);
6132
+ function Ye(r) {
6133
+ const e = re(), t = r.constructor.getType(), n = e._nodes.get(t);
6134
6134
  n === void 0 && N(200, r.constructor.name, t);
6135
6135
  const { replace: s, replaceWithKlass: o } = n;
6136
6136
  if (s !== null) {
@@ -6205,7 +6205,7 @@ function bn(r) {
6205
6205
  }
6206
6206
  function dt(r) {
6207
6207
  if (Y(r) && !r.isInline()) return !0;
6208
- if (!E(r) || Je(r)) return !1;
6208
+ if (!E(r) || Ge(r)) return !1;
6209
6209
  const e = r.getFirstChild(), t = e === null || St(e) || L(e) || e.isInline();
6210
6210
  return !r.isInline() && r.canBeEmpty() !== !1 && t;
6211
6211
  }
@@ -6215,7 +6215,7 @@ function dr(r, e) {
6215
6215
  return e(t) ? t : null;
6216
6216
  }
6217
6217
  function ac() {
6218
- return te();
6218
+ return re();
6219
6219
  }
6220
6220
  const Xi = /* @__PURE__ */ new WeakMap(), cc = /* @__PURE__ */ new Map();
6221
6221
  function dc(r) {
@@ -6250,7 +6250,7 @@ function Tu(r, e, t, n, s, o) {
6250
6250
  i.__parent === e && (E(i) && Tu(i, u, t, n, s, o), t.has(u) || o.delete(u), s.push(u)), i = i.getNextSibling();
6251
6251
  }
6252
6252
  }
6253
- let yt, xe, Nr, $n, Ss, Ts, Nt, je, Bs, Fr, ue = "", ye = "", We = null, Pe = "", rt = "", Bu = !1, Lr = !1, ln = null;
6253
+ let yt, xe, Nr, $n, Ss, Ts, Nt, je, Bs, Fr, ue = "", ye = "", Ue = null, Pe = "", rt = "", Bu = !1, Lr = !1, ln = null;
6254
6254
  function Dn(r, e) {
6255
6255
  const t = Nt.get(r);
6256
6256
  if (e !== null) {
@@ -6324,7 +6324,7 @@ function Fs(r, e, t, n, s) {
6324
6324
  for (; i <= n; ++i) {
6325
6325
  wn(r[i], s);
6326
6326
  const u = je.get(r[i]);
6327
- u !== null && L(u) && (We === null && (We = u.getFormat()), Pe === "" && (Pe = u.getStyle()));
6327
+ u !== null && L(u) && (Ue === null && (Ue = u.getFormat()), Pe === "" && (Pe = u.getStyle()));
6328
6328
  }
6329
6329
  In(e) && (ue += nt), s.element.__lexicalTextContent = ue, ue = o + ue;
6330
6330
  }
@@ -6377,7 +6377,7 @@ function Pu(r, e) {
6377
6377
  function pc(r, e, t) {
6378
6378
  const n = ye;
6379
6379
  var s;
6380
- ye = "", We = null, Pe = "", function(o, i, u) {
6380
+ ye = "", Ue = null, Pe = "", function(o, i, u) {
6381
6381
  const l = ue, a = o.__size, c = i.__size;
6382
6382
  ue = "";
6383
6383
  const f = u.element;
@@ -6398,7 +6398,7 @@ function pc(r, e, t) {
6398
6398
  Dn(d, null);
6399
6399
  }
6400
6400
  const p = je.get(h);
6401
- L(p) && (We === null && (We = p.getFormat()), Pe === "" && (Pe = p.getStyle()));
6401
+ L(p) && (Ue === null && (Ue = p.getFormat()), Pe === "" && (Pe = p.getStyle()));
6402
6402
  } else {
6403
6403
  const d = Cn(o, Nt), h = Cn(i, je);
6404
6404
  if (d.length !== a && N(227), h.length !== c && N(228), a === 0) c !== 0 && Fs(h, i, 0, c - 1, u);
@@ -6415,15 +6415,15 @@ function pc(r, e, t) {
6415
6415
  if ($ === I) A = hs(mr(I, w.element)), S++, P++;
6416
6416
  else {
6417
6417
  b === void 0 && (b = new Set(g)), k === void 0 && (k = new Set(_));
6418
- const ne = k.has($), Se = b.has(I);
6419
- if (ne) if (Se) {
6418
+ const ee = k.has($), Se = b.has(I);
6419
+ if (ee) if (Se) {
6420
6420
  const Me = vn(xe, I);
6421
6421
  Me === A ? A = hs(mr(I, w.element)) : (w.withBefore(A).insertChild(Me), mr(I, w.element)), S++, P++;
6422
6422
  } else wn(I, w.withBefore(A)), P++;
6423
6423
  else A = hs(Ls($)), Dn($, w.element), S++;
6424
6424
  }
6425
6425
  const W = je.get(I);
6426
- W !== null && L(W) && (We === null && (We = W.getFormat()), Pe === "" && (Pe = W.getStyle()));
6426
+ W !== null && L(W) && (Ue === null && (Ue = W.getFormat()), Pe === "" && (Pe = W.getStyle()));
6427
6427
  }
6428
6428
  const F = S > x, U = P > C;
6429
6429
  if (F && !U) {
@@ -6433,7 +6433,7 @@ function pc(r, e, t) {
6433
6433
  })(i, d, h, a, c, u);
6434
6434
  }
6435
6435
  In(i) && (ue += nt), f.__lexicalTextContent = ue, ue = l + ue;
6436
- }(r, e, e.getDOMSlot(t)), Pu(e, t), Zt(s = e) && We != null && We !== s.__textFormat && !Lr && (s.setTextFormat(We), s.setTextStyle(Pe)), function(o) {
6436
+ }(r, e, e.getDOMSlot(t)), Pu(e, t), Zt(s = e) && Ue != null && Ue !== s.__textFormat && !Lr && (s.setTextFormat(Ue), s.setTextStyle(Pe)), function(o) {
6437
6437
  Zt(o) && Pe !== "" && Pe !== o.__textStyle && !Lr && o.setTextStyle(Pe);
6438
6438
  }(e), ye = n;
6439
6439
  }
@@ -6627,7 +6627,7 @@ const tt = Object.freeze({}), Ps = 30, Os = [["keydown", function(r, e) {
6627
6627
  mt && c > 1 && r.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= c), Pn || Or || Ys || !e.isComposing() || (wr = 0, he(null));
6628
6628
  } else
6629
6629
  ai(!1, e, n !== null ? n : void 0), fr && (ps(e, n || void 0), fr = !1);
6630
- De(), yu(te());
6630
+ De(), yu(re());
6631
6631
  }), Wt = null;
6632
6632
  }], ["click", function(r, e) {
6633
6633
  Ee(e, () => {
@@ -6635,12 +6635,12 @@ const tt = Object.freeze({}), Ps = 30, Os = [["keydown", function(r, e) {
6635
6635
  if (n) {
6636
6636
  if (B(t)) {
6637
6637
  const o = t.anchor, i = o.getNode();
6638
- o.type === "element" && o.offset === 0 && t.isCollapsed() && !_e(i) && re().getChildrenSize() === 1 && i.getTopLevelElementOrThrow().isEmpty() && s !== null && t.is(s) ? (n.removeAllRanges(), t.dirty = !0) : r.detail === 3 && !t.isCollapsed() && i !== t.focus.getNode() && (E(i) ? i.select(0) : i.getParentOrThrow().select(0));
6638
+ o.type === "element" && o.offset === 0 && t.isCollapsed() && !_e(i) && ne().getChildrenSize() === 1 && i.getTopLevelElementOrThrow().isEmpty() && s !== null && t.is(s) ? (n.removeAllRanges(), t.dirty = !0) : r.detail === 3 && !t.isCollapsed() && i !== t.focus.getNode() && (E(i) ? i.select(0) : i.getParentOrThrow().select(0));
6639
6639
  } else if (r.pointerType === "touch") {
6640
6640
  const o = n.anchorNode;
6641
6641
  if (o !== null) {
6642
6642
  const i = o.nodeType;
6643
- (i === Rr || i === _t) && Ge(mi(s, n, e, r));
6643
+ (i === Rr || i === _t) && He(mi(s, n, e, r));
6644
6644
  }
6645
6645
  }
6646
6646
  }
@@ -6655,7 +6655,7 @@ hn && Os.push(["beforeinput", (r, e) => function(t, n) {
6655
6655
  if (i === null) {
6656
6656
  const h = zr();
6657
6657
  if (!B(h)) return;
6658
- Ge(h.clone());
6658
+ He(h.clone());
6659
6659
  }
6660
6660
  if (B(i)) {
6661
6661
  const h = i.anchor.key === i.focus.key;
@@ -6761,7 +6761,7 @@ let wr = 0, Ru = null, ju = 0, Wt = null;
6761
6761
  const An = /* @__PURE__ */ new WeakMap();
6762
6762
  let Rs = !1, js = !1, Cr = !1, fr = !1, Iu = [0, "", 0, "root", 0];
6763
6763
  function Mu(r, e, t, n, s) {
6764
- const o = r.anchor, i = r.focus, u = o.getNode(), l = te(), a = Fe(l._window), c = a !== null ? a.anchorNode : null, f = o.key, d = l.getElementByKey(f), h = t.length;
6764
+ const o = r.anchor, i = r.focus, u = o.getNode(), l = re(), a = Fe(l._window), c = a !== null ? a.anchorNode : null, f = o.key, d = l.getElementByKey(f), h = t.length;
6765
6765
  return f !== i.key || !L(u) || (!s && (!hn || ju < n + 50) || u.isDirty() && h < 2 || Au(t)) && o.offset !== i.offset && !u.isComposing() || Ct(u) || u.isDirty() && h > 1 || (s || !hn) && d !== null && !u.isComposing() && c !== yn(d) || a !== null && e !== null && (!e.collapsed || e.startContainer !== a.anchorNode || e.startOffset !== a.anchorOffset) || u.getFormat() !== r.format || u.getStyle() !== r.style || sc(r, u);
6766
6766
  }
6767
6767
  function eo(r, e) {
@@ -6770,14 +6770,14 @@ function eo(r, e) {
6770
6770
  function to(r, e, t) {
6771
6771
  const { anchorNode: n, anchorOffset: s, focusNode: o, focusOffset: i } = r;
6772
6772
  Rs && (Rs = !1, eo(n, s) && eo(o, i)) || Ee(e, () => {
6773
- if (!t) return void Ge(null);
6773
+ if (!t) return void He(null);
6774
6774
  if (!jr(e, n, o)) return;
6775
6775
  const u = j();
6776
6776
  if (B(u)) {
6777
6777
  const l = u.anchor, a = l.getNode();
6778
6778
  if (u.isCollapsed()) {
6779
6779
  r.type === "Range" && r.anchorNode === r.focusNode && (u.dirty = !0);
6780
- const c = Mn(e).event, f = c ? c.timeStamp : performance.now(), [d, h, p, g, _] = Iu, D = re(), y = e.isComposing() === !1 && D.getTextContent() === "";
6780
+ const c = Mn(e).event, f = c ? c.timeStamp : performance.now(), [d, h, p, g, _] = Iu, D = ne(), y = e.isComposing() === !1 && D.getTextContent() === "";
6781
6781
  if (f < _ + 200 && l.offset === p && l.key === g) u.format = d, u.style = h;
6782
6782
  else if (l.type === "text") L(a) || N(141), u.format = a.getFormat(), u.style = a.getStyle();
6783
6783
  else if (l.type === "element" && !y) {
@@ -6834,7 +6834,7 @@ function zu(r) {
6834
6834
  const a = zr(), c = t.anchorNode;
6835
6835
  if (c === null) return;
6836
6836
  const f = c.nodeType;
6837
- f !== Rr && f !== _t || Ge(mi(a, t, n, r));
6837
+ f !== Rr && f !== _t || He(mi(a, t, n, r));
6838
6838
  }));
6839
6839
  const s = li(n), o = s[s.length - 1], i = o._key, u = Jt.get(i), l = u || o;
6840
6840
  l !== n && to(t, l, !1), to(t, n, !0), n !== o ? Jt.set(i, n) : u && Jt.delete(i);
@@ -6875,12 +6875,12 @@ function Is(r, e, t) {
6875
6875
  if (B(o) && e) {
6876
6876
  const u = o.anchor, l = o.focus;
6877
6877
  u.key === n && (kn(u, r, s, r.getPreviousSibling(), r.getNextSibling()), i = !0), l.key === n && (kn(l, r, s, r.getPreviousSibling(), r.getNextSibling()), i = !0);
6878
- } else Ve(o) && e && r.isSelected() && r.selectPrevious();
6878
+ } else We(o) && e && r.isSelected() && r.selectPrevious();
6879
6879
  if (B(o) && e && !i) {
6880
6880
  const u = r.getIndexWithinParent();
6881
6881
  kt(r), En(o, s, u, -1);
6882
6882
  } else kt(r);
6883
- t || Je(s) || s.canBeEmpty() || !s.isEmpty() || Is(s, e), e && _e(s) && s.isEmpty() && s.selectEnd();
6883
+ t || Ge(s) || s.canBeEmpty() || !s.isEmpty() || Is(s, e), e && _e(s) && s.isEmpty() && s.selectEnd();
6884
6884
  }
6885
6885
  class qn {
6886
6886
  static getType() {
@@ -6951,7 +6951,7 @@ class qn {
6951
6951
  let e = this;
6952
6952
  for (; e !== null; ) {
6953
6953
  const t = e.getParent();
6954
- if (Je(t)) return E(e) || e === this && Y(e) || N(194), e;
6954
+ if (Ge(t)) return E(e) || e === this && Y(e) || N(194), e;
6955
6955
  e = t;
6956
6956
  }
6957
6957
  return null;
@@ -7070,7 +7070,7 @@ class qn {
7070
7070
  return t || n.reverse(), n;
7071
7071
  }
7072
7072
  isDirty() {
7073
- const e = te()._dirtyLeaves;
7073
+ const e = re()._dirtyLeaves;
7074
7074
  return e !== null && e.has(this.__key);
7075
7075
  }
7076
7076
  getLatest() {
@@ -7079,7 +7079,7 @@ class qn {
7079
7079
  }
7080
7080
  getWritable() {
7081
7081
  De();
7082
- const e = it(), t = te(), n = e._nodeMap, s = this.__key, o = this.getLatest(), i = t._cloneNotNeeded, u = j();
7082
+ const e = it(), t = re(), n = e._nodeMap, s = this.__key, o = this.getLatest(), i = t._cloneNotNeeded, u = j();
7083
7083
  if (u !== null && u.setCachedNodes(null), i.has(s)) return xn(o), o;
7084
7084
  const l = hi(o);
7085
7085
  return i.add(s), xn(l), n.set(s, l), l;
@@ -7121,7 +7121,7 @@ class qn {
7121
7121
  if (Is(s, !1, !0), c === null ? l.__first = i : c.getWritable().__next = i, u.__prev = d, f === null ? l.__last = i : f.getWritable().__prev = i, u.__next = h, u.__parent = p, l.__size = a, t && (E(this) && E(u) || N(139), this.getChildren().forEach((g) => {
7122
7122
  u.append(g);
7123
7123
  })), B(n)) {
7124
- Ge(n);
7124
+ He(n);
7125
7125
  const g = n.anchor, _ = n.focus;
7126
7126
  g.key === o && uo(g, u), _.key === o && uo(_, u);
7127
7127
  }
@@ -7250,7 +7250,7 @@ function yc(r) {
7250
7250
  return { node: Ft() };
7251
7251
  }
7252
7252
  function Ft() {
7253
- return Xe(new Mr());
7253
+ return Ye(new Mr());
7254
7254
  }
7255
7255
  function St(r) {
7256
7256
  return r instanceof Mr;
@@ -7614,7 +7614,7 @@ function ct(r) {
7614
7614
  return e === void 0 ? { node: null } : { forChild: gi(r.style, e), node: null };
7615
7615
  }
7616
7616
  function ce(r = "") {
7617
- return Xe(new tr(r));
7617
+ return Ye(new tr(r));
7618
7618
  }
7619
7619
  function L(r) {
7620
7620
  return r instanceof tr;
@@ -7663,7 +7663,7 @@ class $r extends tr {
7663
7663
  }
7664
7664
  }
7665
7665
  function qr() {
7666
- return Xe(new $r());
7666
+ return Ye(new $r());
7667
7667
  }
7668
7668
  function wc(r) {
7669
7669
  return r instanceof $r;
@@ -7697,7 +7697,7 @@ class Cc {
7697
7697
  this.key = e, this.offset = t, this.type = n, Ur() || (ht() === o && he(e), s !== null && (s.setCachedNodes(null), s.dirty = !0));
7698
7698
  }
7699
7699
  }
7700
- function Qe(r, e, t) {
7700
+ function Je(r, e, t) {
7701
7701
  return new Cc(r, e, t);
7702
7702
  }
7703
7703
  function ys(r, e) {
@@ -7736,7 +7736,7 @@ class zn {
7736
7736
  this._cachedNodes = e;
7737
7737
  }
7738
7738
  is(e) {
7739
- if (!Ve(e)) return !1;
7739
+ if (!We(e)) return !1;
7740
7740
  const t = this._nodes, n = e._nodes;
7741
7741
  return t.size === n.size && Array.from(t).every((s) => n.has(s));
7742
7742
  }
@@ -7855,14 +7855,14 @@ class xt {
7855
7855
  return a;
7856
7856
  }
7857
7857
  applyDOMRange(e) {
7858
- const t = te(), n = t.getEditorState()._selection, s = Ku(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, n);
7858
+ const t = re(), n = t.getEditorState()._selection, s = Ku(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, n);
7859
7859
  if (s === null) return;
7860
7860
  const [o, i] = s;
7861
7861
  ft(this.anchor, o.key, o.offset, o.type), ft(this.focus, i.key, i.offset, i.type), this._cachedNodes = null;
7862
7862
  }
7863
7863
  clone() {
7864
7864
  const e = this.anchor, t = this.focus;
7865
- return new xt(Qe(e.key, e.offset, e.type), Qe(t.key, t.offset, t.type), this.format, this.style);
7865
+ return new xt(Je(e.key, e.offset, e.type), Je(t.key, t.offset, t.type), this.format, this.style);
7866
7866
  }
7867
7867
  toggleFormat(e) {
7868
7868
  this.format = _n(this.format, e, null), this.dirty = !0;
@@ -8093,7 +8093,7 @@ class xt {
8093
8093
  insertParagraph() {
8094
8094
  if (this.anchor.key === "root") {
8095
8095
  const i = le();
8096
- return re().splice(this.anchor.offset, 0, [i]), i.select(), i;
8096
+ return ne().splice(this.anchor.offset, 0, [i]), i.select(), i;
8097
8097
  }
8098
8098
  const e = _s(this), t = dr(this.anchor.getNode(), dt);
8099
8099
  E(t) || N(213);
@@ -8135,7 +8135,7 @@ class xt {
8135
8135
  if (Y(u) && !u.isIsolated()) {
8136
8136
  if (i && u.isKeyboardSelectable()) {
8137
8137
  const h = ho();
8138
- return h.add(u.__key), void Ge(h);
8138
+ return h.add(u.__key), void He(h);
8139
8139
  }
8140
8140
  const d = t ? u.getPreviousSibling() : u.getNextSibling();
8141
8141
  if (L(d)) {
@@ -8148,7 +8148,7 @@ class xt {
8148
8148
  return E(d) ? (g = d.__key, p = t ? d.getChildrenSize() : 0) : (p = u.getIndexWithinParent(), g = h.__key, t || p++), s.set(g, p, "element"), void (i && o.set(g, p, "element"));
8149
8149
  }
8150
8150
  }
8151
- const l = te(), a = Fe(l._window);
8151
+ const l = re(), a = Fe(l._window);
8152
8152
  if (!a) return;
8153
8153
  const c = l._blockCursorElement, f = l._rootElement;
8154
8154
  if (f === null || c === null || !E(u) || u.isInline() || u.canBeEmpty() || fi(c, l, f), function(d, h, p, g) {
@@ -8194,9 +8194,9 @@ class xt {
8194
8194
  if (i.isKeyboardSelectable() && E(s) && s.getChildrenSize() === 0) {
8195
8195
  s.remove();
8196
8196
  const u = ho();
8197
- u.add(i.__key), Ge(u);
8197
+ u.add(i.__key), He(u);
8198
8198
  } else
8199
- i.remove(), te().dispatchCommand(Hs, void 0);
8199
+ i.remove(), re().dispatchCommand(Hs, void 0);
8200
8200
  return;
8201
8201
  }
8202
8202
  if (!e && E(i) && E(s) && s.isEmpty()) return s.remove(), void i.selectStart();
@@ -8251,7 +8251,7 @@ class xt {
8251
8251
  return [this.anchor, this.focus];
8252
8252
  }
8253
8253
  }
8254
- function Ve(r) {
8254
+ function We(r) {
8255
8255
  return r instanceof zn;
8256
8256
  }
8257
8257
  function lo(r) {
@@ -8311,10 +8311,10 @@ function co(r, e, t, n) {
8311
8311
  const h = d.getIndexWithinParent();
8312
8312
  o = e === 0 && Y(d) && Vt(r) === d ? h : h + 1, d = d.getParentOrThrow();
8313
8313
  }
8314
- if (E(d)) return Qe(d.__key, o, "element");
8314
+ if (E(d)) return Je(d.__key, o, "element");
8315
8315
  }
8316
8316
  } else s = Vt(r);
8317
- return L(s) ? Qe(s.__key, o, "text") : null;
8317
+ return L(s) ? Je(s.__key, o, "text") : null;
8318
8318
  }
8319
8319
  function fo(r, e, t) {
8320
8320
  const n = r.offset, s = r.getNode();
@@ -8339,7 +8339,7 @@ function Vu(r, e, t) {
8339
8339
  if (r.type === "text" && e.type === "text") {
8340
8340
  const n = r.isBefore(e), s = r.is(e);
8341
8341
  fo(r, n, s), fo(e, !n, s), s && (e.key = r.key, e.offset = r.offset, e.type = r.type);
8342
- const o = te();
8342
+ const o = re();
8343
8343
  if (o.isComposing() && o._compositionKey !== r.key && B(t)) {
8344
8344
  const i = t.anchor, u = t.focus;
8345
8345
  ft(r, i.key, i.offset, i.type), ft(e, u.key, u.offset, u.type);
@@ -8362,11 +8362,11 @@ function $s(r) {
8362
8362
  return E(r) && !r.isInline();
8363
8363
  }
8364
8364
  function Hu(r, e, t, n, s, o) {
8365
- const i = it(), u = new xt(Qe(r, e, s), Qe(t, n, o), 0, "");
8365
+ const i = it(), u = new xt(Je(r, e, s), Je(t, n, o), 0, "");
8366
8366
  return u.dirty = !0, i._selection = u, u;
8367
8367
  }
8368
8368
  function Ac() {
8369
- const r = Qe("root", 0, "element"), e = Qe("root", 0, "element");
8369
+ const r = Je("root", 0, "element"), e = Je("root", 0, "element");
8370
8370
  return new xt(r, e, 0, "");
8371
8371
  }
8372
8372
  function ho() {
@@ -8389,7 +8389,7 @@ function j() {
8389
8389
  return it()._selection;
8390
8390
  }
8391
8391
  function zr() {
8392
- return te()._editorState._selection;
8392
+ return re()._editorState._selection;
8393
8393
  }
8394
8394
  function En(r, e, t, n = 1) {
8395
8395
  const s = r.anchor, o = r.focus, i = s.getNode(), u = o.getNode();
@@ -8467,34 +8467,34 @@ function Ec(r, e, t, n, s, o, i) {
8467
8467
  if (!s.has("skip-scroll-into-view") && e.isCollapsed() && o !== null && o === document.activeElement) {
8468
8468
  const W = e instanceof xt && e.anchor.type === "element" ? k.childNodes[y] || null : n.rangeCount > 0 ? n.getRangeAt(0) : null;
8469
8469
  if (W !== null) {
8470
- let ne;
8470
+ let ee;
8471
8471
  if (W instanceof Text) {
8472
8472
  const Se = document.createRange();
8473
- Se.selectNode(W), ne = Se.getBoundingClientRect();
8474
- } else ne = W.getBoundingClientRect();
8473
+ Se.selectNode(W), ee = Se.getBoundingClientRect();
8474
+ } else ee = W.getBoundingClientRect();
8475
8475
  (function(Se, Me, vt) {
8476
8476
  const ut = vt.ownerDocument, ae = ut.defaultView;
8477
8477
  if (ae === null) return;
8478
- let { top: $e, bottom: qe } = Me, lt = 0, at = 0, ve = vt;
8478
+ let { top: Xe, bottom: $e } = Me, lt = 0, at = 0, ve = vt;
8479
8479
  for (; ve !== null; ) {
8480
8480
  const Ze = ve === ut.body;
8481
8481
  if (Ze) lt = 0, at = Mn(Se).innerHeight;
8482
8482
  else {
8483
- const ze = ve.getBoundingClientRect();
8484
- lt = ze.top, at = ze.bottom;
8483
+ const qe = ve.getBoundingClientRect();
8484
+ lt = qe.top, at = qe.bottom;
8485
8485
  }
8486
8486
  let Te = 0;
8487
- if ($e < lt ? Te = -(lt - $e) : qe > at && (Te = qe - at), Te !== 0) if (Ze) ae.scrollBy(0, Te);
8487
+ if (Xe < lt ? Te = -(lt - Xe) : $e > at && (Te = $e - at), Te !== 0) if (Ze) ae.scrollBy(0, Te);
8488
8488
  else {
8489
- const ze = ve.scrollTop;
8489
+ const qe = ve.scrollTop;
8490
8490
  ve.scrollTop += Te;
8491
- const et = ve.scrollTop - ze;
8492
- $e -= et, qe -= et;
8491
+ const et = ve.scrollTop - qe;
8492
+ Xe -= et, $e -= et;
8493
8493
  }
8494
8494
  if (Ze) break;
8495
8495
  ve = Ir(ve);
8496
8496
  }
8497
- })(t, ne, o);
8497
+ })(t, ee, o);
8498
8498
  }
8499
8499
  }
8500
8500
  Rs = !0;
@@ -8502,7 +8502,7 @@ function Ec(r, e, t, n, s, o, i) {
8502
8502
  }
8503
8503
  function kc(r) {
8504
8504
  let e = j() || zr();
8505
- e === null && (e = re().selectEnd()), e.insertNodes(r);
8505
+ e === null && (e = ne().selectEnd()), e.insertNodes(r);
8506
8506
  }
8507
8507
  function _s(r) {
8508
8508
  let e = r;
@@ -8518,7 +8518,7 @@ function Sc(r, e) {
8518
8518
  const t = r.getParent();
8519
8519
  if (!t) {
8520
8520
  const s = le();
8521
- return re().append(s), s.select(), [re(), 0];
8521
+ return ne().append(s), s.select(), [ne(), 0];
8522
8522
  }
8523
8523
  if (L(r)) {
8524
8524
  const s = r.splitText(e);
@@ -8529,7 +8529,7 @@ function Sc(r, e) {
8529
8529
  if (!E(r) || e === 0) return [t, r.getIndexWithinParent()];
8530
8530
  const n = r.getChildAtIndex(e);
8531
8531
  if (n) {
8532
- const s = new xt(Qe(r.__key, e, "element"), Qe(r.__key, e, "element"), 0, ""), o = r.insertNewAfter(s);
8532
+ const s = new xt(Je(r.__key, e, "element"), Je(r.__key, e, "element"), 0, ""), o = r.insertNewAfter(s);
8533
8533
  o && o.append(n, ...n.getNextSiblings());
8534
8534
  }
8535
8535
  return [t, r.getIndexWithinParent() + 1];
@@ -8548,7 +8548,7 @@ function Gu() {
8548
8548
  function it() {
8549
8549
  return de === null && N(195, Ju()), de;
8550
8550
  }
8551
- function te() {
8551
+ function re() {
8552
8552
  return fe === null && N(196, Ju()), fe;
8553
8553
  }
8554
8554
  function Ju() {
@@ -8589,7 +8589,7 @@ function Qu(r, e) {
8589
8589
  for (const s of n) t.add(s);
8590
8590
  }
8591
8591
  function Bc(r) {
8592
- return yi(r, te()._nodes);
8592
+ return yi(r, re()._nodes);
8593
8593
  }
8594
8594
  function yi(r, e) {
8595
8595
  const t = r.type, n = e.get(t);
@@ -8654,8 +8654,8 @@ function pt(r, e) {
8654
8654
  p !== null && function(b, k, A, S, P) {
8655
8655
  const F = Array.from(b._listeners.mutation), U = F.length;
8656
8656
  for (let $ = 0; $ < U; $++) {
8657
- const [I, W] = F[$], ne = k.get(W);
8658
- ne !== void 0 && I(ne, { dirtyLeaves: S, prevEditorState: P, updateTags: A });
8657
+ const [I, W] = F[$], ee = k.get(W);
8658
+ ee !== void 0 && I(ee, { dirtyLeaves: S, prevEditorState: P, updateTags: A });
8659
8659
  }
8660
8660
  }(r, p, y, g, o), B(u) || u === null || i !== null && i.is(u) || r.dispatchCommand(Hs, void 0);
8661
8661
  const C = r._pendingDecorators;
@@ -8805,7 +8805,7 @@ function Xu(r, e, t) {
8805
8805
  if (B(_)) {
8806
8806
  const D = l._nodeMap, y = _.anchor.key, w = _.focus.key;
8807
8807
  D.get(y) !== void 0 && D.get(w) !== void 0 || N(19);
8808
- } else Ve(_) && _._nodes.size === 0 && (l._selection = null);
8808
+ } else We(_) && _._nodes.size === 0 && (l._selection = null);
8809
8809
  } catch (g) {
8810
8810
  return g instanceof Error && r._onError(g), r._pendingEditorState = u, r._dirtyType = Yt, r._cloneNotNeeded.clear(), r._dirtyLeaves = /* @__PURE__ */ new Set(), r._dirtyElements.clear(), void pt(r);
8811
8811
  } finally {
@@ -8954,7 +8954,7 @@ class ot extends qn {
8954
8954
  return this.getChildrenSize() === 0;
8955
8955
  }
8956
8956
  isDirty() {
8957
- const e = te()._dirtyElements;
8957
+ const e = re()._dirtyElements;
8958
8958
  return e !== null && e.has(this.__key);
8959
8959
  }
8960
8960
  isLastChild() {
@@ -9151,7 +9151,7 @@ class ot extends qn {
9151
9151
  const p = j();
9152
9152
  if (B(p)) {
9153
9153
  const g = new Set(a), _ = new Set(l), { anchor: D, focus: y } = p;
9154
- Do(D, g, _) && kn(D, D.getNode(), this, f, c), Do(y, g, _) && kn(y, y.getNode(), this, f, c), d !== 0 || this.canBeEmpty() || Je(this) || this.remove();
9154
+ Do(D, g, _) && kn(D, D.getNode(), this, f, c), Do(y, g, _) && kn(y, y.getNode(), this, f, c), d !== 0 || this.canBeEmpty() || Ge(this) || this.remove();
9155
9155
  }
9156
9156
  }
9157
9157
  return i;
@@ -9268,7 +9268,7 @@ class Wr extends ot {
9268
9268
  }
9269
9269
  getTextContent() {
9270
9270
  const e = this.__cachedText;
9271
- return !Ur() && te()._dirtyType !== Tt || e === null ? super.getTextContent() : e;
9271
+ return !Ur() && re()._dirtyType !== Tt || e === null ? super.getTextContent() : e;
9272
9272
  }
9273
9273
  remove() {
9274
9274
  N(52);
@@ -9293,7 +9293,7 @@ class Wr extends ot {
9293
9293
  return super.append(...e);
9294
9294
  }
9295
9295
  static importJSON(e) {
9296
- const t = re();
9296
+ const t = ne();
9297
9297
  return t.setFormat(e.format), t.setIndent(e.indent), t.setDirection(e.direction), t;
9298
9298
  }
9299
9299
  exportJSON() {
@@ -9340,7 +9340,7 @@ class Un {
9340
9340
  return t._readOnly = !0, t;
9341
9341
  }
9342
9342
  toJSON() {
9343
- return xo(null, this, () => ({ root: el(re()) }));
9343
+ return xo(null, this, () => ({ root: el(ne()) }));
9344
9344
  }
9345
9345
  }
9346
9346
  class xi extends ot {
@@ -9433,7 +9433,7 @@ function Fc(r) {
9433
9433
  return r.style && (e.setFormat(r.style.textAlign), pi(r, e)), { node: e };
9434
9434
  }
9435
9435
  function le() {
9436
- return Xe(new rr());
9436
+ return Ye(new rr());
9437
9437
  }
9438
9438
  function Zt(r) {
9439
9439
  return r instanceof rr;
@@ -9563,7 +9563,7 @@ class Wn {
9563
9563
  return i = this, u = e.getType(), Ee(i, () => {
9564
9564
  const l = it();
9565
9565
  if (l.isEmpty()) return;
9566
- if (u === "root") return void re().markDirty();
9566
+ if (u === "root") return void ne().markDirty();
9567
9567
  const a = l._nodeMap;
9568
9568
  for (const [, c] of a) c.markDirty();
9569
9569
  }, i._pendingEditorState === null ? { tag: "history-merge" } : void 0), () => {
@@ -9675,7 +9675,7 @@ class Wn {
9675
9675
  focus(e, t = {}) {
9676
9676
  const n = this._rootElement;
9677
9677
  n !== null && (n.setAttribute("autocapitalize", "off"), Ee(this, () => {
9678
- const s = j(), o = re();
9678
+ const s = j(), o = ne();
9679
9679
  s !== null ? s.dirty = !0 : o.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? o.selectStart() : o.selectEnd());
9680
9680
  }, { onUpdate: () => {
9681
9681
  n.removeAttribute("autocapitalize"), e && e();
@@ -9705,7 +9705,7 @@ function Rc({ initialConfig: r, children: e }) {
9705
9705
  return function(f, d) {
9706
9706
  if (d !== null) {
9707
9707
  if (d === void 0) f.update(() => {
9708
- const h = re();
9708
+ const h = ne();
9709
9709
  if (h.isEmpty()) {
9710
9710
  const p = le();
9711
9711
  h.append(p);
@@ -9724,7 +9724,7 @@ function Rc({ initialConfig: r, children: e }) {
9724
9724
  break;
9725
9725
  case "function":
9726
9726
  f.update(() => {
9727
- re().isEmpty() && d(f);
9727
+ ne().isEmpty() && d(f);
9728
9728
  }, nn);
9729
9729
  }
9730
9730
  }
@@ -9741,7 +9741,7 @@ function Ic(r) {
9741
9741
  }
9742
9742
  function Mc() {
9743
9743
  return function(r) {
9744
- const [e] = Ye(), t = Pt(() => r(e), [e, r]), [n, s] = Q(() => t.initialValueFn()), o = bs(n);
9744
+ const [e] = Qe(), t = Pt(() => r(e), [e, r]), [n, s] = Q(() => t.initialValueFn()), o = bs(n);
9745
9745
  return jc(() => {
9746
9746
  const { initialValueFn: i, subscribe: u } = t, l = i();
9747
9747
  return o.current !== l && (o.current = l, s(l)), u((a) => {
@@ -9751,7 +9751,7 @@ function Mc() {
9751
9751
  }(Ic);
9752
9752
  }
9753
9753
  function $c() {
9754
- return re().getTextContent();
9754
+ return ne().getTextContent();
9755
9755
  }
9756
9756
  function qc(r, e = !0) {
9757
9757
  if (r) return !1;
@@ -9760,7 +9760,7 @@ function qc(r, e = !0) {
9760
9760
  }
9761
9761
  function zc(r) {
9762
9762
  if (!qc(r, !1)) return !1;
9763
- const e = re().getChildren(), t = e.length;
9763
+ const e = ne().getChildren(), t = e.length;
9764
9764
  if (t > 1) return !1;
9765
9765
  for (let n = 0; n < t; n++) {
9766
9766
  const s = e[n];
@@ -9828,7 +9828,7 @@ function Jc(r, e) {
9828
9828
  if (r === null) return;
9829
9829
  const t = r.getStartEndPoints(), n = t ? t[0] : null;
9830
9830
  if (n !== null && n.key === "root") {
9831
- const i = e(), u = re(), l = u.getFirstChild();
9831
+ const i = e(), u = ne(), l = u.getFirstChild();
9832
9832
  return void (l ? l.replace(i, !0) : u.append(i));
9833
9833
  }
9834
9834
  const s = r.getNodes(), o = n !== null && function(i, u) {
@@ -9861,7 +9861,7 @@ function Co(r, e, t) {
9861
9861
  Qc(r, e, t ? !n : n, "character");
9862
9862
  }
9863
9863
  function Ao(r) {
9864
- if (Y(r) || !E(r) || Je(r)) return !1;
9864
+ if (Y(r) || !E(r) || Ge(r)) return !1;
9865
9865
  const e = r.getFirstChild(), t = e === null || St(e) || L(e) || e.isInline();
9866
9866
  return !r.isInline() && r.canBeEmpty() !== !1 && t;
9867
9867
  }
@@ -9909,7 +9909,7 @@ function rd(r) {
9909
9909
  }
9910
9910
  const Vn = (r, e) => {
9911
9911
  let t = r;
9912
- for (; t !== re() && t != null; ) {
9912
+ for (; t !== ne() && t != null; ) {
9913
9913
  if (e(t)) return t;
9914
9914
  t = t.getParent();
9915
9915
  }
@@ -9981,7 +9981,7 @@ function ll(r, e) {
9981
9981
  }
9982
9982
  function al(r, e) {
9983
9983
  if (typeof document > "u" || typeof window > "u" && global.window === void 0) throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");
9984
- const t = document.createElement("div"), n = re().getChildren();
9984
+ const t = document.createElement("div"), n = ne().getChildren();
9985
9985
  for (let s = 0; s < n.length; s++)
9986
9986
  cl(r, n[s], t, e);
9987
9987
  return t.innerHTML;
@@ -10038,7 +10038,7 @@ function fl(r, e, t, n, s = /* @__PURE__ */ new Map(), o) {
10038
10038
  }
10039
10039
  const f = r.childNodes;
10040
10040
  let d = [];
10041
- const h = (u == null || !Je(u)) && (u != null && $s(u) || n);
10041
+ const h = (u == null || !Ge(u)) && (u != null && $s(u) || n);
10042
10042
  for (let p = 0; p < f.length; p++) d.push(...fl(f[p], e, t, h, new Map(s), u));
10043
10043
  return c != null && (d = c(d)), bn(r) && (d = sd(r, d, h ? () => {
10044
10044
  const p = new xi();
@@ -10141,7 +10141,7 @@ function hl(r, e, t, n = []) {
10141
10141
  return s;
10142
10142
  }
10143
10143
  function ld(r, e) {
10144
- const t = [], n = re().getChildren();
10144
+ const t = [], n = ne().getChildren();
10145
10145
  for (let s = 0; s < n.length; s++)
10146
10146
  hl(r, e, n[s], t);
10147
10147
  return { namespace: r._config.namespace, nodes: t };
@@ -10269,7 +10269,7 @@ class Kn extends ot {
10269
10269
  }
10270
10270
  }
10271
10271
  function vi() {
10272
- return Xe(new Kn());
10272
+ return Ye(new Kn());
10273
10273
  }
10274
10274
  class Hn extends ot {
10275
10275
  static getType() {
@@ -10348,7 +10348,7 @@ function _d(r) {
10348
10348
  return r.style !== null && (e.setFormat(r.style.textAlign), pi(r, e)), { node: e };
10349
10349
  }
10350
10350
  function yr(r) {
10351
- return Xe(new Hn(r));
10351
+ return Ye(new Hn(r));
10352
10352
  }
10353
10353
  function sn(r) {
10354
10354
  let e = null;
@@ -10377,7 +10377,7 @@ function on(r) {
10377
10377
  function xd(r) {
10378
10378
  return Ot(r.registerCommand(tu, (e) => {
10379
10379
  const t = j();
10380
- return !!Ve(t) && (t.clear(), !0);
10380
+ return !!We(t) && (t.clear(), !0);
10381
10381
  }, 0), r.registerCommand(Et, (e) => {
10382
10382
  const t = j();
10383
10383
  return !!B(t) && (t.deleteCharacter(e), !0);
@@ -10408,7 +10408,7 @@ function xd(r) {
10408
10408
  return !!B(t) && (t.formatText(e), !0);
10409
10409
  }, G), r.registerCommand(ka, (e) => {
10410
10410
  const t = j();
10411
- if (!B(t) && !Ve(t)) return !1;
10411
+ if (!B(t) && !We(t)) return !1;
10412
10412
  const n = t.getNodes();
10413
10413
  for (const s of n) {
10414
10414
  const o = Vn(s, (i) => E(i) && !i.isInline());
@@ -10429,7 +10429,7 @@ function xd(r) {
10429
10429
  t > 0 && e.setIndent(t - 1);
10430
10430
  }), G), r.registerCommand(su, (e) => {
10431
10431
  const t = j();
10432
- if (Ve(t) && !on(e.target)) {
10432
+ if (We(t) && !on(e.target)) {
10433
10433
  const n = t.getNodes();
10434
10434
  if (n.length > 0) return n[0].selectPrevious(), !0;
10435
10435
  } else if (B(t)) {
@@ -10439,13 +10439,13 @@ function xd(r) {
10439
10439
  return !1;
10440
10440
  }, G), r.registerCommand(iu, (e) => {
10441
10441
  const t = j();
10442
- if (Ve(t)) {
10442
+ if (We(t)) {
10443
10443
  const n = t.getNodes();
10444
10444
  if (n.length > 0) return n[0].selectNext(0, 0), !0;
10445
10445
  } else if (B(t)) {
10446
10446
  if (function(s) {
10447
10447
  const o = s.focus;
10448
- return o.key === "root" && o.offset === re().getChildrenSize();
10448
+ return o.key === "root" && o.offset === ne().getChildrenSize();
10449
10449
  }(t)) return e.preventDefault(), !0;
10450
10450
  const n = Br(t.focus, !1);
10451
10451
  if (!e.shiftKey && Y(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
@@ -10453,7 +10453,7 @@ function xd(r) {
10453
10453
  return !1;
10454
10454
  }, G), r.registerCommand(nu, (e) => {
10455
10455
  const t = j();
10456
- if (Ve(t)) {
10456
+ if (We(t)) {
10457
10457
  const n = t.getNodes();
10458
10458
  if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
10459
10459
  }
@@ -10465,7 +10465,7 @@ function xd(r) {
10465
10465
  return !1;
10466
10466
  }, G), r.registerCommand(ru, (e) => {
10467
10467
  const t = j();
10468
- if (Ve(t) && !on(e.target)) {
10468
+ if (We(t) && !on(e.target)) {
10469
10469
  const s = t.getNodes();
10470
10470
  if (s.length > 0) return e.preventDefault(), s[0].selectNext(0, 0), !0;
10471
10471
  }
@@ -10507,7 +10507,7 @@ function xd(r) {
10507
10507
  l.anchor.set(c, f, "element"), l.focus.set(c, f, "element");
10508
10508
  }
10509
10509
  const a = xu(l);
10510
- Ge(a);
10510
+ He(a);
10511
10511
  }
10512
10512
  r.dispatchCommand(Fo, t);
10513
10513
  }
@@ -10530,7 +10530,7 @@ function xd(r) {
10530
10530
  }, G), r.registerCommand(As, () => (ic(), !0), G), r.registerCommand(Ln, (e) => (So(r, gt(e, ClipboardEvent) ? e : null), !0), G), r.registerCommand(Qs, (e) => (async function(t, n) {
10531
10531
  await So(n, gt(t, ClipboardEvent) ? t : null), n.update(() => {
10532
10532
  const s = j();
10533
- B(s) ? s.removeText() : Ve(s) && s.getNodes().forEach((o) => o.remove());
10533
+ B(s) ? s.removeText() : We(s) && s.getNodes().forEach((o) => o.remove());
10534
10534
  });
10535
10535
  }(e, r), !0), G), r.registerCommand(Fn, (e) => {
10536
10536
  const [, t, n] = sn(e);
@@ -10547,7 +10547,7 @@ function Oo(r) {
10547
10547
  return r.getEditorState().read(nl(r.isComposing()));
10548
10548
  }
10549
10549
  function vd({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
10550
- const [n] = Ye(), s = function(o, i) {
10550
+ const [n] = Qe(), s = function(o, i) {
10551
10551
  const [u, l] = Q(() => o.getDecorators());
10552
10552
  return qs(() => o.registerDecoratorListener((a) => {
10553
10553
  ql(() => {
@@ -10569,7 +10569,7 @@ function vd({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
10569
10569
  }(n), v.jsxs(v.Fragment, { children: [r, v.jsx(bd, { content: e }), s] });
10570
10570
  }
10571
10571
  function bd({ content: r }) {
10572
- const [e] = Ye(), t = function(s) {
10572
+ const [e] = Qe(), t = function(s) {
10573
10573
  const [o, i] = Q(() => Oo(s));
10574
10574
  return qs(() => {
10575
10575
  function u() {
@@ -10606,7 +10606,7 @@ function Ro(r) {
10606
10606
  }
10607
10607
  const Cd = Qo(Ad);
10608
10608
  function Ad(r, e) {
10609
- const { placeholder: t, ...n } = r, [s] = Ye();
10609
+ const { placeholder: t, ...n } = r, [s] = Qe();
10610
10610
  return v.jsxs(v.Fragment, { children: [v.jsx(wd, { editor: s, ...n, ref: e }), t != null && v.jsx(Ed, { editor: s, content: t })] });
10611
10611
  }
10612
10612
  function Ed({ content: r, editor: e }) {
@@ -10713,7 +10713,7 @@ function Ld() {
10713
10713
  return { current: null, redoStack: [], undoStack: [] };
10714
10714
  }
10715
10715
  function Pd({ delay: r, externalHistoryState: e }) {
10716
- const [t] = Ye();
10716
+ const [t] = Qe();
10717
10717
  return function(n, s, o = 1e3) {
10718
10718
  const i = Pt(() => s || Ld(), [s]);
10719
10719
  ge(() => Fd(n, i, o), [o, n, i]);
@@ -10721,7 +10721,7 @@ function Pd({ delay: r, externalHistoryState: e }) {
10721
10721
  }
10722
10722
  const Od = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? er : ge;
10723
10723
  function Rd({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
10724
- const [n] = Ye();
10724
+ const [n] = Qe();
10725
10725
  return Od(() => {
10726
10726
  if (t) return n.registerUpdateListener(({ editorState: s, dirtyElements: o, dirtyLeaves: i, prevEditorState: u, tags: l }) => {
10727
10727
  e && o.size === 0 && i.size === 0 || r && l.has("history-merge") || u.isEmpty() || t(s, n, l);
@@ -10774,7 +10774,7 @@ function Id({ children: r, onError: e }) {
10774
10774
  function Md(r) {
10775
10775
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
10776
10776
  }
10777
- var Ke = Md(function(r) {
10777
+ var Ve = Md(function(r) {
10778
10778
  const e = new URLSearchParams();
10779
10779
  e.append("code", r);
10780
10780
  for (let t = 1; t < arguments.length; t++) e.append("v", arguments[t]);
@@ -10783,13 +10783,13 @@ var Ke = Md(function(r) {
10783
10783
  function $d(r) {
10784
10784
  let e = 1, t = r.getParent();
10785
10785
  for (; t != null; ) {
10786
- if (ee(t)) {
10786
+ if (te(t)) {
10787
10787
  const n = t.getParent();
10788
10788
  if (H(n)) {
10789
10789
  e++, t = n.getParent();
10790
10790
  continue;
10791
10791
  }
10792
- Ke(40);
10792
+ Ve(40);
10793
10793
  }
10794
10794
  return e;
10795
10795
  }
@@ -10797,28 +10797,28 @@ function $d(r) {
10797
10797
  }
10798
10798
  function Vs(r) {
10799
10799
  let e = r.getParent();
10800
- H(e) || Ke(40);
10800
+ H(e) || Ve(40);
10801
10801
  let t = e;
10802
10802
  for (; t !== null; ) t = t.getParent(), H(t) && (e = t);
10803
10803
  return e;
10804
10804
  }
10805
10805
  function gl(r) {
10806
10806
  let e = [];
10807
- const t = r.getChildren().filter(ee);
10807
+ const t = r.getChildren().filter(te);
10808
10808
  for (let n = 0; n < t.length; n++) {
10809
10809
  const s = t[n], o = s.getFirstChild();
10810
10810
  H(o) ? e = e.concat(gl(o)) : e.push(s);
10811
10811
  }
10812
10812
  return e;
10813
10813
  }
10814
- function He(r) {
10815
- return ee(r) && H(r.getFirstChild());
10814
+ function Ke(r) {
10815
+ return te(r) && H(r.getFirstChild());
10816
10816
  }
10817
10817
  function $o(r) {
10818
10818
  return ke().append(r);
10819
10819
  }
10820
10820
  function ml(r, e) {
10821
- return ee(r) && (e.length === 0 || e.length === 1 && r.is(e[0]) && r.getChildrenSize() === 0);
10821
+ return te(r) && (e.length === 0 || e.length === 1 && r.is(e[0]) && r.getChildrenSize() === 0);
10822
10822
  }
10823
10823
  function qo(r, e) {
10824
10824
  r.update(() => {
@@ -10827,15 +10827,15 @@ function qo(r, e) {
10827
10827
  const n = t.getNodes();
10828
10828
  if (B(t)) {
10829
10829
  const o = t.getStartEndPoints();
10830
- o === null && Ke(143);
10830
+ o === null && Ve(143);
10831
10831
  const [i] = o, u = i.getNode(), l = u.getParent();
10832
10832
  if (ml(u, n)) {
10833
10833
  const a = Ce(e);
10834
- if (Je(l)) {
10834
+ if (Ge(l)) {
10835
10835
  u.replace(a);
10836
10836
  const c = ke();
10837
10837
  E(u) && (c.setFormat(u.getFormatType()), c.setIndent(u.getIndent())), a.append(c);
10838
- } else if (ee(u)) {
10838
+ } else if (te(u)) {
10839
10839
  const c = u.getParentOrThrow();
10840
10840
  Lt(a, c.getChildren()), c.replace(a);
10841
10841
  }
@@ -10845,7 +10845,7 @@ function qo(r, e) {
10845
10845
  const s = /* @__PURE__ */ new Set();
10846
10846
  for (let o = 0; o < n.length; o++) {
10847
10847
  const i = n[o];
10848
- if (!E(i) || !i.isEmpty() || ee(i) || s.has(i.getKey())) {
10848
+ if (!E(i) || !i.isEmpty() || te(i) || s.has(i.getKey())) {
10849
10849
  if (bu(i)) {
10850
10850
  let u = i.getParent();
10851
10851
  for (; u != null; ) {
@@ -10859,7 +10859,7 @@ function qo(r, e) {
10859
10859
  }
10860
10860
  {
10861
10861
  const a = u.getParent();
10862
- if (Je(a) && !s.has(l)) {
10862
+ if (Ge(a) && !s.has(l)) {
10863
10863
  s.add(l), zo(u, e);
10864
10864
  break;
10865
10865
  }
@@ -10889,7 +10889,7 @@ function zo(r, e) {
10889
10889
  }
10890
10890
  function bi(r, e) {
10891
10891
  const t = r.getLastChild(), n = e.getFirstChild();
10892
- t && n && He(t) && He(n) && (bi(t.getFirstChild(), n.getFirstChild()), n.remove());
10892
+ t && n && Ke(t) && Ke(n) && (bi(t.getFirstChild(), n.getFirstChild()), n.remove());
10893
10893
  const s = e.getChildren();
10894
10894
  s.length > 0 && r.append(...s), e.remove();
10895
10895
  }
@@ -10920,22 +10920,22 @@ function qd(r) {
10920
10920
  }
10921
10921
  function zd(r) {
10922
10922
  const e = /* @__PURE__ */ new Set();
10923
- if (He(r) || e.has(r.getKey())) return;
10923
+ if (Ke(r) || e.has(r.getKey())) return;
10924
10924
  const t = r.getParent(), n = r.getNextSibling(), s = r.getPreviousSibling();
10925
- if (He(n) && He(s)) {
10925
+ if (Ke(n) && Ke(s)) {
10926
10926
  const o = s.getFirstChild();
10927
10927
  if (H(o)) {
10928
10928
  o.append(r);
10929
10929
  const i = n.getFirstChild();
10930
10930
  H(i) && (Lt(o, i.getChildren()), n.remove(), e.add(n.getKey()));
10931
10931
  }
10932
- } else if (He(n)) {
10932
+ } else if (Ke(n)) {
10933
10933
  const o = n.getFirstChild();
10934
10934
  if (H(o)) {
10935
10935
  const i = o.getFirstChild();
10936
10936
  i !== null && i.insertBefore(r);
10937
10937
  }
10938
- } else if (He(s)) {
10938
+ } else if (Ke(s)) {
10939
10939
  const o = s.getFirstChild();
10940
10940
  H(o) && o.append(r);
10941
10941
  } else if (H(t)) {
@@ -10944,9 +10944,9 @@ function zd(r) {
10944
10944
  }
10945
10945
  }
10946
10946
  function Ud(r) {
10947
- if (He(r)) return;
10947
+ if (Ke(r)) return;
10948
10948
  const e = r.getParent(), t = e ? e.getParent() : void 0;
10949
- if (H(t ? t.getParent() : void 0) && ee(t) && H(e)) {
10949
+ if (H(t ? t.getParent() : void 0) && te(t) && H(e)) {
10950
10950
  const n = e ? e.getFirstChild() : void 0, s = e ? e.getLastChild() : void 0;
10951
10951
  if (r.is(n)) t.insertBefore(r), e.isEmpty() && t.remove();
10952
10952
  else if (r.is(s)) t.insertAfter(r), e.isEmpty() && t.remove();
@@ -10962,14 +10962,14 @@ function Wd() {
10962
10962
  const r = j();
10963
10963
  if (!B(r) || !r.isCollapsed()) return !1;
10964
10964
  const e = r.anchor.getNode();
10965
- if (!ee(e) || e.getChildrenSize() !== 0) return !1;
10965
+ if (!te(e) || e.getChildrenSize() !== 0) return !1;
10966
10966
  const t = Vs(e), n = e.getParent();
10967
- H(n) || Ke(40);
10967
+ H(n) || Ve(40);
10968
10968
  const s = n.getParent();
10969
10969
  let o;
10970
- if (Je(s)) o = le(), t.insertAfter(o);
10970
+ if (Ge(s)) o = le(), t.insertAfter(o);
10971
10971
  else {
10972
- if (!ee(s)) return !1;
10972
+ if (!te(s)) return !1;
10973
10973
  o = ke(), s.insertAfter(o);
10974
10974
  }
10975
10975
  o.select();
@@ -10989,7 +10989,7 @@ function Wd() {
10989
10989
  let l = u;
10990
10990
  for (; l.getNextSibling() == null && l.getPreviousSibling() == null; ) {
10991
10991
  const a = l.getParent();
10992
- if (a == null || !ee(l) && !H(l)) break;
10992
+ if (a == null || !te(l) && !H(l)) break;
10993
10993
  l = a;
10994
10994
  }
10995
10995
  l.remove();
@@ -11020,7 +11020,7 @@ class Rt extends ot {
11020
11020
  }
11021
11021
  static transform() {
11022
11022
  return (e) => {
11023
- if (ee(e) || Ke(144), e.__checked == null) return;
11023
+ if (te(e) || Ve(144), e.__checked == null) return;
11024
11024
  const t = e.getParent();
11025
11025
  H(t) && t.getListType() !== "check" && e.getChecked() != null && e.setChecked(void 0);
11026
11026
  };
@@ -11050,7 +11050,7 @@ class Rt extends ot {
11050
11050
  return this;
11051
11051
  }
11052
11052
  replace(e, t) {
11053
- if (ee(e)) return super.replace(e);
11053
+ if (te(e)) return super.replace(e);
11054
11054
  this.setIndent(0);
11055
11055
  const n = this.getParentOrThrow();
11056
11056
  if (!H(n)) return e;
@@ -11065,13 +11065,13 @@ class Rt extends ot {
11065
11065
  }
11066
11066
  n.insertAfter(e), e.insertAfter(s);
11067
11067
  }
11068
- return t && (E(e) || Ke(139), this.getChildren().forEach((s) => {
11068
+ return t && (E(e) || Ve(139), this.getChildren().forEach((s) => {
11069
11069
  e.append(s);
11070
11070
  })), this.remove(), n.getChildrenSize() === 0 && n.remove(), e;
11071
11071
  }
11072
11072
  insertAfter(e, t = !0) {
11073
11073
  const n = this.getParentOrThrow();
11074
- if (H(n) || Ke(39), ee(e)) return super.insertAfter(e, t);
11074
+ if (H(n) || Ve(39), te(e)) return super.insertAfter(e, t);
11075
11075
  const s = this.getNextSiblings();
11076
11076
  if (n.insertAfter(e, t), s.length !== 0) {
11077
11077
  const o = Ce(n.getListType());
@@ -11081,7 +11081,7 @@ class Rt extends ot {
11081
11081
  }
11082
11082
  remove(e) {
11083
11083
  const t = this.getPreviousSibling(), n = this.getNextSibling();
11084
- super.remove(e), t && n && He(t) && He(n) && (bi(t.getFirstChild(), n.getFirstChild()), n.remove());
11084
+ super.remove(e), t && n && Ke(t) && Ke(n) && (bi(t.getFirstChild(), n.getFirstChild()), n.remove());
11085
11085
  }
11086
11086
  insertNewAfter(e, t = !0) {
11087
11087
  const n = ke(this.__checked == null && void 0);
@@ -11090,7 +11090,7 @@ class Rt extends ot {
11090
11090
  collapseAtStart(e) {
11091
11091
  const t = le();
11092
11092
  this.getChildren().forEach((i) => t.append(i));
11093
- const n = this.getParentOrThrow(), s = n.getParentOrThrow(), o = ee(s);
11093
+ const n = this.getParentOrThrow(), s = n.getParentOrThrow(), o = te(s);
11094
11094
  if (n.getChildrenSize() === 1) if (o) n.remove(), s.select();
11095
11095
  else {
11096
11096
  n.insertBefore(t), n.remove();
@@ -11122,23 +11122,23 @@ class Rt extends ot {
11122
11122
  const e = this.getParent();
11123
11123
  if (e === null) return this.getLatest().__indent;
11124
11124
  let t = e.getParentOrThrow(), n = 0;
11125
- for (; ee(t); ) t = t.getParentOrThrow().getParentOrThrow(), n++;
11125
+ for (; te(t); ) t = t.getParentOrThrow().getParentOrThrow(), n++;
11126
11126
  return n;
11127
11127
  }
11128
11128
  setIndent(e) {
11129
- typeof e != "number" && Ke(117), (e = Math.floor(e)) >= 0 || Ke(199);
11129
+ typeof e != "number" && Ve(117), (e = Math.floor(e)) >= 0 || Ve(199);
11130
11130
  let t = this.getIndent();
11131
11131
  for (; t !== e; ) t < e ? (zd(this), t++) : (Ud(this), t--);
11132
11132
  return this;
11133
11133
  }
11134
11134
  canInsertAfter(e) {
11135
- return ee(e);
11135
+ return te(e);
11136
11136
  }
11137
11137
  canReplaceWith(e) {
11138
- return ee(e);
11138
+ return te(e);
11139
11139
  }
11140
11140
  canMergeWith(e) {
11141
- return Zt(e) || ee(e);
11141
+ return Zt(e) || te(e);
11142
11142
  }
11143
11143
  extractWithChild(e, t) {
11144
11144
  if (!B(t)) return !1;
@@ -11182,9 +11182,9 @@ function Kd(r) {
11182
11182
  return r.getAttribute("type") !== "checkbox" ? { node: null } : { node: ke(r.hasAttribute("checked")) };
11183
11183
  }
11184
11184
  function ke(r) {
11185
- return Xe(new Rt(void 0, r));
11185
+ return Ye(new Rt(void 0, r));
11186
11186
  }
11187
- function ee(r) {
11187
+ function te(r) {
11188
11188
  return r instanceof Rt;
11189
11189
  }
11190
11190
  class sr extends ot {
@@ -11222,13 +11222,13 @@ class sr extends ot {
11222
11222
  }
11223
11223
  static transform() {
11224
11224
  return (e) => {
11225
- H(e) || Ke(163), function(t) {
11225
+ H(e) || Ve(163), function(t) {
11226
11226
  const n = t.getNextSibling();
11227
11227
  H(n) && t.getListType() === n.getListType() && bi(t, n);
11228
11228
  }(e), function(t) {
11229
11229
  const n = t.getListType() !== "check";
11230
11230
  let s = t.getStart();
11231
- for (const o of t.getChildren()) ee(o) && (o.getValue() !== s && o.setValue(s), n && o.getLatest().__checked != null && o.setChecked(void 0), H(o.getFirstChild()) || s++);
11231
+ for (const o of t.getChildren()) te(o) && (o.getValue() !== s && o.setValue(s), n && o.getLatest().__checked != null && o.setChecked(void 0), H(o.getFirstChild()) || s++);
11232
11232
  }(e);
11233
11233
  };
11234
11234
  }
@@ -11255,7 +11255,7 @@ class sr extends ot {
11255
11255
  append(...e) {
11256
11256
  for (let t = 0; t < e.length; t++) {
11257
11257
  const n = e[t];
11258
- if (ee(n)) super.append(n);
11258
+ if (te(n)) super.append(n);
11259
11259
  else {
11260
11260
  const s = ke();
11261
11261
  if (H(n)) s.append(n);
@@ -11271,7 +11271,7 @@ class sr extends ot {
11271
11271
  return this;
11272
11272
  }
11273
11273
  extractWithChild(e) {
11274
- return ee(e);
11274
+ return te(e);
11275
11275
  }
11276
11276
  }
11277
11277
  function Vo(r, e, t) {
@@ -11295,7 +11295,7 @@ function Hd(r) {
11295
11295
  const e = [];
11296
11296
  for (let t = 0; t < r.length; t++) {
11297
11297
  const n = r[t];
11298
- if (ee(n)) {
11298
+ if (te(n)) {
11299
11299
  e.push(n);
11300
11300
  const s = n.getChildren();
11301
11301
  s.length > 1 && s.forEach((o) => {
@@ -11316,7 +11316,7 @@ function Ko(r) {
11316
11316
  }
11317
11317
  const Ho = { ol: "number", ul: "bullet" };
11318
11318
  function Ce(r, e = 1) {
11319
- return Xe(new sr(r, e));
11319
+ return Ye(new sr(r, e));
11320
11320
  }
11321
11321
  function H(r) {
11322
11322
  return r instanceof sr;
@@ -11326,7 +11326,7 @@ function Jd(r) {
11326
11326
  return Ot(r.registerCommand(_l, () => (qo(r, "number"), !0), Kt), r.registerCommand(yl, () => (qo(r, "bullet"), !0), Kt), r.registerCommand(Gd, () => (qd(r), !0), Kt), r.registerCommand(kr, () => !!Wd(), Kt));
11327
11327
  }
11328
11328
  function Qd() {
11329
- const [r] = Ye();
11329
+ const [r] = Qe();
11330
11330
  return ge(() => {
11331
11331
  if (!r.hasNodes([sr, Rt])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
11332
11332
  }, [r]), function(e) {
@@ -11437,7 +11437,7 @@ function Xd(r) {
11437
11437
  return { node: e };
11438
11438
  }
11439
11439
  function Bn(r, e) {
11440
- return Xe(new jt(r, e));
11440
+ return Ye(new jt(r, e));
11441
11441
  }
11442
11442
  function hr(r) {
11443
11443
  return r instanceof jt;
@@ -11485,7 +11485,7 @@ class Kr extends jt {
11485
11485
  }
11486
11486
  }
11487
11487
  function Go(r, e) {
11488
- return Xe(new Kr(r, e));
11488
+ return Ye(new Kr(r, e));
11489
11489
  }
11490
11490
  function Zd(r) {
11491
11491
  return r instanceof Kr;
@@ -11530,7 +11530,7 @@ function vs(r, e = {}) {
11530
11530
  }
11531
11531
  }
11532
11532
  function ef({ validateUrl: r, attributes: e }) {
11533
- const [t] = Ye();
11533
+ const [t] = Qe();
11534
11534
  return ge(() => {
11535
11535
  if (!t.hasNodes([jt])) throw new Error("LinkPlugin: LinkNode not registered on editor");
11536
11536
  return Ot(t.registerCommand(Jo, (n) => {
@@ -11581,7 +11581,7 @@ const tf = {
11581
11581
  }
11582
11582
  };
11583
11583
  function nf({ theme: r, disabled: e }) {
11584
- const [t] = Ye(), n = Z(() => {
11584
+ const [t] = Qe(), n = Z(() => {
11585
11585
  t.dispatchCommand(Re, "bold");
11586
11586
  }, [t]), s = Z(() => {
11587
11587
  t.dispatchCommand(Re, "italic");
@@ -11741,10 +11741,10 @@ function nf({ theme: r, disabled: e }) {
11741
11741
  );
11742
11742
  }
11743
11743
  function sf({ html: r }) {
11744
- const [e] = Ye();
11744
+ const [e] = Qe();
11745
11745
  return ge(() => {
11746
11746
  r && e.update(() => {
11747
- const t = re();
11747
+ const t = ne();
11748
11748
  t.clear();
11749
11749
  const s = new DOMParser().parseFromString(r, "text/html"), o = ll(e, s);
11750
11750
  o.length > 0 ? t.append(...o) : t.append(le());