@uva-glass/component-library 3.35.0 → 3.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/{Lexical.prod-C7FcGFd7.js → Lexical.prod-7x3WP3vd.js} +562 -563
  2. package/dist/Lexical.prod-7x3WP3vd.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-CeOlk1NB.js → LexicalClipboard.prod-BMLLh6JL.js} +11 -11
  4. package/dist/{LexicalClipboard.prod-CeOlk1NB.js.map → LexicalClipboard.prod-BMLLh6JL.js.map} +1 -1
  5. package/dist/{LexicalLink.prod-CSI9BSPD.js → LexicalLink.prod-Dr6L083o.js} +3 -3
  6. package/dist/{LexicalLink.prod-CSI9BSPD.js.map → LexicalLink.prod-Dr6L083o.js.map} +1 -1
  7. package/dist/{LexicalList.prod-TMA2LN4v.js → LexicalList.prod-nl__pKjG.js} +11 -11
  8. package/dist/{LexicalList.prod-TMA2LN4v.js.map → LexicalList.prod-nl__pKjG.js.map} +1 -1
  9. package/dist/{LexicalSelection.prod-DDwSrdAV.js → LexicalSelection.prod-CB_xP0pP.js} +24 -22
  10. package/dist/{LexicalSelection.prod-DDwSrdAV.js.map → LexicalSelection.prod-CB_xP0pP.js.map} +1 -1
  11. package/dist/{LexicalTable.prod-DYP5JQC0.js → LexicalTable.prod-CwkGGOke.js} +4 -4
  12. package/dist/{LexicalTable.prod-DYP5JQC0.js.map → LexicalTable.prod-CwkGGOke.js.map} +1 -1
  13. package/dist/{LexicalUtils.prod-D_SPJ6vo.js → LexicalUtils.prod-CtYaCJNB.js} +25 -25
  14. package/dist/LexicalUtils.prod-CtYaCJNB.js.map +1 -0
  15. package/dist/{TablePlugin-CI_6HCsd.js → TablePlugin-C38z2r5y.js} +4 -4
  16. package/dist/{TablePlugin-CI_6HCsd.js.map → TablePlugin-C38z2r5y.js.map} +1 -1
  17. package/dist/{client-D0KlBcsm.js → client-BIzWgcD3.js} +766 -758
  18. package/dist/{client-D0KlBcsm.js.map → client-BIzWgcD3.js.map} +1 -1
  19. package/dist/components/Accordion/Accordion.test.js +3 -3
  20. package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
  21. package/dist/components/ActionList/ActionList.test.js +3 -3
  22. package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
  23. package/dist/components/Attention/Attention.test.js +2 -2
  24. package/dist/components/Backdrop/Backdrop.test.js +2 -2
  25. package/dist/components/Buttons/Button.stories.js +1 -1
  26. package/dist/components/Buttons/Button.test.js +2 -2
  27. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  28. package/dist/components/Buttons/LinkButton.test.js +2 -2
  29. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  30. package/dist/components/Buttons/MenuButton.test.js +2 -2
  31. package/dist/components/Card/Card.test.js +2 -2
  32. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  33. package/dist/components/Checkbox/Checkbox.test.js +3 -3
  34. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  35. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
  36. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  37. package/dist/components/CheckboxTree/CheckboxTree.stories.js +7 -7
  38. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  39. package/dist/components/Chip/Chip.stories.js +1 -1
  40. package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
  41. package/dist/components/Drawer/Drawer.stories.js +1 -1
  42. package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
  43. package/dist/components/FormInput/FormInput.js +1 -1
  44. package/dist/components/FormInput/FormInput.stories.js +1 -1
  45. package/dist/components/IconButton/IconButton.stories.js +1 -1
  46. package/dist/components/InputField/InputField.stories.js +2 -2
  47. package/dist/components/Label/Label.test.js +2 -2
  48. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  49. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  50. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  51. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  52. package/dist/components/MultiSelect/index.js +1 -1
  53. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
  54. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
  55. package/dist/components/Notification/Notification.stories.js +1 -1
  56. package/dist/components/Notification/Notification.test.js +2 -2
  57. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  58. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  59. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  60. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  61. package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
  62. package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
  63. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  64. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
  65. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  66. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +5 -5
  67. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  68. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  69. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  70. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +4 -4
  71. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  72. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
  73. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
  74. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  75. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  76. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
  77. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  78. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
  79. package/dist/components/RteEditor/Plugins/index.js +1 -1
  80. package/dist/components/RteEditor/RteEditor.js +41 -41
  81. package/dist/components/RteEditor/helpers.js +4 -4
  82. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  83. package/dist/components/Sortable/Sortable.stories.js +1 -1
  84. package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
  85. package/dist/components/TextArea/TextArea.stories.js +1 -1
  86. package/dist/components/TextArea/TextArea.test.js +3 -3
  87. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  88. package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
  89. package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
  90. package/dist/components/index.js +1 -1
  91. package/dist/{helpers-CYiLlioz.js → helpers-B0VCD9f3.js} +4 -4
  92. package/dist/{helpers-CYiLlioz.js.map → helpers-B0VCD9f3.js.map} +1 -1
  93. package/dist/{index-Ccsg2cb2.js → index-D1fbc4P-.js} +7584 -6612
  94. package/dist/index-D1fbc4P-.js.map +1 -0
  95. package/dist/{index-Ds1dMTvJ.js → index-DDN7R-oN.js} +2 -2
  96. package/dist/{index-Ds1dMTvJ.js.map → index-DDN7R-oN.js.map} +1 -1
  97. package/dist/{index-C2E9FY6V.js → index-DFu0GqDc.js} +59 -39
  98. package/dist/index-DFu0GqDc.js.map +1 -0
  99. package/dist/{index-Br0QepD6.js → index-DzN3R4wD.js} +2894 -3784
  100. package/dist/index-DzN3R4wD.js.map +1 -0
  101. package/dist/index.js +1 -1
  102. package/dist/{react-18-inmoTCp-.js → react-18-CbXtwYTX.js} +2 -2
  103. package/dist/{react-18-inmoTCp-.js.map → react-18-CbXtwYTX.js.map} +1 -1
  104. package/dist/{react.esm-BKjCIfbB.js → react.esm-DMlPLy-4.js} +3 -3
  105. package/dist/{react.esm-BKjCIfbB.js.map → react.esm-DMlPLy-4.js.map} +1 -1
  106. package/dist/setupTests.js +1 -1
  107. package/dist/storybook__react.d.js +8079 -8042
  108. package/dist/storybook__react.d.js.map +1 -1
  109. package/package.json +33 -33
  110. package/dist/Lexical.prod-C7FcGFd7.js.map +0 -1
  111. package/dist/LexicalUtils.prod-D_SPJ6vo.js.map +0 -1
  112. package/dist/index-Br0QepD6.js.map +0 -1
  113. package/dist/index-C2E9FY6V.js.map +0 -1
  114. package/dist/index-Ccsg2cb2.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { a5 as v, a6 as M, a7 as S, a9 as I, x as g, an as T, a3 as w, k as _, ao as E, ap as O, a2 as B, aq as p, P as D, M as F } from "./Lexical.prod-C7FcGFd7.js";
1
+ import { a5 as M, a6 as S, a7 as T, a9 as I, x as g, an as _, a3 as w, l as E, ao as O, ap as B, a2 as D, aq as p, P as F, M as b } from "./Lexical.prod-7x3WP3vd.js";
2
2
  const h = /* @__PURE__ */ new Map();
3
- function k(e) {
3
+ function x(e) {
4
4
  const t = {};
5
5
  if (!e) return t;
6
6
  const n = e.split(";");
@@ -12,35 +12,35 @@ function k(e) {
12
12
  }
13
13
  function A(e) {
14
14
  let t = h.get(e);
15
- return t === void 0 && (t = k(e), h.set(e, t)), t;
15
+ return t === void 0 && (t = x(e), h.set(e, t)), t;
16
16
  }
17
17
  function G(e, t) {
18
18
  const n = e.getStartEndPoints();
19
- if (t.isSelected(e) && !E(t) && n !== null) {
19
+ if (t.isSelected(e) && !O(t) && n !== null) {
20
20
  const [o, r] = n, s = e.isBackward(), i = o.getNode(), f = r.getNode(), c = t.is(i), u = t.is(f);
21
21
  if (c || u) {
22
- const [a, l] = O(e), K = i.is(f), P = t.is(s ? f : i), N = t.is(s ? i : f);
22
+ const [a, l] = B(e), N = i.is(f), k = t.is(s ? f : i), v = t.is(s ? i : f);
23
23
  let d, y = 0;
24
- K ? (y = a > l ? l : a, d = a > l ? a : l) : P ? (y = s ? l : a, d = void 0) : N && (y = 0, d = s ? a : l), t.__text = t.__text.slice(y, d);
24
+ N ? (y = a > l ? l : a, d = a > l ? a : l) : k ? (y = s ? l : a, d = void 0) : v && (y = 0, d = s ? a : l), t.__text = t.__text.slice(y, d);
25
25
  }
26
26
  }
27
27
  return t;
28
28
  }
29
29
  function J(e) {
30
- const t = e.getStyle(), n = k(t);
30
+ const t = e.getStyle(), n = x(t);
31
31
  h.set(t, n);
32
32
  }
33
- function b(e, t) {
33
+ function q(e, t) {
34
34
  const n = e.getFormatType(), o = e.getIndent();
35
35
  n !== t.getFormatType() && t.setFormat(n), o !== t.getIndent() && t.setIndent(o);
36
36
  }
37
- function Q(e, t, n = b) {
37
+ function Q(e, t, n = q) {
38
38
  if (e === null) return;
39
39
  const o = e.getStartEndPoints(), r = /* @__PURE__ */ new Map();
40
40
  let s = null;
41
41
  if (o) {
42
42
  const [i, f] = o;
43
- s = B(), s.anchor.set(i.key, i.offset, i.type), s.focus.set(f.key, f.offset, f.type);
43
+ s = D(), s.anchor.set(i.key, i.offset, i.type), s.focus.set(f.key, f.offset, f.type);
44
44
  const c = m(i.getNode(), p), u = m(f.getNode(), p);
45
45
  g(c) && r.set(c.getKey(), c), g(u) && r.set(u.getKey(), u);
46
46
  }
@@ -53,37 +53,39 @@ function Q(e, t, n = b) {
53
53
  const c = t();
54
54
  n(f, c), f.replace(c, !0), s && (i === s.anchor.key && s.anchor.set(c.getKey(), s.anchor.offset, s.anchor.type), i === s.focus.key && s.focus.set(c.getKey(), s.focus.offset, s.focus.type));
55
55
  }
56
- s && e.is(D()) && F(s);
56
+ s && e.is(F()) && b(s);
57
57
  }
58
- function x(e) {
59
- const t = e.anchor.getNode(), n = w(t) ? t : t.getParentOrThrow(), o = _().getElementByKey(n.getKey());
58
+ function K(e) {
59
+ const t = e.anchor.getNode(), n = w(t) ? t : t.getParentOrThrow(), o = E().getElementByKey(n.getKey());
60
60
  if (o === null) return !1;
61
61
  const r = o.ownerDocument.defaultView;
62
62
  return r === null ? !1 : r.getComputedStyle(o).writingMode === "vertical-rl";
63
63
  }
64
64
  function V(e, t) {
65
- const n = x(e) ? !t : t, o = v(e.focus, n ? "previous" : "next");
66
- if (M(o)) return !1;
67
- for (const r of S(o)) {
65
+ let n = K(e) ? !t : t;
66
+ P(e) && (n = !n);
67
+ const o = M(e.focus, n ? "previous" : "next");
68
+ if (S(o)) return !1;
69
+ for (const r of T(o)) {
68
70
  if (I(r)) return !r.origin.isInline();
69
71
  if (!g(r.origin)) {
70
- if (T(r.origin)) return !0;
72
+ if (_(r.origin)) return !0;
71
73
  break;
72
74
  }
73
75
  }
74
76
  return !1;
75
77
  }
76
- function q(e, t, n, o) {
78
+ function C(e, t, n, o) {
77
79
  e.modify(t ? "extend" : "move", n, o);
78
80
  }
79
- function C(e) {
81
+ function P(e) {
80
82
  const t = e.anchor.getNode();
81
83
  return (w(t) ? t : t.getParentOrThrow()).getDirection() === "rtl";
82
84
  }
83
85
  function W(e, t, n) {
84
- const o = C(e);
86
+ const o = P(e);
85
87
  let r;
86
- r = x(e) || o ? !n : n, q(e, t, r, "character");
88
+ r = K(e) || o ? !n : n, C(e, t, r, "character");
87
89
  }
88
90
  function m(e, t) {
89
91
  let n = e;
@@ -98,4 +100,4 @@ export {
98
100
  G as b,
99
101
  J as z
100
102
  };
101
- //# sourceMappingURL=LexicalSelection.prod-DDwSrdAV.js.map
103
+ //# sourceMappingURL=LexicalSelection.prod-CB_xP0pP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LexicalSelection.prod-DDwSrdAV.js","sources":["../node_modules/@lexical/selection/LexicalSelection.prod.mjs"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{$isTextNode as e,$isTokenOrSegmented as t,$getCharacterOffsets as n,$isElementNode as o,$isRootNode as l,$getNodeByKey as r,$getPreviousSelection as s,$createTextNode as i,$isRangeSelection as c,$getSelection as f,$caretRangeFromSelection as u,$createRangeSelection as g,INTERNAL_$isBlock as a,$setSelection as d,$isRootOrShadowRoot as p,$hasAncestor as h,$isLeafNode as y,$caretFromPoint as m,$isExtendableTextPointCaret as S,$extendCaretToRange as x,$isChildCaret as T,$isDecoratorNode as w,$getEditor as v}from\"lexical\";export{$cloneWithProperties,$selectAll}from\"lexical\";function N(e,...t){const n=new URL(\"https://lexical.dev/docs/error\"),o=new URLSearchParams;o.append(\"code\",e);for(const e of t)o.append(\"v\",e);throw n.search=o.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const C=new Map;function P(e){let t=e;for(;null!=t;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function K(e){const t=e.parentNode;if(null==t)throw new Error(\"Should never happen\");return[t,Array.from(t.childNodes).indexOf(e)]}function E(t,n,o,l,r){const s=n.getKey(),i=l.getKey(),c=document.createRange();let f=t.getElementByKey(s),u=t.getElementByKey(i),g=o,a=r;if(e(n)&&(f=P(f)),e(l)&&(u=P(u)),void 0===n||void 0===l||null===f||null===u)return null;\"BR\"===f.nodeName&&([f,g]=K(f)),\"BR\"===u.nodeName&&([u,a]=K(u));const d=f.firstChild;f===u&&null!=d&&\"BR\"===d.nodeName&&0===g&&0===a&&(a=1);try{c.setStart(f,g),c.setEnd(u,a)}catch(e){return null}return!c.collapsed||g===a&&s===i||(c.setStart(u,a),c.setEnd(f,g)),c}function k(e,t){const n=e.getRootElement();if(null===n)return[];const o=n.getBoundingClientRect(),l=getComputedStyle(n),r=parseFloat(l.paddingLeft)+parseFloat(l.paddingRight),s=Array.from(t.getClientRects());let i,c=s.length;s.sort(((e,t)=>{const n=e.top-t.top;return Math.abs(n)<=3?e.left-t.left:n}));for(let e=0;e<c;e++){const t=s[e],n=i&&i.top<=t.top&&i.top+i.height>t.top&&i.left+i.width>t.left,l=t.width+r===o.width;n||l?(s.splice(e--,1),c--):i=t}return s}function I(e){const t={};if(!e)return t;const n=e.split(\";\");for(const e of n)if(\"\"!==e){const[n,o]=e.split(/:([^]+)/);n&&o&&(t[n.trim()]=o.trim())}return t}function B(e){let t=C.get(e);return void 0===t&&(t=I(e),C.set(e,t)),t}function F(e){let t=\"\";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}function b(e,o){const l=e.getStartEndPoints();if(o.isSelected(e)&&!t(o)&&null!==l){const[t,r]=l,s=e.isBackward(),i=t.getNode(),c=r.getNode(),f=o.is(i),u=o.is(c);if(f||u){const[t,l]=n(e),r=i.is(c),f=o.is(s?c:i),u=o.is(s?i:c);let g,a=0;if(r)a=t>l?l:t,g=t>l?t:l;else if(f){a=s?l:t,g=void 0}else if(u){a=0,g=s?t:l}o.__text=o.__text.slice(a,g)}}return o}function O(e){if(\"text\"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return o(t)||N(177),e.offset===t.getChildrenSize()}function R(t,n,f){let u=n.getNode(),g=f;if(o(u)){const e=u.getDescendantByIndex(n.offset);null!==e&&(u=e)}for(;g>0&&null!==u;){if(o(u)){const e=u.getLastDescendant();null!==e&&(u=e)}let f=u.getPreviousSibling(),a=0;if(null===f){let e=u.getParentOrThrow(),t=e.getPreviousSibling();for(;null===t;){if(e=e.getParent(),null===e){f=null;break}t=e.getPreviousSibling()}null!==e&&(a=e.isInline()?0:2,f=t)}let d=u.getTextContent();\"\"===d&&o(u)&&!u.isInline()&&(d=\"\\n\\n\");const p=d.length;if(!e(u)||g>=p){const e=u.getParent();u.remove(),null==e||0!==e.getChildrenSize()||l(e)||e.remove(),g-=p+a,u=f}else{const o=u.getKey(),l=t.getEditorState().read((()=>{const t=r(o);return e(t)&&t.isSimpleText()?t.getTextContent():null})),f=p-g,a=d.slice(0,f);if(null!==l&&l!==d){const e=s();let t=u;if(u.isSimpleText())u.setTextContent(l);else{const e=i(l);u.replace(e),t=e}if(c(e)&&e.isCollapsed()){const n=e.anchor.offset;t.select(n,n)}}else if(u.isSimpleText()){const e=n.key===o;let t=n.offset;t<g&&(t=p);const l=e?t-g:0,r=e?t:f;if(e&&0===l){const[e]=u.splitText(l,r);e.remove()}else{const[,e]=u.splitText(l,r);e.remove()}}else{const e=i(a);u.replace(e)}g=0}}}function z(e){const t=e.getStyle(),n=I(t);C.set(t,n)}function A(t,n){(c(t)?t.isCollapsed():e(t)||o(t))||N(280);const l=B(c(t)?t.style:e(t)?t.getStyle():t.getTextStyle()),r=Object.entries(n).reduce(((e,[n,o])=>(\"function\"==typeof o?e[n]=o(l[n],t):null===o?delete e[n]:e[n]=o,e)),{...l}),s=F(r);c(t)||e(t)?t.setStyle(s):t.setTextStyle(s),C.set(s,r)}function M(e,t){if(c(e)&&e.isCollapsed()){A(e,t);const n=e.anchor.getNode();o(n)&&n.isEmpty()&&A(n,t)}L((e=>{A(e,t)}))}function L(n){const o=f();if(!o)return;const l=new Map;if(c(o))for(const e of u(o).getTextSlices())e&&l.set(e.caret.origin.getKey(),e.getSliceIndices());const r=o.getNodes();for(const o of r){if(!e(o)||!o.canHaveFormat())continue;const[r,i]=(s=o,l.get(s.getKey())||[0,s.getTextContentSize()]);if(i!==r)if(t(o)||0===r&&i===o.getTextContentSize())n(o);else{n(o.splitText(r,i)[0===r?0:1])}}var s;c(o)&&\"text\"===o.anchor.type&&\"text\"===o.focus.type&&o.anchor.key===o.focus.key&&$(o)}function $(e){if(e.isBackward()){const{anchor:t,focus:n}=e,{key:o,offset:l,type:r}=t;t.set(n.key,n.offset,n.type),n.set(o,l,r)}}function D(e,t){const n=e.getFormatType(),o=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),o!==t.getIndent()&&t.setIndent(o)}function _(e,t,n=D){if(null===e)return;const l=e.getStartEndPoints(),r=new Map;let s=null;if(l){const[e,t]=l;s=g(),s.anchor.set(e.key,e.offset,e.type),s.focus.set(t.key,t.offset,t.type);const n=Z(e.getNode(),a),i=Z(t.getNode(),a);o(n)&&r.set(n.getKey(),n),o(i)&&r.set(i.getKey(),i)}for(const t of e.getNodes())if(o(t)&&a(t))r.set(t.getKey(),t);else if(null===l){const e=Z(t,a);o(e)&&r.set(e.getKey(),e)}for(const[e,o]of r){const l=t();n(o,l),o.replace(l,!0),s&&(e===s.anchor.key&&s.anchor.set(l.getKey(),s.anchor.offset,s.anchor.type),e===s.focus.key&&s.focus.set(l.getKey(),s.focus.offset,s.focus.type))}s&&e.is(f())&&d(s)}function U(e){return e.getNode().isAttached()}function j(e){let t=e;for(;null!==t&&!p(t);){const e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function H(e,t,n=null){const o=e.getStartEndPoints(),l=o?o[0]:null,r=e.getNodes(),s=r.length;if(null!==l&&(0===s||1===s&&\"element\"===l.type&&0===l.getNode().getChildrenSize())){const e=\"text\"===l.type?l.getNode().getParentOrThrow():l.getNode(),o=e.getChildren();let r=t();return r.setFormat(e.getFormatType()),r.setIndent(e.getIndent()),o.forEach((e=>r.append(e))),n&&(r=n.append(r)),void e.replace(r)}let i=null,c=[];for(let o=0;o<s;o++){const l=r[o];p(l)?(V(e,c,c.length,t,n),c=[],i=l):null===i||null!==i&&h(l,i)?c.push(l):(V(e,c,c.length,t,n),c=[l])}V(e,c,c.length,t,n)}function V(e,t,n,l,r=null){if(0===t.length)return;const i=t[0],f=new Map,u=[];let g=o(i)?i:i.getParentOrThrow();g.isInline()&&(g=g.getParentOrThrow());let a=!1;for(;null!==g;){const e=g.getPreviousSibling();if(null!==e){g=e,a=!0;break}if(g=g.getParentOrThrow(),p(g))break}const h=new Set;for(let e=0;e<n;e++){const n=t[e];o(n)&&0===n.getChildrenSize()&&h.add(n.getKey())}const m=new Set;for(let e=0;e<n;e++){const n=t[e];let r=n.getParent();if(null!==r&&r.isInline()&&(r=r.getParent()),null!==r&&y(n)&&!m.has(n.getKey())){const e=r.getKey();if(void 0===f.get(e)){const t=l();t.setFormat(r.getFormatType()),t.setIndent(r.getIndent()),u.push(t),f.set(e,t),r.getChildren().forEach((e=>{t.append(e),m.add(e.getKey()),o(e)&&e.getChildrenKeys().forEach((e=>m.add(e)))})),j(r)}}else if(h.has(n.getKey())){o(n)||N(179);const e=l();e.setFormat(n.getFormatType()),e.setIndent(n.getIndent()),u.push(e),n.remove(!0)}}if(null!==r)for(let e=0;e<u.length;e++){const t=u[e];r.append(t)}let S=null;if(p(g))if(a)if(null!==r)g.insertAfter(r);else for(let e=u.length-1;e>=0;e--){const t=u[e];g.insertAfter(t)}else{const e=g.getFirstChild();if(o(e)&&(g=e),null===e)if(r)g.append(r);else for(let e=0;e<u.length;e++){const t=u[e];g.append(t),S=t}else if(null!==r)e.insertBefore(r);else for(let t=0;t<u.length;t++){const n=u[t];e.insertBefore(n),S=n}}else if(r)g.insertAfter(r);else for(let e=u.length-1;e>=0;e--){const t=u[e];g.insertAfter(t),S=t}const x=s();c(x)&&U(x.anchor)&&U(x.focus)?d(x.clone()):null!==S?S.selectEnd():e.dirty=!0}function W(e){const t=e.anchor.getNode(),n=l(t)?t:t.getParentOrThrow(),o=v().getElementByKey(n.getKey());if(null===o)return!1;const r=o.ownerDocument.defaultView;if(null===r)return!1;return\"vertical-rl\"===r.getComputedStyle(o).writingMode}function X(e,t){const n=W(e)?!t:t,l=m(e.focus,n?\"previous\":\"next\");if(S(l))return!1;for(const e of x(l)){if(T(e))return!e.origin.isInline();if(!o(e.origin)){if(w(e.origin))return!0;break}}return!1}function q(e,t,n,o){e.modify(t?\"extend\":\"move\",n,o)}function G(e){const t=e.anchor.getNode();return\"rtl\"===(l(t)?t:t.getParentOrThrow()).getDirection()}function J(e,t,n){const o=G(e);let l;l=W(e)||o?!n:n,q(e,t,l,\"character\")}function Q(e,t,n){const o=B(e.getStyle());return null!==o&&o[t]||n}function Y(t,n,o=\"\"){let l=null;const r=t.getNodes(),s=t.anchor,i=t.focus,f=t.isBackward(),u=f?i.offset:s.offset,g=f?i.getNode():s.getNode();if(c(t)&&t.isCollapsed()&&\"\"!==t.style){const e=B(t.style);if(null!==e&&n in e)return e[n]}for(let t=0;t<r.length;t++){const s=r[t];if((0===t||0!==u||!s.is(g))&&e(s)){const e=Q(s,n,o);if(null===l)l=e;else if(l!==e){l=\"\";break}}}return null===l?o:l}function Z(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const ee=R;export{z as $addNodeStyle,D as $copyBlockFormatIndent,$ as $ensureForwardRangeSelection,L as $forEachSelectedTextNode,Y as $getSelectionStyleValueForProperty,O as $isAtNodeEnd,G as $isParentElementRTL,q as $moveCaretSelection,J as $moveCharacter,M as $patchStyleText,_ as $setBlocksType,X as $shouldOverrideDefaultCharacterSelection,b as $sliceSelectedTextNodeContent,R as $trimTextContentFromAnchor,H as $wrapNodes,E as createDOMRange,k as createRectsFromDOMRange,F as getCSSFromStyleObject,B as getStyleObjectFromCSS,ee as trimTextContentFromAnchor};\n"],"names":["C","I","e","n","o","B","b","l","t","c","f","r","u","g","a","z","D","_","Z","i","d","W","v","X","m","S","x","T","w","G","J"],"mappings":";AAQ65B,MAAMA,IAAE,oBAAI;AAAoqC,SAASC,EAAE,GAAE;AAAC,QAAM,IAAE,CAAA;AAAG,MAAG,CAAC,EAAE,QAAO;AAAE,QAAM,IAAE,EAAE,MAAM,GAAG;AAAE,aAAUC,KAAK,EAAE,KAAQA,MAAL,IAAO;AAAC,UAAK,CAACC,GAAEC,CAAC,IAAEF,EAAE,MAAM,SAAS;AAAE,IAAAC,KAAGC,MAAI,EAAED,EAAE,KAAI,CAAE,IAAEC,EAAE,KAAI;AAAA,EAAG;AAAC,SAAO;AAAC;AAAC,SAASC,EAAE,GAAE;AAAC,MAAI,IAAEL,EAAE,IAAI,CAAC;AAAE,SAAgB,MAAT,WAAa,IAAEC,EAAE,CAAC,GAAED,EAAE,IAAI,GAAE,CAAC,IAAG;AAAC;AAA2E,SAASM,EAAE,GAAEF,GAAE;AAAC,QAAMG,IAAE,EAAE,kBAAiB;AAAG,MAAGH,EAAE,WA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js","sources":["../node_modules/@lexical/selection/LexicalSelection.prod.mjs"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{$isTextNode as e,$isTokenOrSegmented as t,$getCharacterOffsets as n,$isElementNode as o,$isRootNode as l,$getNodeByKey as r,$getPreviousSelection as s,$createTextNode as i,$isRangeSelection as c,$getSelection as f,$caretRangeFromSelection as u,$createRangeSelection as g,INTERNAL_$isBlock as a,$setSelection as d,$isRootOrShadowRoot as p,$hasAncestor as h,$isLeafNode as y,$caretFromPoint as m,$isExtendableTextPointCaret as S,$extendCaretToRange as x,$isChildCaret as T,$isDecoratorNode as w,$getEditor as v}from\"lexical\";export{$cloneWithProperties,$selectAll}from\"lexical\";function N(e,...t){const n=new URL(\"https://lexical.dev/docs/error\"),o=new URLSearchParams;o.append(\"code\",e);for(const e of t)o.append(\"v\",e);throw n.search=o.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const C=new Map;function P(e){let t=e;for(;null!=t;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function K(e){const t=e.parentNode;if(null==t)throw new Error(\"Should never happen\");return[t,Array.from(t.childNodes).indexOf(e)]}function E(t,n,o,l,r){const s=n.getKey(),i=l.getKey(),c=document.createRange();let f=t.getElementByKey(s),u=t.getElementByKey(i),g=o,a=r;if(e(n)&&(f=P(f)),e(l)&&(u=P(u)),void 0===n||void 0===l||null===f||null===u)return null;\"BR\"===f.nodeName&&([f,g]=K(f)),\"BR\"===u.nodeName&&([u,a]=K(u));const d=f.firstChild;f===u&&null!=d&&\"BR\"===d.nodeName&&0===g&&0===a&&(a=1);try{c.setStart(f,g),c.setEnd(u,a)}catch(e){return null}return!c.collapsed||g===a&&s===i||(c.setStart(u,a),c.setEnd(f,g)),c}function k(e,t){const n=e.getRootElement();if(null===n)return[];const o=n.getBoundingClientRect(),l=getComputedStyle(n),r=parseFloat(l.paddingLeft)+parseFloat(l.paddingRight),s=Array.from(t.getClientRects());let i,c=s.length;s.sort(((e,t)=>{const n=e.top-t.top;return Math.abs(n)<=3?e.left-t.left:n}));for(let e=0;e<c;e++){const t=s[e],n=i&&i.top<=t.top&&i.top+i.height>t.top&&i.left+i.width>t.left,l=t.width+r===o.width;n||l?(s.splice(e--,1),c--):i=t}return s}function I(e){const t={};if(!e)return t;const n=e.split(\";\");for(const e of n)if(\"\"!==e){const[n,o]=e.split(/:([^]+)/);n&&o&&(t[n.trim()]=o.trim())}return t}function B(e){let t=C.get(e);return void 0===t&&(t=I(e),C.set(e,t)),t}function F(e){let t=\"\";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}function b(e,o){const l=e.getStartEndPoints();if(o.isSelected(e)&&!t(o)&&null!==l){const[t,r]=l,s=e.isBackward(),i=t.getNode(),c=r.getNode(),f=o.is(i),u=o.is(c);if(f||u){const[t,l]=n(e),r=i.is(c),f=o.is(s?c:i),u=o.is(s?i:c);let g,a=0;if(r)a=t>l?l:t,g=t>l?t:l;else if(f){a=s?l:t,g=void 0}else if(u){a=0,g=s?t:l}o.__text=o.__text.slice(a,g)}}return o}function O(e){if(\"text\"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return o(t)||N(177),e.offset===t.getChildrenSize()}function R(t,n,f){let u=n.getNode(),g=f;if(o(u)){const e=u.getDescendantByIndex(n.offset);null!==e&&(u=e)}for(;g>0&&null!==u;){if(o(u)){const e=u.getLastDescendant();null!==e&&(u=e)}let f=u.getPreviousSibling(),a=0;if(null===f){let e=u.getParentOrThrow(),t=e.getPreviousSibling();for(;null===t;){if(e=e.getParent(),null===e){f=null;break}t=e.getPreviousSibling()}null!==e&&(a=e.isInline()?0:2,f=t)}let d=u.getTextContent();\"\"===d&&o(u)&&!u.isInline()&&(d=\"\\n\\n\");const p=d.length;if(!e(u)||g>=p){const e=u.getParent();u.remove(),null==e||0!==e.getChildrenSize()||l(e)||e.remove(),g-=p+a,u=f}else{const o=u.getKey(),l=t.getEditorState().read((()=>{const t=r(o);return e(t)&&t.isSimpleText()?t.getTextContent():null})),f=p-g,a=d.slice(0,f);if(null!==l&&l!==d){const e=s();let t=u;if(u.isSimpleText())u.setTextContent(l);else{const e=i(l);u.replace(e),t=e}if(c(e)&&e.isCollapsed()){const n=e.anchor.offset;t.select(n,n)}}else if(u.isSimpleText()){const e=n.key===o;let t=n.offset;t<g&&(t=p);const l=e?t-g:0,r=e?t:f;if(e&&0===l){const[e]=u.splitText(l,r);e.remove()}else{const[,e]=u.splitText(l,r);e.remove()}}else{const e=i(a);u.replace(e)}g=0}}}function z(e){const t=e.getStyle(),n=I(t);C.set(t,n)}function A(t,n){(c(t)?t.isCollapsed():e(t)||o(t))||N(280);const l=B(c(t)?t.style:e(t)?t.getStyle():t.getTextStyle()),r=Object.entries(n).reduce(((e,[n,o])=>(\"function\"==typeof o?e[n]=o(l[n],t):null===o?delete e[n]:e[n]=o,e)),{...l}),s=F(r);c(t)||e(t)?t.setStyle(s):t.setTextStyle(s),C.set(s,r)}function M(e,t){if(c(e)&&e.isCollapsed()){A(e,t);const n=e.anchor.getNode();o(n)&&n.isEmpty()&&A(n,t)}L((e=>{A(e,t)}))}function L(n){const o=f();if(!o)return;const l=new Map;if(c(o))for(const e of u(o).getTextSlices())e&&l.set(e.caret.origin.getKey(),e.getSliceIndices());const r=o.getNodes();for(const o of r){if(!e(o)||!o.canHaveFormat())continue;const[r,i]=(s=o,l.get(s.getKey())||[0,s.getTextContentSize()]);if(i!==r)if(t(o)||0===r&&i===o.getTextContentSize())n(o);else{n(o.splitText(r,i)[0===r?0:1])}}var s;c(o)&&\"text\"===o.anchor.type&&\"text\"===o.focus.type&&o.anchor.key===o.focus.key&&$(o)}function $(e){if(e.isBackward()){const{anchor:t,focus:n}=e,{key:o,offset:l,type:r}=t;t.set(n.key,n.offset,n.type),n.set(o,l,r)}}function D(e,t){const n=e.getFormatType(),o=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),o!==t.getIndent()&&t.setIndent(o)}function _(e,t,n=D){if(null===e)return;const l=e.getStartEndPoints(),r=new Map;let s=null;if(l){const[e,t]=l;s=g(),s.anchor.set(e.key,e.offset,e.type),s.focus.set(t.key,t.offset,t.type);const n=Z(e.getNode(),a),i=Z(t.getNode(),a);o(n)&&r.set(n.getKey(),n),o(i)&&r.set(i.getKey(),i)}for(const t of e.getNodes())if(o(t)&&a(t))r.set(t.getKey(),t);else if(null===l){const e=Z(t,a);o(e)&&r.set(e.getKey(),e)}for(const[e,o]of r){const l=t();n(o,l),o.replace(l,!0),s&&(e===s.anchor.key&&s.anchor.set(l.getKey(),s.anchor.offset,s.anchor.type),e===s.focus.key&&s.focus.set(l.getKey(),s.focus.offset,s.focus.type))}s&&e.is(f())&&d(s)}function U(e){return e.getNode().isAttached()}function j(e){let t=e;for(;null!==t&&!p(t);){const e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function H(e,t,n=null){const o=e.getStartEndPoints(),l=o?o[0]:null,r=e.getNodes(),s=r.length;if(null!==l&&(0===s||1===s&&\"element\"===l.type&&0===l.getNode().getChildrenSize())){const e=\"text\"===l.type?l.getNode().getParentOrThrow():l.getNode(),o=e.getChildren();let r=t();return r.setFormat(e.getFormatType()),r.setIndent(e.getIndent()),o.forEach((e=>r.append(e))),n&&(r=n.append(r)),void e.replace(r)}let i=null,c=[];for(let o=0;o<s;o++){const l=r[o];p(l)?(V(e,c,c.length,t,n),c=[],i=l):null===i||null!==i&&h(l,i)?c.push(l):(V(e,c,c.length,t,n),c=[l])}V(e,c,c.length,t,n)}function V(e,t,n,l,r=null){if(0===t.length)return;const i=t[0],f=new Map,u=[];let g=o(i)?i:i.getParentOrThrow();g.isInline()&&(g=g.getParentOrThrow());let a=!1;for(;null!==g;){const e=g.getPreviousSibling();if(null!==e){g=e,a=!0;break}if(g=g.getParentOrThrow(),p(g))break}const h=new Set;for(let e=0;e<n;e++){const n=t[e];o(n)&&0===n.getChildrenSize()&&h.add(n.getKey())}const m=new Set;for(let e=0;e<n;e++){const n=t[e];let r=n.getParent();if(null!==r&&r.isInline()&&(r=r.getParent()),null!==r&&y(n)&&!m.has(n.getKey())){const e=r.getKey();if(void 0===f.get(e)){const t=l();t.setFormat(r.getFormatType()),t.setIndent(r.getIndent()),u.push(t),f.set(e,t),r.getChildren().forEach((e=>{t.append(e),m.add(e.getKey()),o(e)&&e.getChildrenKeys().forEach((e=>m.add(e)))})),j(r)}}else if(h.has(n.getKey())){o(n)||N(179);const e=l();e.setFormat(n.getFormatType()),e.setIndent(n.getIndent()),u.push(e),n.remove(!0)}}if(null!==r)for(let e=0;e<u.length;e++){const t=u[e];r.append(t)}let S=null;if(p(g))if(a)if(null!==r)g.insertAfter(r);else for(let e=u.length-1;e>=0;e--){const t=u[e];g.insertAfter(t)}else{const e=g.getFirstChild();if(o(e)&&(g=e),null===e)if(r)g.append(r);else for(let e=0;e<u.length;e++){const t=u[e];g.append(t),S=t}else if(null!==r)e.insertBefore(r);else for(let t=0;t<u.length;t++){const n=u[t];e.insertBefore(n),S=n}}else if(r)g.insertAfter(r);else for(let e=u.length-1;e>=0;e--){const t=u[e];g.insertAfter(t),S=t}const x=s();c(x)&&U(x.anchor)&&U(x.focus)?d(x.clone()):null!==S?S.selectEnd():e.dirty=!0}function W(e){const t=e.anchor.getNode(),n=l(t)?t:t.getParentOrThrow(),o=v().getElementByKey(n.getKey());if(null===o)return!1;const r=o.ownerDocument.defaultView;if(null===r)return!1;return\"vertical-rl\"===r.getComputedStyle(o).writingMode}function X(e,t){let n=W(e)?!t:t;G(e)&&(n=!n);const l=m(e.focus,n?\"previous\":\"next\");if(S(l))return!1;for(const e of x(l)){if(T(e))return!e.origin.isInline();if(!o(e.origin)){if(w(e.origin))return!0;break}}return!1}function q(e,t,n,o){e.modify(t?\"extend\":\"move\",n,o)}function G(e){const t=e.anchor.getNode();return\"rtl\"===(l(t)?t:t.getParentOrThrow()).getDirection()}function J(e,t,n){const o=G(e);let l;l=W(e)||o?!n:n,q(e,t,l,\"character\")}function Q(e,t,n){const o=B(e.getStyle());return null!==o&&o[t]||n}function Y(t,n,o=\"\"){let l=null;const r=t.getNodes(),s=t.anchor,i=t.focus,f=t.isBackward(),u=f?i.offset:s.offset,g=f?i.getNode():s.getNode();if(c(t)&&t.isCollapsed()&&\"\"!==t.style){const e=B(t.style);if(null!==e&&n in e)return e[n]}for(let t=0;t<r.length;t++){const s=r[t];if((0===t||0!==u||!s.is(g))&&e(s)){const e=Q(s,n,o);if(null===l)l=e;else if(l!==e){l=\"\";break}}}return null===l?o:l}function Z(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const ee=R;export{z as $addNodeStyle,D as $copyBlockFormatIndent,$ as $ensureForwardRangeSelection,L as $forEachSelectedTextNode,Y as $getSelectionStyleValueForProperty,O as $isAtNodeEnd,G as $isParentElementRTL,q as $moveCaretSelection,J as $moveCharacter,M as $patchStyleText,_ as $setBlocksType,X as $shouldOverrideDefaultCharacterSelection,b as $sliceSelectedTextNodeContent,R as $trimTextContentFromAnchor,H as $wrapNodes,E as createDOMRange,k as createRectsFromDOMRange,F as getCSSFromStyleObject,B as getStyleObjectFromCSS,ee as trimTextContentFromAnchor};\n"],"names":["C","I","e","n","o","B","b","l","t","c","f","r","u","g","a","z","D","_","Z","i","d","W","v","X","G","m","S","x","T","w","q","J"],"mappings":";AAQ65B,MAAMA,IAAE,oBAAI;AAAoqC,SAASC,EAAE,GAAE;AAAC,QAAM,IAAE,CAAA;AAAG,MAAG,CAAC,EAAE,QAAO;AAAE,QAAM,IAAE,EAAE,MAAM,GAAG;AAAE,aAAUC,KAAK,EAAE,KAAQA,MAAL,IAAO;AAAC,UAAK,CAACC,GAAEC,CAAC,IAAEF,EAAE,MAAM,SAAS;AAAE,IAAAC,KAAGC,MAAI,EAAED,EAAE,KAAI,CAAE,IAAEC,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,IAAE,CAAC,IAAE,GAAES,EAAE,GAAE,GAAEvB,GAAE,WAAW;AAAC;AAAyc,SAASW,EAAE,GAAE,GAAE;AAAC,MAAI,IAAE;AAAE,SAAY,MAAP,QAAiB,EAAE,UAAS,MAAlB,QAAsB,CAAC,EAAE,CAAC,IAAG,KAAE,EAAE;AAAmB,SAAO,EAAE,CAAC,IAAE,IAAE;AAAI;","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
- import { w as T, r as Q, i as ge, _ as xt, j as Xt, N as Yt, T as vt, S as qt, L as jt } from "./LexicalUtils.prod-D_SPJ6vo.js";
2
- import { m as Ze, T as Ne, g as Ge, e as Vt, s as Ce, h as ct, B as I, i as et, j as Qt, k as Tt, l as re, n as Zt, J as De, p as Rt, _ as z, d as Gt, r as ye, x as D, P as B, F as Ue, S as Ae, t as en, D as tn, u as nn, w as on, U as Ie, z as rn, A as ln, C as Ft, G as sn, V as j, H as an, K as cn, L as un, N as hn, Q as dn, R as fn, X as gn, Y as mn, Z as fe, M as ne, a0 as Me, a1 as pn, a as Ot, a2 as Cn, W as tt, a3 as _n, f as Sn, a4 as Ee, a5 as wn, a6 as bn, a7 as ut, a8 as yn, a9 as ht, o as Nn, aa as dt, O as ft, v as Re, ab as xn, E as vn, ac as Tn, ad as Rn } from "./Lexical.prod-C7FcGFd7.js";
3
- import { F as Fn, J as On } from "./LexicalClipboard.prod-CeOlk1NB.js";
1
+ import { w as T, r as Q, i as ge, _ as xt, j as Xt, b as Yt, T as vt, S as qt, L as jt } from "./LexicalUtils.prod-CtYaCJNB.js";
2
+ import { m as Ze, k as Ne, g as Ge, e as Vt, s as Ce, h as ct, B as I, i as et, j as Qt, l as Tt, T as re, n as Zt, J as De, p as Rt, _ as z, d as Gt, r as ye, x as D, P as B, F as Ue, S as Ae, t as en, D as tn, u as nn, w as on, U as Ie, K as rn, z as ln, A as Ft, C as sn, V as j, G as an, H as cn, L as un, N as hn, Q as dn, R as fn, X as gn, Y as mn, Z as fe, M as ne, a0 as Me, a1 as pn, a as Ot, a2 as Cn, W as tt, a3 as _n, f as Sn, a4 as Ee, a5 as wn, a6 as bn, a7 as ut, a8 as yn, a9 as ht, o as Nn, aa as dt, O as ft, v as Re, ab as xn, E as vn, ac as Tn, ad as Rn } from "./Lexical.prod-7x3WP3vd.js";
3
+ import { F as Fn, J as On } from "./LexicalClipboard.prod-BMLLh6JL.js";
4
4
  const nt = /^(\d+(?:\.\d+)?)px$/, L = { BOTH: 3, COLUMN: 2, NO_STATUS: 0, ROW: 1 };
5
5
  class ce extends Ze {
6
6
  static getType() {
@@ -1719,4 +1719,4 @@ export {
1719
1719
  ce as y,
1720
1720
  Kt as z
1721
1721
  };
1722
- //# sourceMappingURL=LexicalTable.prod-DYP5JQC0.js.map
1722
+ //# sourceMappingURL=LexicalTable.prod-CwkGGOke.js.map