@sps-woodland/core 8.53.11 → 8.53.13

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 (209) hide show
  1. package/lib/action-bar/action-bar/ActionBar.ve.js +8 -8
  2. package/lib/action-bar/index.js +30 -30
  3. package/lib/action-bar/index.umd.cjs +1 -1
  4. package/lib/action-bar/style.css +1 -1
  5. package/lib/add-to-list/add-to-list/AddToList.ve.js +19 -19
  6. package/lib/add-to-list/index.js +183 -183
  7. package/lib/add-to-list/index.umd.cjs +1 -1
  8. package/lib/add-to-list/style.css +1 -1
  9. package/lib/buttons/button/Button.ve.js +4 -4
  10. package/lib/buttons/index.js +48 -48
  11. package/lib/buttons/index.umd.cjs +1 -1
  12. package/lib/buttons/style.css +1 -1
  13. package/lib/cards/card/Card.ve.js +1 -1
  14. package/lib/cards/card-footer/CardFooter.ve.js +2 -2
  15. package/lib/cards/card-header/CardHeader.ve.js +1 -1
  16. package/lib/cards/card-title/CardTitle.ve.js +2 -2
  17. package/lib/cards/index.js +21 -21
  18. package/lib/cards/index.umd.cjs +1 -1
  19. package/lib/cards/style.css +1 -1
  20. package/lib/components/reorder-wrapper/ReorderWrapper.d.ts +2 -2
  21. package/lib/components/reorder-wrapper/ReorderWrapper.d.ts.map +1 -1
  22. package/lib/components/title/Title.d.ts +1 -1
  23. package/lib/components/title/Title.d.ts.map +1 -1
  24. package/lib/content-row/content-row/ContentRow.ve.js +13 -13
  25. package/lib/content-row/content-row-col/ContentRowCol.ve.js +2 -2
  26. package/lib/content-row/content-row-expansion/ContentRowExpansion.d.ts +1 -1
  27. package/lib/content-row/content-row-expansion/ContentRowExpansion.d.ts.map +1 -1
  28. package/lib/content-row/index.js +159 -165
  29. package/lib/content-row/index.umd.cjs +1 -1
  30. package/lib/content-row/row-list-auto-layout/RowListAutoLayout.js +10 -16
  31. package/lib/content-row/row-list-auto-layout/RowListAutoLayout.ve.js +2 -2
  32. package/lib/content-row/style.css +1 -1
  33. package/lib/content-tiles/content-tile/ContentTile.ve.js +7 -7
  34. package/lib/content-tiles/content-tile-list/ContentTileList.ve.js +3 -3
  35. package/lib/content-tiles/index.js +59 -59
  36. package/lib/content-tiles/index.umd.cjs +1 -1
  37. package/lib/content-tiles/style.css +1 -1
  38. package/lib/core.css +1 -1
  39. package/lib/dropdowns/dropdown/Dropdown.d.ts +1 -1
  40. package/lib/dropdowns/dropdown/Dropdown.d.ts.map +1 -1
  41. package/lib/dropdowns/dropdown/Dropdown.ve.js +3 -3
  42. package/lib/dropdowns/index.js +84 -84
  43. package/lib/dropdowns/index.umd.cjs +1 -1
  44. package/lib/dropdowns/option-list/Option.d.ts +1 -1
  45. package/lib/dropdowns/option-list/Option.d.ts.map +1 -1
  46. package/lib/dropdowns/option-list/Option.ve.js +1 -1
  47. package/lib/dropdowns/option-list/OptionList.d.ts +1 -1
  48. package/lib/dropdowns/option-list/OptionList.d.ts.map +1 -1
  49. package/lib/dropdowns/option-list/OptionList.ve.js +1 -1
  50. package/lib/dropdowns/style.css +1 -1
  51. package/lib/editable-table/style.css +50 -17
  52. package/lib/examples.d.ts.map +1 -1
  53. package/lib/feedback-block/FeedbackBlock.ve.js +3 -3
  54. package/lib/feedback-block/index.js +54 -54
  55. package/lib/feedback-block/index.umd.cjs +1 -1
  56. package/lib/feedback-block/style.css +1 -1
  57. package/lib/file-upload/file-upload/FileUpload.d.ts +1 -1
  58. package/lib/file-upload/file-upload/FileUpload.d.ts.map +1 -1
  59. package/lib/file-upload/file-upload/FileUpload.js +46 -41
  60. package/lib/file-upload/file-upload/FileUpload.ve.js +14 -14
  61. package/lib/file-upload/index.js +115 -110
  62. package/lib/file-upload/index.umd.cjs +1 -1
  63. package/lib/file-upload/style.css +1 -1
  64. package/lib/filter-tiles/filter-tile/FilterTile.ve.js +5 -5
  65. package/lib/filter-tiles/filter-tile-set/FilterTileSet.d.ts.map +1 -1
  66. package/lib/filter-tiles/filter-tile-set/FilterTileSet.ve.js +2 -2
  67. package/lib/filter-tiles/index.js +55 -55
  68. package/lib/filter-tiles/index.umd.cjs +1 -1
  69. package/lib/filter-tiles/style.css +1 -1
  70. package/lib/focused-task/focused-task/FocusedTask.ve.js +9 -9
  71. package/lib/focused-task/index.js +49 -49
  72. package/lib/focused-task/index.umd.cjs +1 -1
  73. package/lib/focused-task/style.css +1 -1
  74. package/lib/growler/Growler.d.ts.map +1 -1
  75. package/lib/growler/Growler.ve.js +7 -7
  76. package/lib/growler/Sonner.ve.js +7 -7
  77. package/lib/growler/index.js +95 -101
  78. package/lib/growler/index.umd.cjs +1 -1
  79. package/lib/growler/sonner.js +21 -27
  80. package/lib/growler/style.css +1 -1
  81. package/lib/index.js +166 -167
  82. package/lib/index.umd.cjs +2 -2
  83. package/lib/insight-card/InsightCard.ve.js +7 -7
  84. package/lib/insight-card/index.js +59 -59
  85. package/lib/insight-card/index.umd.cjs +1 -1
  86. package/lib/insight-card/style.css +1 -1
  87. package/lib/key-value-set/index.js +53 -53
  88. package/lib/key-value-set/index.umd.cjs +1 -1
  89. package/lib/key-value-set/key-value-set/KeyValueSet.ve.js +2 -2
  90. package/lib/key-value-set/key-value-set-item/KeyValueSetItem.ve.js +3 -3
  91. package/lib/key-value-set/style.css +1 -1
  92. package/lib/list-bar/advanced-search/AdvancedSearch.css.d.ts +1 -1
  93. package/lib/list-bar/advanced-search/AdvancedSearch.css.d.ts.map +1 -1
  94. package/lib/list-bar/advanced-search/AdvancedSearch.ve.js +5 -5
  95. package/lib/list-bar/index.js +88 -88
  96. package/lib/list-bar/index.umd.cjs +1 -1
  97. package/lib/list-bar/list-bar/InputGroupWrapper.d.ts +1 -1
  98. package/lib/list-bar/list-bar/InputGroupWrapper.d.ts.map +1 -1
  99. package/lib/list-bar/list-bar/ListBar.ve.js +12 -12
  100. package/lib/list-bar/list-bar/ListBarSearch.d.ts +1 -1
  101. package/lib/list-bar/list-bar/ListBarSearch.d.ts.map +1 -1
  102. package/lib/list-bar/list-bar/ListBarSearchInfo.d.ts +1 -1
  103. package/lib/list-bar/list-bar/ListBarSearchInfo.d.ts.map +1 -1
  104. package/lib/list-bar/list-bar/ListBarSortBy.d.ts +2 -2
  105. package/lib/list-bar/list-bar/ListBarSortBy.d.ts.map +1 -1
  106. package/lib/list-bar/search-results-bar/SearchResultsBar.d.ts +2 -4
  107. package/lib/list-bar/search-results-bar/SearchResultsBar.d.ts.map +1 -1
  108. package/lib/list-bar/search-results-bar/SearchResultsBar.ve.js +8 -8
  109. package/lib/list-bar/style.css +1 -1
  110. package/lib/matrix/index.js +29 -29
  111. package/lib/matrix/index.umd.cjs +1 -1
  112. package/lib/matrix/matrix/Matrix.ve.js +2 -2
  113. package/lib/matrix/matrix-body/MatrixBody.d.ts +1 -1
  114. package/lib/matrix/matrix-body/MatrixBody.d.ts.map +1 -1
  115. package/lib/matrix/matrix-head/MatrixHead.d.ts +1 -1
  116. package/lib/matrix/matrix-head/MatrixHead.d.ts.map +1 -1
  117. package/lib/matrix/matrix-row/MatrixRow.d.ts +1 -1
  118. package/lib/matrix/matrix-row/MatrixRow.d.ts.map +1 -1
  119. package/lib/matrix/style.css +1 -1
  120. package/lib/modal/index.js +86 -86
  121. package/lib/modal/index.umd.cjs +1 -1
  122. package/lib/modal/modal/Modal.ve.js +9 -9
  123. package/lib/modal/style.css +1 -1
  124. package/lib/page-title/index.js +17 -17
  125. package/lib/page-title/index.umd.cjs +1 -1
  126. package/lib/page-title/page-subtitle/PageSubtitle.ve.js +3 -3
  127. package/lib/page-title/page-title/PageTitle.ve.js +4 -4
  128. package/lib/page-title/style.css +1 -1
  129. package/lib/photo/index.js +67 -67
  130. package/lib/photo/index.umd.cjs +1 -1
  131. package/lib/photo/photo/Photo.d.ts +2 -2
  132. package/lib/photo/photo/Photo.d.ts.map +1 -1
  133. package/lib/photo/photo/Photo.js +11 -11
  134. package/lib/photo/photo/Photo.ve.js +1 -1
  135. package/lib/photo/photo-carousel/PhotoCarousel.d.ts +1 -1
  136. package/lib/photo/photo-carousel/PhotoCarousel.d.ts.map +1 -1
  137. package/lib/photo/photo-carousel/PhotoCarousel.ve.js +1 -1
  138. package/lib/photo/style.css +1 -1
  139. package/lib/product-bar/index.js +91 -93
  140. package/lib/product-bar/index.umd.cjs +1 -1
  141. package/lib/product-bar/product-bar/ProductBar.ve.js +10 -10
  142. package/lib/product-bar/product-bar-name/ProductBarName.d.ts.map +1 -1
  143. package/lib/product-bar/product-bar-name/ProductBarName.js +13 -15
  144. package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.ve.js +5 -5
  145. package/lib/product-bar/slack-link/SlackLink.ve.js +2 -2
  146. package/lib/product-bar/style.css +1 -1
  147. package/lib/product-bar-vertical/index.js +69 -69
  148. package/lib/product-bar-vertical/index.umd.cjs +1 -1
  149. package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.ve.js +20 -20
  150. package/lib/product-bar-vertical/product-bar-vertical-item/ProductBarVerticalItem.d.ts +1 -1
  151. package/lib/product-bar-vertical/product-bar-vertical-item/ProductBarVerticalItem.d.ts.map +1 -1
  152. package/lib/product-bar-vertical/style.css +1 -1
  153. package/lib/progress-indicators/index.js +79 -79
  154. package/lib/progress-indicators/index.umd.cjs +1 -1
  155. package/lib/progress-indicators/progress-bar/ProgressBar.css.d.ts +1 -1
  156. package/lib/progress-indicators/progress-bar/ProgressBar.css.d.ts.map +1 -1
  157. package/lib/progress-indicators/progress-bar/ProgressBar.d.ts +2 -2
  158. package/lib/progress-indicators/progress-bar/ProgressBar.d.ts.map +1 -1
  159. package/lib/progress-indicators/progress-bar/ProgressBar.js +1 -1
  160. package/lib/progress-indicators/progress-bar/ProgressBar.ve.js +10 -10
  161. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.d.ts +3 -3
  162. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.d.ts.map +1 -1
  163. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.ve.js +4 -4
  164. package/lib/progress-indicators/progress-ring/ProgressRing.d.ts +2 -2
  165. package/lib/progress-indicators/progress-ring/ProgressRing.d.ts.map +1 -1
  166. package/lib/progress-indicators/style.css +1 -1
  167. package/lib/rich-text-editor/index.js +86 -86
  168. package/lib/rich-text-editor/index.umd.cjs +2 -2
  169. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.js +1 -1
  170. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.ve.js +2 -2
  171. package/lib/rich-text-editor/rich-text-editor/RichTextEditor.ve.js +5 -5
  172. package/lib/rich-text-editor/style.css +1 -1
  173. package/lib/scrollable-container/ScrollableContainer.ve.js +1 -1
  174. package/lib/scrollable-container/index.js +8 -8
  175. package/lib/scrollable-container/index.umd.cjs +1 -1
  176. package/lib/scrollable-container/style.css +1 -1
  177. package/lib/side-nav/index.js +78 -78
  178. package/lib/side-nav/index.umd.cjs +1 -1
  179. package/lib/side-nav/side-nav/SideNav.ve.js +12 -12
  180. package/lib/side-nav/style.css +1 -1
  181. package/lib/sorting-header/caret/caret.ve.js +2 -2
  182. package/lib/sorting-header/index.js +125 -125
  183. package/lib/sorting-header/index.umd.cjs +1 -1
  184. package/lib/sorting-header/sorting-header/SortingHeader.ve.js +3 -3
  185. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.ve.js +2 -2
  186. package/lib/sorting-header/style.css +1 -1
  187. package/lib/style.css +1 -1
  188. package/lib/tabs/index.js +100 -100
  189. package/lib/tabs/index.umd.cjs +1 -1
  190. package/lib/tabs/style.css +1 -1
  191. package/lib/tabs/tab/Tab.ve.js +2 -2
  192. package/lib/tabs/tabs/Tabs.ve.js +5 -5
  193. package/lib/tags/clickable-tag/ClickableTag.ve.js +4 -4
  194. package/lib/tags/index.js +80 -80
  195. package/lib/tags/index.umd.cjs +1 -1
  196. package/lib/tags/split-tag/SplitTag.ve.js +2 -2
  197. package/lib/tags/style.css +1 -1
  198. package/lib/tags/tag/Tag.ve.js +3 -3
  199. package/lib/utils/VariantDefinitions.d.ts +1 -3
  200. package/lib/utils/VariantDefinitions.d.ts.map +1 -1
  201. package/lib/utils/combineEventHandlers.d.ts.map +1 -1
  202. package/lib/utils/getScrollParent.d.ts.map +1 -1
  203. package/lib/utils/modChildren.d.ts.map +1 -1
  204. package/lib/zero-state/ZeroState.ve.js +6 -6
  205. package/lib/zero-state/index.js +42 -42
  206. package/lib/zero-state/index.umd.cjs +1 -1
  207. package/lib/zero-state/style.css +1 -1
  208. package/package.json +11 -11
  209. package/scripts/watch-all.mjs +1 -1
@@ -1,4 +1,4 @@
1
- (function(u,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("@sps-woodland/core"),require("react"),require("@spscommerce/ds-react"),require("@sps-woodland/core/button"),require("@spscommerce/i18n"),require("@sps-woodland/tokens"),require("remark-parse"),require("remark-rehype"),require("rehype-sanitize"),require("rehype-stringify"),require("unified"),require("unist-util-visit"),require("rehype-parse"),require("rehype-remark"),require("remark-stringify")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core","react","@spscommerce/ds-react","@sps-woodland/core/button","@spscommerce/i18n","@sps-woodland/tokens","remark-parse","remark-rehype","rehype-sanitize","rehype-stringify","unified","unist-util-visit","rehype-parse","rehype-remark","remark-stringify"],w):(u=typeof globalThis<"u"?globalThis:u||self,w(u.RichTextEditor={},u.spsWoodlandCore,u.react,u.spscommerceDsReact,u.spsWoodlandCoreButton,u.spscommerceI18n,u.spsWoodlandTokens,u.remarkParse,u.remarkRehype,u.rehypeSanitize,u.rehypeStringify,u.unified,u.unistUtilVisit,u.rehypeParse,u.rehypeRemark,u.remarkStringify))})(this,(function(u,w,f,v,D,U,x,P,V,H,F,T,q,$,j,Z){"use strict";function G(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const d=G(f);function z({onClose:t,selectionDOMContextFind:n,selectionRange:e}){const{t:r}=U.useWoodlandLanguage(),o=d.useRef(e),s=d.useRef(!1),{formValue:i,formMeta:c,updateForm:a}=v.useSpsForm({text:e?.toString()||"",link:""});return d.useEffect(()=>{if(!s.current){const l=n(g=>g.tagName==="A");l&&(a({text:l.textContent||"",link:l.getAttribute("href")||""}),s.current=!0)}},[n]),d.createElement(v.SpsModal,{title:"Add Link",onClose:()=>t(o.current)},d.createElement("div",{className:"sg-row"},d.createElement("div",{className:"sg-col-12"},d.createElement(v.SpsLabel,{for:c.fields.text},r("richTextEditor.linkModal.text",{defaultValue:"Text"})),d.createElement(v.SpsTextInput,{formMeta:c.fields.text,value:i.text}))),d.createElement("div",{className:"sg-row"},d.createElement("div",{className:"sg-col-12"},d.createElement(v.SpsLabel,{for:c.fields.link},r("richTextEditor.linkModal.link",{defaultValue:"Link"})),d.createElement(v.SpsTextInput,{formMeta:c.fields.link,value:i.link}))),d.createElement(v.SpsModalFooter,null,d.createElement(D.Button,{onClick:()=>t(o.current,i)},r("richTextEditor.linkModal.ok",{defaultValue:"OK"}))))}function K(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function S(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,r)}return e}function M(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?S(Object(e),!0).forEach(function(r){K(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):S(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}var W=(t,n,e)=>{for(var r of Object.keys(t)){var o;if(t[r]!==((o=n[r])!==null&&o!==void 0?o:e[r]))return!1}return!0},E=t=>n=>{var e=t.defaultClassName,r=M(M({},t.defaultVariants),n);for(var o in r){var s,i=(s=r[o])!==null&&s!==void 0?s:t.defaultVariants[o];if(i!=null){var c=i;typeof c=="boolean"&&(c=c===!0?"true":"false");var a=t.variantClassNames[o][c];a&&(e+=" "+a)}}for(var[l,g]of t.compoundVariants)W(l,r,t.defaultVariants)&&(e+=" "+g);return e},J=E({defaultClassName:"pkg_sps-woodland_core__version_8_53_11__hash_1903a6n0",variantClassNames:{active:{true:"pkg_sps-woodland_core__version_8_53_11__hash_1903a6n1",false:"pkg_sps-woodland_core__version_8_53_11__hash_1903a6n2"}},defaultVariants:{},compoundVariants:[]}),Q={icon:"pkg_sps-woodland_core__version_8_53_11__hash_1903a6n3"};function X({icon:t,onClick:n,selectionDOMContextFind:e,activeTest:r,isSimpleToggle:o=!1,...s}){const[i,c]=d.useState(!1);d.useEffect(()=>{r&&c(!!e(r))},[e]);const a=d.useCallback(()=>{n&&n(i),o&&c(!i)},[n,i]);return d.createElement("button",{className:J({active:i}),onClick:a,onMouseDown:l=>l.preventDefault(),...s},d.createElement("span",{className:Q.icon,style:{backgroundImage:'url("'+t+'")'},"aria-hidden":"true"}))}var Y=E({defaultClassName:"pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss0",variantClassNames:{disabled:{true:"pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss1",false:"pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss2"}},defaultVariants:{disabled:!1},compoundVariants:[]}),e0=E({defaultClassName:"pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss3",variantClassNames:{disabled:{true:"pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss4",false:"pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss5"}},defaultVariants:{},compoundVariants:[]}),t0="pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss6",n0="pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss7";function r0(){return t=>(q.visit(t,"listItem",n=>{const e=Array.from(n.children);if(e.length>0&&e[0].type==="paragraph"){const r=e[0],s=Array.from(r.children).concat(e.slice(1));n.children=s}}),t)}function o0(){const t=f.useMemo(()=>T.unified().use(P).use(r0).use(V).use(H).use(F),[]);return f.useMemo(()=>function(e){return t.process(e).then(String)},[t])}const b=new Set(["strong","emphasis","delete","link","linkReference"]),i0=new Set([...b,"paragraph"]);function I(t){return"children"in t}function s0(){return t=>{function n(e){for(const r of e.children)I(r)&&n(r);if(e.children=e.children.filter(r=>!(i0.has(r.type)&&I(r)&&r.children.length===0)),b.has(e.type))for(;e.children.at(-1)?.type==="break";)e.children.pop()}return n(t),t}}function c0(){const t=f.useMemo(()=>T.unified().use($).use(j).use(s0).use(Z),[]);return f.useMemo(()=>function(e){return t.process(e).then(String)},[t])}function a0(t="",n=""){const[e,r]=f.useState(),[o,s]=f.useState({html:n}),i=c0(),c=o0(),a=f.useCallback(async m=>{const h=await c(m),p={md:m,html:h};return r(p),p},[c]),l=f.useCallback(async m=>{const p={md:await i(m),html:m};return r(p),p},[i]);f.useEffect(()=>{!n&&t!==e?.md?a(t).then(({html:m})=>{s({html:m})}):!t&&n&&n!==e?.html&&l(n)},[t,n]);function g(m){m.current&&l(m.current.innerHTML)}return{aggValue:e,editableDivInnerHtml:o,updateStateFromDiv:g}}function l0(t){if(t instanceof HTMLElement){for(const n of Array.from(t.attributes))/(style|class|data-[^=]+)/.test(n.name)&&t.removeAttribute(n.name);t.innerHTML=t.innerHTML.replace(/(style|class|data-[^=]+)="[^"]+"/g,"")}}const d0=[{regex:/\*\*([^*]+)\*\*/,command:"bold"},{regex:new RegExp("(?<!\\*)\\*([^*]+)\\*"),command:"italic"},{regex:/^\*[ \u00a0]/,command:"insertUnorderedList"},{regex:/^1\.[ \u00a0]/,command:"insertOrderedList"},{regex:/\[([^\]]+)\]\(([^)]+)\)/,command:"createLink",getCommandArg:([,,t])=>/^https?:\/\//.test(t)?t:`https://${t}`}];function g0(t,n,e){const r=document.createRange();r.setStart(t,n),r.setEnd(t,e);const o=window.getSelection();o?.removeAllRanges(),o?.addRange(r)}function k(t){const n=document.createRange();n.setStartAfter(t),n.setEndAfter(t);const e=window.getSelection();e?.removeAllRanges(),e?.addRange(n)}function m0(t){const n=document.createRange();n.setStartBefore(t),n.setEndBefore(t);const e=window.getSelection();e?.removeAllRanges(),e?.addRange(n)}function u0(t){const n=f.useRef(null),e=f.useMemo(()=>new MutationObserver(([r])=>{if(r.type==="characterData"&&r.oldValue&&r.target.textContent){for(const o of d0)if(!o.regex.test(r.oldValue)&&o.regex.test(r.target.textContent)){const s=o.regex.exec(r.target.textContent),[i,c=""]=s,a=r.target.textContent.indexOf(i);r.target.textContent=r.target.textContent.replace(i,c);const l=a+c.length;g0(r.target,a,l);const g=o.getCommandArg?o.getCommandArg(s):void 0;document.execCommand(o.command,void 0,g),c&&(k(r.target.parentNode),document.execCommand(o.command))}}else r.type==="childList"&&Array.from(r.addedNodes).forEach(o=>{let s;if(o instanceof HTMLElement&&o.tagName==="LI"?s=o:o?.parentElement?.tagName==="LI"&&(s=o?.parentElement),s){const i=s.nextElementSibling,c=i?.childNodes?.[0];if(c instanceof HTMLElement&&["UL","OL"].includes(c.tagName)){const l=document.createElement("br");i.insertBefore(l,c),m0(l)}}l0(o)});t(n)}),[]);return f.useEffect(()=>()=>{e&&e.disconnect()},[]),f.useEffect(()=>{n.current!==null&&e.observe(n.current,{childList:!0,subtree:!0,characterDataOldValue:!0})},[e,n]),n}function f0(t){const[n,e]=f.useState();f.useEffect(()=>{function o(){const s=window.getSelection();Number(s?.rangeCount)>0&&e(s?.getRangeAt(0))}return document.addEventListener("selectionchange",o),()=>{document.removeEventListener("selectionchange",o)}},[]);const r=f.useCallback(o=>{if(!n)return null;const s=n.commonAncestorContainer;if(!t.current||!t.current.contains(s))return null;let i=s instanceof HTMLElement?s:s.parentElement;for(;i&&i!==t.current;){if(o(i))return i;i=i.parentElement}return null},[n]);return{selectionRange:n,selectionDOMContextFind:r}}const h0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='10px'%20height='12px'%20viewBox='0%200%2010%2012'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eBold%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-53.000000,%20-103.000000)'%20fill='%234B5356'%20fill-rule='nonzero'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%202.000000)'%20id='B'%3e%3cg%20transform='translate(3.550000,%202.130000)'%3e%3cpath%20d='M0,0%20L4.014,0%20C4.626,0%205.193,0.045%205.715,0.135%20C6.237,0.225%206.693,0.384%207.083,0.612%20C7.473,0.84%207.779,1.14%208.001,1.512%20C8.223,1.884%208.334,2.352%208.334,2.916%20C8.334,3.18%208.295,3.444%208.217,3.708%20C8.139,3.972%208.022,4.218%207.866,4.446%20C7.71,4.674%207.506,4.878%207.254,5.058%20C7.002,5.238%206.708,5.37%206.372,5.454%20L6.372,5.526%20C7.212,5.682%207.845,5.982%208.271,6.426%20C8.697,6.87%208.91,7.488%208.91,8.28%20C8.91,8.88%208.793,9.396%208.559,9.828%20C8.325,10.26%208.001,10.617%207.587,10.899%20C7.173,11.181%206.69,11.391%206.138,11.529%20C5.586,11.667%204.992,11.736%204.356,11.736%20L0,11.736%20L0,0%20Z%20M3.888,4.734%20C4.536,4.734%205.007,4.605%205.301,4.347%20C5.595,4.089%205.742,3.738%205.742,3.294%20C5.742,2.85%205.592,2.532%205.292,2.34%20C4.992,2.148%204.53,2.052%203.906,2.052%20L2.646,2.052%20L2.646,4.734%20L3.888,4.734%20Z%20M4.14,9.684%20C5.592,9.684%206.318,9.15%206.318,8.082%20C6.318,7.566%206.138,7.191%205.778,6.957%20C5.418,6.723%204.872,6.606%204.14,6.606%20L2.646,6.606%20L2.646,9.684%20L4.14,9.684%20Z'%20id='Shape'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",p0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='14px'%20viewBox='0%200%2016%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIndent%20short%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-50.000000,%20-282.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%20182.000000)'%3e%3crect%20id='Rectangle-223'%20x='0'%20y='1.6'%20width='16'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='0'%20y='12.4'%20width='16'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='7'%20y='8.8'%20width='9'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='7'%20y='5.2'%20width='9'%20height='2'%3e%3c/rect%3e%3cpath%20d='M5.20857552,7.99286089%20C5.20857552,8.06428955%205.18178977,8.14464678%205.12821828,8.19821828%20L2.27107201,11.0553645%20C2.21750052,11.108936%202.13714328,11.1357218%202.06571463,11.1357218%20C1.91392873,11.1357218%201.78,11.001793%201.78,10.85%20L1.78,5.13571463%20C1.78,4.97500015%201.90500015,4.85%202.06571463,4.85%20C2.14607186,4.85%202.21750052,4.88571433%202.28,4.93928582%20L5.12821828,7.7875035%20C5.18178977,7.84107499%205.20857552,7.92143223%205.20857552,7.99286089%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",C0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='10px'%20height='12px'%20viewBox='0%200%2010%2012'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eItalics%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-53.000000,%20-148.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%2047.000000)'%3e%3cg%20id='I'%20transform='translate(5.600000,%202.130000)'%20fill-rule='nonzero'%3e%3cpolygon%20id='Path'%20points='2.358%200%204.824%200%202.484%2011.736%200%2011.736'%3e%3c/polygon%3e%3c/g%3e%3crect%20id='Rectangle'%20x='5.5'%20y='2'%20width='7'%20height='1.5'%3e%3c/rect%3e%3crect%20id='Rectangle-Copy'%20x='3.5'%20y='12.5'%20width='7'%20height='1.5'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",w0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='14px'%20height='14px'%20viewBox='0%200%2014%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/icon-ellipses%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---Schematics'%20transform='translate(-401.000000,%20-200.000000)'%20fill='%234B5356'%3e%3cg%20id='Group-5'%20transform='translate(146.000000,%20167.000000)'%3e%3cg%20id='Icon/icon-link'%20transform='translate(254.000000,%2032.000000)'%3e%3cpath%20d='M9.28515625,6.03125%20C9.33984402,6.06770852%209.39908822,6.11328098%209.46289062,6.16796875%20C9.52669303,6.22265652%209.58593723,6.26822898%209.640625,6.3046875%20L9.6953125,6.359375%20C10.3333365,7.01562828%2010.6523438,7.79947461%2010.6523438,8.7109375%20C10.6523438,9.62240039%2010.3333365,10.4062467%209.6953125,11.0625%20L6.6875,14.0429688%20C6.04947598,14.6809928%205.27474414,15%204.36328125,15%20C3.45181836,15%202.66797203,14.6809928%202.01171875,14.0429688%20L1.95703125,13.9882812%20C1.31900723,13.332028%201,12.5481816%201,11.6367188%20C1,10.7252559%201.31900723,9.95052402%201.95703125,9.3125%20L4.0625,7.20703125%20C4.04427074,7.51692863%204.06249973,7.82682137%204.1171875,8.13671875%20C4.17187527,8.44661613%204.2630202,8.73827988%204.390625,9.01171875%20L3.05078125,10.3789062%20C2.68619609,10.7252621%202.50390625,11.1445288%202.50390625,11.6367188%20C2.50390625,12.1289087%202.68619609,12.5481754%203.05078125,12.8945312%20L3.10546875,12.9492188%20C3.45182465,13.3138039%203.87109129,13.4960938%204.36328125,13.4960938%20C4.85547121,13.4960938%205.27473785,13.3138039%205.62109375,12.9492188%20L8.6015625,9.96875%20C8.9479184,9.6223941%209.12109375,9.20312746%209.12109375,8.7109375%20C9.12109375,8.21874754%208.9479184,7.7994809%208.6015625,7.453125%20L8.546875,7.3984375%20C8.49218723,7.34374973%208.43750027,7.29362002%208.3828125,7.24804688%20C8.32812473,7.20247373%208.26432328,7.16145852%208.19140625,7.125%20L9.28515625,6.03125%20Z%20M11.6367188,1%20C12.5481816,1%2013.332028,1.31900723%2013.9882812,1.95703125%20L14.0429688,2.01171875%20C14.6809928,2.66797203%2015,3.45181836%2015,4.36328125%20C15,5.27474414%2014.6809928,6.04947598%2014.0429688,6.6875%20L11.9375,8.79296875%20C11.9557293,8.48307137%2011.9375003,8.17317863%2011.8828125,7.86328125%20C11.8281247,7.55338387%2011.7369798,7.26172012%2011.609375,6.98828125%20L12.9492188,5.62109375%20C13.3138039,5.27473785%2013.4960938,4.85547121%2013.4960938,4.36328125%20C13.4960938,3.87109129%2013.3138039,3.45182465%2012.9492188,3.10546875%20L12.8945312,3.05078125%20C12.5481754,2.68619609%2012.1289087,2.50390625%2011.6367188,2.50390625%20C11.1445288,2.50390625%2010.7252621,2.68619609%2010.3789062,3.05078125%20L7.3984375,6.03125%20C7.0520816,6.3776059%206.87890625,6.79687254%206.87890625,7.2890625%20C6.87890625,7.78125246%207.0520816,8.2005191%207.3984375,8.546875%20L7.453125,8.6015625%20C7.50781277,8.65625027%207.56249973,8.70637998%207.6171875,8.75195312%20C7.67187527,8.79752627%207.73567672,8.83854148%207.80859375,8.875%20L6.71484375,9.96875%20C6.66015598,9.93229148%206.60091178,9.88671902%206.53710938,9.83203125%20C6.47330697,9.77734348%206.41406277,9.73177102%206.359375,9.6953125%20L6.3046875,9.640625%20C5.66666348,8.98437172%205.34765625,8.20052539%205.34765625,7.2890625%20C5.34765625,6.37759961%205.66666348,5.59375328%206.3046875,4.9375%20L9.3125,1.95703125%20C9.95052402,1.31900723%2010.7252559,1%2011.6367188,1%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",v0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='15px'%20height='14px'%20viewBox='0%200%2015%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eOrdered%20list%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-51.000000,%20-192.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%2092.000000)'%3e%3crect%20id='Rectangle-223-Copy-3'%20x='5'%20y='2.5'%20width='11'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223-Copy-2'%20x='5'%20y='7'%20width='11'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223-Copy'%20x='5'%20y='11.5'%20width='11'%20height='2'%3e%3c/rect%3e%3cg%20id='1'%20transform='translate(1.500000,%201.900000)'%20fill-rule='nonzero'%3e%3cpath%20d='M0,2.58%20L0.69,2.58%20L0.69,0.745%20L0.095,0.745%20L0.095,0.29%20C0.268333333,0.256666667%200.415,0.216666667%200.535,0.17%20C0.655,0.123333333%200.771666667,0.0666666667%200.885,0%20L1.425,0%20L1.425,2.58%20L2.02,2.58%20L2.02,3.175%20L0,3.175%20L0,2.58%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3cg%20id='2'%20transform='translate(1.355000,%206.400000)'%20fill-rule='nonzero'%3e%3cpath%20d='M0.035,2.815%20C0.238333333,2.625%200.424166667,2.4475%200.5925,2.2825%20C0.760833333,2.1175%200.905833333,1.9625%201.0275,1.8175%20C1.14916667,1.6725%201.24416667,1.5375%201.3125,1.4125%20C1.38083333,1.2875%201.415,1.16833333%201.415,1.055%20C1.415,0.898333333%201.375,0.779166667%201.295,0.6975%20C1.215,0.615833333%201.105,0.575%200.965,0.575%20C0.848333333,0.575%200.745,0.6075%200.655,0.6725%20C0.565,0.7375%200.48,0.813333333%200.4,0.9%20L0,0.505%20C0.156666667,0.338333333%200.316666667,0.2125%200.48,0.1275%20C0.643333333,0.0425%200.838333333,0%201.065,0%20C1.22166667,0%201.36416667,0.0241666667%201.4925,0.0725%20C1.62083333,0.120833333%201.73166667,0.189166667%201.825,0.2775%20C1.91833333,0.365833333%201.99,0.471666667%202.04,0.595%20C2.09,0.718333333%202.115,0.856666667%202.115,1.01%20C2.115,1.14333333%202.08666667,1.27916667%202.03,1.4175%20C1.97333333,1.55583333%201.8975,1.69416667%201.8025,1.8325%20C1.7075,1.97083333%201.59916667,2.10916667%201.4775,2.2475%20C1.35583333,2.38583333%201.23,2.52166667%201.1,2.655%20C1.18,2.645%201.26916667,2.63583333%201.3675,2.6275%20C1.46583333,2.61916667%201.55333333,2.615%201.63,2.615%20L2.27,2.615%20L2.27,3.235%20L0.035,3.235%20L0.035,2.815%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3cg%20id='3'%20transform='translate(1.350000,%2010.800000)'%20fill-rule='nonzero'%3e%3cpath%20d='M0.34,2.38%20C0.436666667,2.47333333%200.5425,2.55%200.6575,2.61%20C0.7725,2.67%200.898333333,2.7%201.035,2.7%20C1.19166667,2.7%201.31666667,2.6675%201.41,2.6025%20C1.50333333,2.5375%201.55,2.445%201.55,2.325%20C1.55,2.255%201.5375,2.19166667%201.5125,2.135%20C1.4875,2.07833333%201.44333333,2.03083333%201.38,1.9925%20C1.31666667,1.95416667%201.23,1.92416667%201.12,1.9025%20C1.01,1.88083333%200.868333333,1.87%200.695,1.87%20L0.695,1.35%20C0.838333333,1.35%200.9575,1.34%201.0525,1.32%20C1.1475,1.3%201.22416667,1.27083333%201.2825,1.2325%20C1.34083333,1.19416667%201.3825,1.14916667%201.4075,1.0975%20C1.4325,1.04583333%201.445,0.988333333%201.445,0.925%20C1.445,0.815%201.41166667,0.729166667%201.345,0.6675%20C1.27833333,0.605833333%201.18166667,0.575%201.055,0.575%20C0.941666667,0.575%200.839166667,0.6%200.7475,0.65%20C0.655833333,0.7%200.56,0.768333333%200.46,0.855%20L0.09,0.405%20C0.236666667,0.278333333%200.390833333,0.179166667%200.5525,0.1075%20C0.714166667,0.0358333333%200.893333333,0%201.09,0%20C1.25333333,0%201.4025,0.0191666667%201.5375,0.0575%20C1.6725,0.0958333333%201.7875,0.1525%201.8825,0.2275%20C1.9775,0.3025%202.05166667,0.393333333%202.105,0.5%20C2.15833333,0.606666667%202.185,0.73%202.185,0.87%20C2.185,1.03666667%202.13916667,1.1775%202.0475,1.2925%20C1.95583333,1.4075%201.825,1.50166667%201.655,1.575%20L1.655,1.595%20C1.83833333,1.64833333%201.98916667,1.73916667%202.1075,1.8675%20C2.22583333,1.99583333%202.285,2.16333333%202.285,2.37%20C2.285,2.51666667%202.25333333,2.6475%202.19,2.7625%20C2.12666667,2.8775%202.04166667,2.97416667%201.935,3.0525%20C1.82833333,3.13083333%201.70333333,3.19083333%201.56,3.2325%20C1.41666667,3.27416667%201.265,3.295%201.105,3.295%20C0.845,3.295%200.625,3.25416667%200.445,3.1725%20C0.265,3.09083333%200.116666667,2.98166667%200,2.845%20L0.34,2.38%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",x0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='14px'%20viewBox='0%200%2016%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eOutdent%20short%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-50.000000,%20-327.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%20227.000000)'%3e%3crect%20id='Rectangle-223'%20x='0'%20y='1.6'%20width='16'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='0'%20y='12.4'%20width='16'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='7'%20y='8.8'%20width='9'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='7'%20y='5.2'%20width='9'%20height='2'%3e%3c/rect%3e%3cpath%20d='M5.21357552,10.85%20C5.21357552,11.001793%205.08857537,11.1357218%204.92786089,11.1357218%20C4.84750365,11.1357218%204.77607499,11.1000075%204.71357492,11.046436%20L1.86535724,8.1892897%20C1.81178575,8.1357182%201.785,8.06428955%201.785,7.99286089%20C1.785,7.91250365%201.81178575,7.84107499%201.86535724,7.7875035%20L4.7225035,4.93035724%20C4.77607499,4.87678575%204.85643223,4.85%204.92786089,4.85%20C5.07964678,4.85%205.21357552,4.97500015%205.21357552,5.13571463%20L5.21357552,10.85%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",L0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='14px'%20height='14px'%20viewBox='0%200%2014%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/icon-ellipses%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---Schematics'%20transform='translate(-520.000000,%20-200.000000)'%20fill='%234B5356'%3e%3cg%20id='Group-5'%20transform='translate(146.000000,%20167.000000)'%3e%3cg%20id='Button/2.-Icon/6.-Default-Copy-8'%20transform='translate(363.000000,%2025.000000)'%3e%3cg%20id='Icon/icon-undo'%20transform='translate(10.000000,%207.000000)'%3e%3cpath%20d='M15,2.16666667%20C15,1.9296875%2014.8541667,1.72005208%2014.6445312,1.62890625%20C14.4257812,1.53776042%2014.1705729,1.58333333%2014.0065104,1.75651042%20L12.8216146,2.93229167%20C11.5364583,1.72005208%209.79557292,1%208,1%20C4.14453125,1%201,4.14453125%201,8%20C1,11.8554688%204.14453125,15%208,15%20C10.0872396,15%2012.0559896,14.0794271%2013.3867188,12.4752604%20C13.4778646,12.3567708%2013.4778646,12.1835938%2013.3684896,12.0833333%20L12.1197917,10.8255208%20C12.0559896,10.7708333%2011.9739583,10.7434896%2011.8919271,10.7434896%20C11.8098958,10.7526042%2011.7278646,10.7890625%2011.6822917,10.8528646%20C10.7890625,12.0104167%209.44921875,12.6666667%208,12.6666667%20C5.4296875,12.6666667%203.33333333,10.5703125%203.33333333,8%20C3.33333333,5.4296875%205.4296875,3.33333333%208,3.33333333%20C9.19401042,3.33333333%2010.3242188,3.7890625%2011.1809896,4.58203125%20L9.92317708,5.83984375%20C9.75,6.00390625%209.70442708,6.25911458%209.79557292,6.46875%20C9.88671875,6.6875%2010.0963542,6.83333333%2010.3333333,6.83333333%20L14.4166667,6.83333333%20C14.7356771,6.83333333%2015,6.56901042%2015,6.25%20L15,2.16666667%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",E0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='14px'%20height='14px'%20viewBox='0%200%2014%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/icon-ellipses%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---Schematics'%20transform='translate(-484.000000,%20-200.000000)'%20fill='%234B5356'%3e%3cg%20id='Group-5'%20transform='translate(146.000000,%20167.000000)'%3e%3cg%20id='Button/2.-Icon/6.-Default-Copy-9'%20transform='translate(345.000000,%2040.000000)%20scale(-1,%201)%20translate(-345.000000,%20-40.000000)%20translate(327.000000,%2025.000000)'%3e%3cg%20id='Icon/icon-undo'%20transform='translate(10.000000,%207.000000)'%3e%3cpath%20d='M15,2.16666667%20C15,1.9296875%2014.8541667,1.72005208%2014.6445312,1.62890625%20C14.4257812,1.53776042%2014.1705729,1.58333333%2014.0065104,1.75651042%20L12.8216146,2.93229167%20C11.5364583,1.72005208%209.79557292,1%208,1%20C4.14453125,1%201,4.14453125%201,8%20C1,11.8554688%204.14453125,15%208,15%20C10.0872396,15%2012.0559896,14.0794271%2013.3867188,12.4752604%20C13.4778646,12.3567708%2013.4778646,12.1835938%2013.3684896,12.0833333%20L12.1197917,10.8255208%20C12.0559896,10.7708333%2011.9739583,10.7434896%2011.8919271,10.7434896%20C11.8098958,10.7526042%2011.7278646,10.7890625%2011.6822917,10.8528646%20C10.7890625,12.0104167%209.44921875,12.6666667%208,12.6666667%20C5.4296875,12.6666667%203.33333333,10.5703125%203.33333333,8%20C3.33333333,5.4296875%205.4296875,3.33333333%208,3.33333333%20C9.19401042,3.33333333%2010.3242188,3.7890625%2011.1809896,4.58203125%20L9.92317708,5.83984375%20C9.75,6.00390625%209.70442708,6.25911458%209.79557292,6.46875%20C9.88671875,6.6875%2010.0963542,6.83333333%2010.3333333,6.83333333%20L14.4166667,6.83333333%20C14.7356771,6.83333333%2015,6.56901042%2015,6.25%20L15,2.16666667%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",k0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='14px'%20height='16px'%20viewBox='0%200%2014%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eUnlink%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-51.000000,%20-371.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%20272.000000)'%3e%3cpath%20d='M14.0429688,2.01171875%20C14.6809928,2.66797203%2015,3.45181836%2015,4.36328125%20C15,5.27474414%2014.6809928,6.04947598%2014.0429688,6.6875%20L11.1027446,9.58420181%20L10.3518996,8.27890801%20L12.9492188,5.62109375%20C13.3138039,5.27473785%2013.4960938,4.85547121%2013.4960938,4.36328125%20C13.4960938,3.87109129%2013.3138039,3.45182465%2012.9492188,3.10546875%20L12.8945313,3.05078125%20C12.5481754,2.68619609%2012.1289087,2.50390625%2011.6367188,2.50390625%20C11.1445288,2.50390625%2010.7252621,2.68619609%2010.3789063,3.05078125%20L8.41457939,4.92175579%20L7.64047964,3.57621944%20L9.3125,1.95703125%20C9.95052402,1.31900723%2010.7252559,1%2011.6367188,1%20C12.5481816,1%2013.332028,1.31900723%2013.9882813,1.95703125%20L14.0429688,2.01171875%20Z'%20id='Path'%3e%3c/path%3e%3cpath%20d='M8.02641916,12.7072184%20L6.6875,14.0429687%20C6.04947598,14.6809928%205.27474414,15%204.36328125,15%20C3.45181836,15%202.66797203,14.6809928%202.01171875,14.0429687%20L1.95703125,13.9882812%20C1.31900723,13.332028%201,12.5481816%201,11.6367187%20C1,10.7252559%201.31900723,9.95052402%201.95703125,9.3125%20L4.57246065,6.71787083%20L5.34566408,8.05009655%20L3.05078125,10.3789062%20C2.68619609,10.7252621%202.50390625,11.1445288%202.50390625,11.6367187%20C2.50390625,12.1289087%202.68619609,12.5481754%203.05078125,12.8945312%20L3.10546875,12.9492187%20C3.45182465,13.3138039%203.87109129,13.4960937%204.36328125,13.4960937%20C4.85547121,13.4960937%205.27473785,13.3138039%205.62109375,12.9492187%20L7.2646265,11.388324%20L8.02641916,12.7072184%20Z'%20id='Path'%3e%3c/path%3e%3crect%20id='Rectangle'%20transform='translate(7.750000,%208.000000)%20rotate(-30.000000)%20translate(-7.750000,%20-8.000000)%20'%20x='7'%20y='0'%20width='1.5'%20height='16'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='15px'%20height='12px'%20viewBox='0%200%2015%2012'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eUnordered%20list%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-51.000000,%20-238.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%20137.000000)'%3e%3cg%20transform='translate(1.000000,%202.000000)'%3e%3crect%20id='Rectangle-223'%20x='4'%20y='0.5'%20width='11'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='4'%20y='5'%20width='11'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='4'%20y='9.5'%20width='11'%20height='2'%3e%3c/rect%3e%3ccircle%20id='Oval'%20cx='1.5'%20cy='1.5'%20r='1.5'%3e%3c/circle%3e%3ccircle%20id='Oval-Copy'%20cx='1.5'%20cy='6'%20r='1.5'%3e%3c/circle%3e%3ccircle%20id='Oval-Copy-2'%20cx='1.5'%20cy='10.5'%20r='1.5'%3e%3c/circle%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",L=(t,n)=>{let e=t;for(;e.parentElement&&!n.includes(e.parentElement.tagName);)e=e.parentElement;return e.parentElement&&n.includes(e.parentElement.tagName)?e.parentElement:null},O=t=>{const n=[];let e=t;for(;e.nextElementSibling;)n.push(e.nextElementSibling),e=e.nextElementSibling;return n},y0={key:"bold",icon:h0,onClick:()=>document.execCommand("bold"),activeTest:t=>["B","STRONG"].includes(t.tagName),isSimpleToggle:!0},N0={key:"italics",icon:C0,onClick:()=>document.execCommand("italic"),activeTest:t=>["I","EM"].includes(t.tagName),isSimpleToggle:!0},T0={key:"ul",icon:_0,onClick:()=>document.execCommand("insertUnorderedList"),activeTest:t=>t.tagName==="UL"},S0={key:"ol",icon:v0,onClick:()=>document.execCommand("insertOrderedList"),activeTest:t=>t.tagName==="OL"},M0={key:"indent",icon:p0,onClick:()=>{try{const t=window.getSelection();if(t?.type==="Range"){const n=t.getRangeAt(0),e=n.commonAncestorContainer;if(!(e instanceof HTMLElement)||(e.tagName==="UL"||e.tagName==="OL"||e.tagName==="LI")&&e.firstElementChild&&n.intersectsNode(e.firstElementChild))return;const r=[];let o;if(e.childNodes.forEach(s=>{n.intersectsNode(s)&&s instanceof HTMLElement&&s.tagName==="LI"&&(r.length===0&&(o=s.previousSibling),r.push(s))}),o instanceof HTMLElement&&o.tagName==="LI"){r.forEach(i=>i.remove());const s=o.parentElement?.tagName.toLowerCase();if(s){const i=document.createElement(s);r.forEach(c=>i.appendChild(c)),o.appendChild(i)}return}}else if(t){const{anchorNode:n}=t;let e;if(n instanceof HTMLElement&&n.tagName==="LI"?e=n:n&&(e=L(n,["LI"])),e){const r=e.previousElementSibling,o=e.parentElement.tagName.toLowerCase();if(r&&r.tagName==="LI"){e.remove();const s=r.querySelector(o);if(s)s.appendChild(e);else{const i=document.createElement(o);i.appendChild(e),r.appendChild(i)}n&&k(n.childNodes?.[0]||n)}return}}}catch{}document.execCommand("indent")}},b0={key:"outdent",icon:x0,onClick:()=>{try{const t=window.getSelection();if(t?.type==="Range"){const n=t.getRangeAt(0),e=n.commonAncestorContainer;if(!(e instanceof HTMLElement))return;const r=[];let o;if(e.tagName==="UL"||e.tagName==="OL"?o=e:e.tagName==="LI"&&(o=e.parentElement),o){o.childNodes.forEach(i=>{n.intersectsNode(i)&&i instanceof HTMLElement&&i.tagName==="LI"&&r.push(i)});const s=o.parentElement;s?.tagName==="LI"&&(r.forEach((i,c)=>{if(c===r.length-1){const a=O(i);if(a.length>0){const l=o.tagName.toLowerCase(),g=i.querySelector(l);if(g)for(const m of a)m.remove(),g.appendChild(m);else{const m=document.createElement(l);i.appendChild(m);for(const h of a)h.remove(),m.appendChild(h)}}}i.remove()}),o.childElementCount===0&&o.remove(),r.reverse().forEach(i=>s.after(i)));return}}else if(t){const{anchorNode:n}=t;let e=null,r=null;n instanceof HTMLElement&&(n.tagName==="UL"||n.tagName==="OL")?(e=n,r=n.querySelector("li")):n&&(e=L(n,["UL","OL"]),r=n instanceof HTMLElement&&n.tagName==="LI"?n:L(n,["LI"]));const o=e?L(e,["UL","OL"]):null;if(e&&o){const s=L(e,["LI"]);if(e.childElementCount===1&&e.remove(),r){const i=O(r);if(i.length>0){const c=document.createElement(e.tagName.toLowerCase());r.appendChild(c);for(const a of i)a.remove(),c.appendChild(a)}s?.after(r),r.lastChild&&k(r.lastChild)}return}}}catch{}document.execCommand("outdent")}},I0={key:"undo",icon:E0,onClick:()=>document.execCommand("undo")},O0={key:"redo",icon:L0,onClick:()=>document.execCommand("redo")};function R0(t,n){const[e,r]=f.useState(!1),o=f.useCallback((a,l)=>{r(!1);const g=a.cloneRange(),m=window.getSelection();if((m?.rangeCount??0)>0&&m?.removeAllRanges(),m?.addRange(g),!g?.toString()&&l?.text&&m){const h=document.createTextNode(l.text),{anchorNode:p}=m;if(p instanceof HTMLElement){const C=p.lastElementChild;C&&C.tagName==="BR"?p.insertBefore(h,C):p.appendChild(h)}else if(p){const C=g.cloneRange();C.selectNodeContents(p),C.setEnd(g.endContainer,g.endOffset);const _=C.toString().length;p.parentElement?.insertBefore(h,p.splitText(_))}g.setStart(h,0),g.setEnd(h,l.text.length)}if(l){const h=g?.startContainer?.parentElement;h&&h.tagName==="A"?(h.setAttribute("href",l.link),h.textContent=l.text,window.getSelection()?.getRangeAt(0)?.selectNodeContents(h)):document.execCommand("createLink",void 0,l.link)}},[]),s=f.useMemo(()=>({key:"link",icon:w0,onClick:()=>{const a=window.getSelection(),l=(a?.rangeCount??0)>0?a?.getRangeAt(0).commonAncestorContainer:null;n.current&&l&&n.current.contains(l)&&r(!0)},activeTest:a=>a.tagName==="A"}),[]),i=f.useMemo(()=>({key:"unlink",icon:k0,onClick:()=>{const a=t(s.activeTest);a&&(window.getSelection()?.getRangeAt(0).selectNodeContents(a),document.execCommand("unlink"))}}),[t]);return{toolbarButtons:[y0,N0,"vr",T0,S0,M0,b0,"vr",s,i,"vr",I0,O0],showLinkModal:e,handleLinkModalClose:o}}function R({className:t,md:n,html:e,disabled:r,onChange:o,...s}){const i=w.useChildTestIdAttrBuilder(s),{aggValue:c,editableDivInnerHtml:a,updateStateFromDiv:l}=a0(n,e);d.useEffect(()=>{o&&c&&o(c)},[c]);const g=u0(l);d.useEffect(()=>{a&&g.current&&(g.current.innerHTML=a.html)},[a]);const{selectionRange:m,selectionDOMContextFind:h}=f0(g),{toolbarButtons:p,showLinkModal:C,handleLinkModalClose:_}=R0(h,g),{height:A,minHeight:B}=s.style??{},y={};return A?y.height=`
1
+ (function(f,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("@sps-woodland/core"),require("react"),require("@spscommerce/ds-react"),require("@sps-woodland/core/button"),require("@spscommerce/i18n"),require("@sps-woodland/tokens"),require("remark-parse"),require("remark-rehype"),require("rehype-sanitize"),require("rehype-stringify"),require("unified"),require("unist-util-visit"),require("rehype-parse"),require("rehype-remark"),require("remark-stringify")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core","react","@spscommerce/ds-react","@sps-woodland/core/button","@spscommerce/i18n","@sps-woodland/tokens","remark-parse","remark-rehype","rehype-sanitize","rehype-stringify","unified","unist-util-visit","rehype-parse","rehype-remark","remark-stringify"],w):(f=typeof globalThis<"u"?globalThis:f||self,w(f.RichTextEditor={},f.spsWoodlandCore,f.react,f.spscommerceDsReact,f.spsWoodlandCoreButton,f.spscommerceI18n,f.spsWoodlandTokens,f.remarkParse,f.remarkRehype,f.rehypeSanitize,f.rehypeStringify,f.unified,f.unistUtilVisit,f.rehypeParse,f.rehypeRemark,f.remarkStringify))})(this,(function(f,w,u,v,D,U,x,P,V,H,F,T,q,$,j,Z){"use strict";function G(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const d=G(u);function z({onClose:t,selectionDOMContextFind:n,selectionRange:e}){const{t:r}=U.useWoodlandLanguage(),o=d.useRef(e),s=d.useRef(!1),{formValue:i,formMeta:c,updateForm:a}=v.useSpsForm({text:e?.toString()||"",link:""});return d.useEffect(()=>{if(!s.current){const l=n(m=>m.tagName==="A");l&&(a({text:l.textContent||"",link:l.getAttribute("href")||""}),s.current=!0)}},[n]),d.createElement(v.SpsModal,{title:"Add Link",onClose:()=>t(o.current)},d.createElement("div",{className:"sg-row"},d.createElement("div",{className:"sg-col-12"},d.createElement(v.SpsLabel,{for:c.fields.text},r("richTextEditor.linkModal.text",{defaultValue:"Text"})),d.createElement(v.SpsTextInput,{formMeta:c.fields.text,value:i.text}))),d.createElement("div",{className:"sg-row"},d.createElement("div",{className:"sg-col-12"},d.createElement(v.SpsLabel,{for:c.fields.link},r("richTextEditor.linkModal.link",{defaultValue:"Link"})),d.createElement(v.SpsTextInput,{formMeta:c.fields.link,value:i.link}))),d.createElement(v.SpsModalFooter,null,d.createElement(D.Button,{onClick:()=>t(o.current,i)},r("richTextEditor.linkModal.ok",{defaultValue:"OK"}))))}function K(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function S(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,r)}return e}function M(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?S(Object(e),!0).forEach(function(r){K(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):S(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}var W=(t,n,e)=>{for(var r of Object.keys(t)){var o;if(t[r]!==((o=n[r])!==null&&o!==void 0?o:e[r]))return!1}return!0},E=t=>n=>{var e=t.defaultClassName,r=M(M({},t.defaultVariants),n);for(var o in r){var s,i=(s=r[o])!==null&&s!==void 0?s:t.defaultVariants[o];if(i!=null){var c=i;typeof c=="boolean"&&(c=c===!0?"true":"false");var a=t.variantClassNames[o][c];a&&(e+=" "+a)}}for(var[l,m]of t.compoundVariants)W(l,r,t.defaultVariants)&&(e+=" "+m);return e},J=E({defaultClassName:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n0",variantClassNames:{active:{true:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n1",false:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n2"}},defaultVariants:{},compoundVariants:[]}),Q={icon:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n3"};function X({icon:t,onClick:n,selectionDOMContextFind:e,activeTest:r,isSimpleToggle:o=!1,...s}){const[i,c]=d.useState(!1);d.useEffect(()=>{r&&c(!!e(r))},[e]);const a=d.useCallback(()=>{n&&n(i),o&&c(!i)},[n,i]);return d.createElement("button",{className:J({active:i}),onClick:a,onMouseDown:l=>l.preventDefault(),...s},d.createElement("span",{className:Q.icon,style:{backgroundImage:`url("${t}")`},"aria-hidden":"true"}))}var Y=E({defaultClassName:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss0",variantClassNames:{disabled:{true:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss1",false:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss2"}},defaultVariants:{disabled:!1},compoundVariants:[]}),e0=E({defaultClassName:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss3",variantClassNames:{disabled:{true:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss4",false:"pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss5"}},defaultVariants:{},compoundVariants:[]}),t0="pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss6",n0="pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss7";function r0(){return t=>(q.visit(t,"listItem",n=>{const e=Array.from(n.children);if(e.length>0&&e[0].type==="paragraph"){const r=e[0],s=Array.from(r.children).concat(e.slice(1));n.children=s}}),t)}function o0(){const t=u.useMemo(()=>T.unified().use(P).use(r0).use(V).use(H).use(F),[]);return u.useMemo(()=>function(e){return t.process(e).then(String)},[t])}const b=new Set(["strong","emphasis","delete","link","linkReference"]),i0=new Set([...b,"paragraph"]);function I(t){return"children"in t}function s0(){return t=>{function n(e){for(const r of e.children)I(r)&&n(r);if(e.children=e.children.filter(r=>!(i0.has(r.type)&&I(r)&&r.children.length===0)),b.has(e.type))for(;e.children.at(-1)?.type==="break";)e.children.pop()}return n(t),t}}function c0(){const t=u.useMemo(()=>T.unified().use($).use(j).use(s0).use(Z),[]);return u.useMemo(()=>function(e){return t.process(e).then(String)},[t])}function a0(t="",n=""){const[e,r]=u.useState(),[o,s]=u.useState({html:n}),i=c0(),c=o0(),a=u.useCallback(async g=>{const h=await c(g),p={md:g,html:h};return r(p),p},[c]),l=u.useCallback(async g=>{const p={md:await i(g),html:g};return r(p),p},[i]);u.useEffect(()=>{!n&&t!==e?.md?a(t).then(({html:g})=>{s({html:g})}):!t&&n&&n!==e?.html&&l(n)},[t,n]);function m(g){g.current&&l(g.current.innerHTML)}return{aggValue:e,editableDivInnerHtml:o,updateStateFromDiv:m}}function l0(t){if(t instanceof HTMLElement){for(const n of Array.from(t.attributes))/(style|class|data-[^=]+)/.test(n.name)&&t.removeAttribute(n.name);t.innerHTML=t.innerHTML.replace(/(style|class|data-[^=]+)="[^"]+"/g,"")}}const d0=[{regex:/\*\*([^*]+)\*\*/,command:"bold"},{regex:new RegExp("(?<!\\*)\\*([^*]+)\\*"),command:"italic"},{regex:/^\*[ \u00a0]/,command:"insertUnorderedList"},{regex:/^1\.[ \u00a0]/,command:"insertOrderedList"},{regex:/\[([^\]]+)\]\(([^)]+)\)/,command:"createLink",getCommandArg:([,,t])=>/^https?:\/\//.test(t)?t:`https://${t}`}];function m0(t,n,e){const r=document.createRange();r.setStart(t,n),r.setEnd(t,e);const o=window.getSelection();o?.removeAllRanges(),o?.addRange(r)}function _(t){const n=document.createRange();n.setStartAfter(t),n.setEndAfter(t);const e=window.getSelection();e?.removeAllRanges(),e?.addRange(n)}function g0(t){const n=document.createRange();n.setStartBefore(t),n.setEndBefore(t);const e=window.getSelection();e?.removeAllRanges(),e?.addRange(n)}function f0(t){const n=u.useRef(null),e=u.useMemo(()=>new MutationObserver(([r])=>{if(r.type==="characterData"&&r.oldValue&&r.target.textContent){for(const o of d0)if(!o.regex.test(r.oldValue)&&o.regex.test(r.target.textContent)){const s=o.regex.exec(r.target.textContent),[i,c=""]=s,a=r.target.textContent.indexOf(i);r.target.textContent=r.target.textContent.replace(i,c);const l=a+c.length;m0(r.target,a,l);const m=o.getCommandArg?o.getCommandArg(s):void 0;document.execCommand(o.command,void 0,m),c&&(_(r.target.parentNode),document.execCommand(o.command))}}else r.type==="childList"&&Array.from(r.addedNodes).forEach(o=>{let s;if(o instanceof HTMLElement&&o.tagName==="LI"?s=o:o?.parentElement?.tagName==="LI"&&(s=o?.parentElement),s){const i=s.nextElementSibling,c=i?.childNodes?.[0];if(c instanceof HTMLElement&&["UL","OL"].includes(c.tagName)){const l=document.createElement("br");i.insertBefore(l,c),g0(l)}}l0(o)});t(n)}),[]);return u.useEffect(()=>()=>{e&&e.disconnect()},[]),u.useEffect(()=>{n.current!==null&&e.observe(n.current,{childList:!0,subtree:!0,characterDataOldValue:!0})},[e,n]),n}function u0(t){const[n,e]=u.useState();u.useEffect(()=>{function o(){const s=window.getSelection();Number(s?.rangeCount)>0&&e(s?.getRangeAt(0))}return document.addEventListener("selectionchange",o),()=>{document.removeEventListener("selectionchange",o)}},[]);const r=u.useCallback(o=>{if(!n)return null;const s=n.commonAncestorContainer;if(!t.current||!t.current.contains(s))return null;let i=s instanceof HTMLElement?s:s.parentElement;for(;i&&i!==t.current;){if(o(i))return i;i=i.parentElement}return null},[n]);return{selectionRange:n,selectionDOMContextFind:r}}const h0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='10px'%20height='12px'%20viewBox='0%200%2010%2012'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eBold%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-53.000000,%20-103.000000)'%20fill='%234B5356'%20fill-rule='nonzero'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%202.000000)'%20id='B'%3e%3cg%20transform='translate(3.550000,%202.130000)'%3e%3cpath%20d='M0,0%20L4.014,0%20C4.626,0%205.193,0.045%205.715,0.135%20C6.237,0.225%206.693,0.384%207.083,0.612%20C7.473,0.84%207.779,1.14%208.001,1.512%20C8.223,1.884%208.334,2.352%208.334,2.916%20C8.334,3.18%208.295,3.444%208.217,3.708%20C8.139,3.972%208.022,4.218%207.866,4.446%20C7.71,4.674%207.506,4.878%207.254,5.058%20C7.002,5.238%206.708,5.37%206.372,5.454%20L6.372,5.526%20C7.212,5.682%207.845,5.982%208.271,6.426%20C8.697,6.87%208.91,7.488%208.91,8.28%20C8.91,8.88%208.793,9.396%208.559,9.828%20C8.325,10.26%208.001,10.617%207.587,10.899%20C7.173,11.181%206.69,11.391%206.138,11.529%20C5.586,11.667%204.992,11.736%204.356,11.736%20L0,11.736%20L0,0%20Z%20M3.888,4.734%20C4.536,4.734%205.007,4.605%205.301,4.347%20C5.595,4.089%205.742,3.738%205.742,3.294%20C5.742,2.85%205.592,2.532%205.292,2.34%20C4.992,2.148%204.53,2.052%203.906,2.052%20L2.646,2.052%20L2.646,4.734%20L3.888,4.734%20Z%20M4.14,9.684%20C5.592,9.684%206.318,9.15%206.318,8.082%20C6.318,7.566%206.138,7.191%205.778,6.957%20C5.418,6.723%204.872,6.606%204.14,6.606%20L2.646,6.606%20L2.646,9.684%20L4.14,9.684%20Z'%20id='Shape'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",p0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='14px'%20viewBox='0%200%2016%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIndent%20short%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-50.000000,%20-282.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%20182.000000)'%3e%3crect%20id='Rectangle-223'%20x='0'%20y='1.6'%20width='16'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='0'%20y='12.4'%20width='16'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='7'%20y='8.8'%20width='9'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='7'%20y='5.2'%20width='9'%20height='2'%3e%3c/rect%3e%3cpath%20d='M5.20857552,7.99286089%20C5.20857552,8.06428955%205.18178977,8.14464678%205.12821828,8.19821828%20L2.27107201,11.0553645%20C2.21750052,11.108936%202.13714328,11.1357218%202.06571463,11.1357218%20C1.91392873,11.1357218%201.78,11.001793%201.78,10.85%20L1.78,5.13571463%20C1.78,4.97500015%201.90500015,4.85%202.06571463,4.85%20C2.14607186,4.85%202.21750052,4.88571433%202.28,4.93928582%20L5.12821828,7.7875035%20C5.18178977,7.84107499%205.20857552,7.92143223%205.20857552,7.99286089%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",C0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='10px'%20height='12px'%20viewBox='0%200%2010%2012'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eItalics%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-53.000000,%20-148.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%2047.000000)'%3e%3cg%20id='I'%20transform='translate(5.600000,%202.130000)'%20fill-rule='nonzero'%3e%3cpolygon%20id='Path'%20points='2.358%200%204.824%200%202.484%2011.736%200%2011.736'%3e%3c/polygon%3e%3c/g%3e%3crect%20id='Rectangle'%20x='5.5'%20y='2'%20width='7'%20height='1.5'%3e%3c/rect%3e%3crect%20id='Rectangle-Copy'%20x='3.5'%20y='12.5'%20width='7'%20height='1.5'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",w0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='14px'%20height='14px'%20viewBox='0%200%2014%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/icon-ellipses%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---Schematics'%20transform='translate(-401.000000,%20-200.000000)'%20fill='%234B5356'%3e%3cg%20id='Group-5'%20transform='translate(146.000000,%20167.000000)'%3e%3cg%20id='Icon/icon-link'%20transform='translate(254.000000,%2032.000000)'%3e%3cpath%20d='M9.28515625,6.03125%20C9.33984402,6.06770852%209.39908822,6.11328098%209.46289062,6.16796875%20C9.52669303,6.22265652%209.58593723,6.26822898%209.640625,6.3046875%20L9.6953125,6.359375%20C10.3333365,7.01562828%2010.6523438,7.79947461%2010.6523438,8.7109375%20C10.6523438,9.62240039%2010.3333365,10.4062467%209.6953125,11.0625%20L6.6875,14.0429688%20C6.04947598,14.6809928%205.27474414,15%204.36328125,15%20C3.45181836,15%202.66797203,14.6809928%202.01171875,14.0429688%20L1.95703125,13.9882812%20C1.31900723,13.332028%201,12.5481816%201,11.6367188%20C1,10.7252559%201.31900723,9.95052402%201.95703125,9.3125%20L4.0625,7.20703125%20C4.04427074,7.51692863%204.06249973,7.82682137%204.1171875,8.13671875%20C4.17187527,8.44661613%204.2630202,8.73827988%204.390625,9.01171875%20L3.05078125,10.3789062%20C2.68619609,10.7252621%202.50390625,11.1445288%202.50390625,11.6367188%20C2.50390625,12.1289087%202.68619609,12.5481754%203.05078125,12.8945312%20L3.10546875,12.9492188%20C3.45182465,13.3138039%203.87109129,13.4960938%204.36328125,13.4960938%20C4.85547121,13.4960938%205.27473785,13.3138039%205.62109375,12.9492188%20L8.6015625,9.96875%20C8.9479184,9.6223941%209.12109375,9.20312746%209.12109375,8.7109375%20C9.12109375,8.21874754%208.9479184,7.7994809%208.6015625,7.453125%20L8.546875,7.3984375%20C8.49218723,7.34374973%208.43750027,7.29362002%208.3828125,7.24804688%20C8.32812473,7.20247373%208.26432328,7.16145852%208.19140625,7.125%20L9.28515625,6.03125%20Z%20M11.6367188,1%20C12.5481816,1%2013.332028,1.31900723%2013.9882812,1.95703125%20L14.0429688,2.01171875%20C14.6809928,2.66797203%2015,3.45181836%2015,4.36328125%20C15,5.27474414%2014.6809928,6.04947598%2014.0429688,6.6875%20L11.9375,8.79296875%20C11.9557293,8.48307137%2011.9375003,8.17317863%2011.8828125,7.86328125%20C11.8281247,7.55338387%2011.7369798,7.26172012%2011.609375,6.98828125%20L12.9492188,5.62109375%20C13.3138039,5.27473785%2013.4960938,4.85547121%2013.4960938,4.36328125%20C13.4960938,3.87109129%2013.3138039,3.45182465%2012.9492188,3.10546875%20L12.8945312,3.05078125%20C12.5481754,2.68619609%2012.1289087,2.50390625%2011.6367188,2.50390625%20C11.1445288,2.50390625%2010.7252621,2.68619609%2010.3789062,3.05078125%20L7.3984375,6.03125%20C7.0520816,6.3776059%206.87890625,6.79687254%206.87890625,7.2890625%20C6.87890625,7.78125246%207.0520816,8.2005191%207.3984375,8.546875%20L7.453125,8.6015625%20C7.50781277,8.65625027%207.56249973,8.70637998%207.6171875,8.75195312%20C7.67187527,8.79752627%207.73567672,8.83854148%207.80859375,8.875%20L6.71484375,9.96875%20C6.66015598,9.93229148%206.60091178,9.88671902%206.53710938,9.83203125%20C6.47330697,9.77734348%206.41406277,9.73177102%206.359375,9.6953125%20L6.3046875,9.640625%20C5.66666348,8.98437172%205.34765625,8.20052539%205.34765625,7.2890625%20C5.34765625,6.37759961%205.66666348,5.59375328%206.3046875,4.9375%20L9.3125,1.95703125%20C9.95052402,1.31900723%2010.7252559,1%2011.6367188,1%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",v0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='15px'%20height='14px'%20viewBox='0%200%2015%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eOrdered%20list%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-51.000000,%20-192.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%2092.000000)'%3e%3crect%20id='Rectangle-223-Copy-3'%20x='5'%20y='2.5'%20width='11'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223-Copy-2'%20x='5'%20y='7'%20width='11'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223-Copy'%20x='5'%20y='11.5'%20width='11'%20height='2'%3e%3c/rect%3e%3cg%20id='1'%20transform='translate(1.500000,%201.900000)'%20fill-rule='nonzero'%3e%3cpath%20d='M0,2.58%20L0.69,2.58%20L0.69,0.745%20L0.095,0.745%20L0.095,0.29%20C0.268333333,0.256666667%200.415,0.216666667%200.535,0.17%20C0.655,0.123333333%200.771666667,0.0666666667%200.885,0%20L1.425,0%20L1.425,2.58%20L2.02,2.58%20L2.02,3.175%20L0,3.175%20L0,2.58%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3cg%20id='2'%20transform='translate(1.355000,%206.400000)'%20fill-rule='nonzero'%3e%3cpath%20d='M0.035,2.815%20C0.238333333,2.625%200.424166667,2.4475%200.5925,2.2825%20C0.760833333,2.1175%200.905833333,1.9625%201.0275,1.8175%20C1.14916667,1.6725%201.24416667,1.5375%201.3125,1.4125%20C1.38083333,1.2875%201.415,1.16833333%201.415,1.055%20C1.415,0.898333333%201.375,0.779166667%201.295,0.6975%20C1.215,0.615833333%201.105,0.575%200.965,0.575%20C0.848333333,0.575%200.745,0.6075%200.655,0.6725%20C0.565,0.7375%200.48,0.813333333%200.4,0.9%20L0,0.505%20C0.156666667,0.338333333%200.316666667,0.2125%200.48,0.1275%20C0.643333333,0.0425%200.838333333,0%201.065,0%20C1.22166667,0%201.36416667,0.0241666667%201.4925,0.0725%20C1.62083333,0.120833333%201.73166667,0.189166667%201.825,0.2775%20C1.91833333,0.365833333%201.99,0.471666667%202.04,0.595%20C2.09,0.718333333%202.115,0.856666667%202.115,1.01%20C2.115,1.14333333%202.08666667,1.27916667%202.03,1.4175%20C1.97333333,1.55583333%201.8975,1.69416667%201.8025,1.8325%20C1.7075,1.97083333%201.59916667,2.10916667%201.4775,2.2475%20C1.35583333,2.38583333%201.23,2.52166667%201.1,2.655%20C1.18,2.645%201.26916667,2.63583333%201.3675,2.6275%20C1.46583333,2.61916667%201.55333333,2.615%201.63,2.615%20L2.27,2.615%20L2.27,3.235%20L0.035,3.235%20L0.035,2.815%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3cg%20id='3'%20transform='translate(1.350000,%2010.800000)'%20fill-rule='nonzero'%3e%3cpath%20d='M0.34,2.38%20C0.436666667,2.47333333%200.5425,2.55%200.6575,2.61%20C0.7725,2.67%200.898333333,2.7%201.035,2.7%20C1.19166667,2.7%201.31666667,2.6675%201.41,2.6025%20C1.50333333,2.5375%201.55,2.445%201.55,2.325%20C1.55,2.255%201.5375,2.19166667%201.5125,2.135%20C1.4875,2.07833333%201.44333333,2.03083333%201.38,1.9925%20C1.31666667,1.95416667%201.23,1.92416667%201.12,1.9025%20C1.01,1.88083333%200.868333333,1.87%200.695,1.87%20L0.695,1.35%20C0.838333333,1.35%200.9575,1.34%201.0525,1.32%20C1.1475,1.3%201.22416667,1.27083333%201.2825,1.2325%20C1.34083333,1.19416667%201.3825,1.14916667%201.4075,1.0975%20C1.4325,1.04583333%201.445,0.988333333%201.445,0.925%20C1.445,0.815%201.41166667,0.729166667%201.345,0.6675%20C1.27833333,0.605833333%201.18166667,0.575%201.055,0.575%20C0.941666667,0.575%200.839166667,0.6%200.7475,0.65%20C0.655833333,0.7%200.56,0.768333333%200.46,0.855%20L0.09,0.405%20C0.236666667,0.278333333%200.390833333,0.179166667%200.5525,0.1075%20C0.714166667,0.0358333333%200.893333333,0%201.09,0%20C1.25333333,0%201.4025,0.0191666667%201.5375,0.0575%20C1.6725,0.0958333333%201.7875,0.1525%201.8825,0.2275%20C1.9775,0.3025%202.05166667,0.393333333%202.105,0.5%20C2.15833333,0.606666667%202.185,0.73%202.185,0.87%20C2.185,1.03666667%202.13916667,1.1775%202.0475,1.2925%20C1.95583333,1.4075%201.825,1.50166667%201.655,1.575%20L1.655,1.595%20C1.83833333,1.64833333%201.98916667,1.73916667%202.1075,1.8675%20C2.22583333,1.99583333%202.285,2.16333333%202.285,2.37%20C2.285,2.51666667%202.25333333,2.6475%202.19,2.7625%20C2.12666667,2.8775%202.04166667,2.97416667%201.935,3.0525%20C1.82833333,3.13083333%201.70333333,3.19083333%201.56,3.2325%20C1.41666667,3.27416667%201.265,3.295%201.105,3.295%20C0.845,3.295%200.625,3.25416667%200.445,3.1725%20C0.265,3.09083333%200.116666667,2.98166667%200,2.845%20L0.34,2.38%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",x0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='14px'%20viewBox='0%200%2016%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eOutdent%20short%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-50.000000,%20-327.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%20227.000000)'%3e%3crect%20id='Rectangle-223'%20x='0'%20y='1.6'%20width='16'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='0'%20y='12.4'%20width='16'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='7'%20y='8.8'%20width='9'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='7'%20y='5.2'%20width='9'%20height='2'%3e%3c/rect%3e%3cpath%20d='M5.21357552,10.85%20C5.21357552,11.001793%205.08857537,11.1357218%204.92786089,11.1357218%20C4.84750365,11.1357218%204.77607499,11.1000075%204.71357492,11.046436%20L1.86535724,8.1892897%20C1.81178575,8.1357182%201.785,8.06428955%201.785,7.99286089%20C1.785,7.91250365%201.81178575,7.84107499%201.86535724,7.7875035%20L4.7225035,4.93035724%20C4.77607499,4.87678575%204.85643223,4.85%204.92786089,4.85%20C5.07964678,4.85%205.21357552,4.97500015%205.21357552,5.13571463%20L5.21357552,10.85%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",L0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='14px'%20height='14px'%20viewBox='0%200%2014%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/icon-ellipses%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---Schematics'%20transform='translate(-520.000000,%20-200.000000)'%20fill='%234B5356'%3e%3cg%20id='Group-5'%20transform='translate(146.000000,%20167.000000)'%3e%3cg%20id='Button/2.-Icon/6.-Default-Copy-8'%20transform='translate(363.000000,%2025.000000)'%3e%3cg%20id='Icon/icon-undo'%20transform='translate(10.000000,%207.000000)'%3e%3cpath%20d='M15,2.16666667%20C15,1.9296875%2014.8541667,1.72005208%2014.6445312,1.62890625%20C14.4257812,1.53776042%2014.1705729,1.58333333%2014.0065104,1.75651042%20L12.8216146,2.93229167%20C11.5364583,1.72005208%209.79557292,1%208,1%20C4.14453125,1%201,4.14453125%201,8%20C1,11.8554688%204.14453125,15%208,15%20C10.0872396,15%2012.0559896,14.0794271%2013.3867188,12.4752604%20C13.4778646,12.3567708%2013.4778646,12.1835938%2013.3684896,12.0833333%20L12.1197917,10.8255208%20C12.0559896,10.7708333%2011.9739583,10.7434896%2011.8919271,10.7434896%20C11.8098958,10.7526042%2011.7278646,10.7890625%2011.6822917,10.8528646%20C10.7890625,12.0104167%209.44921875,12.6666667%208,12.6666667%20C5.4296875,12.6666667%203.33333333,10.5703125%203.33333333,8%20C3.33333333,5.4296875%205.4296875,3.33333333%208,3.33333333%20C9.19401042,3.33333333%2010.3242188,3.7890625%2011.1809896,4.58203125%20L9.92317708,5.83984375%20C9.75,6.00390625%209.70442708,6.25911458%209.79557292,6.46875%20C9.88671875,6.6875%2010.0963542,6.83333333%2010.3333333,6.83333333%20L14.4166667,6.83333333%20C14.7356771,6.83333333%2015,6.56901042%2015,6.25%20L15,2.16666667%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",E0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='14px'%20height='14px'%20viewBox='0%200%2014%2014'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/icon-ellipses%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---Schematics'%20transform='translate(-484.000000,%20-200.000000)'%20fill='%234B5356'%3e%3cg%20id='Group-5'%20transform='translate(146.000000,%20167.000000)'%3e%3cg%20id='Button/2.-Icon/6.-Default-Copy-9'%20transform='translate(345.000000,%2040.000000)%20scale(-1,%201)%20translate(-345.000000,%20-40.000000)%20translate(327.000000,%2025.000000)'%3e%3cg%20id='Icon/icon-undo'%20transform='translate(10.000000,%207.000000)'%3e%3cpath%20d='M15,2.16666667%20C15,1.9296875%2014.8541667,1.72005208%2014.6445312,1.62890625%20C14.4257812,1.53776042%2014.1705729,1.58333333%2014.0065104,1.75651042%20L12.8216146,2.93229167%20C11.5364583,1.72005208%209.79557292,1%208,1%20C4.14453125,1%201,4.14453125%201,8%20C1,11.8554688%204.14453125,15%208,15%20C10.0872396,15%2012.0559896,14.0794271%2013.3867188,12.4752604%20C13.4778646,12.3567708%2013.4778646,12.1835938%2013.3684896,12.0833333%20L12.1197917,10.8255208%20C12.0559896,10.7708333%2011.9739583,10.7434896%2011.8919271,10.7434896%20C11.8098958,10.7526042%2011.7278646,10.7890625%2011.6822917,10.8528646%20C10.7890625,12.0104167%209.44921875,12.6666667%208,12.6666667%20C5.4296875,12.6666667%203.33333333,10.5703125%203.33333333,8%20C3.33333333,5.4296875%205.4296875,3.33333333%208,3.33333333%20C9.19401042,3.33333333%2010.3242188,3.7890625%2011.1809896,4.58203125%20L9.92317708,5.83984375%20C9.75,6.00390625%209.70442708,6.25911458%209.79557292,6.46875%20C9.88671875,6.6875%2010.0963542,6.83333333%2010.3333333,6.83333333%20L14.4166667,6.83333333%20C14.7356771,6.83333333%2015,6.56901042%2015,6.25%20L15,2.16666667%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='14px'%20height='16px'%20viewBox='0%200%2014%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eUnlink%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-51.000000,%20-371.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%20272.000000)'%3e%3cpath%20d='M14.0429688,2.01171875%20C14.6809928,2.66797203%2015,3.45181836%2015,4.36328125%20C15,5.27474414%2014.6809928,6.04947598%2014.0429688,6.6875%20L11.1027446,9.58420181%20L10.3518996,8.27890801%20L12.9492188,5.62109375%20C13.3138039,5.27473785%2013.4960938,4.85547121%2013.4960938,4.36328125%20C13.4960938,3.87109129%2013.3138039,3.45182465%2012.9492188,3.10546875%20L12.8945313,3.05078125%20C12.5481754,2.68619609%2012.1289087,2.50390625%2011.6367188,2.50390625%20C11.1445288,2.50390625%2010.7252621,2.68619609%2010.3789063,3.05078125%20L8.41457939,4.92175579%20L7.64047964,3.57621944%20L9.3125,1.95703125%20C9.95052402,1.31900723%2010.7252559,1%2011.6367188,1%20C12.5481816,1%2013.332028,1.31900723%2013.9882813,1.95703125%20L14.0429688,2.01171875%20Z'%20id='Path'%3e%3c/path%3e%3cpath%20d='M8.02641916,12.7072184%20L6.6875,14.0429687%20C6.04947598,14.6809928%205.27474414,15%204.36328125,15%20C3.45181836,15%202.66797203,14.6809928%202.01171875,14.0429687%20L1.95703125,13.9882812%20C1.31900723,13.332028%201,12.5481816%201,11.6367187%20C1,10.7252559%201.31900723,9.95052402%201.95703125,9.3125%20L4.57246065,6.71787083%20L5.34566408,8.05009655%20L3.05078125,10.3789062%20C2.68619609,10.7252621%202.50390625,11.1445288%202.50390625,11.6367187%20C2.50390625,12.1289087%202.68619609,12.5481754%203.05078125,12.8945312%20L3.10546875,12.9492187%20C3.45182465,13.3138039%203.87109129,13.4960937%204.36328125,13.4960937%20C4.85547121,13.4960937%205.27473785,13.3138039%205.62109375,12.9492187%20L7.2646265,11.388324%20L8.02641916,12.7072184%20Z'%20id='Path'%3e%3c/path%3e%3crect%20id='Rectangle'%20transform='translate(7.750000,%208.000000)%20rotate(-30.000000)%20translate(-7.750000,%20-8.000000)%20'%20x='7'%20y='0'%20width='1.5'%20height='16'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",k0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='15px'%20height='12px'%20viewBox='0%200%2015%2012'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eUnordered%20list%3c/title%3e%3cg%20id='Components'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Markdown-Editor---New-icons'%20transform='translate(-51.000000,%20-238.000000)'%20fill='%234B5356'%3e%3cg%20id='Group'%20transform='translate(50.000000,%2099.000000)'%3e%3cg%20transform='translate(0.000000,%20137.000000)'%3e%3cg%20transform='translate(1.000000,%202.000000)'%3e%3crect%20id='Rectangle-223'%20x='4'%20y='0.5'%20width='11'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='4'%20y='5'%20width='11'%20height='2'%3e%3c/rect%3e%3crect%20id='Rectangle-223'%20x='4'%20y='9.5'%20width='11'%20height='2'%3e%3c/rect%3e%3ccircle%20id='Oval'%20cx='1.5'%20cy='1.5'%20r='1.5'%3e%3c/circle%3e%3ccircle%20id='Oval-Copy'%20cx='1.5'%20cy='6'%20r='1.5'%3e%3c/circle%3e%3ccircle%20id='Oval-Copy-2'%20cx='1.5'%20cy='10.5'%20r='1.5'%3e%3c/circle%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",L=(t,n)=>{let e=t;for(;e.parentElement&&!n.includes(e.parentElement.tagName);)e=e.parentElement;return e.parentElement&&n.includes(e.parentElement.tagName)?e.parentElement:null},O=t=>{const n=[];let e=t;for(;e.nextElementSibling;)n.push(e.nextElementSibling),e=e.nextElementSibling;return n},y0={key:"bold",icon:h0,onClick:()=>document.execCommand("bold"),activeTest:t=>["B","STRONG"].includes(t.tagName),isSimpleToggle:!0},N0={key:"italics",icon:C0,onClick:()=>document.execCommand("italic"),activeTest:t=>["I","EM"].includes(t.tagName),isSimpleToggle:!0},T0={key:"ul",icon:k0,onClick:()=>document.execCommand("insertUnorderedList"),activeTest:t=>t.tagName==="UL"},S0={key:"ol",icon:v0,onClick:()=>document.execCommand("insertOrderedList"),activeTest:t=>t.tagName==="OL"},M0={key:"indent",icon:p0,onClick:()=>{try{const t=window.getSelection();if(t?.type==="Range"){const n=t.getRangeAt(0),e=n.commonAncestorContainer;if(!(e instanceof HTMLElement)||(e.tagName==="UL"||e.tagName==="OL"||e.tagName==="LI")&&e.firstElementChild&&n.intersectsNode(e.firstElementChild))return;const r=[];let o;if(e.childNodes.forEach(s=>{n.intersectsNode(s)&&s instanceof HTMLElement&&s.tagName==="LI"&&(r.length===0&&(o=s.previousSibling),r.push(s))}),o instanceof HTMLElement&&o.tagName==="LI"){r.forEach(i=>i.remove());const s=o.parentElement?.tagName.toLowerCase();if(s){const i=document.createElement(s);r.forEach(c=>i.appendChild(c)),o.appendChild(i)}return}}else if(t){const{anchorNode:n}=t;let e;if(n instanceof HTMLElement&&n.tagName==="LI"?e=n:n&&(e=L(n,["LI"])),e){const r=e.previousElementSibling,o=e.parentElement.tagName.toLowerCase();if(r&&r.tagName==="LI"){e.remove();const s=r.querySelector(o);if(s)s.appendChild(e);else{const i=document.createElement(o);i.appendChild(e),r.appendChild(i)}n&&_(n.childNodes?.[0]||n)}return}}}catch{}document.execCommand("indent")}},b0={key:"outdent",icon:x0,onClick:()=>{try{const t=window.getSelection();if(t?.type==="Range"){const n=t.getRangeAt(0),e=n.commonAncestorContainer;if(!(e instanceof HTMLElement))return;const r=[];let o;if(e.tagName==="UL"||e.tagName==="OL"?o=e:e.tagName==="LI"&&(o=e.parentElement),o){o.childNodes.forEach(i=>{n.intersectsNode(i)&&i instanceof HTMLElement&&i.tagName==="LI"&&r.push(i)});const s=o.parentElement;s?.tagName==="LI"&&(r.forEach((i,c)=>{if(c===r.length-1){const a=O(i);if(a.length>0){const l=o.tagName.toLowerCase(),m=i.querySelector(l);if(m)for(const g of a)g.remove(),m.appendChild(g);else{const g=document.createElement(l);i.appendChild(g);for(const h of a)h.remove(),g.appendChild(h)}}}i.remove()}),o.childElementCount===0&&o.remove(),r.reverse().forEach(i=>s.after(i)));return}}else if(t){const{anchorNode:n}=t;let e=null,r=null;n instanceof HTMLElement&&(n.tagName==="UL"||n.tagName==="OL")?(e=n,r=n.querySelector("li")):n&&(e=L(n,["UL","OL"]),r=n instanceof HTMLElement&&n.tagName==="LI"?n:L(n,["LI"]));const o=e?L(e,["UL","OL"]):null;if(e&&o){const s=L(e,["LI"]);if(e.childElementCount===1&&e.remove(),r){const i=O(r);if(i.length>0){const c=document.createElement(e.tagName.toLowerCase());r.appendChild(c);for(const a of i)a.remove(),c.appendChild(a)}s?.after(r),r.lastChild&&_(r.lastChild)}return}}}catch{}document.execCommand("outdent")}},I0={key:"undo",icon:E0,onClick:()=>document.execCommand("undo")},O0={key:"redo",icon:L0,onClick:()=>document.execCommand("redo")};function R0(t,n){const[e,r]=u.useState(!1),o=u.useCallback((a,l)=>{r(!1);const m=a.cloneRange(),g=window.getSelection();if((g?.rangeCount??0)>0&&g?.removeAllRanges(),g?.addRange(m),!m?.toString()&&l?.text&&g){const h=document.createTextNode(l.text),{anchorNode:p}=g;if(p instanceof HTMLElement){const C=p.lastElementChild;C&&C.tagName==="BR"?p.insertBefore(h,C):p.appendChild(h)}else if(p){const C=m.cloneRange();C.selectNodeContents(p),C.setEnd(m.endContainer,m.endOffset);const k=C.toString().length;p.parentElement?.insertBefore(h,p.splitText(k))}m.setStart(h,0),m.setEnd(h,l.text.length)}if(l){const h=m?.startContainer?.parentElement;h&&h.tagName==="A"?(h.setAttribute("href",l.link),h.textContent=l.text,window.getSelection()?.getRangeAt(0)?.selectNodeContents(h)):document.execCommand("createLink",void 0,l.link)}},[]),s=u.useMemo(()=>({key:"link",icon:w0,onClick:()=>{const a=window.getSelection(),l=(a?.rangeCount??0)>0?a?.getRangeAt(0).commonAncestorContainer:null;n.current&&l&&n.current.contains(l)&&r(!0)},activeTest:a=>a.tagName==="A"}),[]),i=u.useMemo(()=>({key:"unlink",icon:_0,onClick:()=>{const a=t(s.activeTest);a&&(window.getSelection()?.getRangeAt(0).selectNodeContents(a),document.execCommand("unlink"))}}),[t]);return{toolbarButtons:[y0,N0,"vr",T0,S0,M0,b0,"vr",s,i,"vr",I0,O0],showLinkModal:e,handleLinkModalClose:o}}function R({className:t,md:n,html:e,disabled:r,onChange:o,...s}){const i=w.useChildTestIdAttrBuilder(s),{aggValue:c,editableDivInnerHtml:a,updateStateFromDiv:l}=a0(n,e);d.useEffect(()=>{o&&c&&o(c)},[c]);const m=f0(l);d.useEffect(()=>{a&&m.current&&(m.current.innerHTML=a.html)},[a]);const{selectionRange:g,selectionDOMContextFind:h}=u0(m),{toolbarButtons:p,showLinkModal:C,handleLinkModalClose:k}=R0(h,m),{height:A,minHeight:B}=s.style??{},y={};return A?y.height=`
2
2
  calc(
3
3
  ${A}
4
4
  - ${x.Tokens.component["rich-text-editor"].vr.height}
@@ -10,4 +10,4 @@
10
10
  - ${x.Tokens.component["rich-text-editor"].vr.height}
11
11
  - (2 * ${x.Tokens.component["rich-text-editor"].border.width})
12
12
  - (2 * ${x.Tokens.component["rich-text-editor"].padding.input.y})
13
- )`),d.createElement("div",{className:w.cl(Y({disabled:r}),t),...s},!r&&d.createElement(d.Fragment,null,d.createElement("div",{className:t0,...i("toolbar")},p.map((N,A0)=>N==="vr"?d.createElement("div",{className:n0,key:`vr-${A0}`}):d.createElement(X,{...N,selectionDOMContextFind:h,...i(`button-${N.key}`)}))),C&&d.createElement(z,{onClose:_,selectionDOMContextFind:h,selectionRange:m})),d.createElement("div",{className:e0({disabled:r}),ref:g,contentEditable:!r,...i("input"),style:y}))}w.Metadata.set(R,{name:"RichTextEditor",props:{md:"string",html:"string",disabled:{type:"boolean",default:"false"},onChange:"(newValue: RichTextEditorAggregateValue) => void"}}),u.RichTextEditor=R,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
13
+ )`),d.createElement("div",{className:w.cl(Y({disabled:r}),t),...s},!r&&d.createElement(d.Fragment,null,d.createElement("div",{className:t0,...i("toolbar")},p.map((N,A0)=>N==="vr"?d.createElement("div",{className:n0,key:`vr-${A0}`}):d.createElement(X,{...N,selectionDOMContextFind:h,...i(`button-${N.key}`)}))),C&&d.createElement(z,{onClose:k,selectionDOMContextFind:h,selectionRange:g})),d.createElement("div",{className:e0({disabled:r}),ref:m,contentEditable:!r,...i("input"),style:y}))}w.Metadata.set(R,{name:"RichTextEditor",props:{md:"string",html:"string",disabled:{type:"boolean",default:"false"},onChange:"(newValue: RichTextEditorAggregateValue) => void"}}),f.RichTextEditor=R,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}));
@@ -27,7 +27,7 @@ function p({
27
27
  "span",
28
28
  {
29
29
  className: m.icon,
30
- style: { backgroundImage: 'url("' + r + '")' },
30
+ style: { backgroundImage: `url("${r}")` },
31
31
  "aria-hidden": "true"
32
32
  }
33
33
  )
@@ -1,7 +1,7 @@
1
1
  /* empty css */
2
2
  import { createRuntimeFn as _ } from "../../node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.17.4/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js";
3
- var o = _({ defaultClassName: "pkg_sps-woodland_core__version_8_53_11__hash_1903a6n0", variantClassNames: { active: { true: "pkg_sps-woodland_core__version_8_53_11__hash_1903a6n1", false: "pkg_sps-woodland_core__version_8_53_11__hash_1903a6n2" } }, defaultVariants: {}, compoundVariants: [] }), e = { icon: "pkg_sps-woodland_core__version_8_53_11__hash_1903a6n3" };
3
+ var o = _({ defaultClassName: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n0", variantClassNames: { active: { true: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n1", false: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n2" } }, defaultVariants: {}, compoundVariants: [] }), r = { icon: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n3" };
4
4
  export {
5
5
  o as button,
6
- e as className
6
+ r as className
7
7
  };
@@ -1,9 +1,9 @@
1
1
  /* empty css */
2
2
  import { createRuntimeFn as _ } from "../../node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.17.4/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js";
3
- var o = _({ defaultClassName: "pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss0", variantClassNames: { disabled: { true: "pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss1", false: "pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss2" } }, defaultVariants: { disabled: !1 }, compoundVariants: [] }), e = _({ defaultClassName: "pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss3", variantClassNames: { disabled: { true: "pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss4", false: "pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss5" } }, defaultVariants: {}, compoundVariants: [] }), r = "pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss6", d = "pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss7";
3
+ var e = _({ defaultClassName: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss0", variantClassNames: { disabled: { true: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss1", false: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss2" } }, defaultVariants: { disabled: !1 }, compoundVariants: [] }), r = _({ defaultClassName: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss3", variantClassNames: { disabled: { true: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss4", false: "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss5" } }, defaultVariants: {}, compoundVariants: [] }), o = "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss6", i = "pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss7";
4
4
  export {
5
- o as richTextEditor,
6
- e as rteEditableDiv,
7
- r as rteToolbar,
8
- d as vr
5
+ e as richTextEditor,
6
+ r as rteEditableDiv,
7
+ o as rteToolbar,
8
+ i as vr
9
9
  };
@@ -1 +1 @@
1
- .pkg_sps-woodland_core__version_8_53_11__hash_1903a6n0{border-radius:.25rem;border-style:solid;border-width:.0625rem;padding:.25rem .5rem}.pkg_sps-woodland_core__version_8_53_11__hash_1903a6n0:hover{background-color:#d2d4d4;border-color:#d2d4d4}.pkg_sps-woodland_core__version_8_53_11__hash_1903a6n1{background-color:#e6f2f8;border-color:#007db8}.pkg_sps-woodland_core__version_8_53_11__hash_1903a6n2{background-color:#fff;border-color:#fff}.pkg_sps-woodland_core__version_8_53_11__hash_1903a6n3{background-position:center;background-repeat:no-repeat;display:block;height:1.125rem;width:.875rem}.pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss0{background-color:#fff;border-radius:.25rem;border-style:solid;border-width:.0625rem;font-size:.875rem;line-height:1.25rem}.pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss1{border-color:#d2d4d4}.pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss2{border-color:#717779}.pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss3{padding:.25rem .5rem;min-height:8rem;overflow:scroll}.pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss4{color:#717779}.pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss5{box-shadow:inset 0 .25rem #e9e9ea}.pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss6{align-items:center;border-color:#717779;border-style:solid;border-bottom-width:.0625rem;border-top-width:0;border-left-width:0;border-right-width:0;display:flex;padding:.25rem}.pkg_sps-woodland_core__version_8_53_11__hash_1f3v2ss7{background-color:#d2d4d4;margin-left:.25rem;margin-right:.25rem;height:1.75rem;width:.0625rem}
1
+ .pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n0{border-radius:.25rem;border-style:solid;border-width:.0625rem;padding:.25rem .5rem}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n0:hover{background-color:#d2d4d4;border-color:#d2d4d4}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n1{background-color:#e6f2f8;border-color:#007db8}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n2{background-color:#fff;border-color:#fff}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1903a6n3{background-position:center;background-repeat:no-repeat;display:block;height:1.125rem;width:.875rem}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss0{background-color:#fff;border-radius:.25rem;border-style:solid;border-width:.0625rem;font-size:.875rem;line-height:1.25rem}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss1{border-color:#d2d4d4}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss2{border-color:#717779}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss3{padding:.25rem .5rem;min-height:8rem;overflow:scroll}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss4{color:#717779}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss5{box-shadow:inset 0 .25rem #e9e9ea}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss6{align-items:center;border-color:#717779;border-style:solid;border-bottom-width:.0625rem;border-top-width:0;border-left-width:0;border-right-width:0;display:flex;padding:.25rem}.pkg_sps-woodland_core__family_rich-text-editor__version_8_53_13__hash_1f3v2ss7{background-color:#d2d4d4;margin-left:.25rem;margin-right:.25rem;height:1.75rem;width:.0625rem}
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- var o = "pkg_sps-woodland_core__version_8_53_11__hash_xsjxqv0";
2
+ var o = "pkg_sps-woodland_core__family_scrollable-container__version_8_53_13__hash_xsjxqv0";
3
3
  export {
4
4
  o as scrollableContainer
5
5
  };
@@ -1,29 +1,29 @@
1
- import { Metadata as l, cl as n } from "@sps-woodland/core";
1
+ import { Metadata as t, cl as n } from "@sps-woodland/core";
2
2
  import * as s from "react";
3
- var i = "pkg_sps-woodland_core__version_8_53_11__hash_xsjxqv0";
4
- function _({
3
+ var _ = "pkg_sps-woodland_core__family_scrollable-container__version_8_53_13__hash_xsjxqv0";
4
+ function i({
5
5
  children: e,
6
6
  className: a,
7
7
  maxHeight: r,
8
8
  style: o,
9
- ...t
9
+ ...l
10
10
  }) {
11
11
  return /* @__PURE__ */ s.createElement(
12
12
  "div",
13
13
  {
14
- className: n(i, a),
14
+ className: n(_, a),
15
15
  style: { ...o, maxHeight: r },
16
- ...t
16
+ ...l
17
17
  },
18
18
  e
19
19
  );
20
20
  }
21
- l.set(_, {
21
+ t.set(i, {
22
22
  name: "ScrollableContainer",
23
23
  props: {
24
24
  maxHeight: "string"
25
25
  }
26
26
  });
27
27
  export {
28
- _ as ScrollableContainer
28
+ i as ScrollableContainer
29
29
  };
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("@sps-woodland/core"),require("react")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core","react"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.ScrollableContainer={},e.spsWoodlandCore,e.react))})(this,(function(e,n,l){"use strict";function s(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const c=s(l);var d="pkg_sps-woodland_core__version_8_53_11__hash_xsjxqv0";function i({children:t,className:r,maxHeight:o,style:a,...u}){return c.createElement("div",{className:n.cl(d,r),style:{...a,maxHeight:o},...u},t)}n.Metadata.set(i,{name:"ScrollableContainer",props:{maxHeight:"string"}}),e.ScrollableContainer=i,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("@sps-woodland/core"),require("react")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core","react"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.ScrollableContainer={},e.spsWoodlandCore,e.react))})(this,(function(e,n,i){"use strict";function c(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const s=c(i);var d="pkg_sps-woodland_core__family_scrollable-container__version_8_53_13__hash_xsjxqv0";function l({children:t,className:r,maxHeight:o,style:a,...f}){return s.createElement("div",{className:n.cl(d,r),style:{...a,maxHeight:o},...f},t)}n.Metadata.set(l,{name:"ScrollableContainer",props:{maxHeight:"string"}}),e.ScrollableContainer=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1 @@
1
- .pkg_sps-woodland_core__version_8_53_11__hash_xsjxqv0{overflow:scroll;background-attachment:local,local,scroll,scroll;background-color:#fff;background-image:linear-gradient(0deg,#fff,#fff0),linear-gradient(180deg,#fff,#fff0),linear-gradient(0deg,#00000026,#fff0),linear-gradient(180deg,#00000026,#fff0);background-position:100% 100%,0 0,100% 100%,0 0;background-repeat:no-repeat;background-size:100% 3.125rem,100% 3.125rem,100% .625rem,100% .625rem;display:block;overflow-x:hidden;overflow-y:auto}.pkg_sps-woodland_core__version_8_53_11__hash_xsjxqv0 .sps-clickable-tag{background-color:#acd4e84d}
1
+ .pkg_sps-woodland_core__family_scrollable-container__version_8_53_13__hash_xsjxqv0{overflow:scroll;background-attachment:local,local,scroll,scroll;background-color:#fff;background-image:linear-gradient(0deg,#fff,#fff0),linear-gradient(180deg,#fff,#fff0),linear-gradient(0deg,#00000026,#fff0),linear-gradient(180deg,#00000026,#fff0);background-position:100% 100%,0 0,100% 100%,0 0;background-repeat:no-repeat;background-size:100% 3.125rem,100% 3.125rem,100% .625rem,100% .625rem;display:block;overflow-x:hidden;overflow-y:auto}.pkg_sps-woodland_core__family_scrollable-container__version_8_53_13__hash_xsjxqv0 .sps-clickable-tag{background-color:#acd4e84d}
@@ -1,6 +1,6 @@
1
- import * as r from "react";
1
+ import * as a from "react";
2
2
  import { createContext as R } from "react";
3
- import { Metadata as g, selectChildren as b, Icon as L, modChildren as S, cl as B } from "@sps-woodland/core";
3
+ import { Metadata as E, selectChildren as b, Icon as L, modChildren as S, cl as B } from "@sps-woodland/core";
4
4
  function H(t, n, e) {
5
5
  return n in t ? Object.defineProperty(t, n, {
6
6
  value: e,
@@ -12,57 +12,57 @@ function H(t, n, e) {
12
12
  function V(t, n) {
13
13
  var e = Object.keys(t);
14
14
  if (Object.getOwnPropertySymbols) {
15
- var a = Object.getOwnPropertySymbols(t);
16
- n && (a = a.filter(function(s) {
15
+ var r = Object.getOwnPropertySymbols(t);
16
+ n && (r = r.filter(function(s) {
17
17
  return Object.getOwnPropertyDescriptor(t, s).enumerable;
18
- })), e.push.apply(e, a);
18
+ })), e.push.apply(e, r);
19
19
  }
20
20
  return e;
21
21
  }
22
22
  function I(t) {
23
23
  for (var n = 1; n < arguments.length; n++) {
24
24
  var e = arguments[n] != null ? arguments[n] : {};
25
- n % 2 ? V(Object(e), !0).forEach(function(a) {
26
- H(t, a, e[a]);
27
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : V(Object(e)).forEach(function(a) {
28
- Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(e, a));
25
+ n % 2 ? V(Object(e), !0).forEach(function(r) {
26
+ H(t, r, e[r]);
27
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : V(Object(e)).forEach(function(r) {
28
+ Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(e, r));
29
29
  });
30
30
  }
31
31
  return t;
32
32
  }
33
33
  var T = (t, n, e) => {
34
- for (var a of Object.keys(t)) {
34
+ for (var r of Object.keys(t)) {
35
35
  var s;
36
- if (t[a] !== ((s = n[a]) !== null && s !== void 0 ? s : e[a]))
36
+ if (t[r] !== ((s = n[r]) !== null && s !== void 0 ? s : e[r]))
37
37
  return !1;
38
38
  }
39
39
  return !0;
40
40
  }, q = (t) => (n) => {
41
- var e = t.defaultClassName, a = I(I({}, t.defaultVariants), n);
42
- for (var s in a) {
43
- var l, _ = (l = a[s]) !== null && l !== void 0 ? l : t.defaultVariants[s];
44
- if (_ != null) {
45
- var i = _;
46
- typeof i == "boolean" && (i = i === !0 ? "true" : "false");
47
- var c = (
41
+ var e = t.defaultClassName, r = I(I({}, t.defaultVariants), n);
42
+ for (var s in r) {
43
+ var i, o = (i = r[s]) !== null && i !== void 0 ? i : t.defaultVariants[s];
44
+ if (o != null) {
45
+ var l = o;
46
+ typeof l == "boolean" && (l = l === !0 ? "true" : "false");
47
+ var d = (
48
48
  // @ts-expect-error
49
- t.variantClassNames[s][i]
49
+ t.variantClassNames[s][l]
50
50
  );
51
- c && (e += " " + c);
51
+ d && (e += " " + d);
52
52
  }
53
53
  }
54
- for (var [d, u] of t.compoundVariants)
55
- T(d, a, t.defaultVariants) && (e += " " + u);
54
+ for (var [c, v] of t.compoundVariants)
55
+ T(c, r, t.defaultVariants) && (e += " " + v);
56
56
  return e;
57
- }, M = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p0", W = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p1", z = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p2", G = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p3", J = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p4", K = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p5", Q = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p6", j = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p7", U = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p8", P = q({ defaultClassName: "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70p9", variantClassNames: { selected: { true: "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70pa", false: "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70pb" }, inFilter: { true: "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70pc", false: "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70pd" } }, defaultVariants: { selected: !1, inFilter: !0 }, compoundVariants: [] }), X = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70pf", F = "pkg_sps-woodland_core__version_8_53_11__hash_1wtt70pg";
57
+ }, M = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p0", W = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p1", z = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p2", G = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p3", J = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p4", K = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p5", Q = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p6", j = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p7", U = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8", P = q({ defaultClassName: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p9", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pa", false: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pb" }, inFilter: { true: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pc", false: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pd" } }, defaultVariants: { selected: !1, inFilter: !0 }, compoundVariants: [] }), X = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pf", F = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg";
58
58
  function A({
59
59
  children: t,
60
60
  className: n,
61
61
  ...e
62
62
  }) {
63
- return /* @__PURE__ */ r.createElement("div", { className: W, ...e }, /* @__PURE__ */ r.createElement("div", { className: z }, t));
63
+ return /* @__PURE__ */ a.createElement("div", { className: W, ...e }, /* @__PURE__ */ a.createElement("div", { className: z }, t));
64
64
  }
65
- g.set(A, {
65
+ E.set(A, {
66
66
  name: "SideNavHeader",
67
67
  props: {}
68
68
  });
@@ -70,72 +70,72 @@ const D = R({
70
70
  filterValue: "",
71
71
  activeItem: ""
72
72
  });
73
- function m({
73
+ function f({
74
74
  children: t,
75
75
  className: n,
76
76
  onSelect: e,
77
- as: a,
77
+ as: r,
78
78
  keyId: s,
79
- selectableAsParent: l,
80
- defaultExpanded: _ = !0,
81
- expanded: i,
82
- onExpandedChange: c,
83
- ...d
79
+ selectableAsParent: i,
80
+ defaultExpanded: o = !0,
81
+ expanded: l,
82
+ onExpandedChange: d,
83
+ ...c
84
84
  }) {
85
- const u = a ?? "a", [h, w] = b(t, [{ type: m }]), [y, N] = r.useState(_), [f, C] = r.useState(!0), p = r.useContext(D), o = r.useRef(null), v = i !== void 0, E = p.filterValue.length > 0 ? !0 : i ?? y, x = (k) => {
86
- v || N(k), c?.(k);
85
+ const v = r ?? "a", [h, y] = b(t, [{ type: f }]), [g, w] = a.useState(o), [u, C] = a.useState(!0), p = a.useContext(D), _ = a.useRef(null), m = l !== void 0, N = p.filterValue.length > 0 ? !0 : l ?? g, x = (k) => {
86
+ m || w(k), d?.(k);
87
87
  };
88
- return r.useEffect(() => {
89
- C(o.current?.innerText.toLowerCase().includes(p.filterValue.toLowerCase()) || !1), p.filterValue.length > 0 && !v && N(!0);
90
- }, [p]), /* @__PURE__ */ r.createElement(r.Fragment, null, h.length ? /* @__PURE__ */ r.createElement("ul", { className: U }, /* @__PURE__ */ r.createElement(
88
+ return a.useEffect(() => {
89
+ C(_.current?.innerText.toLowerCase().includes(p.filterValue.toLowerCase()) || !1), p.filterValue.length > 0 && !m && w(!0);
90
+ }, [p]), /* @__PURE__ */ a.createElement(a.Fragment, null, h.length ? /* @__PURE__ */ a.createElement("ul", { className: U }, /* @__PURE__ */ a.createElement(
91
91
  "li",
92
92
  {
93
- ref: o,
93
+ ref: _,
94
94
  className: P({
95
- selected: l && p.activeItem === s,
95
+ selected: i && p.activeItem === s,
96
96
  // Visibility under the filter must not depend on
97
97
  // `selectableAsParent` — otherwise a non-selectable parent (a
98
98
  // pure section header) is hidden (`display:none`) while its
99
99
  // children remain, flattening the tree.
100
- inFilter: f
100
+ inFilter: u
101
101
  }),
102
102
  onClick: () => {
103
- e && l ? e(s) : e && !l && x(!E);
103
+ e && i ? e(s) : e && !i && x(!N);
104
104
  }
105
105
  },
106
- /* @__PURE__ */ r.createElement(u, { className: F, ...d }, /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(
106
+ /* @__PURE__ */ a.createElement(v, { className: F, ...c }, /* @__PURE__ */ a.createElement("div", null, /* @__PURE__ */ a.createElement(
107
107
  L,
108
108
  {
109
109
  className: X,
110
- icon: E ? "chevron-down" : "chevron-right",
110
+ icon: N ? "chevron-down" : "chevron-right",
111
111
  onClick: () => {
112
- x(!E);
112
+ x(!N);
113
113
  }
114
114
  }
115
- )), w)
116
- ), E && h) : /* @__PURE__ */ r.createElement(
115
+ )), y)
116
+ ), N && h) : /* @__PURE__ */ a.createElement(
117
117
  "li",
118
118
  {
119
- ref: o,
119
+ ref: _,
120
120
  className: P({
121
121
  selected: p.activeItem === s,
122
- inFilter: f
122
+ inFilter: u
123
123
  })
124
124
  },
125
- /* @__PURE__ */ r.createElement(
126
- u,
125
+ /* @__PURE__ */ a.createElement(
126
+ v,
127
127
  {
128
128
  className: F,
129
129
  onClick: () => {
130
130
  e && e(s);
131
131
  },
132
- ...d
132
+ ...c
133
133
  },
134
134
  t
135
135
  )
136
136
  ));
137
137
  }
138
- g.set(m, {
138
+ E.set(f, {
139
139
  name: "SideNavItem",
140
140
  props: {
141
141
  keyId: { type: "string", required: !0 },
@@ -151,18 +151,18 @@ function O({
151
151
  children: t,
152
152
  className: n,
153
153
  title: e,
154
- onSelect: a,
154
+ onSelect: r,
155
155
  ...s
156
156
  }) {
157
- const [l, _] = b(t, [{ type: m }]), i = S(l, (c) => c.type === m ? [
157
+ const [i, o] = b(t, [{ type: f }]), l = S(i, (d) => d.type === f ? [
158
158
  {
159
- onSelect: a ? (d) => a(d) : () => {
159
+ onSelect: r ? (c) => r(c) : () => {
160
160
  }
161
161
  }
162
162
  ] : []);
163
- return /* @__PURE__ */ r.createElement("div", { className: K, ...s }, e && /* @__PURE__ */ r.createElement("div", { className: Q }, e), /* @__PURE__ */ r.createElement("ul", { className: j }, i), _);
163
+ return /* @__PURE__ */ a.createElement("div", { className: K, ...s }, e && /* @__PURE__ */ a.createElement("div", { className: Q }, e), /* @__PURE__ */ a.createElement("ul", { className: j }, l), o);
164
164
  }
165
- g.set(O, {
165
+ E.set(O, {
166
166
  name: "SideNavSection",
167
167
  props: {
168
168
  title: { type: "string" }
@@ -172,46 +172,46 @@ function Y({
172
172
  children: t,
173
173
  className: n,
174
174
  activeNavItem: e,
175
- onChange: a,
175
+ onChange: r,
176
176
  filterable: s,
177
- filterInputPlaceholder: l,
178
- ..._
177
+ filterInputPlaceholder: i,
178
+ ...o
179
179
  }) {
180
180
  const [
181
- i,
182
- c,
183
- d
181
+ l,
182
+ d,
183
+ c
184
184
  ] = b(t, [
185
185
  { type: A },
186
186
  { type: O },
187
- { type: m }
188
- ]), u = r.useRef(e), [h, w] = r.useState(e), [y, N] = r.useState(""), f = (o) => {
189
- w(o), a && a(o);
190
- }, C = S(d, (o) => o.type === m ? [
187
+ { type: f }
188
+ ]), v = a.useRef(e), [h, y] = a.useState(e), [g, w] = a.useState(""), u = (_) => {
189
+ y(_), r && r(_);
190
+ }, C = S(c, (_) => _.type === f ? [
191
191
  {
192
- onSelect: (v) => f(v)
192
+ onSelect: (m) => u(m)
193
193
  }
194
194
  ] : []), p = S(
195
- c,
196
- (o) => o.type === O ? [
195
+ d,
196
+ (_) => _.type === O ? [
197
197
  {
198
- onSelect: (v) => f(v)
198
+ onSelect: (m) => u(m)
199
199
  }
200
200
  ] : []
201
201
  );
202
- return e !== u.current && (w(e), u.current = e), /* @__PURE__ */ r.createElement(D.Provider, { value: { filterValue: y, activeItem: h } }, /* @__PURE__ */ r.createElement("div", { className: B(M), ..._ }, i, s && /* @__PURE__ */ r.createElement("div", { className: G }, /* @__PURE__ */ r.createElement("div", { className: J }, /* @__PURE__ */ r.createElement("div", { className: "sps-text-input" }, /* @__PURE__ */ r.createElement("div", { className: "sps-form-control" }, /* @__PURE__ */ r.createElement("i", { className: "sps-text-input__icon sps-icon sps-icon-filter" }), /* @__PURE__ */ r.createElement(
202
+ return e !== v.current && (y(e), v.current = e), /* @__PURE__ */ a.createElement(D.Provider, { value: { filterValue: g, activeItem: h } }, /* @__PURE__ */ a.createElement("div", { className: B(M), ...o }, l, s && /* @__PURE__ */ a.createElement("div", { className: G }, /* @__PURE__ */ a.createElement("div", { className: J }, /* @__PURE__ */ a.createElement("div", { className: "sps-text-input" }, /* @__PURE__ */ a.createElement("div", { className: "sps-form-control" }, /* @__PURE__ */ a.createElement("i", { className: "sps-text-input__icon sps-icon sps-icon-filter" }), /* @__PURE__ */ a.createElement(
203
203
  "input",
204
204
  {
205
205
  type: "text",
206
206
  className: "sps-text-input__input",
207
- placeholder: l,
208
- onChange: (o) => {
209
- N(o.target.value);
207
+ placeholder: i,
208
+ onChange: (_) => {
209
+ w(_.target.value);
210
210
  }
211
211
  }
212
- ))))), p, /* @__PURE__ */ r.createElement("ul", { className: j }, C)));
212
+ ))))), p, /* @__PURE__ */ a.createElement("ul", { className: j }, C)));
213
213
  }
214
- g.set(Y, {
214
+ E.set(Y, {
215
215
  name: "SideNav",
216
216
  props: {
217
217
  activeNavItem: { type: "string", required: !0 },
@@ -223,6 +223,6 @@ g.set(Y, {
223
223
  export {
224
224
  Y as SideNav,
225
225
  A as SideNavHeader,
226
- m as SideNavItem,
226
+ f as SideNavItem,
227
227
  O as SideNavSection
228
228
  };