@yext/pages-components 1.1.4 → 1.1.5

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.
@@ -2,7 +2,7 @@ var U_ = Object.defineProperty;
2
2
  var G_ = (e, t, n) => t in e ? U_(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var Ie = (e, t, n) => G_(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as Y_ from "react";
5
- import xn, { createElement as V_, createContext as Nc, useRef as od, useState as Nr, useEffect as sr, Suspense as j_, lazy as q_, useContext as co, forwardRef as Z_, Fragment as J_, useMemo as tp } from "react";
5
+ import xn, { createElement as V_, createContext as Nc, useRef as od, useState as Nr, useEffect as tr, Suspense as j_, lazy as q_, useContext as co, forwardRef as Z_, Fragment as J_, useMemo as tp } from "react";
6
6
  import np, { createPortal as X_ } from "react-dom";
7
7
  var of = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8
8
  function rp(e) {
@@ -1547,7 +1547,7 @@ const Wy = (e) => {
1547
1547
  default:
1548
1548
  return "";
1549
1549
  }
1550
- }, lp = Nc(null), Ky = q_(() => import("./debugger-BTQVKCwx.js"));
1550
+ }, lp = Nc(null), Ky = q_(() => import("./debugger-rlNxnZtt.js"));
1551
1551
  function GS(e) {
1552
1552
  const {
1553
1553
  children: t,
@@ -1562,7 +1562,7 @@ function GS(e) {
1562
1562
  if (!n)
1563
1563
  throw new Error("API Key is required for AnalyticsProvider");
1564
1564
  const T = od(null), [E, S] = Nr(!1);
1565
- sr(() => {
1565
+ tr(() => {
1566
1566
  S(!0);
1567
1567
  }, []), T.current === null && (T.current = new zy(
1568
1568
  n,
@@ -1574,7 +1574,11 @@ function GS(e) {
1574
1574
  p ?? Uu()
1575
1575
  ));
1576
1576
  const w = T.current;
1577
- return /* @__PURE__ */ ft.jsxs(ft.Fragment, { children: [
1577
+ return tr(() => (window.enableYextAnalytics = () => {
1578
+ w.optIn();
1579
+ }, () => {
1580
+ delete window.enableYextAnalytics;
1581
+ }), [w]), /* @__PURE__ */ ft.jsxs(ft.Fragment, { children: [
1578
1582
  /* @__PURE__ */ ft.jsx(lp.Provider, { value: w, children: t }),
1579
1583
  E && (p || Uu()) && sa().name === "browser" ? /* @__PURE__ */ ft.jsx(j_, { fallback: /* @__PURE__ */ ft.jsx(ft.Fragment, {}), children: /* @__PURE__ */ ft.jsx(Ky, {}) }) : null
1580
1584
  ] });
@@ -1693,7 +1697,7 @@ function YS(e) {
1693
1697
  const t = ap(), [n] = Nr({
1694
1698
  name: op(t, e.name)
1695
1699
  }), r = (f = ca()) == null ? void 0 : f.getDebugEnabled(), [l, d] = Nr(!1);
1696
- return sr(() => {
1700
+ return tr(() => {
1697
1701
  d(!0);
1698
1702
  }, []), r && l ? /* @__PURE__ */ ft.jsx("section", { "data-ya-scope": n.name, children: /* @__PURE__ */ ft.jsx(Gu.Provider, { value: n, children: e.children }) }) : /* @__PURE__ */ ft.jsx(Gu.Provider, { value: n, children: e.children });
1699
1703
  }
@@ -1949,7 +1953,7 @@ const VS = () => {
1949
1953
  loading: T = "lazy"
1950
1954
  }) => {
1951
1955
  const E = od(null), [S, w] = Nr(!1), M = "image" in e ? e.image : e;
1952
- sr(() => {
1956
+ tr(() => {
1953
1957
  var ce;
1954
1958
  (ce = E.current) != null && ce.complete && w(!0);
1955
1959
  }, []), jy(
@@ -3623,19 +3627,19 @@ const xN = ({
3623
3627
  const v = od(null), [k, G] = Nr(new fn(f)), [I, P] = Nr(!1), [H, V] = Nr(), [re, te] = Nr(p), ce = (j, z) => {
3624
3628
  E(j, z), z && G(z.getCenter());
3625
3629
  };
3626
- return sr(() => {
3630
+ return tr(() => {
3627
3631
  !I || !H || te(H.getZoom());
3628
- }, [k]), sr(() => {
3632
+ }, [k]), tr(() => {
3629
3633
  if (!t || !I || !H)
3630
3634
  return;
3631
3635
  const j = t.map((z) => new fn(z));
3632
3636
  H.fitCoordinates(j);
3633
- }, [JSON.stringify(t), H]), sr(() => {
3637
+ }, [JSON.stringify(t), H]), tr(() => {
3634
3638
  if (!I || H)
3635
3639
  return;
3636
3640
  const j = new gp().withControlEnabled(d).withDefaultCenter(k).withDefaultZoom(re).withPadding(T).withPanHandler(ce).withPanStartHandler(S).withProvider(w).withProviderOptions(M).withSinglePinZoom(m).withWrapper(v.current).build();
3637
3641
  V(j), _ && (_.current = j);
3638
- }, [I]), sr(() => {
3642
+ }, [I]), tr(() => {
3639
3643
  I || H || !v.current || w.load(e, {
3640
3644
  ...M,
3641
3645
  ...l && { client: l }
@@ -3703,9 +3707,9 @@ const ew = ({
3703
3707
  ClusterTemplate: n = vN
3704
3708
  }) => {
3705
3709
  const { map: r } = co(Cc), [l, d] = Nr([]), [f, p] = Nr(), [_, T] = Nr([]), [E, S] = Nr([]);
3706
- return sr(() => {
3710
+ return tr(() => {
3707
3711
  p(SN(l, r.getZoom(), e));
3708
- }, [l, r.getZoom()]), sr(() => {
3712
+ }, [l, r.getZoom()]), tr(() => {
3709
3713
  S(() => []), T(() => []), (f == null ? void 0 : f.length) !== 0 && (f == null || f.forEach((w) => {
3710
3714
  if (w.length === 1) {
3711
3715
  w[0].pin.setMap(r);
@@ -3809,12 +3813,12 @@ const ew = ({
3809
3813
  hasPinUrl: T = !1
3810
3814
  }) => {
3811
3815
  const { map: E, provider: S } = co(Cc), w = co(ud), M = tp(() => new cd().withCoordinate(t).withHideOffscreen(n).withProvider(S).withHasPinUrl(T).build(), []);
3812
- sr(() => {
3816
+ tr(() => {
3813
3817
  if (_ !== 0 && !_)
3814
3818
  return;
3815
3819
  const v = M.getProviderPin().getWrapperElement();
3816
3820
  v && (v.style.zIndex = _.toString());
3817
- }, [_]), sr(() => {
3821
+ }, [_]), tr(() => {
3818
3822
  M.setMap(E), M.setClickHandler(() => d(r)), M.setFocusHandler((k) => f(k, r)), M.setHoverHandler((k) => p(k, r));
3819
3823
  const v = w == null ? void 0 : w.clusterIds.includes(r);
3820
3824
  return w && !v && w.setPinStore((k) => [
@@ -4029,8 +4033,8 @@ function AN() {
4029
4033
  const Ht = Mt[jt], Ot = mo(Ht), ln = Ht.parentNode;
4030
4034
  if (ln != null && Ht !== ae && Ot === null && (Ht.nodeName !== "BR" || !rn(Ht, ln, u))) {
4031
4035
  if (De) {
4032
- const ir = Ht.innerText || Ht.nodeValue;
4033
- ir && (me += ir);
4036
+ const sr = Ht.innerText || Ht.nodeValue;
4037
+ sr && (me += sr);
4034
4038
  }
4035
4039
  ln.removeChild(Ht);
4036
4040
  }
@@ -4313,7 +4317,7 @@ function AN() {
4313
4317
  return u._pendingDecorators = c, c;
4314
4318
  }
4315
4319
  function _o(u) {
4316
- return u.read(() => tr().getTextContent());
4320
+ return u.read(() => nr().getTextContent());
4317
4321
  }
4318
4322
  function Ii(u, s) {
4319
4323
  Gr(u, () => {
@@ -4321,7 +4325,7 @@ function AN() {
4321
4325
  if (c.isEmpty())
4322
4326
  return;
4323
4327
  if (s === "root") {
4324
- tr().markDirty();
4328
+ nr().markDirty();
4325
4329
  return;
4326
4330
  }
4327
4331
  const h = c._nodeMap;
@@ -4331,7 +4335,7 @@ function AN() {
4331
4335
  tag: "history-merge"
4332
4336
  } : void 0);
4333
4337
  }
4334
- function tr() {
4338
+ function nr() {
4335
4339
  return gl(Si());
4336
4340
  }
4337
4341
  function gl(u) {
@@ -4568,7 +4572,7 @@ function AN() {
4568
4572
  return u === 65 && Jr(s, c);
4569
4573
  }
4570
4574
  function xl() {
4571
- const u = tr(), s = u.select(0, u.getChildrenSize());
4575
+ const u = nr(), s = u.select(0, u.getChildrenSize());
4572
4576
  Tr(Ds(s));
4573
4577
  }
4574
4578
  function Bi(u, s) {
@@ -4809,7 +4813,7 @@ function AN() {
4809
4813
  }
4810
4814
  function So(u, s) {
4811
4815
  let c = u;
4812
- for (; c !== tr() && c != null; ) {
4816
+ for (; c !== nr() && c != null; ) {
4813
4817
  if (s(c))
4814
4818
  return c;
4815
4819
  c = c.getParent();
@@ -5136,7 +5140,7 @@ function AN() {
5136
5140
  throw Error(`Reconciliation: could not find DOM element for node key ${u}`);
5137
5141
  return s;
5138
5142
  }
5139
- const ur = Object.freeze({}), nr = 30, Ll = [["keydown", ge], ["pointerdown", $l], ["compositionstart", x], ["compositionend", Q], ["input", C], ["click", Ba], ["cut", ur], ["copy", ur], ["dragstart", ur], ["dragover", ur], ["dragend", ur], ["paste", ur], ["focus", ur], ["blur", ur], ["drop", ur]];
5143
+ const ur = Object.freeze({}), rr = 30, Ll = [["keydown", ge], ["pointerdown", $l], ["compositionstart", x], ["compositionend", Q], ["input", C], ["click", Ba], ["cut", ur], ["copy", ur], ["dragstart", ur], ["dragover", ur], ["dragend", ur], ["paste", ur], ["focus", ur], ["blur", ur], ["drop", ur]];
5140
5144
  ee && Ll.push(["beforeinput", (u, s) => g(u, s)]);
5141
5145
  let Vi = 0, Il = 0, Ys = 0, Kr = null, Vs = 0, zr = !1, Mo = !1, js = !1, qs = !1, Ro = [0, "", 0, "root", 0];
5142
5146
  function ji(u, s, c, h, y) {
@@ -5180,7 +5184,7 @@ function AN() {
5180
5184
  const ae = $.anchor, he = ae.getNode();
5181
5185
  if ($.isCollapsed()) {
5182
5186
  u.type === "Range" && u.anchorNode === u.focusNode && ($.dirty = !0);
5183
- const me = To(s).event, xe = me ? me.timeStamp : performance.now(), [we, Ce, je, Ue, $e] = Ro, Mt = tr(), Qe = s.isComposing() === !1 && Mt.getTextContent() === "";
5187
+ const me = To(s).event, xe = me ? me.timeStamp : performance.now(), [we, Ce, je, Ue, $e] = Ro, Mt = nr(), Qe = s.isComposing() === !1 && Mt.getTextContent() === "";
5184
5188
  if (xe < $e + 200 && ae.offset === je && ae.key === Ue)
5185
5189
  $.format = we, $.style = Ce;
5186
5190
  else if (ae.type === "text") {
@@ -5208,7 +5212,7 @@ function AN() {
5208
5212
  if (h) {
5209
5213
  if (Et(c)) {
5210
5214
  const N = c.anchor, b = N.getNode();
5211
- if (N.type === "element" && N.offset === 0 && c.isCollapsed() && !Yr(b) && tr().getChildrenSize() === 1 && b.getTopLevelElementOrThrow().isEmpty() && y !== null && c.is(y))
5215
+ if (N.type === "element" && N.offset === 0 && c.isCollapsed() && !Yr(b) && nr().getChildrenSize() === 1 && b.getTopLevelElementOrThrow().isEmpty() && y !== null && c.is(y))
5212
5216
  h.removeAllRanges(), c.dirty = !0;
5213
5217
  else if (u.detail === 3 && !c.isCollapsed()) {
5214
5218
  const ae = c.focus.getNode();
@@ -5244,7 +5248,7 @@ function AN() {
5244
5248
  return u !== s || et(u) || et(s) || !u.isToken() || !s.isToken();
5245
5249
  }
5246
5250
  function a(u) {
5247
- return Il === 229 && u < Vi + nr;
5251
+ return Il === 229 && u < Vi + rr;
5248
5252
  }
5249
5253
  function g(u, s) {
5250
5254
  const c = u.inputType, h = o(u);
@@ -5268,7 +5272,7 @@ function AN() {
5268
5272
  Gr(s, () => {
5269
5273
  vn(null);
5270
5274
  });
5271
- }, nr), Et(y)) {
5275
+ }, rr), Et(y)) {
5272
5276
  const xe = y.anchor.getNode();
5273
5277
  if (xe.markDirty(), y.format = xe.getFormat(), !mt(xe))
5274
5278
  throw Error("Anchor node must be a TextNode");
@@ -5406,7 +5410,7 @@ function AN() {
5406
5410
  vn(h.key), // If it has been 30ms since the last keydown, then we should
5407
5411
  // apply the empty space heuristic. We can't do this for Safari,
5408
5412
  // as the keydown fires after composition start.
5409
- (u.timeStamp < Vi + nr || // FF has issues around composing multibyte characters, so we also
5413
+ (u.timeStamp < Vi + rr || // FF has issues around composing multibyte characters, so we also
5410
5414
  // need to invoke the empty space heuristic below.
5411
5415
  h.type === "element" || !c.isCollapsed() || y.getFormat() !== c.format || mt(y) && y.getStyle() !== c.style) && ct(s, p, Wt);
5412
5416
  }
@@ -6803,7 +6807,7 @@ function AN() {
6803
6807
  const Qe = mn(), dt = [Ce];
6804
6808
  let jt = xe.length;
6805
6809
  for (let ln = 1; ln < me; ln++) {
6806
- const ir = $[ln], ys = ir.length, gr = Dn(ir).getWritable();
6810
+ const sr = $[ln], ys = sr.length, gr = Dn(sr).getWritable();
6807
6811
  gr.__format = je, gr.__style = Ue, gr.__detail = $e;
6808
6812
  const nn = gr.__key, kn = jt + ys;
6809
6813
  if (Et(Qe)) {
@@ -7195,7 +7199,7 @@ function AN() {
7195
7199
  }
7196
7200
  }
7197
7201
  function Et(u) {
7198
- return u instanceof rr;
7202
+ return u instanceof ir;
7199
7203
  }
7200
7204
  function dr(u) {
7201
7205
  return u instanceof Ir;
@@ -7226,7 +7230,7 @@ function AN() {
7226
7230
  }
7227
7231
  return null;
7228
7232
  }
7229
- class rr extends Ir {
7233
+ class ir extends Ir {
7230
7234
  constructor(s, c, h, y) {
7231
7235
  super(s, c), this.format = h, this.style = y;
7232
7236
  }
@@ -7326,7 +7330,7 @@ function AN() {
7326
7330
  */
7327
7331
  clone() {
7328
7332
  const s = this.anchor, c = this.focus;
7329
- return new rr(Lr(s.key, s.offset, s.type), Lr(c.key, c.offset, c.type), this.format, this.style);
7333
+ return new ir(Lr(s.key, s.offset, s.type), Lr(c.key, c.offset, c.type), this.format, this.style);
7330
7334
  }
7331
7335
  /**
7332
7336
  * Toggles the provided format on all the TextNodes in the Selection.
@@ -7456,12 +7460,12 @@ function AN() {
7456
7460
  }
7457
7461
  else
7458
7462
  dt.add(Qe.__key);
7459
- const ln = Ht.getChildren(), ir = new Set($), ys = jt.is(Ht), gr = jt.isInline() && Ce.getNextSibling() === null ? jt : Ce;
7463
+ const ln = Ht.getChildren(), sr = new Set($), ys = jt.is(Ht), gr = jt.isInline() && Ce.getNextSibling() === null ? jt : Ce;
7460
7464
  for (let nn = ln.length - 1; nn >= 0; nn--) {
7461
7465
  const kn = ln[nn];
7462
7466
  if (kn.is(Ce) || et(kn) && kn.isParentOf(Ce))
7463
7467
  break;
7464
- kn.isAttached() && (!ir.has(kn) || kn.is(Ot) ? ys || gr.insertAfter(kn, !1) : kn.remove());
7468
+ kn.isAttached() && (!sr.has(kn) || kn.is(Ot) ? ys || gr.insertAfter(kn, !1) : kn.remove());
7465
7469
  }
7466
7470
  if (!ys) {
7467
7471
  let nn = Ht, kn = null;
@@ -7596,7 +7600,7 @@ function AN() {
7596
7600
  insertParagraph() {
7597
7601
  if (this.anchor.key === "root") {
7598
7602
  const b = Ji();
7599
- return tr().splice(this.anchor.offset, 0, [b]), b.select(), b;
7603
+ return nr().splice(this.anchor.offset, 0, [b]), b.select(), b;
7600
7604
  }
7601
7605
  const s = Bc(this), c = wo(this.anchor.getNode(), Ki);
7602
7606
  if (!et(c))
@@ -7904,12 +7908,12 @@ function AN() {
7904
7908
  return et(u) && !u.isInline();
7905
7909
  }
7906
7910
  function Hd(u, s, c, h, y, N) {
7907
- const b = Si(), $ = new rr(Lr(u, s, y), Lr(c, h, N), 0, "");
7911
+ const b = Si(), $ = new ir(Lr(u, s, y), Lr(c, h, N), 0, "");
7908
7912
  return $.dirty = !0, b._selection = $, $;
7909
7913
  }
7910
7914
  function h_() {
7911
7915
  const u = Lr("root", 0, "element"), s = Lr("root", 0, "element");
7912
- return new rr(u, s, 0, "");
7916
+ return new ir(u, s, 0, "");
7913
7917
  }
7914
7918
  function $c() {
7915
7919
  return new vi(/* @__PURE__ */ new Set());
@@ -7935,7 +7939,7 @@ function AN() {
7935
7939
  if (Ce === null)
7936
7940
  return null;
7937
7941
  const [je, Ue] = Ce;
7938
- return new rr(je, Ue, Et(u) ? u.format : 0, Et(u) ? u.style : "");
7942
+ return new ir(je, Ue, Et(u) ? u.format : 0, Et(u) ? u.style : "");
7939
7943
  }
7940
7944
  function mn() {
7941
7945
  return Si()._selection;
@@ -8021,22 +8025,22 @@ function AN() {
8021
8025
  return;
8022
8026
  }
8023
8027
  const we = s.anchor, Ce = s.focus, je = we.key, Ue = Ce.key, $e = Bs(c, je), Mt = Bs(c, Ue), Qe = we.offset, dt = Ce.offset, jt = s.format, Ht = s.style, Ot = s.isCollapsed();
8024
- let ln = $e, ir = Mt, ys = !1;
8028
+ let ln = $e, sr = Mt, ys = !1;
8025
8029
  if (we.type === "text") {
8026
8030
  ln = Fr($e);
8027
8031
  const gr = we.getNode();
8028
8032
  ys = gr.getFormat() !== jt || gr.getStyle() !== Ht;
8029
8033
  } else Et(u) && u.anchor.type === "text" && (ys = !0);
8030
- if (Ce.type === "text" && (ir = Fr(Mt)), !(ln === null || ir === null) && (Ot && (u === null || ys || Et(u) && (u.format !== jt || u.style !== Ht)) && Yn(jt, Ht, Qe, je, performance.now()), !(he === Qe && me === dt && $ === ln && ae === ir && // Badly interpreted range selection when collapsed - #1482
8034
+ if (Ce.type === "text" && (sr = Fr(Mt)), !(ln === null || sr === null) && (Ot && (u === null || ys || Et(u) && (u.format !== jt || u.style !== Ht)) && Yn(jt, Ht, Qe, je, performance.now()), !(he === Qe && me === dt && $ === ln && ae === sr && // Badly interpreted range selection when collapsed - #1482
8031
8035
  !(h.type === "Range" && Ot) && ((xe === null || !N.contains(xe)) && N.focus({
8032
8036
  preventScroll: !0
8033
8037
  }), we.type !== "element")))) {
8034
8038
  try {
8035
- h.setBaseAndExtent(ln, Qe, ir, dt);
8039
+ h.setBaseAndExtent(ln, Qe, sr, dt);
8036
8040
  } catch {
8037
8041
  }
8038
8042
  if (!y.has("skip-scroll-into-view") && s.isCollapsed() && N !== null && N === document.activeElement) {
8039
- const gr = s instanceof rr && s.anchor.type === "element" ? ln.childNodes[Qe] || null : h.rangeCount > 0 ? h.getRangeAt(0) : null;
8043
+ const gr = s instanceof ir && s.anchor.type === "element" ? ln.childNodes[Qe] || null : h.rangeCount > 0 ? h.getRangeAt(0) : null;
8040
8044
  if (gr !== null) {
8041
8045
  let nn;
8042
8046
  if (gr instanceof Text) {
@@ -8052,7 +8056,7 @@ function AN() {
8052
8056
  }
8053
8057
  function __(u) {
8054
8058
  let s = mn() || Ho();
8055
- s === null && (s = tr().selectEnd()), s.insertNodes(u);
8059
+ s === null && (s = nr().selectEnd()), s.insertNodes(u);
8056
8060
  }
8057
8061
  function y_() {
8058
8062
  const u = mn();
@@ -8133,7 +8137,7 @@ function AN() {
8133
8137
  const c = u.getParent();
8134
8138
  if (!c) {
8135
8139
  const y = Ji();
8136
- return tr().append(y), y.select(), [tr(), 0];
8140
+ return nr().append(y), y.select(), [nr(), 0];
8137
8141
  }
8138
8142
  if (mt(u)) {
8139
8143
  const y = u.splitText(s);
@@ -8146,7 +8150,7 @@ function AN() {
8146
8150
  return [c, u.getIndexWithinParent()];
8147
8151
  const h = u.getChildAtIndex(s);
8148
8152
  if (h) {
8149
- const y = new rr(Lr(u.__key, s, "element"), Lr(u.__key, s, "element"), 0, ""), N = u.insertNewAfter(y);
8153
+ const y = new ir(Lr(u.__key, s, "element"), Lr(u.__key, s, "element"), 0, ""), N = u.insertNewAfter(y);
8150
8154
  N && N.append(h, ...h.getNextSiblings());
8151
8155
  }
8152
8156
  return [c, u.getIndexWithinParent() + 1];
@@ -8300,8 +8304,8 @@ function AN() {
8300
8304
  if (u._pendingEditorState = null, u._editorState = c, !y && ae && Ce !== null) {
8301
8305
  er = u, Qn = c, Pr = !1, u._updating = !0;
8302
8306
  try {
8303
- const Ot = u._dirtyType, ln = u._dirtyElements, ir = u._dirtyLeaves;
8304
- Ce.disconnect(), je = Yi(N, c, u, Ot, ln, ir);
8307
+ const Ot = u._dirtyType, ln = u._dirtyElements, sr = u._dirtyLeaves;
8308
+ Ce.disconnect(), je = Yi(N, c, u, Ot, ln, sr);
8305
8309
  } catch (Ot) {
8306
8310
  if (Ot instanceof Error && u._onError(Ot), !Hc)
8307
8311
  tf(u, null, h, c), or(u), u._dirtyType = at, Hc = !0, Xs(u, N), Hc = !1;
@@ -8879,7 +8883,7 @@ function AN() {
8879
8883
  return super.append(...s);
8880
8884
  }
8881
8885
  static importJSON(s) {
8882
- const c = tr();
8886
+ const c = nr();
8883
8887
  return c.setFormat(s.format), c.setIndent(s.indent), c.setDirection(s.direction), c;
8884
8888
  }
8885
8889
  exportJSON() {
@@ -8949,7 +8953,7 @@ function AN() {
8949
8953
  }
8950
8954
  toJSON() {
8951
8955
  return jd(this, () => ({
8952
- root: ef(tr())
8956
+ root: ef(nr())
8953
8957
  }));
8954
8958
  }
8955
8959
  }
@@ -9080,8 +9084,8 @@ function AN() {
9080
9084
  const Ot = $e.name;
9081
9085
  if (Ot !== "RootNode") {
9082
9086
  const ln = $e.prototype;
9083
- ["getType", "clone"].forEach((ir) => {
9084
- $e.hasOwnProperty(ir) || console.warn(`${Ot} must implement static "${ir}" method`);
9087
+ ["getType", "clone"].forEach((sr) => {
9088
+ $e.hasOwnProperty(sr) || console.warn(`${Ot} must implement static "${sr}" method`);
9085
9089
  }), // eslint-disable-next-line no-prototype-builtins
9086
9090
  !$e.hasOwnProperty("importDOM") && // eslint-disable-next-line no-prototype-builtins
9087
9091
  $e.hasOwnProperty("exportDOM") && console.warn(`${Ot} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`), ln instanceof Kc && (ln.hasOwnProperty("decorate") || console.warn(`${ln.constructor.name} must implement "decorate" method`)), $e.hasOwnProperty("importJSON") || console.warn(`${Ot} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`), ln.hasOwnProperty("exportJSON") || console.warn(`${Ot} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`);
@@ -9430,7 +9434,7 @@ function AN() {
9430
9434
  focus(s, c = {}) {
9431
9435
  const h = this._rootElement;
9432
9436
  h !== null && (h.setAttribute("autocapitalize", "off"), Gr(this, () => {
9433
- const y = mn(), N = tr();
9437
+ const y = mn(), N = nr();
9434
9438
  y !== null ? y.dirty = !0 : N.getChildrenSize() !== 0 && (c.defaultSelection === "rootStart" ? N.selectStart() : N.selectEnd());
9435
9439
  }, {
9436
9440
  onUpdate: () => {
@@ -9516,7 +9520,7 @@ function AN() {
9516
9520
  function Gc(u) {
9517
9521
  return u instanceof sf;
9518
9522
  }
9519
- return He.$INTERNAL_isPointSelection = dr, He.$addUpdateTag = Nt, He.$applyNodeReplacement = Mr, He.$copyNode = wl, He.$createLineBreakNode = _s, He.$createNodeSelection = $c, He.$createParagraphNode = Ji, He.$createPoint = Lr, He.$createRangeSelection = h_, He.$createTabNode = Po, He.$createTextNode = Dn, He.$getAdjacentNode = vl, He.$getNearestNodeFromDOMNode = oi, He.$getNearestRootOrShadowRoot = xo, He.$getNodeByKey = Nn, He.$getPreviousSelection = Ho, He.$getRoot = tr, He.$getSelection = mn, He.$getTextContent = y_, He.$hasAncestor = Wi, He.$hasUpdateTag = Un, He.$insertNodes = __, He.$isBlockElementNode = f_, He.$isDecoratorNode = An, He.$isElementNode = et, He.$isInlineElementOrDecoratorNode = Hr, He.$isLeafNode = Ms, He.$isLineBreakNode = ui, He.$isNodeSelection = Ur, He.$isParagraphNode = k_, He.$isRangeSelection = Et, He.$isRootNode = Yr, He.$isRootOrShadowRoot = li, He.$isTabNode = $o, He.$isTextNode = mt, He.$nodesOfType = Hi, He.$normalizeSelection__EXPERIMENTAL = Ds, He.$parseSerializedNode = S_, He.$selectAll = xl, He.$setCompositionKey = vn, He.$setSelection = Tr, He.$splitNode = La, He.BLUR_COMMAND = B, He.CAN_REDO_COMMAND = X, He.CAN_UNDO_COMMAND = fe, He.CLEAR_EDITOR_COMMAND = R, He.CLEAR_HISTORY_COMMAND = U, He.CLICK_COMMAND = r, He.COMMAND_PRIORITY_CRITICAL = H_, He.COMMAND_PRIORITY_EDITOR = P_, He.COMMAND_PRIORITY_HIGH = B_, He.COMMAND_PRIORITY_LOW = $_, He.COMMAND_PRIORITY_NORMAL = F_, He.CONTROLLED_TEXT_INSERTION_COMMAND = p, He.COPY_COMMAND = Y, He.CUT_COMMAND = W, He.DELETE_CHARACTER_COMMAND = l, He.DELETE_LINE_COMMAND = S, He.DELETE_WORD_COMMAND = E, He.DEPRECATED_$computeGridMap = N_, He.DEPRECATED_$getGridCellNodeRect = kr, He.DEPRECATED_$getNodeTriplet = zd, He.DEPRECATED_$isGridCellNode = Uo, He.DEPRECATED_$isGridNode = rf, He.DEPRECATED_$isGridRowNode = Gc, He.DEPRECATED_GridCellNode = Uc, He.DEPRECATED_GridNode = nf, He.DEPRECATED_GridRowNode = sf, He.DRAGEND_COMMAND = oe, He.DRAGOVER_COMMAND = Z, He.DRAGSTART_COMMAND = O, He.DROP_COMMAND = de, He.DecoratorNode = Kc, He.ElementNode = Qs, He.FOCUS_COMMAND = _e, He.FORMAT_ELEMENT_COMMAND = K, He.FORMAT_TEXT_COMMAND = w, He.INDENT_CONTENT_COMMAND = Se, He.INSERT_LINE_BREAK_COMMAND = d, He.INSERT_PARAGRAPH_COMMAND = f, He.INSERT_TAB_COMMAND = Te, He.INTERNAL_PointSelection = Ir, He.KEY_ARROW_DOWN_COMMAND = V, He.KEY_ARROW_LEFT_COMMAND = I, He.KEY_ARROW_RIGHT_COMMAND = k, He.KEY_ARROW_UP_COMMAND = H, He.KEY_BACKSPACE_COMMAND = ce, He.KEY_DELETE_COMMAND = z, He.KEY_DOWN_COMMAND = v, He.KEY_ENTER_COMMAND = re, He.KEY_ESCAPE_COMMAND = j, He.KEY_MODIFIER_COMMAND = A, He.KEY_SPACE_COMMAND = te, He.KEY_TAB_COMMAND = q, He.LineBreakNode = qi, He.MOVE_TO_END = G, He.MOVE_TO_START = P, He.OUTDENT_CONTENT_COMMAND = Ee, He.PASTE_COMMAND = _, He.ParagraphNode = zo, He.REDO_COMMAND = m, He.REMOVE_TEXT_COMMAND = T, He.RootNode = Ko, He.SELECTION_CHANGE_COMMAND = t, He.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND = n, He.SELECT_ALL_COMMAND = J, He.TabNode = Sr, He.TextNode = Qr, He.UNDO_COMMAND = M, He.createCommand = e, He.createEditor = K_, He.getNearestEditorFromDOMNode = ul, He.isCurrentlyReadOnlyMode = Wo, He.isHTMLAnchorElement = Ia, He.isHTMLElement = Ks, He.isSelectionCapturedInDecoratorInput = As, He.isSelectionWithinEditor = ls, He;
9523
+ return He.$INTERNAL_isPointSelection = dr, He.$addUpdateTag = Nt, He.$applyNodeReplacement = Mr, He.$copyNode = wl, He.$createLineBreakNode = _s, He.$createNodeSelection = $c, He.$createParagraphNode = Ji, He.$createPoint = Lr, He.$createRangeSelection = h_, He.$createTabNode = Po, He.$createTextNode = Dn, He.$getAdjacentNode = vl, He.$getNearestNodeFromDOMNode = oi, He.$getNearestRootOrShadowRoot = xo, He.$getNodeByKey = Nn, He.$getPreviousSelection = Ho, He.$getRoot = nr, He.$getSelection = mn, He.$getTextContent = y_, He.$hasAncestor = Wi, He.$hasUpdateTag = Un, He.$insertNodes = __, He.$isBlockElementNode = f_, He.$isDecoratorNode = An, He.$isElementNode = et, He.$isInlineElementOrDecoratorNode = Hr, He.$isLeafNode = Ms, He.$isLineBreakNode = ui, He.$isNodeSelection = Ur, He.$isParagraphNode = k_, He.$isRangeSelection = Et, He.$isRootNode = Yr, He.$isRootOrShadowRoot = li, He.$isTabNode = $o, He.$isTextNode = mt, He.$nodesOfType = Hi, He.$normalizeSelection__EXPERIMENTAL = Ds, He.$parseSerializedNode = S_, He.$selectAll = xl, He.$setCompositionKey = vn, He.$setSelection = Tr, He.$splitNode = La, He.BLUR_COMMAND = B, He.CAN_REDO_COMMAND = X, He.CAN_UNDO_COMMAND = fe, He.CLEAR_EDITOR_COMMAND = R, He.CLEAR_HISTORY_COMMAND = U, He.CLICK_COMMAND = r, He.COMMAND_PRIORITY_CRITICAL = H_, He.COMMAND_PRIORITY_EDITOR = P_, He.COMMAND_PRIORITY_HIGH = B_, He.COMMAND_PRIORITY_LOW = $_, He.COMMAND_PRIORITY_NORMAL = F_, He.CONTROLLED_TEXT_INSERTION_COMMAND = p, He.COPY_COMMAND = Y, He.CUT_COMMAND = W, He.DELETE_CHARACTER_COMMAND = l, He.DELETE_LINE_COMMAND = S, He.DELETE_WORD_COMMAND = E, He.DEPRECATED_$computeGridMap = N_, He.DEPRECATED_$getGridCellNodeRect = kr, He.DEPRECATED_$getNodeTriplet = zd, He.DEPRECATED_$isGridCellNode = Uo, He.DEPRECATED_$isGridNode = rf, He.DEPRECATED_$isGridRowNode = Gc, He.DEPRECATED_GridCellNode = Uc, He.DEPRECATED_GridNode = nf, He.DEPRECATED_GridRowNode = sf, He.DRAGEND_COMMAND = oe, He.DRAGOVER_COMMAND = Z, He.DRAGSTART_COMMAND = O, He.DROP_COMMAND = de, He.DecoratorNode = Kc, He.ElementNode = Qs, He.FOCUS_COMMAND = _e, He.FORMAT_ELEMENT_COMMAND = K, He.FORMAT_TEXT_COMMAND = w, He.INDENT_CONTENT_COMMAND = Se, He.INSERT_LINE_BREAK_COMMAND = d, He.INSERT_PARAGRAPH_COMMAND = f, He.INSERT_TAB_COMMAND = Te, He.INTERNAL_PointSelection = Ir, He.KEY_ARROW_DOWN_COMMAND = V, He.KEY_ARROW_LEFT_COMMAND = I, He.KEY_ARROW_RIGHT_COMMAND = k, He.KEY_ARROW_UP_COMMAND = H, He.KEY_BACKSPACE_COMMAND = ce, He.KEY_DELETE_COMMAND = z, He.KEY_DOWN_COMMAND = v, He.KEY_ENTER_COMMAND = re, He.KEY_ESCAPE_COMMAND = j, He.KEY_MODIFIER_COMMAND = A, He.KEY_SPACE_COMMAND = te, He.KEY_TAB_COMMAND = q, He.LineBreakNode = qi, He.MOVE_TO_END = G, He.MOVE_TO_START = P, He.OUTDENT_CONTENT_COMMAND = Ee, He.PASTE_COMMAND = _, He.ParagraphNode = zo, He.REDO_COMMAND = m, He.REMOVE_TEXT_COMMAND = T, He.RootNode = Ko, He.SELECTION_CHANGE_COMMAND = t, He.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND = n, He.SELECT_ALL_COMMAND = J, He.TabNode = Sr, He.TextNode = Qr, He.UNDO_COMMAND = M, He.createCommand = e, He.createEditor = K_, He.getNearestEditorFromDOMNode = ul, He.isCurrentlyReadOnlyMode = Wo, He.isHTMLAnchorElement = Ia, He.isHTMLElement = Ks, He.isSelectionCapturedInDecoratorInput = As, He.isSelectionWithinEditor = ls, He;
9520
9524
  }
9521
9525
  var We = {}, Of;
9522
9526
  function MN() {
@@ -9858,7 +9862,7 @@ function MN() {
9858
9862
  return o = (o = un(o).event) && o.inputType, o === "insertFromPaste" || o === "insertFromPasteAsQuotation";
9859
9863
  }
9860
9864
  function on(o) {
9861
- return !nr(o) && !o.isLastChild() && !o.isInline();
9865
+ return !rr(o) && !o.isLastChild() && !o.isInline();
9862
9866
  }
9863
9867
  function bn(o, i) {
9864
9868
  return o = o._keyToDOMMap.get(i), o === void 0 && Y(75, i), o;
@@ -9881,7 +9885,7 @@ function MN() {
9881
9885
  return o;
9882
9886
  }
9883
9887
  function lr(o) {
9884
- return nr(o) || Je(o) && o.isShadowRoot();
9888
+ return rr(o) || Je(o) && o.isShadowRoot();
9885
9889
  }
9886
9890
  function bi(o) {
9887
9891
  return o = o.constructor.clone(o), _t(o, null), o;
@@ -9892,7 +9896,7 @@ function MN() {
9892
9896
  return i = i._nodes.get(a), i === void 0 && Y(97), i = i.replace, i !== null ? (i = i(o), i instanceof o.constructor || Y(98), i) : o;
9893
9897
  }
9894
9898
  function Ds(o, i) {
9895
- o = o.getParent(), !nr(o) || Je(i) || Cn(i) || Y(99);
9899
+ o = o.getParent(), !rr(o) || Je(i) || Cn(i) || Y(99);
9896
9900
  }
9897
9901
  function go(o) {
9898
9902
  return (Cn(o) || Je(o) && !o.canBeEmpty()) && !o.isInline();
@@ -9957,7 +9961,7 @@ function MN() {
9957
9961
  function Ii(o, i) {
9958
9962
  o.setProperty("text-align", i);
9959
9963
  }
9960
- function tr(o, i) {
9964
+ function nr(o, i) {
9961
9965
  var a = Fr.theme.indent;
9962
9966
  if (typeof a == "string") {
9963
9967
  let g = o.classList.contains(a);
@@ -9974,7 +9978,7 @@ function MN() {
9974
9978
  let C = g.createDOM(Fr, Bn);
9975
9979
  var x = Bn._keyToDOMMap;
9976
9980
  if (C["__lexicalKey_" + Bn._key] = o, x.set(o, C), Nt(g) ? C.setAttribute("data-lexical-text", "true") : Cn(g) && C.setAttribute("data-lexical-decorator", "true"), Je(g)) {
9977
- if (o = g.__indent, x = g.__size, o !== 0 && tr(C, o), x !== 0) {
9981
+ if (o = g.__indent, x = g.__size, o !== 0 && nr(C, o), x !== 0) {
9978
9982
  --x, o = bs(g, Nn);
9979
9983
  var D = zn;
9980
9984
  zn = "", pl(o, g, 0, x, C, null), ya(g, C), zn = D;
@@ -10031,7 +10035,7 @@ function MN() {
10031
10035
  if (a === g && !C) return Je(a) ? (g = x.__lexicalTextContent, g !== void 0 && (Ln += g, si += g), g = x.__lexicalDirTextContent, g !== void 0 && (zn += g)) : (g = a.getTextContent(), Nt(a) && !a.isDirectionless() && (zn += g), si += g, Ln += g), x;
10032
10036
  if (a !== g && C && kt(oi, Ms, Zr, g, "updated"), g.updateDOM(a, x, Fr)) return g = Tr(o, null, null), i === null && Y(62), i.replaceChild(g, x), Rs(o, null), g;
10033
10037
  if (Je(a) && Je(g)) {
10034
- if (o = g.__indent, o !== a.__indent && tr(x, o), o = g.__format, o !== a.__format && gl(x, o), C) {
10038
+ if (o = g.__indent, o !== a.__indent && nr(x, o), o = g.__format, o !== a.__format && gl(x, o), C) {
10035
10039
  o = zn, zn = "", C = Ln;
10036
10040
  var D = a.__size, Q = g.__size;
10037
10041
  if (Ln = "", D === 1 && Q === 1) {
@@ -10065,7 +10069,7 @@ function MN() {
10065
10069
  }
10066
10070
  on(g) && (Ln += `
10067
10071
 
10068
- `), x.__lexicalTextContent = Ln, Ln = C + Ln, ya(g, x), zn = o, nr(g) || g.isInline() || ml(a, g, x);
10072
+ `), x.__lexicalTextContent = Ln, Ln = C + Ln, ya(g, x), zn = o, rr(g) || g.isInline() || ml(a, g, x);
10069
10073
  }
10070
10074
  on(g) && (Ln += `
10071
10075
 
@@ -10073,7 +10077,7 @@ function MN() {
10073
10077
 
10074
10078
  `);
10075
10079
  } else a = g.getTextContent(), Cn(g) ? (C = g.decorate(Bn, Fr), C !== null && _l(o, C)) : Nt(g) && !g.isDirectionless() && (zn += a), Ln += a, si += a;
10076
- return !fl && nr(g) && g.__cachedText !== si && (g.getWritable().__cachedText = si), x;
10080
+ return !fl && rr(g) && g.__cachedText !== si && (g.getWritable().__cachedText = si), x;
10077
10081
  }
10078
10082
  function _l(o, i) {
10079
10083
  let a = Bn._pendingDecorators, g = Bn._decorators;
@@ -10144,7 +10148,7 @@ function MN() {
10144
10148
  if (g) if (At(a)) {
10145
10149
  let D = a.anchor;
10146
10150
  var x = D.getNode();
10147
- D.type === "element" && D.offset === 0 && a.isCollapsed() && !nr(x) && Rt().getChildrenSize() === 1 && x.getTopLevelElementOrThrow().isEmpty() && C !== null && a.is(C) ? (g.removeAllRanges(), a.dirty = !0) : o.detail !== 3 || a.isCollapsed() || (g = a.focus.getNode(), x !== g && (Je(x) ? x.select(0) : x.getParentOrThrow().select(0)));
10151
+ D.type === "element" && D.offset === 0 && a.isCollapsed() && !rr(x) && Rt().getChildrenSize() === 1 && x.getTopLevelElementOrThrow().isEmpty() && C !== null && a.is(C) ? (g.removeAllRanges(), a.dirty = !0) : o.detail !== 3 || a.isCollapsed() || (g = a.focus.getNode(), x !== g && (Je(x) ? x.select(0) : x.getParentOrThrow().select(0)));
10148
10152
  } else o.pointerType === "touch" && (x = g.anchorNode, x !== null && (x = x.nodeType, x === 1 || x === 3)) && (g = Gn(C, g, i, o), tn(g));
10149
10153
  lt(i, t, o);
10150
10154
  });
@@ -10187,7 +10191,7 @@ function MN() {
10187
10191
  }
10188
10192
  }
10189
10193
  if (At(C)) {
10190
- x = o.data, as !== null && st(!1, i, as), C.dirty && as === null || !C.isCollapsed() || nr(C.anchor.getNode()) || g === null || C.applyDOMRange(g), as = null;
10194
+ x = o.data, as !== null && st(!1, i, as), C.dirty && as === null || !C.isCollapsed() || rr(C.anchor.getNode()) || g === null || C.applyDOMRange(g), as = null;
10191
10195
  var D = C.focus, Q = C.anchor.getNode();
10192
10196
  if (D = D.getNode(), a === "insertText" || a === "insertTranspose") x === `
10193
10197
  ` ? (o.preventDefault(), lt(i, r, !1)) : x === `
@@ -10404,7 +10408,7 @@ function MN() {
10404
10408
  let Ye = ge.focus;
10405
10409
  x.key === g && (hs(x, o, C, o.getPreviousSibling(), o.getNextSibling()), Ae = !0), Ye.key === g && (hs(Ye, o, C, o.getPreviousSibling(), o.getNextSibling()), Ae = !0);
10406
10410
  } else cr(ge) && i && o.isSelected() && o.selectPrevious();
10407
- At(ge) && i && !Ae ? (g = o.getIndexWithinParent(), yt(o), Hn(ge, C, g, -1)) : yt(o), a || lr(C) || C.canBeEmpty() || !C.isEmpty() || Tl(C, i), i && nr(C) && C.isEmpty() && C.selectEnd();
10411
+ At(ge) && i && !Ae ? (g = o.getIndexWithinParent(), yt(o), Hn(ge, C, g, -1)) : yt(o), a || lr(C) || C.canBeEmpty() || !C.isEmpty() || Tl(C, i), i && rr(C) && C.isEmpty() && C.selectEnd();
10408
10412
  }
10409
10413
  }
10410
10414
  class Fs {
@@ -11102,7 +11106,7 @@ function MN() {
11102
11106
  } else xo(o, i);
11103
11107
  }
11104
11108
  function wl(o, i, a, g) {
11105
- let C = o.getNode(), x = C.getChildAtIndex(o.offset), D = Un(), Q = nr(C) ? zr().append(D) : D;
11109
+ let C = o.getNode(), x = C.getChildAtIndex(o.offset), D = Un(), Q = rr(C) ? zr().append(D) : D;
11106
11110
  D.setFormat(a), D.setStyle(g), x === null ? C.append(Q) : x.insertBefore(Q), o.is(i) && i.set(D.__key, 0, "text"), o.set(D.__key, 0, "text");
11107
11111
  }
11108
11112
  function Mr(o, i, a, g) {
@@ -11323,7 +11327,7 @@ function MN() {
11323
11327
  var gt = Un(Ke.getTextContent());
11324
11328
  Ke.replace(gt), Ke = gt;
11325
11329
  }
11326
- nr(Ae.getNode()) || Ae.type !== "text" || (Ke = Ke.spliceText(0, Ye, "")), x.add(Ke.__key);
11330
+ rr(Ae.getNode()) || Ae.type !== "text" || (Ke = Ke.spliceText(0, Ye, "")), x.add(Ke.__key);
11327
11331
  } else Ae = Ke.getParentOrThrow(), Ae.canBeEmpty() || Ae.getChildrenSize() !== 1 ? Ke.remove() : Ae.remove();
11328
11332
  else x.add(Ke.__key);
11329
11333
  for (Ae = D.getChildren(), Ye = new Set(Q), Ke = Pe.is(D), Pe = Pe.isInline() && a.getNextSibling() === null ? Pe : a, gt = Ae.length - 1; 0 <= gt; gt--) {
@@ -11426,7 +11430,7 @@ function MN() {
11426
11430
  if (Cn(Q) && !Q.isIsolated()) D && Q.isKeyboardSelectable() ? (a = Dl(), a.add(Q.__key), tn(a)) : (i = a ? Q.getPreviousSibling() : Q.getNextSibling(), Nt(i) ? (Q = i.__key, a = a ? i.getTextContent().length : 0, C.set(Q, a, "text"), D && x.set(Q, a, "text")) : (g = Q.getParentOrThrow(), Je(i) ? (g = i.__key, Q = a ? i.getChildrenSize() : 0) : (Q = Q.getIndexWithinParent(), g = g.__key, a || Q++), C.set(g, Q, "element"), D && x.set(g, Q, "element")));
11427
11431
  else if (x = dn(), C = qr(x._window)) {
11428
11432
  var ge = x._blockCursorElement, Ae = x._rootElement;
11429
- if (Ae === null || ge === null || !Je(Q) || Q.isInline() || Q.canBeEmpty() || cl(ge, x, Ae), C.modify(i, a ? "backward" : "forward", g), 0 < C.rangeCount && (Q = C.getRangeAt(0), x = this.anchor.getNode(), x = nr(x) ? x : or(x), this.applyDOMRange(Q), this.dirty = !0, !D)) {
11433
+ if (Ae === null || ge === null || !Je(Q) || Q.isInline() || Q.canBeEmpty() || cl(ge, x, Ae), C.modify(i, a ? "backward" : "forward", g), 0 < C.rangeCount && (Q = C.getRangeAt(0), x = this.anchor.getNode(), x = rr(x) ? x : or(x), this.applyDOMRange(Q), this.dirty = !0, !D)) {
11430
11434
  for (D = this.getNodes(), i = [], g = !1, ge = 0; ge < D.length; ge++) Ae = D[ge], Zn(Ae, x) ? i.push(Ae) : g = !0;
11431
11435
  g && 0 < i.length && (a ? (a = i[0], Je(a) ? a.selectStart() : a.getParentOrThrow().selectStart()) : (a = i[i.length - 1], Je(a) ? a.selectEnd() : a.getParentOrThrow().selectEnd())), (C.anchorNode !== Q.startContainer || C.anchorOffset !== Q.startOffset) && (a = this.focus, D = this.anchor, C = D.key, Q = D.offset, x = D.type, Mr(D, a.key, a.offset, a.type), Mr(a, C, Q, x), this._cachedNodes = null);
11432
11436
  }
@@ -11467,7 +11471,7 @@ function MN() {
11467
11471
  }
11468
11472
  }
11469
11473
  }
11470
- this.removeText(), i && !a && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (i = this.anchor.getNode(), i.isEmpty() && nr(i.getParent()) && i.getIndexWithinParent() === 0 && i.collapseAtStart(this));
11474
+ this.removeText(), i && !a && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (i = this.anchor.getNode(), i.isEmpty() && rr(i.getParent()) && i.getIndexWithinParent() === 0 && i.collapseAtStart(this));
11471
11475
  }
11472
11476
  deleteLine(i) {
11473
11477
  this.isCollapsed() && (this.anchor.type === "text" && this.modify("extend", i, "lineboundary"), (i ? this.focus : this.anchor).offset === 0 && this.modify(
@@ -11756,9 +11760,9 @@ function MN() {
11756
11760
  let fr = document.createRange();
11757
11761
  fr.selectNode(dr), kr = fr.getBoundingClientRect();
11758
11762
  } else kr = dr.getBoundingClientRect();
11759
- let rr = g.ownerDocument, Ur = rr.defaultView;
11763
+ let ir = g.ownerDocument, Ur = ir.defaultView;
11760
11764
  if (Ur !== null) for (var { top: Kl, bottom: ei } = kr, Dn, mt, Sr = g; Sr !== null; ) {
11761
- let fr = Sr === rr.body;
11765
+ let fr = Sr === ir.body;
11762
11766
  if (fr) Dn = 0, mt = un(o).innerHeight;
11763
11767
  else {
11764
11768
  let Bo = Sr.getBoundingClientRect();
@@ -11792,20 +11796,20 @@ function MN() {
11792
11796
  } else {
11793
11797
  let kr = En.getChildAtIndex(Ir);
11794
11798
  if (go(kr)) {
11795
- let rr = kr.getPreviousSibling();
11796
- (rr === null || go(rr)) && (Et = !0, dr = o.getElementByKey(kr.__key));
11799
+ let ir = kr.getPreviousSibling();
11800
+ (ir === null || go(ir)) && (Et = !0, dr = o.getElementByKey(kr.__key));
11797
11801
  }
11798
11802
  }
11799
11803
  if (Et) {
11800
11804
  let kr = o.getElementByKey(En.__key);
11801
11805
  if (pn === null) {
11802
- let rr = o._config.theme, Ur = document.createElement("div");
11806
+ let ir = o._config.theme, Ur = document.createElement("div");
11803
11807
  Ur.contentEditable = "false", Ur.setAttribute("data-lexical-cursor", "true");
11804
- let fr = rr.blockCursor;
11808
+ let fr = ir.blockCursor;
11805
11809
  if (fr !== void 0) {
11806
11810
  if (typeof fr == "string") {
11807
11811
  let di = fr.split(" ");
11808
- fr = rr.blockCursor = di;
11812
+ fr = ir.blockCursor = di;
11809
11813
  }
11810
11814
  fr !== void 0 && Ur.classList.add(...fr);
11811
11815
  }
@@ -12261,7 +12265,7 @@ function MN() {
12261
12265
  return !0;
12262
12266
  }
12263
12267
  }
12264
- function nr(o) {
12268
+ function rr(o) {
12265
12269
  return o instanceof ur;
12266
12270
  }
12267
12271
  function Ll(o, i) {
@@ -12585,7 +12589,7 @@ function MN() {
12585
12589
  return Nt(o) || $i(o) || Cn(o);
12586
12590
  }, We.$isLineBreakNode = $i, We.$isNodeSelection = cr, We.$isParagraphNode = function(o) {
12587
12591
  return o instanceof Kr;
12588
- }, We.$isRangeSelection = At, We.$isRootNode = nr, We.$isRootOrShadowRoot = lr, We.$isTabNode = ba, We.$isTextNode = Nt, We.$nodesOfType = function(o) {
12592
+ }, We.$isRangeSelection = At, We.$isRootNode = rr, We.$isRootOrShadowRoot = lr, We.$isTabNode = ba, We.$isTextNode = Nt, We.$nodesOfType = function(o) {
12589
12593
  var i = Wr();
12590
12594
  let a = i._readOnly, g = o.getType();
12591
12595
  i = i._nodeMap;
@@ -23897,7 +23901,7 @@ const MC = process.env.NODE_ENV === "development" ? DC() : AC();
23897
23901
  var Vu = MC, pd = qn();
23898
23902
  function RC() {
23899
23903
  const [e] = pd.useLexicalComposerContext();
23900
- return sr(() => Vu.registerCodeHighlighting(e), [e]), null;
23904
+ return tr(() => Vu.registerCodeHighlighting(e), [e]), null;
23901
23905
  }
23902
23906
  var Qh = gn(), Fn = Gt();
23903
23907
  function bC({
@@ -24006,7 +24010,7 @@ const IC = typeof window < "u" && typeof window.document < "u" && typeof window.
24006
24010
  );
24007
24011
  function PC() {
24008
24012
  const [e] = pd.useLexicalComposerContext();
24009
- return sr(() => {
24013
+ return tr(() => {
24010
24014
  if (!e.hasNodes([il]))
24011
24015
  throw new Error("ImagePlugin: ImageNode not registered on editor");
24012
24016
  return Qh.mergeRegister(
@@ -24138,7 +24142,7 @@ function UC(e) {
24138
24142
  }
24139
24143
  function GC({ maxDepth: e }) {
24140
24144
  const [t] = pd.useLexicalComposerContext();
24141
- return sr(() => t.registerCommand(
24145
+ return tr(() => t.registerCommand(
24142
24146
  Fn.INDENT_CONTENT_COMMAND,
24143
24147
  () => !UC(e || 7),
24144
24148
  zC
@@ -26089,11 +26093,11 @@ const bT = (e, t) => e(t, "i", ss(e, t)), LT = (e, t) => e(t, "b", ss(e, t)), IT
26089
26093
  }, fw = (e) => {
26090
26094
  const [t, n] = Nr();
26091
26095
  let r;
26092
- return sr(() => {
26096
+ return tr(() => {
26093
26097
  (async () => {
26094
26098
  if (!r)
26095
26099
  try {
26096
- r = (await import("./index-B0QFvm3r.js")).default;
26100
+ r = (await import("./index-BqwUybQE.js")).default;
26097
26101
  } catch {
26098
26102
  throw new Error(
26099
26103
  "Failed to import React Markdown, cannot properly render LegacyRichText."
@@ -31794,7 +31798,7 @@ function jv(e, t) {
31794
31798
  }
31795
31799
  const hw = (e) => {
31796
31800
  const [t, n] = Nr(!1), [r, l] = Nr(!1);
31797
- sr(() => {
31801
+ tr(() => {
31798
31802
  l(!0);
31799
31803
  }, []);
31800
31804
  const d = e.statusTemplate || jv, f = new e_(e.hours, e.timezone), p = f.isOpenNow(), _ = f.getCurrentInterval(), T = f.getNextInterval(), E = (_ == null ? void 0 : _.end) || (T == null ? void 0 : T.start);
@@ -31852,7 +31856,7 @@ function Jv(e, t, n) {
31852
31856
  }
31853
31857
  const gw = (e) => {
31854
31858
  const [t, n] = Nr(!1);
31855
- sr(() => {
31859
+ tr(() => {
31856
31860
  n(!0);
31857
31861
  }, []);
31858
31862
  const r = new e_(