@uva-glass/component-library 3.35.0 → 3.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/{Lexical.prod-C7FcGFd7.js → Lexical.prod-7x3WP3vd.js} +562 -563
  2. package/dist/Lexical.prod-7x3WP3vd.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-CeOlk1NB.js → LexicalClipboard.prod-BMLLh6JL.js} +11 -11
  4. package/dist/{LexicalClipboard.prod-CeOlk1NB.js.map → LexicalClipboard.prod-BMLLh6JL.js.map} +1 -1
  5. package/dist/{LexicalLink.prod-CSI9BSPD.js → LexicalLink.prod-Dr6L083o.js} +3 -3
  6. package/dist/{LexicalLink.prod-CSI9BSPD.js.map → LexicalLink.prod-Dr6L083o.js.map} +1 -1
  7. package/dist/{LexicalList.prod-TMA2LN4v.js → LexicalList.prod-nl__pKjG.js} +11 -11
  8. package/dist/{LexicalList.prod-TMA2LN4v.js.map → LexicalList.prod-nl__pKjG.js.map} +1 -1
  9. package/dist/{LexicalSelection.prod-DDwSrdAV.js → LexicalSelection.prod-CB_xP0pP.js} +24 -22
  10. package/dist/{LexicalSelection.prod-DDwSrdAV.js.map → LexicalSelection.prod-CB_xP0pP.js.map} +1 -1
  11. package/dist/{LexicalTable.prod-DYP5JQC0.js → LexicalTable.prod-CwkGGOke.js} +4 -4
  12. package/dist/{LexicalTable.prod-DYP5JQC0.js.map → LexicalTable.prod-CwkGGOke.js.map} +1 -1
  13. package/dist/{LexicalUtils.prod-D_SPJ6vo.js → LexicalUtils.prod-CtYaCJNB.js} +25 -25
  14. package/dist/LexicalUtils.prod-CtYaCJNB.js.map +1 -0
  15. package/dist/{TablePlugin-CI_6HCsd.js → TablePlugin-C38z2r5y.js} +4 -4
  16. package/dist/{TablePlugin-CI_6HCsd.js.map → TablePlugin-C38z2r5y.js.map} +1 -1
  17. package/dist/{client-D0KlBcsm.js → client-BIzWgcD3.js} +766 -758
  18. package/dist/{client-D0KlBcsm.js.map → client-BIzWgcD3.js.map} +1 -1
  19. package/dist/components/Accordion/Accordion.test.js +3 -3
  20. package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
  21. package/dist/components/ActionList/ActionList.test.js +3 -3
  22. package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
  23. package/dist/components/Attention/Attention.test.js +2 -2
  24. package/dist/components/Backdrop/Backdrop.test.js +2 -2
  25. package/dist/components/Buttons/Button.stories.js +1 -1
  26. package/dist/components/Buttons/Button.test.js +2 -2
  27. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  28. package/dist/components/Buttons/LinkButton.test.js +2 -2
  29. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  30. package/dist/components/Buttons/MenuButton.test.js +2 -2
  31. package/dist/components/Card/Card.test.js +2 -2
  32. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  33. package/dist/components/Checkbox/Checkbox.test.js +3 -3
  34. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  35. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
  36. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  37. package/dist/components/CheckboxTree/CheckboxTree.stories.js +7 -7
  38. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  39. package/dist/components/Chip/Chip.stories.js +1 -1
  40. package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
  41. package/dist/components/Drawer/Drawer.stories.js +1 -1
  42. package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
  43. package/dist/components/FormInput/FormInput.js +1 -1
  44. package/dist/components/FormInput/FormInput.stories.js +1 -1
  45. package/dist/components/IconButton/IconButton.stories.js +1 -1
  46. package/dist/components/InputField/InputField.stories.js +2 -2
  47. package/dist/components/Label/Label.test.js +2 -2
  48. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  49. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  50. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  51. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  52. package/dist/components/MultiSelect/index.js +1 -1
  53. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
  54. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
  55. package/dist/components/Notification/Notification.stories.js +1 -1
  56. package/dist/components/Notification/Notification.test.js +2 -2
  57. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  58. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  59. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  60. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  61. package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
  62. package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
  63. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  64. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
  65. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  66. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +5 -5
  67. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  68. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  69. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  70. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +4 -4
  71. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  72. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
  73. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
  74. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  75. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  76. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
  77. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  78. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
  79. package/dist/components/RteEditor/Plugins/index.js +1 -1
  80. package/dist/components/RteEditor/RteEditor.js +41 -41
  81. package/dist/components/RteEditor/helpers.js +4 -4
  82. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  83. package/dist/components/Sortable/Sortable.stories.js +1 -1
  84. package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
  85. package/dist/components/TextArea/TextArea.stories.js +1 -1
  86. package/dist/components/TextArea/TextArea.test.js +3 -3
  87. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  88. package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
  89. package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
  90. package/dist/components/index.js +1 -1
  91. package/dist/{helpers-CYiLlioz.js → helpers-B0VCD9f3.js} +4 -4
  92. package/dist/{helpers-CYiLlioz.js.map → helpers-B0VCD9f3.js.map} +1 -1
  93. package/dist/{index-Ccsg2cb2.js → index-D1fbc4P-.js} +7584 -6612
  94. package/dist/index-D1fbc4P-.js.map +1 -0
  95. package/dist/{index-Ds1dMTvJ.js → index-DDN7R-oN.js} +2 -2
  96. package/dist/{index-Ds1dMTvJ.js.map → index-DDN7R-oN.js.map} +1 -1
  97. package/dist/{index-C2E9FY6V.js → index-DFu0GqDc.js} +59 -39
  98. package/dist/index-DFu0GqDc.js.map +1 -0
  99. package/dist/{index-Br0QepD6.js → index-DzN3R4wD.js} +2894 -3784
  100. package/dist/index-DzN3R4wD.js.map +1 -0
  101. package/dist/index.js +1 -1
  102. package/dist/{react-18-inmoTCp-.js → react-18-CbXtwYTX.js} +2 -2
  103. package/dist/{react-18-inmoTCp-.js.map → react-18-CbXtwYTX.js.map} +1 -1
  104. package/dist/{react.esm-BKjCIfbB.js → react.esm-DMlPLy-4.js} +3 -3
  105. package/dist/{react.esm-BKjCIfbB.js.map → react.esm-DMlPLy-4.js.map} +1 -1
  106. package/dist/setupTests.js +1 -1
  107. package/dist/storybook__react.d.js +8079 -8042
  108. package/dist/storybook__react.d.js.map +1 -1
  109. package/package.json +33 -33
  110. package/dist/Lexical.prod-C7FcGFd7.js.map +0 -1
  111. package/dist/LexicalUtils.prod-D_SPJ6vo.js.map +0 -1
  112. package/dist/index-Br0QepD6.js.map +0 -1
  113. package/dist/index-C2E9FY6V.js.map +0 -1
  114. package/dist/index-Ccsg2cb2.js.map +0 -1
@@ -4,15 +4,15 @@ function T(n, ...e) {
4
4
  for (const i of e) r.append("v", i);
5
5
  throw t.search = r.toString(), Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
6
6
  }
7
- const ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, js = ae && "documentMode" in document ? document.documentMode : null, fe = ae && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Re = ae && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Qt = !(!ae || !("InputEvent" in window) || js) && "getTargetRanges" in new window.InputEvent("input"), vt = ae && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), rt = ae && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, $s = ae && /Android/.test(navigator.userAgent), Li = ae && /^(?=.*Chrome).*/i.test(navigator.userAgent), Ir = ae && $s && Li, Zt = ae && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Li;
7
+ const ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, js = ae && "documentMode" in document ? document.documentMode : null, fe = ae && /Mac|iPod|iPhone|iPad/.test(navigator.platform), We = ae && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Qt = !(!ae || !("InputEvent" in window) || js) && "getTargetRanges" in new window.InputEvent("input"), vt = ae && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), it = ae && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, $s = ae && /Android/.test(navigator.userAgent), Li = ae && /^(?=.*Chrome).*/i.test(navigator.userAgent), Ir = ae && $s && Li, Zt = ae && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Li;
8
8
  function en(...n) {
9
9
  const e = [];
10
10
  for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
11
11
  return e;
12
12
  }
13
- const Us = 1, Vs = 3, Ys = 9, Hs = 11, We = 0, Ii = 1, it = 2, qs = 0, Gs = 1, Xs = 2, tn = 4, nn = 8, or = 128, Qs = 1792 | (112 | (3 | tn | nn) | or), lr = 1, ar = 2, cr = 3, ur = 4, fr = 5, dr = 6, _n = vt || rt || Zt ? " " : "​", ve = `
13
+ const Us = 1, Vs = 3, Ys = 9, Hs = 11, Je = 0, Ii = 1, st = 2, qs = 0, Gs = 1, Xs = 2, tn = 4, nn = 8, lr = 128, Qs = 1792 | (112 | (3 | tn | nn) | lr), ar = 1, cr = 2, ur = 3, fr = 4, dr = 5, hr = 6, _n = vt || it || Zt ? " " : "​", ke = `
14
14
 
15
- `, Zs = Re ? " " : _n, zi = "֑-߿יִ-﷽ﹰ-ﻼ", Ki = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", eo = new RegExp("^[^" + Ki + "]*[" + zi + "]"), to = new RegExp("^[^" + zi + "]*[" + Ki + "]"), Je = { bold: 1, capitalize: 1024, code: 16, highlight: or, italic: 2, lowercase: 256, strikethrough: tn, subscript: 32, superscript: 64, underline: nn, uppercase: 512 }, no = { directionless: 1, unmergeable: 2 }, zr = { center: ar, end: dr, justify: ur, left: lr, right: cr, start: fr }, ro = { [ar]: "center", [dr]: "end", [ur]: "justify", [lr]: "left", [cr]: "right", [fr]: "start" }, io = { normal: 0, segmented: 2, token: 1 }, so = { [qs]: "normal", [Xs]: "segmented", [Gs]: "token" }, Kr = "$config";
15
+ `, Zs = We ? " " : _n, Ki = "֑-߿יִ-﷽ﹰ-ﻼ", zi = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", eo = new RegExp("^[^" + zi + "]*[" + Ki + "]"), to = new RegExp("^[^" + Ki + "]*[" + zi + "]"), je = { bold: 1, capitalize: 1024, code: 16, highlight: lr, italic: 2, lowercase: 256, strikethrough: tn, subscript: 32, superscript: 64, underline: nn, uppercase: 512 }, no = { directionless: 1, unmergeable: 2 }, Kr = { center: cr, end: hr, justify: fr, left: ar, right: ur, start: dr }, ro = { [cr]: "center", [hr]: "end", [fr]: "justify", [ar]: "left", [ur]: "right", [dr]: "start" }, io = { normal: 0, segmented: 2, token: 1 }, so = { [qs]: "normal", [Xs]: "segmented", [Gs]: "token" }, zr = "$config";
16
16
  function Bi(n, e, t, r, i, s) {
17
17
  let o = n.getFirstChild();
18
18
  for (; o !== null; ) {
@@ -21,16 +21,16 @@ function Bi(n, e, t, r, i, s) {
21
21
  }
22
22
  }
23
23
  const oo = 100;
24
- let jn = !1, hr = 0;
24
+ let $n = !1, gr = 0;
25
25
  function lo(n) {
26
- hr = n.timeStamp;
26
+ gr = n.timeStamp;
27
27
  }
28
- function Mn(n, e, t) {
28
+ function On(n, e, t) {
29
29
  const r = n.nodeName === "BR", i = e.__lexicalLineBreak;
30
- return i && (n === i || r && n.previousSibling === i) || r && kn(n, t) !== void 0;
30
+ return i && (n === i || r && n.previousSibling === i) || r && Tn(n, t) !== void 0;
31
31
  }
32
32
  function ao(n, e, t) {
33
- const r = ke(oe(t));
33
+ const r = Te(oe(t));
34
34
  let i = null, s = null;
35
35
  r !== null && r.anchorNode === n && (i = r.anchorOffset, s = r.focusOffset);
36
36
  const o = n.nodeValue;
@@ -41,20 +41,20 @@ function co(n, e, t) {
41
41
  const r = n.anchor.getNode();
42
42
  if (r.is(t) && n.format !== r.getFormat()) return !1;
43
43
  }
44
- return Te(e) && t.isAttached();
44
+ return Ne(e) && t.isAttached();
45
45
  }
46
46
  function uo(n, e, t, r) {
47
47
  for (let i = n; i && !ml(i); i = Lt(i)) {
48
- const s = kn(i, e);
48
+ const s = Tn(i, e);
49
49
  if (s !== void 0) {
50
50
  const o = U(s, t);
51
- if (o) return K(o) || !ee(i) ? void 0 : [i, o];
51
+ if (o) return z(o) || !ee(i) ? void 0 : [i, o];
52
52
  } else if (i === r) return [r, Ds(t)];
53
53
  }
54
54
  }
55
55
  function Ri(n, e, t) {
56
- jn = !0;
57
- const r = performance.now() - hr > oo;
56
+ $n = !0;
57
+ const r = performance.now() - gr > oo;
58
58
  try {
59
59
  te(n, () => {
60
60
  const i = L() || function(f) {
@@ -68,14 +68,14 @@ function Ri(n, e, t) {
68
68
  const g = e[f], h = g.type, _ = g.target, p = uo(_, n, l, o);
69
69
  if (!p) continue;
70
70
  const [x, y] = p;
71
- if (h === "characterData") r && M(y) && Te(_) && co(i, _, y) && ao(_, y, n);
71
+ if (h === "characterData") r && M(y) && Ne(_) && co(i, _, y) && ao(_, y, n);
72
72
  else if (h === "childList") {
73
73
  c = !0;
74
74
  const m = g.addedNodes;
75
75
  for (let C = 0; C < m.length; C++) {
76
76
  const w = m[C], k = Os(w), S = w.parentNode;
77
- if (S != null && w !== a && k === null && !Mn(w, S, n)) {
78
- if (Re) {
77
+ if (S != null && w !== a && k === null && !On(w, S, n)) {
78
+ if (We) {
79
79
  const O = (ee(w) ? w.innerText : null) || w.nodeValue;
80
80
  O && (u += O);
81
81
  }
@@ -87,7 +87,7 @@ function Ri(n, e, t) {
87
87
  let C = 0;
88
88
  for (let w = 0; w < b; w++) {
89
89
  const k = N[w];
90
- (Mn(k, _, n) || a === k) && (_.appendChild(k), C++);
90
+ (On(k, _, n) || a === k) && (_.appendChild(k), C++);
91
91
  }
92
92
  b !== C && s.set(x, y);
93
93
  }
@@ -100,15 +100,15 @@ function Ri(n, e, t) {
100
100
  const g = d[f], h = g.addedNodes, _ = g.target;
101
101
  for (let p = 0; p < h.length; p++) {
102
102
  const x = h[p], y = x.parentNode;
103
- y == null || x.nodeName !== "BR" || Mn(x, _, n) || y.removeChild(x);
103
+ y == null || x.nodeName !== "BR" || On(x, _, n) || y.removeChild(x);
104
104
  }
105
105
  }
106
106
  t.takeRecords();
107
107
  }
108
- i !== null && (c && ie(i), Re && Is(n) && i.insertRawText(u));
108
+ i !== null && (c && ie(i), We && Is(n) && i.insertRawText(u));
109
109
  });
110
110
  } finally {
111
- jn = !1;
111
+ $n = !1;
112
112
  }
113
113
  }
114
114
  function Wi(n) {
@@ -117,7 +117,7 @@ function Wi(n) {
117
117
  }
118
118
  function Ji(n) {
119
119
  (function(e) {
120
- hr === 0 && oe(e).addEventListener("textInput", lo, !0);
120
+ gr === 0 && oe(e).addEventListener("textInput", lo, !0);
121
121
  })(n), n._observer = new MutationObserver((e, t) => {
122
122
  Ri(n, e, t);
123
123
  });
@@ -133,7 +133,7 @@ function fo(n) {
133
133
  }
134
134
  return { flatKeys: t, sharedConfigMap: e };
135
135
  }
136
- class gr {
136
+ class _r {
137
137
  constructor(e, t, r = void 0, i = /* @__PURE__ */ new Map(), s = void 0) {
138
138
  this.node = e, this.sharedNodeState = t, this.unknownState = r, this.knownState = i;
139
139
  const { sharedConfigMap: o } = this.sharedNodeState, l = s !== void 0 ? s : function(a, c, u) {
@@ -169,7 +169,7 @@ class gr {
169
169
  getWritable(e) {
170
170
  if (this.node === e) return this;
171
171
  const { sharedNodeState: t, unknownState: r } = this, i = new Map(this.knownState);
172
- return new gr(e, t, function(s, o, l) {
172
+ return new _r(e, t, function(s, o, l) {
173
173
  let a;
174
174
  if (l) for (const [c, u] of Object.entries(l)) {
175
175
  const d = s.get(c);
@@ -195,7 +195,7 @@ class gr {
195
195
  }
196
196
  }
197
197
  function ho(n) {
198
- const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new gr(e, ji(e));
198
+ const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new _r(e, ji(e));
199
199
  return e.__state = t, t;
200
200
  }
201
201
  function ji(n) {
@@ -264,7 +264,7 @@ function Ur(n) {
264
264
  }
265
265
  } else r.remove();
266
266
  }
267
- function $n(n) {
267
+ function Un(n) {
268
268
  return Vr(n.anchor), Vr(n.focus), n;
269
269
  }
270
270
  function Vr(n) {
@@ -279,32 +279,32 @@ function Vr(n) {
279
279
  n.set(r.__key, i ? r.getChildrenSize() : 0, "element", !0);
280
280
  }
281
281
  }
282
- let Ae, Q, kt, pn, Un, Vn, je, le, Yn, Tt, J = "", X = "", ce = null, ue = "", Ce = "", $i = !1, Nt = !1, Vt = null;
282
+ let De, Q, kt, pn, Vn, Yn, $e, le, Hn, Tt, J = "", X = "", ce = null, ue = "", Se = "", $i = !1, Nt = !1, Vt = null;
283
283
  function rn(n, e) {
284
- const t = je.get(n);
284
+ const t = $e.get(n);
285
285
  if (e !== null) {
286
- const r = Gn(n);
286
+ const r = Xn(n);
287
287
  r.parentNode === e && e.removeChild(r);
288
288
  }
289
289
  if (le.has(n) || Q._keyToDOMMap.delete(n), v(t)) {
290
- const r = on(t, je);
291
- Hn(r, 0, r.length - 1, null);
290
+ const r = on(t, $e);
291
+ qn(r, 0, r.length - 1, null);
292
292
  }
293
293
  t !== void 0 && wr(Tt, kt, pn, t, "destroyed");
294
294
  }
295
- function Hn(n, e, t, r) {
295
+ function qn(n, e, t, r) {
296
296
  let i = e;
297
297
  for (; i <= t; ++i) {
298
298
  const s = n[i];
299
299
  s !== void 0 && rn(s, r);
300
300
  }
301
301
  }
302
- function Le(n, e) {
302
+ function Ie(n, e) {
303
303
  n.setProperty("text-align", e);
304
304
  }
305
305
  const go = "40px";
306
306
  function Ui(n, e) {
307
- const t = Ae.theme.indent;
307
+ const t = De.theme.indent;
308
308
  if (typeof t == "string") {
309
309
  const i = n.classList.contains(t);
310
310
  e > 0 && !i ? n.classList.add(t) : e < 1 && i && n.classList.remove(t);
@@ -314,40 +314,40 @@ function Ui(n, e) {
314
314
  }
315
315
  function Vi(n, e) {
316
316
  const t = n.style;
317
- e === 0 ? Le(t, "") : e === lr ? Le(t, "left") : e === ar ? Le(t, "center") : e === cr ? Le(t, "right") : e === ur ? Le(t, "justify") : e === fr ? Le(t, "start") : e === dr && Le(t, "end");
317
+ e === 0 ? Ie(t, "") : e === ar ? Ie(t, "left") : e === cr ? Ie(t, "center") : e === ur ? Ie(t, "right") : e === fr ? Ie(t, "justify") : e === dr ? Ie(t, "start") : e === hr && Ie(t, "end");
318
318
  }
319
319
  function sn(n, e) {
320
320
  const t = le.get(n);
321
321
  t === void 0 && T(60);
322
- const r = t.createDOM(Ae, Q);
322
+ const r = t.createDOM(De, Q);
323
323
  if (function(i, s, o) {
324
324
  const l = o._keyToDOMMap;
325
325
  (function(a, c, u) {
326
326
  const d = `__lexicalKey_${c._key}`;
327
327
  a[d] = u;
328
328
  })(s, o, i), l.set(i, s);
329
- }(n, r, Q), M(t) ? r.setAttribute("data-lexical-text", "true") : K(t) && r.setAttribute("data-lexical-decorator", "true"), v(t)) {
329
+ }(n, r, Q), M(t) ? r.setAttribute("data-lexical-text", "true") : z(t) && r.setAttribute("data-lexical-decorator", "true"), v(t)) {
330
330
  const i = t.__indent, s = t.__size;
331
331
  if (i !== 0 && Ui(r, i), s !== 0) {
332
332
  const l = s - 1;
333
333
  (function(a, c, u, d) {
334
334
  const f = X;
335
- X = "", qn(a, u, 0, c, u.getDOMSlot(d)), Hi(u, d), X = f;
335
+ X = "", Gn(a, u, 0, c, u.getDOMSlot(d)), Hi(u, d), X = f;
336
336
  })(on(t, le), l, t, r);
337
337
  }
338
338
  const o = t.__format;
339
- o !== 0 && Vi(r, o), t.isInline() || Yi(null, t, r), Tn(t) && (J += ve, Ce += ve);
339
+ o !== 0 && Vi(r, o), t.isInline() || Yi(null, t, r), Nn(t) && (J += ke, Se += ke);
340
340
  } else {
341
341
  const i = t.getTextContent();
342
- if (K(t)) {
343
- const s = t.decorate(Q, Ae);
342
+ if (z(t)) {
343
+ const s = t.decorate(Q, De);
344
344
  s !== null && qi(n, s), r.contentEditable = "false";
345
345
  } else M(t) && (t.isDirectionless() || (X += i));
346
- J += i, Ce += i;
346
+ J += i, Se += i;
347
347
  }
348
348
  return e !== null && e.insertChild(r), wr(Tt, kt, pn, t, "created"), r;
349
349
  }
350
- function qn(n, e, t, r, i) {
350
+ function Gn(n, e, t, r, i) {
351
351
  const s = J;
352
352
  J = "";
353
353
  let o = t;
@@ -356,21 +356,21 @@ function qn(n, e, t, r, i) {
356
356
  const l = le.get(n[o]);
357
357
  l !== null && M(l) && (ce === null && (ce = l.getFormat()), ue === "" && (ue = l.getStyle()));
358
358
  }
359
- Tn(e) && (J += ve), i.element.__lexicalTextContent = J, J = s + J;
359
+ Nn(e) && (J += ke), i.element.__lexicalTextContent = J, J = s + J;
360
360
  }
361
361
  function Yr(n, e) {
362
362
  if (n) {
363
363
  const t = n.__last;
364
364
  if (t) {
365
365
  const r = e.get(t);
366
- if (r) return tt(r) ? "line-break" : K(r) && r.isInline() ? "decorator" : null;
366
+ if (r) return nt(r) ? "line-break" : z(r) && r.isInline() ? "decorator" : null;
367
367
  }
368
368
  return "empty";
369
369
  }
370
370
  return null;
371
371
  }
372
372
  function Yi(n, e, t) {
373
- const r = Yr(n, je), i = Yr(e, le);
373
+ const r = Yr(n, $e), i = Yr(e, le);
374
374
  r !== i && e.getDOMSlot(t).setManagedLineBreak(i);
375
375
  }
376
376
  function Hi(n, e) {
@@ -380,7 +380,7 @@ function Hi(n, e) {
380
380
  return eo.test(o) ? "rtl" : to.test(o) ? "ltr" : null;
381
381
  }(X);
382
382
  if (s !== r) {
383
- const o = e.classList, l = Ae.theme;
383
+ const o = e.classList, l = De.theme;
384
384
  let a = r !== null ? l[r] : void 0, c = s !== null ? l[s] : void 0;
385
385
  if (a !== void 0) {
386
386
  if (typeof a == "string") {
@@ -416,7 +416,7 @@ function _o(n, e, t) {
416
416
  const f = s.__first, g = o.__first;
417
417
  if (f === g) pt(f, d);
418
418
  else {
419
- const _ = Gn(f), p = sn(g, null);
419
+ const _ = Xn(f), p = sn(g, null);
420
420
  try {
421
421
  d.replaceChild(p, _);
422
422
  } catch (x) {
@@ -431,39 +431,39 @@ function _o(n, e, t) {
431
431
  const h = le.get(g);
432
432
  M(h) && (ce === null && (ce = h.getFormat()), ue === "" && (ue = h.getStyle()));
433
433
  } else {
434
- const f = on(s, je), g = on(o, le);
435
- if (f.length !== c && T(227), g.length !== u && T(228), c === 0) u !== 0 && qn(g, o, 0, u - 1, l);
434
+ const f = on(s, $e), g = on(o, le);
435
+ if (f.length !== c && T(227), g.length !== u && T(228), c === 0) u !== 0 && Gn(g, o, 0, u - 1, l);
436
436
  else if (u === 0) {
437
437
  if (c !== 0) {
438
438
  const h = l.after == null && l.before == null && l.element.__lexicalLineBreak == null;
439
- Hn(f, 0, c - 1, h ? null : d), h && (d.textContent = "");
439
+ qn(f, 0, c - 1, h ? null : d), h && (d.textContent = "");
440
440
  }
441
441
  } else (function(h, _, p, x, y, m) {
442
442
  const N = x - 1, b = y - 1;
443
443
  let C, w, k = m.getFirstChild(), S = 0, O = 0;
444
444
  for (; S <= N && O <= b; ) {
445
- const z = _[S], P = p[O];
446
- if (z === P) k = On(pt(P, m.element)), S++, O++;
445
+ const K = _[S], P = p[O];
446
+ if (K === P) k = An(pt(P, m.element)), S++, O++;
447
447
  else {
448
448
  C === void 0 && (C = new Set(_)), w === void 0 && (w = new Set(p));
449
- const q = w.has(z), se = C.has(P);
449
+ const q = w.has(K), se = C.has(P);
450
450
  if (q) if (se) {
451
- const _e = ot(Q, P);
452
- _e === k ? k = On(pt(P, m.element)) : (m.withBefore(k).insertChild(_e), pt(P, m.element)), S++, O++;
451
+ const pe = lt(Q, P);
452
+ pe === k ? k = An(pt(P, m.element)) : (m.withBefore(k).insertChild(pe), pt(P, m.element)), S++, O++;
453
453
  } else sn(P, m.withBefore(k)), O++;
454
- else k = On(Gn(z)), rn(z, m.element), S++;
454
+ else k = An(Xn(K)), rn(K, m.element), S++;
455
455
  }
456
456
  const B = le.get(P);
457
457
  B !== null && M(B) && (ce === null && (ce = B.getFormat()), ue === "" && (ue = B.getStyle()));
458
458
  }
459
459
  const F = S > N, W = O > b;
460
460
  if (F && !W) {
461
- const z = p[b + 1], P = z === void 0 ? null : Q.getElementByKey(z);
462
- qn(p, h, O, b, m.withBefore(P));
463
- } else W && !F && Hn(_, S, N, m.element);
461
+ const K = p[b + 1], P = K === void 0 ? null : Q.getElementByKey(K);
462
+ Gn(p, h, O, b, m.withBefore(P));
463
+ } else W && !F && qn(_, S, N, m.element);
464
464
  })(o, f, g, c, u, l);
465
465
  }
466
- Tn(o) && (J += ve), d.__lexicalTextContent = J, J = a + J;
466
+ Nn(o) && (J += ke), d.__lexicalTextContent = J, J = a + J;
467
467
  }(n, e, e.getDOMSlot(t)), Hi(e, t), i = e, ce == null || ce === i.__textFormat || Nt || i.setTextFormat(ce), function(s) {
468
468
  ue === "" || ue === s.__textStyle || Nt || s.setTextStyle(ue);
469
469
  }(e), X = r;
@@ -478,23 +478,23 @@ function on(n, e) {
478
478
  return t;
479
479
  }
480
480
  function pt(n, e) {
481
- const t = je.get(n);
481
+ const t = $e.get(n);
482
482
  let r = le.get(n);
483
483
  t !== void 0 && r !== void 0 || T(61);
484
- const i = $i || Vn.has(n) || Un.has(n), s = ot(Q, n);
484
+ const i = $i || Yn.has(n) || Vn.has(n), s = lt(Q, n);
485
485
  if (t === r && !i) {
486
486
  if (v(t)) {
487
487
  const o = s.__lexicalTextContent;
488
- o !== void 0 && (J += o, Ce += o);
488
+ o !== void 0 && (J += o, Se += o);
489
489
  const l = s.__lexicalDirTextContent;
490
490
  l !== void 0 && (X += l);
491
491
  } else {
492
492
  const o = t.getTextContent();
493
- M(t) && !t.isDirectionless() && (X += o), Ce += o, J += o;
493
+ M(t) && !t.isDirectionless() && (X += o), Se += o, J += o;
494
494
  }
495
495
  return s;
496
496
  }
497
- if (t !== r && i && wr(Tt, kt, pn, r, "updated"), r.updateDOM(t, s, Ae)) {
497
+ if (t !== r && i && wr(Tt, kt, pn, r, "updated"), r.updateDOM(t, s, De)) {
498
498
  const o = sn(n, null);
499
499
  return e === null && T(62), e.replaceChild(o, s), rn(n, null), o;
500
500
  }
@@ -502,18 +502,18 @@ function pt(n, e) {
502
502
  const o = r.__indent;
503
503
  o !== t.__indent && Ui(s, o);
504
504
  const l = r.__format;
505
- l !== t.__format && Vi(s, l), i && (_o(t, r, s), ne(r) || r.isInline() || Yi(t, r, s)), Tn(r) && (J += ve, Ce += ve);
505
+ l !== t.__format && Vi(s, l), i && (_o(t, r, s), ne(r) || r.isInline() || Yi(t, r, s)), Nn(r) && (J += ke, Se += ke);
506
506
  } else {
507
507
  const o = r.getTextContent();
508
- if (K(r)) {
509
- const l = r.decorate(Q, Ae);
508
+ if (z(r)) {
509
+ const l = r.decorate(Q, De);
510
510
  l !== null && qi(n, l);
511
511
  } else M(r) && !r.isDirectionless() && (X += o);
512
- J += o, Ce += o;
512
+ J += o, Se += o;
513
513
  }
514
- if (!Nt && ne(r) && r.__cachedText !== Ce) {
514
+ if (!Nt && ne(r) && r.__cachedText !== Se) {
515
515
  const o = r.getWritable();
516
- o.__cachedText = Ce, r = o;
516
+ o.__cachedText = Se, r = o;
517
517
  }
518
518
  return s;
519
519
  }
@@ -526,38 +526,38 @@ function qi(n, e) {
526
526
  }
527
527
  t[n] = e;
528
528
  }
529
- function On(n) {
529
+ function An(n) {
530
530
  let e = n.nextSibling;
531
531
  return e !== null && e === Q._blockCursorElement && (e = e.nextSibling), e;
532
532
  }
533
533
  function po(n, e, t, r, i, s) {
534
- J = "", Ce = "", X = "", $i = r === it, Vt = null, Q = t, Ae = t._config, kt = t._nodes, pn = Q._listeners.mutation, Un = i, Vn = s, je = n._nodeMap, le = e._nodeMap, Nt = e._readOnly, Yn = new Map(t._keyToDOMMap);
534
+ J = "", Se = "", X = "", $i = r === st, Vt = null, Q = t, De = t._config, kt = t._nodes, pn = Q._listeners.mutation, Vn = i, Yn = s, $e = n._nodeMap, le = e._nodeMap, Nt = e._readOnly, Hn = new Map(t._keyToDOMMap);
535
535
  const o = /* @__PURE__ */ new Map();
536
- return Tt = o, pt("root", null), Q = void 0, kt = void 0, Un = void 0, Vn = void 0, je = void 0, le = void 0, Ae = void 0, Yn = void 0, Tt = void 0, o;
536
+ return Tt = o, pt("root", null), Q = void 0, kt = void 0, Vn = void 0, Yn = void 0, $e = void 0, le = void 0, De = void 0, Hn = void 0, Tt = void 0, o;
537
537
  }
538
- function Gn(n) {
539
- const e = Yn.get(n);
538
+ function Xn(n) {
539
+ const e = Hn.get(n);
540
540
  return e === void 0 && T(75, n), e;
541
541
  }
542
542
  function D(n) {
543
543
  return { type: n };
544
544
  }
545
- const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), yo = D("CLICK_COMMAND"), ln = D("DELETE_CHARACTER_COMMAND"), Yt = D("INSERT_LINE_BREAK_COMMAND"), Hr = D("INSERT_PARAGRAPH_COMMAND"), yt = D("CONTROLLED_TEXT_INSERTION_COMMAND"), Xi = D("PASTE_COMMAND"), qr = D("REMOVE_TEXT_COMMAND"), an = D("DELETE_WORD_COMMAND"), cn = D("DELETE_LINE_COMMAND"), ze = D("FORMAT_TEXT_COMMAND"), Qi = D("UNDO_COMMAND"), Zi = D("REDO_COMMAND"), mo = D("KEYDOWN_COMMAND"), xo = D("KEY_ARROW_RIGHT_COMMAND"), Co = D("MOVE_TO_END"), So = D("KEY_ARROW_LEFT_COMMAND"), vo = D("MOVE_TO_START"), ko = D("KEY_ARROW_UP_COMMAND"), To = D("KEY_ARROW_DOWN_COMMAND"), Xn = D("KEY_ENTER_COMMAND"), No = D("KEY_SPACE_COMMAND"), bo = D("KEY_BACKSPACE_COMMAND"), wo = D("KEY_ESCAPE_COMMAND"), Eo = D("KEY_DELETE_COMMAND"), Mo = D("KEY_TAB_COMMAND"), Fl = D("INSERT_TAB_COMMAND"), Ll = D("INDENT_CONTENT_COMMAND"), Il = D("OUTDENT_CONTENT_COMMAND"), Oo = D("DROP_COMMAND"), zl = D("FORMAT_ELEMENT_COMMAND"), Ao = D("DRAGSTART_COMMAND"), Do = D("DRAGOVER_COMMAND"), Po = D("DRAGEND_COMMAND"), es = D("COPY_COMMAND"), ts = D("CUT_COMMAND"), Gr = D("SELECT_ALL_COMMAND"), Kl = D("CLEAR_EDITOR_COMMAND"), Bl = D("CLEAR_HISTORY_COMMAND"), Rl = D("CAN_REDO_COMMAND"), Wl = D("CAN_UNDO_COMMAND"), Fo = D("FOCUS_COMMAND"), Lo = D("BLUR_COMMAND"), Io = D("KEY_MODIFIER_COMMAND"), ye = Object.freeze({}), Qn = 30, Zn = [["keydown", function(n, e) {
545
+ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), yo = D("CLICK_COMMAND"), ln = D("DELETE_CHARACTER_COMMAND"), Yt = D("INSERT_LINE_BREAK_COMMAND"), Hr = D("INSERT_PARAGRAPH_COMMAND"), yt = D("CONTROLLED_TEXT_INSERTION_COMMAND"), Xi = D("PASTE_COMMAND"), qr = D("REMOVE_TEXT_COMMAND"), an = D("DELETE_WORD_COMMAND"), cn = D("DELETE_LINE_COMMAND"), ze = D("FORMAT_TEXT_COMMAND"), Qi = D("UNDO_COMMAND"), Zi = D("REDO_COMMAND"), mo = D("KEYDOWN_COMMAND"), xo = D("KEY_ARROW_RIGHT_COMMAND"), Co = D("MOVE_TO_END"), So = D("KEY_ARROW_LEFT_COMMAND"), vo = D("MOVE_TO_START"), ko = D("KEY_ARROW_UP_COMMAND"), To = D("KEY_ARROW_DOWN_COMMAND"), Qn = D("KEY_ENTER_COMMAND"), No = D("KEY_SPACE_COMMAND"), bo = D("KEY_BACKSPACE_COMMAND"), wo = D("KEY_ESCAPE_COMMAND"), Eo = D("KEY_DELETE_COMMAND"), Mo = D("KEY_TAB_COMMAND"), Fl = D("INSERT_TAB_COMMAND"), Ll = D("INDENT_CONTENT_COMMAND"), Il = D("OUTDENT_CONTENT_COMMAND"), Oo = D("DROP_COMMAND"), Kl = D("FORMAT_ELEMENT_COMMAND"), Ao = D("DRAGSTART_COMMAND"), Do = D("DRAGOVER_COMMAND"), Po = D("DRAGEND_COMMAND"), es = D("COPY_COMMAND"), ts = D("CUT_COMMAND"), Gr = D("SELECT_ALL_COMMAND"), zl = D("CLEAR_EDITOR_COMMAND"), Bl = D("CLEAR_HISTORY_COMMAND"), Rl = D("CAN_REDO_COMMAND"), Wl = D("CAN_UNDO_COMMAND"), Fo = D("FOCUS_COMMAND"), Lo = D("BLUR_COMMAND"), Io = D("KEY_MODIFIER_COMMAND"), me = Object.freeze({}), Zn = 30, er = [["keydown", function(n, e) {
546
546
  if (mt = n.timeStamp, ns = n.key, !e.isComposing() && !E(e, mo, n) && n.key != null) {
547
- if (An && Ni(n)) return te(e, () => {
548
- Wt(e, Dn);
549
- }), An = !1, void (Dn = "");
547
+ if (Dn && Ni(n)) return te(e, () => {
548
+ Wt(e, Pn);
549
+ }), Dn = !1, void (Pn = "");
550
550
  if (function(t) {
551
551
  return I(t, "ArrowRight", { shiftKey: "any" });
552
552
  }(n)) E(e, xo, n);
553
553
  else if (function(t) {
554
- return I(t, "ArrowRight", xe);
554
+ return I(t, "ArrowRight", Ce);
555
555
  }(n)) E(e, Co, n);
556
556
  else if (function(t) {
557
557
  return I(t, "ArrowLeft", { shiftKey: "any" });
558
558
  }(n)) E(e, So, n);
559
559
  else if (function(t) {
560
- return I(t, "ArrowLeft", xe);
560
+ return I(t, "ArrowLeft", Ce);
561
561
  }(n)) E(e, vo, n);
562
562
  else if (function(t) {
563
563
  return I(t, "ArrowUp", { altKey: "any", shiftKey: "any" });
@@ -567,7 +567,7 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
567
567
  }(n)) E(e, To, n);
568
568
  else if (function(t) {
569
569
  return I(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any", shiftKey: !0 });
570
- }(n)) xt = !0, E(e, Xn, n);
570
+ }(n)) xt = !0, E(e, Qn, n);
571
571
  else if (function(t) {
572
572
  return t.key === " ";
573
573
  }(n)) E(e, No, n);
@@ -576,7 +576,7 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
576
576
  }(n)) n.preventDefault(), xt = !0, E(e, Yt, !0);
577
577
  else if (function(t) {
578
578
  return I(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any" });
579
- }(n)) xt = !1, E(e, Xn, n);
579
+ }(n)) xt = !1, E(e, Qn, n);
580
580
  else if (function(t) {
581
581
  return I(t, "Backspace", { shiftKey: "any" }) || fe && I(t, "h", { ctrlKey: !0 });
582
582
  }(n)) Ni(n) ? E(e, bo, n) : (n.preventDefault(), E(e, ln, !0));
@@ -601,19 +601,19 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
601
601
  return fe && (I(t, "Delete", { metaKey: !0 }) || I(t, "k", { ctrlKey: !0 }));
602
602
  }(n)) n.preventDefault(), E(e, cn, !1);
603
603
  else if (function(t) {
604
- return I(t, "b", xe);
604
+ return I(t, "b", Ce);
605
605
  }(n)) n.preventDefault(), E(e, ze, "bold");
606
606
  else if (function(t) {
607
- return I(t, "u", xe);
607
+ return I(t, "u", Ce);
608
608
  }(n)) n.preventDefault(), E(e, ze, "underline");
609
609
  else if (function(t) {
610
- return I(t, "i", xe);
610
+ return I(t, "i", Ce);
611
611
  }(n)) n.preventDefault(), E(e, ze, "italic");
612
612
  else if (function(t) {
613
613
  return I(t, "Tab", { shiftKey: "any" });
614
614
  }(n)) E(e, Mo, n);
615
615
  else if (function(t) {
616
- return I(t, "z", xe);
616
+ return I(t, "z", Ce);
617
617
  }(n)) n.preventDefault(), E(e, Qi, void 0);
618
618
  else if (function(t) {
619
619
  return fe ? I(t, "z", { metaKey: !0, shiftKey: !0 }) : I(t, "y", { ctrlKey: !0 }) || I(t, "z", { ctrlKey: !0, shiftKey: !0 });
@@ -621,9 +621,9 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
621
621
  else {
622
622
  const t = e._editorState._selection;
623
623
  t === null || A(t) ? bi(n) && (n.preventDefault(), E(e, Gr, n)) : function(r) {
624
- return I(r, "c", xe);
624
+ return I(r, "c", Ce);
625
625
  }(n) ? (n.preventDefault(), E(e, es, n)) : function(r) {
626
- return I(r, "x", xe);
626
+ return I(r, "x", Ce);
627
627
  }(n) ? (n.preventDefault(), E(e, ts, n)) : bi(n) && (n.preventDefault(), E(e, Gr, n));
628
628
  }
629
629
  (function(t) {
@@ -633,32 +633,32 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
633
633
  }], ["pointerdown", function(n, e) {
634
634
  const t = n.target, r = n.pointerType;
635
635
  It(t) && r !== "touch" && r !== "pen" && n.button === 0 && te(e, () => {
636
- Si(t) || (tr = !0);
636
+ Si(t) || (nr = !0);
637
637
  });
638
638
  }], ["compositionstart", function(n, e) {
639
639
  te(e, () => {
640
640
  const t = L();
641
641
  if (A(t) && !e.isComposing()) {
642
642
  const r = t.anchor, i = t.anchor.getNode();
643
- Y(r.key), (n.timeStamp < mt + Qn || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || M(i) && i.getStyle() !== t.style) && E(e, yt, Zs);
643
+ Y(r.key), (n.timeStamp < mt + Zn || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || M(i) && i.getStyle() !== t.style) && E(e, yt, Zs);
644
644
  }
645
645
  });
646
646
  }], ["compositionend", function(n, e) {
647
- Re ? gt = !0 : rt || !vt && !Zt ? te(e, () => {
647
+ We ? gt = !0 : it || !vt && !Zt ? te(e, () => {
648
648
  Wt(e, n.data);
649
- }) : (An = !0, Dn = n.data);
649
+ }) : (Dn = !0, Pn = n.data);
650
650
  }], ["input", function(n, e) {
651
651
  n.stopPropagation(), te(e, () => {
652
652
  if (ee(n.target) && Si(n.target)) return;
653
653
  const t = L(), r = n.data, i = ls(n);
654
654
  if (r != null && A(t) && ss(t, i, r, n.timeStamp, !1)) {
655
655
  gt && (Wt(e, r), gt = !1);
656
- const s = t.anchor.getNode(), o = ke(oe(e));
656
+ const s = t.anchor.getNode(), o = Te(oe(e));
657
657
  if (o === null) return;
658
658
  const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, c = l ? t.focus.offset : t.anchor.offset;
659
659
  Qt && !t.isCollapsed() && M(s) && o.anchorNode !== null && s.getTextContent().slice(0, a) + r + s.getTextContent().slice(a + c) === Ls(o.anchorNode) || E(e, yt, r);
660
660
  const u = r.length;
661
- Re && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), vt || rt || Zt || !e.isComposing() || (mt = 0, Y(null));
661
+ We && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), vt || it || Zt || !e.isComposing() || (mt = 0, Y(null));
662
662
  } else
663
663
  Nr(!1, e, r !== null ? r : void 0), gt && (Wt(e, r || void 0), gt = !1);
664
664
  (function() {
@@ -666,10 +666,10 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
666
666
  const s = R();
667
667
  Wi(s);
668
668
  })();
669
- }, { event: n }), Qe = null;
669
+ }, { event: n }), Ze = null;
670
670
  }], ["click", function(n, e) {
671
671
  te(e, () => {
672
- const t = L(), r = ke(oe(e)), i = ft();
672
+ const t = L(), r = Te(oe(e)), i = ft();
673
673
  if (r) {
674
674
  if (A(t)) {
675
675
  const s = t.anchor, o = s.getNode();
@@ -687,15 +687,15 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
687
687
  }
688
688
  } else if (n.pointerType === "touch" || n.pointerType === "pen") {
689
689
  const s = r.anchorNode;
690
- (ee(s) || Te(s)) && ie(mn(i, r, e, n));
690
+ (ee(s) || Ne(s)) && ie(mn(i, r, e, n));
691
691
  }
692
692
  }
693
693
  E(e, yo, n);
694
694
  });
695
- }], ["cut", ye], ["copy", ye], ["dragstart", ye], ["dragover", ye], ["dragend", ye], ["paste", ye], ["focus", ye], ["blur", ye], ["drop", ye]];
696
- Qt && Zn.push(["beforeinput", (n, e) => function(t, r) {
695
+ }], ["cut", me], ["copy", me], ["dragstart", me], ["dragover", me], ["dragend", me], ["paste", me], ["focus", me], ["blur", me], ["drop", me]];
696
+ Qt && er.push(["beforeinput", (n, e) => function(t, r) {
697
697
  const i = t.inputType, s = ls(t);
698
- i === "deleteCompositionText" || Re && Is(r) || i !== "insertCompositionText" && te(r, () => {
698
+ i === "deleteCompositionText" || We && Is(r) || i !== "insertCompositionText" && te(r, () => {
699
699
  const o = L();
700
700
  if (i === "deleteContentBackward") {
701
701
  if (o === null) {
@@ -705,12 +705,12 @@ Qt && Zn.push(["beforeinput", (n, e) => function(t, r) {
705
705
  }
706
706
  if (A(o)) {
707
707
  const g = o.anchor.key === o.focus.key;
708
- if (l = t.timeStamp, ns === "MediaLast" && l < mt + Qn && r.isComposing() && g) {
708
+ if (l = t.timeStamp, ns === "MediaLast" && l < mt + Zn && r.isComposing() && g) {
709
709
  if (Y(null), mt = 0, setTimeout(() => {
710
710
  te(r, () => {
711
711
  Y(null);
712
712
  });
713
- }, Qn), A(o)) {
713
+ }, Zn), A(o)) {
714
714
  const h = o.anchor.getNode();
715
715
  h.markDirty(), M(h) || T(142), os(o, h);
716
716
  }
@@ -718,10 +718,10 @@ Qt && Zn.push(["beforeinput", (n, e) => function(t, r) {
718
718
  Y(null), t.preventDefault();
719
719
  const h = o.anchor.getNode(), _ = h.getTextContent(), p = h.canInsertTextAfter(), x = o.anchor.offset === 0 && o.focus.offset === _.length;
720
720
  let y = Ir && g && !x && p;
721
- if (y && o.isCollapsed() && (y = !K(sl(o.anchor, !0))), !y) {
721
+ if (y && o.isCollapsed() && (y = !z(sl(o.anchor, !0))), !y) {
722
722
  E(r, ln, !0);
723
723
  const m = L();
724
- Ir && A(m) && m.isCollapsed() && (Ie = m, setTimeout(() => Ie = null));
724
+ Ir && A(m) && m.isCollapsed() && (Ke = m, setTimeout(() => Ke = null));
725
725
  }
726
726
  }
727
727
  return;
@@ -730,7 +730,7 @@ Qt && Zn.push(["beforeinput", (n, e) => function(t, r) {
730
730
  var l;
731
731
  if (!A(o)) return;
732
732
  const a = t.data;
733
- Qe !== null && Nr(!1, r, Qe), o.dirty && Qe === null || !o.isCollapsed() || ne(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Qe = null;
733
+ Ze !== null && Nr(!1, r, Ze), o.dirty && Ze === null || !o.isCollapsed() || ne(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Ze = null;
734
734
  const c = o.anchor, u = o.focus, d = c.getNode(), f = u.getNode();
735
735
  if (i !== "insertText" && i !== "insertTranspose") switch (t.preventDefault(), i) {
736
736
  case "insertFromYank":
@@ -745,7 +745,7 @@ Qt && Zn.push(["beforeinput", (n, e) => function(t, r) {
745
745
  Y(null), E(r, Yt, !1);
746
746
  break;
747
747
  case "insertParagraph":
748
- Y(null), xt && !rt ? (xt = !1, E(r, Yt, !1)) : E(r, Hr, void 0);
748
+ Y(null), xt && !it ? (xt = !1, E(r, Yt, !1)) : E(r, Hr, void 0);
749
749
  break;
750
750
  case "insertFromPaste":
751
751
  case "insertFromPasteAsQuotation":
@@ -753,7 +753,7 @@ Qt && Zn.push(["beforeinput", (n, e) => function(t, r) {
753
753
  break;
754
754
  case "deleteByComposition":
755
755
  (function(g, h) {
756
- return g !== h || v(g) || v(h) || !Ke(g) || !Ke(h);
756
+ return g !== h || v(g) || v(h) || !Be(g) || !Be(h);
757
757
  })(d, f) && E(r, qr, t);
758
758
  break;
759
759
  case "deleteByDrag":
@@ -799,24 +799,24 @@ Qt && Zn.push(["beforeinput", (n, e) => function(t, r) {
799
799
  else {
800
800
  if (a === `
801
801
  `) t.preventDefault(), E(r, Yt, !1);
802
- else if (a === ve) t.preventDefault(), E(r, Hr, void 0);
802
+ else if (a === ke) t.preventDefault(), E(r, Hr, void 0);
803
803
  else if (a == null && t.dataTransfer) {
804
804
  const g = t.dataTransfer.getData("text/plain");
805
805
  t.preventDefault(), o.insertRawText(g);
806
- } else a != null && ss(o, s, a, t.timeStamp, !0) ? (t.preventDefault(), E(r, yt, a)) : Qe = a;
806
+ } else a != null && ss(o, s, a, t.timeStamp, !0) ? (t.preventDefault(), E(r, yt, a)) : Ze = a;
807
807
  rs = t.timeStamp;
808
808
  }
809
809
  });
810
810
  }(n, e)]);
811
- let mt = 0, ns = null, rs = 0, Qe = null;
811
+ let mt = 0, ns = null, rs = 0, Ze = null;
812
812
  const un = /* @__PURE__ */ new WeakMap();
813
- let er = !1, tr = !1, xt = !1, gt = !1, An = !1, Dn = "", Ie = null, is = [0, "", 0, "root", 0];
813
+ let tr = !1, nr = !1, xt = !1, gt = !1, Dn = !1, Pn = "", Ke = null, is = [0, "", 0, "root", 0];
814
814
  function ss(n, e, t, r, i) {
815
- const s = n.anchor, o = n.focus, l = s.getNode(), a = R(), c = ke(oe(a)), u = c !== null ? c.anchorNode : null, d = s.key, f = a.getElementByKey(d), g = t.length;
816
- return d !== o.key || !M(l) || (!i && (!Qt || rs < r + 50) || l.isDirty() && g < 2 || Ps(t)) && s.offset !== o.offset && !l.isComposing() || be(l) || l.isDirty() && g > 1 || (i || !Qt) && f !== null && !l.isComposing() && u !== st(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || function(h, _) {
815
+ const s = n.anchor, o = n.focus, l = s.getNode(), a = R(), c = Te(oe(a)), u = c !== null ? c.anchorNode : null, d = s.key, f = a.getElementByKey(d), g = t.length;
816
+ return d !== o.key || !M(l) || (!i && (!Qt || rs < r + 50) || l.isDirty() && g < 2 || Ps(t)) && s.offset !== o.offset && !l.isComposing() || we(l) || l.isDirty() && g > 1 || (i || !Qt) && f !== null && !l.isComposing() && u !== ot(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || function(h, _) {
817
817
  if (_.isSegmented()) return !0;
818
818
  if (!h.isCollapsed()) return !1;
819
- const p = h.anchor.offset, x = _.getParentOrThrow(), y = Ke(_);
819
+ const p = h.anchor.offset, x = _.getParentOrThrow(), y = Be(_);
820
820
  return p === 0 ? !_.canInsertTextBefore() || !x.canInsertTextBefore() && !_.isComposing() || y || function(m) {
821
821
  const N = m.getPreviousSibling();
822
822
  return (M(N) || v(N) && N.isInline()) && !N.canInsertTextAfter();
@@ -824,19 +824,19 @@ function ss(n, e, t, r, i) {
824
824
  }(n, l);
825
825
  }
826
826
  function Xr(n, e) {
827
- return Te(n) && n.nodeValue !== null && e !== 0 && e !== n.nodeValue.length;
827
+ return Ne(n) && n.nodeValue !== null && e !== 0 && e !== n.nodeValue.length;
828
828
  }
829
829
  function Qr(n, e, t) {
830
830
  const { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o } = n;
831
- er && (er = !1, Xr(r, i) && Xr(s, o) && !Ie) || te(e, () => {
831
+ tr && (tr = !1, Xr(r, i) && Xr(s, o) && !Ke) || te(e, () => {
832
832
  if (!t) return void ie(null);
833
- if (!Sn(e, r, s)) return;
833
+ if (!vn(e, r, s)) return;
834
834
  let l = L();
835
- if (Ie && A(l) && l.isCollapsed()) {
836
- const a = l.anchor, c = Ie.anchor;
837
- (a.key === c.key && a.offset === c.offset + 1 || a.offset === 1 && c.getNode().is(a.getNode().getPreviousSibling())) && (l = Ie.clone(), ie(l));
835
+ if (Ke && A(l) && l.isCollapsed()) {
836
+ const a = l.anchor, c = Ke.anchor;
837
+ (a.key === c.key && a.offset === c.offset + 1 || a.offset === 1 && c.getNode().is(a.getNode().getPreviousSibling())) && (l = Ke.clone(), ie(l));
838
838
  }
839
- if (Ie = null, A(l)) {
839
+ if (Ke = null, A(l)) {
840
840
  const a = l.anchor, c = a.getNode();
841
841
  if (l.isCollapsed()) {
842
842
  n.type === "Range" && n.anchorNode === n.focusNode && (l.dirty = !0);
@@ -879,7 +879,7 @@ function Wt(n, e) {
879
879
  const t = n._compositionKey;
880
880
  if (Y(null), t !== null && e != null) {
881
881
  if (e === "") {
882
- const r = U(t), i = st(n.getElementByKey(t));
882
+ const r = U(t), i = ot(n.getElementByKey(t));
883
883
  return void (i !== null && i.nodeValue !== null && M(r) && br(r, i.nodeValue, null, null, !0));
884
884
  }
885
885
  if (e[e.length - 1] === `
@@ -887,7 +887,7 @@ function Wt(n, e) {
887
887
  const r = L();
888
888
  if (A(r)) {
889
889
  const i = r.focus;
890
- return r.anchor.set(i.key, i.offset, i.type), void E(n, Xn, null);
890
+ return r.anchor.set(i.key, i.offset, i.type), void E(n, Qn, null);
891
891
  }
892
892
  }
893
893
  }
@@ -897,18 +897,18 @@ function as(n) {
897
897
  let e = n.__lexicalEventHandles;
898
898
  return e === void 0 && (e = [], n.__lexicalEventHandles = e), e;
899
899
  }
900
- const et = /* @__PURE__ */ new Map();
900
+ const tt = /* @__PURE__ */ new Map();
901
901
  function cs(n) {
902
902
  const e = fl(n.target);
903
903
  if (e === null) return;
904
904
  const t = Es(e.anchorNode);
905
905
  if (t === null) return;
906
- tr && (tr = !1, te(t, () => {
906
+ nr && (nr = !1, te(t, () => {
907
907
  const a = ft(), c = e.anchorNode;
908
- (ee(c) || Te(c)) && ie(mn(a, e, t, n));
908
+ (ee(c) || Ne(c)) && ie(mn(a, e, t, n));
909
909
  }));
910
- const r = Tr(t), i = r[r.length - 1], s = i._key, o = et.get(s), l = o || i;
911
- l !== t && Qr(e, l, !1), Qr(e, t, !0), t !== i ? et.set(s, t) : o && et.delete(s);
910
+ const r = Tr(t), i = r[r.length - 1], s = i._key, o = tt.get(s), l = o || i;
911
+ l !== t && Qr(e, l, !1), Qr(e, t, !0), t !== i ? tt.set(s, t) : o && tt.delete(s);
912
912
  }
913
913
  function Zr(n) {
914
914
  n._lexicalHandled = !0;
@@ -916,23 +916,23 @@ function Zr(n) {
916
916
  function ei(n) {
917
917
  return n._lexicalHandled === !0;
918
918
  }
919
- function zo(n) {
919
+ function Ko(n) {
920
920
  const e = n.ownerDocument, t = un.get(e);
921
921
  if (t === void 0) return;
922
922
  const r = t - 1;
923
923
  r >= 0 || T(164), un.set(e, r), r === 0 && e.removeEventListener("selectionchange", cs);
924
- const i = vn(n);
924
+ const i = kn(n);
925
925
  vr(i) ? (function(o) {
926
926
  if (o._parentEditor !== null) {
927
927
  const l = Tr(o), a = l[l.length - 1]._key;
928
- et.get(a) === o && et.delete(a);
929
- } else et.delete(o._key);
928
+ tt.get(a) === o && tt.delete(a);
929
+ } else tt.delete(o._key);
930
930
  }(i), n.__lexicalEditor = null) : i && T(198);
931
931
  const s = as(n);
932
932
  for (let o = 0; o < s.length; o++) s[o]();
933
933
  n.__lexicalEventHandles = [];
934
934
  }
935
- function nr(n, e, t) {
935
+ function rr(n, e, t) {
936
936
  G();
937
937
  const r = n.__key, i = n.getParent();
938
938
  if (i === null) return;
@@ -940,18 +940,18 @@ function nr(n, e, t) {
940
940
  const a = L();
941
941
  if (!A(a) || !v(l)) return a;
942
942
  const { anchor: c, focus: u } = a, d = c.getNode(), f = u.getNode();
943
- return ir(d, l) && c.set(l.__key, 0, "element"), ir(f, l) && u.set(l.__key, 0, "element"), a;
943
+ return sr(d, l) && c.set(l.__key, 0, "element"), sr(f, l) && u.set(l.__key, 0, "element"), a;
944
944
  }(n);
945
945
  let o = !1;
946
946
  if (A(s) && e) {
947
947
  const l = s.anchor, a = s.focus;
948
948
  l.key === r && (dn(l, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0), a.key === r && (dn(a, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0);
949
- } else yr(s) && e && n.isSelected() && n.selectPrevious();
949
+ } else mr(s) && e && n.isSelected() && n.selectPrevious();
950
950
  if (A(s) && e && !o) {
951
951
  const l = n.getIndexWithinParent();
952
- Be(n), fn(s, i, l, -1);
953
- } else Be(n);
954
- t || Fe(i) || i.canBeEmpty() || !i.isEmpty() || nr(i, e), e && s && ne(i) && i.isEmpty() && i.selectEnd();
952
+ Re(n), fn(s, i, l, -1);
953
+ } else Re(n);
954
+ t || Le(i) || i.canBeEmpty() || !i.isEmpty() || rr(i, e), e && s && ne(i) && i.isEmpty() && i.selectEnd();
955
955
  }
956
956
  function Jl(n) {
957
957
  return n;
@@ -1001,7 +1001,7 @@ class ct {
1001
1001
  if (A(t) && t.anchor.type === "element" && t.focus.type === "element") {
1002
1002
  if (t.isCollapsed()) return !1;
1003
1003
  const i = this.getParent();
1004
- if (K(this) && this.isInline() && i) {
1004
+ if (z(this) && this.isInline() && i) {
1005
1005
  const s = t.isBackward() ? t.focus : t.anchor;
1006
1006
  if (i.is(s.getNode()) && s.offset === i.getChildrenSize() && this.is(i.getLastChild())) return !1;
1007
1007
  }
@@ -1033,7 +1033,7 @@ class ct {
1033
1033
  let e = this;
1034
1034
  for (; e !== null; ) {
1035
1035
  const t = e.getParent();
1036
- if (Fe(t)) return v(e) || e === this && K(e) || T(194), e;
1036
+ if (Le(t)) return v(e) || e === this && z(e) || T(194), e;
1037
1037
  e = t;
1038
1038
  }
1039
1039
  return null;
@@ -1127,7 +1127,7 @@ class ct {
1127
1127
  }
1128
1128
  getWritable() {
1129
1129
  G();
1130
- const e = Pe(), t = R(), r = e._nodeMap, i = this.__key, s = this.getLatest(), o = t._cloneNotNeeded, l = L();
1130
+ const e = Fe(), t = R(), r = e._nodeMap, i = this.__key, s = this.getLatest(), o = t._cloneNotNeeded, l = L();
1131
1131
  if (l !== null && l.setCachedNodes(null), o.has(i)) return gn(s), s;
1132
1132
  const a = pl(s);
1133
1133
  return o.add(i), gn(a), r.set(i, a), a;
@@ -1166,31 +1166,31 @@ class ct {
1166
1166
  return null;
1167
1167
  }
1168
1168
  remove(e) {
1169
- nr(this, !0, e);
1169
+ rr(this, !0, e);
1170
1170
  }
1171
1171
  replace(e, t) {
1172
1172
  G();
1173
1173
  let r = L();
1174
- r !== null && (r = r.clone()), Bn(this, e);
1174
+ r !== null && (r = r.clone()), Rn(this, e);
1175
1175
  const i = this.getLatest(), s = this.__key, o = e.__key, l = e.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
1176
- Be(l);
1176
+ Re(l);
1177
1177
  const u = i.getPreviousSibling(), d = i.getNextSibling(), f = i.__prev, g = i.__next, h = i.__parent;
1178
- if (nr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, d === null ? a.__last = o : d.getWritable().__prev = o, l.__next = g, l.__parent = h, a.__size = c, t && (v(this) && v(l) || T(139), this.getChildren().forEach((_) => {
1178
+ if (rr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, d === null ? a.__last = o : d.getWritable().__prev = o, l.__next = g, l.__parent = h, a.__size = c, t && (v(this) && v(l) || T(139), this.getChildren().forEach((_) => {
1179
1179
  l.append(_);
1180
1180
  })), A(r)) {
1181
1181
  ie(r);
1182
1182
  const _ = r.anchor, p = r.focus;
1183
1183
  _.key === s && ii(_, l), p.key === s && ii(p, l);
1184
1184
  }
1185
- return Ee() === s && Y(o), l;
1185
+ return Me() === s && Y(o), l;
1186
1186
  }
1187
1187
  insertAfter(e, t = !0) {
1188
- G(), Bn(this, e);
1188
+ G(), Rn(this, e);
1189
1189
  const r = this.getWritable(), i = e.getWritable(), s = i.getParent(), o = L();
1190
1190
  let l = !1, a = !1;
1191
1191
  if (s !== null) {
1192
1192
  const g = e.getIndexWithinParent();
1193
- if (Be(i), A(o)) {
1193
+ if (Re(i), A(o)) {
1194
1194
  const h = s.__key, _ = o.anchor, p = o.focus;
1195
1195
  l = _.type === "element" && _.key === h && _.offset === g + 1, a = p.type === "element" && p.key === h && p.offset === g + 1;
1196
1196
  }
@@ -1205,9 +1205,9 @@ class ct {
1205
1205
  return e;
1206
1206
  }
1207
1207
  insertBefore(e, t = !0) {
1208
- G(), Bn(this, e);
1208
+ G(), Rn(this, e);
1209
1209
  const r = this.getWritable(), i = e.getWritable(), s = i.__key;
1210
- Be(i);
1210
+ Re(i);
1211
1211
  const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, c = this.getIndexWithinParent();
1212
1212
  o === null ? l.__first = s : o.getWritable().__next = s, l.__size++, r.__prev = s, i.__prev = a, i.__next = r.__key, i.__parent = r.__parent;
1213
1213
  const u = L();
@@ -1217,7 +1217,7 @@ class ct {
1217
1217
  return !1;
1218
1218
  }
1219
1219
  createParentElementNode() {
1220
- return Me();
1220
+ return Oe();
1221
1221
  }
1222
1222
  selectStart() {
1223
1223
  return this.selectPrevious();
@@ -1297,40 +1297,40 @@ class Mt extends ct {
1297
1297
  if (s === t || s.previousSibling === t && Jt(s)) return !0;
1298
1298
  }
1299
1299
  return !1;
1300
- }(e) ? null : { conversion: Ko, priority: 0 } };
1300
+ }(e) ? null : { conversion: zo, priority: 0 } };
1301
1301
  }
1302
1302
  static importJSON(e) {
1303
1303
  return bt().updateFromJSON(e);
1304
1304
  }
1305
1305
  }
1306
- function Ko(n) {
1306
+ function zo(n) {
1307
1307
  return { node: bt() };
1308
1308
  }
1309
1309
  function bt() {
1310
- return Nn(new Mt());
1310
+ return bn(new Mt());
1311
1311
  }
1312
- function tt(n) {
1312
+ function nt(n) {
1313
1313
  return n instanceof Mt;
1314
1314
  }
1315
1315
  function Jt(n) {
1316
- return Te(n) && /^( |\t|\r?\n)+$/.test(n.textContent || "");
1317
- }
1318
- function Pn(n, e) {
1319
- return 16 & e ? "code" : e & or ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
1316
+ return Ne(n) && /^( |\t|\r?\n)+$/.test(n.textContent || "");
1320
1317
  }
1321
1318
  function Fn(n, e) {
1319
+ return 16 & e ? "code" : e & lr ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
1320
+ }
1321
+ function Ln(n, e) {
1322
1322
  return 1 & e ? "strong" : 2 & e ? "em" : "span";
1323
1323
  }
1324
1324
  function us(n, e, t, r, i) {
1325
1325
  const s = r.classList;
1326
- let o = nt(i, "base");
1327
- o !== void 0 && s.add(...o), o = nt(i, "underlineStrikethrough");
1326
+ let o = rt(i, "base");
1327
+ o !== void 0 && s.add(...o), o = rt(i, "underlineStrikethrough");
1328
1328
  let l = !1;
1329
1329
  const a = e & nn && e & tn;
1330
1330
  o !== void 0 && (t & nn && t & tn ? (l = !0, a || s.add(...o)) : a && s.remove(...o));
1331
- for (const c in Je) {
1332
- const u = Je[c];
1333
- if (o = nt(i, c), o !== void 0) if (t & u) {
1331
+ for (const c in je) {
1332
+ const u = je[c];
1333
+ if (o = rt(i, c), o !== void 0) if (t & u) {
1334
1334
  if (l && (c === "underline" || c === "strikethrough")) {
1335
1335
  e & u && s.remove(...o);
1336
1336
  continue;
@@ -1344,7 +1344,7 @@ function fs(n, e, t) {
1344
1344
  if (r == null) e.textContent = s;
1345
1345
  else {
1346
1346
  const o = r.nodeValue;
1347
- if (o !== s) if (i || Re) {
1347
+ if (o !== s) if (i || We) {
1348
1348
  const [l, a, c] = function(u, d) {
1349
1349
  const f = u.length, g = d.length;
1350
1350
  let h = 0, _ = 0;
@@ -1395,7 +1395,7 @@ class ut extends ct {
1395
1395
  return this.getLatest().__mode === 1;
1396
1396
  }
1397
1397
  isComposing() {
1398
- return this.__key === Ee();
1398
+ return this.__key === Me();
1399
1399
  }
1400
1400
  isSegmented() {
1401
1401
  return this.getLatest().__mode === 2;
@@ -1407,7 +1407,7 @@ class ut extends ct {
1407
1407
  return !!(2 & this.getLatest().__detail);
1408
1408
  }
1409
1409
  hasFormat(e) {
1410
- const t = Je[e];
1410
+ const t = je[e];
1411
1411
  return !!(this.getFormat() & t);
1412
1412
  }
1413
1413
  isSimpleText() {
@@ -1426,14 +1426,14 @@ class ut extends ct {
1426
1426
  return !0;
1427
1427
  }
1428
1428
  createDOM(e, t) {
1429
- const r = this.__format, i = Pn(0, r), s = Fn(0, r), o = i === null ? s : i, l = document.createElement(o);
1429
+ const r = this.__format, i = Fn(0, r), s = Ln(0, r), o = i === null ? s : i, l = document.createElement(o);
1430
1430
  let a = l;
1431
1431
  this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)), ti(a, this, 0, r, this.__text, e);
1432
1432
  const c = this.__style;
1433
1433
  return c !== "" && (l.style.cssText = c), l;
1434
1434
  }
1435
1435
  updateDOM(e, t, r) {
1436
- const i = this.__text, s = e.__format, o = this.__format, l = Pn(0, s), a = Pn(0, o), c = Fn(0, s), u = Fn(0, o);
1436
+ const i = this.__text, s = e.__format, o = this.__format, l = Fn(0, s), a = Fn(0, o), c = Ln(0, s), u = Ln(0, o);
1437
1437
  if ((l === null ? c : l) !== (a === null ? u : a)) return !0;
1438
1438
  if (l === a && c !== u) {
1439
1439
  const _ = t.firstChild;
@@ -1449,7 +1449,7 @@ class ut extends ct {
1449
1449
  return g !== h && (t.style.cssText = h), !1;
1450
1450
  }
1451
1451
  static importDOM() {
1452
- return { "#text": () => ({ conversion: Jo, priority: 0 }), b: () => ({ conversion: Ro, priority: 0 }), code: () => ({ conversion: me, priority: 0 }), em: () => ({ conversion: me, priority: 0 }), i: () => ({ conversion: me, priority: 0 }), mark: () => ({ conversion: me, priority: 0 }), s: () => ({ conversion: me, priority: 0 }), span: () => ({ conversion: Bo, priority: 0 }), strong: () => ({ conversion: me, priority: 0 }), sub: () => ({ conversion: me, priority: 0 }), sup: () => ({ conversion: me, priority: 0 }), u: () => ({ conversion: me, priority: 0 }) };
1452
+ return { "#text": () => ({ conversion: Jo, priority: 0 }), b: () => ({ conversion: Ro, priority: 0 }), code: () => ({ conversion: xe, priority: 0 }), em: () => ({ conversion: xe, priority: 0 }), i: () => ({ conversion: xe, priority: 0 }), mark: () => ({ conversion: xe, priority: 0 }), s: () => ({ conversion: xe, priority: 0 }), span: () => ({ conversion: Bo, priority: 0 }), strong: () => ({ conversion: xe, priority: 0 }), sub: () => ({ conversion: xe, priority: 0 }), sup: () => ({ conversion: xe, priority: 0 }), u: () => ({ conversion: xe, priority: 0 }) };
1453
1453
  }
1454
1454
  static importJSON(e) {
1455
1455
  return V().updateFromJSON(e);
@@ -1468,7 +1468,7 @@ class ut extends ct {
1468
1468
  }
1469
1469
  setFormat(e) {
1470
1470
  const t = this.getWritable();
1471
- return t.__format = typeof e == "string" ? Je[e] : e, t;
1471
+ return t.__format = typeof e == "string" ? je[e] : e, t;
1472
1472
  }
1473
1473
  setDetail(e) {
1474
1474
  const t = this.getWritable();
@@ -1511,7 +1511,7 @@ class ut extends ct {
1511
1511
  } else r = 0, i = 0;
1512
1512
  if (!A(s)) return _s(l, r, l, i, "text", "text");
1513
1513
  {
1514
- const a = Ee();
1514
+ const a = Me();
1515
1515
  a !== s.anchor.key && a !== s.focus.key || Y(l), s.setTextNodeRange(this, r, this, i);
1516
1516
  }
1517
1517
  return s;
@@ -1545,7 +1545,7 @@ class ut extends ct {
1545
1545
  G();
1546
1546
  const t = this.getLatest(), r = t.getTextContent();
1547
1547
  if (r === "") return [];
1548
- const i = t.__key, s = Ee(), o = r.length;
1548
+ const i = t.__key, s = Me(), o = r.length;
1549
1549
  e.sort((k, S) => k - S), e.push(o);
1550
1550
  const l = [], a = e.length;
1551
1551
  for (let k = 0, S = 0; k < o && S <= a; S++) {
@@ -1596,7 +1596,7 @@ class ut extends ct {
1596
1596
  const t = e === this.getPreviousSibling();
1597
1597
  t || e === this.getNextSibling() || T(50);
1598
1598
  const r = this.__key, i = e.__key, s = this.__text, o = s.length;
1599
- Ee() === i && Y(r);
1599
+ Me() === i && Y(r);
1600
1600
  const l = L();
1601
1601
  if (A(l)) {
1602
1602
  const d = l.anchor, f = l.focus;
@@ -1612,11 +1612,11 @@ class ut extends ct {
1612
1612
  }
1613
1613
  }
1614
1614
  function Bo(n) {
1615
- return { forChild: _r(n.style), node: null };
1615
+ return { forChild: pr(n.style), node: null };
1616
1616
  }
1617
1617
  function Ro(n) {
1618
1618
  const e = n, t = e.style.fontWeight === "normal";
1619
- return { forChild: _r(e.style, t ? void 0 : "bold"), node: null };
1619
+ return { forChild: pr(e.style, t ? void 0 : "bold"), node: null };
1620
1620
  }
1621
1621
  const ni = /* @__PURE__ */ new WeakMap();
1622
1622
  function Wo(n) {
@@ -1642,7 +1642,7 @@ function Jo(n) {
1642
1642
  const l = r[o];
1643
1643
  l === `
1644
1644
  ` || l === `\r
1645
- ` ? i.push(bt()) : l === " " ? i.push(pr()) : l !== "" && i.push(V(l));
1645
+ ` ? i.push(bt()) : l === " " ? i.push(yr()) : l !== "" && i.push(V(l));
1646
1646
  }
1647
1647
  return { node: i };
1648
1648
  }
@@ -1684,22 +1684,22 @@ function ri(n, e) {
1684
1684
  }
1685
1685
  let i = t;
1686
1686
  for (; (i = e ? t.firstChild : t.lastChild) !== null; ) t = i;
1687
- if (Te(t)) return t;
1687
+ if (Ne(t)) return t;
1688
1688
  if (t.nodeName === "BR") return null;
1689
1689
  }
1690
1690
  }
1691
1691
  const jo = { code: "code", em: "italic", i: "italic", mark: "highlight", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
1692
- function me(n) {
1692
+ function xe(n) {
1693
1693
  const e = jo[n.nodeName.toLowerCase()];
1694
- return e === void 0 ? { node: null } : { forChild: _r(n.style, e), node: null };
1694
+ return e === void 0 ? { node: null } : { forChild: pr(n.style, e), node: null };
1695
1695
  }
1696
1696
  function V(n = "") {
1697
- return Nn(new ut(n));
1697
+ return bn(new ut(n));
1698
1698
  }
1699
1699
  function M(n) {
1700
1700
  return n instanceof ut;
1701
1701
  }
1702
- function _r(n, e) {
1702
+ function pr(n, e) {
1703
1703
  const t = n.fontWeight, r = n.textDecoration.split(" "), i = t === "700" || t === "bold", s = r.includes("line-through"), o = n.fontStyle === "italic", l = r.includes("underline"), a = n.verticalAlign;
1704
1704
  return (c) => (M(c) && (i && !c.hasFormat("bold") && c.toggleFormat("bold"), s && !c.hasFormat("strikethrough") && c.toggleFormat("strikethrough"), o && !c.hasFormat("italic") && c.toggleFormat("italic"), l && !c.hasFormat("underline") && c.toggleFormat("underline"), a !== "sub" || c.hasFormat("subscript") || c.toggleFormat("subscript"), a !== "super" || c.hasFormat("superscript") || c.toggleFormat("superscript"), e && !c.hasFormat(e) && c.toggleFormat(e)), c);
1705
1705
  }
@@ -1717,11 +1717,11 @@ class Ot extends ut {
1717
1717
  return null;
1718
1718
  }
1719
1719
  createDOM(e) {
1720
- const t = super.createDOM(e), r = nt(e.theme, "tab");
1720
+ const t = super.createDOM(e), r = rt(e.theme, "tab");
1721
1721
  return r !== void 0 && t.classList.add(...r), t;
1722
1722
  }
1723
1723
  static importJSON(e) {
1724
- return pr().updateFromJSON(e);
1724
+ return yr().updateFromJSON(e);
1725
1725
  }
1726
1726
  setTextContent(e) {
1727
1727
  return e !== " " && e !== "" && T(126), super.setTextContent(" ");
@@ -1742,8 +1742,8 @@ class Ot extends ut {
1742
1742
  return !1;
1743
1743
  }
1744
1744
  }
1745
- function pr() {
1746
- return Nn(new Ot());
1745
+ function yr() {
1746
+ return bn(new Ot());
1747
1747
  }
1748
1748
  function ds(n) {
1749
1749
  return n instanceof Ot;
@@ -1756,7 +1756,7 @@ class $o {
1756
1756
  return this.key === e.key && this.offset === e.offset && this.type === e.type;
1757
1757
  }
1758
1758
  isBefore(e) {
1759
- return this.key === e.key ? this.offset < e.offset : Rs(de(He(this, "next")), de(He(e, "next"))) < 0;
1759
+ return this.key === e.key ? this.offset < e.offset : Rs(de(qe(this, "next")), de(qe(e, "next"))) < 0;
1760
1760
  }
1761
1761
  getNode() {
1762
1762
  const e = U(this.key);
@@ -1764,13 +1764,13 @@ class $o {
1764
1764
  }
1765
1765
  set(e, t, r, i) {
1766
1766
  const s = this._selection, o = this.key;
1767
- i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, At() || (Ee() === o && Y(e), s !== null && (s.setCachedNodes(null), s.dirty = !0)));
1767
+ i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, At() || (Me() === o && Y(e), s !== null && (s.setCachedNodes(null), s.dirty = !0)));
1768
1768
  }
1769
1769
  }
1770
- function ge(n, e, t) {
1770
+ function _e(n, e, t) {
1771
1771
  return new $o(n, e, t);
1772
1772
  }
1773
- function Ln(n, e) {
1773
+ function In(n, e) {
1774
1774
  let t = e.__key, r = n.offset, i = "element";
1775
1775
  if (M(e)) {
1776
1776
  i = "text";
@@ -1789,8 +1789,8 @@ function Ln(n, e) {
1789
1789
  function ii(n, e) {
1790
1790
  if (v(e)) {
1791
1791
  const t = e.getLastDescendant();
1792
- v(t) || M(t) ? Ln(n, t) : Ln(n, e);
1793
- } else Ln(n, e);
1792
+ v(t) || M(t) ? In(n, t) : In(n, e);
1793
+ } else In(n, e);
1794
1794
  }
1795
1795
  class yn {
1796
1796
  constructor(e) {
@@ -1803,7 +1803,7 @@ class yn {
1803
1803
  this._cachedNodes = e;
1804
1804
  }
1805
1805
  is(e) {
1806
- if (!yr(e)) return !1;
1806
+ if (!mr(e)) return !1;
1807
1807
  const t = this._nodes, r = e._nodes;
1808
1808
  return t.size === r.size && Array.from(t).every((i) => r.has(i));
1809
1809
  }
@@ -1869,15 +1869,15 @@ class yn {
1869
1869
  const e = this.getNodes();
1870
1870
  if ((L() || ft()) === this && e[0]) {
1871
1871
  const t = H(e[0], "next");
1872
- wl(Ye(t, t));
1872
+ wl(He(t, t));
1873
1873
  }
1874
1874
  for (const t of e) t.remove();
1875
1875
  }
1876
1876
  }
1877
1877
  function A(n) {
1878
- return n instanceof Ge;
1878
+ return n instanceof Xe;
1879
1879
  }
1880
- class Ge {
1880
+ class Xe {
1881
1881
  constructor(e, t, r, i) {
1882
1882
  this.anchor = e, this.focus = t, e._selection = this, t._selection = this, this._cachedNodes = null, this.format = r, this.style = i, this.dirty = !1;
1883
1883
  }
@@ -1907,14 +1907,14 @@ class Ge {
1907
1907
  const { origin: u } = c;
1908
1908
  v(u) && a.has(u) || i.push(u);
1909
1909
  }
1910
- if (o && i.push(o.caret.origin), lt(r.focus) && v(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c = De(r.focus.origin, "previous"); he(c) && l.has(c.origin) && !c.origin.isEmpty() && c.origin.is(i[i.length - 1]); c = Dr(c)) l.delete(c.origin), i.pop();
1910
+ if (o && i.push(o.caret.origin), at(r.focus) && v(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c = Pe(r.focus.origin, "previous"); he(c) && l.has(c.origin) && !c.origin.isEmpty() && c.origin.is(i[i.length - 1]); c = Dr(c)) l.delete(c.origin), i.pop();
1911
1911
  for (; i.length > 1; ) {
1912
1912
  const c = i[i.length - 1];
1913
1913
  if (!v(c) || a.has(c) || c.isEmpty() || l.has(c)) break;
1914
1914
  i.pop();
1915
1915
  }
1916
1916
  if (i.length === 0 && r.isCollapsed()) {
1917
- const c = de(r.anchor), u = de(r.anchor.getFlipped()), d = (g) => Oe(g) ? g.origin : g.getNodeAtCaret(), f = d(c) || d(u) || (r.anchor.getNodeAtCaret() ? c.origin : u.origin);
1917
+ const c = de(r.anchor), u = de(r.anchor.getFlipped()), d = (g) => Ae(g) ? g.origin : g.getNodeAtCaret(), f = d(c) || d(u) || (r.anchor.getNodeAtCaret() ? c.origin : u.origin);
1918
1918
  i.push(f);
1919
1919
  }
1920
1920
  return i;
@@ -1936,7 +1936,7 @@ class Ge {
1936
1936
  else if (u = !1, M(f)) {
1937
1937
  let g = f.getTextContent();
1938
1938
  f === t ? f === r ? i.type === "element" && s.type === "element" && s.offset !== i.offset || (g = l < a ? g.slice(l, a) : g.slice(a, l)) : g = o ? g.slice(l) : g.slice(a) : f === r && (g = o ? g.slice(0, a) : g.slice(0, l)), c += g;
1939
- } else !K(f) && !tt(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
1939
+ } else !z(f) && !nt(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
1940
1940
  }
1941
1941
  return c;
1942
1942
  }
@@ -1944,11 +1944,11 @@ class Ge {
1944
1944
  const t = R(), r = t.getEditorState()._selection, i = gs(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, r);
1945
1945
  if (i === null) return;
1946
1946
  const [s, o] = i;
1947
- this.anchor.set(s.key, s.offset, s.type, !0), this.focus.set(o.key, o.offset, o.type, !0), $n(this);
1947
+ this.anchor.set(s.key, s.offset, s.type, !0), this.focus.set(o.key, o.offset, o.type, !0), Un(this);
1948
1948
  }
1949
1949
  clone() {
1950
1950
  const e = this.anchor, t = this.focus;
1951
- return new Ge(ge(e.key, e.offset, e.type), ge(t.key, t.offset, t.type), this.format, this.style);
1951
+ return new Xe(_e(e.key, e.offset, e.type), _e(t.key, t.offset, t.type), this.format, this.style);
1952
1952
  }
1953
1953
  toggleFormat(e) {
1954
1954
  this.format = hn(this.format, e, null), this.dirty = !0;
@@ -1960,7 +1960,7 @@ class Ge {
1960
1960
  this.style = e, this.dirty = !0;
1961
1961
  }
1962
1962
  hasFormat(e) {
1963
- const t = Je[e];
1963
+ const t = je[e];
1964
1964
  return !!(this.format & t);
1965
1965
  }
1966
1966
  insertRawText(e) {
@@ -1969,7 +1969,7 @@ class Ge {
1969
1969
  const o = t[s];
1970
1970
  o === `
1971
1971
  ` || o === `\r
1972
- ` ? r.push(bt()) : o === " " ? r.push(pr()) : r.push(V(o));
1972
+ ` ? r.push(bt()) : o === " " ? r.push(yr()) : r.push(V(o));
1973
1973
  }
1974
1974
  this.insertNodes(r);
1975
1975
  }
@@ -1977,9 +1977,9 @@ class Ge {
1977
1977
  const t = this.anchor, r = this.focus, i = this.format, s = this.style;
1978
1978
  let o = t, l = r;
1979
1979
  !this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && function(p, x, y, m) {
1980
- const N = p.getNode(), b = N.getChildAtIndex(p.offset), C = V(), w = ne(N) ? Me().append(C) : C;
1980
+ const N = p.getNode(), b = N.getChildAtIndex(p.offset), C = V(), w = ne(N) ? Oe().append(C) : C;
1981
1981
  C.setFormat(y), C.setStyle(m), b === null ? N.append(w) : b.insertBefore(w), p.is(x) && x.set(C.__key, 0, "text"), p.set(C.__key, 0, "text");
1982
- }(o, l, i, s), l.type === "element" && Et(l, de(He(l, "next")));
1982
+ }(o, l, i, s), l.type === "element" && Et(l, de(qe(l, "next")));
1983
1983
  const a = o.offset;
1984
1984
  let c = l.offset;
1985
1985
  const u = this.getNodes(), d = u.length;
@@ -1987,12 +1987,12 @@ class Ge {
1987
1987
  M(f) || T(26);
1988
1988
  const g = f.getTextContent().length, h = f.getParentOrThrow();
1989
1989
  let _ = u[d - 1];
1990
- if (d === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (be(f) || !f.canInsertTextAfter() || !h.canInsertTextAfter() && f.getNextSibling() === null)) {
1990
+ if (d === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (we(f) || !f.canInsertTextAfter() || !h.canInsertTextAfter() && f.getNextSibling() === null)) {
1991
1991
  let p = f.getNextSibling();
1992
- if (M(p) && p.canInsertTextBefore() && !be(p) || (p = V(), p.setFormat(i), p.setStyle(s), h.canInsertTextAfter() ? f.insertAfter(p) : h.insertAfter(p)), p.select(0, 0), f = p, e !== "") return void this.insertText(e);
1993
- } else if (this.isCollapsed() && a === 0 && (be(f) || !f.canInsertTextBefore() || !h.canInsertTextBefore() && f.getPreviousSibling() === null)) {
1992
+ if (M(p) && p.canInsertTextBefore() && !we(p) || (p = V(), p.setFormat(i), p.setStyle(s), h.canInsertTextAfter() ? f.insertAfter(p) : h.insertAfter(p)), p.select(0, 0), f = p, e !== "") return void this.insertText(e);
1993
+ } else if (this.isCollapsed() && a === 0 && (we(f) || !f.canInsertTextBefore() || !h.canInsertTextBefore() && f.getPreviousSibling() === null)) {
1994
1994
  let p = f.getPreviousSibling();
1995
- if (M(p) && !be(p) || (p = V(), p.setFormat(i), h.canInsertTextBefore() ? f.insertBefore(p) : h.insertBefore(p)), p.select(), f = p, e !== "") return void this.insertText(e);
1995
+ if (M(p) && !we(p) || (p = V(), p.setFormat(i), h.canInsertTextBefore() ? f.insertBefore(p) : h.insertBefore(p)), p.select(), f = p, e !== "") return void this.insertText(e);
1996
1996
  } else if (f.isSegmented() && a !== g) {
1997
1997
  const p = V(f.getTextContent());
1998
1998
  p.setFormat(i), f.replace(p), f = p;
@@ -2001,7 +2001,7 @@ class Ge {
2001
2001
  if (!h.canInsertTextBefore() || !h.canInsertTextAfter() || v(p) && (!p.canInsertTextBefore() || !p.canInsertTextAfter())) return this.insertText(""), hs(this.anchor, this.focus, null), void this.insertText(e);
2002
2002
  }
2003
2003
  if (d === 1) {
2004
- if (Ke(f)) {
2004
+ if (Be(f)) {
2005
2005
  const m = V(e);
2006
2006
  return m.select(), void f.replace(m);
2007
2007
  }
@@ -2031,7 +2031,7 @@ class Ge {
2031
2031
  if (!x.is(y) && y.isInline()) do
2032
2032
  m = y, y = y.getParentOrThrow();
2033
2033
  while (y.isInline());
2034
- if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c) if (M(_) && !Ke(_) && c !== _.getTextContentSize()) {
2034
+ if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c) if (M(_) && !Be(_) && c !== _.getTextContentSize()) {
2035
2035
  if (_.isSegmented()) {
2036
2036
  const k = V(_.getTextContent());
2037
2037
  _.replace(k), _ = k;
@@ -2055,7 +2055,7 @@ class Ge {
2055
2055
  (F === 0 || O[F - 1].is(S)) && (p.delete(k.__key), S = k), k = k.getParent();
2056
2056
  }
2057
2057
  }
2058
- if (Ke(f)) if (a === g) f.select();
2058
+ if (Be(f)) if (a === g) f.select();
2059
2059
  else {
2060
2060
  const k = V(e);
2061
2061
  k.select(), f.replace(k);
@@ -2094,16 +2094,16 @@ class Ge {
2094
2094
  const y = d.type === "text" ? d.offset : x.getTextContentSize();
2095
2095
  if (g.is(x)) {
2096
2096
  if (h === y) return;
2097
- if (be(g) || h === 0 && y === g.getTextContentSize()) g.setFormat(_);
2097
+ if (we(g) || h === 0 && y === g.getTextContentSize()) g.setFormat(_);
2098
2098
  else {
2099
2099
  const N = g.splitText(h, y), b = h === 0 ? N[0] : N[1];
2100
2100
  b.setFormat(_), u.type === "text" && u.set(b.__key, 0, "text"), d.type === "text" && d.set(b.__key, y - h, "text");
2101
2101
  }
2102
2102
  return void (this.format = _);
2103
2103
  }
2104
- h === 0 || be(g) || ([, g] = g.splitText(h), h = 0), g.setFormat(_);
2104
+ h === 0 || we(g) || ([, g] = g.splitText(h), h = 0), g.setFormat(_);
2105
2105
  const m = x.getFormatFlags(e, _);
2106
- y > 0 && (y === x.getTextContentSize() || be(x) || ([x] = x.splitText(y)), x.setFormat(m));
2106
+ y > 0 && (y === x.getTextContentSize() || we(x) || ([x] = x.splitText(y)), x.setFormat(m));
2107
2107
  for (let N = f + 1; N < p; N++) {
2108
2108
  const b = i[N], C = b.getFormatFlags(e, m);
2109
2109
  b.setFormat(C);
@@ -2117,26 +2117,26 @@ class Ge {
2117
2117
  const h = L();
2118
2118
  return A(h) || T(134), h.insertNodes(e);
2119
2119
  }
2120
- const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Wn(t, we), i = e[e.length - 1];
2120
+ const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Jn(t, Ee), i = e[e.length - 1];
2121
2121
  if (v(r) && "__language" in r) {
2122
2122
  if ("__language" in e[0]) this.insertText(e[0].getTextContent());
2123
2123
  else {
2124
- const h = In(this);
2124
+ const h = Kn(this);
2125
2125
  r.splice(h, 0, e), i.selectEnd();
2126
2126
  }
2127
2127
  return;
2128
2128
  }
2129
- if (!e.some((h) => (v(h) || K(h)) && !h.isInline())) {
2129
+ if (!e.some((h) => (v(h) || z(h)) && !h.isInline())) {
2130
2130
  v(r) || T(211, t.constructor.name, t.getType());
2131
- const h = In(this);
2131
+ const h = Kn(this);
2132
2132
  return r.splice(h, 0, e), void i.selectEnd();
2133
2133
  }
2134
2134
  const s = function(h) {
2135
- const _ = Me();
2135
+ const _ = Oe();
2136
2136
  let p = null;
2137
2137
  for (let x = 0; x < h.length; x++) {
2138
- const y = h[x], m = tt(y);
2139
- if (m || K(y) && y.isInline() || v(y) && y.isInline() || M(y) || y.isParentRequired()) {
2138
+ const y = h[x], m = nt(y);
2139
+ if (m || z(y) && y.isInline() || v(y) && y.isInline() || M(y) || y.isParentRequired()) {
2140
2140
  if (p === null && (p = y.createParentElementNode(), _.append(p), m)) continue;
2141
2141
  p !== null && p.append(y);
2142
2142
  } else _.append(y), p = null;
@@ -2145,7 +2145,7 @@ class Ge {
2145
2145
  }(e), o = s.getLastDescendant(), l = s.getChildren(), a = !v(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
2146
2146
  let u = l[0];
2147
2147
  var d;
2148
- v(d = u) && we(d) && !d.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), function(h, _, p) {
2148
+ v(d = u) && Ee(d) && !d.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), function(h, _, p) {
2149
2149
  const x = _.getParentOrThrow().getLastChild();
2150
2150
  let y = _;
2151
2151
  const m = [_];
@@ -2153,17 +2153,17 @@ class Ge {
2153
2153
  let N = h;
2154
2154
  for (const b of m) N = N.insertAfter(b);
2155
2155
  }(r, u));
2156
- const f = Wn(o, we);
2157
- a && v(f) && (a.canMergeWhenEmpty() || we(c)) && (f.append(...a.getChildren()), a.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
2156
+ const f = Jn(o, Ee);
2157
+ a && v(f) && (a.canMergeWhenEmpty() || Ee(c)) && (f.append(...a.getChildren()), a.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
2158
2158
  const g = v(r) ? r.getLastChild() : null;
2159
- tt(g) && f !== r && g.remove();
2159
+ nt(g) && f !== r && g.remove();
2160
2160
  }
2161
2161
  insertParagraph() {
2162
2162
  if (this.anchor.key === "root") {
2163
- const o = Me();
2163
+ const o = Oe();
2164
2164
  return re().splice(this.anchor.offset, 0, [o]), o.select(), o;
2165
2165
  }
2166
- const e = In(this), t = Wn(this.anchor.getNode(), we);
2166
+ const e = Kn(this), t = Jn(this.anchor.getNode(), Ee);
2167
2167
  v(t) || T(213);
2168
2168
  const r = t.getChildAtIndex(e), i = r ? [r, ...r.getNextSiblings()] : [], s = t.insertNewAfter(this, !1);
2169
2169
  return s ? (s.append(...i), s.selectStart(), s) : null;
@@ -2200,12 +2200,12 @@ class Ge {
2200
2200
  }
2201
2201
  modify(e, t, r) {
2202
2202
  if (hi(this, e, t, r)) return;
2203
- const i = e === "move", s = R(), o = ke(oe(s));
2203
+ const i = e === "move", s = R(), o = Te(oe(s));
2204
2204
  if (!o) return;
2205
2205
  const l = s._blockCursorElement, a = s._rootElement, c = this.focus.getNode();
2206
- if (a === null || l === null || !v(c) || c.isInline() || c.canBeEmpty() || sr(l, s, a), this.dirty) {
2207
- let u = ot(s, this.anchor.key), d = ot(s, this.focus.key);
2208
- this.anchor.type === "text" && (u = st(u)), this.focus.type === "text" && (d = st(d)), u && d && ys(o, u, this.anchor.offset, d, this.focus.offset);
2206
+ if (a === null || l === null || !v(c) || c.isInline() || c.canBeEmpty() || or(l, s, a), this.dirty) {
2207
+ let u = lt(s, this.anchor.key), d = lt(s, this.focus.key);
2208
+ this.anchor.type === "text" && (u = ot(u)), this.focus.type === "text" && (d = ot(d)), u && d && ys(o, u, this.anchor.offset, d, this.focus.offset);
2209
2209
  }
2210
2210
  if (function(u, d, f, g) {
2211
2211
  u.modify(d, f, g);
@@ -2216,7 +2216,7 @@ class Ge {
2216
2216
  let _ = !1;
2217
2217
  for (let p = 0; p < g.length; p++) {
2218
2218
  const x = g[p];
2219
- ir(x, f) ? h.push(x) : _ = !0;
2219
+ sr(x, f) ? h.push(x) : _ = !0;
2220
2220
  }
2221
2221
  if (_ && h.length > 0) if (t) {
2222
2222
  const p = h[0];
@@ -2246,7 +2246,7 @@ class Ge {
2246
2246
  const r = this.anchor;
2247
2247
  let i = r.getNode();
2248
2248
  if (this.forwardDeletion(r, i, e)) return;
2249
- const s = Ks(He(r, e ? "previous" : "next"));
2249
+ const s = zs(qe(r, e ? "previous" : "next"));
2250
2250
  if (s.getTextSlices().every((l) => l === null || l.distance === 0)) {
2251
2251
  let l = { type: "initial" };
2252
2252
  for (const a of s.iterNodeCarets("shadowRoot")) if (he(a)) {
@@ -2255,7 +2255,7 @@ class Ge {
2255
2255
  if (l.type === "merge-block") break;
2256
2256
  if (v(s.anchor.origin) && s.anchor.origin.isEmpty()) {
2257
2257
  const c = de(a);
2258
- Xt(this, Ye(c, c)), s.anchor.origin.remove();
2258
+ Xt(this, He(c, c)), s.anchor.origin.remove();
2259
2259
  }
2260
2260
  return;
2261
2261
  }
@@ -2263,14 +2263,14 @@ class Ge {
2263
2263
  }
2264
2264
  } else {
2265
2265
  if (l.type === "merge-block") break;
2266
- if (lt(a)) {
2266
+ if (at(a)) {
2267
2267
  if (v(a.origin)) {
2268
2268
  if (a.origin.isInline()) {
2269
2269
  if (!a.origin.isParentOf(s.anchor.origin)) break;
2270
2270
  } else l = { block: a.origin, type: "merge-next-block" };
2271
2271
  continue;
2272
2272
  }
2273
- if (K(a.origin)) {
2273
+ if (z(a.origin)) {
2274
2274
  if (!a.origin.isIsolated()) if (l.type === "merge-next-block" && (a.origin.isKeyboardSelectable() || !a.origin.isInline()) && v(s.anchor.origin) && s.anchor.origin.isEmpty()) {
2275
2275
  s.anchor.origin.remove();
2276
2276
  const c = ps();
@@ -2283,7 +2283,7 @@ class Ge {
2283
2283
  }
2284
2284
  if (l.type === "merge-block") {
2285
2285
  const { caret: a, block: c } = l;
2286
- return Xt(this, Ye(!a.origin.isEmpty() && c.isEmpty() ? zt(H(c, a.direction)) : s.anchor, a)), this.removeText();
2286
+ return Xt(this, He(!a.origin.isEmpty() && c.isEmpty() ? Kt(H(c, a.direction)) : s.anchor, a)), this.removeText();
2287
2287
  }
2288
2288
  }
2289
2289
  const o = this.focus;
@@ -2332,7 +2332,7 @@ class Ge {
2332
2332
  return [this.anchor, this.focus];
2333
2333
  }
2334
2334
  }
2335
- function yr(n) {
2335
+ function mr(n) {
2336
2336
  return n instanceof yn;
2337
2337
  }
2338
2338
  function si(n) {
@@ -2351,7 +2351,7 @@ function li(n, e) {
2351
2351
  for (let t = e; t; t = t.getParent()) {
2352
2352
  if (v(t)) {
2353
2353
  if (t.collapseAtStart(n)) return !0;
2354
- if (Fe(t)) break;
2354
+ if (Le(t)) break;
2355
2355
  }
2356
2356
  if (t.getPreviousSibling()) break;
2357
2357
  }
@@ -2390,9 +2390,9 @@ function ci(n, e, t, r) {
2390
2390
  const f = c.parentNode;
2391
2391
  n === f && e > Array.prototype.indexOf.call(f.children, c) && s--;
2392
2392
  }
2393
- if (i = Ze(u), M(i)) s = ki(i, o);
2393
+ if (i = et(u), M(i)) s = ge(i, o ? "next" : "previous");
2394
2394
  else {
2395
- let f = Ze(n);
2395
+ let f = et(n);
2396
2396
  if (f === null) return null;
2397
2397
  if (v(f)) {
2398
2398
  const g = r.getElementByKey(f.getKey());
@@ -2405,15 +2405,15 @@ function ci(n, e, t, r) {
2405
2405
  const p = o ? _.getLastDescendant() : _.getFirstDescendant();
2406
2406
  p === null ? f = _ : (_ = p, f = v(_) ? _ : _.getParentOrThrow()), s = 0;
2407
2407
  }
2408
- M(_) ? (i = _, f = null, s = ki(_, o)) : _ !== f && o && !d && (v(f) || T(216), s = Math.min(f.getChildrenSize(), s + 1));
2408
+ M(_) ? (i = _, f = null, s = ge(_, o ? "next" : "previous")) : _ !== f && o && !d && (v(f) || T(216), s = Math.min(f.getChildrenSize(), s + 1));
2409
2409
  } else {
2410
2410
  const g = f.getIndexWithinParent();
2411
- s = e === 0 && K(f) && Ze(n) === f ? g : g + 1, f = f.getParentOrThrow();
2411
+ s = e === 0 && z(f) && et(n) === f ? g : g + 1, f = f.getParentOrThrow();
2412
2412
  }
2413
- if (v(f)) return ge(f.__key, s, "element");
2413
+ if (v(f)) return _e(f.__key, s, "element");
2414
2414
  }
2415
- } else i = Ze(n);
2416
- return M(i) ? ge(i.__key, s, "text") : null;
2415
+ } else i = et(n);
2416
+ return M(i) ? _e(i.__key, ge(i, s, "clamp"), "text") : null;
2417
2417
  }
2418
2418
  function ui(n, e, t) {
2419
2419
  const r = n.offset, i = n.getNode();
@@ -2446,14 +2446,14 @@ function hs(n, e, t) {
2446
2446
  }
2447
2447
  }
2448
2448
  function gs(n, e, t, r, i, s) {
2449
- if (n === null || t === null || !Sn(i, n, t)) return null;
2449
+ if (n === null || t === null || !vn(i, n, t)) return null;
2450
2450
  const o = ci(n, e, A(s) ? s.anchor : null, i);
2451
2451
  if (o === null) return null;
2452
2452
  const l = ci(t, r, A(s) ? s.focus : null, i);
2453
2453
  if (l === null) return null;
2454
2454
  if (o.type === "element" && l.type === "element") {
2455
- const a = Ze(n), c = Ze(t);
2456
- if (K(a) && K(c)) return null;
2455
+ const a = et(n), c = et(t);
2456
+ if (z(a) && z(c)) return null;
2457
2457
  }
2458
2458
  return hs(o, l, s), [o, l];
2459
2459
  }
@@ -2461,12 +2461,12 @@ function jl(n) {
2461
2461
  return v(n) && !n.isInline();
2462
2462
  }
2463
2463
  function _s(n, e, t, r, i, s) {
2464
- const o = Pe(), l = new Ge(ge(n, e, i), ge(t, r, s), 0, "");
2464
+ const o = Fe(), l = new Xe(_e(n, e, i), _e(t, r, s), 0, "");
2465
2465
  return l.dirty = !0, o._selection = l, l;
2466
2466
  }
2467
2467
  function Vo() {
2468
- const n = ge("root", 0, "element"), e = ge("root", 0, "element");
2469
- return new Ge(n, e, 0, "");
2468
+ const n = _e("root", 0, "element"), e = _e("root", 0, "element");
2469
+ return new Xe(n, e, 0, "");
2470
2470
  }
2471
2471
  function ps() {
2472
2472
  return new yn(/* @__PURE__ */ new Set());
@@ -2477,18 +2477,18 @@ function $l(n, e) {
2477
2477
  function mn(n, e, t, r) {
2478
2478
  const i = t._window;
2479
2479
  if (i === null) return null;
2480
- const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !jn && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && s && s.detail === 3 || o === "drop" || o === void 0);
2480
+ const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !$n && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && s && s.detail === 3 || o === "drop" || o === void 0);
2481
2481
  let c, u, d, f;
2482
2482
  if (A(n) && !a) return n.clone();
2483
2483
  if (e === null) return null;
2484
- if (c = e.anchorNode, u = e.focusNode, d = e.anchorOffset, f = e.focusOffset, l && A(n) && !Sn(t, c, u)) return n.clone();
2484
+ if (c = e.anchorNode, u = e.focusNode, d = e.anchorOffset, f = e.focusOffset, l && A(n) && !vn(t, c, u)) return n.clone();
2485
2485
  const g = gs(c, d, u, f, t, n);
2486
2486
  if (g === null) return null;
2487
2487
  const [h, _] = g;
2488
- return new Ge(h, _, A(n) ? n.format : 0, A(n) ? n.style : "");
2488
+ return new Xe(h, _, A(n) ? n.format : 0, A(n) ? n.style : "");
2489
2489
  }
2490
2490
  function L() {
2491
- return Pe()._selection;
2491
+ return Fe()._selection;
2492
2492
  }
2493
2493
  function ft() {
2494
2494
  return R()._editorState._selection;
@@ -2558,16 +2558,16 @@ function ys(n, e, t, r, i) {
2558
2558
  function Yo(n, e, t, r, i, s, o) {
2559
2559
  const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, d = document.activeElement;
2560
2560
  if (i.has(Go) && d !== s || d !== null && ws(d)) return;
2561
- if (!A(e)) return void (n !== null && Sn(t, l, a) && r.removeAllRanges());
2562
- const f = e.anchor, g = e.focus, h = f.key, _ = g.key, p = ot(t, h), x = ot(t, _), y = f.offset, m = g.offset, N = e.format, b = e.style, C = e.isCollapsed();
2561
+ if (!A(e)) return void (n !== null && vn(t, l, a) && r.removeAllRanges());
2562
+ const f = e.anchor, g = e.focus, h = f.key, _ = g.key, p = lt(t, h), x = lt(t, _), y = f.offset, m = g.offset, N = e.format, b = e.style, C = e.isCollapsed();
2563
2563
  let w = p, k = x, S = !1;
2564
2564
  if (f.type === "text") {
2565
- w = st(p);
2565
+ w = ot(p);
2566
2566
  const B = f.getNode();
2567
2567
  S = B.getFormat() !== N || B.getStyle() !== b;
2568
2568
  } else A(n) && n.anchor.type === "text" && (S = !0);
2569
- var O, F, W, z, P;
2570
- if (g.type === "text" && (k = st(x)), w !== null && k !== null && (C && (n === null || S || A(n) && (n.format !== N || n.style !== b)) && (O = N, F = b, W = y, z = h, P = performance.now(), is = [O, F, W, z, P]), c !== y || u !== m || l !== w || a !== k || r.type === "Range" && C || (d !== null && s.contains(d) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
2569
+ var O, F, W, K, P;
2570
+ if (g.type === "text" && (k = ot(x)), w !== null && k !== null && (C && (n === null || S || A(n) && (n.format !== N || n.style !== b)) && (O = N, F = b, W = y, K = h, P = performance.now(), is = [O, F, W, K, P]), c !== y || u !== m || l !== w || a !== k || r.type === "Range" && C || (d !== null && s.contains(d) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
2571
2571
  if (ys(r, w, y, k, m), !i.has(Xo) && e.isCollapsed() && s !== null && s === document.activeElement) {
2572
2572
  const B = A(e) && e.anchor.type === "element" ? w.childNodes[y] || null : r.rangeCount > 0 ? r.getRangeAt(0) : null;
2573
2573
  if (B !== null) {
@@ -2576,46 +2576,46 @@ function Yo(n, e, t, r, i, s, o) {
2576
2576
  const se = document.createRange();
2577
2577
  se.selectNode(B), q = se.getBoundingClientRect();
2578
2578
  } else q = B.getBoundingClientRect();
2579
- (function(se, _e, pe) {
2580
- const dt = zs(pe), Fr = Er(dt);
2579
+ (function(se, pe, ye) {
2580
+ const dt = Ks(ye), Fr = Er(dt);
2581
2581
  if (dt === null || Fr === null) return;
2582
- let { top: bn, bottom: wn } = _e, Kt = 0, Bt = 0, Ne = pe;
2583
- for (; Ne !== null; ) {
2584
- const En = Ne === dt.body;
2585
- if (En) Kt = 0, Bt = oe(se).innerHeight;
2582
+ let { top: wn, bottom: En } = pe, zt = 0, Bt = 0, be = ye;
2583
+ for (; be !== null; ) {
2584
+ const Mn = be === dt.body;
2585
+ if (Mn) zt = 0, Bt = oe(se).innerHeight;
2586
2586
  else {
2587
- const Rt = Ne.getBoundingClientRect();
2588
- Kt = Rt.top, Bt = Rt.bottom;
2587
+ const Rt = be.getBoundingClientRect();
2588
+ zt = Rt.top, Bt = Rt.bottom;
2589
2589
  }
2590
2590
  let ht = 0;
2591
- if (bn < Kt ? ht = -(Kt - bn) : wn > Bt && (ht = wn - Bt), ht !== 0) if (En) Fr.scrollBy(0, ht);
2591
+ if (wn < zt ? ht = -(zt - wn) : En > Bt && (ht = En - Bt), ht !== 0) if (Mn) Fr.scrollBy(0, ht);
2592
2592
  else {
2593
- const Rt = Ne.scrollTop;
2594
- Ne.scrollTop += ht;
2595
- const Lr = Ne.scrollTop - Rt;
2596
- bn -= Lr, wn -= Lr;
2593
+ const Rt = be.scrollTop;
2594
+ be.scrollTop += ht;
2595
+ const Lr = be.scrollTop - Rt;
2596
+ wn -= Lr, En -= Lr;
2597
2597
  }
2598
- if (En) break;
2599
- Ne = Lt(Ne);
2598
+ if (Mn) break;
2599
+ be = Lt(be);
2600
2600
  }
2601
2601
  })(t, q, s);
2602
2602
  }
2603
2603
  }
2604
- er = !0;
2604
+ tr = !0;
2605
2605
  }
2606
2606
  }
2607
2607
  function Ul(n) {
2608
2608
  let e = L() || ft();
2609
2609
  e === null && (e = re().selectEnd()), e.insertNodes(n);
2610
2610
  }
2611
- function In(n) {
2611
+ function Kn(n) {
2612
2612
  let e = n;
2613
2613
  n.isCollapsed() || e.removeText();
2614
2614
  const t = L();
2615
2615
  A(t) && (e = t), A(e) || T(161);
2616
2616
  const r = e.anchor;
2617
2617
  let i = r.getNode(), s = r.offset;
2618
- for (; !we(i); ) {
2618
+ for (; !Ee(i); ) {
2619
2619
  const o = i;
2620
2620
  if ([i, s] = Ho(i, s), o.is(i)) break;
2621
2621
  }
@@ -2624,7 +2624,7 @@ function In(n) {
2624
2624
  function Ho(n, e) {
2625
2625
  const t = n.getParent();
2626
2626
  if (!t) {
2627
- const i = Me();
2627
+ const i = Oe();
2628
2628
  return re().append(i), i.select(), [re(), 0];
2629
2629
  }
2630
2630
  if (M(n)) {
@@ -2636,7 +2636,7 @@ function Ho(n, e) {
2636
2636
  if (!v(n) || e === 0) return [t, n.getIndexWithinParent()];
2637
2637
  const r = n.getChildAtIndex(e);
2638
2638
  if (r) {
2639
- const i = new Ge(ge(n.__key, e, "element"), ge(n.__key, e, "element"), 0, ""), s = n.insertNewAfter(i);
2639
+ const i = new Xe(_e(n.__key, e, "element"), _e(n.__key, e, "element"), 0, ""), s = n.insertNewAfter(i);
2640
2640
  s && s.append(r, ...r.getNextSiblings());
2641
2641
  }
2642
2642
  return [t, n.getIndexWithinParent() + 1];
@@ -2646,25 +2646,25 @@ function hi(n, e, t, r, i = "decorators-and-blocks") {
2646
2646
  const [u, d] = t === n.isBackward() ? [n.focus, n.anchor] : [n.anchor, n.focus];
2647
2647
  return d.set(u.key, u.offset, u.type), !0;
2648
2648
  }
2649
- const s = He(n.focus, t ? "previous" : "next"), o = r === "lineboundary", l = e === "move";
2649
+ const s = qe(n.focus, t ? "previous" : "next"), o = r === "lineboundary", l = e === "move";
2650
2650
  let a = s, c = i === "decorators-and-blocks";
2651
2651
  if (!Ml(a)) {
2652
2652
  for (const u of a) {
2653
2653
  c = !1;
2654
2654
  const { origin: d } = u;
2655
- if (!K(d) || d.isIsolated() || (a = u, !o || !d.isInline())) break;
2655
+ if (!z(d) || d.isIsolated() || (a = u, !o || !d.isInline())) break;
2656
2656
  }
2657
- if (c) for (const u of Ks(s).iterNodeCarets(e === "extend" ? "shadowRoot" : "root")) {
2657
+ if (c) for (const u of zs(s).iterNodeCarets(e === "extend" ? "shadowRoot" : "root")) {
2658
2658
  if (he(u)) u.origin.isInline() || (a = u);
2659
2659
  else {
2660
2660
  if (v(u.origin)) continue;
2661
- K(u.origin) && !u.origin.isInline() && (a = u);
2661
+ z(u.origin) && !u.origin.isInline() && (a = u);
2662
2662
  }
2663
2663
  break;
2664
2664
  }
2665
2665
  }
2666
2666
  if (a === s) return !1;
2667
- if (l && !o && K(a.origin) && a.origin.isKeyboardSelectable()) {
2667
+ if (l && !o && z(a.origin) && a.origin.isKeyboardSelectable()) {
2668
2668
  const u = ps();
2669
2669
  return u.add(a.origin.getKey()), ie(u), !0;
2670
2670
  }
@@ -2681,7 +2681,7 @@ function G() {
2681
2681
  function ms() {
2682
2682
  qt > 99 && T(14);
2683
2683
  }
2684
- function Pe() {
2684
+ function Fe() {
2685
2685
  return j === null && T(195, xs()), j;
2686
2686
  }
2687
2687
  function R() {
@@ -2689,9 +2689,9 @@ function R() {
2689
2689
  }
2690
2690
  function xs() {
2691
2691
  let n = 0;
2692
- const e = /* @__PURE__ */ new Set(), t = Cn.version;
2692
+ const e = /* @__PURE__ */ new Set(), t = Sn.version;
2693
2693
  if (typeof window < "u") for (const i of document.querySelectorAll("[contenteditable]")) {
2694
- const s = vn(i);
2694
+ const s = kn(i);
2695
2695
  if (vr(s)) n++;
2696
2696
  else if (s) {
2697
2697
  let o = String(s.constructor.version || "<0.17.1");
@@ -2722,16 +2722,16 @@ function Cs(n, e) {
2722
2722
  for (const i of r) t.add(i);
2723
2723
  }
2724
2724
  function Vl(n) {
2725
- return mr(n, R()._nodes);
2725
+ return xr(n, R()._nodes);
2726
2726
  }
2727
- function mr(n, e) {
2727
+ function xr(n, e) {
2728
2728
  const t = n.type, r = e.get(t);
2729
2729
  r === void 0 && T(17, t);
2730
2730
  const i = r.klass;
2731
2731
  n.type !== i.getType() && T(18, i.name);
2732
2732
  const s = i.importJSON(n), o = n.children;
2733
2733
  if (v(s) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
2734
- const a = mr(o[l], e);
2734
+ const a = xr(o[l], e);
2735
2735
  s.append(a);
2736
2736
  }
2737
2737
  return s;
@@ -2745,10 +2745,10 @@ function yi(n, e, t) {
2745
2745
  j = r, Z = i, $ = s;
2746
2746
  }
2747
2747
  }
2748
- function Se(n, e) {
2748
+ function ve(n, e) {
2749
2749
  const t = n._pendingEditorState, r = n._rootElement, i = n._headless || r === null;
2750
2750
  if (t === null) return;
2751
- const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== We, c = j, u = Z, d = $, f = n._updating, g = n._observer;
2751
+ const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== Je, c = j, u = Z, d = $, f = n._updating, g = n._observer;
2752
2752
  let h = null;
2753
2753
  if (n._pendingEditorState = null, n._editorState = t, !i && a && g !== null) {
2754
2754
  $ = n, j = t, Z = !1, n._updating = !0;
@@ -2757,60 +2757,60 @@ function Se(n, e) {
2757
2757
  g.disconnect(), h = po(s, t, n, C, w, k);
2758
2758
  } catch (C) {
2759
2759
  if (C instanceof Error && n._onError(C), zn) throw C;
2760
- return Ts(n, null, r, t), Ji(n), n._dirtyType = it, zn = !0, Se(n, s), void (zn = !1);
2760
+ return Ts(n, null, r, t), Ji(n), n._dirtyType = st, zn = !0, ve(n, s), void (zn = !1);
2761
2761
  } finally {
2762
2762
  g.observe(r, gi), n._updating = f, j = c, Z = u, $ = d;
2763
2763
  }
2764
2764
  }
2765
2765
  t._readOnly || (t._readOnly = !0);
2766
2766
  const _ = n._dirtyLeaves, p = n._dirtyElements, x = n._normalizedNodes, y = n._updateTags, m = n._deferred;
2767
- a && (n._dirtyType = We, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(C, w) {
2767
+ a && (n._dirtyType = Je, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(C, w) {
2768
2768
  const k = C._decorators;
2769
2769
  let S = C._pendingDecorators || k;
2770
2770
  const O = w._nodeMap;
2771
2771
  let F;
2772
2772
  for (F in S) O.has(F) || (S === k && (S = As(C)), delete S[F]);
2773
2773
  }(n, t);
2774
- const N = i ? null : ke(oe(n));
2774
+ const N = i ? null : Te(oe(n));
2775
2775
  if (n._editable && N !== null && (a || l === null || l.dirty) && r !== null && !y.has(Qo)) {
2776
2776
  $ = n, j = t;
2777
2777
  try {
2778
2778
  if (g !== null && g.disconnect(), a || l === null || l.dirty) {
2779
2779
  const C = n._blockCursorElement;
2780
- C !== null && sr(C, n, r), Yo(o, l, n, N, y, r);
2780
+ C !== null && or(C, n, r), Yo(o, l, n, N, y, r);
2781
2781
  }
2782
2782
  (function(C, w, k) {
2783
2783
  let S = C._blockCursorElement;
2784
2784
  if (A(k) && k.isCollapsed() && k.anchor.type === "element" && w.contains(document.activeElement)) {
2785
2785
  const O = k.anchor, F = O.getNode(), W = O.offset;
2786
- let z = !1, P = null;
2786
+ let K = !1, P = null;
2787
2787
  if (W === F.getChildrenSize())
2788
- Rn(F.getChildAtIndex(W - 1)) && (z = !0);
2788
+ Wn(F.getChildAtIndex(W - 1)) && (K = !0);
2789
2789
  else {
2790
2790
  const B = F.getChildAtIndex(W);
2791
- if (B !== null && Rn(B)) {
2791
+ if (B !== null && Wn(B)) {
2792
2792
  const q = B.getPreviousSibling();
2793
- (q === null || Rn(q)) && (z = !0, P = C.getElementByKey(B.__key));
2793
+ (q === null || Wn(q)) && (K = !0, P = C.getElementByKey(B.__key));
2794
2794
  }
2795
2795
  }
2796
- if (z) {
2796
+ if (K) {
2797
2797
  const B = C.getElementByKey(F.__key);
2798
2798
  return S === null && (C._blockCursorElement = S = function(q) {
2799
- const se = q.theme, _e = document.createElement("div");
2800
- _e.contentEditable = "false", _e.setAttribute("data-lexical-cursor", "true");
2801
- let pe = se.blockCursor;
2802
- if (pe !== void 0) {
2803
- if (typeof pe == "string") {
2804
- const dt = en(pe);
2805
- pe = se.blockCursor = dt;
2799
+ const se = q.theme, pe = document.createElement("div");
2800
+ pe.contentEditable = "false", pe.setAttribute("data-lexical-cursor", "true");
2801
+ let ye = se.blockCursor;
2802
+ if (ye !== void 0) {
2803
+ if (typeof ye == "string") {
2804
+ const dt = en(ye);
2805
+ ye = se.blockCursor = dt;
2806
2806
  }
2807
- pe !== void 0 && _e.classList.add(...pe);
2807
+ ye !== void 0 && pe.classList.add(...ye);
2808
2808
  }
2809
- return _e;
2809
+ return pe;
2810
2810
  }(C._config)), w.style.caretColor = "transparent", void (P === null ? B.appendChild(S) : B.insertBefore(S, P));
2811
2811
  }
2812
2812
  }
2813
- S !== null && sr(S, C, w);
2813
+ S !== null && or(S, C, w);
2814
2814
  })(n, r, l);
2815
2815
  } finally {
2816
2816
  g !== null && g.observe(r, gi), $ = d, j = c;
@@ -2818,8 +2818,8 @@ function Se(n, e) {
2818
2818
  }
2819
2819
  h !== null && function(C, w, k, S, O) {
2820
2820
  const F = Array.from(C._listeners.mutation), W = F.length;
2821
- for (let z = 0; z < W; z++) {
2822
- const [P, B] = F[z];
2821
+ for (let K = 0; K < W; K++) {
2822
+ const [P, B] = F[K];
2823
2823
  for (const q of B) {
2824
2824
  const se = w.get(q);
2825
2825
  se !== void 0 && P(se, { dirtyLeaves: S, prevEditorState: O, updateTags: k });
@@ -2846,7 +2846,7 @@ function Se(n, e) {
2846
2846
  const k = w.shift();
2847
2847
  if (k) {
2848
2848
  const [S, O] = k;
2849
- xr(C, S, O);
2849
+ xn(C, S, O);
2850
2850
  }
2851
2851
  }
2852
2852
  }(n);
@@ -2867,21 +2867,14 @@ function mi(n, e) {
2867
2867
  for (; t.length !== 0; ) {
2868
2868
  const i = t.shift();
2869
2869
  if (i) {
2870
- const [s, o] = i;
2871
- let l;
2872
- if (o !== void 0) {
2873
- if (l = o.onUpdate, o.skipTransforms && (r = !0), o.discrete) {
2874
- const a = n._pendingEditorState;
2875
- a === null && T(191), a._flushSync = !0;
2876
- }
2877
- l && n._deferred.push(l), Cs(n, o.tag);
2878
- }
2879
- s();
2870
+ const [s, o] = i, l = n._pendingEditorState;
2871
+ let a;
2872
+ o !== void 0 && (a = o.onUpdate, o.skipTransforms && (r = !0), o.discrete && (l === null && T(191), l._flushSync = !0), a && n._deferred.push(a), Cs(n, o.tag)), l == null ? xn(n, s, o) : s();
2880
2873
  }
2881
2874
  }
2882
2875
  return r;
2883
2876
  }
2884
- function xr(n, e, t) {
2877
+ function xn(n, e, t) {
2885
2878
  const r = n._updateTags;
2886
2879
  let i, s = !1, o = !1;
2887
2880
  t !== void 0 && (i = t.onUpdate, Cs(n, t.tag), s = t.skipTransforms || !1, o = t.discrete || !1), i && n._deferred.push(i);
@@ -2894,7 +2887,7 @@ function xr(n, e, t) {
2894
2887
  Sr(null);
2895
2888
  try {
2896
2889
  c && (h ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(y, m) {
2897
- const N = y.getEditorState()._selection, b = ke(oe(y));
2890
+ const N = y.getEditorState()._selection, b = Te(oe(y));
2898
2891
  return A(N) || N == null ? mn(N, b, y, m) : N.clone();
2899
2892
  }(n, t && t.event || null));
2900
2893
  const p = n._compositionKey;
@@ -2908,21 +2901,21 @@ function xr(n, e, t) {
2908
2901
  k !== S && S.selectionTransform(N, b);
2909
2902
  }
2910
2903
  }
2911
- }(a, n), n._dirtyType !== We && (s ? function(y, m) {
2904
+ }(a, n), n._dirtyType !== Je && (s ? function(y, m) {
2912
2905
  const N = m._dirtyLeaves, b = y._nodeMap;
2913
2906
  for (const C of N) {
2914
2907
  const w = b.get(C);
2915
2908
  M(w) && w.isAttached() && w.isSimpleText() && !w.isUnmergeable() && Ur(w);
2916
2909
  }
2917
2910
  }(a, n) : function(y, m) {
2918
- const N = m._dirtyLeaves, b = m._dirtyElements, C = y._nodeMap, w = Ee(), k = /* @__PURE__ */ new Map();
2911
+ const N = m._dirtyLeaves, b = m._dirtyElements, C = y._nodeMap, w = Me(), k = /* @__PURE__ */ new Map();
2919
2912
  let S = N, O = S.size, F = b, W = F.size;
2920
2913
  for (; O > 0 || W > 0; ) {
2921
2914
  if (O > 0) {
2922
2915
  m._dirtyLeaves = /* @__PURE__ */ new Set();
2923
- for (const z of S) {
2924
- const P = C.get(z);
2925
- M(P) && P.isAttached() && P.isSimpleText() && !P.isUnmergeable() && Ur(P), P !== void 0 && pi(P, w) && _i(m, P, k), N.add(z);
2916
+ for (const K of S) {
2917
+ const P = C.get(K);
2918
+ M(P) && P.isAttached() && P.isSimpleText() && !P.isUnmergeable() && Ur(P), P !== void 0 && pi(P, w) && _i(m, P, k), N.add(K);
2926
2919
  }
2927
2920
  if (S = m._dirtyLeaves, O = S.size, O > 0) {
2928
2921
  qt++;
@@ -2930,8 +2923,8 @@ function xr(n, e, t) {
2930
2923
  }
2931
2924
  }
2932
2925
  m._dirtyLeaves = /* @__PURE__ */ new Set(), m._dirtyElements = /* @__PURE__ */ new Map(), F.delete("root") && F.set("root", !0);
2933
- for (const z of F) {
2934
- const P = z[0], B = z[1];
2926
+ for (const K of F) {
2927
+ const P = K[0], B = K[1];
2935
2928
  if (b.set(P, B), !B) continue;
2936
2929
  const q = C.get(P);
2937
2930
  q !== void 0 && pi(q, w) && _i(m, q, k);
@@ -2955,24 +2948,24 @@ function xr(n, e, t) {
2955
2948
  if (A(x)) {
2956
2949
  const y = a._nodeMap, m = x.anchor.key, N = x.focus.key;
2957
2950
  y.get(m) !== void 0 && y.get(N) !== void 0 || T(19);
2958
- } else yr(x) && x._nodes.size === 0 && (a._selection = null);
2951
+ } else mr(x) && x._nodes.size === 0 && (a._selection = null);
2959
2952
  } catch (p) {
2960
- return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = it, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void Se(n);
2953
+ return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = st, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void ve(n);
2961
2954
  } finally {
2962
2955
  j = u, Z = d, $ = f, n._updating = g, qt = 0;
2963
2956
  }
2964
- n._dirtyType !== We || n._deferred.length > 0 || function(p, x) {
2957
+ n._dirtyType !== Je || n._deferred.length > 0 || function(p, x) {
2965
2958
  const y = x.getEditorState()._selection, m = p._selection;
2966
2959
  if (m !== null) {
2967
2960
  if (m.dirty || !m.is(y)) return !0;
2968
2961
  } else if (y !== null) return !0;
2969
2962
  return !1;
2970
- }(a, n) ? a._flushSync ? (a._flushSync = !1, Se(n)) : c && nl(() => {
2971
- Se(n);
2963
+ }(a, n) ? a._flushSync ? (a._flushSync = !1, ve(n)) : c && nl(() => {
2964
+ ve(n);
2972
2965
  }) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
2973
2966
  }
2974
2967
  function te(n, e, t) {
2975
- $ === n && t === void 0 ? e() : xr(n, e, t);
2968
+ $ === n && t === void 0 ? e() : xn(n, e, t);
2976
2969
  }
2977
2970
  class St {
2978
2971
  constructor(e, t, r) {
@@ -3007,7 +3000,7 @@ class St {
3007
3000
  setManagedLineBreak(e) {
3008
3001
  if (e === null) this.removeManagedLineBreak();
3009
3002
  else {
3010
- const t = e === "decorator" && (rt || vt);
3003
+ const t = e === "decorator" && (it || vt);
3011
3004
  this.insertManagedLineBreak(t);
3012
3005
  }
3013
3006
  }
@@ -3187,7 +3180,7 @@ class Dt extends ct {
3187
3180
  const t = this.getChildren(), r = t.length;
3188
3181
  for (let i = 0; i < r; i++) {
3189
3182
  const s = t[i];
3190
- e += s.getTextContent(), v(s) && i !== r - 1 && !s.isInline() && (e += ve);
3183
+ e += s.getTextContent(), v(s) && i !== r - 1 && !s.isInline() && (e += ke);
3191
3184
  }
3192
3185
  return e;
3193
3186
  }
@@ -3196,7 +3189,7 @@ class Dt extends ct {
3196
3189
  const t = this.getChildren(), r = t.length;
3197
3190
  for (let i = 0; i < r; i++) {
3198
3191
  const s = t[i];
3199
- e += s.getTextContentSize(), v(s) && i !== r - 1 && !s.isInline() && (e += ve.length);
3192
+ e += s.getTextContentSize(), v(s) && i !== r - 1 && !s.isInline() && (e += ke.length);
3200
3193
  }
3201
3194
  return e;
3202
3195
  }
@@ -3208,13 +3201,13 @@ class Dt extends ct {
3208
3201
  }
3209
3202
  hasFormat(e) {
3210
3203
  if (e !== "") {
3211
- const t = zr[e];
3204
+ const t = Kr[e];
3212
3205
  return !!(this.getFormat() & t);
3213
3206
  }
3214
3207
  return !1;
3215
3208
  }
3216
3209
  hasTextFormat(e) {
3217
- const t = Je[e];
3210
+ const t = je[e];
3218
3211
  return !!(this.getTextFormat() & t);
3219
3212
  }
3220
3213
  getFormatFlags(e, t) {
@@ -3261,7 +3254,7 @@ class Dt extends ct {
3261
3254
  return t.__dir = e, t;
3262
3255
  }
3263
3256
  setFormat(e) {
3264
- return this.getWritable().__format = e !== "" ? zr[e] : 0, this;
3257
+ return this.getWritable().__format = e !== "" ? Kr[e] : 0, this;
3265
3258
  }
3266
3259
  setStyle(e) {
3267
3260
  return this.getWritable().__style = e || "", this;
@@ -3292,7 +3285,7 @@ class Dt extends ct {
3292
3285
  for (let _ = 0; _ < t; _++) {
3293
3286
  h === null && T(100);
3294
3287
  const p = h.getNextSibling(), x = h.__key;
3295
- Be(h.getWritable()), c.push(x), h = p;
3288
+ Re(h.getWritable()), c.push(x), h = p;
3296
3289
  }
3297
3290
  }
3298
3291
  let g = d;
@@ -3300,7 +3293,7 @@ class Dt extends ct {
3300
3293
  const _ = r[h];
3301
3294
  g !== null && _.is(g) && (d = g = g.getPreviousSibling());
3302
3295
  const p = _.getWritable();
3303
- p.__parent === l && f--, Be(p);
3296
+ p.__parent === l && f--, Re(p);
3304
3297
  const x = _.__key;
3305
3298
  if (g === null) o.__first = x, p.__prev = null;
3306
3299
  else {
@@ -3322,7 +3315,7 @@ class Dt extends ct {
3322
3315
  const h = L();
3323
3316
  if (A(h)) {
3324
3317
  const _ = new Set(c), p = new Set(a), { anchor: x, focus: y } = h;
3325
- Ci(x, _, p) && dn(x, x.getNode(), this, d, u), Ci(y, _, p) && dn(y, y.getNode(), this, d, u), f !== 0 || this.canBeEmpty() || Fe(this) || this.remove();
3318
+ Ci(x, _, p) && dn(x, x.getNode(), this, d, u), Ci(y, _, p) && dn(y, y.getNode(), this, d, u), f !== 0 || this.canBeEmpty() || Le(this) || this.remove();
3326
3319
  }
3327
3320
  }
3328
3321
  return o;
@@ -3424,7 +3417,7 @@ class Ss extends ct {
3424
3417
  return !0;
3425
3418
  }
3426
3419
  }
3427
- function K(n) {
3420
+ function z(n) {
3428
3421
  return n instanceof Ss;
3429
3422
  }
3430
3423
  class Pt extends Dt {
@@ -3442,7 +3435,7 @@ class Pt extends Dt {
3442
3435
  }
3443
3436
  getTextContent() {
3444
3437
  const e = this.__cachedText;
3445
- return !At() && R()._dirtyType !== We || e === null ? super.getTextContent() : e;
3438
+ return !At() && R()._dirtyType !== Je || e === null ? super.getTextContent() : e;
3446
3439
  }
3447
3440
  remove() {
3448
3441
  T(52);
@@ -3460,7 +3453,7 @@ class Pt extends Dt {
3460
3453
  return !1;
3461
3454
  }
3462
3455
  splice(e, t, r) {
3463
- for (const i of r) v(i) || K(i) || T(282);
3456
+ for (const i of r) v(i) || z(i) || T(282);
3464
3457
  return super.splice(e, t, r);
3465
3458
  }
3466
3459
  static importJSON(e) {
@@ -3474,10 +3467,10 @@ function ne(n) {
3474
3467
  return n instanceof Pt;
3475
3468
  }
3476
3469
  function vs(n) {
3477
- return new xn(new Map(n._nodeMap));
3470
+ return new Cn(new Map(n._nodeMap));
3478
3471
  }
3479
3472
  function Cr() {
3480
- return new xn(/* @__PURE__ */ new Map([["root", new Pt()]]));
3473
+ return new Cn(/* @__PURE__ */ new Map([["root", new Pt()]]));
3481
3474
  }
3482
3475
  function ks(n) {
3483
3476
  const e = n.exportJSON(), t = n.constructor;
@@ -3492,7 +3485,7 @@ function ks(n) {
3492
3485
  }
3493
3486
  return e;
3494
3487
  }
3495
- class xn {
3488
+ class Cn {
3496
3489
  constructor(e, t) {
3497
3490
  this._nodeMap = e, this._selection = t || null, this._flushSync = !1, this._readOnly = !1;
3498
3491
  }
@@ -3503,14 +3496,14 @@ class xn {
3503
3496
  return yi(t && t.editor || null, this, e);
3504
3497
  }
3505
3498
  clone(e) {
3506
- const t = new xn(this._nodeMap, e === void 0 ? this._selection : e);
3499
+ const t = new Cn(this._nodeMap, e === void 0 ? this._selection : e);
3507
3500
  return t._readOnly = !0, t;
3508
3501
  }
3509
3502
  toJSON() {
3510
3503
  return yi(null, this, () => ({ root: ks(re()) }));
3511
3504
  }
3512
3505
  }
3513
- const Yl = "historic", Hl = "history-push", Kn = "history-merge", ql = "paste", Go = "collaboration", Xo = "skip-scroll-into-view", Qo = "skip-dom-selection";
3506
+ const Yl = "historic", Hl = "history-push", Bn = "history-merge", ql = "paste", Go = "collaboration", Xo = "skip-scroll-into-view", Qo = "skip-dom-selection";
3514
3507
  class Zo extends Dt {
3515
3508
  static getType() {
3516
3509
  return "artificial";
@@ -3527,7 +3520,7 @@ class Ft extends Dt {
3527
3520
  return new Ft(e.__key);
3528
3521
  }
3529
3522
  createDOM(e) {
3530
- const t = document.createElement("p"), r = nt(e.theme, "paragraph");
3523
+ const t = document.createElement("p"), r = rt(e.theme, "paragraph");
3531
3524
  return r !== void 0 && t.classList.add(...r), t;
3532
3525
  }
3533
3526
  updateDOM(e, t, r) {
@@ -3546,13 +3539,13 @@ class Ft extends Dt {
3546
3539
  return { element: t };
3547
3540
  }
3548
3541
  static importJSON(e) {
3549
- return Me().updateFromJSON(e);
3542
+ return Oe().updateFromJSON(e);
3550
3543
  }
3551
3544
  exportJSON() {
3552
3545
  return { ...super.exportJSON(), textFormat: this.getTextFormat(), textStyle: this.getTextStyle() };
3553
3546
  }
3554
3547
  insertNewAfter(e, t) {
3555
- const r = Me();
3548
+ const r = Oe();
3556
3549
  r.setTextFormat(e.format), r.setTextStyle(e.style);
3557
3550
  const i = this.getDirection();
3558
3551
  return r.setDirection(i), r.setFormat(this.getFormatType()), r.setStyle(this.getStyle()), this.insertAfter(r, t), r;
@@ -3567,11 +3560,11 @@ class Ft extends Dt {
3567
3560
  }
3568
3561
  }
3569
3562
  function el(n) {
3570
- const e = Me();
3563
+ const e = Oe();
3571
3564
  return n.style && (e.setFormat(n.style.textAlign), yl(n, e)), { node: e };
3572
3565
  }
3573
- function Me() {
3574
- return Nn(new Ft());
3566
+ function Oe() {
3567
+ return bn(new Ft());
3575
3568
  }
3576
3569
  function Gl(n) {
3577
3570
  return n instanceof Ft;
@@ -3579,7 +3572,7 @@ function Gl(n) {
3579
3572
  const Xl = 0, Ql = 1, Zl = 3, ea = 4;
3580
3573
  function Ts(n, e, t, r) {
3581
3574
  const i = n._keyToDOMMap;
3582
- i.clear(), n._editorState = Cr(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = We, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
3575
+ i.clear(), n._editorState = Cr(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Je, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
3583
3576
  const s = n._observer;
3584
3577
  s !== null && (s.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", i.set("root", t));
3585
3578
  }
@@ -3599,7 +3592,7 @@ function ta(n) {
3599
3592
  m && m.$transform && C.add(m.$transform), b !== null && C.add(b), g.set(N, { exportDOM: d && d.export ? d.export.get(p) : void 0, klass: p, replace: x, replaceWithKlass: y, sharedNodeState: fo(c[_]), transforms: C });
3600
3593
  }
3601
3594
  }
3602
- const h = new Cn(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, function(_, p) {
3595
+ const h = new Sn(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, function(_, p) {
3603
3596
  const x = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), m = (N) => {
3604
3597
  Object.keys(N).forEach((b) => {
3605
3598
  let C = x.get(b);
@@ -3614,11 +3607,11 @@ function ta(n) {
3614
3607
  C !== null && m(C);
3615
3608
  }), p && m(p), x;
3616
3609
  }(g, d ? d.import : void 0), f, n);
3617
- return a !== void 0 && (h._pendingEditorState = a, h._dirtyType = it), h;
3610
+ return a !== void 0 && (h._pendingEditorState = a, h._dirtyType = st), h;
3618
3611
  }
3619
- class Cn {
3612
+ class Sn {
3620
3613
  constructor(e, t, r, i, s, o, l, a) {
3621
- this._createEditorArgs = a, this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = We, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = Fs(), this._onError = s, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
3614
+ this._createEditorArgs = a, this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Je, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = Fs(), this._onError = s, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
3622
3615
  }
3623
3616
  isComposing() {
3624
3617
  return this._compositionKey != null;
@@ -3709,7 +3702,7 @@ class Cn {
3709
3702
  const f = U(d);
3710
3703
  f && f.markDirty();
3711
3704
  }
3712
- }, o._pendingEditorState === null ? { tag: Kn } : void 0);
3705
+ }, o._pendingEditorState === null ? { tag: Bn } : void 0);
3713
3706
  }(this, i.map((o) => o.klass.getType())), () => {
3714
3707
  i.forEach((o) => o.transforms.delete(t));
3715
3708
  };
@@ -3735,15 +3728,15 @@ class Cn {
3735
3728
  setRootElement(e) {
3736
3729
  const t = this._rootElement;
3737
3730
  if (e !== t) {
3738
- const r = nt(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
3739
- if (this._rootElement = e, Ts(this, t, e, i), t !== null && (this._config.disableEvents || zo(t), r != null && t.classList.remove(...r)), e !== null) {
3731
+ const r = rt(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
3732
+ if (this._rootElement = e, Ts(this, t, e, i), t !== null && (this._config.disableEvents || Ko(t), r != null && t.classList.remove(...r)), e !== null) {
3740
3733
  const s = Er(e), o = e.style;
3741
- o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = it, Ji(this), this._updateTags.add(Kn), Se(this), this._config.disableEvents || function(l, a) {
3734
+ o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = st, Ji(this), this._updateTags.add(Bn), ve(this), this._config.disableEvents || function(l, a) {
3742
3735
  const c = l.ownerDocument, u = un.get(c);
3743
3736
  (u === void 0 || u < 1) && c.addEventListener("selectionchange", cs), un.set(c, (u || 0) + 1), l.__lexicalEditor = a;
3744
3737
  const d = as(l);
3745
- for (let f = 0; f < Zn.length; f++) {
3746
- const [g, h] = Zn[f], _ = typeof h == "function" ? (p) => {
3738
+ for (let f = 0; f < er.length; f++) {
3739
+ const [g, h] = er[f], _ = typeof h == "function" ? (p) => {
3747
3740
  ei(p) || (Zr(p), (a.isEditable() || g === "click") && h(p, a));
3748
3741
  } : (p) => {
3749
3742
  if (ei(p)) return;
@@ -3775,7 +3768,7 @@ class Cn {
3775
3768
  });
3776
3769
  }
3777
3770
  }(e, this), r != null && e.classList.add(...r);
3778
- } else this._window = null, this._updateTags.add(Kn), Se(this);
3771
+ } else this._window = null, this._updateTags.add(Bn), ve(this);
3779
3772
  Ct("root", this, !1, e, t);
3780
3773
  }
3781
3774
  }
@@ -3790,7 +3783,7 @@ class Cn {
3790
3783
  let r = e;
3791
3784
  r._readOnly && (r = vs(e), r._selection = e._selection ? e._selection.clone() : null), Wi(this);
3792
3785
  const i = this._pendingEditorState, s = this._updateTags, o = t !== void 0 ? t.tag : null;
3793
- i === null || i.isEmpty() || (o != null && s.add(o), Se(this)), this._pendingEditorState = r, this._dirtyType = it, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || Se(this);
3786
+ i === null || i.isEmpty() || (o != null && s.add(o), ve(this)), this._pendingEditorState = r, this._dirtyType = st, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || ve(this);
3794
3787
  }
3795
3788
  parseEditorState(e, t) {
3796
3789
  return function(r, i, s) {
@@ -3798,7 +3791,7 @@ class Cn {
3798
3791
  i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, j = o, Z = !1, $ = i, Sr(null);
3799
3792
  try {
3800
3793
  const h = i._nodes;
3801
- mr(r.root, h), s && s(), o._readOnly = !0;
3794
+ xr(r.root, h), s && s(), o._readOnly = !0;
3802
3795
  } catch (h) {
3803
3796
  h instanceof Error && i._onError(h);
3804
3797
  } finally {
@@ -3808,11 +3801,11 @@ class Cn {
3808
3801
  }(typeof e == "string" ? JSON.parse(e) : e, this, t);
3809
3802
  }
3810
3803
  read(e) {
3811
- return Se(this), this.getEditorState().read(e, { editor: this });
3804
+ return ve(this), this.getEditorState().read(e, { editor: this });
3812
3805
  }
3813
3806
  update(e, t) {
3814
3807
  (function(r, i, s) {
3815
- r._updating ? r._updates.push([i, s]) : xr(r, i, s);
3808
+ r._updating ? r._updates.push([i, s]) : xn(r, i, s);
3816
3809
  })(this, e, t);
3817
3810
  }
3818
3811
  focus(e, t = {}) {
@@ -3827,7 +3820,7 @@ class Cn {
3827
3820
  blur() {
3828
3821
  const e = this._rootElement;
3829
3822
  e !== null && e.blur();
3830
- const t = ke(this._window);
3823
+ const t = Te(this._window);
3831
3824
  t !== null && t.removeAllRanges();
3832
3825
  }
3833
3826
  isEditable() {
@@ -3840,10 +3833,10 @@ class Cn {
3840
3833
  return { editorState: this._editorState.toJSON() };
3841
3834
  }
3842
3835
  }
3843
- Cn.version = "0.33.1+prod.esm";
3844
- let rr = null;
3836
+ Sn.version = "0.34.0+prod.esm";
3837
+ let ir = null;
3845
3838
  function Sr(n) {
3846
- rr = n;
3839
+ ir = n;
3847
3840
  }
3848
3841
  let tl = 1;
3849
3842
  function Ns(n, e) {
@@ -3857,15 +3850,15 @@ const nl = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
3857
3850
  Promise.resolve().then(n);
3858
3851
  };
3859
3852
  function Si(n) {
3860
- return K(kr(n));
3853
+ return z(kr(n));
3861
3854
  }
3862
3855
  function ws(n) {
3863
3856
  const e = document.activeElement;
3864
3857
  if (!ee(e)) return !1;
3865
3858
  const t = e.nodeName;
3866
- return K(kr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && vn(e) == null);
3859
+ return z(kr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && kn(e) == null);
3867
3860
  }
3868
- function Sn(n, e, t) {
3861
+ function vn(n, e, t) {
3869
3862
  const r = n.getRootElement();
3870
3863
  try {
3871
3864
  return r !== null && r.contains(e) && r.contains(t) && e !== null && !ws(e) && Es(e) === n;
@@ -3874,60 +3867,60 @@ function Sn(n, e, t) {
3874
3867
  }
3875
3868
  }
3876
3869
  function vr(n) {
3877
- return n instanceof Cn;
3870
+ return n instanceof Sn;
3878
3871
  }
3879
3872
  function Es(n) {
3880
3873
  let e = n;
3881
3874
  for (; e != null; ) {
3882
- const t = vn(e);
3875
+ const t = kn(e);
3883
3876
  if (vr(t)) return t;
3884
3877
  e = Lt(e);
3885
3878
  }
3886
3879
  return null;
3887
3880
  }
3888
- function vn(n) {
3881
+ function kn(n) {
3889
3882
  return n ? n.__lexicalEditor : null;
3890
3883
  }
3891
- function Ke(n) {
3884
+ function Be(n) {
3892
3885
  return ds(n) || n.isToken();
3893
3886
  }
3894
- function be(n) {
3895
- return Ke(n) || n.isSegmented();
3887
+ function we(n) {
3888
+ return Be(n) || n.isSegmented();
3896
3889
  }
3897
- function Te(n) {
3890
+ function Ne(n) {
3898
3891
  return It(n) && n.nodeType === Vs;
3899
3892
  }
3900
3893
  function rl(n) {
3901
3894
  return It(n) && n.nodeType === Ys;
3902
3895
  }
3903
- function st(n) {
3896
+ function ot(n) {
3904
3897
  let e = n;
3905
3898
  for (; e != null; ) {
3906
- if (Te(e)) return e;
3899
+ if (Ne(e)) return e;
3907
3900
  e = e.firstChild;
3908
3901
  }
3909
3902
  return null;
3910
3903
  }
3911
3904
  function hn(n, e, t) {
3912
- const r = Je[e];
3905
+ const r = je[e];
3913
3906
  if (t !== null && (n & r) == (t & r)) return n;
3914
3907
  let i = n ^ r;
3915
3908
  return e === "subscript" ? i &= -65 : e === "superscript" ? i &= -33 : e === "lowercase" ? (i &= -513, i &= -1025) : e === "uppercase" ? (i &= -257, i &= -1025) : e === "capitalize" && (i &= -257, i &= -513), i;
3916
3909
  }
3917
3910
  function na(n) {
3918
- return M(n) || tt(n) || K(n);
3911
+ return M(n) || nt(n) || z(n);
3919
3912
  }
3920
3913
  function Ms(n, e) {
3921
3914
  const t = function() {
3922
- const o = rr;
3923
- return rr = null, o;
3915
+ const o = ir;
3916
+ return ir = null, o;
3924
3917
  }();
3925
3918
  if ((e = e || t && t.__key) != null) return void (n.__key = e);
3926
3919
  G(), ms();
3927
- const r = R(), i = Pe(), s = "" + tl++;
3920
+ const r = R(), i = Fe(), s = "" + tl++;
3928
3921
  i._nodeMap.set(s, n), v(n) ? r._dirtyElements.set(s, !0) : r._dirtyLeaves.add(s), r._cloneNotNeeded.add(s), r._dirtyType = Ii, n.__key = s;
3929
3922
  }
3930
- function Be(n) {
3923
+ function Re(n) {
3931
3924
  const e = n.getParent();
3932
3925
  if (e !== null) {
3933
3926
  const t = n.getWritable(), r = e.getWritable(), i = n.getPreviousSibling(), s = n.getNextSibling(), o = s !== null ? s.__key : null, l = i !== null ? i.__key : null, a = i !== null ? i.getWritable() : null, c = s !== null ? s.getWritable() : null;
@@ -3936,7 +3929,7 @@ function Be(n) {
3936
3929
  }
3937
3930
  function gn(n) {
3938
3931
  ms();
3939
- const e = n.getLatest(), t = e.__parent, r = Pe(), i = R(), s = r._nodeMap, o = i._dirtyElements;
3932
+ const e = n.getLatest(), t = e.__parent, r = Fe(), i = R(), s = r._nodeMap, o = i._dirtyElements;
3940
3933
  t !== null && function(a, c, u) {
3941
3934
  let d = a;
3942
3935
  for (; d !== null; ) {
@@ -3963,18 +3956,18 @@ function Y(n) {
3963
3956
  }
3964
3957
  }
3965
3958
  }
3966
- function Ee() {
3959
+ function Me() {
3967
3960
  return At() ? null : R()._compositionKey;
3968
3961
  }
3969
3962
  function U(n, e) {
3970
- const t = (e || Pe())._nodeMap.get(n);
3963
+ const t = (e || Fe())._nodeMap.get(n);
3971
3964
  return t === void 0 ? null : t;
3972
3965
  }
3973
3966
  function Os(n, e) {
3974
- const t = kn(n, R());
3967
+ const t = Tn(n, R());
3975
3968
  return t !== void 0 ? U(t, e) : null;
3976
3969
  }
3977
- function kn(n, e) {
3970
+ function Tn(n, e) {
3978
3971
  return n[`__lexicalKey_${e._key}`];
3979
3972
  }
3980
3973
  function kr(n, e) {
@@ -3994,21 +3987,21 @@ function vi(n) {
3994
3987
  return n.read(() => re().getTextContent());
3995
3988
  }
3996
3989
  function re() {
3997
- return Ds(Pe());
3990
+ return Ds(Fe());
3998
3991
  }
3999
3992
  function Ds(n) {
4000
3993
  return n._nodeMap.get("root");
4001
3994
  }
4002
3995
  function ie(n) {
4003
3996
  G();
4004
- const e = Pe();
3997
+ const e = Fe();
4005
3998
  n !== null && (n.dirty = !0, n.setCachedNodes(null)), e._selection = n;
4006
3999
  }
4007
- function Ze(n) {
4000
+ function et(n) {
4008
4001
  const e = R(), t = function(r, i) {
4009
4002
  let s = r;
4010
4003
  for (; s != null; ) {
4011
- const o = kn(s, i);
4004
+ const o = Tn(s, i);
4012
4005
  if (o !== void 0) return o;
4013
4006
  s = Lt(s);
4014
4007
  }
@@ -4016,9 +4009,6 @@ function Ze(n) {
4016
4009
  }(n, e);
4017
4010
  return t === null ? n === e.getRootElement() ? U("root") : null : U(t);
4018
4011
  }
4019
- function ki(n, e) {
4020
- return e ? n.getTextContentSize() : 0;
4021
- }
4022
4012
  function Ps(n) {
4023
4013
  return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n);
4024
4014
  }
@@ -4032,10 +4022,10 @@ function Fs() {
4032
4022
  return Math.random().toString(36).replace(/[^a-z]+/g, "").substring(0, 5);
4033
4023
  }
4034
4024
  function Ls(n) {
4035
- return Te(n) ? n.nodeValue : null;
4025
+ return Ne(n) ? n.nodeValue : null;
4036
4026
  }
4037
4027
  function Nr(n, e, t) {
4038
- const r = ke(oe(e));
4028
+ const r = Te(oe(e));
4039
4029
  if (r === null) return;
4040
4030
  const i = r.anchorNode;
4041
4031
  let { anchorOffset: s, focusOffset: o } = r;
@@ -4060,7 +4050,7 @@ function br(n, e, t, r, i) {
4060
4050
  const a = s.getTextContent();
4061
4051
  if (i || l !== a) {
4062
4052
  if (l === "") {
4063
- if (Y(null), vt || rt || Zt) s.remove();
4053
+ if (Y(null), vt || it || Zt) s.remove();
4064
4054
  else {
4065
4055
  const _ = R();
4066
4056
  setTimeout(() => {
@@ -4071,15 +4061,24 @@ function br(n, e, t, r, i) {
4071
4061
  }
4072
4062
  return;
4073
4063
  }
4074
- const c = s.getParent(), u = ft(), d = s.getTextContentSize(), f = Ee(), g = s.getKey();
4064
+ const c = s.getParent(), u = ft(), d = s.getTextContentSize(), f = Me(), g = s.getKey();
4075
4065
  if (s.isToken() || f !== null && g === f && !o || A(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !s.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === d && !s.canInsertTextAfter() && !o)) return void s.markDirty();
4076
4066
  const h = L();
4077
- if (!A(h) || t === null || r === null) return void s.setTextContent(l);
4067
+ if (!A(h) || t === null || r === null) return void ki(s, l, h);
4078
4068
  if (h.setTextNodeRange(s, t, s, r), s.isSegmented()) {
4079
4069
  const _ = V(s.getTextContent());
4080
4070
  s.replace(_), s = _;
4081
4071
  }
4082
- s.setTextContent(l);
4072
+ ki(s, l, h);
4073
+ }
4074
+ }
4075
+ }
4076
+ function ki(n, e, t) {
4077
+ if (n.setTextContent(e), A(t)) {
4078
+ const r = n.getKey();
4079
+ for (const i of ["anchor", "focus"]) {
4080
+ const s = t[i];
4081
+ s.type === "text" && s.key === r && (s.offset = ge(n, s.offset, "clamp"));
4083
4082
  }
4084
4083
  }
4085
4084
  }
@@ -4093,25 +4092,25 @@ function il(n, e) {
4093
4092
  function I(n, e, t) {
4094
4093
  return il(n, t) && n.key.toLowerCase() === e.toLowerCase();
4095
4094
  }
4096
- const xe = { ctrlKey: !fe, metaKey: fe }, Ti = { altKey: fe, ctrlKey: !fe };
4095
+ const Ce = { ctrlKey: !fe, metaKey: fe }, Ti = { altKey: fe, ctrlKey: !fe };
4097
4096
  function Ni(n) {
4098
4097
  return n.key === "Backspace";
4099
4098
  }
4100
4099
  function bi(n) {
4101
- return I(n, "a", xe);
4100
+ return I(n, "a", Ce);
4102
4101
  }
4103
4102
  function ra(n) {
4104
4103
  const e = re();
4105
4104
  if (A(n)) {
4106
4105
  const t = n.anchor, r = n.focus, i = t.getNode().getTopLevelElementOrThrow().getParentOrThrow();
4107
- return t.set(i.getKey(), 0, "element"), r.set(i.getKey(), i.getChildrenSize(), "element"), $n(n), n;
4106
+ return t.set(i.getKey(), 0, "element"), r.set(i.getKey(), i.getChildrenSize(), "element"), Un(n), n;
4108
4107
  }
4109
4108
  {
4110
4109
  const t = e.select(0, e.getChildrenSize());
4111
- return ie($n(t)), t;
4110
+ return ie(Un(t)), t;
4112
4111
  }
4113
4112
  }
4114
- function nt(n, e) {
4113
+ function rt(n, e) {
4115
4114
  n.__lexicalClassNameCache === void 0 && (n.__lexicalClassNameCache = {});
4116
4115
  const t = n.__lexicalClassNameCache, r = t[e];
4117
4116
  if (r !== void 0) return r;
@@ -4173,10 +4172,10 @@ function E(n, e, t) {
4173
4172
  return !1;
4174
4173
  }(n, e, t);
4175
4174
  }
4176
- function Tn(n) {
4175
+ function Nn(n) {
4177
4176
  return !ne(n) && !n.isLastChild() && !n.isInline();
4178
4177
  }
4179
- function ot(n, e) {
4178
+ function lt(n, e) {
4180
4179
  const t = n._keyToDOMMap.get(e);
4181
4180
  return t === void 0 && T(75, e), t;
4182
4181
  }
@@ -4184,7 +4183,7 @@ function Lt(n) {
4184
4183
  const e = n.assignedSlot || n.parentElement;
4185
4184
  return dl(e) ? e.host : e;
4186
4185
  }
4187
- function zs(n) {
4186
+ function Ks(n) {
4188
4187
  return rl(n) ? n : ee(n) ? n.ownerDocument : null;
4189
4188
  }
4190
4189
  function ol(n) {
@@ -4193,7 +4192,7 @@ function ol(n) {
4193
4192
  function ll(n) {
4194
4193
  G(), R()._deferred.push(n);
4195
4194
  }
4196
- function ir(n, e) {
4195
+ function sr(n, e) {
4197
4196
  let t = n.getParent();
4198
4197
  for (; t !== null; ) {
4199
4198
  if (t.is(e)) return !0;
@@ -4202,7 +4201,7 @@ function ir(n, e) {
4202
4201
  return !1;
4203
4202
  }
4204
4203
  function Er(n) {
4205
- const e = zs(n);
4204
+ const e = Ks(n);
4206
4205
  return e ? e.defaultView : null;
4207
4206
  }
4208
4207
  function oe(n) {
@@ -4210,24 +4209,24 @@ function oe(n) {
4210
4209
  return e === null && T(78), e;
4211
4210
  }
4212
4211
  function ia(n) {
4213
- return v(n) && n.isInline() || K(n) && n.isInline();
4212
+ return v(n) && n.isInline() || z(n) && n.isInline();
4214
4213
  }
4215
4214
  function al(n) {
4216
4215
  let e = n.getParentOrThrow();
4217
4216
  for (; e !== null; ) {
4218
- if (Fe(e)) return e;
4217
+ if (Le(e)) return e;
4219
4218
  e = e.getParentOrThrow();
4220
4219
  }
4221
4220
  return e;
4222
4221
  }
4223
- function Fe(n) {
4222
+ function Le(n) {
4224
4223
  return ne(n) || v(n) && n.isShadowRoot();
4225
4224
  }
4226
4225
  function cl(n) {
4227
4226
  const e = n.constructor.clone(n);
4228
4227
  return Ms(e, null), e.afterCloneFrom(n), e;
4229
4228
  }
4230
- function Nn(n) {
4229
+ function bn(n) {
4231
4230
  const e = R(), t = n.getType(), r = bs(e, t);
4232
4231
  r === void 0 && T(200, n.constructor.name, t);
4233
4232
  const { replace: i, replaceWithKlass: s } = r;
@@ -4237,22 +4236,22 @@ function Nn(n) {
4237
4236
  }
4238
4237
  return n;
4239
4238
  }
4240
- function Bn(n, e) {
4241
- !ne(n.getParent()) || v(e) || K(e) || T(99);
4239
+ function Rn(n, e) {
4240
+ !ne(n.getParent()) || v(e) || z(e) || T(99);
4242
4241
  }
4243
4242
  function ul(n) {
4244
4243
  const e = U(n);
4245
4244
  return e === null && T(63, n), e;
4246
4245
  }
4247
- function Rn(n) {
4248
- return (K(n) || v(n) && !n.canBeEmpty()) && !n.isInline();
4246
+ function Wn(n) {
4247
+ return (z(n) || v(n) && !n.canBeEmpty()) && !n.isInline();
4249
4248
  }
4250
- function sr(n, e, t) {
4249
+ function or(n, e, t) {
4251
4250
  t.style.removeProperty("caret-color"), e._blockCursorElement = null;
4252
4251
  const r = n.parentElement;
4253
4252
  r !== null && r.removeChild(n);
4254
4253
  }
4255
- function ke(n) {
4254
+ function Te(n) {
4256
4255
  return ae ? (n || window).getSelection() : null;
4257
4256
  }
4258
4257
  function fl(n) {
@@ -4279,13 +4278,13 @@ function Ei(n) {
4279
4278
  const e = new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/, "i");
4280
4279
  return n.nodeName.match(e) !== null;
4281
4280
  }
4282
- function we(n) {
4283
- if (K(n) && !n.isInline()) return !0;
4284
- if (!v(n) || Fe(n)) return !1;
4285
- const e = n.getFirstChild(), t = e === null || tt(e) || M(e) || e.isInline();
4281
+ function Ee(n) {
4282
+ if (z(n) && !n.isInline()) return !0;
4283
+ if (!v(n) || Le(n)) return !1;
4284
+ const e = n.getFirstChild(), t = e === null || nt(e) || M(e) || e.isInline();
4286
4285
  return !n.isInline() && n.canBeEmpty() !== !1 && t;
4287
4286
  }
4288
- function Wn(n, e) {
4287
+ function Jn(n, e) {
4289
4288
  let t = n;
4290
4289
  for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
4291
4290
  return e(t) ? t : null;
@@ -4328,7 +4327,7 @@ function _t(n, e) {
4328
4327
  }(n, e) && n[e] !== ct[e];
4329
4328
  }
4330
4329
  function Mr(n) {
4331
- const e = Kr in n.prototype ? n.prototype[Kr]() : void 0, t = /* @__PURE__ */ function(o) {
4330
+ const e = zr in n.prototype ? n.prototype[zr]() : void 0, t = /* @__PURE__ */ function(o) {
4332
4331
  return o === Ss || o === Dt || o === ct;
4333
4332
  }(n), r = !t && _t(n, "getType") ? n.getType() : void 0;
4334
4333
  let i, s = r;
@@ -4346,7 +4345,7 @@ class Or {
4346
4345
  this.origin = e;
4347
4346
  }
4348
4347
  [Symbol.iterator]() {
4349
- return Bs({ hasNext: lt, initial: this.getAdjacentCaret(), map: (e) => e, step: (e) => e.getAdjacentCaret() });
4348
+ return Bs({ hasNext: at, initial: this.getAdjacentCaret(), map: (e) => e, step: (e) => e.getAdjacentCaret() });
4350
4349
  }
4351
4350
  getAdjacentCaret() {
4352
4351
  return H(this.getNodeAtCaret(), this.direction);
@@ -4390,14 +4389,14 @@ class wt extends Or {
4390
4389
  type = "child";
4391
4390
  getLatest() {
4392
4391
  const e = this.origin.getLatest();
4393
- return e === this.origin ? this : De(e, this.direction);
4392
+ return e === this.origin ? this : Pe(e, this.direction);
4394
4393
  }
4395
4394
  getParentCaret(e = "root") {
4396
4395
  return H(Ar(this.getParentAtCaret(), e), this.direction);
4397
4396
  }
4398
4397
  getFlipped() {
4399
- const e = Xe(this.direction);
4400
- return H(this.getNodeAtCaret(), e) || De(this.origin, e);
4398
+ const e = Qe(this.direction);
4399
+ return H(this.getNodeAtCaret(), e) || Pe(this.origin, e);
4401
4400
  }
4402
4401
  getParentAtCaret() {
4403
4402
  return this.origin;
@@ -4412,14 +4411,14 @@ class wt extends Or {
4412
4411
  return this.isSameNodeCaret(e);
4413
4412
  }
4414
4413
  }
4415
- const Cl = { root: ne, shadowRoot: Fe };
4416
- function Xe(n) {
4414
+ const Cl = { root: ne, shadowRoot: Le };
4415
+ function Qe(n) {
4417
4416
  return xl[n];
4418
4417
  }
4419
4418
  function Ar(n, e = "root") {
4420
4419
  return Cl[e](n) ? null : n;
4421
4420
  }
4422
- class $e extends Or {
4421
+ class Ue extends Or {
4423
4422
  type = "sibling";
4424
4423
  getLatest() {
4425
4424
  const e = this.origin.getLatest();
@@ -4432,30 +4431,30 @@ class $e extends Or {
4432
4431
  return this.origin.getParent();
4433
4432
  }
4434
4433
  getChildCaret() {
4435
- return v(this.origin) ? De(this.origin, this.direction) : null;
4434
+ return v(this.origin) ? Pe(this.origin, this.direction) : null;
4436
4435
  }
4437
4436
  getParentCaret(e = "root") {
4438
4437
  return H(Ar(this.getParentAtCaret(), e), this.direction);
4439
4438
  }
4440
4439
  getFlipped() {
4441
- const e = Xe(this.direction);
4442
- return H(this.getNodeAtCaret(), e) || De(this.origin.getParentOrThrow(), e);
4440
+ const e = Qe(this.direction);
4441
+ return H(this.getNodeAtCaret(), e) || Pe(this.origin.getParentOrThrow(), e);
4443
4442
  }
4444
4443
  isSamePointCaret(e) {
4445
- return e instanceof $e && this.direction === e.direction && this.origin.is(e.origin);
4444
+ return e instanceof Ue && this.direction === e.direction && this.origin.is(e.origin);
4446
4445
  }
4447
4446
  isSameNodeCaret(e) {
4448
- return (e instanceof $e || e instanceof Ue) && this.direction === e.direction && this.origin.is(e.origin);
4447
+ return (e instanceof Ue || e instanceof Ve) && this.direction === e.direction && this.origin.is(e.origin);
4449
4448
  }
4450
4449
  }
4451
- class Ue extends Or {
4450
+ class Ve extends Or {
4452
4451
  type = "text";
4453
4452
  constructor(e, t) {
4454
4453
  super(e), this.offset = t;
4455
4454
  }
4456
4455
  getLatest() {
4457
4456
  const e = this.origin.getLatest();
4458
- return e === this.origin ? this : Ve(e, this.direction, this.offset);
4457
+ return e === this.origin ? this : Ye(e, this.direction, this.offset);
4459
4458
  }
4460
4459
  getParentAtCaret() {
4461
4460
  return this.origin.getParent();
@@ -4467,28 +4466,28 @@ class Ue extends Or {
4467
4466
  return H(Ar(this.getParentAtCaret(), e), this.direction);
4468
4467
  }
4469
4468
  getFlipped() {
4470
- return Ve(this.origin, Xe(this.direction), this.offset);
4469
+ return Ye(this.origin, Qe(this.direction), this.offset);
4471
4470
  }
4472
4471
  isSamePointCaret(e) {
4473
- return e instanceof Ue && this.direction === e.direction && this.origin.is(e.origin) && this.offset === e.offset;
4472
+ return e instanceof Ve && this.direction === e.direction && this.origin.is(e.origin) && this.offset === e.offset;
4474
4473
  }
4475
4474
  isSameNodeCaret(e) {
4476
- return (e instanceof $e || e instanceof Ue) && this.direction === e.direction && this.origin.is(e.origin);
4475
+ return (e instanceof Ue || e instanceof Ve) && this.direction === e.direction && this.origin.is(e.origin);
4477
4476
  }
4478
4477
  getSiblingCaret() {
4479
4478
  return H(this.origin, this.direction);
4480
4479
  }
4481
4480
  }
4482
- function Oe(n) {
4483
- return n instanceof Ue;
4481
+ function Ae(n) {
4482
+ return n instanceof Ve;
4484
4483
  }
4485
- function lt(n) {
4486
- return n instanceof $e;
4484
+ function at(n) {
4485
+ return n instanceof Ue;
4487
4486
  }
4488
4487
  function he(n) {
4489
4488
  return n instanceof wt;
4490
4489
  }
4491
- const Sl = { next: class extends Ue {
4490
+ const Sl = { next: class extends Ve {
4492
4491
  direction = "next";
4493
4492
  getNodeAtCaret() {
4494
4493
  return this.origin.getNextSibling();
@@ -4496,7 +4495,7 @@ const Sl = { next: class extends Ue {
4496
4495
  insert(n) {
4497
4496
  return this.origin.insertAfter(n), this;
4498
4497
  }
4499
- }, previous: class extends Ue {
4498
+ }, previous: class extends Ve {
4500
4499
  direction = "previous";
4501
4500
  getNodeAtCaret() {
4502
4501
  return this.origin.getPreviousSibling();
@@ -4504,7 +4503,7 @@ const Sl = { next: class extends Ue {
4504
4503
  insert(n) {
4505
4504
  return this.origin.insertBefore(n), this;
4506
4505
  }
4507
- } }, vl = { next: class extends $e {
4506
+ } }, vl = { next: class extends Ue {
4508
4507
  direction = "next";
4509
4508
  getNodeAtCaret() {
4510
4509
  return this.origin.getNextSibling();
@@ -4512,7 +4511,7 @@ const Sl = { next: class extends Ue {
4512
4511
  insert(n) {
4513
4512
  return this.origin.insertAfter(n), this;
4514
4513
  }
4515
- }, previous: class extends $e {
4514
+ }, previous: class extends Ue {
4516
4515
  direction = "previous";
4517
4516
  getNodeAtCaret() {
4518
4517
  return this.origin.getPreviousSibling();
@@ -4540,23 +4539,23 @@ const Sl = { next: class extends Ue {
4540
4539
  function H(n, e) {
4541
4540
  return n ? new vl[e](n) : null;
4542
4541
  }
4543
- function Ve(n, e, t) {
4544
- return n ? new Sl[e](n, at(n, t)) : null;
4542
+ function Ye(n, e, t) {
4543
+ return n ? new Sl[e](n, ge(n, t)) : null;
4545
4544
  }
4546
- function at(n, e) {
4547
- const t = n.getTextContentSize();
4548
- let r = e === "next" ? t : e === "previous" ? 0 : e;
4549
- return (r < 0 || r > t) && (function(i, ...s) {
4550
- const o = new URL("https://lexical.dev/docs/error"), l = new URLSearchParams();
4551
- l.append("code", i);
4552
- for (const a of s) l.append("v", a);
4553
- o.search = l.toString(), console.warn(`Minified Lexical warning #${i}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
4554
- }(284, String(e), String(t), n.getKey()), r = r < 0 ? 0 : t), r;
4545
+ function ge(n, e, t = "error") {
4546
+ const r = n.getTextContentSize();
4547
+ let i = e === "next" ? r : e === "previous" ? 0 : e;
4548
+ return (i < 0 || i > r) && (t !== "clamp" && function(s, ...o) {
4549
+ const l = new URL("https://lexical.dev/docs/error"), a = new URLSearchParams();
4550
+ a.append("code", s);
4551
+ for (const c of o) a.append("v", c);
4552
+ l.search = a.toString(), console.warn(`Minified Lexical warning #${s}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
4553
+ }(284, String(e), String(r), n.getKey()), i = i < 0 ? 0 : r), i;
4555
4554
  }
4556
4555
  function Ai(n, e) {
4557
4556
  return new Nl(n, e);
4558
4557
  }
4559
- function De(n, e) {
4558
+ function Pe(n, e) {
4560
4559
  return v(n) ? new kl[e](n) : null;
4561
4560
  }
4562
4561
  function Tl(n) {
@@ -4580,8 +4579,8 @@ class Pr {
4580
4579
  getTextSlices() {
4581
4580
  const e = (i) => {
4582
4581
  const s = this[i].getLatest();
4583
- return Oe(s) ? function(o, l) {
4584
- const { direction: a, origin: c } = o, u = at(c, l === "focus" ? Xe(a) : a);
4582
+ return Ae(s) ? function(o, l) {
4583
+ const { direction: a, origin: c } = o, u = ge(c, l === "focus" ? Qe(a) : a);
4585
4584
  return Ai(o, u - o.offset);
4586
4585
  }(s, i) : null;
4587
4586
  }, t = e("anchor"), r = e("focus");
@@ -4592,7 +4591,7 @@ class Pr {
4592
4591
  return [t, r];
4593
4592
  }
4594
4593
  iterNodeCarets(e = "root") {
4595
- const t = Oe(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Oe(r), s = (o) => o.isSameNodeCaret(r) ? null : Dr(o) || o.getParentCaret(e);
4594
+ const t = Ae(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Ae(r), s = (o) => o.isSameNodeCaret(r) ? null : Dr(o) || o.getParentCaret(e);
4596
4595
  return Bs({ hasNext: (o) => o !== null && !(i && r.isSameNodeCaret(o)), initial: t.isSameNodeCaret(r) ? null : s(t), map: (o) => o, step: s });
4597
4596
  }
4598
4597
  [Symbol.iterator]() {
@@ -4617,16 +4616,16 @@ class Nl {
4617
4616
  }
4618
4617
  removeTextSlice() {
4619
4618
  const { caret: { origin: e, direction: t } } = this, [r, i] = this.getSliceIndices(), s = e.getTextContent();
4620
- return Ve(e.setTextContent(s.slice(0, r) + s.slice(i)), t, r);
4619
+ return Ye(e.setTextContent(s.slice(0, r) + s.slice(i)), t, r);
4621
4620
  }
4622
4621
  }
4623
- function Ks(n) {
4624
- return Ye(n, H(re(), n.direction));
4622
+ function zs(n) {
4623
+ return He(n, H(re(), n.direction));
4625
4624
  }
4626
4625
  function bl(n) {
4627
- return Ye(n, n);
4626
+ return He(n, n);
4628
4627
  }
4629
- function Ye(n, e) {
4628
+ function He(n, e) {
4630
4629
  return n.direction !== e.direction && T(265), new Pr(n, e, n.direction);
4631
4630
  }
4632
4631
  function Bs(n) {
@@ -4682,13 +4681,13 @@ function Gt(n, e) {
4682
4681
  }
4683
4682
  return null;
4684
4683
  }
4685
- function He(n, e) {
4684
+ function qe(n, e) {
4686
4685
  const { type: t, key: r, offset: i } = n, s = ul(n.key);
4687
- return t === "text" ? (M(s) || T(266, s.getType(), r), Ve(s, e, i)) : (v(s) || T(267, s.getType(), r), Ol(s, n.offset, e));
4686
+ return t === "text" ? (M(s) || T(266, s.getType(), r), Ye(s, e, i)) : (v(s) || T(267, s.getType(), r), Ol(s, n.offset, e));
4688
4687
  }
4689
4688
  function Et(n, e) {
4690
4689
  const { origin: t, direction: r } = e, i = r === "next";
4691
- Oe(e) ? n.set(t.getKey(), e.offset, "text") : lt(e) ? M(t) ? n.set(t.getKey(), at(t, r), "text") : n.set(t.getParentOrThrow().getKey(), t.getIndexWithinParent() + (i ? 1 : 0), "element") : (he(e) && v(t) || T(268), n.set(t.getKey(), i ? 0 : t.getChildrenSize(), "element"));
4690
+ Ae(e) ? n.set(t.getKey(), e.offset, "text") : at(e) ? M(t) ? n.set(t.getKey(), ge(t, r), "text") : n.set(t.getParentOrThrow().getKey(), t.getIndexWithinParent() + (i ? 1 : 0), "element") : (he(e) && v(t) || T(268), n.set(t.getKey(), i ? 0 : t.getChildrenSize(), "element"));
4692
4691
  }
4693
4692
  function wl(n) {
4694
4693
  const e = L(), t = A(e) ? e : Vo();
@@ -4698,19 +4697,19 @@ function Xt(n, e) {
4698
4697
  Et(n.anchor, e.anchor), Et(n.focus, e.focus);
4699
4698
  }
4700
4699
  function Pi(n) {
4701
- const { anchor: e, focus: t } = n, r = He(e, "next"), i = He(t, "next"), s = Rs(r, i) <= 0 ? "next" : "previous";
4702
- return Ye(qe(r, s), qe(i, s));
4700
+ const { anchor: e, focus: t } = n, r = qe(e, "next"), i = qe(t, "next"), s = Rs(r, i) <= 0 ? "next" : "previous";
4701
+ return He(Ge(r, s), Ge(i, s));
4703
4702
  }
4704
- function zt(n) {
4705
- const { direction: e, origin: t } = n, r = H(t, Xe(e)).getNodeAtCaret();
4706
- return r ? H(r, e) : De(t.getParentOrThrow(), e);
4703
+ function Kt(n) {
4704
+ const { direction: e, origin: t } = n, r = H(t, Qe(e)).getNodeAtCaret();
4705
+ return r ? H(r, e) : Pe(t.getParentOrThrow(), e);
4707
4706
  }
4708
4707
  function Fi(n, e = "root") {
4709
4708
  const t = [n];
4710
- for (let r = he(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(zt(r));
4709
+ for (let r = he(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(Kt(r));
4711
4710
  return t;
4712
4711
  }
4713
- function Jn(n) {
4712
+ function jn(n) {
4714
4713
  return !!n && n.origin.isAttached();
4715
4714
  }
4716
4715
  function El(n, e = "removeEmptySlices") {
@@ -4719,14 +4718,14 @@ function El(n, e = "removeEmptySlices") {
4719
4718
  let i = e;
4720
4719
  const s = Js(n, r), o = Fi(s.anchor, t), l = Fi(s.focus.getFlipped(), t), a = /* @__PURE__ */ new Set(), c = [];
4721
4720
  for (const h of s.iterNodeCarets(t)) if (he(h)) a.add(h.origin.getKey());
4722
- else if (lt(h)) {
4721
+ else if (at(h)) {
4723
4722
  const { origin: _ } = h;
4724
4723
  v(_) && !a.has(_.getKey()) || c.push(_);
4725
4724
  }
4726
4725
  for (const h of c) h.remove();
4727
4726
  for (const h of s.getTextSlices()) {
4728
4727
  if (!h) continue;
4729
- const { origin: _ } = h.caret, p = _.getTextContentSize(), x = zt(H(_, r)), y = _.getMode();
4728
+ const { origin: _ } = h.caret, p = _.getTextContentSize(), x = Kt(H(_, r)), y = _.getMode();
4730
4729
  if (Math.abs(h.distance) === p && i === "removeEmptySlices" || y === "token" && h.distance !== 0) x.remove();
4731
4730
  else if (h.distance !== 0) {
4732
4731
  i = "removeEmptySlices";
@@ -4734,17 +4733,17 @@ function El(n, e = "removeEmptySlices") {
4734
4733
  const N = h.caret.origin;
4735
4734
  if (y === "segmented") {
4736
4735
  const b = m.origin, C = V(b.getTextContent()).setStyle(b.getStyle()).setFormat(b.getFormat());
4737
- x.replaceOrInsert(C), m = Ve(C, r, m.offset);
4736
+ x.replaceOrInsert(C), m = Ye(C, r, m.offset);
4738
4737
  }
4739
4738
  N.is(o[0].origin) && (o[0] = m), N.is(l[0].origin) && (l[0] = m.getFlipped());
4740
4739
  }
4741
4740
  }
4742
4741
  let u, d;
4743
- for (const h of o) if (Jn(h)) {
4742
+ for (const h of o) if (jn(h)) {
4744
4743
  u = de(h);
4745
4744
  break;
4746
4745
  }
4747
- for (const h of l) if (Jn(h)) {
4746
+ for (const h of l) if (jn(h)) {
4748
4747
  d = de(h);
4749
4748
  break;
4750
4749
  }
@@ -4761,22 +4760,22 @@ function El(n, e = "removeEmptySlices") {
4761
4760
  for (C = 0; C < b && m[C] === N[C]; C++) ;
4762
4761
  const w = (O, F) => {
4763
4762
  let W;
4764
- for (let z = C; z < O.length; z++) {
4765
- const P = O[z];
4766
- if (Fe(P)) return;
4763
+ for (let K = C; K < O.length; K++) {
4764
+ const P = O[K];
4765
+ if (Le(P)) return;
4767
4766
  !W && F(P) && (W = P);
4768
4767
  }
4769
4768
  return W;
4770
- }, k = w(m, we), S = k && w(N, (O) => p.has(O.getKey()) && we(O));
4769
+ }, k = w(m, Ee), S = k && w(N, (O) => p.has(O.getKey()) && Ee(O));
4771
4770
  return k && S ? [k, S] : null;
4772
4771
  }(u, d, a);
4773
4772
  if (f) {
4774
4773
  const [h, _] = f;
4775
- De(h, "previous").splice(0, _.getChildren()), _.remove();
4774
+ Pe(h, "previous").splice(0, _.getChildren()), _.remove();
4776
4775
  }
4777
- const g = [u, d, ...o, ...l].find(Jn);
4776
+ const g = [u, d, ...o, ...l].find(jn);
4778
4777
  if (g)
4779
- return bl(qe(de(g), n.direction));
4778
+ return bl(Ge(de(g), n.direction));
4780
4779
  T(269, JSON.stringify(o.map((h) => h.origin.__key)));
4781
4780
  }
4782
4781
  function de(n) {
@@ -4789,44 +4788,44 @@ function de(n) {
4789
4788
  }
4790
4789
  return s;
4791
4790
  }(n.getLatest()), { direction: t } = e;
4792
- if (M(e.origin)) return Oe(e) ? e : Ve(e.origin, t, t);
4791
+ if (M(e.origin)) return Ae(e) ? e : Ye(e.origin, t, t);
4793
4792
  const r = e.getAdjacentCaret();
4794
- return lt(r) && M(r.origin) ? Ve(r.origin, t, Xe(t)) : e;
4793
+ return at(r) && M(r.origin) ? Ye(r.origin, t, Qe(t)) : e;
4795
4794
  }
4796
4795
  function Ml(n) {
4797
- return Oe(n) && n.offset !== at(n.origin, n.direction);
4796
+ return Ae(n) && n.offset !== ge(n.origin, n.direction);
4798
4797
  }
4799
- function qe(n, e) {
4798
+ function Ge(n, e) {
4800
4799
  return n.direction === e ? n : n.getFlipped();
4801
4800
  }
4802
4801
  function Js(n, e) {
4803
- return n.direction === e ? n : Ye(qe(n.focus, e), qe(n.anchor, e));
4802
+ return n.direction === e ? n : He(Ge(n.focus, e), Ge(n.anchor, e));
4804
4803
  }
4805
4804
  function Ol(n, e, t) {
4806
- let r = De(n, "next");
4805
+ let r = Pe(n, "next");
4807
4806
  for (let i = 0; i < e; i++) {
4808
4807
  const s = r.getAdjacentCaret();
4809
4808
  if (s === null) break;
4810
4809
  r = s;
4811
4810
  }
4812
- return qe(r, t);
4811
+ return Ge(r, t);
4813
4812
  }
4814
4813
  function Al(n) {
4815
4814
  const { origin: e, offset: t, direction: r } = n;
4816
- if (t === at(e, r)) return n.getSiblingCaret();
4817
- if (t === at(e, Xe(r))) return zt(n.getSiblingCaret());
4815
+ if (t === ge(e, r)) return n.getSiblingCaret();
4816
+ if (t === ge(e, Qe(r))) return Kt(n.getSiblingCaret());
4818
4817
  const [i] = e.splitText(t);
4819
- return M(i) || T(281), qe(H(i, "next"), r);
4818
+ return M(i) || T(281), Ge(H(i, "next"), r);
4820
4819
  }
4821
4820
  function Dl(n, e) {
4822
4821
  return !0;
4823
4822
  }
4824
4823
  function la(n, { $copyElementNode: e = cl, $splitTextPointCaretNext: t = Al, rootMode: r = "shadowRoot", $shouldSplit: i = Dl } = {}) {
4825
- if (Oe(n)) return t(n);
4824
+ if (Ae(n)) return t(n);
4826
4825
  const s = n.getParentCaret(r);
4827
4826
  if (s) {
4828
4827
  const { origin: o } = s;
4829
- if (he(n) && (!o.canBeEmpty() || !i(o, "first"))) return zt(s);
4828
+ if (he(n) && (!o.canBeEmpty() || !i(o, "first"))) return Kt(s);
4830
4829
  const l = function(a) {
4831
4830
  const c = [];
4832
4831
  for (let u = a.getAdjacentCaret(); u; u = u.getAdjacentCaret()) c.push(u.origin);
@@ -4838,26 +4837,26 @@ function la(n, { $copyElementNode: e = cl, $splitTextPointCaretNext: t = Al, roo
4838
4837
  }
4839
4838
  export {
4840
4839
  Ql as $,
4841
- an as A,
4842
- Me as B,
4843
- cn as C,
4840
+ cn as A,
4841
+ Oe as B,
4842
+ ln as C,
4844
4843
  ko as D,
4845
- $n as E,
4844
+ Un as E,
4846
4845
  ft as F,
4847
- ln as G,
4848
- bo as H,
4846
+ bo as G,
4847
+ Eo as H,
4849
4848
  Jl as I,
4850
4849
  Xl as J,
4851
- Eo as K,
4850
+ wo as K,
4852
4851
  ts as L,
4853
4852
  ie as M,
4854
4853
  ze as N,
4855
4854
  de as O,
4856
4855
  L as P,
4857
- zl as Q,
4856
+ Kl as Q,
4858
4857
  yt as R,
4859
4858
  U as S,
4860
- ee as T,
4859
+ kr as T,
4861
4860
  Zl as U,
4862
4861
  ea as V,
4863
4862
  Gl as W,
@@ -4867,27 +4866,27 @@ export {
4867
4866
  A as _,
4868
4867
  Hr as a,
4869
4868
  Es as a$,
4870
- ke as a0,
4869
+ Te as a0,
4871
4870
  $l as a1,
4872
4871
  Vo as a2,
4873
4872
  ne as a3,
4874
- ge as a4,
4875
- He as a5,
4873
+ _e as a4,
4874
+ qe as a5,
4876
4875
  Ml as a6,
4877
- Ks as a7,
4878
- lt as a8,
4876
+ zs as a7,
4877
+ at as a8,
4879
4878
  he as a9,
4880
4879
  hl as aA,
4881
4880
  pl as aB,
4882
4881
  bs as aC,
4883
4882
  dl as aD,
4884
- pr as aE,
4883
+ yr as aE,
4885
4884
  es as aF,
4886
- Ye as aG,
4885
+ He as aG,
4887
4886
  Vl as aH,
4888
- Sn as aI,
4887
+ vn as aI,
4889
4888
  ta as aJ,
4890
- Kn as aK,
4889
+ Bn as aK,
4891
4890
  No as aL,
4892
4891
  ws as aM,
4893
4892
  ql as aN,
@@ -4896,7 +4895,7 @@ export {
4896
4895
  Do as aQ,
4897
4896
  Ao as aR,
4898
4897
  Oo as aS,
4899
- Xn as aT,
4898
+ Qn as aT,
4900
4899
  Yt as aU,
4901
4900
  Il as aV,
4902
4901
  sl as aW,
@@ -4907,20 +4906,20 @@ export {
4907
4906
  H as aa,
4908
4907
  Dr as ab,
4909
4908
  At as ac,
4910
- Je as ad,
4909
+ je as ad,
4911
4910
  Ft as ae,
4912
4911
  Xi as af,
4913
4912
  re as ag,
4914
4913
  Bs as ah,
4915
4914
  wl as ai,
4916
4915
  bl as aj,
4917
- qe as ak,
4916
+ Ge as ak,
4918
4917
  la as al,
4919
- Oe as am,
4920
- K as an,
4921
- be as ao,
4918
+ Ae as am,
4919
+ z as an,
4920
+ we as ao,
4922
4921
  oi as ap,
4923
- we as aq,
4922
+ Ee as aq,
4924
4923
  mo as ar,
4925
4924
  Wl as as,
4926
4925
  Rl as at,
@@ -4932,22 +4931,22 @@ export {
4932
4931
  Ei as az,
4933
4932
  na as b,
4934
4933
  Bl as b0,
4935
- Kl as b1,
4934
+ zl as b1,
4936
4935
  Yl as b2,
4937
4936
  Hl as b3,
4938
4937
  sa as c,
4939
4938
  D as d,
4940
4939
  ia as e,
4941
- Fe as f,
4942
- Nn as g,
4943
- tt as h,
4940
+ Le as f,
4941
+ bn as g,
4942
+ nt as h,
4944
4943
  V as i,
4945
4944
  oa as j,
4946
- gl as k,
4947
- kr as l,
4945
+ ee as k,
4946
+ gl as l,
4948
4947
  Dt as m,
4949
4948
  yo as n,
4950
- De as o,
4949
+ Pe as o,
4951
4950
  Pl as p,
4952
4951
  ut as q,
4953
4952
  It as r,
@@ -4957,7 +4956,7 @@ export {
4957
4956
  Et as v,
4958
4957
  xo as w,
4959
4958
  v as x,
4960
- yr as y,
4961
- wo as z
4959
+ mr as y,
4960
+ an as z
4962
4961
  };
4963
- //# sourceMappingURL=Lexical.prod-C7FcGFd7.js.map
4962
+ //# sourceMappingURL=Lexical.prod-7x3WP3vd.js.map