@uva-glass/component-library 3.50.13 → 3.50.15

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