@uva-glass/component-library 3.0.8 → 3.0.10

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 (186) hide show
  1. package/dist/Lexical.prod-CoFvB6ST.js +4895 -0
  2. package/dist/Lexical.prod-CoFvB6ST.js.map +1 -0
  3. package/dist/LexicalClipboard.prod-BceK2u8q.js +255 -0
  4. package/dist/LexicalClipboard.prod-BceK2u8q.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-__08uNAw.js → LexicalLink.prod-DgAdBBH7.js} +73 -77
  8. package/dist/LexicalLink.prod-DgAdBBH7.js.map +1 -0
  9. package/dist/LexicalList.prod-BsGg0KUo.js +597 -0
  10. package/dist/LexicalList.prod-BsGg0KUo.js.map +1 -0
  11. package/dist/LexicalSelection.prod-CajyzNb9.js +85 -0
  12. package/dist/LexicalSelection.prod-CajyzNb9.js.map +1 -0
  13. package/dist/LexicalTable.prod-CNsOdwua.js +1533 -0
  14. package/dist/LexicalTable.prod-CNsOdwua.js.map +1 -0
  15. package/dist/LexicalUtils.prod-CqRL6ZhZ.js +109 -0
  16. package/dist/LexicalUtils.prod-CqRL6ZhZ.js.map +1 -0
  17. package/dist/{TablePlugin-BHY7_5Z8.js → TablePlugin-CFD5PSMc.js} +41 -41
  18. package/dist/{TablePlugin-BHY7_5Z8.js.map → TablePlugin-CFD5PSMc.js.map} +1 -1
  19. package/dist/assets/VarIndicator.css +1 -0
  20. package/dist/components/Accordion/Accordion.stories.d.ts +2 -2
  21. package/dist/components/Accordion/Accordion.test.js +3 -3
  22. package/dist/components/AccordionCard/AccordionCard.stories.d.ts +1 -1
  23. package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
  24. package/dist/components/ActionList/ActionList.stories.d.ts +1 -1
  25. package/dist/components/ActionList/ActionList.test.js +3 -3
  26. package/dist/components/AppStatusBar/AppStatusBar.stories.d.ts +1 -1
  27. package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
  28. package/dist/components/Attention/Attention.stories.d.ts +1 -1
  29. package/dist/components/Attention/Attention.test.js +2 -2
  30. package/dist/components/Backdrop/Backdrop.stories.d.ts +1 -1
  31. package/dist/components/Backdrop/Backdrop.test.js +2 -2
  32. package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +1 -1
  33. package/dist/components/Buttons/Button.stories.d.ts +2 -2
  34. package/dist/components/Buttons/Button.stories.js +1 -1
  35. package/dist/components/Buttons/Button.test.js +2 -2
  36. package/dist/components/Buttons/LinkButton.stories.d.ts +2 -2
  37. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  38. package/dist/components/Buttons/LinkButton.test.js +2 -2
  39. package/dist/components/Buttons/MenuButton.stories.d.ts +3 -3
  40. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  41. package/dist/components/Buttons/MenuButton.test.js +2 -2
  42. package/dist/components/Card/Card.stories.d.ts +3 -3
  43. package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -2
  44. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  45. package/dist/components/CheckboxButton/CheckboxButton.stories.d.ts +1 -1
  46. package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
  47. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.d.ts +1 -1
  48. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  49. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  50. package/dist/components/CheckboxTree/CheckboxTree.stories.d.ts +1 -1
  51. package/dist/components/CheckboxTree/CheckboxTree.stories.js +109 -87
  52. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  53. package/dist/components/Chip/Chip.stories.d.ts +2 -2
  54. package/dist/components/Chip/Chip.stories.js +1 -1
  55. package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
  56. package/dist/components/Drawer/Drawer.stories.js +1 -1
  57. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.d.ts +1 -1
  58. package/dist/components/FeedbackBox/FeedbackBox.stories.d.ts +1 -1
  59. package/dist/components/FieldHint/FieldHint.stories.d.ts +2 -2
  60. package/dist/components/Fieldset/Fieldset.stories.d.ts +2 -2
  61. package/dist/components/FormField/FormField.stories.d.ts +1 -1
  62. package/dist/components/FormInput/FormInput.js +1 -1
  63. package/dist/components/FormInput/FormInput.stories.d.ts +2 -2
  64. package/dist/components/FormInput/FormInput.stories.js +1 -1
  65. package/dist/components/GridRow/GridRow.stories.d.ts +2 -2
  66. package/dist/components/HorizontalList/HorizontalList.stories.d.ts +2 -2
  67. package/dist/components/Icon/Icon.stories.d.ts +1 -1
  68. package/dist/components/Icon/icons/index.d.ts +30 -0
  69. package/dist/components/Icon/icons/index.js +160 -135
  70. package/dist/components/Icon/icons/index.js.map +1 -1
  71. package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
  72. package/dist/components/IconButton/IconButton.stories.js +1 -1
  73. package/dist/components/InfoMessage/InfoMessage.stories.d.ts +1 -1
  74. package/dist/components/Input/Input.stories.d.ts +4 -4
  75. package/dist/components/InputField/InputField.stories.d.ts +3 -3
  76. package/dist/components/InputField/InputField.stories.js +2 -2
  77. package/dist/components/Label/Label.stories.d.ts +2 -2
  78. package/dist/components/Label/Label.test.js +2 -2
  79. package/dist/components/MenuLink/MenuLink.stories.d.ts +2 -2
  80. package/dist/components/MetaDataList/MetaDataList.stories.d.ts +1 -1
  81. package/dist/components/ModalDialog/ModalDialog.stories.d.ts +3 -3
  82. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  83. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  84. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +3 -3
  85. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  86. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  87. package/dist/components/MultiSelect/index.js +1 -1
  88. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.d.ts +1 -1
  89. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +4 -4
  90. package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
  91. package/dist/components/OverlayStepBar/OverlayStepBar.stories.d.ts +1 -1
  92. package/dist/components/PageOverlay/PageOverlay.stories.d.ts +3 -3
  93. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  94. package/dist/components/PeriodSelector/PeriodSelector.stories.d.ts +1 -1
  95. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  96. package/dist/components/Periods/Periods.stories.d.ts +1 -1
  97. package/dist/components/ProgrammeCard/ProgrammeCard.stories.d.ts +3 -3
  98. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
  99. package/dist/components/RadioButton/RadioButton.stories.d.ts +1 -1
  100. package/dist/components/Repeater/Repeater.stories.d.ts +1 -1
  101. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  102. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +13 -13
  103. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +5 -5
  104. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  105. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  106. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +54 -54
  107. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  108. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +28 -28
  109. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +17 -17
  110. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  111. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
  112. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  113. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +24 -24
  114. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  115. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +13 -13
  116. package/dist/components/RteEditor/Plugins/index.js +1 -1
  117. package/dist/components/RteEditor/RteEditor.js +528 -537
  118. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  119. package/dist/components/RteEditor/RteEditor.stories.d.ts +1 -1
  120. package/dist/components/RteEditor/helpers.js +13 -13
  121. package/dist/components/SectionNotification/SectionNotification.stories.d.ts +1 -1
  122. package/dist/components/SelectListbox/SelectListBox.stories.d.ts +2 -2
  123. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  124. package/dist/components/Sortable/Sortable.stories.d.ts +3 -3
  125. package/dist/components/Sortable/Sortable.stories.js +7 -7
  126. package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
  127. package/dist/components/StatusPill/StatusPill.stories.d.ts +1 -1
  128. package/dist/components/ToggleSwitch/ToggleSwitch.stories.d.ts +1 -1
  129. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +5 -5
  130. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  131. package/dist/components/VarIndicator/VarIndicator.d.ts +9 -0
  132. package/dist/components/VarIndicator/VarIndicator.js +32 -0
  133. package/dist/components/VarIndicator/VarIndicator.js.map +1 -0
  134. package/dist/components/VarIndicator/VarIndicator.stories.d.ts +5 -0
  135. package/dist/components/VarIndicator/VarIndicator.stories.js +30 -0
  136. package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -0
  137. package/dist/components/VarIndicator/VarIndicator.test.d.ts +0 -0
  138. package/dist/components/VarIndicator/VarIndicator.test.js +58 -0
  139. package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -0
  140. package/dist/components/VarIndicator/index.d.ts +1 -0
  141. package/dist/components/VarIndicator/index.js +5 -0
  142. package/dist/components/VarIndicator/index.js.map +1 -0
  143. package/dist/components/index.d.ts +1 -0
  144. package/dist/components/index.js +32 -30
  145. package/dist/components/index.js.map +1 -1
  146. package/dist/helpers-C-JeRM2f.js +164 -0
  147. package/dist/helpers-C-JeRM2f.js.map +1 -0
  148. package/dist/index-BldK5xU9.js +9513 -0
  149. package/dist/index-BldK5xU9.js.map +1 -0
  150. package/dist/{index-OJvb7CGo.js → index-DMVXQIB9.js} +2 -2
  151. package/dist/{index-OJvb7CGo.js.map → index-DMVXQIB9.js.map} +1 -1
  152. package/dist/index-DpyOH4wL.js +14735 -0
  153. package/dist/index-DpyOH4wL.js.map +1 -0
  154. package/dist/{index-BqHyOZsF.js → index-Z7qwJmRM.js} +2 -2
  155. package/dist/{index-BqHyOZsF.js.map → index-Z7qwJmRM.js.map} +1 -1
  156. package/dist/index.js +32 -30
  157. package/dist/index.js.map +1 -1
  158. package/dist/{react.esm-BZoQ2TxA.js → react.esm-BOUd0cvD.js} +3 -3
  159. package/dist/{react.esm-BZoQ2TxA.js.map → react.esm-BOUd0cvD.js.map} +1 -1
  160. package/dist/setupTests.js +1 -1
  161. package/dist/storybook__react.d.js +8528 -537
  162. package/dist/storybook__react.d.js.map +1 -1
  163. package/dist/{test-utils-CTqdUiUm.js → test-utils-uaSbIYda.js} +2 -2
  164. package/dist/{test-utils-CTqdUiUm.js.map → test-utils-uaSbIYda.js.map} +1 -1
  165. package/package.json +26 -26
  166. package/dist/Lexical.prod-D0woeN3R.js +0 -4770
  167. package/dist/Lexical.prod-D0woeN3R.js.map +0 -1
  168. package/dist/LexicalClipboard.prod-D9CvlqSO.js +0 -258
  169. package/dist/LexicalClipboard.prod-D9CvlqSO.js.map +0 -1
  170. package/dist/LexicalComposerContext.prod--Rm7-Z9o.js +0 -26
  171. package/dist/LexicalComposerContext.prod--Rm7-Z9o.js.map +0 -1
  172. package/dist/LexicalLink.prod-__08uNAw.js.map +0 -1
  173. package/dist/LexicalList.prod-BgI8r9BS.js +0 -579
  174. package/dist/LexicalList.prod-BgI8r9BS.js.map +0 -1
  175. package/dist/LexicalSelection.prod-B-SXpOS9.js +0 -86
  176. package/dist/LexicalSelection.prod-B-SXpOS9.js.map +0 -1
  177. package/dist/LexicalTable.prod-DJWDvnB3.js +0 -1494
  178. package/dist/LexicalTable.prod-DJWDvnB3.js.map +0 -1
  179. package/dist/LexicalUtils.prod-BYrJ1Iih.js +0 -112
  180. package/dist/LexicalUtils.prod-BYrJ1Iih.js.map +0 -1
  181. package/dist/helpers-Cgw7V6LR.js +0 -168
  182. package/dist/helpers-Cgw7V6LR.js.map +0 -1
  183. package/dist/index-2mUSc_Ki.js +0 -8
  184. package/dist/index-2mUSc_Ki.js.map +0 -1
  185. package/dist/index-CcK2jjMp.js +0 -23343
  186. package/dist/index-CcK2jjMp.js.map +0 -1
@@ -1,86 +0,0 @@
1
- import { a9 as S, Q as _, Y as p, N as x, aa as N, L as P, ab as y, h as v, q as E } from "./Lexical.prod-D0woeN3R.js";
2
- function I(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
- }
5
- I(function(e) {
6
- const t = new URL("https://lexical.dev/docs/error"), n = new URLSearchParams();
7
- n.append("code", e);
8
- for (let o = 1; o < arguments.length; o++) n.append("v", arguments[o]);
9
- throw t.search = n.toString(), Error(`Minified Lexical error #${e}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
10
- });
11
- const K = /* @__PURE__ */ new Map();
12
- function L(e) {
13
- const t = {};
14
- if (!e) return t;
15
- const n = e.split(";");
16
- for (const o of n) if (o !== "") {
17
- const [a, r] = o.split(/:([^]+)/);
18
- a && r && (t[a.trim()] = r.trim());
19
- }
20
- return t;
21
- }
22
- function q(e, t) {
23
- const n = e.getStartEndPoints();
24
- if (t.isSelected(e) && !t.isSegmented() && !t.isToken() && n !== null) {
25
- const [o, a] = n, r = e.isBackward(), s = o.getNode(), i = a.getNode(), c = t.is(s), u = t.is(i);
26
- if (c || u) {
27
- const [f, l] = N(e), m = s.is(i), w = t.is(r ? i : s), k = t.is(r ? s : i);
28
- let d, g = 0;
29
- return m ? (g = f > l ? l : f, d = f > l ? f : l) : w ? (g = r ? l : f, d = void 0) : k && (g = 0, d = r ? f : l), t.__text = t.__text.slice(g, d), t;
30
- }
31
- }
32
- return t;
33
- }
34
- function B(e) {
35
- const t = e.getStyle(), n = L(t);
36
- K.set(t, n);
37
- }
38
- function T(e, t) {
39
- const n = e.getFormatType(), o = e.getIndent();
40
- n !== t.getFormatType() && t.setFormat(n), o !== t.getIndent() && t.setIndent(o);
41
- }
42
- function F(e, t, n = T) {
43
- if (e === null) return;
44
- const o = e.getStartEndPoints(), a = /* @__PURE__ */ new Map();
45
- let r = null;
46
- if (o) {
47
- const [s, i] = o;
48
- r = P(), r.anchor.set(s.key, s.offset, s.type), r.focus.set(i.key, i.offset, i.type);
49
- const c = h(s.getNode(), y), u = h(i.getNode(), y);
50
- p(c) && a.set(c.getKey(), c), p(u) && a.set(u.getKey(), u);
51
- }
52
- for (const s of e.getNodes()) p(s) && y(s) && a.set(s.getKey(), s);
53
- for (const [s, i] of a) {
54
- const c = t();
55
- n(i, c), i.replace(c, !0), r && (s === r.anchor.key && (r.anchor.key = c.getKey()), s === r.focus.key && (r.focus.key = c.getKey()));
56
- }
57
- r && e.is(v()) && E(r);
58
- }
59
- function Q(e, t) {
60
- const n = S(e.focus, t);
61
- return _(n) && !n.isIsolated() || p(n) && !n.isInline() && !n.canBeEmpty();
62
- }
63
- function M(e, t, n, o) {
64
- e.modify(t ? "extend" : "move", n, o);
65
- }
66
- function O(e) {
67
- const t = e.anchor.getNode();
68
- return (x(t) ? t : t.getParentOrThrow()).getDirection() === "rtl";
69
- }
70
- function R(e, t, n) {
71
- const o = O(e);
72
- M(e, t, n ? !o : o, "character");
73
- }
74
- function h(e, t) {
75
- let n = e;
76
- for (; n !== null && n.getParent() !== null && !t(n); ) n = n.getParentOrThrow();
77
- return t(n) ? n : null;
78
- }
79
- export {
80
- q as B,
81
- Q as H,
82
- F as L,
83
- B as b,
84
- R as q
85
- };
86
- //# sourceMappingURL=LexicalSelection.prod-B-SXpOS9.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LexicalSelection.prod-B-SXpOS9.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,TextNode as a,$createRangeSelection as g,INTERNAL_$isBlock as d,$setSelection as p,$isRootOrShadowRoot as h,$hasAncestor as y,$isLeafNode as m,$getAdjacentNode as S,$isDecoratorNode as T}from\"lexical\";export{$cloneWithProperties,$selectAll}from\"lexical\";function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var v=x((function(e){const t=new URL(\"https://lexical.dev/docs/error\"),n=new URLSearchParams;n.append(\"code\",e);for(let e=1;e<arguments.length;e++)n.append(\"v\",arguments[e]);throw t.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const w=new Map;function N(e){let t=e;for(;null!=t;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function C(e){const t=e.parentNode;if(null==t)throw new Error(\"Should never happen\");return[t,Array.from(t.childNodes).indexOf(e)]}function P(t,n,o,l,r){const s=n.getKey(),i=l.getKey(),c=document.createRange();let f=t.getElementByKey(s),u=t.getElementByKey(i),a=o,g=r;if(e(n)&&(f=N(f)),e(l)&&(u=N(u)),void 0===n||void 0===l||null===f||null===u)return null;\"BR\"===f.nodeName&&([f,a]=C(f)),\"BR\"===u.nodeName&&([u,g]=C(u));const d=f.firstChild;f===u&&null!=d&&\"BR\"===d.nodeName&&0===a&&0===g&&(g=1);try{c.setStart(f,a),c.setEnd(u,g)}catch(e){return null}return!c.collapsed||a===g&&s===i||(c.setStart(u,g),c.setEnd(f,a)),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 E(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 K(e){let t=w.get(e);return void 0===t&&(t=E(e),w.set(e,t)),t}function I(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 a,g=0;if(r)g=o>l?l:o,a=o>l?o:l;else if(f){g=s?l:o,a=void 0}else if(u){g=0,a=s?o:l}return n.__text=n.__text.slice(g,a),n}}return n}function F(e){if(\"text\"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return n(t)||v(177),e.offset===t.getChildrenSize()}function O(t,c,f){let u=c.getNode(),a=f;if(n(u)){const e=u.getDescendantByIndex(c.offset);null!==e&&(u=e)}for(;a>0&&null!==u;){if(n(u)){const e=u.getLastDescendant();null!==e&&(u=e)}let f=u.getPreviousSibling(),g=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&&(g=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)||a>=p){const e=u.getParent();u.remove(),null==e||0!==e.getChildrenSize()||o(e)||e.remove(),a-=p+g,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-a,g=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<a&&(t=p);const o=e?t-a: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(g);u.replace(e)}a=0}}}function b(e){const t=e.getStyle(),n=E(t);w.set(t,n)}function R(e,t){e instanceof a||e.isCollapsed()||v(270);const n=K(e instanceof a?e.getStyle():e.style),o=Object.entries(t).reduce(((t,[o,l])=>(\"function\"==typeof l?t[o]=l(n[o],e):null===l?delete t[o]:t[o]=l,t)),{...n}),l=I(o);e.setStyle(l),w.set(l,o)}function z(e,t){if(i(e)&&e.isCollapsed())return R(e,t);A((e=>{R(e,t)}))}function A(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 L(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=Q(e.getNode(),d),i=Q(t.getNode(),d);n(o)&&r.set(o.getKey(),o),n(i)&&r.set(i.getKey(),i)}for(const t of e.getNodes())n(t)&&d(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.key=l.getKey()),e===s.focus.key&&(s.focus.key=l.getKey()))}s&&e.is(c())&&p(s)}function $(e){return e.getNode().isAttached()}function D(e){let t=e;for(;null!==t&&!h(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];h(l)?(U(e,c,c.length,t,n),c=[],i=l):null===i||null!==i&&y(l,i)?c.push(l):(U(e,c,c.length,t,n),c=[l])}U(e,c,c.length,t,n)}function U(e,t,o,l,s=null){if(0===t.length)return;const c=t[0],f=new Map,u=[];let a=n(c)?c:c.getParentOrThrow();a.isInline()&&(a=a.getParentOrThrow());let g=!1;for(;null!==a;){const e=a.getPreviousSibling();if(null!==e){a=e,g=!0;break}if(a=a.getParentOrThrow(),h(a))break}const d=new Set;for(let e=0;e<o;e++){const o=t[e];n(o)&&0===o.getChildrenSize()&&d.add(o.getKey())}const y=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&&m(o)&&!y.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),y.add(e.getKey()),n(e)&&e.getChildrenKeys().forEach((e=>y.add(e)))})),D(r)}}else if(d.has(o.getKey())){n(o)||v(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(h(a))if(g)if(null!==s)a.insertAfter(s);else for(let e=u.length-1;e>=0;e--){const t=u[e];a.insertAfter(t)}else{const e=a.getFirstChild();if(n(e)&&(a=e),null===e)if(s)a.append(s);else for(let e=0;e<u.length;e++){const t=u[e];a.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)a.insertAfter(s);else for(let e=u.length-1;e>=0;e--){const t=u[e];a.insertAfter(t),S=t}const T=r();i(T)&&$(T.anchor)&&$(T.focus)?p(T.clone()):null!==S?S.selectEnd():e.dirty=!0}function H(e,t){const o=S(e.focus,t);return T(o)&&!o.isIsolated()||n(o)&&!o.isInline()&&!o.canBeEmpty()}function W(e,t,n,o){e.modify(t?\"extend\":\"move\",n,o)}function X(e){const t=e.anchor.getNode();return\"rtl\"===(o(t)?t:t.getParentOrThrow()).getDirection()}function q(e,t,n){const o=X(e);W(e,t,n?!o:o,\"character\")}function G(e,t,n){const o=K(e.getStyle());return null!==o&&o[t]||n}function J(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,a=f?c.getNode():s.getNode();if(i(t)&&t.isCollapsed()&&\"\"!==t.style){const e=K(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(a))&&e(s)){const e=G(s,n,o);if(null===l)l=e;else if(l!==e){l=\"\";break}}}return null===l?o:l}function Q(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const V=O;export{b as $addNodeStyle,_ as $copyBlockFormatIndent,M as $ensureForwardRangeSelection,A as $forEachSelectedTextNode,J as $getSelectionStyleValueForProperty,F as $isAtNodeEnd,X as $isParentElementRTL,W as $moveCaretSelection,q as $moveCharacter,z as $patchStyleText,L as $setBlocksType,H as $shouldOverrideDefaultCharacterSelection,B as $sliceSelectedTextNodeContent,O as $trimTextContentFromAnchor,j as $wrapNodes,P as createDOMRange,k as createRectsFromDOMRange,I as getCSSFromStyleObject,K as getStyleObjectFromCSS,V as trimTextContentFromAnchor};\n"],"names":["x","e","w","E","n","o","B","l","r","s","i","c","f","t","u","a","b","_","L","g","Q","d","p","H","S","T","W","X","q"],"mappings":";AAQyf,SAASA,EAAE,GAAE;AAAC,SAAO,KAAG,EAAE,cAAY,OAAO,UAAU,eAAe,KAAK,GAAE,SAAS,IAAE,EAAE,UAAQ;AAAC;AAAOA,EAAG,SAAS,GAAE;AAAC,QAAM,IAAE,IAAI,IAAI,gCAAgC,GAAE,IAAE,IAAI;AAAgB,IAAE,OAAO,QAAO,CAAC;AAAE,WAAQC,IAAE,GAAEA,IAAE,UAAU,QAAOA,IAAI,GAAE,OAAO,KAAI,UAAUA,CAAC,CAAC;AAAE,QAAM,EAAE,SAAO,EAAE,SAAU,GAAC,MAAM,2BAA2B,CAAC,WAAW,EAAE,SAAU,CAAA,gHAAgH;AAAC,CAAI;AAAA,MAAMC,IAAE,oBAAI;AAAoqC,SAASC,EAAE,GAAE;AAAC,QAAM,IAAE,CAAA;AAAG,MAAG,CAAC,EA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