@uva-glass/component-library 1.52.0 → 1.53.0

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 (68) hide show
  1. package/dist/{Lexical.prod-DSsdOWxu.js → Lexical.prod-DNRTKPfN.js} +264 -251
  2. package/dist/Lexical.prod-DNRTKPfN.js.map +1 -0
  3. package/dist/LexicalUtils.prod-D_BPEjfg.js +64 -0
  4. package/dist/LexicalUtils.prod-D_BPEjfg.js.map +1 -0
  5. package/dist/ListPlugin-CgNBzfIl.js +588 -0
  6. package/dist/ListPlugin-CgNBzfIl.js.map +1 -0
  7. package/dist/RteEditor.module-BjGyWKhW.js +26 -0
  8. package/dist/RteEditor.module-BjGyWKhW.js.map +1 -0
  9. package/dist/assets/RteEditor.css +1 -1
  10. package/dist/assets/useFlyout.css +1 -0
  11. package/dist/components/Buttons/Button.stories.js +1 -1
  12. package/dist/components/Buttons/Button.stories.js.map +1 -1
  13. package/dist/components/Buttons/LinkButton.stories.js +5 -5
  14. package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
  15. package/dist/components/Buttons/MenuButton.stories.js +10 -10
  16. package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
  17. package/dist/components/HorizontalList/HorizontalList.stories.js +1 -1
  18. package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
  19. package/dist/components/Icon/Icon.d.ts +1 -1
  20. package/dist/components/Icon/Icon.js.map +1 -1
  21. package/dist/components/Icon/icons/index.d.ts +9 -0
  22. package/dist/components/Icon/icons/index.js +52 -37
  23. package/dist/components/Icon/icons/index.js.map +1 -1
  24. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
  25. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.d.ts +1 -0
  26. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +62 -0
  27. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -0
  28. package/dist/components/RteEditor/Plugins/HistoryPlugin/index.d.ts +1 -0
  29. package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +5 -0
  30. package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js.map +1 -0
  31. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.d.ts +6 -0
  32. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +98 -0
  33. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -0
  34. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.d.ts +8 -0
  35. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +7 -0
  36. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -0
  37. package/dist/components/RteEditor/Plugins/LinkPlugin/index.d.ts +1 -0
  38. package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +5 -0
  39. package/dist/components/RteEditor/Plugins/LinkPlugin/index.js.map +1 -0
  40. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
  41. package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
  42. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.d.ts +6 -0
  43. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +34 -27
  44. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  45. package/dist/components/RteEditor/Plugins/index.d.ts +2 -0
  46. package/dist/components/RteEditor/Plugins/index.js +10 -6
  47. package/dist/components/RteEditor/Plugins/index.js.map +1 -1
  48. package/dist/components/RteEditor/RteEditor.js +681 -501
  49. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  50. package/dist/components/RteEditor/RteEditor.stories.js +1 -1
  51. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  52. package/dist/components/RteEditor/UvaTheme/UvaTheme.d.ts +1 -0
  53. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +5 -4
  54. package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
  55. package/dist/components/RteEditor/hooks/index.d.ts +1 -0
  56. package/dist/components/RteEditor/hooks/index.js +5 -0
  57. package/dist/components/RteEditor/hooks/index.js.map +1 -0
  58. package/dist/components/RteEditor/hooks/useFlyout.d.ts +12 -0
  59. package/dist/components/RteEditor/hooks/useFlyout.js +45 -0
  60. package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -0
  61. package/dist/helpers-TSjo3aAv.js +365 -0
  62. package/dist/helpers-TSjo3aAv.js.map +1 -0
  63. package/package.json +15 -15
  64. package/dist/Lexical.prod-DSsdOWxu.js.map +0 -1
  65. package/dist/ListPlugin-Bu2AbCDB.js +0 -643
  66. package/dist/ListPlugin-Bu2AbCDB.js.map +0 -1
  67. package/dist/RteEditor.module-RkKUrkOO.js +0 -21
  68. package/dist/RteEditor.module-RkKUrkOO.js.map +0 -1
@@ -22,9 +22,9 @@ function Yi() {
22
22
  function eo(n) {
23
23
  return {};
24
24
  }
25
- const kn = {}, to = {}, Ms = {}, yt = {}, gt = {}, Xn = {}, je = {}, Wr = {}, Zn = {}, mt = {}, xt = {}, we = {}, zr = {}, Br = {}, Ws = {}, zs = {}, Bs = {}, Rs = {}, Ks = {}, $s = {}, Js = {}, un = {}, Us = {}, Vs = {}, js = {}, Hs = {}, qs = {}, no = {}, ro = {}, so = {}, Qs = {}, io = {}, Xs = {}, Zs = {}, Gs = {}, Rr = {}, Kr = {}, Gn = {}, Ys = {}, ei = {}, ti = {}, ne = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, ni = ne && "documentMode" in document ? document.documentMode : null, Y = ne && /Mac|iPod|iPhone|iPad/.test(navigator.platform), xe = ne && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), vt = !(!ne || !("InputEvent" in window) || ni) && "getTargetRanges" in new window.InputEvent("input"), bn = ne && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), It = ne && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, ri = ne && /Android/.test(navigator.userAgent), $r = ne && /^(?=.*Chrome).*/i.test(navigator.userAgent), si = ne && ri && $r, wn = ne && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !$r, nt = 1, Te = 3, Ee = 0, Jr = 1, Ae = 2, ii = 0, oi = 1, li = 2, St = 4, Tt = 8, Nn = 128, ci = 112 | (3 | St | Tt) | Nn, En = 1, Pn = 2, Fn = 3, Dn = 4, Ln = 5, On = 6, At = bn || It || wn ? " " : "​", ae = `
25
+ const kn = {}, to = {}, Ms = {}, yt = {}, gt = {}, Zn = {}, je = {}, zr = {}, Gn = {}, mt = {}, xt = {}, we = {}, Br = {}, Rr = {}, Ws = {}, zs = {}, Bs = {}, Rs = {}, Ks = {}, $s = {}, Js = {}, un = {}, Us = {}, Vs = {}, js = {}, Hs = {}, qs = {}, no = {}, ro = {}, so = {}, Qs = {}, io = {}, Xs = {}, Zs = {}, Gs = {}, Kr = {}, $r = {}, Yn = {}, oo = {}, lo = {}, co = {}, ao = {}, Ys = {}, ei = {}, ti = {}, ne = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, ni = ne && "documentMode" in document ? document.documentMode : null, Y = ne && /Mac|iPod|iPhone|iPad/.test(navigator.platform), xe = ne && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), vt = !(!ne || !("InputEvent" in window) || ni) && "getTargetRanges" in new window.InputEvent("input"), bn = ne && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), It = ne && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, ri = ne && /Android/.test(navigator.userAgent), Jr = ne && /^(?=.*Chrome).*/i.test(navigator.userAgent), si = ne && ri && Jr, wn = ne && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Jr, nt = 1, Te = 3, Ee = 0, Ur = 1, Ae = 2, ii = 0, oi = 1, li = 2, St = 4, Tt = 8, Nn = 128, ci = 112 | (3 | St | Tt) | Nn, En = 1, Pn = 2, Fn = 3, Dn = 4, Ln = 5, On = 6, At = bn || It || wn ? " " : "​", ae = `
26
26
 
27
- `, ai = xe ? " " : At, Ur = "֑-߿יִ-﷽ﹰ-ﻼ", Vr = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", ui = new RegExp("^[^" + Vr + "]*[" + Ur + "]"), fi = new RegExp("^[^" + Ur + "]*[" + Vr + "]"), ce = { bold: 1, code: 16, highlight: Nn, italic: 2, strikethrough: St, subscript: 32, superscript: 64, underline: Tt }, di = { directionless: 1, unmergeable: 2 }, Yn = { center: Pn, end: On, justify: Dn, left: En, right: Fn, start: Ln }, hi = { [Pn]: "center", [On]: "end", [Dn]: "justify", [En]: "left", [Fn]: "right", [Ln]: "start" }, gi = { normal: 0, segmented: 2, token: 1 }, _i = { [ii]: "normal", [li]: "segmented", [oi]: "token" };
27
+ `, ai = xe ? " " : At, Vr = "֑-߿יִ-﷽ﹰ-ﻼ", jr = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", ui = new RegExp("^[^" + jr + "]*[" + Vr + "]"), fi = new RegExp("^[^" + Vr + "]*[" + jr + "]"), ce = { bold: 1, code: 16, highlight: Nn, italic: 2, strikethrough: St, subscript: 32, superscript: 64, underline: Tt }, di = { directionless: 1, unmergeable: 2 }, er = { center: Pn, end: On, justify: Dn, left: En, right: Fn, start: Ln }, hi = { [Pn]: "center", [On]: "end", [Dn]: "justify", [En]: "left", [Fn]: "right", [Ln]: "start" }, gi = { normal: 0, segmented: 2, token: 1 }, _i = { [ii]: "normal", [li]: "segmented", [oi]: "token" };
28
28
  function pi(n) {
29
29
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
30
30
  }
@@ -61,7 +61,7 @@ function vi(n, e, t) {
61
61
  }
62
62
  return e.nodeType === Te && t.isAttached();
63
63
  }
64
- function jr(n, e, t) {
64
+ function Hr(n, e, t) {
65
65
  fn = !0;
66
66
  const r = performance.now() - In > yi;
67
67
  try {
@@ -82,7 +82,7 @@ function jr(n, e, t) {
82
82
  a = !0;
83
83
  const m = d.addedNodes;
84
84
  for (let C = 0; C < m.length; C++) {
85
- const k = m[C], v = Zr(k), P = k.parentNode;
85
+ const k = m[C], v = Gr(k), P = k.parentNode;
86
86
  if (P != null && k !== c && v === null && (k.nodeName !== "BR" || !Yt(k, P, n))) {
87
87
  if (xe) {
88
88
  const T = k.innerText || k.nodeValue;
@@ -98,7 +98,7 @@ function jr(n, e, t) {
98
98
  const v = y[k];
99
99
  (v.nodeName === "BR" && Yt(v, p, n) || c === v) && (p.appendChild(v), C++);
100
100
  }
101
- x !== C && (p === o && (_ = Yr(l)), i.set(p, _));
101
+ x !== C && (p === o && (_ = es(l)), i.set(p, _));
102
102
  }
103
103
  }
104
104
  }
@@ -122,38 +122,38 @@ function jr(n, e, t) {
122
122
  }
123
123
  t.takeRecords();
124
124
  }
125
- s !== null && (a && (s.dirty = !0, ue(s)), xe && rs(n) && s.insertRawText(f));
125
+ s !== null && (a && (s.dirty = !0, ue(s)), xe && ss(n) && s.insertRawText(f));
126
126
  });
127
127
  } finally {
128
128
  fn = !1;
129
129
  }
130
130
  }
131
- function Hr(n) {
131
+ function qr(n) {
132
132
  const e = n._observer;
133
- e !== null && jr(n, e.takeRecords(), e);
133
+ e !== null && Hr(n, e.takeRecords(), e);
134
134
  }
135
- function qr(n) {
135
+ function Qr(n) {
136
136
  (function(e) {
137
137
  In === 0 && Kt(e).addEventListener("textInput", mi, !0);
138
138
  })(n), n._observer = new MutationObserver((e, t) => {
139
- jr(n, e, t);
139
+ Hr(n, e, t);
140
140
  });
141
141
  }
142
- function er(n, e) {
142
+ function tr(n, e) {
143
143
  const t = n.__mode, r = n.__format, s = n.__style, i = e.__mode, o = e.__format, l = e.__style;
144
144
  return !(t !== null && t !== i || r !== null && r !== o || s !== null && s !== l);
145
145
  }
146
- function tr(n, e) {
146
+ function nr(n, e) {
147
147
  const t = n.mergeWithSibling(e), r = M()._normalizedNodes;
148
148
  return r.add(n.__key), r.add(e.__key), t;
149
149
  }
150
- function nr(n) {
150
+ function rr(n) {
151
151
  let e, t, r = n;
152
152
  if (r.__text !== "" || !r.isSimpleText() || r.isUnmergeable()) {
153
153
  for (; (e = r.getPreviousSibling()) !== null && N(e) && e.isSimpleText() && !e.isUnmergeable(); ) {
154
154
  if (e.__text !== "") {
155
- if (er(e, r)) {
156
- r = tr(e, r);
155
+ if (tr(e, r)) {
156
+ r = nr(e, r);
157
157
  break;
158
158
  }
159
159
  break;
@@ -162,8 +162,8 @@ function nr(n) {
162
162
  }
163
163
  for (; (t = r.getNextSibling()) !== null && N(t) && t.isSimpleText() && !t.isUnmergeable(); ) {
164
164
  if (t.__text !== "") {
165
- if (er(r, t)) {
166
- r = tr(r, t);
165
+ if (tr(r, t)) {
166
+ r = nr(r, t);
167
167
  break;
168
168
  }
169
169
  break;
@@ -173,9 +173,9 @@ function nr(n) {
173
173
  } else r.remove();
174
174
  }
175
175
  function Si(n) {
176
- return rr(n.anchor), rr(n.focus), n;
176
+ return sr(n.anchor), sr(n.focus), n;
177
177
  }
178
- function rr(n) {
178
+ function sr(n) {
179
179
  for (; n.type === "element"; ) {
180
180
  const e = n.getNode(), t = n.offset;
181
181
  let r, s;
@@ -191,7 +191,7 @@ let Ti = 1;
191
191
  const Ci = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
192
192
  Promise.resolve().then(n);
193
193
  };
194
- function Qr(n) {
194
+ function Xr(n) {
195
195
  const e = document.activeElement;
196
196
  if (e === null) return !1;
197
197
  const t = e.nodeName;
@@ -200,7 +200,7 @@ function Qr(n) {
200
200
  function Mt(n, e, t) {
201
201
  const r = n.getRootElement();
202
202
  try {
203
- return r !== null && r.contains(e) && r.contains(t) && e !== null && !Qr(e) && Xr(e) === n;
203
+ return r !== null && r.contains(e) && r.contains(t) && e !== null && !Xr(e) && Zr(e) === n;
204
204
  } catch {
205
205
  return !1;
206
206
  }
@@ -208,7 +208,7 @@ function Mt(n, e, t) {
208
208
  function An(n) {
209
209
  return n instanceof Qt;
210
210
  }
211
- function Xr(n) {
211
+ function Zr(n) {
212
212
  let e = n;
213
213
  for (; e != null; ) {
214
214
  const t = Wt(e);
@@ -240,14 +240,14 @@ function bt(n, e, t) {
240
240
  let s = n ^ r;
241
241
  return e === "subscript" ? s &= ~ce.superscript : e === "superscript" && (s &= ~ce.subscript), s;
242
242
  }
243
- function oo(n) {
243
+ function uo(n) {
244
244
  return N(n) || Ie(n) || A(n);
245
245
  }
246
246
  function bi(n, e) {
247
247
  if (e != null) return void (n.__key = e);
248
248
  q(), ks();
249
249
  const t = M(), r = fe(), s = "" + Ti++;
250
- r._nodeMap.set(s, n), S(n) ? t._dirtyElements.set(s, !0) : t._dirtyLeaves.add(s), t._cloneNotNeeded.add(s), t._dirtyType = Jr, n.__key = s;
250
+ r._nodeMap.set(s, n), S(n) ? t._dirtyElements.set(s, !0) : t._dirtyLeaves.add(s), t._cloneNotNeeded.add(s), t._dirtyType = Ur, n.__key = s;
251
251
  }
252
252
  function Ne(n) {
253
253
  const e = n.getParent();
@@ -293,7 +293,7 @@ function wt(n) {
293
293
  }
294
294
  }(t, i, o);
295
295
  const l = e.__key;
296
- s._dirtyType = Jr, S(n) ? o.set(l, !0) : s._dirtyLeaves.add(l);
296
+ s._dirtyType = Ur, S(n) ? o.set(l, !0) : s._dirtyLeaves.add(l);
297
297
  }
298
298
  function J(n) {
299
299
  q();
@@ -316,30 +316,30 @@ function V(n, e) {
316
316
  const t = (e || fe())._nodeMap.get(n);
317
317
  return t === void 0 ? null : t;
318
318
  }
319
- function Zr(n, e) {
319
+ function Gr(n, e) {
320
320
  const t = n[`__lexicalKey_${M()._key}`];
321
321
  return t !== void 0 ? V(t, e) : null;
322
322
  }
323
323
  function zt(n, e) {
324
324
  let t = n;
325
325
  for (; t != null; ) {
326
- const r = Zr(t, e);
326
+ const r = Gr(t, e);
327
327
  if (r !== null) return r;
328
328
  t = Rt(t);
329
329
  }
330
330
  return null;
331
331
  }
332
- function Gr(n) {
332
+ function Yr(n) {
333
333
  const e = n._decorators, t = Object.assign({}, e);
334
334
  return n._pendingDecorators = t, t;
335
335
  }
336
- function sr(n) {
336
+ function ir(n) {
337
337
  return n.read(() => G().getTextContent());
338
338
  }
339
339
  function G() {
340
- return Yr(fe());
340
+ return es(fe());
341
341
  }
342
- function Yr(n) {
342
+ function es(n) {
343
343
  return n._nodeMap.get("root");
344
344
  }
345
345
  function ue(n) {
@@ -359,10 +359,10 @@ function Le(n) {
359
359
  }(n, e);
360
360
  return t === null ? n === e.getRootElement() ? V("root") : null : V(t);
361
361
  }
362
- function ir(n, e) {
362
+ function or(n, e) {
363
363
  return e ? n.getTextContentSize() : 0;
364
364
  }
365
- function es(n) {
365
+ function ts(n) {
366
366
  return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n);
367
367
  }
368
368
  function Mn(n) {
@@ -371,10 +371,10 @@ function Mn(n) {
371
371
  for (; t !== null; ) e.push(t), t = t._parentEditor;
372
372
  return e;
373
373
  }
374
- function ts() {
374
+ function ns() {
375
375
  return Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 5);
376
376
  }
377
- function ns(n) {
377
+ function rs(n) {
378
378
  return n.nodeType === Te ? n.nodeValue : null;
379
379
  }
380
380
  function Wn(n, e, t) {
@@ -383,7 +383,7 @@ function Wn(n, e, t) {
383
383
  const s = r.anchorNode;
384
384
  let { anchorOffset: i, focusOffset: o } = r;
385
385
  if (s !== null) {
386
- let l = ns(s);
386
+ let l = rs(s);
387
387
  const c = zt(s);
388
388
  if (l !== null && N(c)) {
389
389
  if (l === At && t) {
@@ -435,16 +435,16 @@ function wi(n, e) {
435
435
  return (N(o) || S(o) && o.isInline()) && !o.canInsertTextAfter();
436
436
  }(e) : t === e.getTextContentSize() && (!e.canInsertTextAfter() || !r.canInsertTextAfter() && !e.isComposing() || s);
437
437
  }
438
- function or(n) {
438
+ function lr(n) {
439
439
  return n === "ArrowLeft";
440
440
  }
441
- function lr(n) {
441
+ function cr(n) {
442
442
  return n === "ArrowRight";
443
443
  }
444
444
  function Ue(n, e) {
445
445
  return Y ? n : e;
446
446
  }
447
- function cr(n) {
447
+ function ar(n) {
448
448
  return n === "Enter";
449
449
  }
450
450
  function Re(n) {
@@ -453,10 +453,10 @@ function Re(n) {
453
453
  function Ke(n) {
454
454
  return n === "Delete";
455
455
  }
456
- function ar(n, e, t) {
456
+ function ur(n, e, t) {
457
457
  return n.toLowerCase() === "a" && Ue(e, t);
458
458
  }
459
- function lo() {
459
+ function fo() {
460
460
  const n = G();
461
461
  ue(Si(n.select(0, n.getChildrenSize())));
462
462
  }
@@ -481,25 +481,25 @@ function Bn(n, e, t, r, s) {
481
481
  const f = a.get(o), h = f === "destroyed" && s === "created";
482
482
  (f === void 0 || h) && a.set(o, h ? "updated" : s);
483
483
  }
484
- function ur(n, e, t) {
484
+ function fr(n, e, t) {
485
485
  const r = n.getParent();
486
486
  let s = t, i = n;
487
487
  return r !== null && (e && t === 0 ? (s = i.getIndexWithinParent(), i = r) : e || t !== i.getChildrenSize() || (s = i.getIndexWithinParent() + 1, i = r)), i.getChildAtIndex(e ? s - 1 : s);
488
488
  }
489
- function fr(n, e) {
489
+ function dr(n, e) {
490
490
  const t = n.offset;
491
491
  if (n.type === "element")
492
- return ur(n.getNode(), e, t);
492
+ return fr(n.getNode(), e, t);
493
493
  {
494
494
  const r = n.getNode();
495
495
  if (e && t === 0 || !e && t === r.getTextContentSize()) {
496
496
  const s = e ? r.getPreviousSibling() : r.getNextSibling();
497
- return s === null ? ur(r.getParentOrThrow(), e, r.getIndexWithinParent() + (e ? 0 : 1)) : s;
497
+ return s === null ? fr(r.getParentOrThrow(), e, r.getIndexWithinParent() + (e ? 0 : 1)) : s;
498
498
  }
499
499
  }
500
500
  return null;
501
501
  }
502
- function rs(n) {
502
+ function ss(n) {
503
503
  const e = Kt(n).event, t = e && e.inputType;
504
504
  return t === "insertFromPaste" || t === "insertFromPasteAsQuotation";
505
505
  }
@@ -597,17 +597,20 @@ function Ei(n, e, t) {
597
597
  function se(n) {
598
598
  return ne ? (n || window).getSelection() : null;
599
599
  }
600
- function ss(n) {
600
+ function ho(n) {
601
+ return Kn(n) && n.tagName === "A";
602
+ }
603
+ function Kn(n) {
601
604
  return n.nodeType === 1;
602
605
  }
603
- function co(n) {
606
+ function go(n) {
604
607
  return n.nodeType === 11;
605
608
  }
606
609
  function Pi(n) {
607
610
  const e = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/, "i");
608
611
  return n.nodeName.match(e) !== null;
609
612
  }
610
- function dr(n) {
613
+ function hr(n) {
611
614
  const e = new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/, "i");
612
615
  return n.nodeName.match(e) !== null;
613
616
  }
@@ -622,16 +625,16 @@ function $e(n, e) {
622
625
  for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
623
626
  return e(t) ? t : null;
624
627
  }
625
- function ao() {
628
+ function _o() {
626
629
  return M();
627
630
  }
628
- const hr = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new Map();
631
+ const gr = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new Map();
629
632
  function Di(n) {
630
633
  if (!n._readOnly && n.isEmpty()) return Fi;
631
634
  n._readOnly || b(192);
632
- let e = hr.get(n);
635
+ let e = gr.get(n);
633
636
  if (!e) {
634
- e = /* @__PURE__ */ new Map(), hr.set(n, e);
637
+ e = /* @__PURE__ */ new Map(), gr.set(n, e);
635
638
  for (const [t, r] of n._nodeMap) {
636
639
  const s = r.__type;
637
640
  let i = e.get(s);
@@ -732,12 +735,12 @@ function pn(n, e, t, r, s, i) {
732
735
  }
733
736
  Bt(e) && (B += ae), s.__lexicalTextContent = B, B = o + B;
734
737
  }
735
- function gr(n, e) {
738
+ function _r(n, e) {
736
739
  const t = e.get(n);
737
740
  return Ie(t) || A(t) && t.isInline();
738
741
  }
739
742
  function as(n, e, t) {
740
- const r = n !== null && (n.__size === 0 || gr(n.__last, Pe)), s = e.__size === 0 || gr(e.__last, te);
743
+ const r = n !== null && (n.__size === 0 || _r(n.__last, Pe)), s = e.__size === 0 || _r(e.__last, te);
741
744
  if (r) {
742
745
  if (!s) {
743
746
  const i = t.__lexicalLineBreak;
@@ -903,7 +906,7 @@ function fs(n, e) {
903
906
  const r = H._decorators;
904
907
  if (t === null) {
905
908
  if (r[n] === e) return;
906
- t = Gr(H);
909
+ t = Yr(H);
907
910
  }
908
911
  t[n] = e;
909
912
  }
@@ -924,13 +927,13 @@ const oe = Object.freeze({}), mn = 30, xn = [["keydown", function(n, e) {
924
927
  if (Qe = n.timeStamp, ds = n.key, e.isComposing()) return;
925
928
  const { key: t, shiftKey: r, ctrlKey: s, metaKey: i, altKey: o } = n;
926
929
  w(e, Ws, n) || t != null && (function(l, c, a, f) {
927
- return lr(l) && !c && !f && !a;
930
+ return cr(l) && !c && !f && !a;
928
931
  }(t, s, o, i) ? w(e, zs, n) : function(l, c, a, f, h) {
929
- return lr(l) && !f && !a && (c || h);
932
+ return cr(l) && !f && !a && (c || h);
930
933
  }(t, s, r, o, i) ? w(e, Bs, n) : function(l, c, a, f) {
931
- return or(l) && !c && !f && !a;
934
+ return lr(l) && !c && !f && !a;
932
935
  }(t, s, o, i) ? w(e, Rs, n) : function(l, c, a, f, h) {
933
- return or(l) && !f && !a && (c || h);
936
+ return lr(l) && !f && !a && (c || h);
934
937
  }(t, s, r, o, i) ? w(e, Ks, n) : /* @__PURE__ */ function(l, c, a) {
935
938
  return /* @__PURE__ */ function(f) {
936
939
  return f === "ArrowUp";
@@ -940,13 +943,13 @@ const oe = Object.freeze({}), mn = 30, xn = [["keydown", function(n, e) {
940
943
  return f === "ArrowDown";
941
944
  }(l) && !c && !a;
942
945
  }(t, s, i) ? w(e, Js, n) : function(l, c) {
943
- return cr(l) && c;
946
+ return ar(l) && c;
944
947
  }(t, r) ? (Xe = !0, w(e, un, n)) : /* @__PURE__ */ function(l) {
945
948
  return l === " ";
946
949
  }(t) ? w(e, Us, n) : function(l, c) {
947
950
  return Y && c && l.toLowerCase() === "o";
948
951
  }(t, s) ? (n.preventDefault(), Xe = !0, w(e, gt, !0)) : function(l, c) {
949
- return cr(l) && !c;
952
+ return ar(l) && !c;
950
953
  }(t, r) ? (Xe = !1, w(e, un, n)) : function(l, c, a, f) {
951
954
  return Y ? !c && !a && (Re(l) || l.toLowerCase() === "h" && f) : !(f || c || a) && Re(l);
952
955
  }(t, o, i, s) ? Re(t) ? w(e, Vs, n) : (n.preventDefault(), w(e, yt, !0)) : /* @__PURE__ */ function(l) {
@@ -971,13 +974,13 @@ const oe = Object.freeze({}), mn = 30, xn = [["keydown", function(n, e) {
971
974
  return l === "Tab" && !c && !a && !f;
972
975
  }(t, o, s, i) ? w(e, qs, n) : function(l, c, a, f) {
973
976
  return l.toLowerCase() === "z" && !c && Ue(a, f);
974
- }(t, r, i, s) ? (n.preventDefault(), w(e, zr, void 0)) : function(l, c, a, f) {
977
+ }(t, r, i, s) ? (n.preventDefault(), w(e, Br, void 0)) : function(l, c, a, f) {
975
978
  return Y ? l.toLowerCase() === "z" && a && c : l.toLowerCase() === "y" && f || l.toLowerCase() === "z" && f && c;
976
- }(t, r, i, s) ? (n.preventDefault(), w(e, Br, void 0)) : jt(e._editorState._selection) ? function(l, c, a, f) {
979
+ }(t, r, i, s) ? (n.preventDefault(), w(e, Rr, void 0)) : jt(e._editorState._selection) ? function(l, c, a, f) {
977
980
  return !c && l.toLowerCase() === "c" && (Y ? a : f);
978
- }(t, r, i, s) ? (n.preventDefault(), w(e, Rr, n)) : function(l, c, a, f) {
981
+ }(t, r, i, s) ? (n.preventDefault(), w(e, Kr, n)) : function(l, c, a, f) {
979
982
  return !c && l.toLowerCase() === "x" && (Y ? a : f);
980
- }(t, r, i, s) ? (n.preventDefault(), w(e, Kr, n)) : ar(t, i, s) && (n.preventDefault(), w(e, Gn, n)) : !xe && ar(t, i, s) && (n.preventDefault(), w(e, Gn, n)), /* @__PURE__ */ function(l, c, a, f) {
983
+ }(t, r, i, s) ? (n.preventDefault(), w(e, $r, n)) : ur(t, i, s) && (n.preventDefault(), w(e, Yn, n)) : !xe && ur(t, i, s) && (n.preventDefault(), w(e, Yn, n)), /* @__PURE__ */ function(l, c, a, f) {
981
984
  return l || c || a || f;
982
985
  }(s, r, o, i) && w(e, ti, n));
983
986
  }], ["pointerdown", function(n, e) {
@@ -1005,12 +1008,12 @@ const oe = Object.freeze({}), mn = 30, xn = [["keydown", function(n, e) {
1005
1008
  const i = t.anchor.getNode(), o = se(e._window);
1006
1009
  if (o === null) return;
1007
1010
  const l = t.isBackward(), c = l ? t.anchor.offset : t.focus.offset, a = l ? t.focus.offset : t.anchor.offset;
1008
- vt && !t.isCollapsed() && N(i) && o.anchorNode !== null && i.getTextContent().slice(0, c) + r + i.getTextContent().slice(c + a) === ns(o.anchorNode) || w(e, je, r);
1011
+ vt && !t.isCollapsed() && N(i) && o.anchorNode !== null && i.getTextContent().slice(0, c) + r + i.getTextContent().slice(c + a) === rs(o.anchorNode) || w(e, je, r);
1009
1012
  const f = r.length;
1010
1013
  xe && f > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= f), bn || It || wn || !e.isComposing() || (Qe = 0, J(null));
1011
1014
  } else
1012
1015
  Wn(!1, e, r !== null ? r : void 0), Je && (rn(e, r || void 0), Je = !1);
1013
- q(), Hr(M());
1016
+ q(), qr(M());
1014
1017
  }), De = null;
1015
1018
  }], ["click", function(n, e) {
1016
1019
  X(e, () => {
@@ -1023,7 +1026,7 @@ const oe = Object.freeze({}), mn = 30, xn = [["keydown", function(n, e) {
1023
1026
  const i = r.anchorNode;
1024
1027
  if (i !== null) {
1025
1028
  const o = i.nodeType;
1026
- (o === nt || o === Te) && ue(Jn(s, r, e, n));
1029
+ (o === nt || o === Te) && ue(Un(s, r, e, n));
1027
1030
  }
1028
1031
  }
1029
1032
  }
@@ -1032,7 +1035,7 @@ const oe = Object.freeze({}), mn = 30, xn = [["keydown", function(n, e) {
1032
1035
  }], ["cut", oe], ["copy", oe], ["dragstart", oe], ["dragover", oe], ["dragend", oe], ["paste", oe], ["focus", oe], ["blur", oe], ["drop", oe]];
1033
1036
  vt && xn.push(["beforeinput", (n, e) => function(t, r) {
1034
1037
  const s = t.inputType, i = ps(t);
1035
- s === "deleteCompositionText" || xe && rs(r) || s !== "insertCompositionText" && X(r, () => {
1038
+ s === "deleteCompositionText" || xe && ss(r) || s !== "insertCompositionText" && X(r, () => {
1036
1039
  const o = I();
1037
1040
  if (s === "deleteContentBackward") {
1038
1041
  if (o === null) {
@@ -1077,20 +1080,20 @@ vt && xn.push(["beforeinput", (n, e) => function(t, r) {
1077
1080
  J(null), w(r, gt, !1);
1078
1081
  break;
1079
1082
  case "insertParagraph":
1080
- J(null), Xe && !It ? (Xe = !1, w(r, gt, !1)) : w(r, Xn, void 0);
1083
+ J(null), Xe && !It ? (Xe = !1, w(r, gt, !1)) : w(r, Zn, void 0);
1081
1084
  break;
1082
1085
  case "insertFromPaste":
1083
1086
  case "insertFromPasteAsQuotation":
1084
- w(r, Wr, t);
1087
+ w(r, zr, t);
1085
1088
  break;
1086
1089
  case "deleteByComposition":
1087
1090
  (function(d, g) {
1088
1091
  return d !== g || S(d) || S(g) || !d.isToken() || !g.isToken();
1089
- })(h, u) && w(r, Zn, t);
1092
+ })(h, u) && w(r, Gn, t);
1090
1093
  break;
1091
1094
  case "deleteByDrag":
1092
1095
  case "deleteByCut":
1093
- w(r, Zn, t);
1096
+ w(r, Gn, t);
1094
1097
  break;
1095
1098
  case "deleteContent":
1096
1099
  w(r, yt, !1);
@@ -1123,15 +1126,15 @@ vt && xn.push(["beforeinput", (n, e) => function(t, r) {
1123
1126
  w(r, we, "underline");
1124
1127
  break;
1125
1128
  case "historyUndo":
1126
- w(r, zr, void 0);
1129
+ w(r, Br, void 0);
1127
1130
  break;
1128
1131
  case "historyRedo":
1129
- w(r, Br, void 0);
1132
+ w(r, Rr, void 0);
1130
1133
  }
1131
1134
  else {
1132
1135
  if (c === `
1133
1136
  `) t.preventDefault(), w(r, gt, !1);
1134
- else if (c === ae) t.preventDefault(), w(r, Xn, void 0);
1137
+ else if (c === ae) t.preventDefault(), w(r, Zn, void 0);
1135
1138
  else if (c == null && t.dataTransfer) {
1136
1139
  const d = t.dataTransfer.getData("text/plain");
1137
1140
  t.preventDefault(), o.insertRawText(d);
@@ -1145,14 +1148,14 @@ const Dt = /* @__PURE__ */ new WeakMap();
1145
1148
  let vn = !1, Sn = !1, Xe = !1, Je = !1, gs = [0, "", 0, "root", 0];
1146
1149
  function _s(n, e, t, r, s) {
1147
1150
  const i = n.anchor, o = n.focus, l = i.getNode(), c = M(), a = se(c._window), f = a !== null ? a.anchorNode : null, h = i.key, u = c.getElementByKey(h), d = t.length;
1148
- return h !== o.key || !N(l) || (!s && (!vt || hs < r + 50) || l.isDirty() && d < 2 || es(t)) && i.offset !== o.offset && !l.isComposing() || be(l) || l.isDirty() && d > 1 || (s || !vt) && u !== null && !l.isComposing() && f !== kt(u) || a !== null && e !== null && (!e.collapsed || e.startContainer !== a.anchorNode || e.startOffset !== a.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || wi(n, l);
1151
+ return h !== o.key || !N(l) || (!s && (!vt || hs < r + 50) || l.isDirty() && d < 2 || ts(t)) && i.offset !== o.offset && !l.isComposing() || be(l) || l.isDirty() && d > 1 || (s || !vt) && u !== null && !l.isComposing() && f !== kt(u) || a !== null && e !== null && (!e.collapsed || e.startContainer !== a.anchorNode || e.startOffset !== a.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || wi(n, l);
1149
1152
  }
1150
- function _r(n, e) {
1153
+ function pr(n, e) {
1151
1154
  return n !== null && n.nodeValue !== null && n.nodeType === Te && e !== 0 && e !== n.nodeValue.length;
1152
1155
  }
1153
- function pr(n, e, t) {
1156
+ function yr(n, e, t) {
1154
1157
  const { anchorNode: r, anchorOffset: s, focusNode: i, focusOffset: o } = n;
1155
- vn && (vn = !1, _r(r, s) && _r(i, o)) || X(e, () => {
1158
+ vn && (vn = !1, pr(r, s) && pr(i, o)) || X(e, () => {
1156
1159
  if (!t) return void ue(null);
1157
1160
  if (!Mt(e, r, i)) return;
1158
1161
  const l = I();
@@ -1211,21 +1214,21 @@ const Oe = /* @__PURE__ */ new Map();
1211
1214
  function ms(n) {
1212
1215
  const e = n.target, t = se(e == null ? null : e.nodeType === 9 ? e.defaultView : e.ownerDocument.defaultView);
1213
1216
  if (t === null) return;
1214
- const r = Xr(t.anchorNode);
1217
+ const r = Zr(t.anchorNode);
1215
1218
  if (r === null) return;
1216
1219
  Sn && (Sn = !1, X(r, () => {
1217
1220
  const a = ot(), f = t.anchorNode;
1218
1221
  if (f === null) return;
1219
1222
  const h = f.nodeType;
1220
- h !== nt && h !== Te || ue(Jn(a, t, r, n));
1223
+ h !== nt && h !== Te || ue(Un(a, t, r, n));
1221
1224
  }));
1222
1225
  const s = Mn(r), i = s[s.length - 1], o = i._key, l = Oe.get(o), c = l || i;
1223
- c !== r && pr(t, c, !1), pr(t, r, !0), r !== i ? Oe.set(o, r) : l && Oe.delete(o);
1226
+ c !== r && yr(t, c, !1), yr(t, r, !0), r !== i ? Oe.set(o, r) : l && Oe.delete(o);
1224
1227
  }
1225
- function yr(n) {
1228
+ function mr(n) {
1226
1229
  n._lexicalHandled = !0;
1227
1230
  }
1228
- function mr(n) {
1231
+ function xr(n) {
1229
1232
  return n._lexicalHandled === !0;
1230
1233
  }
1231
1234
  function Mi(n) {
@@ -1506,7 +1509,7 @@ class Ut {
1506
1509
  })), F(r)) {
1507
1510
  ue(r);
1508
1511
  const p = r.anchor, _ = r.focus;
1509
- p.key === i && Tr(p, l), _.key === i && Tr(_, l);
1512
+ p.key === i && Cr(p, l), _.key === i && Cr(_, l);
1510
1513
  }
1511
1514
  return ye() === i && J(o), l;
1512
1515
  }
@@ -1600,7 +1603,7 @@ class st extends Ut {
1600
1603
  static importDOM() {
1601
1604
  return { br: (e) => function(t) {
1602
1605
  const r = t.parentElement;
1603
- if (r !== null && dr(r)) {
1606
+ if (r !== null && hr(r)) {
1604
1607
  const s = r.firstChild;
1605
1608
  if (s === t || s.nextSibling === t && dt(s)) {
1606
1609
  const i = r.lastChild;
@@ -1610,7 +1613,7 @@ class st extends Ut {
1610
1613
  return !1;
1611
1614
  }(e) || function(t) {
1612
1615
  const r = t.parentElement;
1613
- if (r !== null && dr(r)) {
1616
+ if (r !== null && hr(r)) {
1614
1617
  const s = r.firstChild;
1615
1618
  if (s === t || s.nextSibling === t && dt(s)) return !1;
1616
1619
  const i = r.lastChild;
@@ -1679,7 +1682,7 @@ function vs(n, e, t) {
1679
1682
  } else r.nodeValue = i;
1680
1683
  }
1681
1684
  }
1682
- function xr(n, e, t, r, s, i) {
1685
+ function vr(n, e, t, r, s, i) {
1683
1686
  vs(s, n, e);
1684
1687
  const o = i.theme.text;
1685
1688
  o !== void 0 && xs(0, 0, r, n, o);
@@ -1748,7 +1751,7 @@ class Me extends Ut {
1748
1751
  createDOM(e, t) {
1749
1752
  const r = this.__format, s = sn(0, r), i = on(0, r), o = s === null ? i : s, l = document.createElement(o);
1750
1753
  let c = l;
1751
- this.hasFormat("code") && l.setAttribute("spellcheck", "false"), s !== null && (c = document.createElement(i), l.appendChild(c)), xr(c, this, 0, r, this.__text, e);
1754
+ this.hasFormat("code") && l.setAttribute("spellcheck", "false"), s !== null && (c = document.createElement(i), l.appendChild(c)), vr(c, this, 0, r, this.__text, e);
1752
1755
  const a = this.__style;
1753
1756
  return a !== "" && (l.style.cssText = a), l;
1754
1757
  }
@@ -1759,7 +1762,7 @@ class Me extends Ut {
1759
1762
  const p = t.firstChild;
1760
1763
  p == null && b(48);
1761
1764
  const _ = document.createElement(f);
1762
- return xr(_, this, 0, o, s, r), t.replaceChild(_, p), !1;
1765
+ return vr(_, this, 0, o, s, r), t.replaceChild(_, p), !1;
1763
1766
  }
1764
1767
  let h = t;
1765
1768
  c !== null && l !== null && (h = t.firstChild, h == null && b(49)), vs(s, h, this);
@@ -1777,7 +1780,7 @@ class Me extends Ut {
1777
1780
  }
1778
1781
  exportDOM(e) {
1779
1782
  let { element: t } = super.exportDOM(e);
1780
- return t !== null && ss(t) || b(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("bold") && (t = ht(t, "b")), this.hasFormat("italic") && (t = ht(t, "i")), this.hasFormat("strikethrough") && (t = ht(t, "s")), this.hasFormat("underline") && (t = ht(t, "u")), { element: t };
1783
+ return t !== null && Kn(t) || b(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("bold") && (t = ht(t, "b")), this.hasFormat("italic") && (t = ht(t, "i")), this.hasFormat("strikethrough") && (t = ht(t, "s")), this.hasFormat("underline") && (t = ht(t, "u")), { element: t };
1781
1784
  }
1782
1785
  exportJSON() {
1783
1786
  return { detail: this.getDetail(), format: this.getFormat(), mode: this.getMode(), style: this.getStyle(), text: this.getTextContent(), type: "text", version: 1 };
@@ -1903,7 +1906,7 @@ class Me extends Ut {
1903
1906
  const l = I();
1904
1907
  if (F(l)) {
1905
1908
  const h = l.anchor, u = l.focus;
1906
- h !== null && h.key === s && (Fr(h, t, r, e, o), l.dirty = !0), u !== null && u.key === s && (Fr(u, t, r, e, o), l.dirty = !0);
1909
+ h !== null && h.key === s && (Dr(h, t, r, e, o), l.dirty = !0), u !== null && u.key === s && (Dr(u, t, r, e, o), l.dirty = !0);
1907
1910
  }
1908
1911
  const c = e.__text, a = t ? c + i : i + c;
1909
1912
  this.setTextContent(a);
@@ -1915,13 +1918,13 @@ class Me extends Ut {
1915
1918
  }
1916
1919
  }
1917
1920
  function zi(n) {
1918
- return { forChild: Kn(n.style), node: null };
1921
+ return { forChild: $n(n.style), node: null };
1919
1922
  }
1920
1923
  function Bi(n) {
1921
1924
  const e = n, t = e.style.fontWeight === "normal";
1922
- return { forChild: Kn(e.style, t ? void 0 : "bold"), node: null };
1925
+ return { forChild: $n(e.style, t ? void 0 : "bold"), node: null };
1923
1926
  }
1924
- const vr = /* @__PURE__ */ new WeakMap();
1927
+ const Sr = /* @__PURE__ */ new WeakMap();
1925
1928
  function Ri(n) {
1926
1929
  return n.nodeName === "PRE" || n.nodeType === nt && n.style !== void 0 && n.style.whiteSpace !== void 0 && n.style.whiteSpace.startsWith("pre");
1927
1930
  }
@@ -1932,9 +1935,9 @@ function Ki(n) {
1932
1935
  if (function(r) {
1933
1936
  let s, i = r.parentNode;
1934
1937
  const o = [r];
1935
- for (; i !== null && (s = vr.get(i)) === void 0 && !Ri(i); ) o.push(i), i = i.parentNode;
1938
+ for (; i !== null && (s = Sr.get(i)) === void 0 && !Ri(i); ) o.push(i), i = i.parentNode;
1936
1939
  const l = s === void 0 ? i : s;
1937
- for (let c = 0; c < o.length; c++) vr.set(o[c], l);
1940
+ for (let c = 0; c < o.length; c++) Sr.set(o[c], l);
1938
1941
  return l;
1939
1942
  }(e) !== null) {
1940
1943
  const r = t.split(/(\r?\n|\t)/), s = [], i = r.length;
@@ -1942,14 +1945,14 @@ function Ki(n) {
1942
1945
  const l = r[o];
1943
1946
  l === `
1944
1947
  ` || l === `\r
1945
- ` ? s.push(tt()) : l === " " ? s.push($n()) : l !== "" && s.push($(l));
1948
+ ` ? s.push(tt()) : l === " " ? s.push(Jn()) : l !== "" && s.push($(l));
1946
1949
  }
1947
1950
  return { node: s };
1948
1951
  }
1949
1952
  if (t = t.replace(/\r/g, "").replace(/[ \t\n]+/g, " "), t === "") return { node: null };
1950
1953
  if (t[0] === " ") {
1951
1954
  let r = e, s = !0;
1952
- for (; r !== null && (r = Sr(r, !1)) !== null; ) {
1955
+ for (; r !== null && (r = Tr(r, !1)) !== null; ) {
1953
1956
  const i = r.textContent || "";
1954
1957
  if (i.length > 0) {
1955
1958
  /[ \t\n]$/.test(i) && (t = t.slice(1)), s = !1;
@@ -1960,7 +1963,7 @@ function Ki(n) {
1960
1963
  }
1961
1964
  if (t[t.length - 1] === " ") {
1962
1965
  let r = e, s = !0;
1963
- for (; r !== null && (r = Sr(r, !0)) !== null; )
1966
+ for (; r !== null && (r = Tr(r, !0)) !== null; )
1964
1967
  if ((r.textContent || "").replace(/^( |\t|\r?\n)+/, "").length > 0) {
1965
1968
  s = !1;
1966
1969
  break;
@@ -1969,7 +1972,7 @@ function Ki(n) {
1969
1972
  }
1970
1973
  return t === "" ? { node: null } : { node: $(t) };
1971
1974
  }
1972
- function Sr(n, e) {
1975
+ function Tr(n, e) {
1973
1976
  let t = n;
1974
1977
  for (; ; ) {
1975
1978
  let r;
@@ -1991,7 +1994,7 @@ function Sr(n, e) {
1991
1994
  const $i = { code: "code", em: "italic", i: "italic", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
1992
1995
  function ge(n) {
1993
1996
  const e = $i[n.nodeName.toLowerCase()];
1994
- return e === void 0 ? { node: null } : { forChild: Kn(n.style, e), node: null };
1997
+ return e === void 0 ? { node: null } : { forChild: $n(n.style, e), node: null };
1995
1998
  }
1996
1999
  function $(n = "") {
1997
2000
  return $t(new Me(n));
@@ -1999,7 +2002,7 @@ function $(n = "") {
1999
2002
  function N(n) {
2000
2003
  return n instanceof Me;
2001
2004
  }
2002
- function Kn(n, e) {
2005
+ function $n(n, e) {
2003
2006
  const t = n.fontWeight, r = n.textDecoration.split(" "), s = t === "700" || t === "bold", i = r.includes("line-through"), o = n.fontStyle === "italic", l = r.includes("underline"), c = n.verticalAlign;
2004
2007
  return (a) => (N(a) && (s && !a.hasFormat("bold") && a.toggleFormat("bold"), i && !a.hasFormat("strikethrough") && a.toggleFormat("strikethrough"), o && !a.hasFormat("italic") && a.toggleFormat("italic"), l && !a.hasFormat("underline") && a.toggleFormat("underline"), c !== "sub" || a.hasFormat("subscript") || a.toggleFormat("subscript"), c !== "super" || a.hasFormat("superscript") || a.toggleFormat("superscript"), e && !a.hasFormat(e) && a.toggleFormat(e)), a);
2005
2008
  }
@@ -2020,7 +2023,7 @@ class it extends Me {
2020
2023
  return null;
2021
2024
  }
2022
2025
  static importJSON(e) {
2023
- const t = $n();
2026
+ const t = Jn();
2024
2027
  return t.setFormat(e.format), t.setStyle(e.style), t;
2025
2028
  }
2026
2029
  exportJSON() {
@@ -2042,7 +2045,7 @@ class it extends Me {
2042
2045
  return !1;
2043
2046
  }
2044
2047
  }
2045
- function $n() {
2048
+ function Jn() {
2046
2049
  return $t(new it());
2047
2050
  }
2048
2051
  function Ji(n) {
@@ -2096,7 +2099,7 @@ function ln(n, e) {
2096
2099
  }
2097
2100
  n.set(t, r, s);
2098
2101
  }
2099
- function Tr(n, e) {
2102
+ function Cr(n, e) {
2100
2103
  if (S(e)) {
2101
2104
  const t = e.getLastDescendant();
2102
2105
  S(t) || N(t) ? ln(n, t) : ln(n, e);
@@ -2221,7 +2224,7 @@ class Ce {
2221
2224
  getTextContent() {
2222
2225
  const e = this.getNodes();
2223
2226
  if (e.length === 0) return "";
2224
- const t = e[0], r = e[e.length - 1], s = this.anchor, i = this.focus, o = s.isBefore(i), [l, c] = kr(this);
2227
+ const t = e[0], r = e[e.length - 1], s = this.anchor, i = this.focus, o = s.isBefore(i), [l, c] = br(this);
2225
2228
  let a = "", f = !0;
2226
2229
  for (let h = 0; h < e.length; h++) {
2227
2230
  const u = e[h];
@@ -2260,7 +2263,7 @@ class Ce {
2260
2263
  const o = t[i];
2261
2264
  o === `
2262
2265
  ` || o === `\r
2263
- ` ? r.push(tt()) : o === " " ? r.push($n()) : r.push($(o));
2266
+ ` ? r.push(tt()) : o === " " ? r.push(Jn()) : r.push($(o));
2264
2267
  }
2265
2268
  this.insertNodes(r);
2266
2269
  }
@@ -2488,7 +2491,7 @@ class Ce {
2488
2491
  extract() {
2489
2492
  const e = this.getNodes(), t = e.length, r = t - 1, s = this.anchor, i = this.focus;
2490
2493
  let o = e[0], l = e[r];
2491
- const [c, a] = kr(this);
2494
+ const [c, a] = br(this);
2492
2495
  if (t === 0) return [];
2493
2496
  if (t === 1) {
2494
2497
  if (N(o) && !this.isCollapsed()) {
@@ -2509,10 +2512,10 @@ class Ce {
2509
2512
  return e;
2510
2513
  }
2511
2514
  modify(e, t, r) {
2512
- const s = this.focus, i = this.anchor, o = e === "move", l = fr(s, t);
2515
+ const s = this.focus, i = this.anchor, o = e === "move", l = dr(s, t);
2513
2516
  if (A(l) && !l.isIsolated()) {
2514
2517
  if (o && l.isKeyboardSelectable()) {
2515
- const d = Er();
2518
+ const d = Pr();
2516
2519
  return d.add(l.__key), void ue(d);
2517
2520
  }
2518
2521
  const u = t ? l.getPreviousSibling() : l.getNextSibling();
@@ -2567,11 +2570,11 @@ class Ce {
2567
2570
  const r = this.anchor;
2568
2571
  let s = r.getNode();
2569
2572
  if (this.forwardDeletion(r, s, e)) return;
2570
- const i = this.focus, o = fr(i, e);
2573
+ const i = this.focus, o = dr(i, e);
2571
2574
  if (A(o) && !o.isIsolated()) {
2572
2575
  if (o.isKeyboardSelectable() && S(s) && s.getChildrenSize() === 0) {
2573
2576
  s.remove();
2574
- const l = Er();
2577
+ const l = Pr();
2575
2578
  l.add(o.__key), ue(l);
2576
2579
  } else
2577
2580
  o.remove(), M().dispatchCommand(kn, void 0);
@@ -2585,16 +2588,16 @@ class Ce {
2585
2588
  const l = i.type === "text" ? i.getNode() : null;
2586
2589
  if (s = r.type === "text" ? r.getNode() : null, l !== null && l.isSegmented()) {
2587
2590
  const c = i.offset, a = l.getTextContentSize();
2588
- if (l.is(s) || e && c !== a || !e && c !== 0) return void br(l, e, c);
2591
+ if (l.is(s) || e && c !== a || !e && c !== 0) return void wr(l, e, c);
2589
2592
  } else if (s !== null && s.isSegmented()) {
2590
2593
  const c = r.offset, a = s.getTextContentSize();
2591
- if (s.is(l) || e && c !== 0 || !e && c !== a) return void br(s, e, c);
2594
+ if (s.is(l) || e && c !== 0 || !e && c !== a) return void wr(s, e, c);
2592
2595
  }
2593
2596
  (function(c, a) {
2594
2597
  const f = c.anchor, h = c.focus, u = f.getNode(), d = h.getNode();
2595
2598
  if (u === d && f.type === "text" && h.type === "text") {
2596
2599
  const g = f.offset, p = h.offset, _ = g < p, m = _ ? g : p, y = _ ? p : g, x = y - 1;
2597
- m !== x && (es(u.getTextContent().slice(m, y)) || (a ? h.offset = x : f.offset = x));
2600
+ m !== x && (ts(u.getTextContent().slice(m, y)) || (a ? h.offset = x : f.offset = x));
2598
2601
  }
2599
2602
  })(this, e);
2600
2603
  }
@@ -2632,19 +2635,19 @@ class Ce {
2632
2635
  function jt(n) {
2633
2636
  return n instanceof Vt;
2634
2637
  }
2635
- function Cr(n) {
2638
+ function kr(n) {
2636
2639
  const e = n.offset;
2637
2640
  if (n.type === "text") return e;
2638
2641
  const t = n.getNode();
2639
2642
  return e === t.getChildrenSize() ? t.getTextContent().length : 0;
2640
2643
  }
2641
- function kr(n) {
2644
+ function br(n) {
2642
2645
  const e = n.getStartEndPoints();
2643
2646
  if (e === null) return [0, 0];
2644
2647
  const [t, r] = e;
2645
- return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [Cr(t), Cr(r)];
2648
+ return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [kr(t), kr(r)];
2646
2649
  }
2647
- function br(n, e, t) {
2650
+ function wr(n, e, t) {
2648
2651
  const r = n, s = r.getTextContent().split(/(?=\s)/g), i = s.length;
2649
2652
  let o = 0, l = 0;
2650
2653
  for (let a = 0; a < i; a++) {
@@ -2657,7 +2660,7 @@ function br(n, e, t) {
2657
2660
  const c = s.join("").trim();
2658
2661
  c === "" ? r.remove() : (r.setTextContent(c), r.select(l, l));
2659
2662
  }
2660
- function wr(n, e, t, r) {
2663
+ function Nr(n, e, t, r) {
2661
2664
  let s, i = e;
2662
2665
  if (n.nodeType === nt) {
2663
2666
  let o = !1;
@@ -2669,7 +2672,7 @@ function wr(n, e, t, r) {
2669
2672
  const u = a.parentNode;
2670
2673
  n === u && e > Array.prototype.indexOf.call(u.children, a) && i--;
2671
2674
  }
2672
- if (s = Le(f), N(s)) i = ir(s, o);
2675
+ if (s = Le(f), N(s)) i = or(s, o);
2673
2676
  else {
2674
2677
  let u = Le(n);
2675
2678
  if (u === null) return null;
@@ -2683,7 +2686,7 @@ function wr(n, e, t, r) {
2683
2686
  const g = o ? d.getLastDescendant() : d.getFirstDescendant();
2684
2687
  g === null ? u = d : (d = g, u = S(d) ? d : d.getParentOrThrow()), i = 0;
2685
2688
  }
2686
- N(d) ? (s = d, u = null, i = ir(d, o)) : d !== u && o && !h && i++;
2689
+ N(d) ? (s = d, u = null, i = or(d, o)) : d !== u && o && !h && i++;
2687
2690
  } else {
2688
2691
  const d = u.getIndexWithinParent();
2689
2692
  i = e === 0 && A(u) && Le(n) === u ? d : d + 1, u = u.getParentOrThrow();
@@ -2693,7 +2696,7 @@ function wr(n, e, t, r) {
2693
2696
  } else s = Le(n);
2694
2697
  return N(s) ? ie(s.__key, i, "text") : null;
2695
2698
  }
2696
- function Nr(n, e, t) {
2699
+ function Er(n, e, t) {
2697
2700
  const r = n.offset, s = n.getNode();
2698
2701
  if (r === 0) {
2699
2702
  const i = s.getPreviousSibling(), o = s.getParent();
@@ -2715,7 +2718,7 @@ function Nr(n, e, t) {
2715
2718
  function Ss(n, e, t) {
2716
2719
  if (n.type === "text" && e.type === "text") {
2717
2720
  const r = n.isBefore(e), s = n.is(e);
2718
- Nr(n, r, s), Nr(e, !r, s), s && (e.key = n.key, e.offset = n.offset, e.type = n.type);
2721
+ Er(n, r, s), Er(e, !r, s), s && (e.key = n.key, e.offset = n.offset, e.type = n.type);
2719
2722
  const i = M();
2720
2723
  if (i.isComposing() && i._compositionKey !== n.key && F(t)) {
2721
2724
  const o = t.anchor, l = t.focus;
@@ -2725,9 +2728,9 @@ function Ss(n, e, t) {
2725
2728
  }
2726
2729
  function Ts(n, e, t, r, s, i) {
2727
2730
  if (n === null || t === null || !Mt(s, n, t)) return null;
2728
- const o = wr(n, e, F(i) ? i.anchor : null, s);
2731
+ const o = Nr(n, e, F(i) ? i.anchor : null, s);
2729
2732
  if (o === null) return null;
2730
- const l = wr(t, r, F(i) ? i.focus : null, s);
2733
+ const l = Nr(t, r, F(i) ? i.focus : null, s);
2731
2734
  if (l === null) return null;
2732
2735
  if (o.type === "element" && l.type === "element") {
2733
2736
  const c = Le(n), a = Le(t);
@@ -2735,21 +2738,21 @@ function Ts(n, e, t, r, s, i) {
2735
2738
  }
2736
2739
  return Ss(o, l, i), [o, l];
2737
2740
  }
2738
- function uo(n) {
2741
+ function po(n) {
2739
2742
  return S(n) && !n.isInline();
2740
2743
  }
2741
2744
  function Cs(n, e, t, r, s, i) {
2742
2745
  const o = fe(), l = new Ce(ie(n, e, s), ie(t, r, i), 0, "");
2743
2746
  return l.dirty = !0, o._selection = l, l;
2744
2747
  }
2745
- function fo() {
2748
+ function yo() {
2746
2749
  const n = ie("root", 0, "element"), e = ie("root", 0, "element");
2747
2750
  return new Ce(n, e, 0, "");
2748
2751
  }
2749
- function Er() {
2752
+ function Pr() {
2750
2753
  return new Vt(/* @__PURE__ */ new Set());
2751
2754
  }
2752
- function Jn(n, e, t, r) {
2755
+ function Un(n, e, t, r) {
2753
2756
  const s = t._window;
2754
2757
  if (s === null) return null;
2755
2758
  const i = r || s.event, o = i ? i.type : void 0, l = o === "selectionchange", c = !fn && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && i && i.detail === 3 || o === "drop" || o === void 0);
@@ -2776,7 +2779,7 @@ function Lt(n, e, t, r = 1) {
2776
2779
  const a = s.offset;
2777
2780
  if (t <= a && r > 0 || t < a && r < 0) {
2778
2781
  const f = Math.max(0, a + r);
2779
- s.set(c, f, "element"), i.set(c, f, "element"), Pr(n);
2782
+ s.set(c, f, "element"), i.set(c, f, "element"), Fr(n);
2780
2783
  }
2781
2784
  } else {
2782
2785
  const a = n.isBackward(), f = a ? i : s, h = f.getNode(), u = a ? s : i, d = u.getNode();
@@ -2789,9 +2792,9 @@ function Lt(n, e, t, r = 1) {
2789
2792
  (t <= g && r > 0 || t < g && r < 0) && u.set(c, Math.max(0, g + r), "element");
2790
2793
  }
2791
2794
  }
2792
- Pr(n);
2795
+ Fr(n);
2793
2796
  }
2794
- function Pr(n) {
2797
+ function Fr(n) {
2795
2798
  const e = n.anchor, t = e.offset, r = n.focus, s = r.offset, i = e.getNode(), o = r.getNode();
2796
2799
  if (n.isCollapsed()) {
2797
2800
  if (!S(i)) return;
@@ -2821,12 +2824,12 @@ function Ot(n, e, t, r, s) {
2821
2824
  let i = null, o = 0, l = null;
2822
2825
  r !== null ? (i = r.__key, N(r) ? (o = r.getTextContentSize(), l = "text") : S(r) && (o = r.getChildrenSize(), l = "element")) : s !== null && (i = s.__key, N(s) ? l = "text" : S(s) && (l = "element")), i !== null && l !== null ? n.set(i, o, l) : (o = e.getIndexWithinParent(), o === -1 && (o = t.getChildrenSize()), n.set(t.__key, o, "element"));
2823
2826
  }
2824
- function Fr(n, e, t, r, s) {
2827
+ function Dr(n, e, t, r, s) {
2825
2828
  n.type === "text" ? (n.key = t, e || (n.offset += s)) : n.offset > r.getIndexWithinParent() && (n.offset -= 1);
2826
2829
  }
2827
2830
  function Vi(n, e, t, r, s, i, o) {
2828
2831
  const l = r.anchorNode, c = r.focusNode, a = r.anchorOffset, f = r.focusOffset, h = document.activeElement;
2829
- if (s.has("collaboration") && h !== i || h !== null && Qr(h)) return;
2832
+ if (s.has("collaboration") && h !== i || h !== null && Xr(h)) return;
2830
2833
  if (!F(e)) return void (n !== null && Mt(t, l, c) && r.removeAllRanges());
2831
2834
  const u = e.anchor, d = e.focus, g = u.key, p = d.key, _ = Nt(t, g), m = Nt(t, p), y = u.offset, x = d.offset, C = e.format, k = e.style, v = e.isCollapsed();
2832
2835
  let P = _, T = m, E = !1;
@@ -2849,24 +2852,24 @@ function Vi(n, e, t, r, s, i, o) {
2849
2852
  const Fe = document.createRange();
2850
2853
  Fe.selectNode(z), de = Fe.getBoundingClientRect();
2851
2854
  } else de = z.getBoundingClientRect();
2852
- (function(Fe, ze, jn) {
2853
- const Hn = jn.ownerDocument, qn = Hn.defaultView;
2854
- if (qn === null) return;
2855
- let { top: Xt, bottom: Zt } = ze, at = 0, ut = 0, he = jn;
2855
+ (function(Fe, ze, Hn) {
2856
+ const qn = Hn.ownerDocument, Qn = qn.defaultView;
2857
+ if (Qn === null) return;
2858
+ let { top: Xt, bottom: Zt } = ze, at = 0, ut = 0, he = Hn;
2856
2859
  for (; he !== null; ) {
2857
- const Gt = he === Hn.body;
2860
+ const Gt = he === qn.body;
2858
2861
  if (Gt) at = 0, ut = Kt(Fe).innerHeight;
2859
2862
  else {
2860
2863
  const ft = he.getBoundingClientRect();
2861
2864
  at = ft.top, ut = ft.bottom;
2862
2865
  }
2863
2866
  let Be = 0;
2864
- if (Xt < at ? Be = -(at - Xt) : Zt > ut && (Be = Zt - ut), Be !== 0) if (Gt) qn.scrollBy(0, Be);
2867
+ if (Xt < at ? Be = -(at - Xt) : Zt > ut && (Be = Zt - ut), Be !== 0) if (Gt) Qn.scrollBy(0, Be);
2865
2868
  else {
2866
2869
  const ft = he.scrollTop;
2867
2870
  he.scrollTop += Be;
2868
- const Qn = he.scrollTop - ft;
2869
- Xt -= Qn, Zt -= Qn;
2871
+ const Xn = he.scrollTop - ft;
2872
+ Xt -= Xn, Zt -= Xn;
2870
2873
  }
2871
2874
  if (Gt) break;
2872
2875
  he = Rt(he);
@@ -2877,7 +2880,7 @@ function Vi(n, e, t, r, s, i, o) {
2877
2880
  vn = !0;
2878
2881
  }
2879
2882
  }
2880
- function ho(n) {
2883
+ function mo(n) {
2881
2884
  let e = I() || ot();
2882
2885
  e === null && (e = G().selectEnd()), e.insertNodes(n);
2883
2886
  }
@@ -2912,7 +2915,7 @@ function ji(n, e) {
2912
2915
  return [t, n.getIndexWithinParent() + 1];
2913
2916
  }
2914
2917
  let R = null, K = null, Q = !1, an = !1, pt = 0;
2915
- const Dr = { characterData: !0, childList: !0, subtree: !0 };
2918
+ const Lr = { characterData: !0, childList: !0, subtree: !0 };
2916
2919
  function lt() {
2917
2920
  return Q || R !== null && R._readOnly;
2918
2921
  }
@@ -2945,7 +2948,7 @@ function bs() {
2945
2948
  function Hi() {
2946
2949
  return K;
2947
2950
  }
2948
- function Lr(n, e, t) {
2951
+ function Or(n, e, t) {
2949
2952
  const r = e.__type, s = function(l, c) {
2950
2953
  const a = l._nodes.get(c);
2951
2954
  return a === void 0 && b(30, c), a;
@@ -2955,7 +2958,7 @@ function Lr(n, e, t) {
2955
2958
  const o = i.length;
2956
2959
  for (let l = 0; l < o && (i[l](e), e.isAttached()); l++) ;
2957
2960
  }
2958
- function Or(n, e) {
2961
+ function Ir(n, e) {
2959
2962
  return n !== void 0 && n.__key !== e && n.isAttached();
2960
2963
  }
2961
2964
  function ws(n, e) {
@@ -2965,22 +2968,22 @@ function ws(n, e) {
2965
2968
  Array.isArray(e) || (r = [e]);
2966
2969
  for (const s of r) t.add(s);
2967
2970
  }
2968
- function go(n) {
2969
- return Un(n, M()._nodes);
2971
+ function xo(n) {
2972
+ return Vn(n, M()._nodes);
2970
2973
  }
2971
- function Un(n, e) {
2974
+ function Vn(n, e) {
2972
2975
  const t = n.type, r = e.get(t);
2973
2976
  r === void 0 && b(17, t);
2974
2977
  const s = r.klass;
2975
2978
  n.type !== s.getType() && b(18, s.name);
2976
2979
  const i = s.importJSON(n), o = n.children;
2977
2980
  if (S(i) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
2978
- const c = Un(o[l], e);
2981
+ const c = Vn(o[l], e);
2979
2982
  i.append(c);
2980
2983
  }
2981
2984
  return i;
2982
2985
  }
2983
- function Ir(n, e, t) {
2986
+ function Ar(n, e, t) {
2984
2987
  const r = R, s = Q, i = K;
2985
2988
  R = e, Q = !0, K = n;
2986
2989
  try {
@@ -3001,9 +3004,9 @@ function me(n, e) {
3001
3004
  d.disconnect(), g = Ai(i, t, n, v, P, T);
3002
3005
  } catch (v) {
3003
3006
  if (v instanceof Error && n._onError(v), an) throw v;
3004
- return Fs(n, null, r, t), qr(n), n._dirtyType = Ae, an = !0, me(n, i), void (an = !1);
3007
+ return Fs(n, null, r, t), Qr(n), n._dirtyType = Ae, an = !0, me(n, i), void (an = !1);
3005
3008
  } finally {
3006
- d.observe(r, Dr), n._updating = u, R = a, Q = f, K = h;
3009
+ d.observe(r, Lr), n._updating = u, R = a, Q = f, K = h;
3007
3010
  }
3008
3011
  }
3009
3012
  t._readOnly || (t._readOnly = !0);
@@ -3013,7 +3016,7 @@ function me(n, e) {
3013
3016
  let E = v._pendingDecorators || T;
3014
3017
  const D = P._nodeMap;
3015
3018
  let O;
3016
- for (O in E) D.has(O) || (E === T && (E = Gr(v)), delete E[O]);
3019
+ for (O in E) D.has(O) || (E === T && (E = Yr(v)), delete E[O]);
3017
3020
  }(n, t);
3018
3021
  const C = s ? null : se(n._window);
3019
3022
  if (n._editable && C !== null && (c || l === null || l.dirty)) {
@@ -3023,7 +3026,7 @@ function me(n, e) {
3023
3026
  const v = n._blockCursorElement;
3024
3027
  v !== null && Rn(v, n, r), Vi(o, l, n, C, y, r);
3025
3028
  }
3026
- Ei(n, r, l), d !== null && d.observe(r, Dr);
3029
+ Ei(n, r, l), d !== null && d.observe(r, Lr);
3027
3030
  } finally {
3028
3031
  K = h, R = a;
3029
3032
  }
@@ -3037,7 +3040,7 @@ function me(n, e) {
3037
3040
  }(n, g, y, p, i), F(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(kn, void 0);
3038
3041
  const k = n._pendingDecorators;
3039
3042
  k !== null && (n._decorators = k, n._pendingDecorators = null, Ze("decorator", n, !0, k)), function(v, P, T) {
3040
- const E = sr(P), D = sr(T);
3043
+ const E = ir(P), D = ir(T);
3041
3044
  E !== D && Ze("textcontent", v, !0, D);
3042
3045
  }(n, e || i, t), Ze("update", n, !0, { dirtyElements: _, dirtyLeaves: p, editorState: t, normalizedNodes: m, prevEditorState: e || i, tags: y }), function(v, P) {
3043
3046
  if (v._deferred = [], P.length !== 0) {
@@ -3090,7 +3093,7 @@ function Ns(n, e, t) {
3090
3093
  }
3091
3094
  return !1;
3092
3095
  }
3093
- function Ar(n, e) {
3096
+ function Mr(n, e) {
3094
3097
  const t = n._updates;
3095
3098
  let r = e || !1;
3096
3099
  for (; t.length !== 0; ) {
@@ -3122,10 +3125,10 @@ function Es(n, e, t) {
3122
3125
  try {
3123
3126
  a && (n._headless ? l._selection !== null && (c._selection = l._selection.clone()) : c._selection = function(m) {
3124
3127
  const y = m.getEditorState()._selection, x = se(m._window);
3125
- return F(y) || y == null ? Jn(y, x, m, null) : y.clone();
3128
+ return F(y) || y == null ? Un(y, x, m, null) : y.clone();
3126
3129
  }(n));
3127
3130
  const p = n._compositionKey;
3128
- e(), i = Ar(n, i), function(m, y) {
3131
+ e(), i = Mr(n, i), function(m, y) {
3129
3132
  const x = y.getEditorState()._selection, C = m._selection;
3130
3133
  if (F(C)) {
3131
3134
  const k = C.anchor, v = C.focus;
@@ -3139,7 +3142,7 @@ function Es(n, e, t) {
3139
3142
  const x = y._dirtyLeaves, C = m._nodeMap;
3140
3143
  for (const k of x) {
3141
3144
  const v = C.get(k);
3142
- N(v) && v.isAttached() && v.isSimpleText() && !v.isUnmergeable() && nr(v);
3145
+ N(v) && v.isAttached() && v.isSimpleText() && !v.isUnmergeable() && rr(v);
3143
3146
  }
3144
3147
  }(c, n) : function(m, y) {
3145
3148
  const x = y._dirtyLeaves, C = y._dirtyElements, k = m._nodeMap, v = ye(), P = /* @__PURE__ */ new Map();
@@ -3149,7 +3152,7 @@ function Es(n, e, t) {
3149
3152
  y._dirtyLeaves = /* @__PURE__ */ new Set();
3150
3153
  for (const W of T) {
3151
3154
  const L = k.get(W);
3152
- N(L) && L.isAttached() && L.isSimpleText() && !L.isUnmergeable() && nr(L), L !== void 0 && Or(L, v) && Lr(y, L, P), x.add(W);
3155
+ N(L) && L.isAttached() && L.isSimpleText() && !L.isUnmergeable() && rr(L), L !== void 0 && Ir(L, v) && Or(y, L, P), x.add(W);
3153
3156
  }
3154
3157
  if (T = y._dirtyLeaves, E = T.size, E > 0) {
3155
3158
  pt++;
@@ -3161,12 +3164,12 @@ function Es(n, e, t) {
3161
3164
  const L = W[0], U = W[1];
3162
3165
  if (L !== "root" && !U) continue;
3163
3166
  const z = k.get(L);
3164
- z !== void 0 && Or(z, v) && Lr(y, z, P), C.set(L, U);
3167
+ z !== void 0 && Ir(z, v) && Or(y, z, P), C.set(L, U);
3165
3168
  }
3166
3169
  T = y._dirtyLeaves, E = T.size, D = y._dirtyElements, O = D.size, pt++;
3167
3170
  }
3168
3171
  y._dirtyLeaves = x, y._dirtyElements = C;
3169
- }(c, n), Ar(n), function(m, y, x, C) {
3172
+ }(c, n), Mr(n), function(m, y, x, C) {
3170
3173
  const k = m._nodeMap, v = y._nodeMap, P = [];
3171
3174
  for (const [T] of C) {
3172
3175
  const E = v.get(T);
@@ -3341,7 +3344,7 @@ class Ht extends Ut {
3341
3344
  }
3342
3345
  hasFormat(e) {
3343
3346
  if (e !== "") {
3344
- const t = Yn[e];
3347
+ const t = er[e];
3345
3348
  return !!(this.getFormat() & t);
3346
3349
  }
3347
3350
  return !1;
@@ -3384,7 +3387,7 @@ class Ht extends Ut {
3384
3387
  return t.__dir = e, t;
3385
3388
  }
3386
3389
  setFormat(e) {
3387
- return this.getWritable().__format = e !== "" ? Yn[e] : 0, this;
3390
+ return this.getWritable().__format = e !== "" ? er[e] : 0, this;
3388
3391
  }
3389
3392
  setStyle(e) {
3390
3393
  return this.getWritable().__style = e || "", this;
@@ -3435,7 +3438,7 @@ class Ht extends Ut {
3435
3438
  const g = I();
3436
3439
  if (F(g)) {
3437
3440
  const p = new Set(a), _ = new Set(c), { anchor: m, focus: y } = g;
3438
- Mr(m, p, _) && Ot(m, m.getNode(), this, h, f), Mr(y, p, _) && Ot(y, y.getNode(), this, h, f), u !== 0 || this.canBeEmpty() || rt(this) || this.remove();
3441
+ Wr(m, p, _) && Ot(m, m.getNode(), this, h, f), Wr(y, p, _) && Ot(y, y.getNode(), this, h, f), u !== 0 || this.canBeEmpty() || rt(this) || this.remove();
3439
3442
  }
3440
3443
  }
3441
3444
  return o;
@@ -3489,7 +3492,7 @@ class Ht extends Ut {
3489
3492
  function S(n) {
3490
3493
  return n instanceof Ht;
3491
3494
  }
3492
- function Mr(n, e, t) {
3495
+ function Wr(n, e, t) {
3493
3496
  let r = n.getNode();
3494
3497
  for (; r; ) {
3495
3498
  const s = r.__key;
@@ -3571,7 +3574,7 @@ class ct extends Ht {
3571
3574
  function Z(n) {
3572
3575
  return n instanceof ct;
3573
3576
  }
3574
- function Vn() {
3577
+ function jn() {
3575
3578
  return new qt(/* @__PURE__ */ new Map([["root", new ct()]]));
3576
3579
  }
3577
3580
  function Ps(n) {
@@ -3595,14 +3598,14 @@ class qt {
3595
3598
  return this._nodeMap.size === 1 && this._selection === null;
3596
3599
  }
3597
3600
  read(e, t) {
3598
- return Ir(t && t.editor || null, this, e);
3601
+ return Ar(t && t.editor || null, this, e);
3599
3602
  }
3600
3603
  clone(e) {
3601
3604
  const t = new qt(this._nodeMap, e === void 0 ? this._selection : e);
3602
3605
  return t._readOnly = !0, t;
3603
3606
  }
3604
3607
  toJSON() {
3605
- return Ir(null, this, () => ({ root: Ps(G()) }));
3608
+ return Ar(null, this, () => ({ root: Ps(G()) }));
3606
3609
  }
3607
3610
  }
3608
3611
  class Qi extends Ht {
@@ -3659,7 +3662,7 @@ class We extends Ht {
3659
3662
  }
3660
3663
  exportDOM(e) {
3661
3664
  const { element: t } = super.exportDOM(e);
3662
- if (t && ss(t)) {
3665
+ if (t && Kn(t)) {
3663
3666
  this.isEmpty() && t.append(document.createElement("br"));
3664
3667
  const r = this.getFormatType();
3665
3668
  t.style.textAlign = r;
@@ -3707,15 +3710,15 @@ function ve() {
3707
3710
  function Cn(n) {
3708
3711
  return n instanceof We;
3709
3712
  }
3710
- const _o = 0, po = 1, yo = 4;
3713
+ const vo = 0, So = 1, To = 4;
3711
3714
  function Fs(n, e, t, r) {
3712
3715
  const s = n._keyToDOMMap;
3713
- s.clear(), n._editorState = Vn(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Ee, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
3716
+ s.clear(), n._editorState = jn(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Ee, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
3714
3717
  const i = n._observer;
3715
3718
  i !== null && (i.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", s.set("root", t));
3716
3719
  }
3717
- function mo(n) {
3718
- const e = n || {}, t = Hi(), r = e.theme || {}, s = n === void 0 ? t : e.parentEditor || null, i = e.disableEvents || !1, o = Vn(), l = e.namespace || (s !== null ? s._config.namespace : ts()), c = e.editorState, a = [ct, Me, st, it, We, Qi, ...e.nodes || []], { onError: f, html: h } = e, u = e.editable === void 0 || e.editable;
3720
+ function Co(n) {
3721
+ const e = n || {}, t = Hi(), r = e.theme || {}, s = n === void 0 ? t : e.parentEditor || null, i = e.disableEvents || !1, o = jn(), l = e.namespace || (s !== null ? s._config.namespace : ns()), c = e.editorState, a = [ct, Me, st, it, We, Qi, ...e.nodes || []], { onError: f, html: h } = e, u = e.editable === void 0 || e.editable;
3719
3722
  let d;
3720
3723
  if (n === void 0 && t !== null) d = t._nodes;
3721
3724
  else {
@@ -3749,7 +3752,7 @@ function mo(n) {
3749
3752
  }
3750
3753
  class Qt {
3751
3754
  constructor(e, t, r, s, i, o, l) {
3752
- this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = s, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Ee, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = ts(), this._onError = i, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
3755
+ this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = s, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Ee, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = ns(), this._onError = i, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
3753
3756
  }
3754
3757
  isComposing() {
3755
3758
  return this._compositionKey != null;
@@ -3866,24 +3869,24 @@ class Qt {
3866
3869
  const c = l.ownerDocument;
3867
3870
  return c && c.defaultView || null;
3868
3871
  }(e), o = e.style;
3869
- o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = i, this._dirtyType = Ae, qr(this), this._updateTags.add("history-merge"), me(this), this._config.disableEvents || function(l, c) {
3872
+ o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = i, this._dirtyType = Ae, Qr(this), this._updateTags.add("history-merge"), me(this), this._config.disableEvents || function(l, c) {
3870
3873
  const a = l.ownerDocument, f = Dt.get(a);
3871
3874
  (f === void 0 || f < 1) && a.addEventListener("selectionchange", ms), Dt.set(a, (f || 0) + 1), l.__lexicalEditor = c;
3872
3875
  const h = ys(l);
3873
3876
  for (let u = 0; u < xn.length; u++) {
3874
3877
  const [d, g] = xn[u], p = typeof g == "function" ? (_) => {
3875
- mr(_) || (yr(_), (c.isEditable() || d === "click") && g(_, c));
3878
+ xr(_) || (mr(_), (c.isEditable() || d === "click") && g(_, c));
3876
3879
  } : (_) => {
3877
- if (mr(_)) return;
3878
- yr(_);
3880
+ if (xr(_)) return;
3881
+ mr(_);
3879
3882
  const m = c.isEditable();
3880
3883
  switch (d) {
3881
3884
  case "cut":
3882
- return m && w(c, Kr, _);
3885
+ return m && w(c, $r, _);
3883
3886
  case "copy":
3884
- return w(c, Rr, _);
3887
+ return w(c, Kr, _);
3885
3888
  case "paste":
3886
- return m && w(c, Wr, _);
3889
+ return m && w(c, zr, _);
3887
3890
  case "dragstart":
3888
3891
  return m && w(c, Xs, _);
3889
3892
  case "dragover":
@@ -3914,17 +3917,17 @@ class Qt {
3914
3917
  return this._editorState;
3915
3918
  }
3916
3919
  setEditorState(e, t) {
3917
- e.isEmpty() && b(38), Hr(this);
3920
+ e.isEmpty() && b(38), qr(this);
3918
3921
  const r = this._pendingEditorState, s = this._updateTags, i = t !== void 0 ? t.tag : null;
3919
3922
  r === null || r.isEmpty() || (i != null && s.add(i), me(this)), this._pendingEditorState = e, this._dirtyType = Ae, this._dirtyElements.set("root", !1), this._compositionKey = null, i != null && s.add(i), me(this);
3920
3923
  }
3921
3924
  parseEditorState(e, t) {
3922
3925
  return function(r, s, i) {
3923
- const o = Vn(), l = R, c = Q, a = K, f = s._dirtyElements, h = s._dirtyLeaves, u = s._cloneNotNeeded, d = s._dirtyType;
3926
+ const o = jn(), l = R, c = Q, a = K, f = s._dirtyElements, h = s._dirtyLeaves, u = s._cloneNotNeeded, d = s._dirtyType;
3924
3927
  s._dirtyElements = /* @__PURE__ */ new Map(), s._dirtyLeaves = /* @__PURE__ */ new Set(), s._cloneNotNeeded = /* @__PURE__ */ new Set(), s._dirtyType = 0, R = o, Q = !1, K = s;
3925
3928
  try {
3926
3929
  const g = s._nodes;
3927
- Un(r.root, g), i && i(), o._readOnly = !0;
3930
+ Vn(r.root, g), i && i(), o._readOnly = !0;
3928
3931
  } catch (g) {
3929
3932
  g instanceof Error && s._onError(g);
3930
3933
  } finally {
@@ -3966,78 +3969,88 @@ class Qt {
3966
3969
  }
3967
3970
  Qt.version = "0.18.0+prod.esm";
3968
3971
  export {
3969
- tt as $,
3970
- yo as A,
3971
- Qr as B,
3972
- dr as C,
3973
- _o as D,
3974
- uo as E,
3972
+ ao as $,
3973
+ to as A,
3974
+ xo as B,
3975
+ hr as C,
3976
+ To as D,
3977
+ po as E,
3975
3978
  Cn as F,
3976
- Kr as G,
3977
- jt as H,
3979
+ Mt as G,
3980
+ _o as H,
3978
3981
  I,
3979
- Gn as J,
3980
- Zs as K,
3981
- po as L,
3982
- Rr as M,
3983
- zt as N,
3984
- Xs as O,
3982
+ Ie as J,
3983
+ co as K,
3984
+ So as L,
3985
+ Kr as M,
3986
+ zr as N,
3987
+ Xr as O,
3985
3988
  ve as P,
3986
- Qs as Q,
3987
- fo as R,
3988
- co as S,
3989
- kr as T,
3990
- Si as U,
3991
- lo as V,
3992
- mo as W,
3993
- fr as X,
3994
- ue as Y,
3995
- js as Z,
3996
- oo as _,
3997
- Xn as a,
3998
- un as a0,
3999
- gt as a1,
4000
- Hs as a2,
4001
- yt as a3,
4002
- Vs as a4,
4003
- so as a5,
4004
- zs as a6,
4005
- Rs as a7,
4006
- Js as a8,
4007
- $s as a9,
4008
- ro as aa,
4009
- no as ab,
4010
- ho as ac,
4011
- io as ad,
4012
- Zn as ae,
4013
- je as af,
4014
- xt as ag,
4015
- mt as ah,
4016
- Ms as ai,
3989
+ vo as Q,
3990
+ $r as R,
3991
+ go as S,
3992
+ br as T,
3993
+ Yn as U,
3994
+ fo as V,
3995
+ Co as W,
3996
+ dr as X,
3997
+ Me as Y,
3998
+ Zs as Z,
3999
+ uo as _,
4000
+ Zn as a,
4001
+ zt as a0,
4002
+ Xs as a1,
4003
+ Qs as a2,
4004
+ yo as a3,
4005
+ Si as a4,
4006
+ ue as a5,
4007
+ js as a6,
4008
+ un as a7,
4009
+ gt as a8,
4010
+ Hs as a9,
4011
+ yt as aa,
4012
+ Vs as ab,
4013
+ so as ac,
4014
+ zs as ad,
4015
+ Rs as ae,
4016
+ Js as af,
4017
+ $s as ag,
4018
+ ro as ah,
4019
+ no as ai,
4020
+ mo as aj,
4021
+ io as ak,
4022
+ Gn as al,
4023
+ je as am,
4024
+ xt as an,
4025
+ mt as ao,
4026
+ Ms as ap,
4027
+ Zr as aq,
4028
+ lo as ar,
4029
+ oo as as,
4017
4030
  rt as b,
4018
- Gi as c,
4031
+ jt as c,
4019
4032
  we as d,
4020
- A as e,
4033
+ As as e,
4021
4034
  $t as f,
4022
- N as g,
4023
- Z as h,
4024
- Qi as i,
4025
- Li as j,
4026
- Pi as k,
4027
- As as l,
4035
+ Rr as g,
4036
+ Br as h,
4037
+ Gi as i,
4038
+ A as j,
4039
+ Z as k,
4040
+ N as l,
4028
4041
  F as m,
4029
- $n as n,
4042
+ Qi as n,
4030
4043
  $ as o,
4031
4044
  Ht as p,
4032
- to as q,
4033
- go as r,
4034
- Mt as s,
4045
+ tt as q,
4046
+ Li as r,
4047
+ Pi as s,
4035
4048
  eo as t,
4036
4049
  Yi as u,
4037
- ss as v,
4050
+ Kn as v,
4038
4051
  G as w,
4039
- ao as x,
4052
+ ho as x,
4040
4053
  S as y,
4041
- Wr as z
4054
+ Jn as z
4042
4055
  };
4043
- //# sourceMappingURL=Lexical.prod-DSsdOWxu.js.map
4056
+ //# sourceMappingURL=Lexical.prod-DNRTKPfN.js.map