@uva-glass/component-library 2.6.2 → 2.6.3

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 (119) hide show
  1. package/dist/{Lexical.prod-BAr6tzpa.js → Lexical.prod-sR6tW7N6.js} +894 -894
  2. package/dist/Lexical.prod-sR6tW7N6.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-CLCBYtDj.js → LexicalClipboard.prod-BbRoaXo6.js} +93 -93
  4. package/dist/LexicalClipboard.prod-BbRoaXo6.js.map +1 -0
  5. package/dist/{LexicalComposerContext.prod-Dyvim1tK.js → LexicalComposerContext.prod-DxxjdrXB.js} +2 -2
  6. package/dist/{LexicalComposerContext.prod-Dyvim1tK.js.map → LexicalComposerContext.prod-DxxjdrXB.js.map} +1 -1
  7. package/dist/{LexicalLink.prod-CBgZ4B3x.js → LexicalLink.prod-iDKxtfCF.js} +42 -42
  8. package/dist/LexicalLink.prod-iDKxtfCF.js.map +1 -0
  9. package/dist/{LexicalList.prod-haeqjypw.js → LexicalList.prod-ywkx7SnO.js} +56 -56
  10. package/dist/LexicalList.prod-ywkx7SnO.js.map +1 -0
  11. package/dist/LexicalSelection.prod-mYXylG1z.js +86 -0
  12. package/dist/{LexicalSelection.prod-C8x7KK4L.js.map → LexicalSelection.prod-mYXylG1z.js.map} +1 -1
  13. package/dist/LexicalTable.prod-XN7avk7R.js +1447 -0
  14. package/dist/LexicalTable.prod-XN7avk7R.js.map +1 -0
  15. package/dist/{LexicalUtils.prod-Dsec_Kl-.js → LexicalUtils.prod-DnFLi0Ww.js} +24 -24
  16. package/dist/{LexicalUtils.prod-Dsec_Kl-.js.map → LexicalUtils.prod-DnFLi0Ww.js.map} +1 -1
  17. package/dist/{SortableProvider-BUsvniX7.js → SortableProvider-RaH_ZXB3.js} +20 -20
  18. package/dist/{SortableProvider-BUsvniX7.js.map → SortableProvider-RaH_ZXB3.js.map} +1 -1
  19. package/dist/{TablePlugin-sPSGmCno.js → TablePlugin-5Cs2F_co.js} +12 -11
  20. package/dist/{TablePlugin-sPSGmCno.js.map → TablePlugin-5Cs2F_co.js.map} +1 -1
  21. package/dist/components/Buttons/Button.stories.js +1 -1
  22. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  23. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  24. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  25. package/dist/components/Checkbox/Checkbox.js +6 -5
  26. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  27. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  28. package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
  29. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  30. package/dist/components/CheckboxTree/CheckboxTree.d.ts +2 -2
  31. package/dist/components/CheckboxTree/CheckboxTree.js +110 -74
  32. package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
  33. package/dist/components/CheckboxTree/CheckboxTree.stories.d.ts +2 -1
  34. package/dist/components/CheckboxTree/CheckboxTree.stories.js +121 -31
  35. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  36. package/dist/components/Chip/Chip.stories.js +1 -1
  37. package/dist/components/Drawer/Drawer.stories.js +1 -1
  38. package/dist/components/FormInput/FormInput.js +14 -13
  39. package/dist/components/FormInput/FormInput.js.map +1 -1
  40. package/dist/components/FormInput/FormInput.stories.js +1 -1
  41. package/dist/components/IconButton/IconButton.stories.js +1 -1
  42. package/dist/components/InputField/InputField.js +17 -17
  43. package/dist/components/InputField/InputField.stories.js +17 -16
  44. package/dist/components/InputField/InputField.stories.js.map +1 -1
  45. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  46. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  47. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  48. package/dist/components/MultiSelect/components/MultiSelectHeader.js +5 -4
  49. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
  50. package/dist/components/MultiSelect/index.js +1 -1
  51. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +4 -4
  52. package/dist/components/OverlayStepBar/OverlayStepBar.js +13 -12
  53. package/dist/components/OverlayStepBar/OverlayStepBar.js.map +1 -1
  54. package/dist/components/PeriodSelector/PeriodSelector.js +15 -14
  55. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  56. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  57. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +11 -10
  58. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  59. package/dist/components/RadioButton/RadioButton.js +3 -3
  60. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +6 -5
  61. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
  62. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
  63. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +15 -14
  64. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
  65. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +6 -5
  66. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
  67. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  68. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +10 -9
  69. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  70. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  71. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +48 -48
  72. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
  73. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +5 -4
  74. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
  75. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
  76. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +8 -7
  77. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
  78. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +5 -5
  79. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  80. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +4 -4
  81. package/dist/components/RteEditor/Plugins/index.js +1 -1
  82. package/dist/components/RteEditor/Providers/LanguageProvider.js +7 -7
  83. package/dist/components/RteEditor/RteEditor.js +473 -472
  84. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  85. package/dist/components/RteEditor/helpers.js +4 -4
  86. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  87. package/dist/components/SelectListbox/SelectProvider.js +10 -10
  88. package/dist/components/Sortable/Sortable.js +1 -1
  89. package/dist/components/Sortable/Sortable.stories.js +7 -7
  90. package/dist/components/Sortable/SortableProvider.js +1 -1
  91. package/dist/components/Sortable/components/SortableContainer.js +1 -1
  92. package/dist/components/Sortable/components/SortableItem.js +15 -15
  93. package/dist/components/Sortable/sortableReducer.js +21 -21
  94. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +5 -5
  95. package/dist/components/Tooltip/Tooltip.js +22 -22
  96. package/dist/components/index.js +1 -1
  97. package/dist/{helpers-DHHQR5ys.js → helpers-BpqX-Lj3.js} +26 -26
  98. package/dist/helpers-BpqX-Lj3.js.map +1 -0
  99. package/dist/{index-0wq-B7do.js → index-B3c5pcHk.js} +22 -22
  100. package/dist/{index-0wq-B7do.js.map → index-B3c5pcHk.js.map} +1 -1
  101. package/dist/{index-B9BWML6P.js → index-BpZ8v2ye.js} +7088 -7092
  102. package/dist/{index-B9BWML6P.js.map → index-BpZ8v2ye.js.map} +1 -1
  103. package/dist/index-CHX1d9_A.js +21922 -0
  104. package/dist/{index-DWzkl4aY.js.map → index-CHX1d9_A.js.map} +1 -1
  105. package/dist/index.js +1 -1
  106. package/dist/{react-18-BIqxBxbW.js → react-18-CT6mjea2.js} +2 -2
  107. package/dist/{react-18-BIqxBxbW.js.map → react-18-CT6mjea2.js.map} +1 -1
  108. package/dist/storybook__react.d.js +510 -510
  109. package/dist/storybook__react.d.js.map +1 -1
  110. package/package.json +1 -1
  111. package/dist/Lexical.prod-BAr6tzpa.js.map +0 -1
  112. package/dist/LexicalClipboard.prod-CLCBYtDj.js.map +0 -1
  113. package/dist/LexicalLink.prod-CBgZ4B3x.js.map +0 -1
  114. package/dist/LexicalList.prod-haeqjypw.js.map +0 -1
  115. package/dist/LexicalSelection.prod-C8x7KK4L.js +0 -86
  116. package/dist/LexicalTable.prod-8RqiGUG-.js +0 -1447
  117. package/dist/LexicalTable.prod-8RqiGUG-.js.map +0 -1
  118. package/dist/helpers-DHHQR5ys.js.map +0 -1
  119. package/dist/index-DWzkl4aY.js +0 -21915
@@ -1,13 +1,13 @@
1
1
  function lo(n) {
2
2
  return {};
3
3
  }
4
- const Nn = {}, ao = {}, Ws = {}, Se = {}, me = {}, Zn = {}, Ht = {}, Ur = {}, tr = {}, Ce = {}, Te = {}, wt = {}, $r = {}, jr = {}, Rs = {}, Ks = {}, Js = {}, Us = {}, $s = {}, js = {}, Vs = {}, gn = {}, Hs = {}, qs = {}, Gs = {}, Qs = {}, Xs = {}, co = {}, uo = {}, fo = {}, Ys = {}, ho = {}, Zs = {}, ti = {}, ei = {}, Vr = {}, Hr = {}, er = {}, go = {}, _o = {}, po = {}, yo = {}, ni = {}, ri = {}, si = {}, st = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, ii = st && "documentMode" in document ? document.documentMode : null, tt = st && /Mac|iPod|iPhone|iPad/.test(navigator.platform), vt = st && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), ke = !(!st || !("InputEvent" in window) || ii) && "getTargetRanges" in new window.InputEvent("input"), ze = st && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), re = st && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, oi = st && /Android/.test(navigator.userAgent), qr = st && /^(?=.*Chrome).*/i.test(navigator.userAgent), li = st && oi && qr, En = st && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !qr, ai = 1, ci = 3, ui = 9, fi = 11, Et = 0, Gr = 1, zt = 2, di = 0, hi = 1, gi = 2, be = 4, we = 8, Fn = 128, _i = 1792 | (112 | (3 | be | we) | Fn), Pn = 1, On = 2, Ln = 3, Dn = 4, Mn = 5, In = 6, We = ze || re || En ? " " : "​", ct = `
4
+ const Nn = {}, ao = {}, Ws = {}, Ce = {}, me = {}, Zn = {}, Ht = {}, Ur = {}, tr = {}, Te = {}, ke = {}, vt = {}, $r = {}, jr = {}, Rs = {}, Ks = {}, Js = {}, Us = {}, $s = {}, js = {}, Vs = {}, gn = {}, Hs = {}, qs = {}, Gs = {}, Qs = {}, Xs = {}, uo = {}, co = {}, fo = {}, Ys = {}, ho = {}, Zs = {}, ti = {}, ei = {}, Vr = {}, Hr = {}, er = {}, go = {}, _o = {}, po = {}, yo = {}, ni = {}, ri = {}, si = {}, rt = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, ii = rt && "documentMode" in document ? document.documentMode : null, Z = rt && /Mac|iPod|iPhone|iPad/.test(navigator.platform), xt = rt && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), be = !(!rt || !("InputEvent" in window) || ii) && "getTargetRanges" in new window.InputEvent("input"), ze = rt && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), re = rt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, oi = rt && /Android/.test(navigator.userAgent), qr = rt && /^(?=.*Chrome).*/i.test(navigator.userAgent), li = rt && oi && qr, En = rt && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !qr, ai = 1, ui = 3, ci = 9, fi = 11, Nt = 0, Gr = 1, zt = 2, di = 0, hi = 1, gi = 2, ve = 4, we = 8, Fn = 128, _i = 1792 | (112 | (3 | ve | we) | Fn), Pn = 1, On = 2, Ln = 3, Dn = 4, Mn = 5, In = 6, We = ze || re || En ? " " : "​", at = `
5
5
 
6
- `, pi = vt ? " " : We, Qr = "֑-߿יִ-﷽ﹰ-ﻼ", Xr = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", yi = new RegExp("^[^" + Xr + "]*[" + Qr + "]"), mi = new RegExp("^[^" + Qr + "]*[" + Xr + "]"), V = { bold: 1, capitalize: 1024, code: 16, highlight: Fn, italic: 2, lowercase: 256, strikethrough: be, subscript: 32, superscript: 64, underline: we, uppercase: 512 }, xi = { directionless: 1, unmergeable: 2 }, nr = { center: On, end: In, justify: Dn, left: Pn, right: Ln, start: Mn }, vi = { [On]: "center", [In]: "end", [Dn]: "justify", [Pn]: "left", [Ln]: "right", [Mn]: "start" }, Si = { normal: 0, segmented: 2, token: 1 }, Ci = { [di]: "normal", [gi]: "segmented", [hi]: "token" };
7
- function Ti(n) {
8
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
6
+ `, pi = xt ? " " : We, Qr = "֑-߿יִ-﷽ﹰ-ﻼ", Xr = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", yi = new RegExp("^[^" + Xr + "]*[" + Qr + "]"), mi = new RegExp("^[^" + Qr + "]*[" + Xr + "]"), Et = { bold: 1, capitalize: 1024, code: 16, highlight: Fn, italic: 2, lowercase: 256, strikethrough: ve, subscript: 32, superscript: 64, underline: we, uppercase: 512 }, xi = { directionless: 1, unmergeable: 2 }, nr = { center: On, end: In, justify: Dn, left: Pn, right: Ln, start: Mn }, Si = { [On]: "center", [In]: "end", [Dn]: "justify", [Pn]: "left", [Ln]: "right", [Mn]: "start" }, Ci = { normal: 0, segmented: 2, token: 1 }, Ti = { [di]: "normal", [gi]: "segmented", [hi]: "token" };
7
+ function ki(n) {
8
+ return n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
9
9
  }
10
- var T = Ti(function(n) {
10
+ var k = ki(function(n) {
11
11
  const t = new URLSearchParams();
12
12
  t.append("code", n);
13
13
  for (let e = 1; e < arguments.length; e++) t.append("v", arguments[e]);
@@ -18,9 +18,9 @@ function Ne(...n) {
18
18
  for (const e of n) if (e && typeof e == "string") for (const [r] of e.matchAll(/\S+/g)) t.push(r);
19
19
  return t;
20
20
  }
21
- const ki = 100;
21
+ const bi = 100;
22
22
  let _n = !1, An = 0;
23
- function bi(n) {
23
+ function vi(n) {
24
24
  An = n.timeStamp;
25
25
  }
26
26
  function rn(n, t, e) {
@@ -28,7 +28,7 @@ function rn(n, t, e) {
28
28
  return s && (n === s || r && n.previousSibling === s) || r && Je(n, e) !== void 0;
29
29
  }
30
30
  function wi(n, t, e) {
31
- const r = ft(e._window);
31
+ const r = ct(e._window);
32
32
  let s = null, i = null;
33
33
  r !== null && r.anchorNode === n && (s = r.anchorOffset, i = r.focusOffset);
34
34
  const o = n.nodeValue;
@@ -39,55 +39,55 @@ function Ni(n, t, e) {
39
39
  const r = n.anchor.getNode();
40
40
  if (r.is(e) && n.format !== r.getFormat()) return !1;
41
41
  }
42
- return dt(t) && e.isAttached();
42
+ return ft(t) && e.isAttached();
43
43
  }
44
44
  function Ei(n, t, e, r) {
45
45
  for (let s = n; s && !Ji(s); s = se(s)) {
46
46
  const i = Je(s, t);
47
47
  if (i !== void 0) {
48
48
  const o = j(i, e);
49
- if (o) return I(o) || !X(s) ? void 0 : [s, o];
49
+ if (o) return I(o) || !Q(s) ? void 0 : [s, o];
50
50
  } else if (s === r) return [r, os(e)];
51
51
  }
52
52
  }
53
53
  function Yr(n, t, e) {
54
54
  _n = !0;
55
- const r = performance.now() - An > ki;
55
+ const r = performance.now() - An > bi;
56
56
  try {
57
- Y(n, () => {
57
+ X(n, () => {
58
58
  const s = M() || function(f) {
59
59
  return f.getEditorState().read(() => {
60
60
  const d = M();
61
61
  return d !== null ? d.clone() : null;
62
62
  });
63
63
  }(n), i = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
64
- let c = !1, u = "";
64
+ let u = !1, c = "";
65
65
  for (let f = 0; f < t.length; f++) {
66
66
  const d = t[f], g = d.type, _ = d.target, p = Ei(_, n, l, o);
67
67
  if (!p) continue;
68
68
  const [m, y] = p;
69
- if (g === "characterData") r && E(y) && dt(_) && Ni(s, _, y) && wi(_, y, n);
69
+ if (g === "characterData") r && E(y) && ft(_) && Ni(s, _, y) && wi(_, y, n);
70
70
  else if (g === "childList") {
71
- c = !0;
71
+ u = !0;
72
72
  const x = d.addedNodes;
73
- for (let v = 0; v < x.length; v++) {
74
- const F = x[v], C = ss(F), N = F.parentNode;
75
- if (N != null && F !== a && C === null && !rn(F, N, n)) {
76
- if (vt) {
77
- const O = (X(F) ? F.innerText : null) || F.nodeValue;
78
- O && (u += O);
73
+ for (let S = 0; S < x.length; S++) {
74
+ const F = x[S], T = ss(F), N = F.parentNode;
75
+ if (N != null && F !== a && T === null && !rn(F, N, n)) {
76
+ if (xt) {
77
+ const O = (Q(F) ? F.innerText : null) || F.nodeValue;
78
+ O && (c += O);
79
79
  }
80
80
  N.removeChild(F);
81
81
  }
82
82
  }
83
- const b = d.removedNodes, k = b.length;
84
- if (k > 0) {
85
- let v = 0;
86
- for (let F = 0; F < k; F++) {
87
- const C = b[F];
88
- (rn(C, _, n) || a === C) && (_.appendChild(C), v++);
83
+ const v = d.removedNodes, b = v.length;
84
+ if (b > 0) {
85
+ let S = 0;
86
+ for (let F = 0; F < b; F++) {
87
+ const T = v[F];
88
+ (rn(T, _, n) || a === T) && (_.appendChild(T), S++);
89
89
  }
90
- k !== v && i.set(m, y);
90
+ b !== S && i.set(m, y);
91
91
  }
92
92
  }
93
93
  }
@@ -103,7 +103,7 @@ function Yr(n, t, e) {
103
103
  }
104
104
  e.takeRecords();
105
105
  }
106
- s !== null && (c && (s.dirty = !0, ut(s)), vt && us(n) && s.insertRawText(u));
106
+ s !== null && (u && (s.dirty = !0, ut(s)), xt && cs(n) && s.insertRawText(c));
107
107
  });
108
108
  } finally {
109
109
  _n = !1;
@@ -115,7 +115,7 @@ function Zr(n) {
115
115
  }
116
116
  function ts(n) {
117
117
  (function(t) {
118
- An === 0 && $e(t).addEventListener("textInput", bi, !0);
118
+ An === 0 && $e(t).addEventListener("textInput", vi, !0);
119
119
  })(n), n._observer = new MutationObserver((t, e) => {
120
120
  Yr(n, t, e);
121
121
  });
@@ -164,7 +164,7 @@ function lr(n) {
164
164
  n.set(r.__key, s ? r.getTextContentSize() : 0, "text");
165
165
  break;
166
166
  }
167
- if (!S(r)) break;
167
+ if (!C(r)) break;
168
168
  n.set(r.__key, s ? r.getChildrenSize() : 0, "element");
169
169
  }
170
170
  }
@@ -174,7 +174,7 @@ const Pi = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
174
174
  };
175
175
  function es(n) {
176
176
  const t = document.activeElement;
177
- if (!X(t)) return !1;
177
+ if (!Q(t)) return !1;
178
178
  const e = t.nodeName;
179
179
  return I(zn(n)) && (e === "INPUT" || e === "TEXTAREA" || t.contentEditable === "true" && Ke(t) == null);
180
180
  }
@@ -204,36 +204,36 @@ function Ke(n) {
204
204
  function bt(n) {
205
205
  return n.isToken() || n.isSegmented();
206
206
  }
207
- function dt(n) {
208
- return ie(n) && n.nodeType === ci;
207
+ function ft(n) {
208
+ return ie(n) && n.nodeType === ui;
209
209
  }
210
210
  function Oi(n) {
211
- return ie(n) && n.nodeType === ui;
211
+ return ie(n) && n.nodeType === ci;
212
212
  }
213
213
  function Ee(n) {
214
214
  let t = n;
215
215
  for (; t != null; ) {
216
- if (dt(t)) return t;
216
+ if (ft(t)) return t;
217
217
  t = t.firstChild;
218
218
  }
219
219
  return null;
220
220
  }
221
221
  function Fe(n, t, e) {
222
- const r = V[t];
222
+ const r = Et[t];
223
223
  if (e !== null && (n & r) == (e & r)) return n;
224
224
  let s = n ^ r;
225
- return t === "subscript" ? s &= ~V.superscript : t === "superscript" ? s &= ~V.subscript : t === "lowercase" ? (s &= ~V.uppercase, s &= ~V.capitalize) : t === "uppercase" ? (s &= ~V.lowercase, s &= ~V.capitalize) : t === "capitalize" && (s &= ~V.lowercase, s &= ~V.uppercase), s;
225
+ return t === "subscript" ? s &= -65 : t === "superscript" ? s &= -33 : t === "lowercase" ? (s &= -513, s &= -1025) : t === "uppercase" ? (s &= -257, s &= -1025) : t === "capitalize" && (s &= -257, s &= -513), s;
226
226
  }
227
227
  function mo(n) {
228
228
  return E(n) || Bt(n) || I(n);
229
229
  }
230
230
  function rs(n, t) {
231
231
  if (t != null) return void (n.__key = t);
232
- G(), Os();
232
+ q(), Os();
233
233
  const e = A(), r = Tt(), s = "" + Fi++;
234
- r._nodeMap.set(s, n), S(n) ? e._dirtyElements.set(s, !0) : e._dirtyLeaves.add(s), e._cloneNotNeeded.add(s), e._dirtyType = Gr, n.__key = s;
234
+ r._nodeMap.set(s, n), C(n) ? e._dirtyElements.set(s, !0) : e._dirtyLeaves.add(s), e._cloneNotNeeded.add(s), e._dirtyType = Gr, n.__key = s;
235
235
  }
236
- function Nt(n) {
236
+ function wt(n) {
237
237
  const t = n.getParent();
238
238
  if (t !== null) {
239
239
  const e = n.getWritable(), r = t.getWritable(), s = n.getPreviousSibling(), i = n.getNextSibling();
@@ -267,20 +267,20 @@ function Nt(n) {
267
267
  function Pe(n) {
268
268
  Os();
269
269
  const t = n.getLatest(), e = t.__parent, r = Tt(), s = A(), i = r._nodeMap, o = s._dirtyElements;
270
- e !== null && function(a, c, u) {
270
+ e !== null && function(a, u, c) {
271
271
  let h = a;
272
272
  for (; h !== null; ) {
273
- if (u.has(h)) return;
274
- const f = c.get(h);
273
+ if (c.has(h)) return;
274
+ const f = u.get(h);
275
275
  if (f === void 0) break;
276
- u.set(h, !1), h = f.__parent;
276
+ c.set(h, !1), h = f.__parent;
277
277
  }
278
278
  }(e, i, o);
279
279
  const l = t.__key;
280
- s._dirtyType = Gr, S(n) ? o.set(l, !0) : s._dirtyLeaves.add(l);
280
+ s._dirtyType = Gr, C(n) ? o.set(l, !0) : s._dirtyLeaves.add(l);
281
281
  }
282
282
  function $(n) {
283
- G();
283
+ q();
284
284
  const t = A(), e = t._compositionKey;
285
285
  if (n !== e) {
286
286
  if (t._compositionKey = n, e !== null) {
@@ -293,8 +293,8 @@ function $(n) {
293
293
  }
294
294
  }
295
295
  }
296
- function mt() {
297
- return ce() ? null : A()._compositionKey;
296
+ function yt() {
297
+ return ue() ? null : A()._compositionKey;
298
298
  }
299
299
  function j(n, t) {
300
300
  const e = (t || Tt())._nodeMap.get(n);
@@ -321,16 +321,16 @@ function is(n) {
321
321
  return n._pendingDecorators = e, e;
322
322
  }
323
323
  function ar(n) {
324
- return n.read(() => rt().getTextContent());
324
+ return n.read(() => nt().getTextContent());
325
325
  }
326
- function rt() {
326
+ function nt() {
327
327
  return os(Tt());
328
328
  }
329
329
  function os(n) {
330
330
  return n._nodeMap.get("root");
331
331
  }
332
332
  function ut(n) {
333
- G();
333
+ q();
334
334
  const t = Tt();
335
335
  n !== null && (n.dirty = !0, n.setCachedNodes(null)), t._selection = n;
336
336
  }
@@ -346,7 +346,7 @@ function Mt(n) {
346
346
  }(n, t);
347
347
  return e === null ? n === t.getRootElement() ? j("root") : null : j(e);
348
348
  }
349
- function cr(n, t) {
349
+ function ur(n, t) {
350
350
  return t ? n.getTextContentSize() : 0;
351
351
  }
352
352
  function ls(n) {
@@ -361,21 +361,21 @@ function Wn(n) {
361
361
  function as() {
362
362
  return Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 5);
363
363
  }
364
- function cs(n) {
365
- return dt(n) ? n.nodeValue : null;
364
+ function us(n) {
365
+ return ft(n) ? n.nodeValue : null;
366
366
  }
367
367
  function Rn(n, t, e) {
368
- const r = ft(t._window);
368
+ const r = ct(t._window);
369
369
  if (r === null) return;
370
370
  const s = r.anchorNode;
371
371
  let { anchorOffset: i, focusOffset: o } = r;
372
372
  if (s !== null) {
373
- let l = cs(s);
373
+ let l = us(s);
374
374
  const a = zn(s);
375
375
  if (l !== null && E(a)) {
376
376
  if (l === We && e) {
377
- const c = e.length;
378
- l = e, i = c, o = c;
377
+ const u = e.length;
378
+ l = e, i = u, o = u;
379
379
  }
380
380
  l !== null && Kn(a, l, i, o, n);
381
381
  }
@@ -401,8 +401,8 @@ function Kn(n, t, e, r, s) {
401
401
  }
402
402
  return;
403
403
  }
404
- const c = i.getParent(), u = ae(), h = i.getTextContentSize(), f = mt(), d = i.getKey();
405
- if (i.isToken() || f !== null && d === f && !o || P(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !i.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === h && !i.canInsertTextAfter() && !o)) return void i.markDirty();
404
+ const u = i.getParent(), c = ae(), h = i.getTextContentSize(), f = yt(), d = i.getKey();
405
+ if (i.isToken() || f !== null && d === f && !o || P(c) && (u !== null && !u.canInsertTextBefore() && c.anchor.offset === 0 || c.anchor.key === n.__key && c.anchor.offset === 0 && !i.canInsertTextBefore() && !o || c.focus.key === n.__key && c.focus.offset === h && !i.canInsertTextAfter() && !o)) return void i.markDirty();
406
406
  const g = M();
407
407
  if (!P(g) || e === null || r === null) return void i.setTextContent(l);
408
408
  if (g.setTextNodeRange(i, e, i, r), i.isSegmented()) {
@@ -419,17 +419,17 @@ function Li(n, t) {
419
419
  const e = n.anchor.offset, r = t.getParentOrThrow(), s = t.isToken();
420
420
  return e === 0 ? !t.canInsertTextBefore() || !r.canInsertTextBefore() && !t.isComposing() || s || function(i) {
421
421
  const o = i.getPreviousSibling();
422
- return (E(o) || S(o) && o.isInline()) && !o.canInsertTextAfter();
422
+ return (E(o) || C(o) && o.isInline()) && !o.canInsertTextAfter();
423
423
  }(t) : e === t.getTextContentSize() && (!t.canInsertTextAfter() || !r.canInsertTextAfter() && !t.isComposing() || s);
424
424
  }
425
- function ur(n) {
425
+ function cr(n) {
426
426
  return n === "ArrowLeft";
427
427
  }
428
428
  function fr(n) {
429
429
  return n === "ArrowRight";
430
430
  }
431
431
  function jt(n, t) {
432
- return tt ? n : t;
432
+ return Z ? n : t;
433
433
  }
434
434
  function dr(n) {
435
435
  return n === "Enter";
@@ -444,7 +444,7 @@ function hr(n, t, e) {
444
444
  return n.toLowerCase() === "a" && jt(t, e);
445
445
  }
446
446
  function xo(n) {
447
- const t = rt();
447
+ const t = nt();
448
448
  if (P(n)) {
449
449
  const e = n.anchor, r = n.focus, s = e.getNode().getTopLevelElementOrThrow().getParentOrThrow();
450
450
  return e.set(s.getKey(), 0, "element"), r.set(s.getKey(), s.getChildrenSize(), "element"), or(n), n;
@@ -468,12 +468,12 @@ function It(n, t) {
468
468
  function Jn(n, t, e, r, s) {
469
469
  if (e.size === 0) return;
470
470
  const i = r.__type, o = r.__key, l = t.get(i);
471
- l === void 0 && T(33, i);
471
+ l === void 0 && k(33, i);
472
472
  const a = l.klass;
473
- let c = n.get(a);
474
- c === void 0 && (c = /* @__PURE__ */ new Map(), n.set(a, c));
475
- const u = c.get(o), h = u === "destroyed" && s === "created";
476
- (u === void 0 || h) && c.set(o, h ? "updated" : s);
473
+ let u = n.get(a);
474
+ u === void 0 && (u = /* @__PURE__ */ new Map(), n.set(a, u));
475
+ const c = u.get(o), h = c === "destroyed" && s === "created";
476
+ (c === void 0 || h) && u.set(o, h ? "updated" : s);
477
477
  }
478
478
  function gr(n, t, e) {
479
479
  const r = n.getParent();
@@ -493,7 +493,7 @@ function _r(n, t) {
493
493
  }
494
494
  return null;
495
495
  }
496
- function us(n) {
496
+ function cs(n) {
497
497
  const t = $e(n).event, e = t && t.inputType;
498
498
  return e === "insertFromPaste" || e === "insertFromPasteAsQuotation";
499
499
  }
@@ -501,18 +501,18 @@ function w(n, t, e) {
501
501
  return Ms(n, t, e);
502
502
  }
503
503
  function Ue(n) {
504
- return !Z(n) && !n.isLastChild() && !n.isInline();
504
+ return !Y(n) && !n.isLastChild() && !n.isInline();
505
505
  }
506
506
  function Oe(n, t) {
507
507
  const e = n._keyToDOMMap.get(t);
508
- return e === void 0 && T(75, t), e;
508
+ return e === void 0 && k(75, t), e;
509
509
  }
510
510
  function se(n) {
511
511
  const t = n.assignedSlot || n.parentElement;
512
512
  return Bi(t) ? t.host : t;
513
513
  }
514
514
  function fs(n) {
515
- return Oi(n) ? n : X(n) ? n.ownerDocument : null;
515
+ return Oi(n) ? n : Q(n) ? n.ownerDocument : null;
516
516
  }
517
517
  function qt(n, t) {
518
518
  let e = n.getParent();
@@ -528,7 +528,7 @@ function Un(n) {
528
528
  }
529
529
  function $e(n) {
530
530
  const t = n._window;
531
- return t === null && T(78), t;
531
+ return t === null && k(78), t;
532
532
  }
533
533
  function Di(n) {
534
534
  let t = n.getParentOrThrow();
@@ -539,7 +539,7 @@ function Di(n) {
539
539
  return t;
540
540
  }
541
541
  function Ft(n) {
542
- return Z(n) || S(n) && n.isShadowRoot();
542
+ return Y(n) || C(n) && n.isShadowRoot();
543
543
  }
544
544
  function Mi(n) {
545
545
  const t = n.constructor.clone(n);
@@ -547,19 +547,19 @@ function Mi(n) {
547
547
  }
548
548
  function je(n) {
549
549
  const t = A(), e = n.constructor.getType(), r = t._nodes.get(e);
550
- r === void 0 && T(200, n.constructor.name, e);
550
+ r === void 0 && k(200, n.constructor.name, e);
551
551
  const { replace: s, replaceWithKlass: i } = r;
552
552
  if (s !== null) {
553
553
  const o = s(n), l = o.constructor;
554
- return i !== null ? o instanceof i || T(201, i.name, i.getType(), l.name, l.getType(), n.constructor.name, e) : o instanceof n.constructor && l !== n.constructor || T(202, l.name, l.getType(), n.constructor.name, e), o.__key === n.__key && T(203, n.constructor.name, e, l.name, l.getType()), o;
554
+ return i !== null ? o instanceof i || k(201, i.name, i.getType(), l.name, l.getType(), n.constructor.name, e) : o instanceof n.constructor && l !== n.constructor || k(202, l.name, l.getType(), n.constructor.name, e), o.__key === n.__key && k(203, n.constructor.name, e, l.name, l.getType()), o;
555
555
  }
556
556
  return n;
557
557
  }
558
558
  function sn(n, t) {
559
- !Z(n.getParent()) || S(t) || I(t) || T(99);
559
+ !Y(n.getParent()) || C(t) || I(t) || k(99);
560
560
  }
561
561
  function on(n) {
562
- return (I(n) || S(n) && !n.canBeEmpty()) && !n.isInline();
562
+ return (I(n) || C(n) && !n.canBeEmpty()) && !n.isInline();
563
563
  }
564
564
  function $n(n, t, e) {
565
565
  e.style.removeProperty("caret-color"), t._blockCursorElement = null;
@@ -574,16 +574,16 @@ function Ii(n, t, e) {
574
574
  if (o === i.getChildrenSize())
575
575
  on(i.getChildAtIndex(o - 1)) && (l = !0);
576
576
  else {
577
- const c = i.getChildAtIndex(o);
578
- if (c !== null && on(c)) {
579
- const u = c.getPreviousSibling();
580
- (u === null || on(u)) && (l = !0, a = n.getElementByKey(c.__key));
577
+ const u = i.getChildAtIndex(o);
578
+ if (u !== null && on(u)) {
579
+ const c = u.getPreviousSibling();
580
+ (c === null || on(c)) && (l = !0, a = n.getElementByKey(u.__key));
581
581
  }
582
582
  }
583
583
  if (l) {
584
- const c = n.getElementByKey(i.__key);
585
- return r === null && (n._blockCursorElement = r = function(u) {
586
- const h = u.theme, f = document.createElement("div");
584
+ const u = n.getElementByKey(i.__key);
585
+ return r === null && (n._blockCursorElement = r = function(c) {
586
+ const h = c.theme, f = document.createElement("div");
587
587
  f.contentEditable = "false", f.setAttribute("data-lexical-cursor", "true");
588
588
  let d = h.blockCursor;
589
589
  if (d !== void 0) {
@@ -594,35 +594,35 @@ function Ii(n, t, e) {
594
594
  d !== void 0 && f.classList.add(...d);
595
595
  }
596
596
  return f;
597
- }(n._config)), t.style.caretColor = "transparent", void (a === null ? c.appendChild(r) : c.insertBefore(r, a));
597
+ }(n._config)), t.style.caretColor = "transparent", void (a === null ? u.appendChild(r) : u.insertBefore(r, a));
598
598
  }
599
599
  }
600
600
  r !== null && $n(r, n, t);
601
601
  }
602
- function ft(n) {
603
- return st ? (n || window).getSelection() : null;
602
+ function ct(n) {
603
+ return rt ? (n || window).getSelection() : null;
604
604
  }
605
605
  function Ai(n) {
606
606
  const t = Un(n);
607
607
  return t ? t.getSelection() : null;
608
608
  }
609
- function vo(n, t) {
609
+ function So(n, t) {
610
610
  let e = n.getChildAtIndex(t);
611
- e == null && (e = n), Ft(n) && T(102);
611
+ e == null && (e = n), Ft(n) && k(102);
612
612
  const r = (o) => {
613
- const l = o.getParentOrThrow(), a = Ft(l), c = o !== e || a ? Mi(o) : o;
614
- if (a) return S(o) && S(c) || T(133), o.insertAfter(c), [o, c, c];
613
+ const l = o.getParentOrThrow(), a = Ft(l), u = o !== e || a ? Mi(o) : o;
614
+ if (a) return C(o) && C(u) || k(133), o.insertAfter(u), [o, u, u];
615
615
  {
616
- const [u, h, f] = r(l), d = o.getNextSiblings();
617
- return f.append(c, ...d), [u, h, c];
616
+ const [c, h, f] = r(l), d = o.getNextSiblings();
617
+ return f.append(u, ...d), [c, h, u];
618
618
  }
619
619
  }, [s, i] = r(e);
620
620
  return [s, i];
621
621
  }
622
- function So(n) {
623
- return X(n) && n.tagName === "A";
622
+ function Co(n) {
623
+ return Q(n) && n.tagName === "A";
624
624
  }
625
- function X(n) {
625
+ function Q(n) {
626
626
  return ie(n) && n.nodeType === ai;
627
627
  }
628
628
  function ie(n) {
@@ -639,9 +639,9 @@ function pr(n) {
639
639
  const t = 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");
640
640
  return n.nodeName.match(t) !== null;
641
641
  }
642
- function pt(n) {
642
+ function _t(n) {
643
643
  if (I(n) && !n.isInline()) return !0;
644
- if (!S(n) || Ft(n)) return !1;
644
+ if (!C(n) || Ft(n)) return !1;
645
645
  const t = n.getFirstChild(), e = t === null || Bt(t) || E(t) || t.isInline();
646
646
  return !n.isInline() && n.canBeEmpty() !== !1 && e;
647
647
  }
@@ -650,13 +650,13 @@ function Ut(n, t) {
650
650
  for (; e !== null && e.getParent() !== null && !t(e); ) e = e.getParentOrThrow();
651
651
  return t(e) ? e : null;
652
652
  }
653
- function Co() {
653
+ function To() {
654
654
  return A();
655
655
  }
656
656
  const yr = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new Map();
657
657
  function mr(n) {
658
658
  if (!n._readOnly && n.isEmpty()) return Wi;
659
- n._readOnly || T(192);
659
+ n._readOnly || k(192);
660
660
  let t = yr.get(n);
661
661
  return t || (t = function(e) {
662
662
  const r = /* @__PURE__ */ new Map();
@@ -676,7 +676,7 @@ function Ki(n, t) {
676
676
  const e = (parseInt(n.style.paddingInlineStart, 10) || 0) / 40;
677
677
  t.setIndent(e);
678
678
  }
679
- function To(n) {
679
+ function ko(n) {
680
680
  n.__lexicalUnmanaged = !0;
681
681
  }
682
682
  function Ji(n) {
@@ -686,17 +686,17 @@ function ds(n, t, e, r, s, i) {
686
686
  let o = n.getFirstChild();
687
687
  for (; o !== null; ) {
688
688
  const l = o.__key;
689
- o.__parent === t && (S(o) && ds(o, l, e, r, s, i), e.has(l) || i.delete(l), s.push(l)), o = o.getNextSibling();
689
+ o.__parent === t && (C(o) && ds(o, l, e, r, s, i), e.has(l) || i.delete(l), s.push(l)), o = o.getNextSibling();
690
690
  }
691
691
  }
692
- let Ct, q, Zt, Ve, pn, yn, Pt, nt, mn, te, W = "", H = "", it = null, et = "", at = "", hs = !1, ee = !1, xe = null;
692
+ let Ct, H, Zt, Ve, pn, yn, Pt, et, mn, te, W = "", V = "", st = null, tt = "", lt = "", hs = !1, ee = !1, xe = null;
693
693
  function Le(n, t) {
694
694
  const e = Pt.get(n);
695
695
  if (t !== null) {
696
- const r = Sn(n);
696
+ const r = Cn(n);
697
697
  r.parentNode === t && t.removeChild(r);
698
698
  }
699
- if (nt.has(n) || q._keyToDOMMap.delete(n), S(e)) {
699
+ if (et.has(n) || H._keyToDOMMap.delete(n), C(e)) {
700
700
  const r = Me(e, Pt);
701
701
  xn(r, 0, r.length - 1, null);
702
702
  }
@@ -727,45 +727,45 @@ function _s(n, t) {
727
727
  t === 0 ? kt(e, "") : t === Pn ? kt(e, "left") : t === On ? kt(e, "center") : t === Ln ? kt(e, "right") : t === Dn ? kt(e, "justify") : t === Mn ? kt(e, "start") : t === In && kt(e, "end");
728
728
  }
729
729
  function De(n, t) {
730
- const e = nt.get(n);
731
- e === void 0 && T(60);
732
- const r = e.createDOM(Ct, q);
730
+ const e = et.get(n);
731
+ e === void 0 && k(60);
732
+ const r = e.createDOM(Ct, H);
733
733
  if (function(s, i, o) {
734
734
  const l = o._keyToDOMMap;
735
- (function(a, c, u) {
736
- a[`__lexicalKey_${c._key}`] = u;
735
+ (function(a, u, c) {
736
+ a[`__lexicalKey_${u._key}`] = c;
737
737
  })(i, o, s), l.set(s, i);
738
- }(n, r, q), E(e) ? r.setAttribute("data-lexical-text", "true") : I(e) && r.setAttribute("data-lexical-decorator", "true"), S(e)) {
738
+ }(n, r, H), E(e) ? r.setAttribute("data-lexical-text", "true") : I(e) && r.setAttribute("data-lexical-decorator", "true"), C(e)) {
739
739
  const s = e.__indent, i = e.__size;
740
740
  if (s !== 0 && gs(r, s), i !== 0) {
741
741
  const l = i - 1;
742
- (function(a, c, u, h) {
743
- const f = H;
744
- H = "", vn(a, u, 0, c, u.getDOMSlot(h)), ys(u, h), H = f;
745
- })(Me(e, nt), l, e, r);
742
+ (function(a, u, c, h) {
743
+ const f = V;
744
+ V = "", Sn(a, c, 0, u, c.getDOMSlot(h)), ys(c, h), V = f;
745
+ })(Me(e, et), l, e, r);
746
746
  }
747
747
  const o = e.__format;
748
- o !== 0 && _s(r, o), e.isInline() || ps(null, e, r), Ue(e) && (W += ct, at += ct);
748
+ o !== 0 && _s(r, o), e.isInline() || ps(null, e, r), Ue(e) && (W += at, lt += at);
749
749
  } else {
750
750
  const s = e.getTextContent();
751
751
  if (I(e)) {
752
- const i = e.decorate(q, Ct);
752
+ const i = e.decorate(H, Ct);
753
753
  i !== null && ms(n, i), r.contentEditable = "false";
754
- } else E(e) && (e.isDirectionless() || (H += s));
755
- W += s, at += s;
754
+ } else E(e) && (e.isDirectionless() || (V += s));
755
+ W += s, lt += s;
756
756
  }
757
757
  return t !== null && t.insertChild(r), Jn(te, Zt, Ve, e, "created"), r;
758
758
  }
759
- function vn(n, t, e, r, s) {
759
+ function Sn(n, t, e, r, s) {
760
760
  const i = W;
761
761
  W = "";
762
762
  let o = e;
763
763
  for (; o <= r; ++o) {
764
764
  De(n[o], s);
765
- const l = nt.get(n[o]);
766
- l !== null && E(l) && (it === null && (it = l.getFormat()), et === "" && (et = l.getStyle()));
765
+ const l = et.get(n[o]);
766
+ l !== null && E(l) && (st === null && (st = l.getFormat()), tt === "" && (tt = l.getStyle()));
767
767
  }
768
- Ue(t) && (W += ct), s.element.__lexicalTextContent = W, W = i + W;
768
+ Ue(t) && (W += at), s.element.__lexicalTextContent = W, W = i + W;
769
769
  }
770
770
  function xr(n, t) {
771
771
  if (n) {
@@ -779,52 +779,52 @@ function xr(n, t) {
779
779
  return null;
780
780
  }
781
781
  function ps(n, t, e) {
782
- const r = xr(n, Pt), s = xr(t, nt);
782
+ const r = xr(n, Pt), s = xr(t, et);
783
783
  r !== s && t.getDOMSlot(e).setManagedLineBreak(s);
784
784
  }
785
785
  function ys(n, t) {
786
786
  const e = t.__lexicalDirTextContent || "", r = t.__lexicalDir || "";
787
- if (e !== H || r !== xe) {
788
- const i = H === "", o = i ? xe : (s = H, yi.test(s) ? "rtl" : mi.test(s) ? "ltr" : null);
787
+ if (e !== V || r !== xe) {
788
+ const i = V === "", o = i ? xe : (s = V, yi.test(s) ? "rtl" : mi.test(s) ? "ltr" : null);
789
789
  if (o !== r) {
790
790
  const l = t.classList, a = Ct.theme;
791
- let c = r !== null ? a[r] : void 0, u = o !== null ? a[o] : void 0;
792
- if (c !== void 0) {
793
- if (typeof c == "string") {
794
- const h = Ne(c);
795
- c = a[r] = h;
791
+ let u = r !== null ? a[r] : void 0, c = o !== null ? a[o] : void 0;
792
+ if (u !== void 0) {
793
+ if (typeof u == "string") {
794
+ const h = Ne(u);
795
+ u = a[r] = h;
796
796
  }
797
- l.remove(...c);
797
+ l.remove(...u);
798
798
  }
799
799
  if (o === null || i && o === "ltr") t.removeAttribute("dir");
800
800
  else {
801
- if (u !== void 0) {
802
- if (typeof u == "string") {
803
- const h = Ne(u);
804
- u = a[o] = h;
801
+ if (c !== void 0) {
802
+ if (typeof c == "string") {
803
+ const h = Ne(c);
804
+ c = a[o] = h;
805
805
  }
806
- u !== void 0 && l.add(...u);
806
+ c !== void 0 && l.add(...c);
807
807
  }
808
808
  t.dir = o;
809
809
  }
810
810
  ee || (n.getWritable().__dir = o);
811
811
  }
812
- xe = o, t.__lexicalDirTextContent = H, t.__lexicalDir = o;
812
+ xe = o, t.__lexicalDirTextContent = V, t.__lexicalDir = o;
813
813
  }
814
814
  var s;
815
815
  }
816
816
  function $i(n, t, e) {
817
- const r = H;
817
+ const r = V;
818
818
  var s;
819
- H = "", it = null, et = "", function(i, o, l) {
820
- const a = W, c = i.__size, u = o.__size;
819
+ V = "", st = null, tt = "", function(i, o, l) {
820
+ const a = W, u = i.__size, c = o.__size;
821
821
  W = "";
822
822
  const h = l.element;
823
- if (c === 1 && u === 1) {
823
+ if (u === 1 && c === 1) {
824
824
  const f = i.__first, d = o.__first;
825
825
  if (f === d) Vt(f, h);
826
826
  else {
827
- const _ = Sn(f), p = De(d, null);
827
+ const _ = Cn(f), p = De(d, null);
828
828
  try {
829
829
  h.replaceChild(p, _);
830
830
  } catch (m) {
@@ -836,142 +836,142 @@ function $i(n, t, e) {
836
836
  }
837
837
  Le(f, null);
838
838
  }
839
- const g = nt.get(d);
840
- E(g) && (it === null && (it = g.getFormat()), et === "" && (et = g.getStyle()));
839
+ const g = et.get(d);
840
+ E(g) && (st === null && (st = g.getFormat()), tt === "" && (tt = g.getStyle()));
841
841
  } else {
842
- const f = Me(i, Pt), d = Me(o, nt);
843
- if (f.length !== c && T(227), d.length !== u && T(228), c === 0) u !== 0 && vn(d, o, 0, u - 1, l);
844
- else if (u === 0) {
845
- if (c !== 0) {
842
+ const f = Me(i, Pt), d = Me(o, et);
843
+ if (f.length !== u && k(227), d.length !== c && k(228), u === 0) c !== 0 && Sn(d, o, 0, c - 1, l);
844
+ else if (c === 0) {
845
+ if (u !== 0) {
846
846
  const g = l.after == null && l.before == null && l.element.__lexicalLineBreak == null;
847
- xn(f, 0, c - 1, g ? null : h), g && (h.textContent = "");
847
+ xn(f, 0, u - 1, g ? null : h), g && (h.textContent = "");
848
848
  }
849
849
  } else (function(g, _, p, m, y, x) {
850
- const b = m - 1, k = y - 1;
851
- let v, F, C = x.getFirstChild(), N = 0, O = 0;
852
- for (; N <= b && O <= k; ) {
850
+ const v = m - 1, b = y - 1;
851
+ let S, F, T = x.getFirstChild(), N = 0, O = 0;
852
+ for (; N <= v && O <= b; ) {
853
853
  const L = _[N], R = p[O];
854
- if (L === R) C = ln(Vt(R, x.element)), N++, O++;
854
+ if (L === R) T = ln(Vt(R, x.element)), N++, O++;
855
855
  else {
856
- v === void 0 && (v = new Set(_)), F === void 0 && (F = new Set(p));
857
- const ht = F.has(L), Lt = v.has(R);
858
- if (ht) if (Lt) {
859
- const de = Oe(q, R);
860
- de === C ? C = ln(Vt(R, x.element)) : (x.withBefore(C).insertChild(de), Vt(R, x.element)), N++, O++;
861
- } else De(R, x.withBefore(C)), O++;
862
- else C = ln(Sn(L)), Le(L, x.element), N++;
856
+ S === void 0 && (S = new Set(_)), F === void 0 && (F = new Set(p));
857
+ const dt = F.has(L), Lt = S.has(R);
858
+ if (dt) if (Lt) {
859
+ const de = Oe(H, R);
860
+ de === T ? T = ln(Vt(R, x.element)) : (x.withBefore(T).insertChild(de), Vt(R, x.element)), N++, O++;
861
+ } else De(R, x.withBefore(T)), O++;
862
+ else T = ln(Cn(L)), Le(L, x.element), N++;
863
863
  }
864
- const z = nt.get(R);
865
- z !== null && E(z) && (it === null && (it = z.getFormat()), et === "" && (et = z.getStyle()));
864
+ const z = et.get(R);
865
+ z !== null && E(z) && (st === null && (st = z.getFormat()), tt === "" && (tt = z.getStyle()));
866
866
  }
867
- const D = N > b, B = O > k;
867
+ const D = N > v, B = O > b;
868
868
  if (D && !B) {
869
- const L = p[k + 1], R = L === void 0 ? null : q.getElementByKey(L);
870
- vn(p, g, O, k, x.withBefore(R));
871
- } else B && !D && xn(_, N, b, x.element);
872
- })(o, f, d, c, u, l);
869
+ const L = p[b + 1], R = L === void 0 ? null : H.getElementByKey(L);
870
+ Sn(p, g, O, b, x.withBefore(R));
871
+ } else B && !D && xn(_, N, v, x.element);
872
+ })(o, f, d, u, c, l);
873
873
  }
874
- Ue(o) && (W += ct), h.__lexicalTextContent = W, W = a + W;
875
- }(n, t, t.getDOMSlot(e)), ys(t, e), s = t, it == null || it === s.__textFormat || ee || (s.setTextFormat(it), s.setTextStyle(et)), function(i) {
876
- et === "" || et === i.__textStyle || ee || i.setTextStyle(et);
877
- }(t), H = r;
874
+ Ue(o) && (W += at), h.__lexicalTextContent = W, W = a + W;
875
+ }(n, t, t.getDOMSlot(e)), ys(t, e), s = t, st == null || st === s.__textFormat || ee || (s.setTextFormat(st), s.setTextStyle(tt)), function(i) {
876
+ tt === "" || tt === i.__textStyle || ee || i.setTextStyle(tt);
877
+ }(t), V = r;
878
878
  }
879
879
  function Me(n, t) {
880
880
  const e = [];
881
881
  let r = n.__first;
882
882
  for (; r !== null; ) {
883
883
  const s = t.get(r);
884
- s === void 0 && T(101), e.push(r), r = s.__next;
884
+ s === void 0 && k(101), e.push(r), r = s.__next;
885
885
  }
886
886
  return e;
887
887
  }
888
888
  function Vt(n, t) {
889
889
  const e = Pt.get(n);
890
- let r = nt.get(n);
891
- e !== void 0 && r !== void 0 || T(61);
892
- const s = hs || yn.has(n) || pn.has(n), i = Oe(q, n);
890
+ let r = et.get(n);
891
+ e !== void 0 && r !== void 0 || k(61);
892
+ const s = hs || yn.has(n) || pn.has(n), i = Oe(H, n);
893
893
  if (e === r && !s) {
894
- if (S(e)) {
894
+ if (C(e)) {
895
895
  const o = i.__lexicalTextContent;
896
- o !== void 0 && (W += o, at += o);
896
+ o !== void 0 && (W += o, lt += o);
897
897
  const l = i.__lexicalDirTextContent;
898
- l !== void 0 && (H += l);
898
+ l !== void 0 && (V += l);
899
899
  } else {
900
900
  const o = e.getTextContent();
901
- E(e) && !e.isDirectionless() && (H += o), at += o, W += o;
901
+ E(e) && !e.isDirectionless() && (V += o), lt += o, W += o;
902
902
  }
903
903
  return i;
904
904
  }
905
905
  if (e !== r && s && Jn(te, Zt, Ve, r, "updated"), r.updateDOM(e, i, Ct)) {
906
906
  const o = De(n, null);
907
- return t === null && T(62), t.replaceChild(o, i), Le(n, null), o;
907
+ return t === null && k(62), t.replaceChild(o, i), Le(n, null), o;
908
908
  }
909
- if (S(e) && S(r)) {
909
+ if (C(e) && C(r)) {
910
910
  const o = r.__indent;
911
911
  o !== e.__indent && gs(i, o);
912
912
  const l = r.__format;
913
- l !== e.__format && _s(i, l), s && ($i(e, r, i), Z(r) || r.isInline() || ps(e, r, i)), Ue(r) && (W += ct, at += ct);
913
+ l !== e.__format && _s(i, l), s && ($i(e, r, i), Y(r) || r.isInline() || ps(e, r, i)), Ue(r) && (W += at, lt += at);
914
914
  } else {
915
915
  const o = r.getTextContent();
916
916
  if (I(r)) {
917
- const l = r.decorate(q, Ct);
917
+ const l = r.decorate(H, Ct);
918
918
  l !== null && ms(n, l);
919
- } else E(r) && !r.isDirectionless() && (H += o);
920
- W += o, at += o;
919
+ } else E(r) && !r.isDirectionless() && (V += o);
920
+ W += o, lt += o;
921
921
  }
922
- if (!ee && Z(r) && r.__cachedText !== at) {
922
+ if (!ee && Y(r) && r.__cachedText !== lt) {
923
923
  const o = r.getWritable();
924
- o.__cachedText = at, r = o;
924
+ o.__cachedText = lt, r = o;
925
925
  }
926
926
  return i;
927
927
  }
928
928
  function ms(n, t) {
929
- let e = q._pendingDecorators;
930
- const r = q._decorators;
929
+ let e = H._pendingDecorators;
930
+ const r = H._decorators;
931
931
  if (e === null) {
932
932
  if (r[n] === t) return;
933
- e = is(q);
933
+ e = is(H);
934
934
  }
935
935
  e[n] = t;
936
936
  }
937
937
  function ln(n) {
938
938
  let t = n.nextSibling;
939
- return t !== null && t === q._blockCursorElement && (t = t.nextSibling), t;
939
+ return t !== null && t === H._blockCursorElement && (t = t.nextSibling), t;
940
940
  }
941
941
  function ji(n, t, e, r, s, i) {
942
- W = "", at = "", H = "", hs = r === zt, xe = null, q = e, Ct = e._config, Zt = e._nodes, Ve = q._listeners.mutation, pn = s, yn = i, Pt = n._nodeMap, nt = t._nodeMap, ee = t._readOnly, mn = new Map(e._keyToDOMMap);
942
+ W = "", lt = "", V = "", hs = r === zt, xe = null, H = e, Ct = e._config, Zt = e._nodes, Ve = H._listeners.mutation, pn = s, yn = i, Pt = n._nodeMap, et = t._nodeMap, ee = t._readOnly, mn = new Map(e._keyToDOMMap);
943
943
  const o = /* @__PURE__ */ new Map();
944
- return te = o, Vt("root", null), q = void 0, Zt = void 0, pn = void 0, yn = void 0, Pt = void 0, nt = void 0, Ct = void 0, mn = void 0, te = void 0, o;
944
+ return te = o, Vt("root", null), H = void 0, Zt = void 0, pn = void 0, yn = void 0, Pt = void 0, et = void 0, Ct = void 0, mn = void 0, te = void 0, o;
945
945
  }
946
- function Sn(n) {
946
+ function Cn(n) {
947
947
  const t = mn.get(n);
948
- return t === void 0 && T(75, n), t;
948
+ return t === void 0 && k(75, n), t;
949
949
  }
950
- const lt = Object.freeze({}), Cn = 30, Tn = [["keydown", function(n, t) {
950
+ const ot = Object.freeze({}), Tn = 30, kn = [["keydown", function(n, t) {
951
951
  if (Gt = n.timeStamp, xs = n.key, t.isComposing()) return;
952
952
  const { key: e, shiftKey: r, ctrlKey: s, metaKey: i, altKey: o } = n;
953
953
  if (!w(t, Rs, n) && e != null) {
954
- if (function(l, a, c, u) {
955
- return fr(l) && !a && !u && !c;
954
+ if (function(l, a, u, c) {
955
+ return fr(l) && !a && !c && !u;
956
956
  }(e, s, o, i)) w(t, Ks, n);
957
- else if (function(l, a, c, u, h) {
958
- return fr(l) && !u && !c && (a || h);
957
+ else if (function(l, a, u, c, h) {
958
+ return fr(l) && !c && !u && (a || h);
959
959
  }(e, s, r, o, i)) w(t, Js, n);
960
- else if (function(l, a, c, u) {
961
- return ur(l) && !a && !u && !c;
960
+ else if (function(l, a, u, c) {
961
+ return cr(l) && !a && !c && !u;
962
962
  }(e, s, o, i)) w(t, Us, n);
963
- else if (function(l, a, c, u, h) {
964
- return ur(l) && !u && !c && (a || h);
963
+ else if (function(l, a, u, c, h) {
964
+ return cr(l) && !c && !u && (a || h);
965
965
  }(e, s, r, o, i)) w(t, $s, n);
966
- else if (/* @__PURE__ */ function(l, a, c) {
967
- return /* @__PURE__ */ function(u) {
968
- return u === "ArrowUp";
969
- }(l) && !a && !c;
966
+ else if (/* @__PURE__ */ function(l, a, u) {
967
+ return /* @__PURE__ */ function(c) {
968
+ return c === "ArrowUp";
969
+ }(l) && !a && !u;
970
970
  }(e, s, i)) w(t, js, n);
971
- else if (/* @__PURE__ */ function(l, a, c) {
972
- return /* @__PURE__ */ function(u) {
973
- return u === "ArrowDown";
974
- }(l) && !a && !c;
971
+ else if (/* @__PURE__ */ function(l, a, u) {
972
+ return /* @__PURE__ */ function(c) {
973
+ return c === "ArrowDown";
974
+ }(l) && !a && !u;
975
975
  }(e, s, i)) w(t, Vs, n);
976
976
  else if (function(l, a) {
977
977
  return dr(l) && a;
@@ -980,112 +980,112 @@ const lt = Object.freeze({}), Cn = 30, Tn = [["keydown", function(n, t) {
980
980
  return l === " ";
981
981
  }(e)) w(t, Hs, n);
982
982
  else if (function(l, a) {
983
- return tt && a && l.toLowerCase() === "o";
983
+ return Z && a && l.toLowerCase() === "o";
984
984
  }(e, s)) n.preventDefault(), Qt = !0, w(t, me, !0);
985
985
  else if (function(l, a) {
986
986
  return dr(l) && !a;
987
987
  }(e, r)) Qt = !1, w(t, gn, n);
988
- else if (function(l, a, c, u) {
989
- return tt ? !a && !c && (Kt(l) || l.toLowerCase() === "h" && u) : !(u || a || c) && Kt(l);
990
- }(e, o, i, s)) Kt(e) ? w(t, qs, n) : (n.preventDefault(), w(t, Se, !0));
988
+ else if (function(l, a, u, c) {
989
+ return Z ? !a && !u && (Kt(l) || l.toLowerCase() === "h" && c) : !(c || a || u) && Kt(l);
990
+ }(e, o, i, s)) Kt(e) ? w(t, qs, n) : (n.preventDefault(), w(t, Ce, !0));
991
991
  else if (/* @__PURE__ */ function(l) {
992
992
  return l === "Escape";
993
993
  }(e)) w(t, Gs, n);
994
- else if (function(l, a, c, u, h) {
995
- return tt ? !(c || u || h) && (Jt(l) || l.toLowerCase() === "d" && a) : !(a || u || h) && Jt(l);
996
- }(e, s, r, o, i)) Jt(e) ? w(t, Qs, n) : (n.preventDefault(), w(t, Se, !1));
997
- else if (function(l, a, c) {
998
- return Kt(l) && (tt ? a : c);
999
- }(e, o, s)) n.preventDefault(), w(t, Ce, !0);
1000
- else if (function(l, a, c) {
1001
- return Jt(l) && (tt ? a : c);
1002
- }(e, o, s)) n.preventDefault(), w(t, Ce, !1);
994
+ else if (function(l, a, u, c, h) {
995
+ return Z ? !(u || c || h) && (Jt(l) || l.toLowerCase() === "d" && a) : !(a || c || h) && Jt(l);
996
+ }(e, s, r, o, i)) Jt(e) ? w(t, Qs, n) : (n.preventDefault(), w(t, Ce, !1));
997
+ else if (function(l, a, u) {
998
+ return Kt(l) && (Z ? a : u);
999
+ }(e, o, s)) n.preventDefault(), w(t, Te, !0);
1000
+ else if (function(l, a, u) {
1001
+ return Jt(l) && (Z ? a : u);
1002
+ }(e, o, s)) n.preventDefault(), w(t, Te, !1);
1003
1003
  else if (function(l, a) {
1004
- return tt && a && Kt(l);
1005
- }(e, i)) n.preventDefault(), w(t, Te, !0);
1004
+ return Z && a && Kt(l);
1005
+ }(e, i)) n.preventDefault(), w(t, ke, !0);
1006
1006
  else if (function(l, a) {
1007
- return tt && a && Jt(l);
1008
- }(e, i)) n.preventDefault(), w(t, Te, !1);
1009
- else if (function(l, a, c, u) {
1010
- return l.toLowerCase() === "b" && !a && jt(c, u);
1011
- }(e, o, i, s)) n.preventDefault(), w(t, wt, "bold");
1012
- else if (function(l, a, c, u) {
1013
- return l.toLowerCase() === "u" && !a && jt(c, u);
1014
- }(e, o, i, s)) n.preventDefault(), w(t, wt, "underline");
1015
- else if (function(l, a, c, u) {
1016
- return l.toLowerCase() === "i" && !a && jt(c, u);
1017
- }(e, o, i, s)) n.preventDefault(), w(t, wt, "italic");
1018
- else if (/* @__PURE__ */ function(l, a, c, u) {
1019
- return l === "Tab" && !a && !c && !u;
1007
+ return Z && a && Jt(l);
1008
+ }(e, i)) n.preventDefault(), w(t, ke, !1);
1009
+ else if (function(l, a, u, c) {
1010
+ return l.toLowerCase() === "b" && !a && jt(u, c);
1011
+ }(e, o, i, s)) n.preventDefault(), w(t, vt, "bold");
1012
+ else if (function(l, a, u, c) {
1013
+ return l.toLowerCase() === "u" && !a && jt(u, c);
1014
+ }(e, o, i, s)) n.preventDefault(), w(t, vt, "underline");
1015
+ else if (function(l, a, u, c) {
1016
+ return l.toLowerCase() === "i" && !a && jt(u, c);
1017
+ }(e, o, i, s)) n.preventDefault(), w(t, vt, "italic");
1018
+ else if (/* @__PURE__ */ function(l, a, u, c) {
1019
+ return l === "Tab" && !a && !u && !c;
1020
1020
  }(e, o, s, i)) w(t, Xs, n);
1021
- else if (function(l, a, c, u) {
1022
- return l.toLowerCase() === "z" && !a && jt(c, u);
1021
+ else if (function(l, a, u, c) {
1022
+ return l.toLowerCase() === "z" && !a && jt(u, c);
1023
1023
  }(e, r, i, s)) n.preventDefault(), w(t, $r, void 0);
1024
- else if (function(l, a, c, u) {
1025
- return tt ? l.toLowerCase() === "z" && c && a : l.toLowerCase() === "y" && u || l.toLowerCase() === "z" && u && a;
1024
+ else if (function(l, a, u, c) {
1025
+ return Z ? l.toLowerCase() === "z" && u && a : l.toLowerCase() === "y" && c || l.toLowerCase() === "z" && c && a;
1026
1026
  }(e, r, i, s)) n.preventDefault(), w(t, jr, void 0);
1027
1027
  else {
1028
1028
  const l = t._editorState._selection;
1029
- l === null || P(l) ? !vt && hr(e, i, s) && (n.preventDefault(), w(t, er, n)) : function(a, c, u, h) {
1030
- return !c && a.toLowerCase() === "c" && (tt ? u : h);
1031
- }(e, r, i, s) ? (n.preventDefault(), w(t, Vr, n)) : function(a, c, u, h) {
1032
- return !c && a.toLowerCase() === "x" && (tt ? u : h);
1029
+ l === null || P(l) ? !xt && hr(e, i, s) && (n.preventDefault(), w(t, er, n)) : function(a, u, c, h) {
1030
+ return !u && a.toLowerCase() === "c" && (Z ? c : h);
1031
+ }(e, r, i, s) ? (n.preventDefault(), w(t, Vr, n)) : function(a, u, c, h) {
1032
+ return !u && a.toLowerCase() === "x" && (Z ? c : h);
1033
1033
  }(e, r, i, s) ? (n.preventDefault(), w(t, Hr, n)) : hr(e, i, s) && (n.preventDefault(), w(t, er, n));
1034
1034
  }
1035
- /* @__PURE__ */ (function(l, a, c, u) {
1036
- return l || a || c || u;
1035
+ /* @__PURE__ */ (function(l, a, u, c) {
1036
+ return l || a || u || c;
1037
1037
  })(s, r, o, i) && w(t, si, n);
1038
1038
  }
1039
1039
  }], ["pointerdown", function(n, t) {
1040
1040
  const e = n.target, r = n.pointerType;
1041
- ie(e) && r !== "touch" && n.button === 0 && Y(t, () => {
1042
- I(zn(e)) || (bn = !0);
1041
+ ie(e) && r !== "touch" && n.button === 0 && X(t, () => {
1042
+ I(zn(e)) || (vn = !0);
1043
1043
  });
1044
1044
  }], ["compositionstart", function(n, t) {
1045
- Y(t, () => {
1045
+ X(t, () => {
1046
1046
  const e = M();
1047
1047
  if (P(e) && !t.isComposing()) {
1048
1048
  const r = e.anchor, s = e.anchor.getNode();
1049
- $(r.key), (n.timeStamp < Gt + Cn || r.type === "element" || !e.isCollapsed() || s.getFormat() !== e.format || E(s) && s.getStyle() !== e.style) && w(t, Ht, pi);
1049
+ $(r.key), (n.timeStamp < Gt + Tn || r.type === "element" || !e.isCollapsed() || s.getFormat() !== e.format || E(s) && s.getStyle() !== e.style) && w(t, Ht, pi);
1050
1050
  }
1051
1051
  });
1052
1052
  }], ["compositionend", function(n, t) {
1053
- vt ? $t = !0 : Y(t, () => {
1053
+ xt ? $t = !0 : X(t, () => {
1054
1054
  an(t, n.data);
1055
1055
  });
1056
1056
  }], ["input", function(n, t) {
1057
- n.stopPropagation(), Y(t, () => {
1058
- const e = M(), r = n.data, s = Ts(n);
1059
- if (r != null && P(e) && Cs(e, s, r, n.timeStamp, !1)) {
1057
+ n.stopPropagation(), X(t, () => {
1058
+ const e = M(), r = n.data, s = ks(n);
1059
+ if (r != null && P(e) && Ts(e, s, r, n.timeStamp, !1)) {
1060
1060
  $t && (an(t, r), $t = !1);
1061
- const i = e.anchor.getNode(), o = ft(t._window);
1061
+ const i = e.anchor.getNode(), o = ct(t._window);
1062
1062
  if (o === null) return;
1063
- const l = e.isBackward(), a = l ? e.anchor.offset : e.focus.offset, c = l ? e.focus.offset : e.anchor.offset;
1064
- ke && !e.isCollapsed() && E(i) && o.anchorNode !== null && i.getTextContent().slice(0, a) + r + i.getTextContent().slice(a + c) === cs(o.anchorNode) || w(t, Ht, r);
1065
- const u = r.length;
1066
- vt && u > 1 && n.inputType === "insertCompositionText" && !t.isComposing() && (e.anchor.offset -= u), ze || re || En || !t.isComposing() || (Gt = 0, $(null));
1063
+ const l = e.isBackward(), a = l ? e.anchor.offset : e.focus.offset, u = l ? e.focus.offset : e.anchor.offset;
1064
+ be && !e.isCollapsed() && E(i) && o.anchorNode !== null && i.getTextContent().slice(0, a) + r + i.getTextContent().slice(a + u) === us(o.anchorNode) || w(t, Ht, r);
1065
+ const c = r.length;
1066
+ xt && c > 1 && n.inputType === "insertCompositionText" && !t.isComposing() && (e.anchor.offset -= c), ze || re || En || !t.isComposing() || (Gt = 0, $(null));
1067
1067
  } else
1068
1068
  Rn(!1, t, r !== null ? r : void 0), $t && (an(t, r || void 0), $t = !1);
1069
- G(), Zr(A());
1069
+ q(), Zr(A());
1070
1070
  }), Dt = null;
1071
1071
  }], ["click", function(n, t) {
1072
- Y(t, () => {
1073
- const e = M(), r = ft(t._window), s = ae();
1072
+ X(t, () => {
1073
+ const e = M(), r = ct(t._window), s = ae();
1074
1074
  if (r) {
1075
1075
  if (P(e)) {
1076
1076
  const i = e.anchor, o = i.getNode();
1077
- i.type === "element" && i.offset === 0 && e.isCollapsed() && !Z(o) && rt().getChildrenSize() === 1 && o.getTopLevelElementOrThrow().isEmpty() && s !== null && e.is(s) ? (r.removeAllRanges(), e.dirty = !0) : n.detail === 3 && !e.isCollapsed() && o !== e.focus.getNode() && (S(o) ? o.select(0) : o.getParentOrThrow().select(0));
1077
+ i.type === "element" && i.offset === 0 && e.isCollapsed() && !Y(o) && nt().getChildrenSize() === 1 && o.getTopLevelElementOrThrow().isEmpty() && s !== null && e.is(s) ? (r.removeAllRanges(), e.dirty = !0) : n.detail === 3 && !e.isCollapsed() && o !== e.focus.getNode() && (C(o) ? o.select(0) : o.getParentOrThrow().select(0));
1078
1078
  } else if (n.pointerType === "touch") {
1079
1079
  const i = r.anchorNode;
1080
- (X(i) || dt(i)) && ut(Ge(s, r, t, n));
1080
+ (Q(i) || ft(i)) && ut(Ge(s, r, t, n));
1081
1081
  }
1082
1082
  }
1083
1083
  w(t, Ws, n);
1084
1084
  });
1085
- }], ["cut", lt], ["copy", lt], ["dragstart", lt], ["dragover", lt], ["dragend", lt], ["paste", lt], ["focus", lt], ["blur", lt], ["drop", lt]];
1086
- ke && Tn.push(["beforeinput", (n, t) => function(e, r) {
1087
- const s = e.inputType, i = Ts(e);
1088
- s === "deleteCompositionText" || vt && us(r) || s !== "insertCompositionText" && Y(r, () => {
1085
+ }], ["cut", ot], ["copy", ot], ["dragstart", ot], ["dragover", ot], ["dragend", ot], ["paste", ot], ["focus", ot], ["blur", ot], ["drop", ot]];
1086
+ be && kn.push(["beforeinput", (n, t) => function(e, r) {
1087
+ const s = e.inputType, i = ks(e);
1088
+ s === "deleteCompositionText" || xt && cs(r) || s !== "insertCompositionText" && X(r, () => {
1089
1089
  const o = M();
1090
1090
  if (s === "deleteContentBackward") {
1091
1091
  if (o === null) {
@@ -1095,19 +1095,19 @@ ke && Tn.push(["beforeinput", (n, t) => function(e, r) {
1095
1095
  }
1096
1096
  if (P(o)) {
1097
1097
  const d = o.anchor.key === o.focus.key;
1098
- if (l = e.timeStamp, xs === "MediaLast" && l < Gt + Cn && r.isComposing() && d) {
1098
+ if (l = e.timeStamp, xs === "MediaLast" && l < Gt + Tn && r.isComposing() && d) {
1099
1099
  if ($(null), Gt = 0, setTimeout(() => {
1100
- Y(r, () => {
1100
+ X(r, () => {
1101
1101
  $(null);
1102
1102
  });
1103
- }, Cn), P(o)) {
1103
+ }, Tn), P(o)) {
1104
1104
  const g = o.anchor.getNode();
1105
- g.markDirty(), o.format = g.getFormat(), E(g) || T(142), o.style = g.getStyle();
1105
+ g.markDirty(), o.format = g.getFormat(), E(g) || k(142), o.style = g.getStyle();
1106
1106
  }
1107
1107
  } else {
1108
1108
  $(null), e.preventDefault();
1109
1109
  const g = o.anchor.getNode(), _ = g.getTextContent(), p = g.canInsertTextAfter(), m = o.anchor.offset === 0 && o.focus.offset === _.length;
1110
- li && d && !m && p || w(r, Se, !0);
1110
+ li && d && !m && p || w(r, Ce, !0);
1111
1111
  }
1112
1112
  return;
1113
1113
  }
@@ -1115,8 +1115,8 @@ ke && Tn.push(["beforeinput", (n, t) => function(e, r) {
1115
1115
  var l;
1116
1116
  if (!P(o)) return;
1117
1117
  const a = e.data;
1118
- Dt !== null && Rn(!1, r, Dt), o.dirty && Dt === null || !o.isCollapsed() || Z(o.anchor.getNode()) || i === null || o.applyDOMRange(i), Dt = null;
1119
- const c = o.anchor, u = o.focus, h = c.getNode(), f = u.getNode();
1118
+ Dt !== null && Rn(!1, r, Dt), o.dirty && Dt === null || !o.isCollapsed() || Y(o.anchor.getNode()) || i === null || o.applyDOMRange(i), Dt = null;
1119
+ const u = o.anchor, c = o.focus, h = u.getNode(), f = c.getNode();
1120
1120
  if (s !== "insertText" && s !== "insertTranspose") switch (e.preventDefault(), s) {
1121
1121
  case "insertFromYank":
1122
1122
  case "insertFromDrop":
@@ -1138,7 +1138,7 @@ ke && Tn.push(["beforeinput", (n, t) => function(e, r) {
1138
1138
  break;
1139
1139
  case "deleteByComposition":
1140
1140
  (function(d, g) {
1141
- return d !== g || S(d) || S(g) || !d.isToken() || !g.isToken();
1141
+ return d !== g || C(d) || C(g) || !d.isToken() || !g.isToken();
1142
1142
  })(h, f) && w(r, tr, e);
1143
1143
  break;
1144
1144
  case "deleteByDrag":
@@ -1146,34 +1146,34 @@ ke && Tn.push(["beforeinput", (n, t) => function(e, r) {
1146
1146
  w(r, tr, e);
1147
1147
  break;
1148
1148
  case "deleteContent":
1149
- w(r, Se, !1);
1149
+ w(r, Ce, !1);
1150
1150
  break;
1151
1151
  case "deleteWordBackward":
1152
- w(r, Ce, !0);
1152
+ w(r, Te, !0);
1153
1153
  break;
1154
1154
  case "deleteWordForward":
1155
- w(r, Ce, !1);
1155
+ w(r, Te, !1);
1156
1156
  break;
1157
1157
  case "deleteHardLineBackward":
1158
1158
  case "deleteSoftLineBackward":
1159
- w(r, Te, !0);
1159
+ w(r, ke, !0);
1160
1160
  break;
1161
1161
  case "deleteContentForward":
1162
1162
  case "deleteHardLineForward":
1163
1163
  case "deleteSoftLineForward":
1164
- w(r, Te, !1);
1164
+ w(r, ke, !1);
1165
1165
  break;
1166
1166
  case "formatStrikeThrough":
1167
- w(r, wt, "strikethrough");
1167
+ w(r, vt, "strikethrough");
1168
1168
  break;
1169
1169
  case "formatBold":
1170
- w(r, wt, "bold");
1170
+ w(r, vt, "bold");
1171
1171
  break;
1172
1172
  case "formatItalic":
1173
- w(r, wt, "italic");
1173
+ w(r, vt, "italic");
1174
1174
  break;
1175
1175
  case "formatUnderline":
1176
- w(r, wt, "underline");
1176
+ w(r, vt, "underline");
1177
1177
  break;
1178
1178
  case "historyUndo":
1179
1179
  w(r, $r, void 0);
@@ -1184,57 +1184,57 @@ ke && Tn.push(["beforeinput", (n, t) => function(e, r) {
1184
1184
  else {
1185
1185
  if (a === `
1186
1186
  `) e.preventDefault(), w(r, me, !1);
1187
- else if (a === ct) e.preventDefault(), w(r, Zn, void 0);
1187
+ else if (a === at) e.preventDefault(), w(r, Zn, void 0);
1188
1188
  else if (a == null && e.dataTransfer) {
1189
1189
  const d = e.dataTransfer.getData("text/plain");
1190
1190
  e.preventDefault(), o.insertRawText(d);
1191
- } else a != null && Cs(o, i, a, e.timeStamp, !0) ? (e.preventDefault(), w(r, Ht, a)) : Dt = a;
1192
- vs = e.timeStamp;
1191
+ } else a != null && Ts(o, i, a, e.timeStamp, !0) ? (e.preventDefault(), w(r, Ht, a)) : Dt = a;
1192
+ Ss = e.timeStamp;
1193
1193
  }
1194
1194
  });
1195
1195
  }(n, t)]);
1196
- let Gt = 0, xs = null, vs = 0, Dt = null;
1196
+ let Gt = 0, xs = null, Ss = 0, Dt = null;
1197
1197
  const Ie = /* @__PURE__ */ new WeakMap();
1198
- let kn = !1, bn = !1, Qt = !1, $t = !1, Ss = [0, "", 0, "root", 0];
1199
- function Cs(n, t, e, r, s) {
1200
- const i = n.anchor, o = n.focus, l = i.getNode(), a = A(), c = ft(a._window), u = c !== null ? c.anchorNode : null, h = i.key, f = a.getElementByKey(h), d = e.length;
1201
- return h !== o.key || !E(l) || (!s && (!ke || vs < r + 50) || l.isDirty() && d < 2 || ls(e)) && i.offset !== o.offset && !l.isComposing() || bt(l) || l.isDirty() && d > 1 || (s || !ke) && f !== null && !l.isComposing() && u !== Ee(f) || c !== null && t !== null && (!t.collapsed || t.startContainer !== c.anchorNode || t.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || Li(n, l);
1198
+ let bn = !1, vn = !1, Qt = !1, $t = !1, Cs = [0, "", 0, "root", 0];
1199
+ function Ts(n, t, e, r, s) {
1200
+ const i = n.anchor, o = n.focus, l = i.getNode(), a = A(), u = ct(a._window), c = u !== null ? u.anchorNode : null, h = i.key, f = a.getElementByKey(h), d = e.length;
1201
+ return h !== o.key || !E(l) || (!s && (!be || Ss < r + 50) || l.isDirty() && d < 2 || ls(e)) && i.offset !== o.offset && !l.isComposing() || bt(l) || l.isDirty() && d > 1 || (s || !be) && f !== null && !l.isComposing() && c !== Ee(f) || u !== null && t !== null && (!t.collapsed || t.startContainer !== u.anchorNode || t.startOffset !== u.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || Li(n, l);
1202
1202
  }
1203
- function vr(n, t) {
1204
- return dt(n) && n.nodeValue !== null && t !== 0 && t !== n.nodeValue.length;
1203
+ function Sr(n, t) {
1204
+ return ft(n) && n.nodeValue !== null && t !== 0 && t !== n.nodeValue.length;
1205
1205
  }
1206
- function Sr(n, t, e) {
1206
+ function Cr(n, t, e) {
1207
1207
  const { anchorNode: r, anchorOffset: s, focusNode: i, focusOffset: o } = n;
1208
- kn && (kn = !1, vr(r, s) && vr(i, o)) || Y(t, () => {
1208
+ bn && (bn = !1, Sr(r, s) && Sr(i, o)) || X(t, () => {
1209
1209
  if (!e) return void ut(null);
1210
1210
  if (!Re(t, r, i)) return;
1211
1211
  const l = M();
1212
1212
  if (P(l)) {
1213
- const a = l.anchor, c = a.getNode();
1213
+ const a = l.anchor, u = a.getNode();
1214
1214
  if (l.isCollapsed()) {
1215
1215
  n.type === "Range" && n.anchorNode === n.focusNode && (l.dirty = !0);
1216
- const u = $e(t).event, h = u ? u.timeStamp : performance.now(), [f, d, g, _, p] = Ss, m = rt(), y = t.isComposing() === !1 && m.getTextContent() === "";
1216
+ const c = $e(t).event, h = c ? c.timeStamp : performance.now(), [f, d, g, _, p] = Cs, m = nt(), y = t.isComposing() === !1 && m.getTextContent() === "";
1217
1217
  if (h < p + 200 && a.offset === g && a.key === _) l.format = f, l.style = d;
1218
- else if (a.type === "text") E(c) || T(141), l.format = c.getFormat(), l.style = c.getStyle();
1218
+ else if (a.type === "text") E(u) || k(141), l.format = u.getFormat(), l.style = u.getStyle();
1219
1219
  else if (a.type === "element" && !y) {
1220
- S(c) || T(259);
1220
+ C(u) || k(259);
1221
1221
  const x = a.getNode();
1222
1222
  l.style = "", x.isEmpty() ? (l.format = x.getTextFormat(), l.style = x.getTextStyle()) : l.format = 0;
1223
1223
  }
1224
1224
  } else {
1225
- const u = a.key, h = l.focus.key, f = l.getNodes(), d = f.length, g = l.isBackward(), _ = g ? o : s, p = g ? s : o, m = g ? h : u, y = g ? u : h;
1226
- let x = _i, b = !1;
1227
- for (let k = 0; k < d; k++) {
1228
- const v = f[k], F = v.getTextContentSize();
1229
- if (E(v) && F !== 0 && !(k === 0 && v.__key === m && _ === F || k === d - 1 && v.__key === y && p === 0) && (b = !0, x &= v.getFormat(), x === 0)) break;
1225
+ const c = a.key, h = l.focus.key, f = l.getNodes(), d = f.length, g = l.isBackward(), _ = g ? o : s, p = g ? s : o, m = g ? h : c, y = g ? c : h;
1226
+ let x = _i, v = !1;
1227
+ for (let b = 0; b < d; b++) {
1228
+ const S = f[b], F = S.getTextContentSize();
1229
+ if (E(S) && F !== 0 && !(b === 0 && S.__key === m && _ === F || b === d - 1 && S.__key === y && p === 0) && (v = !0, x &= S.getFormat(), x === 0)) break;
1230
1230
  }
1231
- l.format = b ? x : 0;
1231
+ l.format = v ? x : 0;
1232
1232
  }
1233
1233
  }
1234
1234
  w(t, Nn, void 0);
1235
1235
  });
1236
1236
  }
1237
- function Ts(n) {
1237
+ function ks(n) {
1238
1238
  if (!n.getTargetRanges) return null;
1239
1239
  const t = n.getTargetRanges();
1240
1240
  return t.length === 0 ? null : t[0];
@@ -1257,54 +1257,54 @@ function an(n, t) {
1257
1257
  }
1258
1258
  Rn(!0, n, t);
1259
1259
  }
1260
- function ks(n) {
1260
+ function bs(n) {
1261
1261
  let t = n.__lexicalEventHandles;
1262
1262
  return t === void 0 && (t = [], n.__lexicalEventHandles = t), t;
1263
1263
  }
1264
1264
  const At = /* @__PURE__ */ new Map();
1265
- function bs(n) {
1265
+ function vs(n) {
1266
1266
  const t = Ai(n.target);
1267
1267
  if (t === null) return;
1268
1268
  const e = ns(t.anchorNode);
1269
1269
  if (e === null) return;
1270
- bn && (bn = !1, Y(e, () => {
1271
- const a = ae(), c = t.anchorNode;
1272
- (X(c) || dt(c)) && ut(Ge(a, t, e, n));
1270
+ vn && (vn = !1, X(e, () => {
1271
+ const a = ae(), u = t.anchorNode;
1272
+ (Q(u) || ft(u)) && ut(Ge(a, t, e, n));
1273
1273
  }));
1274
1274
  const r = Wn(e), s = r[r.length - 1], i = s._key, o = At.get(i), l = o || s;
1275
- l !== e && Sr(t, l, !1), Sr(t, e, !0), e !== s ? At.set(i, e) : o && At.delete(i);
1275
+ l !== e && Cr(t, l, !1), Cr(t, e, !0), e !== s ? At.set(i, e) : o && At.delete(i);
1276
1276
  }
1277
- function Cr(n) {
1277
+ function Tr(n) {
1278
1278
  n._lexicalHandled = !0;
1279
1279
  }
1280
- function Tr(n) {
1280
+ function kr(n) {
1281
1281
  return n._lexicalHandled === !0;
1282
1282
  }
1283
1283
  function Vi(n) {
1284
1284
  const t = n.ownerDocument, e = Ie.get(t);
1285
- e === void 0 && T(162);
1285
+ e === void 0 && k(162);
1286
1286
  const r = e - 1;
1287
- r >= 0 || T(164), Ie.set(t, r), r === 0 && t.removeEventListener("selectionchange", bs);
1287
+ r >= 0 || k(164), Ie.set(t, r), r === 0 && t.removeEventListener("selectionchange", vs);
1288
1288
  const s = Ke(n);
1289
1289
  Bn(s) ? (function(o) {
1290
1290
  if (o._parentEditor !== null) {
1291
1291
  const l = Wn(o), a = l[l.length - 1]._key;
1292
1292
  At.get(a) === o && At.delete(a);
1293
1293
  } else At.delete(o._key);
1294
- }(s), n.__lexicalEditor = null) : s && T(198);
1295
- const i = ks(n);
1294
+ }(s), n.__lexicalEditor = null) : s && k(198);
1295
+ const i = bs(n);
1296
1296
  for (let o = 0; o < i.length; o++) i[o]();
1297
1297
  n.__lexicalEventHandles = [];
1298
1298
  }
1299
1299
  function wn(n, t, e) {
1300
- G();
1300
+ q();
1301
1301
  const r = n.__key, s = n.getParent();
1302
1302
  if (s === null) return;
1303
1303
  const i = function(l) {
1304
1304
  const a = M();
1305
- if (!P(a) || !S(l)) return a;
1306
- const { anchor: c, focus: u } = a, h = c.getNode(), f = u.getNode();
1307
- return qt(h, l) && c.set(l.__key, 0, "element"), qt(f, l) && u.set(l.__key, 0, "element"), a;
1305
+ if (!P(a) || !C(l)) return a;
1306
+ const { anchor: u, focus: c } = a, h = u.getNode(), f = c.getNode();
1307
+ return qt(h, l) && u.set(l.__key, 0, "element"), qt(f, l) && c.set(l.__key, 0, "element"), a;
1308
1308
  }(n);
1309
1309
  let o = !1;
1310
1310
  if (P(i) && t) {
@@ -1313,16 +1313,16 @@ function wn(n, t, e) {
1313
1313
  } else Hn(i) && t && n.isSelected() && n.selectPrevious();
1314
1314
  if (P(i) && t && !o) {
1315
1315
  const l = n.getIndexWithinParent();
1316
- Nt(n), Ae(i, s, l, -1);
1317
- } else Nt(n);
1318
- e || Ft(s) || s.canBeEmpty() || !s.isEmpty() || wn(s, t), t && Z(s) && s.isEmpty() && s.selectEnd();
1316
+ wt(n), Ae(i, s, l, -1);
1317
+ } else wt(n);
1318
+ e || Ft(s) || s.canBeEmpty() || !s.isEmpty() || wn(s, t), t && Y(s) && s.isEmpty() && s.selectEnd();
1319
1319
  }
1320
1320
  class He {
1321
1321
  static getType() {
1322
- T(64, this.name);
1322
+ k(64, this.name);
1323
1323
  }
1324
1324
  static clone(t) {
1325
- T(65, this.name);
1325
+ k(65, this.name);
1326
1326
  }
1327
1327
  afterCloneFrom(t) {
1328
1328
  this.__parent = t.__parent, this.__next = t.__next, this.__prev = t.__prev;
@@ -1334,7 +1334,7 @@ class He {
1334
1334
  return this.__type;
1335
1335
  }
1336
1336
  isInline() {
1337
- T(137, this.constructor.name);
1337
+ k(137, this.constructor.name);
1338
1338
  }
1339
1339
  isAttached() {
1340
1340
  let t = this.__key;
@@ -1380,20 +1380,20 @@ class He {
1380
1380
  }
1381
1381
  getParentOrThrow() {
1382
1382
  const t = this.getParent();
1383
- return t === null && T(66, this.__key), t;
1383
+ return t === null && k(66, this.__key), t;
1384
1384
  }
1385
1385
  getTopLevelElement() {
1386
1386
  let t = this;
1387
1387
  for (; t !== null; ) {
1388
1388
  const e = t.getParent();
1389
- if (Ft(e)) return S(t) || t === this && I(t) || T(194), t;
1389
+ if (Ft(e)) return C(t) || t === this && I(t) || k(194), t;
1390
1390
  t = e;
1391
1391
  }
1392
1392
  return null;
1393
1393
  }
1394
1394
  getTopLevelElementOrThrow() {
1395
1395
  const t = this.getTopLevelElement();
1396
- return t === null && T(67, this.__key), t;
1396
+ return t === null && k(67, this.__key), t;
1397
1397
  }
1398
1398
  getParents() {
1399
1399
  const t = [];
@@ -1430,7 +1430,7 @@ class He {
1430
1430
  }
1431
1431
  getCommonAncestor(t) {
1432
1432
  const e = this.getParents(), r = t.getParents();
1433
- S(this) && e.unshift(this), S(t) && r.unshift(t);
1433
+ C(this) && e.unshift(this), C(t) && r.unshift(t);
1434
1434
  const s = e.length, i = r.length;
1435
1435
  if (s === 0 || i === 0 || e[s - 1] !== r[i - 1]) return null;
1436
1436
  const o = new Set(r);
@@ -1483,7 +1483,7 @@ class He {
1483
1483
  for (; i !== null; ) {
1484
1484
  const o = i.__key;
1485
1485
  if (s.has(o) || (s.add(o), r.push(i)), i === t) break;
1486
- const l = S(i) ? e ? i.getFirstChild() : i.getLastChild() : null;
1486
+ const l = C(i) ? e ? i.getFirstChild() : i.getLastChild() : null;
1487
1487
  if (l !== null) {
1488
1488
  i = l;
1489
1489
  continue;
@@ -1493,14 +1493,14 @@ class He {
1493
1493
  i = a;
1494
1494
  continue;
1495
1495
  }
1496
- const c = i.getParentOrThrow();
1497
- if (s.has(c.__key) || r.push(c), c === t) break;
1498
- let u = null, h = c;
1496
+ const u = i.getParentOrThrow();
1497
+ if (s.has(u.__key) || r.push(u), u === t) break;
1498
+ let c = null, h = u;
1499
1499
  do {
1500
- if (h === null && T(68), u = e ? h.getNextSibling() : h.getPreviousSibling(), h = h.getParent(), h === null) break;
1501
- u !== null || s.has(h.__key) || r.push(h);
1502
- } while (u === null);
1503
- i = u;
1500
+ if (h === null && k(68), c = e ? h.getNextSibling() : h.getPreviousSibling(), h = h.getParent(), h === null) break;
1501
+ c !== null || s.has(h.__key) || r.push(h);
1502
+ } while (c === null);
1503
+ i = c;
1504
1504
  }
1505
1505
  return e || r.reverse(), r;
1506
1506
  }
@@ -1510,10 +1510,10 @@ class He {
1510
1510
  }
1511
1511
  getLatest() {
1512
1512
  const t = j(this.__key);
1513
- return t === null && T(113), t;
1513
+ return t === null && k(113), t;
1514
1514
  }
1515
1515
  getWritable() {
1516
- G();
1516
+ q();
1517
1517
  const t = Tt(), e = A(), r = t._nodeMap, s = this.__key, i = this.getLatest(), o = e._cloneNotNeeded, l = M();
1518
1518
  if (l !== null && l.setCachedNodes(null), o.has(s)) return Pe(i), i;
1519
1519
  const a = Ri(i);
@@ -1526,10 +1526,10 @@ class He {
1526
1526
  return this.getTextContent().length;
1527
1527
  }
1528
1528
  createDOM(t, e) {
1529
- T(70);
1529
+ k(70);
1530
1530
  }
1531
1531
  updateDOM(t, e, r) {
1532
- T(71);
1532
+ k(71);
1533
1533
  }
1534
1534
  exportDOM(t) {
1535
1535
  return { element: this.createDOM(t._config, t) };
@@ -1538,7 +1538,7 @@ class He {
1538
1538
  return { type: this.__type, version: 1 };
1539
1539
  }
1540
1540
  static importJSON(t) {
1541
- T(18, this.name);
1541
+ k(18, this.name);
1542
1542
  }
1543
1543
  updateFromJSON(t) {
1544
1544
  return this;
@@ -1550,49 +1550,49 @@ class He {
1550
1550
  wn(this, !0, t);
1551
1551
  }
1552
1552
  replace(t, e) {
1553
- G();
1553
+ q();
1554
1554
  let r = M();
1555
1555
  r !== null && (r = r.clone()), sn(this, t);
1556
- const s = this.getLatest(), i = this.__key, o = t.__key, l = t.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
1557
- Nt(l);
1558
- const u = s.getPreviousSibling(), h = s.getNextSibling(), f = s.__prev, d = s.__next, g = s.__parent;
1559
- if (wn(s, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, h === null ? a.__last = o : h.getWritable().__prev = o, l.__next = d, l.__parent = g, a.__size = c, e && (S(this) && S(l) || T(139), this.getChildren().forEach((_) => {
1556
+ const s = this.getLatest(), i = this.__key, o = t.__key, l = t.getWritable(), a = this.getParentOrThrow().getWritable(), u = a.__size;
1557
+ wt(l);
1558
+ const c = s.getPreviousSibling(), h = s.getNextSibling(), f = s.__prev, d = s.__next, g = s.__parent;
1559
+ if (wn(s, !1, !0), c === null ? a.__first = o : c.getWritable().__next = o, l.__prev = f, h === null ? a.__last = o : h.getWritable().__prev = o, l.__next = d, l.__parent = g, a.__size = u, e && (C(this) && C(l) || k(139), this.getChildren().forEach((_) => {
1560
1560
  l.append(_);
1561
1561
  })), P(r)) {
1562
1562
  ut(r);
1563
1563
  const _ = r.anchor, p = r.focus;
1564
1564
  _.key === i && Nr(_, l), p.key === i && Nr(p, l);
1565
1565
  }
1566
- return mt() === i && $(o), l;
1566
+ return yt() === i && $(o), l;
1567
1567
  }
1568
1568
  insertAfter(t, e = !0) {
1569
- G(), sn(this, t);
1569
+ q(), sn(this, t);
1570
1570
  const r = this.getWritable(), s = t.getWritable(), i = s.getParent(), o = M();
1571
1571
  let l = !1, a = !1;
1572
1572
  if (i !== null) {
1573
1573
  const d = t.getIndexWithinParent();
1574
- if (Nt(s), P(o)) {
1574
+ if (wt(s), P(o)) {
1575
1575
  const g = i.__key, _ = o.anchor, p = o.focus;
1576
1576
  l = _.type === "element" && _.key === g && _.offset === d + 1, a = p.type === "element" && p.key === g && p.offset === d + 1;
1577
1577
  }
1578
1578
  }
1579
- const c = this.getNextSibling(), u = this.getParentOrThrow().getWritable(), h = s.__key, f = r.__next;
1580
- if (c === null ? u.__last = h : c.getWritable().__prev = h, u.__size++, r.__next = h, s.__next = f, s.__prev = r.__key, s.__parent = r.__parent, e && P(o)) {
1579
+ const u = this.getNextSibling(), c = this.getParentOrThrow().getWritable(), h = s.__key, f = r.__next;
1580
+ if (u === null ? c.__last = h : u.getWritable().__prev = h, c.__size++, r.__next = h, s.__next = f, s.__prev = r.__key, s.__parent = r.__parent, e && P(o)) {
1581
1581
  const d = this.getIndexWithinParent();
1582
- Ae(o, u, d + 1);
1583
- const g = u.__key;
1582
+ Ae(o, c, d + 1);
1583
+ const g = c.__key;
1584
1584
  l && o.anchor.set(g, d + 2, "element"), a && o.focus.set(g, d + 2, "element");
1585
1585
  }
1586
1586
  return t;
1587
1587
  }
1588
1588
  insertBefore(t, e = !0) {
1589
- G(), sn(this, t);
1589
+ q(), sn(this, t);
1590
1590
  const r = this.getWritable(), s = t.getWritable(), i = s.__key;
1591
- Nt(s);
1592
- const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, c = this.getIndexWithinParent();
1591
+ wt(s);
1592
+ const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, u = this.getIndexWithinParent();
1593
1593
  o === null ? l.__first = i : o.getWritable().__next = i, l.__size++, r.__prev = i, s.__prev = a, s.__next = r.__key, s.__parent = r.__parent;
1594
- const u = M();
1595
- return e && P(u) && Ae(u, this.getParentOrThrow(), c), t;
1594
+ const c = M();
1595
+ return e && P(c) && Ae(c, this.getParentOrThrow(), u), t;
1596
1596
  }
1597
1597
  isParentRequired() {
1598
1598
  return !1;
@@ -1607,10 +1607,10 @@ class He {
1607
1607
  return this.selectNext(0, 0);
1608
1608
  }
1609
1609
  selectPrevious(t, e) {
1610
- G();
1610
+ q();
1611
1611
  const r = this.getPreviousSibling(), s = this.getParentOrThrow();
1612
1612
  if (r === null) return s.select(0, 0);
1613
- if (S(r)) return r.select();
1613
+ if (C(r)) return r.select();
1614
1614
  if (!E(r)) {
1615
1615
  const i = r.getIndexWithinParent() + 1;
1616
1616
  return s.select(i, i);
@@ -1618,10 +1618,10 @@ class He {
1618
1618
  return r.select(t, e);
1619
1619
  }
1620
1620
  selectNext(t, e) {
1621
- G();
1621
+ q();
1622
1622
  const r = this.getNextSibling(), s = this.getParentOrThrow();
1623
1623
  if (r === null) return s.select();
1624
- if (S(r)) return r.select(0, 0);
1624
+ if (C(r)) return r.select(0, 0);
1625
1625
  if (!E(r)) {
1626
1626
  const i = r.getIndexWithinParent();
1627
1627
  return s.select(i, i);
@@ -1691,12 +1691,12 @@ function Bt(n) {
1691
1691
  return n instanceof oe;
1692
1692
  }
1693
1693
  function pe(n) {
1694
- return dt(n) && /^( |\t|\r?\n)+$/.test(n.textContent || "");
1694
+ return ft(n) && /^( |\t|\r?\n)+$/.test(n.textContent || "");
1695
1695
  }
1696
- function cn(n, t) {
1696
+ function un(n, t) {
1697
1697
  return 16 & t ? "code" : t & Fn ? "mark" : 32 & t ? "sub" : 64 & t ? "sup" : null;
1698
1698
  }
1699
- function un(n, t) {
1699
+ function cn(n, t) {
1700
1700
  return 1 & t ? "strong" : 2 & t ? "em" : "span";
1701
1701
  }
1702
1702
  function ws(n, t, e, r, s) {
@@ -1704,17 +1704,17 @@ function ws(n, t, e, r, s) {
1704
1704
  let o = It(s, "base");
1705
1705
  o !== void 0 && i.add(...o), o = It(s, "underlineStrikethrough");
1706
1706
  let l = !1;
1707
- const a = t & we && t & be;
1708
- o !== void 0 && (e & we && e & be ? (l = !0, a || i.add(...o)) : a && i.remove(...o));
1709
- for (const c in V) {
1710
- const u = V[c];
1711
- if (o = It(s, c), o !== void 0) if (e & u) {
1712
- if (l && (c === "underline" || c === "strikethrough")) {
1713
- t & u && i.remove(...o);
1707
+ const a = t & we && t & ve;
1708
+ o !== void 0 && (e & we && e & ve ? (l = !0, a || i.add(...o)) : a && i.remove(...o));
1709
+ for (const u in Et) {
1710
+ const c = Et[u];
1711
+ if (o = It(s, u), o !== void 0) if (e & c) {
1712
+ if (l && (u === "underline" || u === "strikethrough")) {
1713
+ t & c && i.remove(...o);
1714
1714
  continue;
1715
1715
  }
1716
- t & u && (!a || c !== "underline") && c !== "strikethrough" || i.add(...o);
1717
- } else t & u && i.remove(...o);
1716
+ t & c && (!a || u !== "underline") && u !== "strikethrough" || i.add(...o);
1717
+ } else t & c && i.remove(...o);
1718
1718
  }
1719
1719
  }
1720
1720
  function Ns(n, t, e) {
@@ -1722,19 +1722,19 @@ function Ns(n, t, e) {
1722
1722
  if (r == null) t.textContent = i;
1723
1723
  else {
1724
1724
  const o = r.nodeValue;
1725
- if (o !== i) if (s || vt) {
1726
- const [l, a, c] = function(u, h) {
1727
- const f = u.length, d = h.length;
1725
+ if (o !== i) if (s || xt) {
1726
+ const [l, a, u] = function(c, h) {
1727
+ const f = c.length, d = h.length;
1728
1728
  let g = 0, _ = 0;
1729
- for (; g < f && g < d && u[g] === h[g]; ) g++;
1730
- for (; _ + g < f && _ + g < d && u[f - _ - 1] === h[d - _ - 1]; ) _++;
1729
+ for (; g < f && g < d && c[g] === h[g]; ) g++;
1730
+ for (; _ + g < f && _ + g < d && c[f - _ - 1] === h[d - _ - 1]; ) _++;
1731
1731
  return [g, f - g - _, h.slice(g, d - _)];
1732
1732
  }(o, i);
1733
- a !== 0 && r.deleteData(l, a), r.insertData(l, c);
1733
+ a !== 0 && r.deleteData(l, a), r.insertData(l, u);
1734
1734
  } else r.nodeValue = i;
1735
1735
  }
1736
1736
  }
1737
- function kr(n, t, e, r, s, i) {
1737
+ function br(n, t, e, r, s, i) {
1738
1738
  Ns(s, n, t);
1739
1739
  const o = i.theme.text;
1740
1740
  o !== void 0 && ws(0, 0, r, n, o);
@@ -1764,7 +1764,7 @@ class Wt extends He {
1764
1764
  }
1765
1765
  getMode() {
1766
1766
  const t = this.getLatest();
1767
- return Ci[t.__mode];
1767
+ return Ti[t.__mode];
1768
1768
  }
1769
1769
  getStyle() {
1770
1770
  return this.getLatest().__style;
@@ -1773,7 +1773,7 @@ class Wt extends He {
1773
1773
  return this.getLatest().__mode === 1;
1774
1774
  }
1775
1775
  isComposing() {
1776
- return this.__key === mt();
1776
+ return this.__key === yt();
1777
1777
  }
1778
1778
  isSegmented() {
1779
1779
  return this.getLatest().__mode === 2;
@@ -1785,7 +1785,7 @@ class Wt extends He {
1785
1785
  return !!(2 & this.getLatest().__detail);
1786
1786
  }
1787
1787
  hasFormat(t) {
1788
- const e = V[t];
1788
+ const e = Et[t];
1789
1789
  return !!(this.getFormat() & e);
1790
1790
  }
1791
1791
  isSimpleText() {
@@ -1801,30 +1801,30 @@ class Wt extends He {
1801
1801
  return !0;
1802
1802
  }
1803
1803
  createDOM(t, e) {
1804
- const r = this.__format, s = cn(0, r), i = un(0, r), o = s === null ? i : s, l = document.createElement(o);
1804
+ const r = this.__format, s = un(0, r), i = cn(0, r), o = s === null ? i : s, l = document.createElement(o);
1805
1805
  let a = l;
1806
- this.hasFormat("code") && l.setAttribute("spellcheck", "false"), s !== null && (a = document.createElement(i), l.appendChild(a)), kr(a, this, 0, r, this.__text, t);
1807
- const c = this.__style;
1808
- return c !== "" && (l.style.cssText = c), l;
1806
+ this.hasFormat("code") && l.setAttribute("spellcheck", "false"), s !== null && (a = document.createElement(i), l.appendChild(a)), br(a, this, 0, r, this.__text, t);
1807
+ const u = this.__style;
1808
+ return u !== "" && (l.style.cssText = u), l;
1809
1809
  }
1810
1810
  updateDOM(t, e, r) {
1811
- const s = this.__text, i = t.__format, o = this.__format, l = cn(0, i), a = cn(0, o), c = un(0, i), u = un(0, o);
1812
- if ((l === null ? c : l) !== (a === null ? u : a)) return !0;
1813
- if (l === a && c !== u) {
1811
+ const s = this.__text, i = t.__format, o = this.__format, l = un(0, i), a = un(0, o), u = cn(0, i), c = cn(0, o);
1812
+ if ((l === null ? u : l) !== (a === null ? c : a)) return !0;
1813
+ if (l === a && u !== c) {
1814
1814
  const _ = e.firstChild;
1815
- _ == null && T(48);
1816
- const p = document.createElement(u);
1817
- return kr(p, this, 0, o, s, r), e.replaceChild(p, _), !1;
1815
+ _ == null && k(48);
1816
+ const p = document.createElement(c);
1817
+ return br(p, this, 0, o, s, r), e.replaceChild(p, _), !1;
1818
1818
  }
1819
1819
  let h = e;
1820
- a !== null && l !== null && (h = e.firstChild, h == null && T(49)), Ns(s, h, this);
1820
+ a !== null && l !== null && (h = e.firstChild, h == null && k(49)), Ns(s, h, this);
1821
1821
  const f = r.theme.text;
1822
1822
  f !== void 0 && i !== o && ws(0, i, o, h, f);
1823
1823
  const d = t.__style, g = this.__style;
1824
1824
  return d !== g && (e.style.cssText = g), !1;
1825
1825
  }
1826
1826
  static importDOM() {
1827
- return { "#text": () => ({ conversion: Xi, priority: 0 }), b: () => ({ conversion: Gi, priority: 0 }), code: () => ({ conversion: _t, priority: 0 }), em: () => ({ conversion: _t, priority: 0 }), i: () => ({ conversion: _t, priority: 0 }), s: () => ({ conversion: _t, priority: 0 }), span: () => ({ conversion: qi, priority: 0 }), strong: () => ({ conversion: _t, priority: 0 }), sub: () => ({ conversion: _t, priority: 0 }), sup: () => ({ conversion: _t, priority: 0 }), u: () => ({ conversion: _t, priority: 0 }) };
1827
+ return { "#text": () => ({ conversion: Xi, priority: 0 }), b: () => ({ conversion: Gi, priority: 0 }), code: () => ({ conversion: gt, priority: 0 }), em: () => ({ conversion: gt, priority: 0 }), i: () => ({ conversion: gt, priority: 0 }), s: () => ({ conversion: gt, priority: 0 }), span: () => ({ conversion: qi, priority: 0 }), strong: () => ({ conversion: gt, priority: 0 }), sub: () => ({ conversion: gt, priority: 0 }), sup: () => ({ conversion: gt, priority: 0 }), u: () => ({ conversion: gt, priority: 0 }) };
1828
1828
  }
1829
1829
  static importJSON(t) {
1830
1830
  return U().updateFromJSON(t);
@@ -1834,7 +1834,7 @@ class Wt extends He {
1834
1834
  }
1835
1835
  exportDOM(t) {
1836
1836
  let { element: e } = super.exportDOM(t);
1837
- return X(e) || T(132), e.style.whiteSpace = "pre-wrap", this.hasFormat("bold") && (e = ye(e, "b")), this.hasFormat("italic") && (e = ye(e, "i")), this.hasFormat("strikethrough") && (e = ye(e, "s")), this.hasFormat("underline") && (e = ye(e, "u")), { element: e };
1837
+ return Q(e) || k(132), e.style.whiteSpace = "pre-wrap", this.hasFormat("bold") && (e = ye(e, "b")), this.hasFormat("italic") && (e = ye(e, "i")), this.hasFormat("strikethrough") && (e = ye(e, "s")), this.hasFormat("underline") && (e = ye(e, "u")), { element: e };
1838
1838
  }
1839
1839
  exportJSON() {
1840
1840
  return { detail: this.getDetail(), format: this.getFormat(), mode: this.getMode(), style: this.getStyle(), text: this.getTextContent(), ...super.exportJSON() };
@@ -1843,7 +1843,7 @@ class Wt extends He {
1843
1843
  }
1844
1844
  setFormat(t) {
1845
1845
  const e = this.getWritable();
1846
- return e.__format = typeof t == "string" ? V[t] : t, e;
1846
+ return e.__format = typeof t == "string" ? Et[t] : t, e;
1847
1847
  }
1848
1848
  setDetail(t) {
1849
1849
  const e = this.getWritable();
@@ -1866,7 +1866,7 @@ class Wt extends He {
1866
1866
  return t.__detail ^= 2, t;
1867
1867
  }
1868
1868
  setMode(t) {
1869
- const e = Si[t];
1869
+ const e = Ci[t];
1870
1870
  if (this.__mode === e) return this;
1871
1871
  const r = this.getWritable();
1872
1872
  return r.__mode = e, r;
@@ -1877,7 +1877,7 @@ class Wt extends He {
1877
1877
  return e.__text = t, e;
1878
1878
  }
1879
1879
  select(t, e) {
1880
- G();
1880
+ q();
1881
1881
  let r = t, s = e;
1882
1882
  const i = M(), o = this.getTextContent(), l = this.__key;
1883
1883
  if (typeof o == "string") {
@@ -1886,7 +1886,7 @@ class Wt extends He {
1886
1886
  } else r = 0, s = 0;
1887
1887
  if (!P(i)) return Ps(l, r, l, s, "text", "text");
1888
1888
  {
1889
- const a = mt();
1889
+ const a = yt();
1890
1890
  a !== i.anchor.key && a !== i.focus.key || $(l), i.setTextNodeRange(this, r, this, s);
1891
1891
  }
1892
1892
  return i;
@@ -1902,13 +1902,13 @@ class Wt extends He {
1902
1902
  const i = this.getWritable(), o = i.__text, l = r.length;
1903
1903
  let a = t;
1904
1904
  a < 0 && (a = l + a, a < 0 && (a = 0));
1905
- const c = M();
1906
- if (s && P(c)) {
1905
+ const u = M();
1906
+ if (s && P(u)) {
1907
1907
  const h = t + l;
1908
- c.setTextNodeRange(i, h, i, h);
1908
+ u.setTextNodeRange(i, h, i, h);
1909
1909
  }
1910
- const u = o.slice(0, a) + r + o.slice(a + e);
1911
- return i.__text = u, i;
1910
+ const c = o.slice(0, a) + r + o.slice(a + e);
1911
+ return i.__text = c, i;
1912
1912
  }
1913
1913
  canInsertTextBefore() {
1914
1914
  return !0;
@@ -1917,13 +1917,13 @@ class Wt extends He {
1917
1917
  return !0;
1918
1918
  }
1919
1919
  splitText(...t) {
1920
- G();
1921
- const e = this.getLatest(), r = e.getTextContent(), s = e.__key, i = mt(), o = new Set(t), l = [], a = r.length;
1922
- let c = "";
1923
- for (let k = 0; k < a; k++) c !== "" && o.has(k) && (l.push(c), c = ""), c += r[k];
1924
- c !== "" && l.push(c);
1925
- const u = l.length;
1926
- if (u === 0) return [];
1920
+ q();
1921
+ const e = this.getLatest(), r = e.getTextContent(), s = e.__key, i = yt(), o = new Set(t), l = [], a = r.length;
1922
+ let u = "";
1923
+ for (let b = 0; b < a; b++) u !== "" && o.has(b) && (l.push(u), u = ""), u += r[b];
1924
+ u !== "" && l.push(u);
1925
+ const c = l.length;
1926
+ if (c === 0) return [];
1927
1927
  if (l[0] === r) return [e];
1928
1928
  const h = l[0], f = e.getParent();
1929
1929
  let d;
@@ -1931,41 +1931,41 @@ class Wt extends He {
1931
1931
  let m = !1;
1932
1932
  e.isSegmented() ? (d = U(h), d.__format = g, d.__style = _, d.__detail = p, m = !0) : (d = e.getWritable(), d.__text = h);
1933
1933
  const y = M(), x = [d];
1934
- let b = h.length;
1935
- for (let k = 1; k < u; k++) {
1936
- const v = l[k], F = v.length, C = U(v).getWritable();
1937
- C.__format = g, C.__style = _, C.__detail = p;
1938
- const N = C.__key, O = b + F;
1934
+ let v = h.length;
1935
+ for (let b = 1; b < c; b++) {
1936
+ const S = l[b], F = S.length, T = U(S).getWritable();
1937
+ T.__format = g, T.__style = _, T.__detail = p;
1938
+ const N = T.__key, O = v + F;
1939
1939
  if (P(y)) {
1940
1940
  const D = y.anchor, B = y.focus;
1941
- D.key === s && D.type === "text" && D.offset > b && D.offset <= O && (D.key = N, D.offset -= b, y.dirty = !0), B.key === s && B.type === "text" && B.offset > b && B.offset <= O && (B.key = N, B.offset -= b, y.dirty = !0);
1941
+ D.key === s && D.type === "text" && D.offset > v && D.offset <= O && (D.key = N, D.offset -= v, y.dirty = !0), B.key === s && B.type === "text" && B.offset > v && B.offset <= O && (B.key = N, B.offset -= v, y.dirty = !0);
1942
1942
  }
1943
- i === s && $(N), b = O, x.push(C);
1943
+ i === s && $(N), v = O, x.push(T);
1944
1944
  }
1945
1945
  if (f !== null) {
1946
1946
  (function(F) {
1947
- const C = F.getPreviousSibling(), N = F.getNextSibling();
1948
- C !== null && Pe(C), N !== null && Pe(N);
1947
+ const T = F.getPreviousSibling(), N = F.getNextSibling();
1948
+ T !== null && Pe(T), N !== null && Pe(N);
1949
1949
  })(this);
1950
- const k = f.getWritable(), v = this.getIndexWithinParent();
1951
- m ? (k.splice(v, 0, x), this.remove()) : k.splice(v, 1, x), P(y) && Ae(y, f, v, u - 1);
1950
+ const b = f.getWritable(), S = this.getIndexWithinParent();
1951
+ m ? (b.splice(S, 0, x), this.remove()) : b.splice(S, 1, x), P(y) && Ae(y, f, S, c - 1);
1952
1952
  }
1953
1953
  return x;
1954
1954
  }
1955
1955
  mergeWithSibling(t) {
1956
1956
  const e = t === this.getPreviousSibling();
1957
- e || t === this.getNextSibling() || T(50);
1957
+ e || t === this.getNextSibling() || k(50);
1958
1958
  const r = this.__key, s = t.__key, i = this.__text, o = i.length;
1959
- mt() === s && $(r);
1959
+ yt() === s && $(r);
1960
1960
  const l = M();
1961
1961
  if (P(l)) {
1962
1962
  const h = l.anchor, f = l.focus;
1963
1963
  h !== null && h.key === s && (Ir(h, e, r, t, o), l.dirty = !0), f !== null && f.key === s && (Ir(f, e, r, t, o), l.dirty = !0);
1964
1964
  }
1965
- const a = t.__text, c = e ? a + i : i + a;
1966
- this.setTextContent(c);
1967
- const u = this.getWritable();
1968
- return t.remove(), u;
1965
+ const a = t.__text, u = e ? a + i : i + a;
1966
+ this.setTextContent(u);
1967
+ const c = this.getWritable();
1968
+ return t.remove(), c;
1969
1969
  }
1970
1970
  isTextEntity() {
1971
1971
  return !1;
@@ -1978,23 +1978,23 @@ function Gi(n) {
1978
1978
  const t = n, e = t.style.fontWeight === "normal";
1979
1979
  return { forChild: jn(t.style, e ? void 0 : "bold"), node: null };
1980
1980
  }
1981
- const br = /* @__PURE__ */ new WeakMap();
1981
+ const vr = /* @__PURE__ */ new WeakMap();
1982
1982
  function Qi(n) {
1983
- if (!X(n)) return !1;
1983
+ if (!Q(n)) return !1;
1984
1984
  if (n.nodeName === "PRE") return !0;
1985
1985
  const t = n.style.whiteSpace;
1986
1986
  return typeof t == "string" && t.startsWith("pre");
1987
1987
  }
1988
1988
  function Xi(n) {
1989
1989
  const t = n;
1990
- n.parentElement === null && T(129);
1990
+ n.parentElement === null && k(129);
1991
1991
  let e = t.textContent || "";
1992
1992
  if (function(r) {
1993
1993
  let s, i = r.parentNode;
1994
1994
  const o = [r];
1995
- for (; i !== null && (s = br.get(i)) === void 0 && !Qi(i); ) o.push(i), i = i.parentNode;
1995
+ for (; i !== null && (s = vr.get(i)) === void 0 && !Qi(i); ) o.push(i), i = i.parentNode;
1996
1996
  const l = s === void 0 ? i : s;
1997
- for (let a = 0; a < o.length; a++) br.set(o[a], l);
1997
+ for (let a = 0; a < o.length; a++) vr.set(o[a], l);
1998
1998
  return l;
1999
1999
  }(t) !== null) {
2000
2000
  const r = e.split(/(\r?\n|\t)/), s = [], i = r.length;
@@ -2038,18 +2038,18 @@ function wr(n, t) {
2038
2038
  if (i === null) return null;
2039
2039
  e = i;
2040
2040
  }
2041
- if (e = r, X(e)) {
2041
+ if (e = r, Q(e)) {
2042
2042
  const i = e.style.display;
2043
2043
  if (i === "" && !zi(e) || i !== "" && !i.startsWith("inline")) return null;
2044
2044
  }
2045
2045
  let s = e;
2046
2046
  for (; (s = t ? e.firstChild : e.lastChild) !== null; ) e = s;
2047
- if (dt(e)) return e;
2047
+ if (ft(e)) return e;
2048
2048
  if (e.nodeName === "BR") return null;
2049
2049
  }
2050
2050
  }
2051
2051
  const Yi = { code: "code", em: "italic", i: "italic", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
2052
- function _t(n) {
2052
+ function gt(n) {
2053
2053
  const t = Yi[n.nodeName.toLowerCase()];
2054
2054
  return t === void 0 ? { node: null } : { forChild: jn(n.style, t), node: null };
2055
2055
  }
@@ -2061,7 +2061,7 @@ function E(n) {
2061
2061
  }
2062
2062
  function jn(n, t) {
2063
2063
  const e = n.fontWeight, r = n.textDecoration.split(" "), s = e === "700" || e === "bold", i = r.includes("line-through"), o = n.fontStyle === "italic", l = r.includes("underline"), a = n.verticalAlign;
2064
- return (c) => (E(c) && (s && !c.hasFormat("bold") && c.toggleFormat("bold"), i && !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"), t && !c.hasFormat(t) && c.toggleFormat(t)), c);
2064
+ return (u) => (E(u) && (s && !u.hasFormat("bold") && u.toggleFormat("bold"), i && !u.hasFormat("strikethrough") && u.toggleFormat("strikethrough"), o && !u.hasFormat("italic") && u.toggleFormat("italic"), l && !u.hasFormat("underline") && u.toggleFormat("underline"), a !== "sub" || u.hasFormat("subscript") || u.toggleFormat("subscript"), a !== "super" || u.hasFormat("superscript") || u.toggleFormat("superscript"), t && !u.hasFormat(t) && u.toggleFormat(t)), u);
2065
2065
  }
2066
2066
  class le extends Wt {
2067
2067
  static getType() {
@@ -2084,13 +2084,13 @@ class le extends Wt {
2084
2084
  return Vn().updateFromJSON(t);
2085
2085
  }
2086
2086
  setTextContent(t) {
2087
- return t !== " " && t !== "" && T(126), super.setTextContent(t);
2087
+ return t !== " " && t !== "" && k(126), super.setTextContent(t);
2088
2088
  }
2089
2089
  setDetail(t) {
2090
- return t !== 2 && T(127), this;
2090
+ return t !== 2 && k(127), this;
2091
2091
  }
2092
2092
  setMode(t) {
2093
- return t === "normal" && T(128), this;
2093
+ return t === "normal" && k(128), this;
2094
2094
  }
2095
2095
  canInsertTextBefore() {
2096
2096
  return !1;
@@ -2115,11 +2115,11 @@ class to {
2115
2115
  isBefore(t) {
2116
2116
  let e = this.getNode(), r = t.getNode();
2117
2117
  const s = this.offset, i = t.offset;
2118
- if (S(e)) {
2118
+ if (C(e)) {
2119
2119
  const o = e.getDescendantByIndex(s);
2120
2120
  e = o ?? e;
2121
2121
  }
2122
- if (S(r)) {
2122
+ if (C(r)) {
2123
2123
  const o = r.getDescendantByIndex(i);
2124
2124
  r = o ?? r;
2125
2125
  }
@@ -2127,14 +2127,14 @@ class to {
2127
2127
  }
2128
2128
  getNode() {
2129
2129
  const t = j(this.key);
2130
- return t === null && T(20), t;
2130
+ return t === null && k(20), t;
2131
2131
  }
2132
2132
  set(t, e, r) {
2133
2133
  const s = this._selection, i = this.key;
2134
- this.key = t, this.offset = e, this.type = r, ce() || (mt() === i && $(t), s !== null && (s.setCachedNodes(null), s.dirty = !0));
2134
+ this.key = t, this.offset = e, this.type = r, ue() || (yt() === i && $(t), s !== null && (s.setCachedNodes(null), s.dirty = !0));
2135
2135
  }
2136
2136
  }
2137
- function ot(n, t, e) {
2137
+ function it(n, t, e) {
2138
2138
  return new to(n, t, e);
2139
2139
  }
2140
2140
  function fn(n, t) {
@@ -2143,7 +2143,7 @@ function fn(n, t) {
2143
2143
  s = "text";
2144
2144
  const i = t.getTextContentSize();
2145
2145
  r > i && (r = i);
2146
- } else if (!S(t)) {
2146
+ } else if (!C(t)) {
2147
2147
  const i = t.getNextSibling();
2148
2148
  if (E(i)) e = i.__key, r = 0, s = "text";
2149
2149
  else {
@@ -2154,12 +2154,12 @@ function fn(n, t) {
2154
2154
  n.set(e, r, s);
2155
2155
  }
2156
2156
  function Nr(n, t) {
2157
- if (S(t)) {
2157
+ if (C(t)) {
2158
2158
  const e = t.getLastDescendant();
2159
- S(e) || E(e) ? fn(n, e) : fn(n, t);
2159
+ C(e) || E(e) ? fn(n, e) : fn(n, t);
2160
2160
  } else fn(n, t);
2161
2161
  }
2162
- function yt(n, t, e, r) {
2162
+ function pt(n, t, e, r) {
2163
2163
  n.key = t, n.offset = e, n.type = r;
2164
2164
  }
2165
2165
  class qe {
@@ -2227,7 +2227,7 @@ class qe {
2227
2227
  const i = j(s);
2228
2228
  i !== null && r.push(i);
2229
2229
  }
2230
- return ce() || (this._cachedNodes = r), r;
2230
+ return ue() || (this._cachedNodes = r), r;
2231
2231
  }
2232
2232
  getTextContent() {
2233
2233
  const t = this.getNodes();
@@ -2260,51 +2260,51 @@ class Ot {
2260
2260
  if (t !== null) return t;
2261
2261
  const e = this.anchor, r = this.focus, s = e.isBefore(r), i = s ? e : r, o = s ? r : e;
2262
2262
  let l = i.getNode(), a = o.getNode();
2263
- const c = S(l) && i.offset > 0 && i.offset >= l.getChildrenSize(), u = i.offset, h = o.offset;
2264
- if (S(l)) {
2265
- const d = l.getDescendantByIndex(u);
2263
+ const u = C(l) && i.offset > 0 && i.offset >= l.getChildrenSize(), c = i.offset, h = o.offset;
2264
+ if (C(l)) {
2265
+ const d = l.getDescendantByIndex(c);
2266
2266
  l = d ?? l;
2267
2267
  }
2268
- if (S(a)) {
2268
+ if (C(a)) {
2269
2269
  let d = a.getDescendantByIndex(h);
2270
2270
  d !== null && d !== l && a.getChildAtIndex(h) === d && (d = d.getPreviousSibling()), a = d ?? a;
2271
2271
  }
2272
2272
  let f;
2273
- if (l.is(a)) f = S(l) && l.getChildrenSize() > 0 ? [] : [l];
2274
- else if (f = l.getNodesBetween(a), c) {
2273
+ if (l.is(a)) f = C(l) && l.getChildrenSize() > 0 ? [] : [l];
2274
+ else if (f = l.getNodesBetween(a), u) {
2275
2275
  const d = f.findIndex((g) => !g.is(l) && !g.isBefore(l));
2276
2276
  f.splice(0, d);
2277
2277
  }
2278
- return ce() || (this._cachedNodes = f), f;
2278
+ return ue() || (this._cachedNodes = f), f;
2279
2279
  }
2280
2280
  setTextNodeRange(t, e, r, s) {
2281
- yt(this.anchor, t.__key, e, "text"), yt(this.focus, r.__key, s, "text"), this._cachedNodes = null, this.dirty = !0;
2281
+ pt(this.anchor, t.__key, e, "text"), pt(this.focus, r.__key, s, "text"), this._cachedNodes = null, this.dirty = !0;
2282
2282
  }
2283
2283
  getTextContent() {
2284
2284
  const t = this.getNodes();
2285
2285
  if (t.length === 0) return "";
2286
2286
  const e = t[0], r = t[t.length - 1], s = this.anchor, i = this.focus, o = s.isBefore(i), [l, a] = Fr(this);
2287
- let c = "", u = !0;
2287
+ let u = "", c = !0;
2288
2288
  for (let h = 0; h < t.length; h++) {
2289
2289
  const f = t[h];
2290
- if (S(f) && !f.isInline()) u || (c += `
2291
- `), u = !f.isEmpty();
2292
- else if (u = !1, E(f)) {
2290
+ if (C(f) && !f.isInline()) c || (u += `
2291
+ `), c = !f.isEmpty();
2292
+ else if (c = !1, E(f)) {
2293
2293
  let d = f.getTextContent();
2294
- f === e ? f === r ? s.type === "element" && i.type === "element" && i.offset !== s.offset || (d = l < a ? d.slice(l, a) : d.slice(a, l)) : d = o ? d.slice(l) : d.slice(a) : f === r && (d = o ? d.slice(0, a) : d.slice(0, l)), c += d;
2295
- } else !I(f) && !Bt(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
2294
+ f === e ? f === r ? s.type === "element" && i.type === "element" && i.offset !== s.offset || (d = l < a ? d.slice(l, a) : d.slice(a, l)) : d = o ? d.slice(l) : d.slice(a) : f === r && (d = o ? d.slice(0, a) : d.slice(0, l)), u += d;
2295
+ } else !I(f) && !Bt(f) || f === r && this.isCollapsed() || (u += f.getTextContent());
2296
2296
  }
2297
- return c;
2297
+ return u;
2298
2298
  }
2299
2299
  applyDOMRange(t) {
2300
2300
  const e = A(), r = e.getEditorState()._selection, s = Fs(t.startContainer, t.startOffset, t.endContainer, t.endOffset, e, r);
2301
2301
  if (s === null) return;
2302
2302
  const [i, o] = s;
2303
- yt(this.anchor, i.key, i.offset, i.type), yt(this.focus, o.key, o.offset, o.type), this._cachedNodes = null;
2303
+ pt(this.anchor, i.key, i.offset, i.type), pt(this.focus, o.key, o.offset, o.type), this._cachedNodes = null;
2304
2304
  }
2305
2305
  clone() {
2306
2306
  const t = this.anchor, e = this.focus;
2307
- return new Ot(ot(t.key, t.offset, t.type), ot(e.key, e.offset, e.type), this.format, this.style);
2307
+ return new Ot(it(t.key, t.offset, t.type), it(e.key, e.offset, e.type), this.format, this.style);
2308
2308
  }
2309
2309
  toggleFormat(t) {
2310
2310
  this.format = Fe(this.format, t, null), this.dirty = !0;
@@ -2313,7 +2313,7 @@ class Ot {
2313
2313
  this.style = t, this.dirty = !0;
2314
2314
  }
2315
2315
  hasFormat(t) {
2316
- const e = V[t];
2316
+ const e = Et[t];
2317
2317
  return !!(this.format & e);
2318
2318
  }
2319
2319
  insertRawText(t) {
@@ -2330,17 +2330,17 @@ class Ot {
2330
2330
  const e = this.anchor, r = this.focus, s = this.format, i = this.style;
2331
2331
  let o = e, l = r;
2332
2332
  !this.isCollapsed() && r.isBefore(e) && (o = r, l = e), o.type === "element" && function(p, m, y, x) {
2333
- const b = p.getNode(), k = b.getChildAtIndex(p.offset), v = U(), F = Z(b) ? St().append(v) : v;
2334
- v.setFormat(y), v.setStyle(x), k === null ? b.append(F) : k.insertBefore(F), p.is(m) && m.set(v.__key, 0, "text"), p.set(v.__key, 0, "text");
2333
+ const v = p.getNode(), b = v.getChildAtIndex(p.offset), S = U(), F = Y(v) ? St().append(S) : S;
2334
+ S.setFormat(y), S.setStyle(x), b === null ? v.append(F) : b.insertBefore(F), p.is(m) && m.set(S.__key, 0, "text"), p.set(S.__key, 0, "text");
2335
2335
  }(o, l, s, i);
2336
2336
  const a = o.offset;
2337
- let c = l.offset;
2338
- const u = this.getNodes(), h = u.length;
2339
- let f = u[0];
2340
- E(f) || T(26);
2337
+ let u = l.offset;
2338
+ const c = this.getNodes(), h = c.length;
2339
+ let f = c[0];
2340
+ E(f) || k(26);
2341
2341
  const d = f.getTextContent().length, g = f.getParentOrThrow();
2342
- let _ = u[h - 1];
2343
- if (h === 1 && l.type === "element" && (c = d, l.set(o.key, c, "text")), this.isCollapsed() && a === d && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !g.canInsertTextAfter() && f.getNextSibling() === null)) {
2342
+ let _ = c[h - 1];
2343
+ if (h === 1 && l.type === "element" && (u = d, l.set(o.key, u, "text")), this.isCollapsed() && a === d && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !g.canInsertTextAfter() && f.getNextSibling() === null)) {
2344
2344
  let p = f.getNextSibling();
2345
2345
  if (E(p) && p.canInsertTextBefore() && !bt(p) || (p = U(), p.setFormat(s), p.setStyle(i), g.canInsertTextAfter() ? f.insertAfter(p) : g.insertAfter(p)), p.select(0, 0), f = p, t !== "") return void this.insertText(t);
2346
2346
  } else if (this.isCollapsed() && a === 0 && (f.isSegmented() || f.isToken() || !f.canInsertTextBefore() || !g.canInsertTextBefore() && f.getPreviousSibling() === null)) {
@@ -2351,7 +2351,7 @@ class Ot {
2351
2351
  p.setFormat(s), f.replace(p), f = p;
2352
2352
  } else if (!this.isCollapsed() && t !== "") {
2353
2353
  const p = _.getParent();
2354
- if (!g.canInsertTextBefore() || !g.canInsertTextAfter() || S(p) && (!p.canInsertTextBefore() || !p.canInsertTextAfter())) return this.insertText(""), Es(this.anchor, this.focus, null), void this.insertText(t);
2354
+ if (!g.canInsertTextBefore() || !g.canInsertTextAfter() || C(p) && (!p.canInsertTextBefore() || !p.canInsertTextAfter())) return this.insertText(""), Es(this.anchor, this.focus, null), void this.insertText(t);
2355
2355
  }
2356
2356
  if (h === 1) {
2357
2357
  if (f.isToken()) {
@@ -2359,7 +2359,7 @@ class Ot {
2359
2359
  return x.select(), void f.replace(x);
2360
2360
  }
2361
2361
  const p = f.getFormat(), m = f.getStyle();
2362
- if (a !== c || p === s && m === i) {
2362
+ if (a !== u || p === s && m === i) {
2363
2363
  if (Zi(f)) {
2364
2364
  const x = U(t);
2365
2365
  return x.setFormat(s), x.setStyle(i), x.select(), void f.replace(x);
@@ -2369,53 +2369,53 @@ class Ot {
2369
2369
  const x = U(t);
2370
2370
  if (x.setFormat(s), x.setStyle(i), x.select(), a === 0) f.insertBefore(x, !1);
2371
2371
  else {
2372
- const [b] = f.splitText(a);
2373
- b.insertAfter(x, !1);
2372
+ const [v] = f.splitText(a);
2373
+ v.insertAfter(x, !1);
2374
2374
  }
2375
2375
  return void (x.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= t.length));
2376
2376
  }
2377
2377
  f.setFormat(s), f.setStyle(i);
2378
2378
  }
2379
- const y = c - a;
2379
+ const y = u - a;
2380
2380
  f = f.spliceText(a, y, t, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= t.length : (this.format = p, this.style = m));
2381
2381
  } else {
2382
- const p = /* @__PURE__ */ new Set([...f.getParentKeys(), ..._.getParentKeys()]), m = S(f) ? f : f.getParentOrThrow();
2383
- let y = S(_) ? _ : _.getParentOrThrow(), x = _;
2382
+ const p = /* @__PURE__ */ new Set([...f.getParentKeys(), ..._.getParentKeys()]), m = C(f) ? f : f.getParentOrThrow();
2383
+ let y = C(_) ? _ : _.getParentOrThrow(), x = _;
2384
2384
  if (!m.is(y) && y.isInline()) do
2385
2385
  x = y, y = y.getParentOrThrow();
2386
2386
  while (y.isInline());
2387
- if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c) if (E(_) && !_.isToken() && c !== _.getTextContentSize()) {
2387
+ if (l.type === "text" && (u !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < u) if (E(_) && !_.isToken() && u !== _.getTextContentSize()) {
2388
2388
  if (_.isSegmented()) {
2389
- const C = U(_.getTextContent());
2390
- _.replace(C), _ = C;
2389
+ const T = U(_.getTextContent());
2390
+ _.replace(T), _ = T;
2391
2391
  }
2392
- Z(l.getNode()) || l.type !== "text" || (_ = _.spliceText(0, c, "")), p.add(_.__key);
2392
+ Y(l.getNode()) || l.type !== "text" || (_ = _.spliceText(0, u, "")), p.add(_.__key);
2393
2393
  } else {
2394
- const C = _.getParentOrThrow();
2395
- C.canBeEmpty() || C.getChildrenSize() !== 1 ? _.remove() : C.remove();
2394
+ const T = _.getParentOrThrow();
2395
+ T.canBeEmpty() || T.getChildrenSize() !== 1 ? _.remove() : T.remove();
2396
2396
  }
2397
2397
  else p.add(_.__key);
2398
- const b = y.getChildren(), k = new Set(u), v = m.is(y), F = m.isInline() && f.getNextSibling() === null ? m : f;
2399
- for (let C = b.length - 1; C >= 0; C--) {
2400
- const N = b[C];
2401
- if (N.is(f) || S(N) && N.isParentOf(f)) break;
2402
- N.isAttached() && (!k.has(N) || N.is(x) ? v || F.insertAfter(N, !1) : N.remove());
2398
+ const v = y.getChildren(), b = new Set(c), S = m.is(y), F = m.isInline() && f.getNextSibling() === null ? m : f;
2399
+ for (let T = v.length - 1; T >= 0; T--) {
2400
+ const N = v[T];
2401
+ if (N.is(f) || C(N) && N.isParentOf(f)) break;
2402
+ N.isAttached() && (!b.has(N) || N.is(x) ? S || F.insertAfter(N, !1) : N.remove());
2403
2403
  }
2404
- if (!v) {
2405
- let C = y, N = null;
2406
- for (; C !== null; ) {
2407
- const O = C.getChildren(), D = O.length;
2408
- (D === 0 || O[D - 1].is(N)) && (p.delete(C.__key), N = C), C = C.getParent();
2404
+ if (!S) {
2405
+ let T = y, N = null;
2406
+ for (; T !== null; ) {
2407
+ const O = T.getChildren(), D = O.length;
2408
+ (D === 0 || O[D - 1].is(N)) && (p.delete(T.__key), N = T), T = T.getParent();
2409
2409
  }
2410
2410
  }
2411
2411
  if (f.isToken()) if (a === d) f.select();
2412
2412
  else {
2413
- const C = U(t);
2414
- C.select(), f.replace(C);
2413
+ const T = U(t);
2414
+ T.select(), f.replace(T);
2415
2415
  }
2416
2416
  else f = f.spliceText(a, d - a, t, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= t.length);
2417
- for (let C = 1; C < h; C++) {
2418
- const N = u[C], O = N.__key;
2417
+ for (let T = 1; T < h; T++) {
2418
+ const N = c[T], O = N.__key;
2419
2419
  p.has(O) || N.remove();
2420
2420
  }
2421
2421
  }
@@ -2424,10 +2424,10 @@ class Ot {
2424
2424
  if (this.isCollapsed()) return;
2425
2425
  const { anchor: t, focus: e } = this, r = this.getNodes(), s = this.isBackward() ? e : t, i = this.isBackward() ? t : e;
2426
2426
  let o = s.getNode(), l = i.getNode();
2427
- const a = Ut(o, pt), c = Ut(l, pt);
2427
+ const a = Ut(o, _t), u = Ut(l, _t);
2428
2428
  E(o) && o.isToken() && s.offset < o.getTextContentSize() && (s.offset = 0), i.offset > 0 && E(l) && l.isToken() && (i.offset = l.getTextContentSize());
2429
2429
  for (const h of r) qt(o, h) || qt(l, h) || h.getKey() === o.getKey() || h.getKey() === l.getKey() || h.remove();
2430
- const u = (h, f) => {
2430
+ const c = (h, f) => {
2431
2431
  if (h.getTextContent() === "") h.remove();
2432
2432
  else if (f !== 0 && bt(h)) {
2433
2433
  const d = U(h.getTextContent());
@@ -2436,30 +2436,30 @@ class Ot {
2436
2436
  };
2437
2437
  if (o === l && E(o)) {
2438
2438
  const h = Math.abs(e.offset - t.offset);
2439
- return o.spliceText(s.offset, h, "", !0), void u(o, h);
2439
+ return o.spliceText(s.offset, h, "", !0), void c(o, h);
2440
2440
  }
2441
2441
  if (E(o)) {
2442
2442
  const h = o.getTextContentSize() - s.offset;
2443
- o.spliceText(s.offset, h, ""), o = u(o, h) || o;
2443
+ o.spliceText(s.offset, h, ""), o = c(o, h) || o;
2444
2444
  }
2445
- E(l) && (l.spliceText(0, i.offset, ""), l = u(l, i.offset) || l), o.isAttached() && E(o) ? o.selectEnd() : l.isAttached() && E(l) && l.selectStart(), S(a) && S(c) && a !== c && (a.append(...c.getChildren()), c.remove(), i.set(s.key, s.offset, s.type));
2445
+ E(l) && (l.spliceText(0, i.offset, ""), l = c(l, i.offset) || l), o.isAttached() && E(o) ? o.selectEnd() : l.isAttached() && E(l) && l.selectStart(), C(a) && C(u) && a !== u && (a.append(...u.getChildren()), u.remove(), i.set(s.key, s.offset, s.type));
2446
2446
  }
2447
2447
  formatText(t, e = null) {
2448
2448
  if (this.isCollapsed()) return this.toggleFormat(t), void $(null);
2449
2449
  const r = this.getNodes(), s = [];
2450
- for (const b of r) E(b) && s.push(b);
2451
- const i = (b) => {
2452
- r.forEach((k) => {
2453
- if (S(k)) {
2454
- const v = k.getFormatFlags(t, b);
2455
- k.setTextFormat(v);
2450
+ for (const v of r) E(v) && s.push(v);
2451
+ const i = (v) => {
2452
+ r.forEach((b) => {
2453
+ if (C(b)) {
2454
+ const S = b.getFormatFlags(t, v);
2455
+ b.setTextFormat(S);
2456
2456
  }
2457
2457
  });
2458
2458
  }, o = s.length;
2459
2459
  if (o === 0) return this.toggleFormat(t), $(null), void i(e);
2460
- const l = this.anchor, a = this.focus, c = this.isBackward(), u = c ? a : l, h = c ? l : a;
2461
- let f = 0, d = s[0], g = u.type === "element" ? 0 : u.offset;
2462
- if (u.type === "text" && g === d.getTextContentSize() && (f = 1, d = s[1], g = 0), d == null) return;
2460
+ const l = this.anchor, a = this.focus, u = this.isBackward(), c = u ? a : l, h = u ? l : a;
2461
+ let f = 0, d = s[0], g = c.type === "element" ? 0 : c.offset;
2462
+ if (c.type === "text" && g === d.getTextContentSize() && (f = 1, d = s[1], g = 0), d == null) return;
2463
2463
  const _ = d.getFormatFlags(t, e);
2464
2464
  i(_);
2465
2465
  const p = o - 1;
@@ -2469,29 +2469,29 @@ class Ot {
2469
2469
  if (g === y) return;
2470
2470
  if (bt(d) || g === 0 && y === d.getTextContentSize()) d.setFormat(_);
2471
2471
  else {
2472
- const b = d.splitText(g, y), k = g === 0 ? b[0] : b[1];
2473
- k.setFormat(_), u.type === "text" && u.set(k.__key, 0, "text"), h.type === "text" && h.set(k.__key, y - g, "text");
2472
+ const v = d.splitText(g, y), b = g === 0 ? v[0] : v[1];
2473
+ b.setFormat(_), c.type === "text" && c.set(b.__key, 0, "text"), h.type === "text" && h.set(b.__key, y - g, "text");
2474
2474
  }
2475
2475
  return void (this.format = _);
2476
2476
  }
2477
2477
  g === 0 || bt(d) || ([, d] = d.splitText(g), g = 0), d.setFormat(_);
2478
2478
  const x = m.getFormatFlags(t, _);
2479
2479
  y > 0 && (y === m.getTextContentSize() || bt(m) || ([m] = m.splitText(y)), m.setFormat(x));
2480
- for (let b = f + 1; b < p; b++) {
2481
- const k = s[b], v = k.getFormatFlags(t, x);
2482
- k.setFormat(v);
2480
+ for (let v = f + 1; v < p; v++) {
2481
+ const b = s[v], S = b.getFormatFlags(t, x);
2482
+ b.setFormat(S);
2483
2483
  }
2484
- u.type === "text" && u.set(d.__key, g, "text"), h.type === "text" && h.set(m.__key, y, "text"), this.format = _ | x;
2484
+ c.type === "text" && c.set(d.__key, g, "text"), h.type === "text" && h.set(m.__key, y, "text"), this.format = _ | x;
2485
2485
  }
2486
2486
  insertNodes(t) {
2487
2487
  if (t.length === 0) return;
2488
2488
  if (this.anchor.key === "root") {
2489
2489
  this.insertParagraph();
2490
2490
  const g = M();
2491
- return P(g) || T(134), g.insertNodes(t);
2491
+ return P(g) || k(134), g.insertNodes(t);
2492
2492
  }
2493
- const e = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Ut(e, pt), s = t[t.length - 1];
2494
- if (S(r) && "__language" in r) {
2493
+ const e = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Ut(e, _t), s = t[t.length - 1];
2494
+ if (C(r) && "__language" in r) {
2495
2495
  if ("__language" in t[0]) this.insertText(t[0].getTextContent());
2496
2496
  else {
2497
2497
  const g = dn(this);
@@ -2499,8 +2499,8 @@ class Ot {
2499
2499
  }
2500
2500
  return;
2501
2501
  }
2502
- if (!t.some((g) => (S(g) || I(g)) && !g.isInline())) {
2503
- S(r) || T(211, e.constructor.name, e.getType());
2502
+ if (!t.some((g) => (C(g) || I(g)) && !g.isInline())) {
2503
+ C(r) || k(211, e.constructor.name, e.getType());
2504
2504
  const g = dn(this);
2505
2505
  return r.splice(g, 0, t), void s.selectEnd();
2506
2506
  }
@@ -2509,35 +2509,35 @@ class Ot {
2509
2509
  let p = null;
2510
2510
  for (let m = 0; m < g.length; m++) {
2511
2511
  const y = g[m], x = Bt(y);
2512
- if (x || I(y) && y.isInline() || S(y) && y.isInline() || E(y) || y.isParentRequired()) {
2512
+ if (x || I(y) && y.isInline() || C(y) && y.isInline() || E(y) || y.isParentRequired()) {
2513
2513
  if (p === null && (p = y.createParentElementNode(), _.append(p), x)) continue;
2514
2514
  p !== null && p.append(y);
2515
2515
  } else _.append(y), p = null;
2516
2516
  }
2517
2517
  return _;
2518
- }(t), o = i.getLastDescendant(), l = i.getChildren(), a = !S(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
2519
- let u = l[0];
2518
+ }(t), o = i.getLastDescendant(), l = i.getChildren(), a = !C(r) || !r.isEmpty() ? this.insertParagraph() : null, u = l[l.length - 1];
2519
+ let c = l[0];
2520
2520
  var h;
2521
- S(h = u) && pt(h) && !h.isEmpty() && S(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (S(r) || T(211, e.constructor.name, e.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, e.constructor.name, e.getType()), function(g, _, p) {
2521
+ C(h = c) && _t(h) && !h.isEmpty() && C(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (C(r) || k(211, e.constructor.name, e.getType()), r.append(...c.getChildren()), c = l[1]), c && (r === null && k(212, e.constructor.name, e.getType()), function(g, _, p) {
2522
2522
  const m = _.getParentOrThrow().getLastChild();
2523
2523
  let y = _;
2524
2524
  const x = [_];
2525
- for (; y !== m; ) y.getNextSibling() || T(140), y = y.getNextSibling(), x.push(y);
2526
- let b = g;
2527
- for (const k of x) b = b.insertAfter(k);
2528
- }(r, u));
2529
- const f = Ut(o, pt);
2530
- a && S(f) && (a.canMergeWhenEmpty() || pt(c)) && (f.append(...a.getChildren()), a.remove()), S(r) && r.isEmpty() && r.remove(), o.selectEnd();
2531
- const d = S(r) ? r.getLastChild() : null;
2525
+ for (; y !== m; ) y.getNextSibling() || k(140), y = y.getNextSibling(), x.push(y);
2526
+ let v = g;
2527
+ for (const b of x) v = v.insertAfter(b);
2528
+ }(r, c));
2529
+ const f = Ut(o, _t);
2530
+ a && C(f) && (a.canMergeWhenEmpty() || _t(u)) && (f.append(...a.getChildren()), a.remove()), C(r) && r.isEmpty() && r.remove(), o.selectEnd();
2531
+ const d = C(r) ? r.getLastChild() : null;
2532
2532
  Bt(d) && f !== r && d.remove();
2533
2533
  }
2534
2534
  insertParagraph() {
2535
2535
  if (this.anchor.key === "root") {
2536
2536
  const o = St();
2537
- return rt().splice(this.anchor.offset, 0, [o]), o.select(), o;
2537
+ return nt().splice(this.anchor.offset, 0, [o]), o.select(), o;
2538
2538
  }
2539
- const t = dn(this), e = Ut(this.anchor.getNode(), pt);
2540
- S(e) || T(213);
2539
+ const t = dn(this), e = Ut(this.anchor.getNode(), _t);
2540
+ C(e) || k(213);
2541
2541
  const r = e.getChildAtIndex(t), s = r ? [r, ...r.getNextSiblings()] : [], i = e.insertNewAfter(this, !1);
2542
2542
  return i ? (i.append(...s), i.selectStart(), i) : null;
2543
2543
  }
@@ -2551,22 +2551,22 @@ class Ot {
2551
2551
  extract() {
2552
2552
  const t = this.getNodes(), e = t.length, r = e - 1, s = this.anchor, i = this.focus;
2553
2553
  let o = t[0], l = t[r];
2554
- const [a, c] = Fr(this);
2554
+ const [a, u] = Fr(this);
2555
2555
  if (e === 0) return [];
2556
2556
  if (e === 1) {
2557
2557
  if (E(o) && !this.isCollapsed()) {
2558
- const h = a > c ? c : a, f = a > c ? a : c, d = o.splitText(h, f), g = h === 0 ? d[0] : d[1];
2558
+ const h = a > u ? u : a, f = a > u ? a : u, d = o.splitText(h, f), g = h === 0 ? d[0] : d[1];
2559
2559
  return g != null ? [g] : [];
2560
2560
  }
2561
2561
  return [o];
2562
2562
  }
2563
- const u = s.isBefore(i);
2563
+ const c = s.isBefore(i);
2564
2564
  if (E(o)) {
2565
- const h = u ? a : c;
2565
+ const h = c ? a : u;
2566
2566
  h === o.getTextContentSize() ? t.shift() : h !== 0 && ([, o] = o.splitText(h), t[0] = o);
2567
2567
  }
2568
2568
  if (E(l)) {
2569
- const h = l.getTextContent().length, f = u ? c : a;
2569
+ const h = l.getTextContent().length, f = c ? u : a;
2570
2570
  f === 0 ? t.pop() : f !== h && ([l] = l.splitText(f), t[r] = l);
2571
2571
  }
2572
2572
  return t;
@@ -2586,16 +2586,16 @@ class Ot {
2586
2586
  {
2587
2587
  const d = l.getParentOrThrow();
2588
2588
  let g, _;
2589
- return S(f) ? (_ = f.__key, g = e ? f.getChildrenSize() : 0) : (g = l.getIndexWithinParent(), _ = d.__key, e || g++), s.set(_, g, "element"), void (o && i.set(_, g, "element"));
2589
+ return C(f) ? (_ = f.__key, g = e ? f.getChildrenSize() : 0) : (g = l.getIndexWithinParent(), _ = d.__key, e || g++), s.set(_, g, "element"), void (o && i.set(_, g, "element"));
2590
2590
  }
2591
2591
  }
2592
- const a = A(), c = ft(a._window);
2593
- if (!c) return;
2594
- const u = a._blockCursorElement, h = a._rootElement;
2595
- if (h === null || u === null || !S(l) || l.isInline() || l.canBeEmpty() || $n(u, a, h), function(f, d, g, _) {
2592
+ const a = A(), u = ct(a._window);
2593
+ if (!u) return;
2594
+ const c = a._blockCursorElement, h = a._rootElement;
2595
+ if (h === null || c === null || !C(l) || l.isInline() || l.canBeEmpty() || $n(c, a, h), function(f, d, g, _) {
2596
2596
  f.modify(d, g, _);
2597
- }(c, t, e ? "backward" : "forward", r), c.rangeCount > 0) {
2598
- const f = c.getRangeAt(0), d = this.anchor.getNode(), g = Z(d) ? d : Di(d);
2597
+ }(u, t, e ? "backward" : "forward", r), u.rangeCount > 0) {
2598
+ const f = u.getRangeAt(0), d = this.anchor.getNode(), g = Y(d) ? d : Di(d);
2599
2599
  if (this.applyDOMRange(f), this.dirty = !0, !o) {
2600
2600
  const _ = this.getNodes(), p = [];
2601
2601
  let m = !1;
@@ -2605,22 +2605,22 @@ class Ot {
2605
2605
  }
2606
2606
  if (m && p.length > 0) if (e) {
2607
2607
  const y = p[0];
2608
- S(y) ? y.selectStart() : y.getParentOrThrow().selectStart();
2608
+ C(y) ? y.selectStart() : y.getParentOrThrow().selectStart();
2609
2609
  } else {
2610
2610
  const y = p[p.length - 1];
2611
- S(y) ? y.selectEnd() : y.getParentOrThrow().selectEnd();
2611
+ C(y) ? y.selectEnd() : y.getParentOrThrow().selectEnd();
2612
2612
  }
2613
- c.anchorNode === f.startContainer && c.anchorOffset === f.startOffset || function(y) {
2614
- const x = y.focus, b = y.anchor, k = b.key, v = b.offset, F = b.type;
2615
- yt(b, x.key, x.offset, x.type), yt(x, k, v, F), y._cachedNodes = null;
2613
+ u.anchorNode === f.startContainer && u.anchorOffset === f.startOffset || function(y) {
2614
+ const x = y.focus, v = y.anchor, b = v.key, S = v.offset, F = v.type;
2615
+ pt(v, x.key, x.offset, x.type), pt(x, b, S, F), y._cachedNodes = null;
2616
2616
  }(this);
2617
2617
  }
2618
2618
  }
2619
2619
  }
2620
2620
  forwardDeletion(t, e, r) {
2621
- if (!r && (t.type === "element" && S(e) && t.offset === e.getChildrenSize() || t.type === "text" && t.offset === e.getTextContentSize())) {
2621
+ if (!r && (t.type === "element" && C(e) && t.offset === e.getChildrenSize() || t.type === "text" && t.offset === e.getTextContentSize())) {
2622
2622
  const s = e.getParent(), i = e.getNextSibling() || (s === null ? null : s.getNextSibling());
2623
- if (S(i) && i.isShadowRoot()) return !0;
2623
+ if (C(i) && i.isShadowRoot()) return !0;
2624
2624
  }
2625
2625
  return !1;
2626
2626
  }
@@ -2632,7 +2632,7 @@ class Ot {
2632
2632
  if (this.forwardDeletion(r, s, t)) return;
2633
2633
  const i = this.focus, o = _r(i, t);
2634
2634
  if (I(o) && !o.isIsolated()) {
2635
- if (o.isKeyboardSelectable() && S(s) && s.getChildrenSize() === 0) {
2635
+ if (o.isKeyboardSelectable() && C(s) && s.getChildrenSize() === 0) {
2636
2636
  s.remove();
2637
2637
  const l = Dr();
2638
2638
  l.add(o.__key), ut(l);
@@ -2640,31 +2640,31 @@ class Ot {
2640
2640
  o.remove(), A().dispatchCommand(Nn, void 0);
2641
2641
  return;
2642
2642
  }
2643
- if (!t && S(o) && S(s) && s.isEmpty()) return s.remove(), void o.selectStart();
2643
+ if (!t && C(o) && C(s) && s.isEmpty()) return s.remove(), void o.selectStart();
2644
2644
  if (this.modify("extend", t, "character"), this.isCollapsed()) {
2645
2645
  if (t && r.offset === 0 && (r.type === "element" ? r.getNode() : r.getNode().getParentOrThrow()).collapseAtStart(this))
2646
2646
  return;
2647
2647
  } else {
2648
2648
  const l = i.type === "text" ? i.getNode() : null;
2649
2649
  if (s = r.type === "text" ? r.getNode() : null, l !== null && l.isSegmented()) {
2650
- const a = i.offset, c = l.getTextContentSize();
2651
- if (l.is(s) || t && a !== c || !t && a !== 0) return void Pr(l, t, a);
2650
+ const a = i.offset, u = l.getTextContentSize();
2651
+ if (l.is(s) || t && a !== u || !t && a !== 0) return void Pr(l, t, a);
2652
2652
  } else if (s !== null && s.isSegmented()) {
2653
- const a = r.offset, c = s.getTextContentSize();
2654
- if (s.is(l) || t && a !== 0 || !t && a !== c) return void Pr(s, t, a);
2653
+ const a = r.offset, u = s.getTextContentSize();
2654
+ if (s.is(l) || t && a !== 0 || !t && a !== u) return void Pr(s, t, a);
2655
2655
  }
2656
- (function(a, c) {
2657
- const u = a.anchor, h = a.focus, f = u.getNode(), d = h.getNode();
2658
- if (f === d && u.type === "text" && h.type === "text") {
2659
- const g = u.offset, _ = h.offset, p = g < _, m = p ? g : _, y = p ? _ : g, x = y - 1;
2660
- m !== x && (ls(f.getTextContent().slice(m, y)) || (c ? h.offset = x : u.offset = x));
2656
+ (function(a, u) {
2657
+ const c = a.anchor, h = a.focus, f = c.getNode(), d = h.getNode();
2658
+ if (f === d && c.type === "text" && h.type === "text") {
2659
+ const g = c.offset, _ = h.offset, p = g < _, m = p ? g : _, y = p ? _ : g, x = y - 1;
2660
+ m !== x && (ls(f.getTextContent().slice(m, y)) || (u ? h.offset = x : c.offset = x));
2661
2661
  }
2662
2662
  })(this, t);
2663
2663
  }
2664
2664
  }
2665
2665
  if (this.removeText(), t && !e && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0) {
2666
2666
  const r = this.anchor.getNode();
2667
- r.isEmpty() && Z(r.getParent()) && r.getIndexWithinParent() === 0 && r.collapseAtStart(this);
2667
+ r.isEmpty() && Y(r.getParent()) && r.getIndexWithinParent() === 0 && r.collapseAtStart(this);
2668
2668
  }
2669
2669
  }
2670
2670
  deleteLine(t) {
@@ -2710,10 +2710,10 @@ function Fr(n) {
2710
2710
  function Pr(n, t, e) {
2711
2711
  const r = n, s = r.getTextContent().split(/(?=\s)/g), i = s.length;
2712
2712
  let o = 0, l = 0;
2713
- for (let c = 0; c < i; c++) {
2714
- const u = c === i - 1;
2715
- if (l = o, o += s[c].length, t && o === e || o > e || u) {
2716
- s.splice(c, 1), u && (l = void 0);
2713
+ for (let u = 0; u < i; u++) {
2714
+ const c = u === i - 1;
2715
+ if (l = o, o += s[u].length, t && o === e || o > e || c) {
2716
+ s.splice(u, 1), c && (l = void 0);
2717
2717
  break;
2718
2718
  }
2719
2719
  }
@@ -2722,55 +2722,55 @@ function Pr(n, t, e) {
2722
2722
  }
2723
2723
  function Or(n, t, e, r) {
2724
2724
  let s, i = t;
2725
- if (X(n)) {
2725
+ if (Q(n)) {
2726
2726
  let o = !1;
2727
- const l = n.childNodes, a = l.length, c = r._blockCursorElement;
2727
+ const l = n.childNodes, a = l.length, u = r._blockCursorElement;
2728
2728
  i === a && (o = !0, i = a - 1);
2729
- let u = l[i], h = !1;
2730
- if (u === c) u = l[i + 1], h = !0;
2731
- else if (c !== null) {
2732
- const f = c.parentNode;
2733
- n === f && t > Array.prototype.indexOf.call(f.children, c) && i--;
2729
+ let c = l[i], h = !1;
2730
+ if (c === u) c = l[i + 1], h = !0;
2731
+ else if (u !== null) {
2732
+ const f = u.parentNode;
2733
+ n === f && t > Array.prototype.indexOf.call(f.children, u) && i--;
2734
2734
  }
2735
- if (s = Mt(u), E(s)) i = cr(s, o);
2735
+ if (s = Mt(c), E(s)) i = ur(s, o);
2736
2736
  else {
2737
2737
  let f = Mt(n);
2738
2738
  if (f === null) return null;
2739
- if (S(f)) {
2739
+ if (C(f)) {
2740
2740
  const d = r.getElementByKey(f.getKey());
2741
- d === null && T(214), [f, i] = f.getDOMSlot(d).resolveChildIndex(f, d, n, t), S(f) || T(215), o && i >= f.getChildrenSize() && (i = Math.max(0, f.getChildrenSize() - 1));
2741
+ d === null && k(214), [f, i] = f.getDOMSlot(d).resolveChildIndex(f, d, n, t), C(f) || k(215), o && i >= f.getChildrenSize() && (i = Math.max(0, f.getChildrenSize() - 1));
2742
2742
  let _ = f.getChildAtIndex(i);
2743
- if (S(_) && function(p, m, y) {
2743
+ if (C(_) && function(p, m, y) {
2744
2744
  const x = p.getParent();
2745
2745
  return y === null || x === null || !x.canBeEmpty() || x !== y.getNode();
2746
2746
  }(_, 0, e)) {
2747
2747
  const p = o ? _.getLastDescendant() : _.getFirstDescendant();
2748
- p === null ? f = _ : (_ = p, f = S(_) ? _ : _.getParentOrThrow()), i = 0;
2748
+ p === null ? f = _ : (_ = p, f = C(_) ? _ : _.getParentOrThrow()), i = 0;
2749
2749
  }
2750
- E(_) ? (s = _, f = null, i = cr(_, o)) : _ !== f && o && !h && (S(f) || T(216), i = Math.min(f.getChildrenSize(), i + 1));
2750
+ E(_) ? (s = _, f = null, i = ur(_, o)) : _ !== f && o && !h && (C(f) || k(216), i = Math.min(f.getChildrenSize(), i + 1));
2751
2751
  } else {
2752
2752
  const d = f.getIndexWithinParent();
2753
2753
  i = t === 0 && I(f) && Mt(n) === f ? d : d + 1, f = f.getParentOrThrow();
2754
2754
  }
2755
- if (S(f)) return ot(f.__key, i, "element");
2755
+ if (C(f)) return it(f.__key, i, "element");
2756
2756
  }
2757
2757
  } else s = Mt(n);
2758
- return E(s) ? ot(s.__key, i, "text") : null;
2758
+ return E(s) ? it(s.__key, i, "text") : null;
2759
2759
  }
2760
2760
  function Lr(n, t, e) {
2761
2761
  const r = n.offset, s = n.getNode();
2762
2762
  if (r === 0) {
2763
2763
  const i = s.getPreviousSibling(), o = s.getParent();
2764
2764
  if (t) {
2765
- if ((e || !t) && i === null && S(o) && o.isInline()) {
2765
+ if ((e || !t) && i === null && C(o) && o.isInline()) {
2766
2766
  const l = o.getPreviousSibling();
2767
2767
  E(l) && (n.key = l.__key, n.offset = l.getTextContent().length);
2768
2768
  }
2769
- } else S(i) && !e && i.isInline() ? (n.key = i.__key, n.offset = i.getChildrenSize(), n.type = "element") : E(i) && (n.key = i.__key, n.offset = i.getTextContent().length);
2769
+ } else C(i) && !e && i.isInline() ? (n.key = i.__key, n.offset = i.getChildrenSize(), n.type = "element") : E(i) && (n.key = i.__key, n.offset = i.getTextContent().length);
2770
2770
  } else if (r === s.getTextContent().length) {
2771
2771
  const i = s.getNextSibling(), o = s.getParent();
2772
- if (t && S(i) && i.isInline()) n.key = i.__key, n.offset = 0, n.type = "element";
2773
- else if ((e || t) && i === null && S(o) && o.isInline() && !o.canInsertTextAfter()) {
2772
+ if (t && C(i) && i.isInline()) n.key = i.__key, n.offset = 0, n.type = "element";
2773
+ else if ((e || t) && i === null && C(o) && o.isInline() && !o.canInsertTextAfter()) {
2774
2774
  const l = o.getNextSibling();
2775
2775
  E(l) && (n.key = l.__key, n.offset = 0);
2776
2776
  }
@@ -2783,7 +2783,7 @@ function Es(n, t, e) {
2783
2783
  const i = A();
2784
2784
  if (i.isComposing() && i._compositionKey !== n.key && P(e)) {
2785
2785
  const o = e.anchor, l = e.focus;
2786
- yt(n, o.key, o.offset, o.type), yt(t, l.key, l.offset, l.type);
2786
+ pt(n, o.key, o.offset, o.type), pt(t, l.key, l.offset, l.type);
2787
2787
  }
2788
2788
  }
2789
2789
  }
@@ -2794,20 +2794,20 @@ function Fs(n, t, e, r, s, i) {
2794
2794
  const l = Or(e, r, P(i) ? i.focus : null, s);
2795
2795
  if (l === null) return null;
2796
2796
  if (o.type === "element" && l.type === "element") {
2797
- const a = Mt(n), c = Mt(e);
2798
- if (I(a) && I(c)) return null;
2797
+ const a = Mt(n), u = Mt(e);
2798
+ if (I(a) && I(u)) return null;
2799
2799
  }
2800
2800
  return Es(o, l, i), [o, l];
2801
2801
  }
2802
- function ko(n) {
2803
- return S(n) && !n.isInline();
2802
+ function bo(n) {
2803
+ return C(n) && !n.isInline();
2804
2804
  }
2805
2805
  function Ps(n, t, e, r, s, i) {
2806
- const o = Tt(), l = new Ot(ot(n, t, s), ot(e, r, i), 0, "");
2806
+ const o = Tt(), l = new Ot(it(n, t, s), it(e, r, i), 0, "");
2807
2807
  return l.dirty = !0, o._selection = l, l;
2808
2808
  }
2809
- function bo() {
2810
- const n = ot("root", 0, "element"), t = ot("root", 0, "element");
2809
+ function vo() {
2810
+ const n = it("root", 0, "element"), t = it("root", 0, "element");
2811
2811
  return new Ot(n, t, 0, "");
2812
2812
  }
2813
2813
  function Dr() {
@@ -2820,11 +2820,11 @@ function Ge(n, t, e, r) {
2820
2820
  const s = e._window;
2821
2821
  if (s === null) return null;
2822
2822
  const i = r || s.event, o = i ? i.type : void 0, l = o === "selectionchange", a = !_n && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && i && i.detail === 3 || o === "drop" || o === void 0);
2823
- let c, u, h, f;
2823
+ let u, c, h, f;
2824
2824
  if (P(n) && !a) return n.clone();
2825
2825
  if (t === null) return null;
2826
- if (c = t.anchorNode, u = t.focusNode, h = t.anchorOffset, f = t.focusOffset, l && P(n) && !Re(e, c, u)) return n.clone();
2827
- const d = Fs(c, h, u, f, e, n);
2826
+ if (u = t.anchorNode, c = t.focusNode, h = t.anchorOffset, f = t.focusOffset, l && P(n) && !Re(e, u, c)) return n.clone();
2827
+ const d = Fs(u, h, c, f, e, n);
2828
2828
  if (d === null) return null;
2829
2829
  const [g, _] = d;
2830
2830
  return new Ot(g, _, P(n) ? n.format : 0, P(n) ? n.style : "");
@@ -2840,16 +2840,16 @@ function Ae(n, t, e, r = 1) {
2840
2840
  if (!t.is(o) && !t.is(l)) return;
2841
2841
  const a = t.__key;
2842
2842
  if (n.isCollapsed()) {
2843
- const c = s.offset;
2844
- if (e <= c && r > 0 || e < c && r < 0) {
2845
- const u = Math.max(0, c + r);
2846
- s.set(a, u, "element"), i.set(a, u, "element"), Mr(n);
2843
+ const u = s.offset;
2844
+ if (e <= u && r > 0 || e < u && r < 0) {
2845
+ const c = Math.max(0, u + r);
2846
+ s.set(a, c, "element"), i.set(a, c, "element"), Mr(n);
2847
2847
  }
2848
2848
  } else {
2849
- const c = n.isBackward(), u = c ? i : s, h = u.getNode(), f = c ? s : i, d = f.getNode();
2849
+ const u = n.isBackward(), c = u ? i : s, h = c.getNode(), f = u ? s : i, d = f.getNode();
2850
2850
  if (t.is(h)) {
2851
- const g = u.offset;
2852
- (e <= g && r > 0 || e < g && r < 0) && u.set(a, Math.max(0, g + r), "element");
2851
+ const g = c.offset;
2852
+ (e <= g && r > 0 || e < g && r < 0) && c.set(a, Math.max(0, g + r), "element");
2853
2853
  }
2854
2854
  if (t.is(d)) {
2855
2855
  const g = f.offset;
@@ -2861,108 +2861,108 @@ function Ae(n, t, e, r = 1) {
2861
2861
  function Mr(n) {
2862
2862
  const t = n.anchor, e = t.offset, r = n.focus, s = r.offset, i = t.getNode(), o = r.getNode();
2863
2863
  if (n.isCollapsed()) {
2864
- if (!S(i)) return;
2865
- const l = i.getChildrenSize(), a = e >= l, c = a ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(e);
2866
- if (E(c)) {
2867
- let u = 0;
2868
- a && (u = c.getTextContentSize()), t.set(c.__key, u, "text"), r.set(c.__key, u, "text");
2864
+ if (!C(i)) return;
2865
+ const l = i.getChildrenSize(), a = e >= l, u = a ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(e);
2866
+ if (E(u)) {
2867
+ let c = 0;
2868
+ a && (c = u.getTextContentSize()), t.set(u.__key, c, "text"), r.set(u.__key, c, "text");
2869
2869
  }
2870
2870
  } else {
2871
- if (S(i)) {
2872
- const l = i.getChildrenSize(), a = e >= l, c = a ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(e);
2873
- if (E(c)) {
2874
- let u = 0;
2875
- a && (u = c.getTextContentSize()), t.set(c.__key, u, "text");
2871
+ if (C(i)) {
2872
+ const l = i.getChildrenSize(), a = e >= l, u = a ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(e);
2873
+ if (E(u)) {
2874
+ let c = 0;
2875
+ a && (c = u.getTextContentSize()), t.set(u.__key, c, "text");
2876
2876
  }
2877
2877
  }
2878
- if (S(o)) {
2879
- const l = o.getChildrenSize(), a = s >= l, c = a ? o.getChildAtIndex(l - 1) : o.getChildAtIndex(s);
2880
- if (E(c)) {
2881
- let u = 0;
2882
- a && (u = c.getTextContentSize()), r.set(c.__key, u, "text");
2878
+ if (C(o)) {
2879
+ const l = o.getChildrenSize(), a = s >= l, u = a ? o.getChildAtIndex(l - 1) : o.getChildAtIndex(s);
2880
+ if (E(u)) {
2881
+ let c = 0;
2882
+ a && (c = u.getTextContentSize()), r.set(u.__key, c, "text");
2883
2883
  }
2884
2884
  }
2885
2885
  }
2886
2886
  }
2887
2887
  function Be(n, t, e, r, s) {
2888
2888
  let i = null, o = 0, l = null;
2889
- r !== null ? (i = r.__key, E(r) ? (o = r.getTextContentSize(), l = "text") : S(r) && (o = r.getChildrenSize(), l = "element")) : s !== null && (i = s.__key, E(s) ? l = "text" : S(s) && (l = "element")), i !== null && l !== null ? n.set(i, o, l) : (o = t.getIndexWithinParent(), o === -1 && (o = e.getChildrenSize()), n.set(e.__key, o, "element"));
2889
+ r !== null ? (i = r.__key, E(r) ? (o = r.getTextContentSize(), l = "text") : C(r) && (o = r.getChildrenSize(), l = "element")) : s !== null && (i = s.__key, E(s) ? l = "text" : C(s) && (l = "element")), i !== null && l !== null ? n.set(i, o, l) : (o = t.getIndexWithinParent(), o === -1 && (o = e.getChildrenSize()), n.set(e.__key, o, "element"));
2890
2890
  }
2891
2891
  function Ir(n, t, e, r, s) {
2892
2892
  n.type === "text" ? (n.key = e, t || (n.offset += s)) : n.offset > r.getIndexWithinParent() && (n.offset -= 1);
2893
2893
  }
2894
2894
  function eo(n, t, e, r, s, i, o) {
2895
- const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, h = document.activeElement;
2895
+ const l = r.anchorNode, a = r.focusNode, u = r.anchorOffset, c = r.focusOffset, h = document.activeElement;
2896
2896
  if (s.has("collaboration") && h !== i || h !== null && es(h)) return;
2897
2897
  if (!P(t)) return void (n !== null && Re(e, l, a) && r.removeAllRanges());
2898
- const f = t.anchor, d = t.focus, g = f.key, _ = d.key, p = Oe(e, g), m = Oe(e, _), y = f.offset, x = d.offset, b = t.format, k = t.style, v = t.isCollapsed();
2899
- let F = p, C = m, N = !1;
2898
+ const f = t.anchor, d = t.focus, g = f.key, _ = d.key, p = Oe(e, g), m = Oe(e, _), y = f.offset, x = d.offset, v = t.format, b = t.style, S = t.isCollapsed();
2899
+ let F = p, T = m, N = !1;
2900
2900
  if (f.type === "text") {
2901
2901
  F = Ee(p);
2902
2902
  const z = f.getNode();
2903
- N = z.getFormat() !== b || z.getStyle() !== k;
2903
+ N = z.getFormat() !== v || z.getStyle() !== b;
2904
2904
  } else P(n) && n.anchor.type === "text" && (N = !0);
2905
2905
  var O, D, B, L, R;
2906
- if (d.type === "text" && (C = Ee(m)), F !== null && C !== null && (v && (n === null || N || P(n) && (n.format !== b || n.style !== k)) && (O = b, D = k, B = y, L = g, R = performance.now(), Ss = [O, D, B, L, R]), c !== y || u !== x || l !== F || a !== C || r.type === "Range" && v || (h !== null && i.contains(h) || i.focus({ preventScroll: !0 }), f.type === "element"))) {
2906
+ if (d.type === "text" && (T = Ee(m)), F !== null && T !== null && (S && (n === null || N || P(n) && (n.format !== v || n.style !== b)) && (O = v, D = b, B = y, L = g, R = performance.now(), Cs = [O, D, B, L, R]), u !== y || c !== x || l !== F || a !== T || r.type === "Range" && S || (h !== null && i.contains(h) || i.focus({ preventScroll: !0 }), f.type === "element"))) {
2907
2907
  try {
2908
- r.setBaseAndExtent(F, y, C, x);
2908
+ r.setBaseAndExtent(F, y, T, x);
2909
2909
  } catch {
2910
2910
  }
2911
2911
  if (!s.has("skip-scroll-into-view") && t.isCollapsed() && i !== null && i === document.activeElement) {
2912
2912
  const z = P(t) && t.anchor.type === "element" ? F.childNodes[y] || null : r.rangeCount > 0 ? r.getRangeAt(0) : null;
2913
2913
  if (z !== null) {
2914
- let ht;
2914
+ let dt;
2915
2915
  if (z instanceof Text) {
2916
2916
  const Lt = document.createRange();
2917
- Lt.selectNode(z), ht = Lt.getBoundingClientRect();
2918
- } else ht = z.getBoundingClientRect();
2917
+ Lt.selectNode(z), dt = Lt.getBoundingClientRect();
2918
+ } else dt = z.getBoundingClientRect();
2919
2919
  (function(Lt, de, Qn) {
2920
2920
  const Ze = fs(Qn), Xn = Un(Ze);
2921
2921
  if (Ze === null || Xn === null) return;
2922
- let { top: tn, bottom: en } = de, he = 0, ge = 0, gt = Qn;
2923
- for (; gt !== null; ) {
2924
- const nn = gt === Ze.body;
2922
+ let { top: tn, bottom: en } = de, he = 0, ge = 0, ht = Qn;
2923
+ for (; ht !== null; ) {
2924
+ const nn = ht === Ze.body;
2925
2925
  if (nn) he = 0, ge = $e(Lt).innerHeight;
2926
2926
  else {
2927
- const _e = gt.getBoundingClientRect();
2927
+ const _e = ht.getBoundingClientRect();
2928
2928
  he = _e.top, ge = _e.bottom;
2929
2929
  }
2930
2930
  let Rt = 0;
2931
2931
  if (tn < he ? Rt = -(he - tn) : en > ge && (Rt = en - ge), Rt !== 0) if (nn) Xn.scrollBy(0, Rt);
2932
2932
  else {
2933
- const _e = gt.scrollTop;
2934
- gt.scrollTop += Rt;
2935
- const Yn = gt.scrollTop - _e;
2933
+ const _e = ht.scrollTop;
2934
+ ht.scrollTop += Rt;
2935
+ const Yn = ht.scrollTop - _e;
2936
2936
  tn -= Yn, en -= Yn;
2937
2937
  }
2938
2938
  if (nn) break;
2939
- gt = se(gt);
2939
+ ht = se(ht);
2940
2940
  }
2941
- })(e, ht, i);
2941
+ })(e, dt, i);
2942
2942
  }
2943
2943
  }
2944
- kn = !0;
2944
+ bn = !0;
2945
2945
  }
2946
2946
  }
2947
2947
  function No(n) {
2948
2948
  let t = M() || ae();
2949
- t === null && (t = rt().selectEnd()), t.insertNodes(n);
2949
+ t === null && (t = nt().selectEnd()), t.insertNodes(n);
2950
2950
  }
2951
2951
  function dn(n) {
2952
2952
  let t = n;
2953
2953
  n.isCollapsed() || t.removeText();
2954
2954
  const e = M();
2955
- P(e) && (t = e), P(t) || T(161);
2955
+ P(e) && (t = e), P(t) || k(161);
2956
2956
  const r = t.anchor;
2957
2957
  let s = r.getNode(), i = r.offset;
2958
- for (; !pt(s); ) [s, i] = no(s, i);
2958
+ for (; !_t(s); ) [s, i] = no(s, i);
2959
2959
  return i;
2960
2960
  }
2961
2961
  function no(n, t) {
2962
2962
  const e = n.getParent();
2963
2963
  if (!e) {
2964
2964
  const s = St();
2965
- return rt().append(s), s.select(), [rt(), 0];
2965
+ return nt().append(s), s.select(), [nt(), 0];
2966
2966
  }
2967
2967
  if (E(n)) {
2968
2968
  const s = n.splitText(t);
@@ -2970,30 +2970,30 @@ function no(n, t) {
2970
2970
  const i = t === 0 ? 0 : 1;
2971
2971
  return [e, s[0].getIndexWithinParent() + i];
2972
2972
  }
2973
- if (!S(n) || t === 0) return [e, n.getIndexWithinParent()];
2973
+ if (!C(n) || t === 0) return [e, n.getIndexWithinParent()];
2974
2974
  const r = n.getChildAtIndex(t);
2975
2975
  if (r) {
2976
- const s = new Ot(ot(n.__key, t, "element"), ot(n.__key, t, "element"), 0, ""), i = n.insertNewAfter(s);
2976
+ const s = new Ot(it(n.__key, t, "element"), it(n.__key, t, "element"), 0, ""), i = n.insertNewAfter(s);
2977
2977
  i && i.append(r, ...r.getNextSiblings());
2978
2978
  }
2979
2979
  return [e, n.getIndexWithinParent() + 1];
2980
2980
  }
2981
- let K = null, J = null, Q = !1, hn = !1, ve = 0;
2981
+ let K = null, J = null, G = !1, hn = !1, Se = 0;
2982
2982
  const Ar = { characterData: !0, childList: !0, subtree: !0 };
2983
- function ce() {
2984
- return Q || K !== null && K._readOnly;
2983
+ function ue() {
2984
+ return G || K !== null && K._readOnly;
2985
2985
  }
2986
- function G() {
2987
- Q && T(13);
2986
+ function q() {
2987
+ G && k(13);
2988
2988
  }
2989
2989
  function Os() {
2990
- ve > 99 && T(14);
2990
+ Se > 99 && k(14);
2991
2991
  }
2992
2992
  function Tt() {
2993
- return K === null && T(195, Ls()), K;
2993
+ return K === null && k(195, Ls()), K;
2994
2994
  }
2995
2995
  function A() {
2996
- return J === null && T(196, Ls()), J;
2996
+ return J === null && k(196, Ls()), J;
2997
2997
  }
2998
2998
  function Ls() {
2999
2999
  let n = 0;
@@ -3014,8 +3014,8 @@ function ro() {
3014
3014
  }
3015
3015
  function Br(n, t, e) {
3016
3016
  const r = t.__type, s = function(l, a) {
3017
- const c = l._nodes.get(a);
3018
- return c === void 0 && T(30, a), c;
3017
+ const u = l._nodes.get(a);
3018
+ return u === void 0 && k(30, a), u;
3019
3019
  }(n, r);
3020
3020
  let i = e.get(r);
3021
3021
  i === void 0 && (i = Array.from(s.transforms), e.set(r, i));
@@ -3037,92 +3037,92 @@ function Eo(n) {
3037
3037
  }
3038
3038
  function qn(n, t) {
3039
3039
  const e = n.type, r = t.get(e);
3040
- r === void 0 && T(17, e);
3040
+ r === void 0 && k(17, e);
3041
3041
  const s = r.klass;
3042
- n.type !== s.getType() && T(18, s.name);
3042
+ n.type !== s.getType() && k(18, s.name);
3043
3043
  const i = s.importJSON(n), o = n.children;
3044
- if (S(i) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
3044
+ if (C(i) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
3045
3045
  const a = qn(o[l], t);
3046
3046
  i.append(a);
3047
3047
  }
3048
3048
  return i;
3049
3049
  }
3050
3050
  function Wr(n, t, e) {
3051
- const r = K, s = Q, i = J;
3052
- K = t, Q = !0, J = n;
3051
+ const r = K, s = G, i = J;
3052
+ K = t, G = !0, J = n;
3053
3053
  try {
3054
3054
  return e();
3055
3055
  } finally {
3056
- K = r, Q = s, J = i;
3056
+ K = r, G = s, J = i;
3057
3057
  }
3058
3058
  }
3059
- function xt(n, t) {
3059
+ function mt(n, t) {
3060
3060
  const e = n._pendingEditorState, r = n._rootElement, s = n._headless || r === null;
3061
3061
  if (e === null) return;
3062
- const i = n._editorState, o = i._selection, l = e._selection, a = n._dirtyType !== Et, c = K, u = Q, h = J, f = n._updating, d = n._observer;
3062
+ const i = n._editorState, o = i._selection, l = e._selection, a = n._dirtyType !== Nt, u = K, c = G, h = J, f = n._updating, d = n._observer;
3063
3063
  let g = null;
3064
3064
  if (n._pendingEditorState = null, n._editorState = e, !s && a && d !== null) {
3065
- J = n, K = e, Q = !1, n._updating = !0;
3065
+ J = n, K = e, G = !1, n._updating = !0;
3066
3066
  try {
3067
- const v = n._dirtyType, F = n._dirtyElements, C = n._dirtyLeaves;
3068
- d.disconnect(), g = ji(i, e, n, v, F, C);
3069
- } catch (v) {
3070
- if (v instanceof Error && n._onError(v), hn) throw v;
3071
- return zs(n, null, r, e), ts(n), n._dirtyType = zt, hn = !0, xt(n, i), void (hn = !1);
3067
+ const S = n._dirtyType, F = n._dirtyElements, T = n._dirtyLeaves;
3068
+ d.disconnect(), g = ji(i, e, n, S, F, T);
3069
+ } catch (S) {
3070
+ if (S instanceof Error && n._onError(S), hn) throw S;
3071
+ return zs(n, null, r, e), ts(n), n._dirtyType = zt, hn = !0, mt(n, i), void (hn = !1);
3072
3072
  } finally {
3073
- d.observe(r, Ar), n._updating = f, K = c, Q = u, J = h;
3073
+ d.observe(r, Ar), n._updating = f, K = u, G = c, J = h;
3074
3074
  }
3075
3075
  }
3076
3076
  e._readOnly || (e._readOnly = !0);
3077
3077
  const _ = n._dirtyLeaves, p = n._dirtyElements, m = n._normalizedNodes, y = n._updateTags, x = n._deferred;
3078
- a && (n._dirtyType = Et, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(v, F) {
3079
- const C = v._decorators;
3080
- let N = v._pendingDecorators || C;
3078
+ a && (n._dirtyType = Nt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(S, F) {
3079
+ const T = S._decorators;
3080
+ let N = S._pendingDecorators || T;
3081
3081
  const O = F._nodeMap;
3082
3082
  let D;
3083
- for (D in N) O.has(D) || (N === C && (N = is(v)), delete N[D]);
3083
+ for (D in N) O.has(D) || (N === T && (N = is(S)), delete N[D]);
3084
3084
  }(n, e);
3085
- const b = s ? null : ft(n._window);
3086
- if (n._editable && b !== null && (a || l === null || l.dirty) && r !== null && !y.has("skip-dom-selection")) {
3085
+ const v = s ? null : ct(n._window);
3086
+ if (n._editable && v !== null && (a || l === null || l.dirty) && r !== null && !y.has("skip-dom-selection")) {
3087
3087
  J = n, K = e;
3088
3088
  try {
3089
3089
  if (d !== null && d.disconnect(), a || l === null || l.dirty) {
3090
- const v = n._blockCursorElement;
3091
- v !== null && $n(v, n, r), eo(o, l, n, b, y, r);
3090
+ const S = n._blockCursorElement;
3091
+ S !== null && $n(S, n, r), eo(o, l, n, v, y, r);
3092
3092
  }
3093
3093
  Ii(n, r, l), d !== null && d.observe(r, Ar);
3094
3094
  } finally {
3095
- J = h, K = c;
3095
+ J = h, K = u;
3096
3096
  }
3097
3097
  }
3098
- g !== null && function(v, F, C, N, O) {
3099
- const D = Array.from(v._listeners.mutation), B = D.length;
3098
+ g !== null && function(S, F, T, N, O) {
3099
+ const D = Array.from(S._listeners.mutation), B = D.length;
3100
3100
  for (let L = 0; L < B; L++) {
3101
- const [R, z] = D[L], ht = F.get(z);
3102
- ht !== void 0 && R(ht, { dirtyLeaves: N, prevEditorState: O, updateTags: C });
3101
+ const [R, z] = D[L], dt = F.get(z);
3102
+ dt !== void 0 && R(dt, { dirtyLeaves: N, prevEditorState: O, updateTags: T });
3103
3103
  }
3104
3104
  }(n, g, y, _, i), P(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Nn, void 0);
3105
- const k = n._pendingDecorators;
3106
- k !== null && (n._decorators = k, n._pendingDecorators = null, Xt("decorator", n, !0, k)), function(v, F, C) {
3107
- const N = ar(F), O = ar(C);
3108
- N !== O && Xt("textcontent", v, !0, O);
3109
- }(n, t || i, e), Xt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: e, normalizedNodes: m, prevEditorState: t || i, tags: y }), function(v, F) {
3110
- if (v._deferred = [], F.length !== 0) {
3111
- const C = v._updating;
3112
- v._updating = !0;
3105
+ const b = n._pendingDecorators;
3106
+ b !== null && (n._decorators = b, n._pendingDecorators = null, Xt("decorator", n, !0, b)), function(S, F, T) {
3107
+ const N = ar(F), O = ar(T);
3108
+ N !== O && Xt("textcontent", S, !0, O);
3109
+ }(n, t || i, e), Xt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: e, normalizedNodes: m, prevEditorState: t || i, tags: y }), function(S, F) {
3110
+ if (S._deferred = [], F.length !== 0) {
3111
+ const T = S._updating;
3112
+ S._updating = !0;
3113
3113
  try {
3114
3114
  for (let N = 0; N < F.length; N++) F[N]();
3115
3115
  } finally {
3116
- v._updating = C;
3116
+ S._updating = T;
3117
3117
  }
3118
3118
  }
3119
- }(n, x), function(v) {
3120
- const F = v._updates;
3119
+ }(n, x), function(S) {
3120
+ const F = S._updates;
3121
3121
  if (F.length !== 0) {
3122
- const C = F.shift();
3123
- if (C) {
3124
- const [N, O] = C;
3125
- Is(v, N, O);
3122
+ const T = F.shift();
3123
+ if (T) {
3124
+ const [N, O] = T;
3125
+ Is(S, N, O);
3126
3126
  }
3127
3127
  }
3128
3128
  }(n);
@@ -3150,8 +3150,8 @@ function Ms(n, t, e) {
3150
3150
  if (o !== void 0) {
3151
3151
  const l = o[s];
3152
3152
  if (l !== void 0) {
3153
- const a = Array.from(l), c = a.length;
3154
- for (let u = 0; u < c; u++) if (a[u](e, n) === !0) return !0;
3153
+ const a = Array.from(l), u = a.length;
3154
+ for (let c = 0; c < u; c++) if (a[c](e, n) === !0) return !0;
3155
3155
  }
3156
3156
  }
3157
3157
  }
@@ -3168,7 +3168,7 @@ function Rr(n, t) {
3168
3168
  if (o !== void 0) {
3169
3169
  if (l = o.onUpdate, o.skipTransforms && (r = !0), o.discrete) {
3170
3170
  const a = n._pendingEditorState;
3171
- a === null && T(191), a._flushSync = !0;
3171
+ a === null && k(191), a._flushSync = !0;
3172
3172
  }
3173
3173
  l && n._deferred.push(l), Ds(n, o.tag);
3174
3174
  }
@@ -3182,44 +3182,44 @@ function Is(n, t, e) {
3182
3182
  let s, i = !1, o = !1;
3183
3183
  e !== void 0 && (s = e.onUpdate, Ds(n, e.tag), i = e.skipTransforms || !1, o = e.discrete || !1), s && n._deferred.push(s);
3184
3184
  const l = n._editorState;
3185
- let a = n._pendingEditorState, c = !1;
3186
- (a === null || a._readOnly) && (a = n._pendingEditorState = As(a || l), c = !0), a._flushSync = o;
3187
- const u = K, h = Q, f = J, d = n._updating;
3188
- K = a, Q = !1, n._updating = !0, J = n;
3185
+ let a = n._pendingEditorState, u = !1;
3186
+ (a === null || a._readOnly) && (a = n._pendingEditorState = As(a || l), u = !0), a._flushSync = o;
3187
+ const c = K, h = G, f = J, d = n._updating;
3188
+ K = a, G = !1, n._updating = !0, J = n;
3189
3189
  try {
3190
- c && (n._headless ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(m) {
3191
- const y = m.getEditorState()._selection, x = ft(m._window);
3190
+ u && (n._headless ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(m) {
3191
+ const y = m.getEditorState()._selection, x = ct(m._window);
3192
3192
  return P(y) || y == null ? Ge(y, x, m, null) : y.clone();
3193
3193
  }(n));
3194
3194
  const _ = n._compositionKey;
3195
3195
  t(), i = Rr(n, i), function(m, y) {
3196
- const x = y.getEditorState()._selection, b = m._selection;
3197
- if (P(b)) {
3198
- const k = b.anchor, v = b.focus;
3196
+ const x = y.getEditorState()._selection, v = m._selection;
3197
+ if (P(v)) {
3198
+ const b = v.anchor, S = v.focus;
3199
3199
  let F;
3200
- if (k.type === "text" && (F = k.getNode(), F.selectionTransform(x, b)), v.type === "text") {
3201
- const C = v.getNode();
3202
- F !== C && C.selectionTransform(x, b);
3200
+ if (b.type === "text" && (F = b.getNode(), F.selectionTransform(x, v)), S.type === "text") {
3201
+ const T = S.getNode();
3202
+ F !== T && T.selectionTransform(x, v);
3203
3203
  }
3204
3204
  }
3205
- }(a, n), n._dirtyType !== Et && (i ? function(m, y) {
3206
- const x = y._dirtyLeaves, b = m._nodeMap;
3207
- for (const k of x) {
3208
- const v = b.get(k);
3209
- E(v) && v.isAttached() && v.isSimpleText() && !v.isUnmergeable() && ir(v);
3205
+ }(a, n), n._dirtyType !== Nt && (i ? function(m, y) {
3206
+ const x = y._dirtyLeaves, v = m._nodeMap;
3207
+ for (const b of x) {
3208
+ const S = v.get(b);
3209
+ E(S) && S.isAttached() && S.isSimpleText() && !S.isUnmergeable() && ir(S);
3210
3210
  }
3211
3211
  }(a, n) : function(m, y) {
3212
- const x = y._dirtyLeaves, b = y._dirtyElements, k = m._nodeMap, v = mt(), F = /* @__PURE__ */ new Map();
3213
- let C = x, N = C.size, O = b, D = O.size;
3212
+ const x = y._dirtyLeaves, v = y._dirtyElements, b = m._nodeMap, S = yt(), F = /* @__PURE__ */ new Map();
3213
+ let T = x, N = T.size, O = v, D = O.size;
3214
3214
  for (; N > 0 || D > 0; ) {
3215
3215
  if (N > 0) {
3216
3216
  y._dirtyLeaves = /* @__PURE__ */ new Set();
3217
- for (const B of C) {
3218
- const L = k.get(B);
3219
- E(L) && L.isAttached() && L.isSimpleText() && !L.isUnmergeable() && ir(L), L !== void 0 && zr(L, v) && Br(y, L, F), x.add(B);
3217
+ for (const B of T) {
3218
+ const L = b.get(B);
3219
+ E(L) && L.isAttached() && L.isSimpleText() && !L.isUnmergeable() && ir(L), L !== void 0 && zr(L, S) && Br(y, L, F), x.add(B);
3220
3220
  }
3221
- if (C = y._dirtyLeaves, N = C.size, N > 0) {
3222
- ve++;
3221
+ if (T = y._dirtyLeaves, N = T.size, N > 0) {
3222
+ Se++;
3223
3223
  continue;
3224
3224
  }
3225
3225
  }
@@ -3227,45 +3227,45 @@ function Is(n, t, e) {
3227
3227
  for (const B of O) {
3228
3228
  const L = B[0], R = B[1];
3229
3229
  if (L !== "root" && !R) continue;
3230
- const z = k.get(L);
3231
- z !== void 0 && zr(z, v) && Br(y, z, F), b.set(L, R);
3230
+ const z = b.get(L);
3231
+ z !== void 0 && zr(z, S) && Br(y, z, F), v.set(L, R);
3232
3232
  }
3233
- C = y._dirtyLeaves, N = C.size, O = y._dirtyElements, D = O.size, ve++;
3233
+ T = y._dirtyLeaves, N = T.size, O = y._dirtyElements, D = O.size, Se++;
3234
3234
  }
3235
- y._dirtyLeaves = x, y._dirtyElements = b;
3236
- }(a, n), Rr(n), function(m, y, x, b) {
3237
- const k = m._nodeMap, v = y._nodeMap, F = [];
3238
- for (const [C] of b) {
3239
- const N = v.get(C);
3240
- N !== void 0 && (N.isAttached() || (S(N) && ds(N, C, k, v, F, b), k.has(C) || b.delete(C), F.push(C)));
3235
+ y._dirtyLeaves = x, y._dirtyElements = v;
3236
+ }(a, n), Rr(n), function(m, y, x, v) {
3237
+ const b = m._nodeMap, S = y._nodeMap, F = [];
3238
+ for (const [T] of v) {
3239
+ const N = S.get(T);
3240
+ N !== void 0 && (N.isAttached() || (C(N) && ds(N, T, b, S, F, v), b.has(T) || v.delete(T), F.push(T)));
3241
3241
  }
3242
- for (const C of F) v.delete(C);
3243
- for (const C of x) {
3244
- const N = v.get(C);
3245
- N === void 0 || N.isAttached() || (k.has(C) || x.delete(C), v.delete(C));
3242
+ for (const T of F) S.delete(T);
3243
+ for (const T of x) {
3244
+ const N = S.get(T);
3245
+ N === void 0 || N.isAttached() || (b.has(T) || x.delete(T), S.delete(T));
3246
3246
  }
3247
3247
  }(l, a, n._dirtyLeaves, n._dirtyElements)), _ !== n._compositionKey && (a._flushSync = !0);
3248
3248
  const p = a._selection;
3249
3249
  if (P(p)) {
3250
3250
  const m = a._nodeMap, y = p.anchor.key, x = p.focus.key;
3251
- m.get(y) !== void 0 && m.get(x) !== void 0 || T(19);
3251
+ m.get(y) !== void 0 && m.get(x) !== void 0 || k(19);
3252
3252
  } else Hn(p) && p._nodes.size === 0 && (a._selection = null);
3253
3253
  } catch (_) {
3254
- return _ instanceof Error && n._onError(_), n._pendingEditorState = l, n._dirtyType = zt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void xt(n);
3254
+ return _ instanceof Error && n._onError(_), n._pendingEditorState = l, n._dirtyType = zt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void mt(n);
3255
3255
  } finally {
3256
- K = u, Q = h, J = f, n._updating = d, ve = 0;
3256
+ K = c, G = h, J = f, n._updating = d, Se = 0;
3257
3257
  }
3258
- n._dirtyType !== Et || n._deferred.length > 0 || function(_, p) {
3258
+ n._dirtyType !== Nt || n._deferred.length > 0 || function(_, p) {
3259
3259
  const m = p.getEditorState()._selection, y = _._selection;
3260
3260
  if (y !== null) {
3261
3261
  if (y.dirty || !y.is(m)) return !0;
3262
3262
  } else if (m !== null) return !0;
3263
3263
  return !1;
3264
- }(a, n) ? a._flushSync ? (a._flushSync = !1, xt(n)) : c && Pi(() => {
3265
- xt(n);
3266
- }) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
3264
+ }(a, n) ? a._flushSync ? (a._flushSync = !1, mt(n)) : u && Pi(() => {
3265
+ mt(n);
3266
+ }) : (a._flushSync = !1, u && (r.clear(), n._deferred = [], n._pendingEditorState = null));
3267
3267
  }
3268
- function Y(n, t, e) {
3268
+ function X(n, t, e) {
3269
3269
  n._updating ? n._updates.push([t, e]) : Is(n, t, e);
3270
3270
  }
3271
3271
  class Yt {
@@ -3283,13 +3283,13 @@ class Yt {
3283
3283
  }
3284
3284
  insertChild(t) {
3285
3285
  const e = this.before || this.getManagedLineBreak();
3286
- return e !== null && e.parentElement !== this.element && T(222), this.element.insertBefore(t, e), this;
3286
+ return e !== null && e.parentElement !== this.element && k(222), this.element.insertBefore(t, e), this;
3287
3287
  }
3288
3288
  removeChild(t) {
3289
- return t.parentElement !== this.element && T(223), this.element.removeChild(t), this;
3289
+ return t.parentElement !== this.element && k(223), this.element.removeChild(t), this;
3290
3290
  }
3291
3291
  replaceChild(t, e) {
3292
- return e.parentElement !== this.element && T(224), this.element.replaceChild(t, e), this;
3292
+ return e.parentElement !== this.element && k(224), this.element.replaceChild(t, e), this;
3293
3293
  }
3294
3294
  getFirstChild() {
3295
3295
  const t = this.after ? this.after.nextSibling : this.element.firstChild;
@@ -3339,9 +3339,9 @@ class Yt {
3339
3339
  const o = Kr(e, this.element);
3340
3340
  let l = t.getIndexWithinParent();
3341
3341
  for (let a = 0; a < o.length; a++) {
3342
- const c = i[a], u = o[a];
3343
- if (c === void 0 || c < u) break;
3344
- if (c > u) {
3342
+ const u = i[a], c = o[a];
3343
+ if (u === void 0 || u < c) break;
3344
+ if (u > c) {
3345
3345
  l += 1;
3346
3346
  break;
3347
3347
  }
@@ -3357,7 +3357,7 @@ function Kr(n, t) {
3357
3357
  for (let i = r.previousSibling; i !== null; i = r.previousSibling) s++;
3358
3358
  e.push(s);
3359
3359
  }
3360
- return r !== n && T(225), e.reverse();
3360
+ return r !== n && k(225), e.reverse();
3361
3361
  }
3362
3362
  class Qe extends He {
3363
3363
  constructor(t) {
@@ -3371,7 +3371,7 @@ class Qe extends He {
3371
3371
  }
3372
3372
  getFormatType() {
3373
3373
  const t = this.getFormat();
3374
- return vi[t] || "";
3374
+ return Si[t] || "";
3375
3375
  }
3376
3376
  getStyle() {
3377
3377
  return this.getLatest().__style;
@@ -3409,7 +3409,7 @@ class Qe extends He {
3409
3409
  const t = [];
3410
3410
  let e = this.getFirstChild();
3411
3411
  for (; e !== null; ) {
3412
- if (E(e) && t.push(e), S(e)) {
3412
+ if (E(e) && t.push(e), C(e)) {
3413
3413
  const r = e.getAllTextNodes();
3414
3414
  t.push(...r);
3415
3415
  }
@@ -3419,7 +3419,7 @@ class Qe extends He {
3419
3419
  }
3420
3420
  getFirstDescendant() {
3421
3421
  let t = this.getFirstChild();
3422
- for (; S(t); ) {
3422
+ for (; C(t); ) {
3423
3423
  const e = t.getFirstChild();
3424
3424
  if (e === null) break;
3425
3425
  t = e;
@@ -3428,7 +3428,7 @@ class Qe extends He {
3428
3428
  }
3429
3429
  getLastDescendant() {
3430
3430
  let t = this.getLastChild();
3431
- for (; S(t); ) {
3431
+ for (; C(t); ) {
3432
3432
  const e = t.getLastChild();
3433
3433
  if (e === null) break;
3434
3434
  t = e;
@@ -3439,10 +3439,10 @@ class Qe extends He {
3439
3439
  const e = this.getChildren(), r = e.length;
3440
3440
  if (t >= r) {
3441
3441
  const i = e[r - 1];
3442
- return S(i) && i.getLastDescendant() || i || null;
3442
+ return C(i) && i.getLastDescendant() || i || null;
3443
3443
  }
3444
3444
  const s = e[t];
3445
- return S(s) && s.getFirstDescendant() || s || null;
3445
+ return C(s) && s.getFirstDescendant() || s || null;
3446
3446
  }
3447
3447
  getFirstChild() {
3448
3448
  const t = this.getLatest().__first;
@@ -3450,7 +3450,7 @@ class Qe extends He {
3450
3450
  }
3451
3451
  getFirstChildOrThrow() {
3452
3452
  const t = this.getFirstChild();
3453
- return t === null && T(45, this.__key), t;
3453
+ return t === null && k(45, this.__key), t;
3454
3454
  }
3455
3455
  getLastChild() {
3456
3456
  const t = this.getLatest().__last;
@@ -3458,7 +3458,7 @@ class Qe extends He {
3458
3458
  }
3459
3459
  getLastChildOrThrow() {
3460
3460
  const t = this.getLastChild();
3461
- return t === null && T(96, this.__key), t;
3461
+ return t === null && k(96, this.__key), t;
3462
3462
  }
3463
3463
  getChildAtIndex(t) {
3464
3464
  const e = this.getChildrenSize();
@@ -3481,7 +3481,7 @@ class Qe extends He {
3481
3481
  const e = this.getChildren(), r = e.length;
3482
3482
  for (let s = 0; s < r; s++) {
3483
3483
  const i = e[s];
3484
- t += i.getTextContent(), S(i) && s !== r - 1 && !i.isInline() && (t += ct);
3484
+ t += i.getTextContent(), C(i) && s !== r - 1 && !i.isInline() && (t += at);
3485
3485
  }
3486
3486
  return t;
3487
3487
  }
@@ -3490,7 +3490,7 @@ class Qe extends He {
3490
3490
  const e = this.getChildren(), r = e.length;
3491
3491
  for (let s = 0; s < r; s++) {
3492
3492
  const i = e[s];
3493
- t += i.getTextContentSize(), S(i) && s !== r - 1 && !i.isInline() && (t += ct.length);
3493
+ t += i.getTextContentSize(), C(i) && s !== r - 1 && !i.isInline() && (t += at.length);
3494
3494
  }
3495
3495
  return t;
3496
3496
  }
@@ -3508,7 +3508,7 @@ class Qe extends He {
3508
3508
  return !1;
3509
3509
  }
3510
3510
  hasTextFormat(t) {
3511
- const e = V[t];
3511
+ const e = Et[t];
3512
3512
  return !!(this.getTextFormat() & e);
3513
3513
  }
3514
3514
  getFormatFlags(t, e) {
@@ -3518,17 +3518,17 @@ class Qe extends He {
3518
3518
  return this.getLatest().__textStyle;
3519
3519
  }
3520
3520
  select(t, e) {
3521
- G();
3521
+ q();
3522
3522
  const r = M();
3523
3523
  let s = t, i = e;
3524
3524
  const o = this.getChildrenSize();
3525
3525
  if (!this.canBeEmpty()) {
3526
3526
  if (t === 0 && e === 0) {
3527
3527
  const a = this.getFirstChild();
3528
- if (E(a) || S(a)) return a.select(0, 0);
3528
+ if (E(a) || C(a)) return a.select(0, 0);
3529
3529
  } else if (!(t !== void 0 && t !== o || e !== void 0 && e !== o)) {
3530
3530
  const a = this.getLastChild();
3531
- if (E(a) || S(a)) return a.select();
3531
+ if (E(a) || C(a)) return a.select();
3532
3532
  }
3533
3533
  }
3534
3534
  s === void 0 && (s = o), i === void 0 && (i = o);
@@ -3573,8 +3573,8 @@ class Qe extends He {
3573
3573
  }
3574
3574
  splice(t, e, r) {
3575
3575
  const s = r.length, i = this.getChildrenSize(), o = this.getWritable();
3576
- t + e <= i || T(226, String(t), String(e), String(i));
3577
- const l = o.__key, a = [], c = [], u = this.getChildAtIndex(t + e);
3576
+ t + e <= i || k(226, String(t), String(e), String(i));
3577
+ const l = o.__key, a = [], u = [], c = this.getChildAtIndex(t + e);
3578
3578
  let h = null, f = i - e + s;
3579
3579
  if (t !== 0) if (t === i) h = this.getLastChild();
3580
3580
  else {
@@ -3584,9 +3584,9 @@ class Qe extends He {
3584
3584
  if (e > 0) {
3585
3585
  let g = h === null ? this.getFirstChild() : h.getNextSibling();
3586
3586
  for (let _ = 0; _ < e; _++) {
3587
- g === null && T(100);
3587
+ g === null && k(100);
3588
3588
  const p = g.getNextSibling(), m = g.__key;
3589
- Nt(g.getWritable()), c.push(m), g = p;
3589
+ wt(g.getWritable()), u.push(m), g = p;
3590
3590
  }
3591
3591
  }
3592
3592
  let d = h;
@@ -3594,29 +3594,29 @@ class Qe extends He {
3594
3594
  const _ = r[g];
3595
3595
  d !== null && _.is(d) && (h = d = d.getPreviousSibling());
3596
3596
  const p = _.getWritable();
3597
- p.__parent === l && f--, Nt(p);
3597
+ p.__parent === l && f--, wt(p);
3598
3598
  const m = _.__key;
3599
3599
  if (d === null) o.__first = m, p.__prev = null;
3600
3600
  else {
3601
3601
  const y = d.getWritable();
3602
3602
  y.__next = m, p.__prev = y.__key;
3603
3603
  }
3604
- _.__key === l && T(76), p.__parent = l, a.push(m), d = _;
3604
+ _.__key === l && k(76), p.__parent = l, a.push(m), d = _;
3605
3605
  }
3606
3606
  if (t + e === i)
3607
3607
  d !== null && (d.getWritable().__next = null, o.__last = d.__key);
3608
- else if (u !== null) {
3609
- const g = u.getWritable();
3608
+ else if (c !== null) {
3609
+ const g = c.getWritable();
3610
3610
  if (d !== null) {
3611
3611
  const _ = d.getWritable();
3612
- g.__prev = d.__key, _.__next = u.__key;
3612
+ g.__prev = d.__key, _.__next = c.__key;
3613
3613
  } else g.__prev = null;
3614
3614
  }
3615
- if (o.__size = f, c.length) {
3615
+ if (o.__size = f, u.length) {
3616
3616
  const g = M();
3617
3617
  if (P(g)) {
3618
- const _ = new Set(c), p = new Set(a), { anchor: m, focus: y } = g;
3619
- Jr(m, _, p) && Be(m, m.getNode(), this, h, u), Jr(y, _, p) && Be(y, y.getNode(), this, h, u), f !== 0 || this.canBeEmpty() || Ft(this) || this.remove();
3618
+ const _ = new Set(u), p = new Set(a), { anchor: m, focus: y } = g;
3619
+ Jr(m, _, p) && Be(m, m.getNode(), this, h, c), Jr(y, _, p) && Be(y, y.getNode(), this, h, c), f !== 0 || this.canBeEmpty() || Ft(this) || this.remove();
3620
3620
  }
3621
3621
  }
3622
3622
  return o;
@@ -3626,7 +3626,7 @@ class Qe extends He {
3626
3626
  }
3627
3627
  exportDOM(t) {
3628
3628
  const { element: e } = super.exportDOM(t);
3629
- if (X(e)) {
3629
+ if (Q(e)) {
3630
3630
  const r = this.getIndent();
3631
3631
  r > 0 && (e.style.paddingInlineStart = 40 * r + "px");
3632
3632
  }
@@ -3690,7 +3690,7 @@ class Qe extends He {
3690
3690
  }
3691
3691
  }
3692
3692
  }
3693
- function S(n) {
3693
+ function C(n) {
3694
3694
  return n instanceof Qe;
3695
3695
  }
3696
3696
  function Jr(n, t, e) {
@@ -3704,7 +3704,7 @@ function Jr(n, t, e) {
3704
3704
  }
3705
3705
  class so extends He {
3706
3706
  decorate(t, e) {
3707
- T(47);
3707
+ k(47);
3708
3708
  }
3709
3709
  isIsolated() {
3710
3710
  return !1;
@@ -3719,34 +3719,34 @@ class so extends He {
3719
3719
  function I(n) {
3720
3720
  return n instanceof so;
3721
3721
  }
3722
- class ue extends Qe {
3722
+ class ce extends Qe {
3723
3723
  static getType() {
3724
3724
  return "root";
3725
3725
  }
3726
3726
  static clone() {
3727
- return new ue();
3727
+ return new ce();
3728
3728
  }
3729
3729
  constructor() {
3730
3730
  super("root"), this.__cachedText = null;
3731
3731
  }
3732
3732
  getTopLevelElementOrThrow() {
3733
- T(51);
3733
+ k(51);
3734
3734
  }
3735
3735
  getTextContent() {
3736
3736
  const t = this.__cachedText;
3737
- return !ce() && A()._dirtyType !== Et || t === null ? super.getTextContent() : t;
3737
+ return !ue() && A()._dirtyType !== Nt || t === null ? super.getTextContent() : t;
3738
3738
  }
3739
3739
  remove() {
3740
- T(52);
3740
+ k(52);
3741
3741
  }
3742
3742
  replace(t) {
3743
- T(53);
3743
+ k(53);
3744
3744
  }
3745
3745
  insertBefore(t) {
3746
- T(54);
3746
+ k(54);
3747
3747
  }
3748
3748
  insertAfter(t) {
3749
- T(55);
3749
+ k(55);
3750
3750
  }
3751
3751
  updateDOM(t, e) {
3752
3752
  return !1;
@@ -3754,31 +3754,31 @@ class ue extends Qe {
3754
3754
  append(...t) {
3755
3755
  for (let e = 0; e < t.length; e++) {
3756
3756
  const r = t[e];
3757
- S(r) || I(r) || T(56);
3757
+ C(r) || I(r) || k(56);
3758
3758
  }
3759
3759
  return super.append(...t);
3760
3760
  }
3761
3761
  static importJSON(t) {
3762
- return rt().updateFromJSON(t);
3762
+ return nt().updateFromJSON(t);
3763
3763
  }
3764
3764
  collapseAtStart() {
3765
3765
  return !0;
3766
3766
  }
3767
3767
  }
3768
- function Z(n) {
3769
- return n instanceof ue;
3768
+ function Y(n) {
3769
+ return n instanceof ce;
3770
3770
  }
3771
3771
  function As(n) {
3772
3772
  return new Xe(new Map(n._nodeMap));
3773
3773
  }
3774
3774
  function Gn() {
3775
- return new Xe(/* @__PURE__ */ new Map([["root", new ue()]]));
3775
+ return new Xe(/* @__PURE__ */ new Map([["root", new ce()]]));
3776
3776
  }
3777
3777
  function Bs(n) {
3778
3778
  const t = n.exportJSON(), e = n.constructor;
3779
- if (t.type !== e.getType() && T(130, e.name), S(n)) {
3779
+ if (t.type !== e.getType() && k(130, e.name), C(n)) {
3780
3780
  const r = t.children;
3781
- Array.isArray(r) || T(59, e.name);
3781
+ Array.isArray(r) || k(59, e.name);
3782
3782
  const s = n.getChildren();
3783
3783
  for (let i = 0; i < s.length; i++) {
3784
3784
  const o = Bs(s[i]);
@@ -3802,7 +3802,7 @@ class Xe {
3802
3802
  return e._readOnly = !0, e;
3803
3803
  }
3804
3804
  toJSON() {
3805
- return Wr(null, this, () => ({ root: Bs(rt()) }));
3805
+ return Wr(null, this, () => ({ root: Bs(nt()) }));
3806
3806
  }
3807
3807
  }
3808
3808
  class io extends Qe {
@@ -3832,7 +3832,7 @@ class fe extends Qe {
3832
3832
  }
3833
3833
  exportDOM(t) {
3834
3834
  const { element: e } = super.exportDOM(t);
3835
- if (X(e)) {
3835
+ if (Q(e)) {
3836
3836
  this.isEmpty() && e.append(document.createElement("br"));
3837
3837
  const r = this.getFormatType();
3838
3838
  e.style.textAlign = r;
@@ -3875,46 +3875,46 @@ function Fo(n) {
3875
3875
  const Po = 0, Oo = 1, Lo = 3, Do = 4;
3876
3876
  function zs(n, t, e, r) {
3877
3877
  const s = n._keyToDOMMap;
3878
- s.clear(), n._editorState = Gn(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Et, 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;
3878
+ s.clear(), n._editorState = Gn(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Nt, 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;
3879
3879
  const i = n._observer;
3880
3880
  i !== null && (i.disconnect(), n._observer = null), t !== null && (t.textContent = ""), e !== null && (e.textContent = "", s.set("root", e));
3881
3881
  }
3882
3882
  function Mo(n) {
3883
- const t = n || {}, e = ro(), r = t.theme || {}, s = n === void 0 ? e : t.parentEditor || null, i = t.disableEvents || !1, o = Gn(), l = t.namespace || (s !== null ? s._config.namespace : as()), a = t.editorState, c = [ue, Wt, oe, le, fe, io, ...t.nodes || []], { onError: u, html: h } = t, f = t.editable === void 0 || t.editable;
3883
+ const t = n || {}, e = ro(), r = t.theme || {}, s = n === void 0 ? e : t.parentEditor || null, i = t.disableEvents || !1, o = Gn(), l = t.namespace || (s !== null ? s._config.namespace : as()), a = t.editorState, u = [ce, Wt, oe, le, fe, io, ...t.nodes || []], { onError: c, html: h } = t, f = t.editable === void 0 || t.editable;
3884
3884
  let d;
3885
3885
  if (n === void 0 && e !== null) d = e._nodes;
3886
3886
  else {
3887
3887
  d = /* @__PURE__ */ new Map();
3888
- for (let _ = 0; _ < c.length; _++) {
3889
- let p = c[_], m = null, y = null;
3888
+ for (let _ = 0; _ < u.length; _++) {
3889
+ let p = u[_], m = null, y = null;
3890
3890
  if (typeof p != "function") {
3891
- const v = p;
3892
- p = v.replace, m = v.with, y = v.withKlass || null;
3891
+ const S = p;
3892
+ p = S.replace, m = S.with, y = S.withKlass || null;
3893
3893
  }
3894
- const x = p.getType(), b = p.transform(), k = /* @__PURE__ */ new Set();
3895
- b !== null && k.add(b), d.set(x, { exportDOM: h && h.export ? h.export.get(p) : void 0, klass: p, replace: m, replaceWithKlass: y, transforms: k });
3894
+ const x = p.getType(), v = p.transform(), b = /* @__PURE__ */ new Set();
3895
+ v !== null && b.add(v), d.set(x, { exportDOM: h && h.export ? h.export.get(p) : void 0, klass: p, replace: m, replaceWithKlass: y, transforms: b });
3896
3896
  }
3897
3897
  }
3898
- const g = new Ye(o, s, d, { disableEvents: i, namespace: l, theme: r }, u || console.error, function(_, p) {
3899
- const m = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), x = (b) => {
3900
- Object.keys(b).forEach((k) => {
3901
- let v = m.get(k);
3902
- v === void 0 && (v = [], m.set(k, v)), v.push(b[k]);
3898
+ const g = new Ye(o, s, d, { disableEvents: i, namespace: l, theme: r }, c || console.error, function(_, p) {
3899
+ const m = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), x = (v) => {
3900
+ Object.keys(v).forEach((b) => {
3901
+ let S = m.get(b);
3902
+ S === void 0 && (S = [], m.set(b, S)), S.push(v[b]);
3903
3903
  });
3904
3904
  };
3905
- return _.forEach((b) => {
3906
- const k = b.klass.importDOM;
3907
- if (k == null || y.has(k)) return;
3908
- y.add(k);
3909
- const v = k.call(b.klass);
3910
- v !== null && x(v);
3905
+ return _.forEach((v) => {
3906
+ const b = v.klass.importDOM;
3907
+ if (b == null || y.has(b)) return;
3908
+ y.add(b);
3909
+ const S = b.call(v.klass);
3910
+ S !== null && x(S);
3911
3911
  }), p && x(p), m;
3912
3912
  }(d, h ? h.import : void 0), f);
3913
3913
  return a !== void 0 && (g._pendingEditorState = a, g._dirtyType = zt), g;
3914
3914
  }
3915
3915
  class Ye {
3916
3916
  constructor(t, e, r, s, i, o, l) {
3917
- this._parentEditor = e, this._rootElement = null, this._editorState = t, 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 = s, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Et, 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 = as(), this._onError = i, this._htmlConversions = o, this._editable = l, this._headless = e !== null && e._headless, this._window = null, this._blockCursorElement = null;
3917
+ this._parentEditor = e, this._rootElement = null, this._editorState = t, 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 = s, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Nt, 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 = as(), this._onError = i, this._htmlConversions = o, this._editable = l, this._headless = e !== null && e._headless, this._window = null, this._blockCursorElement = null;
3918
3918
  }
3919
3919
  isComposing() {
3920
3920
  return this._compositionKey != null;
@@ -3950,11 +3950,11 @@ class Ye {
3950
3950
  };
3951
3951
  }
3952
3952
  registerCommand(t, e, r) {
3953
- r === void 0 && T(35);
3953
+ r === void 0 && k(35);
3954
3954
  const s = this._commands;
3955
3955
  s.has(t) || s.set(t, [/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()]);
3956
3956
  const i = s.get(t);
3957
- i === void 0 && T(36, String(t));
3957
+ i === void 0 && k(36, String(t));
3958
3958
  const o = i[r];
3959
3959
  return o.add(e), () => {
3960
3960
  o.delete(e), i.every((l) => l.size === 0) && s.delete(t);
@@ -3970,7 +3970,7 @@ class Ye {
3970
3970
  }
3971
3971
  getRegisteredNode(t) {
3972
3972
  const e = this._nodes.get(t.getType());
3973
- return e === void 0 && T(37, t.name), e;
3973
+ return e === void 0 && k(37, t.name), e;
3974
3974
  }
3975
3975
  resolveRegisteredNodeAfterReplacements(t) {
3976
3976
  for (; t.replaceWithKlass; ) t = this.getRegisteredNode(t.replaceWithKlass);
@@ -3994,13 +3994,13 @@ class Ye {
3994
3994
  s.push(o);
3995
3995
  }
3996
3996
  return function(o, l) {
3997
- const a = mr(o.getEditorState()), c = [];
3998
- for (const u of l) {
3999
- const h = a.get(u);
4000
- h && c.push(h);
3997
+ const a = mr(o.getEditorState()), u = [];
3998
+ for (const c of l) {
3999
+ const h = a.get(c);
4000
+ h && u.push(h);
4001
4001
  }
4002
- c.length !== 0 && o.update(() => {
4003
- for (const u of c) for (const h of u.keys()) {
4002
+ u.length !== 0 && o.update(() => {
4003
+ for (const c of u) for (const h of c.keys()) {
4004
4004
  const f = j(h);
4005
4005
  f && f.markDirty();
4006
4006
  }
@@ -4033,16 +4033,16 @@ class Ye {
4033
4033
  const r = It(this._config.theme, "root"), s = this._pendingEditorState || this._editorState;
4034
4034
  if (this._rootElement = t, zs(this, e, t, s), e !== null && (this._config.disableEvents || Vi(e), r != null && e.classList.remove(...r)), t !== null) {
4035
4035
  const i = Un(t), o = t.style;
4036
- o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", t.setAttribute("data-lexical-editor", "true"), this._window = i, this._dirtyType = zt, ts(this), this._updateTags.add("history-merge"), xt(this), this._config.disableEvents || function(l, a) {
4037
- const c = l.ownerDocument, u = Ie.get(c);
4038
- (u === void 0 || u < 1) && c.addEventListener("selectionchange", bs), Ie.set(c, (u || 0) + 1), l.__lexicalEditor = a;
4039
- const h = ks(l);
4040
- for (let f = 0; f < Tn.length; f++) {
4041
- const [d, g] = Tn[f], _ = typeof g == "function" ? (p) => {
4042
- Tr(p) || (Cr(p), (a.isEditable() || d === "click") && g(p, a));
4036
+ o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", t.setAttribute("data-lexical-editor", "true"), this._window = i, this._dirtyType = zt, ts(this), this._updateTags.add("history-merge"), mt(this), this._config.disableEvents || function(l, a) {
4037
+ const u = l.ownerDocument, c = Ie.get(u);
4038
+ (c === void 0 || c < 1) && u.addEventListener("selectionchange", vs), Ie.set(u, (c || 0) + 1), l.__lexicalEditor = a;
4039
+ const h = bs(l);
4040
+ for (let f = 0; f < kn.length; f++) {
4041
+ const [d, g] = kn[f], _ = typeof g == "function" ? (p) => {
4042
+ kr(p) || (Tr(p), (a.isEditable() || d === "click") && g(p, a));
4043
4043
  } : (p) => {
4044
- if (Tr(p)) return;
4045
- Cr(p);
4044
+ if (kr(p)) return;
4045
+ Tr(p);
4046
4046
  const m = a.isEditable();
4047
4047
  switch (d) {
4048
4048
  case "cut":
@@ -4081,37 +4081,37 @@ class Ye {
4081
4081
  return this._editorState;
4082
4082
  }
4083
4083
  setEditorState(t, e) {
4084
- t.isEmpty() && T(38);
4084
+ t.isEmpty() && k(38);
4085
4085
  let r = t;
4086
4086
  r._readOnly && (r = As(t), r._selection = t._selection ? t._selection.clone() : null), Zr(this);
4087
4087
  const s = this._pendingEditorState, i = this._updateTags, o = e !== void 0 ? e.tag : null;
4088
- s === null || s.isEmpty() || (o != null && i.add(o), xt(this)), this._pendingEditorState = r, this._dirtyType = zt, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && i.add(o), this._updating || xt(this);
4088
+ s === null || s.isEmpty() || (o != null && i.add(o), mt(this)), this._pendingEditorState = r, this._dirtyType = zt, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && i.add(o), this._updating || mt(this);
4089
4089
  }
4090
4090
  parseEditorState(t, e) {
4091
4091
  return function(r, s, i) {
4092
- const o = Gn(), l = K, a = Q, c = J, u = s._dirtyElements, h = s._dirtyLeaves, f = s._cloneNotNeeded, d = s._dirtyType;
4093
- s._dirtyElements = /* @__PURE__ */ new Map(), s._dirtyLeaves = /* @__PURE__ */ new Set(), s._cloneNotNeeded = /* @__PURE__ */ new Set(), s._dirtyType = 0, K = o, Q = !1, J = s;
4092
+ const o = Gn(), l = K, a = G, u = J, c = s._dirtyElements, h = s._dirtyLeaves, f = s._cloneNotNeeded, d = s._dirtyType;
4093
+ s._dirtyElements = /* @__PURE__ */ new Map(), s._dirtyLeaves = /* @__PURE__ */ new Set(), s._cloneNotNeeded = /* @__PURE__ */ new Set(), s._dirtyType = 0, K = o, G = !1, J = s;
4094
4094
  try {
4095
4095
  const g = s._nodes;
4096
4096
  qn(r.root, g), i && i(), o._readOnly = !0;
4097
4097
  } catch (g) {
4098
4098
  g instanceof Error && s._onError(g);
4099
4099
  } finally {
4100
- s._dirtyElements = u, s._dirtyLeaves = h, s._cloneNotNeeded = f, s._dirtyType = d, K = l, Q = a, J = c;
4100
+ s._dirtyElements = c, s._dirtyLeaves = h, s._cloneNotNeeded = f, s._dirtyType = d, K = l, G = a, J = u;
4101
4101
  }
4102
4102
  return o;
4103
4103
  }(typeof t == "string" ? JSON.parse(t) : t, this, e);
4104
4104
  }
4105
4105
  read(t) {
4106
- return xt(this), this.getEditorState().read(t, { editor: this });
4106
+ return mt(this), this.getEditorState().read(t, { editor: this });
4107
4107
  }
4108
4108
  update(t, e) {
4109
- Y(this, t, e);
4109
+ X(this, t, e);
4110
4110
  }
4111
4111
  focus(t, e = {}) {
4112
4112
  const r = this._rootElement;
4113
- r !== null && (r.setAttribute("autocapitalize", "off"), Y(this, () => {
4114
- const s = M(), i = rt();
4113
+ r !== null && (r.setAttribute("autocapitalize", "off"), X(this, () => {
4114
+ const s = M(), i = nt();
4115
4115
  s !== null ? s.dirty = !0 : i.getChildrenSize() !== 0 && (e.defaultSelection === "rootStart" ? i.selectStart() : i.selectEnd());
4116
4116
  }, { onUpdate: () => {
4117
4117
  r.removeAttribute("autocapitalize"), t && t();
@@ -4120,7 +4120,7 @@ class Ye {
4120
4120
  blur() {
4121
4121
  const t = this._rootElement;
4122
4122
  t !== null && t.blur();
4123
- const e = ft(this._window);
4123
+ const e = ct(this._window);
4124
4124
  e !== null && e.removeAllRanges();
4125
4125
  }
4126
4126
  isEditable() {
@@ -4136,46 +4136,46 @@ class Ye {
4136
4136
  Ye.version = "0.23.0+prod.esm";
4137
4137
  export {
4138
4138
  ni as $,
4139
- Co as A,
4139
+ To as A,
4140
4140
  Hr as B,
4141
4141
  Us as C,
4142
4142
  Ks as D,
4143
- So as E,
4143
+ Co as E,
4144
4144
  ie as F,
4145
- Ce as G,
4145
+ Te as G,
4146
4146
  M as H,
4147
4147
  I,
4148
- To as J,
4149
- Te as K,
4150
- S as L,
4148
+ ko as J,
4149
+ ke as K,
4150
+ C as L,
4151
4151
  ut as M,
4152
4152
  Xs as N,
4153
4153
  Qe as O,
4154
- X as P,
4154
+ Q as P,
4155
4155
  Lo as Q,
4156
- Se as R,
4156
+ Ce as R,
4157
4157
  Vs as S,
4158
4158
  qs as T,
4159
4159
  Qs as U,
4160
4160
  St as V,
4161
- ot as W,
4161
+ it as W,
4162
4162
  Do as X,
4163
- ce as Y,
4164
- V as Z,
4163
+ ue as Y,
4164
+ Et as Z,
4165
4165
  fe as _,
4166
4166
  P as a,
4167
4167
  Wt as a0,
4168
4168
  Ur as a1,
4169
- rt as a2,
4170
- vo as a3,
4169
+ nt as a2,
4170
+ So as a3,
4171
4171
  Fr as a4,
4172
4172
  _r as a5,
4173
- Z as a6,
4173
+ Y as a6,
4174
4174
  Rs as a7,
4175
4175
  Ws as a8,
4176
4176
  yo as a9,
4177
- uo as aA,
4178
- co as aB,
4177
+ co as aA,
4178
+ uo as aB,
4179
4179
  No as aC,
4180
4180
  tr as aD,
4181
4181
  ns as aE,
@@ -4188,7 +4188,7 @@ export {
4188
4188
  ne as ae,
4189
4189
  Ri as af,
4190
4190
  Bi as ag,
4191
- ko as ah,
4191
+ bo as ah,
4192
4192
  pr as ai,
4193
4193
  zi as aj,
4194
4194
  Vn as ak,
@@ -4217,20 +4217,20 @@ export {
4217
4217
  or as i,
4218
4218
  Fo as j,
4219
4219
  Gs as k,
4220
- wt as l,
4220
+ vt as l,
4221
4221
  ho as m,
4222
4222
  Bt as n,
4223
4223
  Zn as o,
4224
4224
  Ht as p,
4225
4225
  Oo as q,
4226
4226
  ao as r,
4227
- ft as s,
4227
+ ct as s,
4228
4228
  Nn as t,
4229
4229
  wo as u,
4230
4230
  E as v,
4231
- bo as w,
4231
+ vo as w,
4232
4232
  je as x,
4233
4233
  Ft as y,
4234
4234
  js as z
4235
4235
  };
4236
- //# sourceMappingURL=Lexical.prod-BAr6tzpa.js.map
4236
+ //# sourceMappingURL=Lexical.prod-sR6tW7N6.js.map