@uva-glass/component-library 3.0.9 → 3.0.11

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 (111) hide show
  1. package/dist/{Lexical.prod-BqkvGy5o.js → Lexical.prod-pVkgOp1j.js} +1501 -1485
  2. package/dist/Lexical.prod-pVkgOp1j.js.map +1 -0
  3. package/dist/LexicalClipboard.prod-DIvwPtmL.js +255 -0
  4. package/dist/LexicalClipboard.prod-DIvwPtmL.js.map +1 -0
  5. package/dist/LexicalComposerContext.prod-DLlRM5wP.js +22 -0
  6. package/dist/LexicalComposerContext.prod-DLlRM5wP.js.map +1 -0
  7. package/dist/{LexicalLink.prod-D-CG9yYv.js → LexicalLink.prod-NMeHB9CR.js} +67 -71
  8. package/dist/LexicalLink.prod-NMeHB9CR.js.map +1 -0
  9. package/dist/{LexicalList.prod-CDTuG8cz.js → LexicalList.prod-CicvwkCx.js} +121 -122
  10. package/dist/LexicalList.prod-CicvwkCx.js.map +1 -0
  11. package/dist/LexicalSelection.prod-mQvH0_ap.js +85 -0
  12. package/dist/LexicalSelection.prod-mQvH0_ap.js.map +1 -0
  13. package/dist/LexicalTable.prod-Bb6g8CAC.js +1542 -0
  14. package/dist/LexicalTable.prod-Bb6g8CAC.js.map +1 -0
  15. package/dist/LexicalUtils.prod-C_aSRWfh.js +109 -0
  16. package/dist/LexicalUtils.prod-C_aSRWfh.js.map +1 -0
  17. package/dist/{TablePlugin-BBgBJKsb.js → TablePlugin-o1MveXq2.js} +63 -63
  18. package/dist/{TablePlugin-BBgBJKsb.js.map → TablePlugin-o1MveXq2.js.map} +1 -1
  19. package/dist/TimelineItem-v4zDdKUz.js +52 -0
  20. package/dist/TimelineItem-v4zDdKUz.js.map +1 -0
  21. package/dist/__mocks__/svgrMock.js.map +1 -1
  22. package/dist/assets/TimelineItem.css +1 -0
  23. package/dist/assets/VarIndicator.css +1 -1
  24. package/dist/assets/variables.css +3 -3
  25. package/dist/components/Accordion/Accordion.test.js.map +1 -1
  26. package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
  27. package/dist/components/ActionList/ActionList.test.js.map +1 -1
  28. package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
  29. package/dist/components/Attention/Attention.test.js.map +1 -1
  30. package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
  31. package/dist/components/Buttons/Button.test.js.map +1 -1
  32. package/dist/components/Buttons/LinkButton.test.js +1 -1
  33. package/dist/components/Buttons/LinkButton.test.js.map +1 -1
  34. package/dist/components/Buttons/MenuButton.test.js +1 -1
  35. package/dist/components/Buttons/MenuButton.test.js.map +1 -1
  36. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  37. package/dist/components/FormInput/FormInput.js +1 -1
  38. package/dist/components/InputField/InputField.stories.js +1 -1
  39. package/dist/components/Label/Label.test.js.map +1 -1
  40. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  41. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  42. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  43. package/dist/components/MultiSelect/index.js +1 -1
  44. package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
  45. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  46. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  47. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  48. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +11 -11
  49. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +7 -7
  50. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  51. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  52. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +39 -39
  53. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  54. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +17 -17
  55. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +12 -12
  56. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  57. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
  58. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  59. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +22 -22
  60. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  61. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +17 -17
  62. package/dist/components/RteEditor/Plugins/index.js +1 -1
  63. package/dist/components/RteEditor/RteEditor.js +483 -492
  64. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  65. package/dist/components/RteEditor/helpers.js +5 -5
  66. package/dist/components/Timeline/Timeline.d.ts +28 -0
  67. package/dist/components/Timeline/Timeline.js +29 -0
  68. package/dist/components/Timeline/Timeline.js.map +1 -0
  69. package/dist/components/Timeline/Timeline.stories.d.ts +5 -0
  70. package/dist/components/Timeline/Timeline.stories.js +43 -0
  71. package/dist/components/Timeline/Timeline.stories.js.map +1 -0
  72. package/dist/components/Timeline/Timeline.test.d.ts +0 -0
  73. package/dist/components/Timeline/Timeline.test.js +80 -0
  74. package/dist/components/Timeline/Timeline.test.js.map +1 -0
  75. package/dist/components/Timeline/TimelineItem.d.ts +2 -0
  76. package/dist/components/Timeline/TimelineItem.js +7 -0
  77. package/dist/components/Timeline/TimelineItem.js.map +1 -0
  78. package/dist/components/Timeline/index.d.ts +1 -0
  79. package/dist/components/Timeline/index.js +5 -0
  80. package/dist/components/Timeline/index.js.map +1 -0
  81. package/dist/components/Timeline/mockTimelineItem.d.ts +30 -0
  82. package/dist/components/Timeline/mockTimelineItem.js +95 -0
  83. package/dist/components/Timeline/mockTimelineItem.js.map +1 -0
  84. package/dist/components/VarIndicator/VarIndicator.js +11 -11
  85. package/dist/components/VarIndicator/VarIndicator.js.map +1 -1
  86. package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -1
  87. package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
  88. package/dist/components/index.d.ts +1 -0
  89. package/dist/components/index.js +23 -21
  90. package/dist/components/index.js.map +1 -1
  91. package/dist/helpers-CtrLGKFA.js +164 -0
  92. package/dist/helpers-CtrLGKFA.js.map +1 -0
  93. package/dist/index.js +23 -21
  94. package/dist/index.js.map +1 -1
  95. package/dist/setupTests.js.map +1 -1
  96. package/package.json +20 -20
  97. package/dist/Lexical.prod-BqkvGy5o.js.map +0 -1
  98. package/dist/LexicalClipboard.prod-BSR9LEVL.js +0 -258
  99. package/dist/LexicalClipboard.prod-BSR9LEVL.js.map +0 -1
  100. package/dist/LexicalComposerContext.prod--Rm7-Z9o.js +0 -26
  101. package/dist/LexicalComposerContext.prod--Rm7-Z9o.js.map +0 -1
  102. package/dist/LexicalLink.prod-D-CG9yYv.js.map +0 -1
  103. package/dist/LexicalList.prod-CDTuG8cz.js.map +0 -1
  104. package/dist/LexicalSelection.prod-BxYY0fGG.js +0 -86
  105. package/dist/LexicalSelection.prod-BxYY0fGG.js.map +0 -1
  106. package/dist/LexicalTable.prod-Ckge-lZb.js +0 -1515
  107. package/dist/LexicalTable.prod-Ckge-lZb.js.map +0 -1
  108. package/dist/LexicalUtils.prod-CIQUUsvA.js +0 -112
  109. package/dist/LexicalUtils.prod-CIQUUsvA.js.map +0 -1
  110. package/dist/helpers-CzeCSkV-.js +0 -168
  111. package/dist/helpers-CzeCSkV-.js.map +0 -1
@@ -0,0 +1,85 @@
1
+ import { a2 as K, a3 as N, a4 as T, a6 as _, d as y, ah as x, a0 as P, ai as S, Z as I, aj as p, a as v, g as E } from "./Lexical.prod-pVkgOp1j.js";
2
+ const F = /* @__PURE__ */ new Map();
3
+ function B(e) {
4
+ const t = {};
5
+ if (!e) return t;
6
+ const o = e.split(";");
7
+ for (const s of o) if (s !== "") {
8
+ const [c, n] = s.split(/:([^]+)/);
9
+ c && n && (t[c.trim()] = n.trim());
10
+ }
11
+ return t;
12
+ }
13
+ function q(e, t) {
14
+ const o = e.getStartEndPoints();
15
+ if (t.isSelected(e) && !t.isSegmented() && !t.isToken() && o !== null) {
16
+ const [s, c] = o, n = e.isBackward(), r = s.getNode(), i = c.getNode(), f = t.is(r), l = t.is(i);
17
+ if (f || l) {
18
+ const [a, u] = S(e), h = r.is(i), k = t.is(n ? i : r), w = t.is(n ? r : i);
19
+ let g, d = 0;
20
+ return h ? (d = a > u ? u : a, g = a > u ? a : u) : k ? (d = n ? u : a, g = void 0) : w && (d = 0, g = n ? a : u), t.__text = t.__text.slice(d, g), t;
21
+ }
22
+ }
23
+ return t;
24
+ }
25
+ function D(e) {
26
+ const t = e.getStyle(), o = B(t);
27
+ F.set(t, o);
28
+ }
29
+ function M(e, t) {
30
+ const o = e.getFormatType(), s = e.getIndent();
31
+ o !== t.getFormatType() && t.setFormat(o), s !== t.getIndent() && t.setIndent(s);
32
+ }
33
+ function G(e, t, o = M) {
34
+ if (e === null) return;
35
+ const s = e.getStartEndPoints(), c = /* @__PURE__ */ new Map();
36
+ let n = null;
37
+ if (s) {
38
+ const [r, i] = s;
39
+ n = I(), n.anchor.set(r.key, r.offset, r.type), n.focus.set(i.key, i.offset, i.type);
40
+ const f = m(r.getNode(), p), l = m(i.getNode(), p);
41
+ y(f) && c.set(f.getKey(), f), y(l) && c.set(l.getKey(), l);
42
+ }
43
+ for (const r of e.getNodes()) y(r) && p(r) && c.set(r.getKey(), r);
44
+ for (const [r, i] of c) {
45
+ const f = t();
46
+ o(i, f), i.replace(f, !0), n && (r === n.anchor.key && n.anchor.set(f.getKey(), n.anchor.offset, n.anchor.type), r === n.focus.key && n.focus.set(f.getKey(), n.focus.offset, n.focus.type));
47
+ }
48
+ n && e.is(v()) && E(n);
49
+ }
50
+ function J(e, t) {
51
+ const o = K(e.focus, t ? "previous" : "next");
52
+ if (N(o)) return !1;
53
+ for (const s of T(o)) {
54
+ if (_(s)) return !s.origin.isInline();
55
+ if (!y(s.origin)) {
56
+ if (x(s.origin)) return !0;
57
+ break;
58
+ }
59
+ }
60
+ return !1;
61
+ }
62
+ function O(e, t, o, s) {
63
+ e.modify(t ? "extend" : "move", o, s);
64
+ }
65
+ function b(e) {
66
+ const t = e.anchor.getNode();
67
+ return (P(t) ? t : t.getParentOrThrow()).getDirection() === "rtl";
68
+ }
69
+ function Q(e, t, o) {
70
+ const s = b(e);
71
+ O(e, t, o ? !s : s, "character");
72
+ }
73
+ function m(e, t) {
74
+ let o = e;
75
+ for (; o !== null && o.getParent() !== null && !t(o); ) o = o.getParentOrThrow();
76
+ return t(o) ? o : null;
77
+ }
78
+ export {
79
+ q as B,
80
+ Q as G,
81
+ D as R,
82
+ J as W,
83
+ G as _
84
+ };
85
+ //# sourceMappingURL=LexicalSelection.prod-mQvH0_ap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LexicalSelection.prod-mQvH0_ap.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,$getCharacterOffsets as t,$isElementNode as n,$isRootNode as o,$getNodeByKey as l,$getPreviousSelection as r,$createTextNode as s,$isRangeSelection as i,$getSelection as c,$caretRangeFromSelection as f,$isTokenOrSegmented 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 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 w=new Map;function C(e){let t=e;for(;null!=t;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function P(e){const t=e.parentNode;if(null==t)throw new Error(\"Should never happen\");return[t,Array.from(t.childNodes).indexOf(e)]}function k(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=C(f)),e(l)&&(u=C(u)),void 0===n||void 0===l||null===f||null===u)return null;\"BR\"===f.nodeName&&([f,g]=P(f)),\"BR\"===u.nodeName&&([u,a]=P(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 E(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 K(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 I(e){let t=w.get(e);return void 0===t&&(t=K(e),w.set(e,t)),t}function F(e){let t=\"\";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}function B(e,n){const o=e.getStartEndPoints();if(n.isSelected(e)&&!n.isSegmented()&&!n.isToken()&&null!==o){const[l,r]=o,s=e.isBackward(),i=l.getNode(),c=r.getNode(),f=n.is(i),u=n.is(c);if(f||u){const[o,l]=t(e),r=i.is(c),f=n.is(s?c:i),u=n.is(s?i:c);let g,a=0;if(r)a=o>l?l:o,g=o>l?o:l;else if(f){a=s?l:o,g=void 0}else if(u){a=0,g=s?o:l}return n.__text=n.__text.slice(a,g),n}}return n}function b(e){if(\"text\"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return n(t)||N(177),e.offset===t.getChildrenSize()}function O(t,c,f){let u=c.getNode(),g=f;if(n(u)){const e=u.getDescendantByIndex(c.offset);null!==e&&(u=e)}for(;g>0&&null!==u;){if(n(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&&n(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()||o(e)||e.remove(),g-=p+a,u=f}else{const n=u.getKey(),o=t.getEditorState().read((()=>{const t=l(n);return e(t)&&t.isSimpleText()?t.getTextContent():null})),f=p-g,a=d.slice(0,f);if(null!==o&&o!==d){const e=r();let t=u;if(u.isSimpleText())u.setTextContent(o);else{const e=s(o);u.replace(e),t=e}if(i(e)&&e.isCollapsed()){const n=e.anchor.offset;t.select(n,n)}}else if(u.isSimpleText()){const e=c.key===n;let t=c.offset;t<g&&(t=p);const o=e?t-g:0,l=e?t:f;if(e&&0===o){const[e]=u.splitText(o,l);e.remove()}else{const[,e]=u.splitText(o,l);e.remove()}}else{const e=s(a);u.replace(e)}g=0}}}function R(e){const t=e.getStyle(),n=K(t);w.set(t,n)}function z(t,o){(i(t)?t.isCollapsed():e(t)||n(t))||N(280);const l=I(i(t)?t.style:e(t)?t.getStyle():t.getTextStyle()),r=Object.entries(o).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);i(t)||e(t)?t.setStyle(s):t.setTextStyle(s),w.set(s,r)}function A(e,t){if(i(e)&&e.isCollapsed()){z(e,t);const o=e.anchor.getNode();n(o)&&o.isEmpty()&&z(o,t)}L((e=>{z(e,t)}))}function L(t){const n=c();if(!n)return;const o=new Map;if(i(n))for(const e of f(n).getTextSlices())e&&o.set(e.caret.origin.getKey(),e.getSliceIndices());const l=n.getNodes();for(const n of l){if(!e(n)||!n.canHaveFormat())continue;const[l,s]=(r=n,o.get(r.getKey())||[0,r.getTextContentSize()]);if(s!==l)if(u(n)||0===l&&s===n.getTextContentSize())t(n);else{t(n.splitText(l,s)[0===l?0:1])}}var r;i(n)&&\"text\"===n.anchor.type&&\"text\"===n.focus.type&&n.anchor.key===n.focus.key&&M(n)}function M(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 $(e,t){const n=e.getFormatType(),o=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),o!==t.getIndent()&&t.setIndent(o)}function _(e,t,o=$){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 o=V(e.getNode(),a),i=V(t.getNode(),a);n(o)&&r.set(o.getKey(),o),n(i)&&r.set(i.getKey(),i)}for(const t of e.getNodes())n(t)&&a(t)&&r.set(t.getKey(),t);for(const[e,n]of r){const l=t();o(n,l),n.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(c())&&d(s)}function D(e){return e.getNode().isAttached()}function U(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 j(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)?(H(e,c,c.length,t,n),c=[],i=l):null===i||null!==i&&h(l,i)?c.push(l):(H(e,c,c.length,t,n),c=[l])}H(e,c,c.length,t,n)}function H(e,t,o,l,s=null){if(0===t.length)return;const c=t[0],f=new Map,u=[];let g=n(c)?c:c.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<o;e++){const o=t[e];n(o)&&0===o.getChildrenSize()&&h.add(o.getKey())}const m=new Set;for(let e=0;e<o;e++){const o=t[e];let r=o.getParent();if(null!==r&&r.isInline()&&(r=r.getParent()),null!==r&&y(o)&&!m.has(o.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()),n(e)&&e.getChildrenKeys().forEach((e=>m.add(e)))})),U(r)}}else if(h.has(o.getKey())){n(o)||N(179);const e=l();e.setFormat(o.getFormatType()),e.setIndent(o.getIndent()),u.push(e),o.remove(!0)}}if(null!==s)for(let e=0;e<u.length;e++){const t=u[e];s.append(t)}let S=null;if(p(g))if(a)if(null!==s)g.insertAfter(s);else for(let e=u.length-1;e>=0;e--){const t=u[e];g.insertAfter(t)}else{const e=g.getFirstChild();if(n(e)&&(g=e),null===e)if(s)g.append(s);else for(let e=0;e<u.length;e++){const t=u[e];g.append(t),S=t}else if(null!==s)e.insertBefore(s);else for(let t=0;t<u.length;t++){const n=u[t];e.insertBefore(n),S=n}}else if(s)g.insertAfter(s);else for(let e=u.length-1;e>=0;e--){const t=u[e];g.insertAfter(t),S=t}const x=r();i(x)&&D(x.anchor)&&D(x.focus)?d(x.clone()):null!==S?S.selectEnd():e.dirty=!0}function W(e,t){const o=m(e.focus,t?\"previous\":\"next\");if(S(o))return!1;for(const e of x(o)){if(T(e))return!e.origin.isInline();if(!n(e.origin)){if(v(e.origin))return!0;break}}return!1}function X(e,t,n,o){e.modify(t?\"extend\":\"move\",n,o)}function q(e){const t=e.anchor.getNode();return\"rtl\"===(o(t)?t:t.getParentOrThrow()).getDirection()}function G(e,t,n){const o=q(e);X(e,t,n?!o:o,\"character\")}function J(e,t,n){const o=I(e.getStyle());return null!==o&&o[t]||n}function Q(t,n,o=\"\"){let l=null;const r=t.getNodes(),s=t.anchor,c=t.focus,f=t.isBackward(),u=f?c.offset:s.offset,g=f?c.getNode():s.getNode();if(i(t)&&t.isCollapsed()&&\"\"!==t.style){const e=I(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=J(s,n,o);if(null===l)l=e;else if(l!==e){l=\"\";break}}}return null===l?o:l}function V(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const Y=O;export{R as $addNodeStyle,$ as $copyBlockFormatIndent,M as $ensureForwardRangeSelection,L as $forEachSelectedTextNode,Q as $getSelectionStyleValueForProperty,b as $isAtNodeEnd,q as $isParentElementRTL,X as $moveCaretSelection,G as $moveCharacter,A as $patchStyleText,_ as $setBlocksType,W as $shouldOverrideDefaultCharacterSelection,B as $sliceSelectedTextNodeContent,O as $trimTextContentFromAnchor,j as $wrapNodes,k as createDOMRange,E as createRectsFromDOMRange,F as getCSSFromStyleObject,I as getStyleObjectFromCSS,Y as trimTextContentFromAnchor};\n"],"names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