@uva-glass/component-library 3.52.5 → 3.52.6

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 (56) hide show
  1. package/dist/{Lexical.prod-BAE-wnll.js → Lexical.prod-sd_e2sqT.js} +648 -627
  2. package/dist/Lexical.prod-sd_e2sqT.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-BS4qAkmJ.js → LexicalClipboard.prod-Co2PF1UJ.js} +44 -42
  4. package/dist/LexicalClipboard.prod-Co2PF1UJ.js.map +1 -0
  5. package/dist/{LexicalLink.prod-C6Or2Yo6.js → LexicalLink.prod-BCE6Bg2N.js} +354 -334
  6. package/dist/LexicalLink.prod-BCE6Bg2N.js.map +1 -0
  7. package/dist/{LexicalList.prod-rTq41CO0.js → LexicalList.prod-CIB0K0ja.js} +141 -138
  8. package/dist/LexicalList.prod-CIB0K0ja.js.map +1 -0
  9. package/dist/{LexicalSelection.prod-fLzEGOT_.js → LexicalSelection.prod-CCmcTP6S.js} +41 -41
  10. package/dist/{LexicalSelection.prod-fLzEGOT_.js.map → LexicalSelection.prod-CCmcTP6S.js.map} +1 -1
  11. package/dist/{LexicalTable.prod-BBI7yaOy.js → LexicalTable.prod-Oa2YPHLl.js} +359 -359
  12. package/dist/LexicalTable.prod-Oa2YPHLl.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-D8DAKg7O.js → LexicalUtils.prod-CjKjgnmx.js} +43 -43
  14. package/dist/{LexicalUtils.prod-D8DAKg7O.js.map → LexicalUtils.prod-CjKjgnmx.js.map} +1 -1
  15. package/dist/{TableCellResizerPlugin-HPo4ZkHo.js → TableCellResizerPlugin-DATbSzfg.js} +51 -51
  16. package/dist/{TableCellResizerPlugin-HPo4ZkHo.js.map → TableCellResizerPlugin-DATbSzfg.js.map} +1 -1
  17. package/dist/{TablePlugin-BLbsvcuu.js → TablePlugin-CqCjNBW_.js} +83 -83
  18. package/dist/{TablePlugin-BLbsvcuu.js.map → TablePlugin-CqCjNBW_.js.map} +1 -1
  19. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  20. package/dist/components/FormInput/FormInput.js +1 -1
  21. package/dist/components/InputField/InputField.stories.js +1 -1
  22. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  23. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  24. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  25. package/dist/components/MultiSelect/index.js +1 -1
  26. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  27. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  28. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  29. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  30. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +7 -7
  31. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  32. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  33. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +52 -52
  34. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  35. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
  36. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
  37. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  38. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  39. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  40. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  41. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +27 -27
  42. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  43. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +16 -16
  44. package/dist/components/RteEditor/Plugins/index.js +2 -2
  45. package/dist/components/RteEditor/RteEditor.js +185 -185
  46. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  47. package/dist/components/RteEditor/helpers.js +8 -8
  48. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +11 -11
  49. package/dist/components/index.js +1 -1
  50. package/dist/index.js +1 -1
  51. package/package.json +6 -6
  52. package/dist/Lexical.prod-BAE-wnll.js.map +0 -1
  53. package/dist/LexicalClipboard.prod-BS4qAkmJ.js.map +0 -1
  54. package/dist/LexicalLink.prod-C6Or2Yo6.js.map +0 -1
  55. package/dist/LexicalList.prod-rTq41CO0.js.map +0 -1
  56. package/dist/LexicalTable.prod-BBI7yaOy.js.map +0 -1
@@ -1,23 +1,23 @@
1
- import { jsx as f, jsxs as M, Fragment as Le } from "react/jsx-runtime";
2
- import { t as Xe, r as Ze, o as L } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { aK as Pe, ah as F, A as Ye, a as g, aS as ne, aM as oe, an as O, y as ae, P as Ge, r as I, h, X as Ve, D as c, aW as Qe, ae as et, Z as tt, _ as rt, aX as nt, aY as ot, S as at, aV as D, aG as st, aZ as it, a_ as lt, a$ as ut, j as te, b0 as dt, b1 as ct, a4 as ft, m as mt, a1 as De, T as pt, b2 as gt, b3 as ue, b as de, R as ht, M as G, O as vt, a5 as Te, b4 as ce, H as yt, E as Ct, x as bt, b5 as fe, z as Et, b6 as wt, b7 as St, b8 as $e, aF as xt, V as _t, d as Be, U as Nt, b9 as kt, W as Lt, K as Pt, J as Dt, q as Tt, au as J, at as j, ba as $t, bb as Bt, aw as Rt, bc as re, av as It, bd as At, be as Mt, aQ as Ft } from "../../Lexical.prod-BAE-wnll.js";
1
+ import { jsx as f, jsxs as A, Fragment as ke } from "react/jsx-runtime";
2
+ import { t as Ge, r as Xe, o as k } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
+ import { aK as De, ah as F, L as Ye, b as g, aS as ne, aM as oe, an as U, S as ae, I as Qe, l as R, y as h, Y as Ve, K as c, aW as Ze, ad as et, r as tt, u as rt, aX as nt, aY as ot, U as at, aV as P, aG as st, aZ as it, a_ as lt, a$ as ut, v as te, b0 as dt, b1 as ct, a3 as ft, o as mt, a0 as Pe, J as pt, b2 as gt, b3 as ue, c as de, Q as ht, O as Q, P as vt, a4 as $e, b4 as ce, G as yt, F as Ct, T as bt, b5 as fe, B as Et, b6 as wt, b7 as St, b8 as Te, aF as xt, V as Nt, d as Be, _ as _t, b9 as Lt, W as kt, N as Dt, M as Pt, p as $t, au as W, at as J, ba as Tt, bb as Bt, aw as It, bc as re, av as Rt, bd as Mt, be as At, aQ as Ft } from "../../Lexical.prod-sd_e2sqT.js";
4
4
  import * as Kt from "react";
5
- import { useMemo as Z, useLayoutEffect as U, useEffect as b, useState as A, Suspense as zt, forwardRef as Re, useCallback as Ot, Component as Ut, createElement as me, createContext as Ht, useId as Wt } from "react";
6
- import { a as Jt, T as jt } from "../../TableCellResizerPlugin-HPo4ZkHo.js";
7
- import { T as qt, R as Ie, z as Xt, a as se, A as Ae, l as Zt, K as Yt, F as Gt, d as Me, b as Vt } from "../../LexicalLink.prod-C6Or2Yo6.js";
8
- import { flushSync as Qt, createPortal as er } from "react-dom";
9
- import { U as H, L as z, x as tr } from "../../LexicalUtils.prod-D8DAKg7O.js";
10
- import { R as pe, F as ge, m as rr, g as nr } from "../../LexicalClipboard.prod-BS4qAkmJ.js";
11
- import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-fLzEGOT_.js";
12
- import { l as Fe, n as Ke, L as or, b as ar } from "../../LexicalList.prod-rTq41CO0.js";
13
- import { u as sr, h as ir, d as ze, v as lr, N as ur, y as dr, T as Oe, k as cr } from "../../LexicalTable.prod-BBI7yaOy.js";
5
+ import { useMemo as X, useLayoutEffect as O, useEffect as b, useState as M, Suspense as zt, forwardRef as Ie, useCallback as Ut, Component as Ot, createElement as me, createContext as Ht, useId as jt } from "react";
6
+ import { a as Wt, T as Jt } from "../../TableCellResizerPlugin-DATbSzfg.js";
7
+ import { B as qt, y as Re, F as Gt, a as se, A as Me, l as Xt, z as Yt, G as Qt, d as Ae, b as Vt } from "../../LexicalLink.prod-BCE6Bg2N.js";
8
+ import { flushSync as Zt, createPortal as er } from "react-dom";
9
+ import { U as H, L as z, x as tr } from "../../LexicalUtils.prod-CjKjgnmx.js";
10
+ import { R as pe, F as ge, m as rr, g as nr } from "../../LexicalClipboard.prod-Co2PF1UJ.js";
11
+ import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-CCmcTP6S.js";
12
+ import { l as Fe, n as Ke, L as or, b as ar } from "../../LexicalList.prod-CIB0K0ja.js";
13
+ import { b as sr, u as ir, h as ze, N as lr, y as ur, c as dr, x as Ue, E as cr } from "../../LexicalTable.prod-Oa2YPHLl.js";
14
14
  import { c as Ce } from "../../clsx-OuTLNxxd.js";
15
15
  import { exportMap as fr, mergeBoldStrongTags as mr, cleanUpTable as pr } from "./helpers.js";
16
16
  import { validateUrl as gr, MATCHERS as hr } from "./Plugins/LinkPlugin/helpers.js";
17
- import { s as T } from "../../RteEditor.module-CUi7Vqe8.js";
17
+ import { s as $ } from "../../RteEditor.module-CUi7Vqe8.js";
18
18
  import { ToolBarPlugin as vr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
19
19
  import { useTranslation as yr } from "./hooks/useTranslation.js";
20
- import "../../TablePlugin-BLbsvcuu.js";
20
+ import "../../TablePlugin-CqCjNBW_.js";
21
21
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
22
22
  import "./hooks/components/Flyout.js";
23
23
  import "../Accordion/Accordion.js";
@@ -45,11 +45,11 @@ import { PasteHandlerPlugin as br } from "./Plugins/PasteHandlerPlugin/PasteHand
45
45
  import { UvaTheme as Er } from "./UvaTheme/UvaTheme.js";
46
46
  import { EditorHeader as wr } from "./EditorHeader/EditorHeader.js";
47
47
  import { LanguageProvider as Sr, useLanguage as xr } from "./Providers/LanguageProvider.js";
48
- import { TableWrapperNode as _r } from "./nodes/TableWrapperNode/TableWrapperNode.js";
49
- const Ue = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = Ue ? U : b, q = { tag: ne };
50
- function kr({ initialConfig: r, children: e }) {
51
- const t = Z(() => {
52
- const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Xe(null, n), u = Pe({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
48
+ import { TableWrapperNode as Nr } from "./nodes/TableWrapperNode/TableWrapperNode.js";
49
+ const Oe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, _r = Oe ? O : b, q = { tag: ne };
50
+ function Lr({ initialConfig: r, children: e }) {
51
+ const t = X(() => {
52
+ const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Ge(null, n), u = De({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
53
53
  return (function(m, v) {
54
54
  if (v !== null) {
55
55
  if (v === void 0) m.update(() => {
@@ -57,7 +57,7 @@ function kr({ initialConfig: r, children: e }) {
57
57
  if (S.isEmpty()) {
58
58
  const C = Ye();
59
59
  S.append(C);
60
- const x = Ue ? document.activeElement : null;
60
+ const x = Oe ? document.activeElement : null;
61
61
  (g() !== null || x !== null && x === m.getRootElement()) && C.select();
62
62
  }
63
63
  }, q);
@@ -78,42 +78,42 @@ function kr({ initialConfig: r, children: e }) {
78
78
  }
79
79
  })(u, i), [u, d];
80
80
  }, []);
81
- return Nr(() => {
81
+ return _r(() => {
82
82
  const n = r.editable, [o] = t;
83
83
  o.setEditable(n === void 0 || n);
84
- }, []), f(Ze.Provider, { value: t, children: e });
84
+ }, []), f(Xe.Provider, { value: t, children: e });
85
85
  }
86
- const Lr = oe({ name: "@lexical/react/ReactProvider" });
87
- function Pr() {
86
+ const kr = oe({ name: "@lexical/react/ReactProvider" });
87
+ function Dr() {
88
88
  return F().getTextContent();
89
89
  }
90
- function Dr(r, e = !0) {
90
+ function Pr(r, e = !0) {
91
91
  if (r) return !1;
92
- let t = Pr();
92
+ let t = Dr();
93
93
  return e && (t = t.trim()), t === "";
94
94
  }
95
- function Tr(r) {
96
- if (!Dr(r, !1)) return !1;
95
+ function $r(r) {
96
+ if (!Pr(r, !1)) return !1;
97
97
  const e = F().getChildren(), t = e.length;
98
98
  if (t > 1) return !1;
99
99
  for (let n = 0; n < t; n++) {
100
100
  const o = e[n];
101
- if (O(o)) return !1;
101
+ if (U(o)) return !1;
102
102
  if (ae(o)) {
103
- if (!Ge(o) || o.__indent !== 0) return !1;
103
+ if (!Qe(o) || o.__indent !== 0) return !1;
104
104
  const a = o.getChildren(), s = a.length;
105
105
  for (let i = 0; i < s; i++) {
106
106
  const l = a[n];
107
- if (!I(l)) return !1;
107
+ if (!R(l)) return !1;
108
108
  }
109
109
  }
110
110
  }
111
111
  return !0;
112
112
  }
113
113
  function He(r) {
114
- return () => Tr(r);
114
+ return () => $r(r);
115
115
  }
116
- function $r(r) {
116
+ function Tr(r) {
117
117
  const e = window.location.origin, t = (n) => {
118
118
  if (n.origin !== e) return;
119
119
  const o = r.getRootElement();
@@ -137,10 +137,10 @@ function $r(r) {
137
137
  if (h(C)) {
138
138
  const x = C.anchor;
139
139
  let E = x.getNode(), w = 0, y = 0;
140
- if (I(E) && d >= 0 && u >= 0 && (w = d, y = d + u, C.setTextNodeRange(E, w, E, y)), w === y && m === "" || (C.insertRawText(m), E = x.getNode()), I(E)) {
140
+ if (R(E) && d >= 0 && u >= 0 && (w = d, y = d + u, C.setTextNodeRange(E, w, E, y)), w === y && m === "" || (C.insertRawText(m), E = x.getNode()), R(E)) {
141
141
  w = v, y = v + S;
142
- const _ = E.getTextContentSize();
143
- w = w > _ ? _ : w, y = y > _ ? _ : y, C.setTextNodeRange(E, w, E, y);
142
+ const N = E.getTextContentSize();
143
+ w = w > N ? N : w, y = y > N ? N : y, C.setTextNodeRange(E, w, E, y);
144
144
  }
145
145
  n.stopImmediatePropagation();
146
146
  }
@@ -165,8 +165,8 @@ function be(r, e) {
165
165
  }
166
166
  return null;
167
167
  }
168
- const K = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Br = K && "documentMode" in document ? document.documentMode : null, Rr = K && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Ir = !(!K || !("InputEvent" in window) || Br) && "getTargetRanges" in new window.InputEvent("input"), Ar = K && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = K && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Mr = K && /^(?=.*Chrome).*/i.test(navigator.userAgent), Fr = K && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Rr && !Mr, we = tt("DRAG_DROP_PASTE_FILE");
169
- function X(r) {
168
+ const K = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Br = K && "documentMode" in document ? document.documentMode : null, Ir = K && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Rr = !(!K || !("InputEvent" in window) || Br) && "getTargetRanges" in new window.InputEvent("input"), Mr = K && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = K && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ar = K && /^(?=.*Chrome).*/i.test(navigator.userAgent), Fr = K && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Ir && !Ar, we = tt("DRAG_DROP_PASTE_FILE");
169
+ function G(r) {
170
170
  let e = null;
171
171
  if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
172
172
  const t = e.types, n = t.includes("Files"), o = t.includes("text/html") || t.includes("text/plain");
@@ -188,25 +188,25 @@ function Se(r) {
188
188
  }
189
189
  function xe(r) {
190
190
  const e = te(r);
191
- return O(e);
191
+ return U(e);
192
192
  }
193
193
  function V(r) {
194
194
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
195
195
  }
196
196
  function Kr(r) {
197
- return H(r.registerCommand(Tt, (e) => {
197
+ return H(r.registerCommand($t, (e) => {
198
198
  const t = g();
199
- return !!D(t) && (t.clear(), !0);
200
- }, c), r.registerCommand(G, (e) => {
199
+ return !!P(t) && (t.clear(), !0);
200
+ }, c), r.registerCommand(Q, (e) => {
201
201
  const t = g();
202
- return h(t) ? (t.deleteCharacter(e), !0) : !!D(t) && (t.deleteNodes(), !0);
203
- }, c), r.registerCommand(Dt, (e) => {
202
+ return h(t) ? (t.deleteCharacter(e), !0) : !!P(t) && (t.deleteNodes(), !0);
203
+ }, c), r.registerCommand(Pt, (e) => {
204
204
  const t = g();
205
205
  return !!h(t) && (t.deleteWord(e), !0);
206
- }, c), r.registerCommand(Pt, (e) => {
206
+ }, c), r.registerCommand(Dt, (e) => {
207
207
  const t = g();
208
208
  return !!h(t) && (t.deleteLine(e), !0);
209
- }, c), r.registerCommand(Lt, (e) => {
209
+ }, c), r.registerCommand(kt, (e) => {
210
210
  const t = g();
211
211
  if (typeof e == "string") t !== null && t.insertText(e);
212
212
  else {
@@ -219,15 +219,15 @@ function Kr(r) {
219
219
  }
220
220
  }
221
221
  return !0;
222
- }, c), r.registerCommand(kt, () => {
222
+ }, c), r.registerCommand(Lt, () => {
223
223
  const e = g();
224
224
  return !!h(e) && (e.removeText(), !0);
225
- }, c), r.registerCommand(Nt, (e) => {
225
+ }, c), r.registerCommand(_t, (e) => {
226
226
  const t = g();
227
227
  return !!h(t) && (t.formatText(e), !0);
228
- }, c), r.registerCommand(_t, (e) => {
228
+ }, c), r.registerCommand(Nt, (e) => {
229
229
  const t = g();
230
- if (!h(t) && !D(t)) return !1;
230
+ if (!h(t) && !P(t)) return !1;
231
231
  const n = t.getNodes();
232
232
  for (const o of n) {
233
233
  const a = Be(o, (s) => ae(s) && !s.isInline());
@@ -240,7 +240,7 @@ function Kr(r) {
240
240
  }, c), r.registerCommand(de, () => {
241
241
  const e = g();
242
242
  return !!h(e) && (e.insertParagraph(), !0);
243
- }, c), r.registerCommand(St, () => ($e([xt()]), !0), c), r.registerCommand(wt, () => Se((e) => {
243
+ }, c), r.registerCommand(St, () => (Te([xt()]), !0), c), r.registerCommand(wt, () => Se((e) => {
244
244
  const t = e.getIndent();
245
245
  e.setIndent(t + 1);
246
246
  }), c), r.registerCommand(ce, () => Se((e) => {
@@ -248,17 +248,17 @@ function Kr(r) {
248
248
  t > 0 && e.setIndent(Math.max(0, t - 1));
249
249
  }), c), r.registerCommand(Et, (e) => {
250
250
  const t = g();
251
- if (D(t)) {
251
+ if (P(t)) {
252
252
  const n = t.getNodes();
253
253
  if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
254
254
  } else if (h(t)) {
255
255
  const n = fe(t.focus, !0);
256
- if (!e.shiftKey && O(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
256
+ if (!e.shiftKey && U(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
257
257
  }
258
258
  return !1;
259
259
  }, c), r.registerCommand(bt, (e) => {
260
260
  const t = g();
261
- if (D(t)) {
261
+ if (P(t)) {
262
262
  const n = t.getNodes();
263
263
  if (n.length > 0) return e.preventDefault(), n[0].selectNext(0, 0), !0;
264
264
  } else if (h(t)) {
@@ -267,12 +267,12 @@ function Kr(r) {
267
267
  return a.key === "root" && a.offset === F().getChildrenSize();
268
268
  })(t)) return e.preventDefault(), !0;
269
269
  const n = fe(t.focus, !1);
270
- if (!e.shiftKey && O(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
270
+ if (!e.shiftKey && U(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
271
271
  }
272
272
  return !1;
273
273
  }, c), r.registerCommand(Ct, (e) => {
274
274
  const t = g();
275
- if (D(t)) {
275
+ if (P(t)) {
276
276
  const n = t.getNodes();
277
277
  if (n.length > 0) return e.preventDefault(), he(n[0]) ? n[0].selectNext(0, 0) : n[0].selectPrevious(), !0;
278
278
  }
@@ -284,7 +284,7 @@ function Kr(r) {
284
284
  return !1;
285
285
  }, c), r.registerCommand(yt, (e) => {
286
286
  const t = g();
287
- if (D(t)) {
287
+ if (P(t)) {
288
288
  const o = t.getNodes();
289
289
  if (o.length > 0) return e.preventDefault(), he(o[0]) ? o[0].selectPrevious() : o[0].selectNext(0, 0), !0;
290
290
  }
@@ -300,22 +300,22 @@ function Kr(r) {
300
300
  const { anchor: o } = n;
301
301
  if (o.offset !== 0) return !1;
302
302
  const a = o.getNode();
303
- if (Te(a)) return !1;
303
+ if ($e(a)) return !1;
304
304
  const s = tr(a);
305
305
  return s.getIndent() > 0 && (s.is(a) || a.is(s.getFirstDescendant()));
306
306
  })(t)) return e.preventDefault(), r.dispatchCommand(ce, void 0);
307
307
  if (Ee && navigator.language === "ko-KR") return !1;
308
- } else if (!D(t)) return !1;
309
- return e.preventDefault(), r.dispatchCommand(G, !0);
308
+ } else if (!P(t)) return !1;
309
+ return e.preventDefault(), r.dispatchCommand(Q, !0);
310
310
  }, c), r.registerCommand(ht, (e) => {
311
311
  if (xe(e.target)) return !1;
312
312
  const t = g();
313
- return !(!h(t) && !D(t)) && (e.preventDefault(), r.dispatchCommand(G, !1));
313
+ return !(!h(t) && !P(t)) && (e.preventDefault(), r.dispatchCommand(Q, !1));
314
314
  }, c), r.registerCommand(gt, (e) => {
315
315
  const t = g();
316
316
  if (!h(t)) return !1;
317
317
  if (V(t), e !== null) {
318
- if ((Ee || Ar || Fr) && Ir) return !1;
318
+ if ((Ee || Mr || Fr) && Rr) return !1;
319
319
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(ue, !1);
320
320
  }
321
321
  return r.dispatchCommand(de, void 0);
@@ -323,20 +323,20 @@ function Kr(r) {
323
323
  const e = g();
324
324
  return !!h(e) && (r.blur(), !0);
325
325
  }, c), r.registerCommand(ct, (e) => {
326
- const [, t] = X(e);
326
+ const [, t] = G(e);
327
327
  if (t.length > 0) {
328
328
  const o = be(e.clientX, e.clientY);
329
329
  if (o !== null) {
330
330
  const { offset: a, node: s } = o, i = te(s);
331
331
  if (i !== null) {
332
332
  const l = ft();
333
- if (I(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
333
+ if (R(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
334
334
  else {
335
335
  const u = i.getParentOrThrow().getKey(), m = i.getIndexWithinParent() + 1;
336
336
  l.anchor.set(u, m, "element"), l.focus.set(u, m, "element");
337
337
  }
338
338
  const d = mt(l);
339
- De(d);
339
+ Pe(d);
340
340
  }
341
341
  r.dispatchCommand(we, t);
342
342
  }
@@ -345,31 +345,31 @@ function Kr(r) {
345
345
  const n = g();
346
346
  return !!h(n);
347
347
  }, c), r.registerCommand(dt, (e) => {
348
- const [t] = X(e), n = g();
348
+ const [t] = G(e), n = g();
349
349
  return !(t && !h(n));
350
350
  }, c), r.registerCommand(ut, (e) => {
351
- const [t] = X(e), n = g();
351
+ const [t] = G(e), n = g();
352
352
  if (t && !h(n)) return !1;
353
353
  const o = be(e.clientX, e.clientY);
354
354
  if (o !== null) {
355
355
  const a = te(o.node);
356
- O(a) && e.preventDefault();
356
+ U(a) && e.preventDefault();
357
357
  }
358
358
  return !0;
359
359
  }, c), r.registerCommand(it, () => (lt(), !0), c), r.registerCommand(st, (e) => (ge(r, z(e, ClipboardEvent) ? e : null), !0), c), r.registerCommand(at, (e) => ((async function(t, n) {
360
360
  await ge(n, z(t, ClipboardEvent) ? t : null), n.update(() => {
361
361
  const o = g();
362
- h(o) ? o.removeText() : D(o) && o.getNodes().forEach((a) => a.remove());
362
+ h(o) ? o.removeText() : P(o) && o.getNodes().forEach((a) => a.remove());
363
363
  });
364
364
  })(e, r), !0), c), r.registerCommand(et, (e) => {
365
- const [, t, n] = X(e);
365
+ const [, t, n] = G(e);
366
366
  return t.length > 0 && !n ? (r.dispatchCommand(we, t), !0) : rt(e.target) && nt(e.target) ? !1 : g() !== null && ((function(o, a) {
367
367
  o.preventDefault(), a.update(() => {
368
368
  const s = g(), i = z(o, InputEvent) || z(o, KeyboardEvent) ? null : o.clipboardData;
369
369
  i != null && s !== null && pe(i, s, a);
370
370
  }, { tag: ot });
371
371
  })(e, r), !0);
372
- }, c), r.registerCommand(Qe, (e) => {
372
+ }, c), r.registerCommand(Ze, (e) => {
373
373
  const t = g();
374
374
  return h(t) && V(t), !1;
375
375
  }, c), r.registerCommand(Ve, (e) => {
@@ -383,17 +383,17 @@ function zr(r, ...e) {
383
383
  for (const o of e) n.append("v", o);
384
384
  throw t.search = n.toString(), Error(`Minified Lexical error #${r}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
385
385
  }
386
- const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : b;
387
- function Or({ editor: r, ErrorBoundary: e }) {
386
+ const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
387
+ function Ur({ editor: r, ErrorBoundary: e }) {
388
388
  return (function(t, n) {
389
- const [o, a] = A(() => t.getDecorators());
389
+ const [o, a] = M(() => t.getDecorators());
390
390
  return ie(() => t.registerDecoratorListener((s) => {
391
- Qt(() => {
391
+ Zt(() => {
392
392
  a(s);
393
393
  });
394
394
  }), [t]), b(() => {
395
395
  a(t.getDecorators());
396
- }, [t]), Z(() => {
396
+ }, [t]), X(() => {
397
397
  const s = [], i = Object.keys(o);
398
398
  for (let l = 0; l < i.length; l++) {
399
399
  const d = i[l], u = f(n, { onError: (v) => t._onError(v), children: f(zt, { fallback: null, children: o[d] }) }), m = t.getElementByKey(d);
@@ -403,31 +403,31 @@ function Or({ editor: r, ErrorBoundary: e }) {
403
403
  }, [n, o, t]);
404
404
  })(r, e);
405
405
  }
406
- function Ur({ editor: r, ErrorBoundary: e }) {
406
+ function Or({ editor: r, ErrorBoundary: e }) {
407
407
  return (function(t) {
408
408
  const n = qt.maybeFromEditor(t);
409
- if (n && n.hasExtensionByName(Lr.name)) {
409
+ if (n && n.hasExtensionByName(kr.name)) {
410
410
  for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && zr(320, o);
411
411
  return !0;
412
412
  }
413
413
  return !1;
414
- })(r) ? null : f(Or, { editor: r, ErrorBoundary: e });
414
+ })(r) ? null : f(Ur, { editor: r, ErrorBoundary: e });
415
415
  }
416
- function _e(r) {
416
+ function Ne(r) {
417
417
  return r.getEditorState().read(He(r.isComposing()));
418
418
  }
419
419
  function Hr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
420
- const [n] = L();
420
+ const [n] = k();
421
421
  return (function(o) {
422
- ie(() => H(Kr(o), $r(o)), [o]);
423
- })(n), M(Le, { children: [r, f(Wr, { content: e }), f(Ur, { editor: n, ErrorBoundary: t })] });
422
+ ie(() => H(Kr(o), Tr(o)), [o]);
423
+ })(n), A(ke, { children: [r, f(jr, { content: e }), f(Or, { editor: n, ErrorBoundary: t })] });
424
424
  }
425
- function Wr({ content: r }) {
426
- const [e] = L(), t = (function(o) {
427
- const [a, s] = A(() => _e(o));
425
+ function jr({ content: r }) {
426
+ const [e] = k(), t = (function(o) {
427
+ const [a, s] = M(() => Ne(o));
428
428
  return ie(() => {
429
429
  function i() {
430
- const l = _e(o);
430
+ const l = Ne(o);
431
431
  s(l);
432
432
  }
433
433
  return i(), H(o.registerUpdateListener(() => {
@@ -436,37 +436,37 @@ function Wr({ content: r }) {
436
436
  i();
437
437
  }));
438
438
  }, [o]), a;
439
- })(e), n = Jt();
439
+ })(e), n = Wt();
440
440
  return t ? typeof r == "function" ? r(n) : r : null;
441
441
  }
442
- const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : b;
443
- function Jr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: v, autoCapitalize: S, className: C, id: x, role: E = "textbox", spellCheck: w = !0, style: y, tabIndex: _, "data-testid": P, ...N }, k) {
444
- const [p, $] = A(r.isEditable()), B = Ot((R) => {
445
- R && R.ownerDocument && R.ownerDocument.defaultView ? r.setRootElement(R) : r.setRootElement(null);
446
- }, [r]), Y = Z(() => /* @__PURE__ */ (function(...R) {
442
+ const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
443
+ function Wr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: v, autoCapitalize: S, className: C, id: x, role: E = "textbox", spellCheck: w = !0, style: y, tabIndex: N, "data-testid": D, ..._ }, L) {
444
+ const [p, T] = M(r.isEditable()), B = Ut((I) => {
445
+ I && I.ownerDocument && I.ownerDocument.defaultView ? r.setRootElement(I) : r.setRootElement(null);
446
+ }, [r]), Y = X(() => /* @__PURE__ */ (function(...I) {
447
447
  return (le) => {
448
- for (const W of R) typeof W == "function" ? W(le) : W != null && (W.current = le);
448
+ for (const j of I) typeof j == "function" ? j(le) : j != null && (j.current = le);
449
449
  };
450
- })(k, B), [B, k]);
451
- return We(() => ($(r.isEditable()), r.registerEditableListener((R) => {
452
- $(R);
453
- })), [r]), f("div", { "aria-activedescendant": p ? e : void 0, "aria-autocomplete": p ? t : "none", "aria-controls": p ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": p && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": p ? m : void 0, "aria-readonly": !p || void 0, "aria-required": v, autoCapitalize: S, className: C, contentEditable: p, "data-testid": P, id: x, ref: Y, role: E, spellCheck: w, style: y, tabIndex: _, ...N });
450
+ })(L, B), [B, L]);
451
+ return je(() => (T(r.isEditable()), r.registerEditableListener((I) => {
452
+ T(I);
453
+ })), [r]), f("div", { "aria-activedescendant": p ? e : void 0, "aria-autocomplete": p ? t : "none", "aria-controls": p ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": p && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": p ? m : void 0, "aria-readonly": !p || void 0, "aria-required": v, autoCapitalize: S, className: C, contentEditable: p, "data-testid": D, id: x, ref: Y, role: E, spellCheck: w, style: y, tabIndex: N, ..._ });
454
454
  }
455
- const jr = Re(Jr);
456
- function Ne(r) {
455
+ const Jr = Ie(Wr);
456
+ function _e(r) {
457
457
  return r.getEditorState().read(He(r.isComposing()));
458
458
  }
459
- const qr = Re(Xr);
460
- function Xr(r, e) {
461
- const { placeholder: t, ...n } = r, [o] = L();
462
- return M(Le, { children: [f(jr, { editor: o, ...n, ref: e }), t != null && f(Zr, { editor: o, content: t })] });
459
+ const qr = Ie(Gr);
460
+ function Gr(r, e) {
461
+ const { placeholder: t, ...n } = r, [o] = k();
462
+ return A(ke, { children: [f(Jr, { editor: o, ...n, ref: e }), t != null && f(Xr, { editor: o, content: t })] });
463
463
  }
464
- function Zr({ content: r, editor: e }) {
464
+ function Xr({ content: r, editor: e }) {
465
465
  const t = (function(s) {
466
- const [i, l] = A(() => Ne(s));
467
- return We(() => {
466
+ const [i, l] = M(() => _e(s));
467
+ return je(() => {
468
468
  function d() {
469
- const u = Ne(s);
469
+ const u = _e(s);
470
470
  l(u);
471
471
  }
472
472
  return d(), H(s.registerUpdateListener(() => {
@@ -475,20 +475,20 @@ function Zr({ content: r, editor: e }) {
475
475
  d();
476
476
  }));
477
477
  }, [s]), i;
478
- })(e), [n, o] = A(e.isEditable());
479
- if (U(() => (o(e.isEditable()), e.registerEditableListener((s) => {
478
+ })(e), [n, o] = M(e.isEditable());
479
+ if (O(() => (o(e.isEditable()), e.registerEditableListener((s) => {
480
480
  o(s);
481
481
  })), [e]), !t) return null;
482
482
  let a = null;
483
483
  return typeof r == "function" ? a = r(n) : r !== null && (a = r), a === null ? null : f("div", { "aria-hidden": !0, children: a });
484
484
  }
485
- const Yr = Ht(null), Q = {
485
+ const Yr = Ht(null), Z = {
486
486
  didCatch: !1,
487
487
  error: null
488
488
  };
489
- class Gr extends Ut {
489
+ class Qr extends Ot {
490
490
  constructor(e) {
491
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Q;
491
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Z;
492
492
  }
493
493
  static getDerivedStateFromError(e) {
494
494
  return {
@@ -506,7 +506,7 @@ class Gr extends Ut {
506
506
  (t = (n = this.props).onReset) === null || t === void 0 || t.call(n, {
507
507
  args: a,
508
508
  reason: "imperative-api"
509
- }), this.setState(Q);
509
+ }), this.setState(Z);
510
510
  }
511
511
  }
512
512
  componentDidCatch(e, t) {
@@ -525,7 +525,7 @@ class Gr extends Ut {
525
525
  next: o,
526
526
  prev: e.resetKeys,
527
527
  reason: "keys"
528
- }), this.setState(Q);
528
+ }), this.setState(Z);
529
529
  }
530
530
  }
531
531
  render() {
@@ -566,12 +566,12 @@ function Vr() {
566
566
  let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
567
567
  return r.length !== e.length || r.some((t, n) => !Object.is(t, e[n]));
568
568
  }
569
- function Qr({ children: r, onError: e }) {
570
- return f(Gr, { fallback: f("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
569
+ function Zr({ children: r, onError: e }) {
570
+ return f(Qr, { fallback: f("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
571
571
  }
572
- const en = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : b;
572
+ const en = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
573
573
  function tn({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
574
- const [n] = L();
574
+ const [n] = k();
575
575
  return en(() => {
576
576
  if (t) return n.registerUpdateListener(({ editorState: o, dirtyElements: a, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
577
577
  e && a.size === 0 && s.size === 0 || r && l.has(ne) || i.isEmpty() || t(o, n, l);
@@ -579,7 +579,7 @@ function tn({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1
579
579
  }, [n, r, e, t]), null;
580
580
  }
581
581
  function rn({ hasStrictIndent: r = !1 }) {
582
- const [e] = L();
582
+ const [e] = k();
583
583
  return b(() => {
584
584
  if (!e.hasNodes([Fe, Ke])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
585
585
  }, [e]), b(() => {
@@ -589,27 +589,27 @@ function rn({ hasStrictIndent: r = !1 }) {
589
589
  })(e), null;
590
590
  }
591
591
  function nn({ validateUrl: r, attributes: e }) {
592
- const [t] = L();
592
+ const [t] = k();
593
593
  return b(() => {
594
- if (!t.hasNodes([Ie])) throw new Error("LinkPlugin: LinkNode not registered on editor");
595
- }), b(() => Xt(t, se({ attributes: e, validateUrl: r })), [t, r, e]), null;
594
+ if (!t.hasNodes([Re])) throw new Error("LinkPlugin: LinkNode not registered on editor");
595
+ }), b(() => Gt(t, se({ attributes: e, validateUrl: r })), [t, r, e]), null;
596
596
  }
597
597
  function on(r, e, t) {
598
598
  b(() => {
599
- r.hasNodes([Ae]) || (function(n, ...o) {
599
+ r.hasNodes([Me]) || (function(n, ...o) {
600
600
  const a = new URL("https://lexical.dev/docs/error"), s = new URLSearchParams();
601
601
  s.append("code", n);
602
602
  for (const i of o) s.append("v", i);
603
603
  throw a.search = s.toString(), Error(`Minified Lexical error #${n}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
604
604
  })(77);
605
- }), b(() => Zt(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
605
+ }), b(() => Xt(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
606
606
  }
607
607
  function an({ matchers: r, onChange: e }) {
608
- const [t] = L();
608
+ const [t] = k();
609
609
  return on(t, r, e), null;
610
610
  }
611
611
  function sn({ newTab: r = !0, disabled: e = !1 }) {
612
- const [t] = L();
612
+ const [t] = k();
613
613
  return b(() => Yt(t, se({ disabled: e, newTab: r })), [t, r, e]), null;
614
614
  }
615
615
  function ln(r, e, t, n, o) {
@@ -617,26 +617,26 @@ function ln(r, e, t, n, o) {
617
617
  const a = e._selection, s = r._selection;
618
618
  if (o) return 1;
619
619
  if (!(h(a) && h(s) && s.isCollapsed() && a.isCollapsed())) return 0;
620
- const i = (function(w, y, _) {
621
- const P = w._nodeMap, N = [];
622
- for (const k of y) {
623
- const p = P.get(k);
624
- p !== void 0 && N.push(p);
620
+ const i = (function(w, y, N) {
621
+ const D = w._nodeMap, _ = [];
622
+ for (const L of y) {
623
+ const p = D.get(L);
624
+ p !== void 0 && _.push(p);
625
625
  }
626
- for (const [k, p] of _) {
626
+ for (const [L, p] of N) {
627
627
  if (!p) continue;
628
- const $ = P.get(k);
629
- $ === void 0 || Te($) || N.push($);
628
+ const T = D.get(L);
629
+ T === void 0 || $e(T) || _.push(T);
630
630
  }
631
- return N;
631
+ return _;
632
632
  })(e, t, n);
633
633
  if (i.length === 0) return 0;
634
634
  if (i.length > 1) {
635
- const w = e._nodeMap, y = w.get(a.anchor.key), _ = w.get(s.anchor.key);
636
- return y && _ && !r._nodeMap.has(y.__key) && I(y) && y.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
635
+ const w = e._nodeMap, y = w.get(a.anchor.key), N = w.get(s.anchor.key);
636
+ return y && N && !r._nodeMap.has(y.__key) && R(y) && y.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
637
637
  }
638
638
  const l = i[0], d = r._nodeMap.get(l.__key);
639
- if (!I(d) || !I(l) || d.__mode !== l.__mode) return 0;
639
+ if (!R(d) || !R(l) || d.__mode !== l.__mode) return 0;
640
640
  const u = d.__text, m = l.__text;
641
641
  if (u === m) return 0;
642
642
  const v = a.anchor, S = s.anchor;
@@ -650,90 +650,90 @@ function un(r, e) {
650
650
  const u = Date.now();
651
651
  if (d.has(re)) return n = 0, t = u, 2;
652
652
  const m = ln(o, a, i, l, r.isComposing()), v = (() => {
653
- const S = s === null || s.editor === r, C = d.has(At);
653
+ const S = s === null || s.editor === r, C = d.has(Mt);
654
654
  if (!C && S && d.has(ne)) return 0;
655
655
  if (o === null) return 1;
656
656
  const x = a._selection;
657
657
  if (!(i.size > 0 || l.size > 0)) return x !== null ? 0 : 2;
658
658
  const E = typeof e == "number" ? e : e.peek();
659
- return C === !1 && m !== 0 && m === n && u < t + E && S || i.size === 1 && (function(w, y, _) {
660
- const P = y._nodeMap.get(w), N = _._nodeMap.get(w), k = y._selection, p = _._selection;
661
- return !(h(k) && h(p) && k.anchor.type === "element" && k.focus.type === "element" && p.anchor.type === "text" && p.focus.type === "text" || !I(P) || !I(N) || P.__parent !== N.__parent) && JSON.stringify(y.read(() => P.exportJSON())) === JSON.stringify(_.read(() => N.exportJSON()));
659
+ return C === !1 && m !== 0 && m === n && u < t + E && S || i.size === 1 && (function(w, y, N) {
660
+ const D = y._nodeMap.get(w), _ = N._nodeMap.get(w), L = y._selection, p = N._selection;
661
+ return !(h(L) && h(p) && L.anchor.type === "element" && L.focus.type === "element" && p.anchor.type === "text" && p.focus.type === "text" || !R(D) || !R(_) || D.__parent !== _.__parent) && JSON.stringify(y.read(() => D.exportJSON())) === JSON.stringify(N.read(() => _.exportJSON()));
662
662
  })(Array.from(i)[0], o, a) ? 0 : 1;
663
663
  })();
664
664
  return t = u, n = m, v;
665
665
  };
666
666
  }
667
- function ke(r) {
667
+ function Le(r) {
668
668
  r.undoStack = [], r.redoStack = [], r.current = null;
669
669
  }
670
- function Je(r, e, t) {
670
+ function We(r, e, t) {
671
671
  const n = un(r, t);
672
- return H(r.registerCommand(It, () => ((function(a, s) {
672
+ return H(r.registerCommand(Rt, () => ((function(a, s) {
673
673
  const i = s.redoStack, l = s.undoStack;
674
674
  if (l.length !== 0) {
675
675
  const d = s.current, u = l.pop();
676
- d !== null && (i.push(d), a.dispatchCommand(J, !0)), l.length === 0 && a.dispatchCommand(j, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: re });
676
+ d !== null && (i.push(d), a.dispatchCommand(W, !0)), l.length === 0 && a.dispatchCommand(J, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: re });
677
677
  }
678
- })(r, e), !0), c), r.registerCommand(Rt, () => ((function(a, s) {
678
+ })(r, e), !0), c), r.registerCommand(It, () => ((function(a, s) {
679
679
  const i = s.redoStack, l = s.undoStack;
680
680
  if (i.length !== 0) {
681
681
  const d = s.current;
682
- d !== null && (l.push(d), a.dispatchCommand(j, !0));
682
+ d !== null && (l.push(d), a.dispatchCommand(J, !0));
683
683
  const u = i.pop();
684
- i.length === 0 && a.dispatchCommand(J, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: re });
684
+ i.length === 0 && a.dispatchCommand(W, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: re });
685
685
  }
686
- })(r, e), !0), c), r.registerCommand(Bt, () => (ke(e), !1), c), r.registerCommand($t, () => (ke(e), r.dispatchCommand(J, !1), r.dispatchCommand(j, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
686
+ })(r, e), !0), c), r.registerCommand(Bt, () => (Le(e), !1), c), r.registerCommand(Tt, () => (Le(e), r.dispatchCommand(W, !1), r.dispatchCommand(J, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
687
687
  const u = e.current, m = e.redoStack, v = e.undoStack, S = u === null ? null : u.editorState;
688
688
  if (u !== null && a === S) return;
689
689
  const C = n(s, a, u, i, l, d);
690
- if (C === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(J, !1)), u !== null && (v.push({ ...u }), r.dispatchCommand(j, !0));
690
+ if (C === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(W, !1)), u !== null && (v.push({ ...u }), r.dispatchCommand(J, !0));
691
691
  else if (C === 2) return;
692
692
  e.current = { editor: r, editorState: a };
693
693
  }));
694
694
  }
695
- function je() {
695
+ function Je() {
696
696
  return { current: null, redoStack: [], undoStack: [] };
697
697
  }
698
- const ee = oe({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => se({ delay: e, disabled: n, historyState: t(r) }), config: Ft({ createInitialHistoryState: je, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
698
+ const ee = oe({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => se({ delay: e, disabled: n, historyState: t(r) }), config: Ft({ createInitialHistoryState: Je, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
699
699
  const n = t.getOutput();
700
- return Me(() => n.disabled.value ? void 0 : Je(r, n.historyState.value, n.delay));
700
+ return Ae(() => n.disabled.value ? void 0 : We(r, n.historyState.value, n.delay));
701
701
  } });
702
- oe({ dependencies: [Mt(ee, { createInitialHistoryState: () => {
702
+ oe({ dependencies: [At(ee, { createInitialHistoryState: () => {
703
703
  throw new Error("SharedHistory did not inherit parent history");
704
704
  }, disabled: !0 })], name: "@lexical/history/SharedHistory", register(r, e, t) {
705
705
  const { output: n } = t.getDependency(ee), o = (function(s) {
706
- return s ? Gt(s, ee.name) : null;
706
+ return s ? Qt(s, ee.name) : null;
707
707
  })(r._parentEditor);
708
708
  if (!o) return () => {
709
709
  };
710
710
  const a = o.output;
711
- return Me(() => Vt(() => {
711
+ return Ae(() => Vt(() => {
712
712
  n.delay.value = a.delay.value, n.historyState.value = a.historyState.value, n.disabled.value = a.disabled.value;
713
713
  }));
714
714
  } });
715
715
  function dn({ delay: r, externalHistoryState: e }) {
716
- const [t] = L();
716
+ const [t] = k();
717
717
  return (function(n, o, a = 1e3) {
718
- const s = Z(() => o || je(), [o]);
719
- b(() => Je(n, s, a), [a, n, s]);
718
+ const s = X(() => o || Je(), [o]);
719
+ b(() => We(n, s, a), [a, n, s]);
720
720
  })(t, e, r), null;
721
721
  }
722
722
  function cn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1 }) {
723
- const [o] = L();
723
+ const [o] = k();
724
724
  return b(() => {
725
725
  sr(o) !== n && (ir(o, n), o.registerNodeTransform(ze, () => {
726
726
  })());
727
727
  }, [o, n]), b(() => lr(o), [o]), b(() => ur(o, t), [o, t]), b(() => {
728
728
  if (!r) return dr(o);
729
729
  }, [o, r]), b(() => {
730
- if (!e) return o.registerNodeTransform(Oe, (a) => {
730
+ if (!e) return o.registerNodeTransform(Ue, (a) => {
731
731
  a.getBackgroundColor() !== null && a.setBackgroundColor(null);
732
732
  });
733
733
  }, [o, e, r]), null;
734
734
  }
735
735
  function fn({ editorRef: r }) {
736
- const [e] = L();
736
+ const [e] = k();
737
737
  return Kt.useEffect(() => {
738
738
  typeof r == "function" ? r(e) : typeof r == "object" && (r.current = e);
739
739
  }, [e]), null;
@@ -752,7 +752,7 @@ const qe = 200, mn = ({
752
752
  rteRef: u = null,
753
753
  onChange: m
754
754
  }) => {
755
- const { switchLanguage: v } = xr(), S = yr(), [C] = A(() => Pe()), [x, E] = A(0), [w, y] = A(0), _ = Wt(), P = {
755
+ const { switchLanguage: v } = xr(), S = yr(), [C] = M(() => De()), [x, E] = M(0), [w, y] = M(0), N = jt(), D = {
756
756
  html: {
757
757
  export: fr
758
758
  },
@@ -762,27 +762,27 @@ const qe = 200, mn = ({
762
762
  onError(p) {
763
763
  throw p;
764
764
  },
765
- nodes: [Fe, Ke, Ie, Ae, Oe, cr, ze, _r],
765
+ nodes: [Fe, Ke, Re, Me, Ue, cr, ze, Nr],
766
766
  editorState: (p) => {
767
767
  const B = new DOMParser().parseFromString(e, "text/html"), Y = rr(p, B);
768
- F().clear(), $e(Y), De(null);
768
+ F().clear(), Te(Y), Pe(null);
769
769
  }
770
- }, N = (p) => p.trim().length === 0 ? 0 : p.split(" ").length, k = (p, $) => {
770
+ }, _ = (p) => p.trim().length === 0 ? 0 : p.split(" ").length, L = (p, T) => {
771
771
  p.read(() => {
772
772
  let B = "";
773
- E(N(F().getTextContent().replace(/\s+/g, " ").trim())), B = mr(nr($)), B = pr(B), m(B);
773
+ E(_(F().getTextContent().replace(/\s+/g, " ").trim())), B = mr(nr(T)), B = pr(B), m(B);
774
774
  });
775
775
  };
776
776
  return b(() => {
777
777
  v(r.toLocaleLowerCase());
778
778
  }, [r, v]), b(() => {
779
779
  const p = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
780
- E(N(p));
781
- }, [e]), /* @__PURE__ */ M("div", { className: T.editor__container, children: [
782
- /* @__PURE__ */ M("div", { className: T.editor__header, children: [
780
+ E(_(p));
781
+ }, [e]), /* @__PURE__ */ A("div", { className: $.editor__container, children: [
782
+ /* @__PURE__ */ A("div", { className: $.editor__header, children: [
783
783
  /* @__PURE__ */ f(wr, { label: n, info: o, required: a }),
784
- /* @__PURE__ */ M("div", { className: T["editor__header-word-count"], children: [
785
- /* @__PURE__ */ f("span", { className: Ce({ [T["editor__header-word-count--alert"]]: x > d }), children: x }),
784
+ /* @__PURE__ */ A("div", { className: $["editor__header-word-count"], children: [
785
+ /* @__PURE__ */ f("span", { className: Ce({ [$["editor__header-word-count--alert"]]: x > d }), children: x }),
786
786
  " / ",
787
787
  d
788
788
  ] })
@@ -790,41 +790,41 @@ const qe = 200, mn = ({
790
790
  /* @__PURE__ */ f(
791
791
  "div",
792
792
  {
793
- className: Ce(T.editor, {
794
- [T["not-valid"]]: s
793
+ className: Ce($.editor, {
794
+ [$["not-valid"]]: s
795
795
  }),
796
- children: /* @__PURE__ */ M(kr, { initialConfig: P, children: [
796
+ children: /* @__PURE__ */ A(Lr, { initialConfig: D, children: [
797
797
  /* @__PURE__ */ f(vr, { editorScrollPosition: w }),
798
- /* @__PURE__ */ M("div", { className: T["editor__field-wrapper"], children: [
798
+ /* @__PURE__ */ A("div", { className: $["editor__field-wrapper"], children: [
799
799
  /* @__PURE__ */ f(
800
800
  Hr,
801
801
  {
802
802
  contentEditable: /* @__PURE__ */ f(
803
803
  qr,
804
804
  {
805
- className: T.editor__field,
805
+ className: $.editor__field,
806
806
  "aria-label": S.common.rteAriaLabel,
807
807
  "aria-placeholder": t,
808
808
  title: S.common.rteTitle,
809
- placeholder: /* @__PURE__ */ f("div", { className: T.editor__placeholder, children: t }),
809
+ placeholder: /* @__PURE__ */ f("div", { className: $.editor__placeholder, children: t }),
810
810
  spellCheck: !1,
811
- id: `${_}_rteEditor`,
811
+ id: `${N}_rteEditor`,
812
812
  style: { height: `${l}`, maxHeight: `${l}` },
813
813
  onScroll: (p) => y(p.currentTarget.scrollTop)
814
814
  }
815
815
  ),
816
- placeholder: /* @__PURE__ */ f("div", { className: T.editor__placeholder, children: t }),
817
- ErrorBoundary: Qr
816
+ placeholder: /* @__PURE__ */ f("div", { className: $.editor__placeholder, children: t }),
817
+ ErrorBoundary: Zr
818
818
  }
819
819
  ),
820
820
  /* @__PURE__ */ f(cn, {}),
821
- /* @__PURE__ */ f(jt, {}),
821
+ /* @__PURE__ */ f(Jt, {}),
822
822
  /* @__PURE__ */ f(dn, {}),
823
823
  /* @__PURE__ */ f(rn, {}),
824
824
  /* @__PURE__ */ f(nn, { validateUrl: gr }),
825
825
  /* @__PURE__ */ f(an, { matchers: hr }),
826
826
  /* @__PURE__ */ f(sn, {}),
827
- /* @__PURE__ */ f(tn, { onChange: k }),
827
+ /* @__PURE__ */ f(tn, { onChange: L }),
828
828
  /* @__PURE__ */ f(br, {}),
829
829
  u && /* @__PURE__ */ f(fn, { editorRef: u })
830
830
  ] })