@yoopta/editor 4.8.5-rc.2 → 4.8.5-rc.4

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 (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3,4 +3,4 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
5
  */
6
- var Li=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Ii="undefined"==typeof Element,zi=Ii?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fi=!Ii&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Hi=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Vi=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Hi(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),s=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,s):o.push({scopeParent:a,candidates:s})}else{zi.call(a,Li)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),d=!Hi(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&d){var u=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return o},$i=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ui=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!$i(e)?0:e.tabIndex},Ki=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Wi=function(e){return"INPUT"===e.tagName},Yi=function(e){return function(e){return Wi(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Fi(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Xi=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},qi=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=zi.call(e,"details>summary:first-of-type")?e.parentElement:e;if(zi.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Xi(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,l=Fi(e);if(a&&!a.shadowRoot&&!0===r(a))return Xi(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,r,o,i=e&&Fi(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&a;){var s,c,d;l=!(null===(c=a=null===(s=i=Fi(a))||void 0===s?void 0:s.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(a))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Zi=function(e,t){return!(t.disabled||Hi(t)||function(e){return Wi(e)&&"hidden"===e.type}(t)||qi(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!zi.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Ji=function(e,t){return!(Yi(t)||Ui(t)<0||!Zi(e,t))},Gi=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Qi=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var n=Ui(e);return n<0&&t&&!$i(e)?0:n}(a,i),s=i?e(t.candidates):a;0===l?i?n.push.apply(n,s):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:s})})),r.sort(Ki).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},ea=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Vi([e],t.includeContainer,{filter:Ji.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Gi}):function(e,t,n){if(Hi(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Li));return t&&zi.call(e,Li)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Ji.bind(null,t)),Qi(n)};const ta=r["useInsertionEffect".toString()]||(e=>e());var na="undefined"!=typeof document?s:c;function ra(){return ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ra.apply(this,arguments)}let oa=!1,ia=0;const aa=()=>"floating-ui-"+ia++;const la=r["useId".toString()]||function(){const[e,t]=r.useState((()=>oa?aa():void 0));return na((()=>{null==e&&t(aa())}),[]),r.useEffect((()=>{oa||(oa=!0)}),[]),e};const sa=r.createContext(null),ca=r.createContext(null);function da(e){return"data-floating-ui-"+e}function ua(e){const t=l(e);return na((()=>{t.current=e})),t}const fa=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pa(e,t){const n=ea(e,fa());"prev"===t&&n.reverse();const r=n.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}((null==(o=e)?void 0:o.ownerDocument)||document));var o;return n.slice(r+1)[0]}function ha(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!function(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Po(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(n,r)}function ga(e){ea(e,fa()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function va(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const ma={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function ya(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const ba=r.forwardRef((function(e,t){const[n,o]=r.useState();na((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",ya),()=>{document.removeEventListener("keydown",ya)})),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[da("focus-guard")]:"",style:ma};return r.createElement("span",ra({},e,i))})),wa=r.createContext(null),xa=da("portal");function ka(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const a=function(e){let{id:t,root:n}=void 0===e?{}:e;const[o,i]=r.useState(null),a=la(),l=Ea(),s=r.useRef(null);return na((()=>()=>{null==o||o.remove(),queueMicrotask((()=>{s.current=null}))}),[o]),na((()=>{if(s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=a,n.setAttribute(xa,""),e.appendChild(n),s.current=n,i(n)}),[t,a]),na((()=>{if(s.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!Ro(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const o=document.createElement("div");o.id=a,o.setAttribute(xa,""),e=r||e,e.appendChild(o),s.current=o,i(o)}),[t,n,a,l]),o}({id:n,root:o}),[l,s]=r.useState(null),c=r.useRef(null),d=r.useRef(null),u=r.useRef(null),f=r.useRef(null),p=!!l&&!l.modal&&l.open&&i&&!(!o&&!a);return r.useEffect((()=>{if(a&&i&&(null==l||!l.modal))return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){if(a&&ha(e)){("focusin"===e.type?va:ga)(a)}}}),[a,i,null==l?void 0:l.modal]),r.createElement(wa.Provider,{value:r.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:s})),[i,a])},p&&a&&r.createElement(ba,{"data-type":"outside",ref:c,onFocus:e=>{if(ha(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=pa(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),p&&a&&r.createElement("span",{"aria-owns":a.id,style:ma}),a&&N(t,a),p&&a&&r.createElement(ba,{"data-type":"outside",ref:d,onFocus:e=>{if(ha(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=pa(document.body,"next")||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent))}}}))}const Ea=()=>r.useContext(wa),Oa=new Set,Sa=r.forwardRef((function(e,t){let{lockScroll:n=!1,...o}=e;const i=la();return na((()=>{if(!n)return;Oa.add(i);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",o&&(t[r]=o+"px"),e){var s,c;const e=(null==(s=window.visualViewport)?void 0:s.offsetLeft)||0,n=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(n))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{Oa.delete(i),0===Oa.size&&(Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,l)))}}),[i,n]),r.createElement("div",ra({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function Ca(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:o,nodeId:i}=e;const[a,l]=r.useState(null),s=(null==(t=e.elements)?void 0:t.reference)||a,c=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:d}=e,[u,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Bi(p,o)||h(o);const[g,v]=r.useState(null),[m,y]=r.useState(null),b=r.useCallback((e=>{e!==E.current&&(E.current=e,v(e))}),[]),w=r.useCallback((e=>{e!==O.current&&(O.current=e,y(e))}),[]),x=a||g,k=l||m,E=r.useRef(null),O=r.useRef(null),S=r.useRef(u),C=null!=c,_=Mi(c),D=Mi(i),j=r.useCallback((()=>{if(!E.current||!O.current)return;const e={placement:t,strategy:n,middleware:p};D.current&&(e.platform=D.current),Ai(E.current,O.current,e).then((e=>{const t={...e,isPositioned:!0};R.current&&!Bi(S.current,t)&&(S.current=t,B.flushSync((()=>{f(t)})))}))}),[p,t,n,D]);Pi((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const R=r.useRef(!1);Pi((()=>(R.current=!0,()=>{R.current=!1})),[]),Pi((()=>{if(x&&(E.current=x),k&&(O.current=k),x&&k){if(_.current)return _.current(x,k,j);j()}}),[x,k,j,_,C]);const A=r.useMemo((()=>({reference:E,floating:O,setReference:b,setFloating:w})),[b,w]),P=r.useMemo((()=>({reference:x,floating:k})),[x,k]),T=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Ni(P.floating,u.x),r=Ni(P.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Ti(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,P.floating,u.x,u.y]);return r.useMemo((()=>({...u,update:j,refs:A,elements:P,floatingStyles:T})),[u,j,A,P,T])}(e),d=r.useContext(ca),u=null!=((null==(f=r.useContext(sa))?void 0:f.id)||null);var f;const p=function(e){const t=r.useRef((()=>{}));return ta((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,n)=>{e&&(g.current.openEvent=t),v.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==o||o(e,t,n)})),h=r.useRef(null),g=r.useRef({}),v=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}()))[0],m=la(),y=r.useCallback((e=>{const t=Ro(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c.refs.setReference(t)}),[c.refs]),b=r.useCallback((e=>{(Ro(e)||null===e)&&(h.current=e,l(e)),(Ro(c.refs.reference.current)||null===c.refs.reference.current||null!==e&&!Ro(e))&&c.refs.setReference(e)}),[c.refs]),w=r.useMemo((()=>({...c.refs,setReference:b,setPositionReference:y,domReference:h})),[c.refs,b,y]),x=r.useMemo((()=>({...c.elements,domReference:s})),[c.elements,s]),k=r.useMemo((()=>({...c,refs:w,elements:x,dataRef:g,nodeId:i,floatingId:m,events:v,open:n,onOpenChange:p})),[c,i,m,v,n,p,w,x]);return na((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===i));e&&(e.context=k)})),r.useMemo((()=>({...c,context:k,refs:w,elements:x})),[c,w,x,k])}const _a=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Da(e,t){return"function"==typeof e?e(t):e}function ja(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,s]=r.useState(!1),[c,d]=r.useState("unmounted"),u=function(e,t){const[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect((()=>{if(!e){const e=setTimeout((()=>o(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,a);return na((()=>{l&&!u&&d("unmounted")}),[l,u]),na((()=>{if(o){if(n){d("initial");const e=requestAnimationFrame((()=>{d("open")}));return()=>{cancelAnimationFrame(e)}}s(!0),d("close")}}),[n,o]),{isMounted:u,status:c}}function Ra(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:i,common:a,duration:l=250}=t,s=e.placement,c=s.split("-")[0],d=r.useMemo((()=>({side:c,placement:s})),[c,s]),u="number"==typeof l,f=(u?l:l.open)||0,p=(u?l:l.close)||0,[h,g]=r.useState((()=>({...Da(a,d),...Da(n,d)}))),{isMounted:v,status:m}=ja(e,{duration:l}),y=ua(n),b=ua(o),w=ua(i),x=ua(a);return na((()=>{const e=Da(y.current,d),t=Da(w.current,d),n=Da(x.current,d),r=Da(b.current,d)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===m&&g((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===m&&g({transitionProperty:Object.keys(r).map(_a).join(","),transitionDuration:f+"ms",...n,...r}),"close"===m){const r=t||e;g({transitionProperty:Object.keys(r).map(_a).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,w,y,b,x,f,m,d]),{isMounted:v,styles:h}}var Aa;function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pa.apply(this,arguments)}var Ba=function(e){return r.createElement("svg",Pa({viewBox:"0 0 16 16",className:"turn_svg__loop",style:{width:16,height:16,display:"block",fill:"currentcolor",flexShrink:0,backfaceVisibility:"hidden"}},e),Aa||(Aa=r.createElement("path",{d:"M5.804 3.123c.006.38.254.622.673.622h4.887c.59 0 .914.305.914.92v6.628l-.901-.978-.514-.514c-.267-.254-.629-.273-.895-.013-.254.26-.248.635.012.895l2.165 2.158c.476.47 1.022.47 1.498 0l2.165-2.158c.26-.26.266-.635.012-.895-.266-.26-.628-.241-.895.013l-.514.514-.895.971V4.564c0-1.358-.71-2.063-2.082-2.063H6.477c-.42 0-.68.241-.673.622ZM.186 7.06c.26.266.622.247.889-.013l.52-.508.889-.971v6.722c0 1.359.71 2.063 2.082 2.063h4.957c.42 0 .68-.241.673-.622-.006-.387-.254-.622-.673-.622h-4.88c-.591 0-.915-.311-.915-.927V5.554l.895.984.52.508c.26.26.629.28.89.013.26-.26.253-.629-.013-.89L3.855 4.013c-.476-.476-1.016-.476-1.492 0L.2 6.17c-.267.26-.273.628-.013.889Z"})))};function Ta(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Na=["color"],Ma=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ta(e,Na);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),La=["color"],Ia=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ta(e,La);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),za=["color"],Fa=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ta(e,za);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Ha=["color"],Va=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ta(e,Ha);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),$a=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},Ua={"text/plain":"Text","text/html":"Url",default:"Text"};var Ka=function(e,t){var n,r,o,i,a,l,s=!1;t||(t={}),n=t.debug||!1;try{if(o=$a(),i=document.createRange(),a=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=Ua[t.format]||Ua.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");s=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),s=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),l&&document.body.removeChild(l),o()}return s};const Wa=i(void 0),Ya=({children:r,tools:o})=>{const i=It(),a=d((()=>o?Object.keys(o).reduce(((e,t)=>{var n;return Object.assign(Object.assign({},e),{[t]:null===(n=o[t])||void 0===n?void 0:n.render})}),{}):{}),[o]),l=d((()=>!o||i?null:Object.keys(o).map((t=>{var n,r,i;const a=null===(n=null==o?void 0:o[t])||void 0===n?void 0:n.tool,l=null===(r=null==o?void 0:o[t])||void 0===r?void 0:r.render,s=null===(i=null==o?void 0:o[t])||void 0===i?void 0:i.props;return a?e(a,Object.assign({render:l},s),t):null}))),[o]);return e(Wa.Provider,Object.assign({value:a},{children:t(n,{children:[l,r]})}))},Xa=()=>{const e=a(Wa);if(void 0===e)throw new Error("useYooptaTools must be used within a ToolsProvider");return e};function qa({editor:e,view:t,onClose:n,mode:r="toggle"}){return{actions:(()=>{let t=Object.keys(e.blocks);return"toggle"===r&&(t=t.filter((t=>function(e,t){var n;const r=e.blocks[t];if(!r)return!1;const o=V(r.elements);return"void"!==(null===(n=null==o?void 0:o.props)||void 0===n?void 0:n.nodeType)}(e,t)))),t.map((t=>{var n,r,o,i,a,l;return{type:t,title:(null===(r=null===(n=e.blocks[t].options)||void 0===n?void 0:n.display)||void 0===r?void 0:r.title)||t,description:null===(i=null===(o=e.blocks[t].options)||void 0===o?void 0:o.display)||void 0===i?void 0:i.description,icon:null===(l=null===(a=e.blocks[t].options)||void 0===a?void 0:a.display)||void 0===l?void 0:l.icon}}))})(),onClose:n,empty:!1,getItemProps:t=>({onMouseEnter:()=>{},"data-action-menu-item":!0,"data-action-menu-item-type":t,"aria-selected":!1,onClick:()=>{e.toggleBlock(t,{deleteText:"toggle"===r,focus:!0}),n()}}),getRootProps:()=>({"data-action-menu-list":!0}),editor:e,view:t}}const Za=t=>{var{className:n,children:r,lockScroll:o=!0}=t,i=ue(t,["className","children","lockScroll"]);return e(Sa,Object.assign({lockScroll:o,className:n},i,{onClick:e=>{var t;e.stopPropagation(),null===(t=i.onClick)||void 0===t||t.call(i,e)},onMouseDown:e=>{var t;e.stopPropagation(),null===(t=i.onMouseDown)||void 0===t||t.call(i,e)}},{children:r}))},Ja=t=>{const[n,r]=f(!1),o=l(null),i=Nt();return c((()=>{r(!0);const e=i.refElement;if(!e)return;return e.querySelector(".yoopta-overlays")||(o.current=document.createElement("div"),o.current.className="yoopta-overlays",e.appendChild(o.current)),()=>{o.current&&o.current.remove()}}),[]),n?e(ka,Object.assign({id:`${t.id}-${i.id}`,root:o.current||i.refElement},{children:t.children})):null},Ga=({children:t})=>e("div",Object.assign({className:"yoopta-block-options-group"},{children:t})),Qa=({children:t})=>e("div",Object.assign({onClick:e=>e.stopPropagation(),className:"yoopta-block-options-menu-content data-[state=open]:yoo-editor-animate-in data-[state=closed]:yoo-editor-animate-out data-[state=closed]:yoo-editor-fade-out-0 data-[state=open]:yoo-editor-fade-in-0 data-[state=closed]:yoo-editor-zoom-out-95 data-[state=open]:yoo-editor-zoom-in-95 data-[side=bottom]:yoo-editor-slide-in-from-top-2 data-[side=left]:yoo-editor-slide-in-from-right-2 data-[side=right]:yoo-editor-slide-in-from-left-2 data-[side=top]:yoo-editor-slide-in-from-bottom-2"},{children:t})),el=({children:t})=>e("div",Object.assign({className:"yoopta-block-options-item"},{children:t})),tl=["delete","duplicate","turnInto","copy"],nl=({isOpen:n,onClose:r,refs:o,style:i,actions:a=tl,children:l})=>{var s,c,d;const u=Nt(),p=Xa(),[h,g]=f(!1),{refs:v,floatingStyles:m,context:y}=Ca({placement:"right",open:h,onOpenChange:g,middleware:[Ri(),ji(),Di(),ui(10)],whileElementsMounted:_i}),{isMounted:b,styles:w}=Ra(y,{duration:100});if(!n)return null;const x=ne(u,{at:u.path.current}),k=V(null===(s=u.blocks[(null==x?void 0:x.type)||""])||void 0===s?void 0:s.elements),E="void"===(null===(c=null==k?void 0:k.props)||void 0===c?void 0:c.nodeType),O=p.ActionMenu,S=Object.assign(Object.assign({},m),w),C=qa({editor:u,view:"small",onClose:()=>{g(!1),r()}});return e(Ja,Object.assign({id:"yoo-block-options-portal"},{children:e(Za,Object.assign({lockScroll:!0,className:"yoo-editor-z-[100]",onClick:r},{children:e("div",Object.assign({style:i,ref:o.setFloating,contentEditable:!1},{children:t(Qa,{children:[null!==a&&t(Ga,{children:[e(el,{children:t("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{u.deleteBlock({at:u.path.current}),u.setPath({current:null}),r()}},{children:[e(Va,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Delete"]}))}),e(el,{children:t("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{"number"==typeof u.path.current&&(u.duplicateBlock({original:{path:u.path.current},focus:!0}),r())}},{children:[e(Ma,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Duplicate"]}))}),!!O&&!E&&!(null===(d=u.blocks[(null==x?void 0:x.type)||""])||void 0===d?void 0:d.hasCustomEditor)&&t(el,{children:[b&&e(Ja,Object.assign({id:"yoo-block-options-portal"},{children:e(Za,Object.assign({lockScroll:!0,className:"yoo-editor-z-[100]",onClick:()=>g(!1)},{children:e("div",Object.assign({style:S,ref:v.setFloating},{children:e(O,Object.assign({},C))}))}))})),t("button",Object.assign({type:"button",className:"yoopta-block-options-button",ref:v.setReference,onClick:()=>g((e=>!e))},{children:[e(Ba,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Turn into"]}))]}),e(el,{children:t("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{const e=ne(u);e&&(Ka(`${window.location.origin}${window.location.pathname}#${e.id}`),u.emit("block:copy",e)),r()}},{children:[e(Fa,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Copy link to block"]}))})]}),l]})}))}))}))};var rl=Object.freeze({__proto__:null,BlockOptions:nl,BlockOptionsMenuContent:Qa,BlockOptionsMenuGroup:Ga,BlockOptionsMenuItem:el,BlockOptionsSeparator:({className:t=""})=>e("div",{className:`yoopta-block-options-separator ${t}`})});const ol=({block:n,editor:r,dragHandleProps:o,onChangeActiveBlock:i,showActions:a})=>{const[l,s]=f(!1),{isActionMenuOpen:c,actionMenuRefs:d,hasActionMenu:u,actionMenuStyles:p,onChangeActionMenuOpen:h,onCloseActionMenu:g,actionMenuRenderProps:v,ActionMenu:y}=(({editor:e})=>{const t=Xa().ActionMenu,[n,r]=f(!1),{refs:o,floatingStyles:i,context:a}=Ca({placement:"bottom-start",open:n,onOpenChange:r,middleware:[Ri(),ji(),Di(),ui(10)],whileElementsMounted:_i}),{isMounted:l,styles:s}=Ra(a,{duration:100}),c=Object.assign(Object.assign({},i),s),d=e=>r(e),u=()=>d(!1),p=qa({editor:e,view:"default",mode:"create",onClose:u});return{isActionMenuOpen:l,actionMenuStyles:c,actionMenuRefs:o,hasActionMenu:!!t,onChangeActionMenuOpen:d,actionMenuRenderProps:p,onCloseActionMenu:u,ActionMenu:t}})({editor:r}),{refs:b,floatingStyles:x,context:k}=Ca({placement:"right-start",open:l,onOpenChange:s,middleware:[Ri(),ji(),Di(),ui()]}),{isMounted:E,styles:O}=Ra(k,{duration:100}),{setActivatorNodeRef:S,attributes:C,listeners:D}=o,j=Object.assign(Object.assign({},x),O);return t("div",Object.assign({contentEditable:!1,"data-hovered-state-open":a,className:"yoopta-block-actions"},{children:[c&&u&&e(Ja,Object.assign({id:"yoo-block-options-portal"},{children:e(Za,Object.assign({lockScroll:!0,className:"yoo-editor-z-[100]",onClick:g},{children:e("div",Object.assign({style:p,ref:d.setFloating},{children:e(y,Object.assign({},v))}))}))})),e("button",Object.assign({type:"button",onClick:()=>{var e;const t=re(r,{at:n.meta.order}),o=r.blocks[n.type];if(!t)return;const i=document.querySelector(`[data-yoopta-block-id="${n.id}"]`),a=V(o.elements);let l;o.hasCustomEditor||(l=m.string(t,[0]));const s="string"==typeof l&&0===l.trim().length;if(u&&s&&"void"!==(null===(e=null==a?void 0:a.props)||void 0===e?void 0:e.nodeType))r.setPath({current:n.meta.order}),r.focusBlock(n.id),d.setReference(i),h(!0);else{const e=Ct.buildBlockData({id:I()}),t=n.meta.order+1;r.setPath({current:n.meta.order}),r.insertBlock(e.type,{at:t,focus:!0}),u&&setTimeout((()=>{i&&d.setReference(i.nextSibling),h(!0)}),0)}},className:"yoopta-block-actions-plus"},{children:e(So,{})})),e("button",Object.assign({type:"button",className:"yoopta-block-actions-drag",ref:e=>{S(e),b.setReference(e)}},C,D,{onClick:e=>{e.stopPropagation(),i(n.id);const t=re(r,{at:n.meta.order});r.focusBlock(n.id),t&&setTimeout((()=>{r.blocks[n.type].hasCustomEditor||(_.blur(t),_.deselect(t),w.deselect(t)),r.setPath({current:n.meta.order,selected:[n.meta.order]}),s(!0)}),10)},onMouseDown:e=>e.stopPropagation()},{children:e(Eo,{})})),e(nl,{isOpen:E,refs:b,style:j,onClose:()=>s(!1)})]}))},il=({children:n,block:r,blockId:i})=>{const a=Nt(),[l,s]=o.useState(null),{attributes:c,listeners:f,setNodeRef:p,setActivatorNodeRef:h,transform:g,transition:v,isOver:m,isDragging:y}=go({id:i,disabled:a.readOnly}),b=((e,t,n,r,o)=>d((()=>({container:{marginLeft:20*e.meta.depth+"px",transform:t?`translate3d(${t.x}px, ${t.y}px, 0)`:"none",transition:n,opacity:r?.7:1},content:o&&!r?{borderBottom:"2px solid #007aff"}:void 0})),[e.meta.depth,t,n,r,o]))(r,g,v,y,m),w=`yoopta-block yoopta-align-${r.meta.align||"left"}`,x=Z.isBlockSelected(a,r),k=l===i,E=u((()=>{a.readOnly||s(i)}),[a.readOnly,i]),O=u((()=>{a.readOnly||s(null)}),[a.readOnly]),S=d((()=>({setActivatorNodeRef:h,attributes:c,listeners:f})),[r]);return t("div",Object.assign({ref:p,className:w,onMouseEnter:E,onMouseLeave:O,style:b.container,"data-hovered-block":k,"data-yoopta-block":!0,"data-yoopta-block-id":i,"data-yoopta-block-type":r.type},{children:[!a.readOnly&&e(ol,{block:r,editor:a,dragHandleProps:S,showActions:k,onChangeActiveBlock:s}),e("div",Object.assign({style:b.content},{children:n})),x&&!a.readOnly&&e("div",{className:"yoopta-selection-block"})]}))};var al={};Object.defineProperty(al,"__esModule",{value:!0});for(var ll="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),sl={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},cl={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ll?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},dl={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},ul=1;ul<20;ul++)dl["f"+ul]=111+ul;function fl(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return pl(e,t)})),o=function(e){return r.some((function(t){return hl(t,e)}))};return null==n?o:o(n)}function pl(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),i=o.length;for(var a in sl)r[sl[a]]=!1;var l=!0,s=!1,c=void 0;try{for(var d,u=o[Symbol.iterator]();!(l=(d=u.next()).done);l=!0){var f=d.value,p=f.endsWith("?")&&f.length>1;p&&(f=f.slice(0,-1));var h=vl(f),g=sl[h];if(f.length>1&&!g&&!cl[f]&&!dl[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&g||(n?r.key=h:r.which=gl(f)),g&&(r[g]=!p||null)}}catch(e){s=!0,c=e}finally{try{!l&&u.return&&u.return()}finally{if(s)throw c}}return r}function hl(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function gl(e){return e=vl(e),dl[e]||e.toUpperCase().charCodeAt(0)}function vl(e){return e=e.toLowerCase(),e=cl[e]||e}al.default=fl,al.isHotkey=fl,al.isCodeHotkey=function(e,t){return fl(e,t)};var ml=al.isKeyHotkey=function(e,t){return fl(e,{byKey:!0},t)};al.parseHotkey=pl,al.compareHotkey=hl,al.toKeyCode=gl,al.toKeyName=vl;const yl={bold:"mod+b",italic:"mod+i",compose:["down","left","right","up","backspace","enter"],arrowLeft:"left",arrowUp:"up",arrowDown:"down",arrowRight:"right",ctrlLeft:"ctrl+left",escape:"esc",ctrlRight:"ctrl+right",deleteBackward:"shift?+backspace",backspace:"backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",shiftDelete:"shift+delete",extendForward:"shift+right",shiftEnter:"shift+enter",enter:"enter",space:"space",undo:"mod+z",select:"mod+a",shiftTab:"shift+tab",shiftArrowUp:"shift+up",shiftArrowDown:"shift+down",tab:"tab",cmd:"mod",cmdEnter:"mod+enter",cmdShiftEnter:"mod+shift+enter",slashCommand:"/",copy:"mod+c",cut:"mod+x",cmdShiftRight:"mod+shift+right",cmdShiftLeft:"mod+shift+left",cmdShiftDelete:"mod+shift+backspace",cmdShiftD:"mod+shift+d",cmdAltDelete:"mod+alt+backspace"},bl={moveLineBackward:"opt+up",moveLineForward:"opt+down",ctrlLeft:"opt+left",ctrlRight:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},wl={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},xl=e=>{const t=yl[e],n=bl[e],r=wl[e],o=t&&ml(t),i=n&&ml(n),a=r&&ml(r);return e=>!(!o||!o(e))||(!(!i||!i(e))||!(!a||!a(e)))},kl={isBold:xl("bold"),isCompose:xl("compose"),isArrowLeft:xl("arrowLeft"),isArrowRight:xl("arrowRight"),isArrowUp:xl("arrowUp"),isArrowDown:xl("arrowDown"),isDeleteBackward:xl("deleteBackward"),isDeleteForward:xl("deleteForward"),isDeleteLineBackward:xl("deleteLineBackward"),isDeleteLineForward:xl("deleteLineForward"),isDeleteWordBackward:xl("deleteWordBackward"),isDeleteWordForward:xl("deleteWordForward"),isExtendBackward:xl("extendBackward"),isExtendForward:xl("extendForward"),isExtendLineBackward:xl("extendLineBackward"),isExtendLineForward:xl("extendLineForward"),isItalic:xl("italic"),isMoveLineBackward:xl("moveLineBackward"),isMoveLineForward:xl("moveLineForward"),isCtrlLeft:xl("ctrlLeft"),isCtrlRight:xl("ctrlRight"),isRedo:xl("redo"),isShiftEnter:xl("shiftEnter"),isEnter:xl("enter"),isTransposeCharacter:xl("transposeCharacter"),isUndo:xl("undo"),isSpace:xl("space"),isSelect:xl("select"),isTab:xl("tab"),isShiftTab:xl("shiftTab"),isBackspace:xl("backspace"),isCmdEnter:xl("cmdEnter"),isCmd:xl("cmd"),isEscape:xl("escape"),isSlashCommand:xl("slashCommand"),isShiftArrowUp:xl("shiftArrowUp"),isShiftArrowDown:xl("shiftArrowDown"),isCopy:xl("copy"),isCut:xl("cut"),isShiftDelete:xl("shiftDelete"),isCmdShiftEnter:xl("cmdShiftEnter"),isCmdShiftRight:xl("cmdShiftRight"),isCmdShiftLeft:xl("cmdShiftLeft"),isCmdShiftDelete:xl("cmdShiftDelete"),isCmdAltDelete:xl("cmdAltDelete"),isCmdShiftD:xl("cmdShiftD")};const El={onKeyDown:function(e){return t=>{const n=re(e,{at:e.path.current});if(kl.isShiftEnter(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;return t.preventDefault(),void n.insertText("\n")}if(kl.isUndo(t))t.preventDefault();else if(kl.isRedo(t))t.preventDefault();else if(kl.isEnter(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;t.preventDefault();const r=m.first(n,[]),o=m.last(n,[]),i=m.isStart(n,n.selection.anchor,r[1]),a=m.isEnd(n,n.selection.anchor,o[1]);if(!i&&!a)return void e.splitBlock({slate:n,focus:!0});const l=Ct.getBlock(e,{at:e.path.current}),s=Ct.buildBlockData({id:I()}),c=m.string(n,[]),d=i&&c.length>0,u=Z.getNextPath(e);e.batchOperations((()=>{e.insertBlock(s.type,{at:d?e.path.current:u,focus:!d}),d&&l&&e.focusBlock(l.id)}))}else if(kl.isBackspace(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;const r=k.parent(n.selection.anchor.path);if(m.isStart(n,n.selection.anchor,r)){t.preventDefault();if(0===m.string(n,r).trim().length)return void e.deleteBlock({at:e.path.current,focus:!0});{if(O.isExpanded(n.selection))return w.delete(n,{at:n.selection});const t=Ct.getBlock(e,{at:Z.getPreviousPath(e)}),r=Ct.getSlate(e,{id:null==t?void 0:t.id});if(t&&r){const{node:n}=function(e){const t=m.last(e,[]);return{node:t[0],path:t[1]}}(r);if(0===E.string(n).trim().length)return e.deleteBlock({blockId:t.id,focus:!1}),void e.setPath({current:t.meta.order})}e.mergeBlock()}}}else{if(kl.isSelect(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;const[,r]=m.first(n,[0]),[,o]=m.last(n,[n.children.length-1]),i=m.range(n,r,o),a=O.equals(n.selection,i),l=0===m.string(n,i).trim().length;if(O.isExpanded(n.selection)&&a||l){t.preventDefault(),_.blur(n),_.deselect(n),w.deselect(n);const r=Array.from({length:Object.keys(e.children).length},((e,t)=>t));return void e.setPath({current:null,selected:r})}}if(kl.isShiftTab(t)){if(t.isDefaultPrevented())return;t.preventDefault();const n=e.path.selected;return Array.isArray(n)&&n.length>0?void e.batchOperations((()=>{n.forEach((t=>{const n=Ct.getBlock(e,{at:t});n&&n.meta.depth>0&&e.decreaseBlockDepth({at:t})}))})):void e.decreaseBlockDepth()}if(kl.isTab(t)){if(t.isDefaultPrevented())return;t.preventDefault();const n=e.path.selected;return Array.isArray(n)&&n.length>0?void e.batchOperations((()=>{n.forEach((t=>{e.increaseBlockDepth({at:t})}))})):void e.increaseBlockDepth()}if(kl.isArrowUp(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;if(1===new Set(n.selection.anchor.path).size){const n=Z.getPreviousPath(e),r=re(e,{at:n}),o=ne(e,{at:n}),i=e.blocks[(null==o?void 0:o.type)||""];if(r&&o&&!(null==i?void 0:i.hasCustomEditor)){const[,n]=m.last(r,[0]),i={path:n,offset:m.string(r,n).length};return t.preventDefault(),void e.focusBlock(o.id,{focusAt:i,waitExecution:!1,shouldUpdateBlockSelection:!0})}}}if(kl.isArrowDown(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;const r=k.parent(n.selection.anchor.path);if(m.isEnd(n,n.selection.anchor,r)){const n=Z.getNextPath(e),o=re(e,{at:n}),i=ne(e,{at:n}),a=e.blocks[(null==i?void 0:i.type)||""];if(o&&i&&!(null==a?void 0:a.hasCustomEditor)){const n=function(e,t){try{const[,n]=m.first(e,t);return{path:n,offset:0}}catch(e){return{path:[0,0],offset:0}}}(o,r);return t.preventDefault(),void e.focusBlock(i.id,{focusAt:n,waitExecution:!1})}}}if(n&&n.selection&&O.isExpanded(n.selection)){if(Object.values(e.formats).length>0)for(const n of Object.values(e.formats))if(n.hotkey&&ml(n.hotkey)(t)){t.preventDefault(),e.formats[n.type].toggle();break}}}}}},Ol=({children:t,attributes:n,placeholder:r})=>{const o=j(),i=Object.assign({},n);return o&&r&&(i["data-placeholder"]=r,i.className="yoopta-placeholder"),e("span",Object.assign({},i,{children:t}))};function Sl(e){return!!(e&&e.id&&e.type&&e.value&&e.meta)}const Cl={B:{type:"bold"},STRONG:{type:"bold"},I:{type:"italic"},U:{type:"underline"},S:{type:"strike"},CODE:{type:"code"},EM:{type:"italic"}},_l=["left","center","right",void 0];function Dl(e,t,n,r){var o,i;let a;if(t.parse){a=t.parse(n,e);if(y.isElement(a)&&"inline"===(null===(o=a.props)||void 0===o?void 0:o.nodeType))return a}const l=e.blocks[t.type],s=H(l.elements)||"",c=l.elements[s],d="void"===(null===(i=c.props)||void 0===i?void 0:i.nodeType);let u={id:I(),type:s,children:d&&!l.hasCustomEditor?[{text:""}]:r.map(Rl).flat(),props:Object.assign({nodeType:"block"},c.props)};if(a)if(y.isElement(a))u=a;else if(Array.isArray(a)){return a}if(0===u.children.length&&(u.children=[{text:""}]),!a&&t.parse)return;const f=n.getAttribute("data-meta-align"),p=parseInt(n.getAttribute("data-meta-depth")||"0",10);return Ct.buildBlockData({id:I(),type:t.type,value:[u],meta:{order:0,depth:p,align:_l.includes(f)?f:void 0}})}function jl(e,t,n){var r;if(3===n.nodeType){return{text:null===(r=n.textContent)||void 0===r?void 0:r.replace(/[\t\n\r\f\v]+/g," ")}}if(1!==n.nodeType)return null;if("BR"===n.nodeName)return{text:"\n"};const o=n;let i=Array.from(o.childNodes).map((n=>jl(e,t,n))).flat().filter(Boolean);if(Cl[o.nodeName]){const e=Cl[o.nodeName].type;return i.map((t=>"string"==typeof t?{[e]:!0,text:t}:t.text?Object.assign(Object.assign({},t),{[e]:!0}):t))}const a=t[o.nodeName];if(a){if(Array.isArray(a)){return a.map((t=>Dl(e,t,o,i))).filter(Boolean)}return Dl(e,a,o,i)}return i}function Rl(e){if("string"==typeof e)return{text:e};if(y.isElement(e))return e;if(Array.isArray(e))return e.map(Rl).flat();if(null==e?void 0:e.text)return e;if(Sl(e)){return e.value[0].children.map(Rl).flat()}return{text:""}}function Al(e,t){console.log("pasted html",t);const n=function(e){const t={};return Object.keys(e.plugins).forEach((n=>{const r=e.plugins[n],{parsers:o}=r;if(o){const{html:e}=o;if(e){const{deserialize:r}=e;if(r){const{nodeNames:e}=r;e&&e.forEach((e=>{const o=t[e];if(o){const i=Array.isArray(o)?o:[o];t[e]=[...i,{type:n,parse:r.parse}]}else t[e]={type:n,parse:r.parse}}))}}}})),t}(e);return jl(e,n,t).flat().filter(Sl)}function Pl(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}const Bl=(e,t,n)=>{var r,o,i,a;(e=>{const[t]=m.nodes(e,{match:e=>!m.isEditor(e)&&y.isElement(e)&&"link"===e.type});return!!t})(t)&&(e=>{w.unwrapNodes(e,{match:e=>!m.isEditor(e)&&y.isElement(e)&&"link"===e.type})})(t);const{selection:l}=t,s=l&&O.isCollapsed(l),c=null===(a=null===(i=null===(o=null===(r=e.plugins)||void 0===r?void 0:r.LinkPlugin)||void 0===o?void 0:o.elements)||void 0===i?void 0:i.link)||void 0===a?void 0:a.props,d={type:"link",children:s?[{text:n}]:[],props:{url:n,target:(null==c?void 0:c.target)||"_self",rel:(null==c?void 0:c.rel)||"noopener noreferrer"}};s?w.insertNodes(t,d):(w.wrapNodes(t,d,{split:!0}),w.collapse(t,{edge:"end"}))},Tl=(e,t,n,r,o)=>d((()=>{let i=t.blockEditorsMap[e];const{normalizeNode:a,insertText:l,apply:s}=i,c=Object.keys(r);return c.forEach((e=>{var n;const o=null===(n=r[e].props)||void 0===n?void 0:n.nodeType,a="inline"===o,l="void"===o,s="inlineVoid"===o;s&&(i.markableVoid=t=>t.type===e),(l||s)&&(i.isVoid=t=>t.type===e),(a||s)&&(i.isInline=t=>t.type===e,i=((e,t)=>{const{insertData:n,insertText:r}=t;return t.insertText=n=>{console.log("insertText",n),console.log("insertText isUrl(text)",Pl(n)),n&&Pl(n)?Bl(e,t,n):r(n)},t.insertData=r=>{const o=r.getData("text/plain");console.log("insertData",o),console.log("insertData isUrl(text)",Pl(o)),o&&Pl(o)?Bl(e,t,o):n(r)},t})(t,i))})),i.insertText=e=>{const n=Z.getSelectedPaths(t),r=Z.getPath(t);Array.isArray(n)&&n.length>0&&t.setPath({current:r}),l(e)},i.normalizeNode=e=>{const[r,o]=e,l=t.blocks[n.type].elements;if(Object.keys(l).length>1)return a(e);if(y.isElement(r)){const{type:e}=r,t=H(l);if(!c.includes(e))return void w.setNodes(i,{type:t,props:Object.assign({},r.props)},{at:o});if(r.type===t)for(const[e,t]of E.children(i,o))if(y.isElement(e)&&!i.isInline(e))return void w.unwrapNodes(i,{at:t})}a(e)},i.apply=n=>{var r,o,a;if(C.isSelectionOperation(n)){const e=Z.getSelectedPaths(t),n=Z.getPath(t);Array.isArray(e)&&i.selection&&O.isExpanded(i.selection)&&t.setPath({current:n})}let l=jt.isSavingHistory(t);if(void 0===l&&(l=Nl(n)),l){const l=t.historyStack.undos[t.historyStack.undos.length-1];if(!l||"set_slate"!==(null===(r=null==l?void 0:l.operations[0])||void 0===r?void 0:r.type)){const r={type:"set_slate",properties:{slateOps:[n],selectionBefore:i.selection},blockId:e,slate:i};return t.applyTransforms([r],{source:"api"}),void s(n)}const c=null===(a=null===(o=null==l?void 0:l.operations[0])||void 0===o?void 0:o.properties)||void 0===a?void 0:a.slateOps,d=c&&c[c.length-1];let u=Ml(n,d);if(0!==i.operations.length&&(u=!0),u)d!==n&&c.push(n);else{const r={operations:[n],selectionBefore:i.selection},o={type:"set_slate",properties:{slateOps:r.operations,selectionBefore:r.selectionBefore},blockId:e,slate:i};t.applyTransforms([o],{source:"api"})}}s(n)},o&&(i=o(i,t,e)),i}),[]),Nl=e=>"set_selection"!==e.type,Ml=(e,t)=>t===e||(!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!k.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!k.equals(e.path,t.path))),Ll=({id:t,customEditor:n,elements:r,marks:o,events:i,options:a,extensions:s,placeholder:c="Type '/' for commands"})=>{const f=Nt(),p=Mt(t);let h=l(p.value).current;const g=d((()=>(e=>{const t={};return Object.keys(e).forEach((n=>t[n]=e[n].render)),t})(r)),[r]),v=d((()=>(e=>{const t={};return e?(e.forEach((e=>t[e.type]=e)),t):t})(o)),[o]),y=Tl(t,f,p,r,s),b=((e,t,n,r)=>d((()=>{if(!e||t.readOnly)return{};const o=ue(e||{},["onBeforeCreate","onDestroy","onCreate"]),i={hotkeys:kl,currentBlock:n,defaultBlock:Ct.buildBlockData({id:I()})},a={};return Object.keys(o).forEach((e=>{a[e]=function(n){o[e]&&o[e](t,r,i)(n)}})),a}),[e,t,n]))(i,f,p,y),w=u((e=>{f.updateBlock(t,{value:e})}),[t]),x=u((n=>{const r=g[n.element.type],{attributes:o}=n,i=ue(n,["attributes"]);return o["data-element-type"]=i.element.type,r?e(r,Object.assign({},i,{attributes:o,blockId:t,HTMLAttributes:null==a?void 0:a.HTMLAttributes})):e(P,Object.assign({},i,{attributes:o}))}),[r]),E=u((t=>{var n,r,o,i;let{children:a,leaf:l,attributes:s}=t;const d=ue(l,["text"]),u=f.path.current===p.meta.order;d&&Object.keys(d).forEach((e=>{const t=v[e];t&&(a=t.render({children:a,leaf:l}))}));const h=!("void"===(null===(i=null===(o=null===(r=null===(n=t.children)||void 0===n?void 0:n.props)||void 0===r?void 0:r.parent)||void 0===o?void 0:o.props)||void 0===i?void 0:i.nodeType))&&u&&l.withPlaceholder;return e(Ol,Object.assign({attributes:s,placeholder:h?c:void 0},{children:a}))}),[o]),S=u((e=>{var t;f.readOnly||(null===(t=b.onKeyDown)||void 0===t||t.call(b,e),El.onKeyDown(f)(e))}),[b.onKeyDown,f.readOnly,f.path.current,p.meta.order]),C=u((e=>{var t;f.readOnly||null===(t=null==b?void 0:b.onKeyUp)||void 0===t||t.call(b,e)}),[b.onKeyUp,f.readOnly]),D=u((e=>{var t;f.readOnly||(e.preventDefault(),null===(t=null==b?void 0:b.onBlur)||void 0===t||t.call(b,e))}),[b.onBlur,f.readOnly]),j=u((e=>{var t;f.readOnly||(f.isFocused()||(ee.set(f,!0),f.emit("focus",!0)),null===(t=null==b?void 0:b.onFocus)||void 0===t||t.call(b,e))}),[b.onFocus,f.readOnly]),R=u((e=>{var t;if(f.readOnly)return;null===(t=null==b?void 0:b.onPaste)||void 0===t||t.call(b,e);const n=e.clipboardData.getData("text/html"),r=(new DOMParser).parseFromString(n,"text/html");if(console.log("parsedHTML",r),r.body.childNodes.length>0){const t=Al(f,r.body);if(t.length>0&&null!==f.path.current){e.preventDefault();let n=!1,r=!1;if(y&&y.selection){const e=k.parent(y.selection.anchor.path),t=m.string(y,e).trim(),o=m.isStart(y,y.selection.anchor,e);r=""===t&&o,n=!o||t.length>0,_.blur(y)}const o=f.path.current;if(null===o)return;return void f.batchOperations((()=>{const e=[];r&&f.deleteBlock({at:o}),t.forEach(((t,r)=>{let i=n?o+r+1:o+r;e.push(i);const a=ue(t,["type"]);f.insertBlock(t.type,{at:i,focus:!1,blockData:a})})),f.setPath({current:null,selected:e})}))}}}),[b.onPaste,f.readOnly]),A=u((e=>{const t=[];if(f.readOnly)return t;const[n,r]=e,o=f.path.current===p.meta.order;return y.selection&&o&&!m.isEditor(n)&&""===m.string(y,[r[0]])&&O.includes(y.selection,r)&&O.isCollapsed(y.selection)&&t.push(Object.assign(Object.assign({},y.selection),{withPlaceholder:!0})),t}),[f.readOnly,f.path.current,p.meta.order]);return e(Il,{id:t,slate:y,initialValue:h,onChange:w,decorate:A,renderLeaf:E,renderElement:x,eventHandlers:b,onKeyDown:S,onKeyUp:C,onFocus:j,onBlur:D,customEditor:n,readOnly:f.readOnly,onPaste:R})},Il=p((({id:t,slate:n,initialValue:r,onChange:o,renderLeaf:i,renderElement:a,eventHandlers:l,onKeyDown:s,onKeyUp:c,onFocus:d,onBlur:u,onPaste:f,customEditor:p,decorate:h,readOnly:g})=>"function"==typeof p?p({blockId:t}):e(R,Object.assign({editor:n,initialValue:r,onValueChange:o},{children:e(A,Object.assign({renderElement:a,renderLeaf:i,className:"yoopta-slate",spellCheck:!0},l,{onKeyDown:s,onKeyUp:c,onFocus:d,decorate:h,readOnly:g,onPaste:f}),`editable-${t}`)}),`slate-${t}`)));Il.displayName="SlateEditorInstance";const zl=({editor:e})=>({sensors:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d((()=>[...t].filter((e=>null!=e))),[...t])}(En(hr,{activationConstraint:{distance:20}}),En(cr,{coordinateGetter:yo})),handleDragEnd:u((t=>{const{active:n,over:r}=t;if(n&&r&&n.id!==r.id){const t=e.children[r.id].meta.order;e.moveBlock(n.id,t)}}),[]),handleDragStart:u((t=>{e.setPath({current:null})}),[])}),Fl=[],Hl=({editor:t,marks:r,placeholder:o})=>{const i=It(),{sensors:a,handleDragEnd:l,handleDragStart:s}=zl({editor:t}),c=Object.keys(t.children),u=d((()=>0===c.length?Fl:c.sort(((e,n)=>t.children[e].meta.order-t.children[n].meta.order))),[c]),f=[];for(let n=0;n<u.length;n++){const i=u[n],a=t.children[i],l=t.plugins[a.type];a&&l?f.push(e(il,Object.assign({block:a,blockId:i},{children:e(Ll,{type:a.type,id:i,marks:r,customEditor:l.customEditor,events:l.events,elements:l.elements,options:l.options,extensions:l.extensions,placeholder:o},i)}),i)):console.error(`Plugin ${a.type} not found`)}return i?e(n,{children:f}):e(Wr,Object.assign({id:"yoopta-dnd-context",sensors:a,collisionDetection:An,onDragStart:s,onDragEnd:l},{children:e(lo,Object.assign({disabled:i,items:u,strategy:oo},{children:f}))}))},Vl=({editor:e,root:t})=>{const[n,r]=f({origin:[0,0],coords:[0,0],selection:!1}),o=o=>{var i;if(e.readOnly||!1===t)return;const a=null===(i=e.refElement)||void 0===i?void 0:i.contains(o.target),s=Z.getSelectedPaths(e);if(!a&&!n.selection&&Array.isArray(s)&&s.length>0)return e.setPath({current:null}),l();a||r({origin:[o.pageX,o.pageY-window.pageYOffset],coords:[o.pageX,o.pageY-window.pageYOffset],selection:!0})},i=o=>{if(!n.selection||e.readOnly||!1===t)return;r((e=>Object.assign(Object.assign({},e),{coords:[o.pageX,o.pageY-window.pageYOffset]})));const i=((e,t,n)=>{var r;const o=[],i=null===(r=e.refElement)||void 0===r?void 0:r.querySelectorAll("[data-yoopta-block]");return i?(i.forEach(((e,r)=>{if(!e)return;const i=e.getBoundingClientRect(),a=Math.min(t[1],n[1]),l=Math.min(t[0],n[0]),s=Math.max(t[1],n[1]),c=Math.max(t[0],n[0]);a<i.bottom&&s>i.top&&l<i.right&&c>i.left&&o.push(r)})),o):o})(e,n.origin,[o.pageX,o.pageY-window.pageYOffset]);e.setPath({current:null,selected:i})},a=()=>{e.readOnly||l()};c((()=>{var n;if(e.readOnly||!1===t)return;const r=t&&"current"in t?t.current:t||document;if(!r)throw new Error("Root element not found. Please check the `selectionBoxRoot` prop");if(!("nodeType"in r))throw new Error("Root element should be a DOM element or a ref object. Please check the `selectionBoxRoot` prop");if(null===(n=e.refElement)||void 0===n?void 0:n.contains(r))throw new Error("Root element should not be a child of the editor. Please check the `selectionBoxRoot` prop");return r.addEventListener("mousedown",o),r.addEventListener("mousemove",i),r.addEventListener("mouseup",a),()=>{r.removeEventListener("mousedown",o),r.removeEventListener("mousemove",i),r.removeEventListener("mouseup",a)}}),[e.path,n,t,e.readOnly]);const l=()=>{r({origin:[0,0],coords:[0,0],selection:!1})};return Object.assign(Object.assign({},n),{onClose:l})},$l=({origin:t,coords:n,isOpen:r})=>{if(!r)return null;const o={zIndex:10,left:t[0],top:t[1],height:Math.abs(n[1]-t[1]-1),width:Math.abs(n[0]-t[0]-1),userSelect:"none",transformOrigin:"top left",transform:t[1]>n[1]&&t[0]>n[0]?"scaleY(-1) scaleX(-1)":t[1]>n[1]?"scaleY(-1)":t[0]>n[0]?"scaleX(-1)":void 0,position:"fixed",backgroundColor:"rgba(35, 131, 226, 0.14)"};return e("div",{style:o})},Ul={selectionStarted:!1,indexToSelect:null,startedIndexToSelect:null};function Kl({editor:e}){const t=l(!1),n=l(!1),r=l(null),o=l(null);let i=l(Ul).current;const a=()=>{const t=e.path.current;if("number"==typeof t){const n=Ct.getSlate(e,{at:t}),r=Ct.getBlock(e,{at:t}),o=e.blocks[(null==r?void 0:r.type)||""];if(!n||(null==o?void 0:o.hasCustomEditor))return;try{m.withoutNormalizing(n,(()=>{w.select(n,[0]),n.selection&&O.isExpanded(n.selection)&&(_.blur(n),_.deselect(n))}))}catch(e){}}},s=i=>{if(!t.current||e.readOnly)return;const l=document.elementFromPoint(i.clientX,i.clientY),s=null==l?void 0:l.closest("[data-yoopta-block]");s&&e.batchOperations((()=>{var t;const i=s.getAttribute("data-yoopta-block-id")||"",l=null===(t=e.children[i])||void 0===t?void 0:t.meta.order;if(n.current&&"number"==typeof l&&l===r.current)return o.current=l,void e.setPath({current:l,selected:[l]});if("number"==typeof l&&l!==o.current){o.current=l,n.current=!0;const t=Math.min(r.current,l),i=Math.max(r.current,l);a();const s=Array.from({length:i-t+1},((e,n)=>t+n));e.setPath({current:l,selected:s})}}))},c=()=>{var i,a;t.current=!1,n.current=!1,r.current=null,o.current=null,null===(i=e.refElement)||void 0===i||i.removeEventListener("mousemove",s),null===(a=e.refElement)||void 0===a||a.removeEventListener("mouseup",c),null===document||void 0===document||document.removeEventListener("mouseup",c)};return{onMouseDown:n=>{e.readOnly||e.batchOperations((()=>{var i,l,d;const u=Z.getSelectedPaths(e);Array.isArray(u)&&u.length>0&&!n.shiftKey&&!n.altKey&&e.setPath({current:null});const f=n.target.closest("[data-yoopta-block]");if(f&&0===n.button){const u=f.getAttribute("data-yoopta-block-id")||"",p=null===(i=e.children[u])||void 0===i?void 0:i.meta.order;if("number"==typeof p){if(t.current=!0,r.current=p,o.current=p,n.shiftKey&&!Z.isPathEmpty(e)&&p!==e.path.current)return void(t=>{a();const n=Z.getPath(e);if("number"!=typeof n)return;const r=Array.from({length:Math.abs(t-n)}).map(((e,r)=>t>n?n+r+1:n-r-1));e.setPath({current:t,selected:[...r,n]})})(p);p!==e.path.current&&e.setPath({current:p}),null===(l=e.refElement)||void 0===l||l.addEventListener("mousemove",s),null===(d=e.refElement)||void 0===d||d.addEventListener("mouseup",c),null===document||void 0===document||document.addEventListener("mouseup",c)}}}))},onShiftArrowUp:t=>{if("function"==typeof t.isDefaultPrevented&&t.isDefaultPrevented())return;if(i.selectionStarted&&null!==i.startedIndexToSelect&&null!==i.indexToSelect){const t=i.indexToSelect,n=t-1;if(0===t)return;if(t===i.startedIndexToSelect){const t=e.path.selected?[...e.path.selected,n]:[n];return e.setPath({current:n,selected:t}),void(i.indexToSelect=n)}if(n<i.startedIndexToSelect){const t=e.path.selected?[...e.path.selected,n]:[n];return e.setPath({current:n,selected:t}),void(i.indexToSelect=n)}const r=Z.getSelectedPaths(e);if((null==r?void 0:r.includes(t))&&t!==i.startedIndexToSelect){const o=r.filter((e=>e!==t));return e.setPath({current:n,selected:o}),void(i.indexToSelect=n)}return}const n=ne(e),r=re(e);if(!r||!r.selection||!n)return;const o=k.parent(r.selection.anchor.path),a=m.isStart(r,r.selection.focus,o);if(O.isExpanded(r.selection)&&a){const o=Y(e);if("number"!=typeof o)return;const a=ne(e,{at:o});if(n&&a){t.preventDefault(),_.blur(r),_.deselect(r),w.deselect(r);const o=e.path.selected?[...e.path.selected,null==n?void 0:n.meta.order,n.meta.order-1]:[null==n?void 0:n.meta.order,n.meta.order-1];e.setPath({current:null,selected:o}),i.startedIndexToSelect=n.meta.order,i.indexToSelect=n.meta.order-1,i.selectionStarted=!0}}},onShiftArrowDown:t=>{if(i.selectionStarted&&null!==i.indexToSelect&&null!==i.startedIndexToSelect){const t=i.indexToSelect,n=t+1;if(n===Object.keys(e.children).length)return;if(t===i.startedIndexToSelect){const t=e.path.selected?[...e.path.selected,n]:[n];return e.setPath({current:n,selected:t}),void(i.indexToSelect=n)}if(n>i.startedIndexToSelect){const t=e.path.selected?[...e.path.selected,n]:[n];return e.setPath({current:n,selected:t}),void(i.indexToSelect=n)}const r=Z.getSelectedPaths(e);if((null==r?void 0:r.includes(t))&&t!==i.startedIndexToSelect){const o=r.filter((e=>e!==t));return e.setPath({current:n,selected:o}),void(i.indexToSelect=n)}return}const n=ne(e),r=re(e);if(!r||!r.selection||!n)return;const o=k.parent(r.selection.anchor.path),a=m.isEnd(r,r.selection.focus,o);if(O.isExpanded(r.selection)&&a){const o=Z.getNextPath(e),a=ne(e,{at:o});if(n&&a){t.preventDefault(),_.blur(r),_.deselect(r),w.deselect(r);const o=e.path.selected?[...e.path.selected,null==n?void 0:n.meta.order,(null==n?void 0:n.meta.order)+1]:[null==n?void 0:n.meta.order,n.meta.order+1];e.setPath({current:null,selected:o}),i.startedIndexToSelect=n.meta.order,i.indexToSelect=n.meta.order+1,i.selectionStarted=!0}}},selectionState:i}}const Wl=({placeholder:n,marks:r,className:o,selectionBoxRoot:i,width:a,style:l,children:s,autoFocus:d=!0})=>{const u=Nt(),f=It(),p=Vl({editor:u,root:i}),h=Kl({editor:u});c((()=>{d&&!f&&u.focus()}),[d,f]),c((()=>{if(!f)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)}),[u.path,f]);const g=()=>{h.selectionState.indexToSelect=null,h.selectionState.startedIndexToSelect=null,h.selectionState.selectionStarted=!1},v=e=>{if(!f){if(kl.isRedo(e))return e.preventDefault(),void u.redo();if(kl.isUndo(e))return e.preventDefault(),void u.undo();if(kl.isSelect(e)){const t=Z.getSelectedPaths(u);if((null==t?void 0:t.length)===Object.keys(u.children).length)return void e.preventDefault();if(Array.isArray(t)&&t.length>0){e.preventDefault();const t=Object.keys(u.children).map(((e,t)=>t));return void u.setPath({current:null,selected:t})}}if(kl.isCopy(e)||kl.isCut(e)){const t=Z.getSelectedPaths(u);if(Array.isArray(t)&&t.length>0){e.preventDefault();const t=u.getHTML(u.getEditorValue()),n=u.getPlainText(u.getEditorValue()),r=new Blob([t],{type:"text/html"}),o=new Blob([n],{type:"text/plain"}),i=new ClipboardItem({"text/html":r,"text/plain":o});return navigator.clipboard.write([i]).then((()=>{const e=(new DOMParser).parseFromString(t,"text/html");console.log("HTML copied\n",e.body)})),void(kl.isCut(e)&&(u.batchOperations((()=>{const e=Z.getSelectedPaths(u);if(Array.isArray(e)&&e.length>0){const t=e.length===Object.keys(u.children).length;if(e.forEach((e=>{var t;const n=null===(t=Ct.getBlock(u,{at:e}))||void 0===t?void 0:t.id;n&&u.deleteBlock({blockId:n})})),t){const e=F({id:I()});u.insertBlock(e.type,{at:0,focus:!0})}}})),u.setPath({current:null,selected:null}),g()))}}if(kl.isBackspace(e)){e.stopPropagation();const t=Z.getSelectedPaths(u);return(null==t?void 0:t.length)===Object.keys(u.children).length?(e.preventDefault(),void u.batchOperations((()=>{Object.keys(u.children).forEach((e=>u.deleteBlock({blockId:e}))),u.setPath({current:null,selected:null}),g()}))):void u.batchOperations((()=>{const t=Z.getSelectedPaths(u);Array.isArray(t)&&(null==t?void 0:t.length)>0&&(e.preventDefault(),t.forEach((e=>u.deleteBlock({at:e}))),u.setPath({current:null,selected:null}),g())}))}if(kl.isShiftArrowUp(e)&&h.onShiftArrowUp(e),kl.isShiftArrowDown(e)&&h.onShiftArrowDown(e),kl.isTab(e)){const t=Z.getSelectedPaths(u);Array.isArray(t)&&t.length>0&&(e.preventDefault(),u.batchOperations((()=>{t.forEach((e=>{const t=Ct.getBlock(u,{at:e});u.increaseBlockDepth({blockId:null==t?void 0:t.id})}))})))}else if(kl.isShiftTab(e)){const t=Z.getSelectedPaths(u);Array.isArray(t)&&t.length>0&&(e.preventDefault(),u.batchOperations((()=>{t.forEach((e=>{const t=Ct.getBlock(u,{at:e});u.decreaseBlockDepth({blockId:null==t?void 0:t.id})}))})))}else;}},b=e=>{if(!f)return;const t=e.clipboardData,n=window.getSelection();if(n&&n.rangeCount>0){const e=n.getRangeAt(0);if(e.collapsed)return;const r=e.cloneContents().querySelectorAll("[data-yoopta-block-id]");if(!r.length)return;const o=Array.from(r).reduce(((e,t)=>{const n=t.getAttribute("data-yoopta-block-id")||"",r=u.children[n];return r&&(e[n]=r),e}),{}),i=u.getHTML(o),a=u.getPlainText(o);return t.setData("text/html",i),void t.setData("text/plain",a)}},w=(x={userSelect:p.selection?"none":"auto",pointerEvents:p.selection?"none":"auto",width:a||(null==l?void 0:l.width),paddingBottom:null==l?void 0:l.paddingBottom},Object.assign(Object.assign({},x),{width:x.width||400,paddingBottom:"number"==typeof x.paddingBottom?x.paddingBottom:100}));var x;return t("div",Object.assign({ref:e=>u.refElement=e,className:o?`yoopta-editor ${o}`:"yoopta-editor",style:w,onMouseDown:e=>{f||(h.onMouseDown(e),g(),(e=>{var t;const n=u.refElement;if(!n)return;const{bottom:r}=n.getBoundingClientRect(),o=r-parseInt(getComputedStyle(n).paddingBottom,10),i=F({id:I()});if(e.clientY>=o){const e=Object.keys(u.children).length-1,n=ne(u,{at:e}),r=re(u,{at:e});if(n&&r&&r.selection){const e=m.string(r,r.selection.anchor.path),o=k.parent(r.selection.anchor.path),[a]=m.node(r,o);if(n.type===i.type&&y.isElement(a)&&"void"!==(null===(t=a.props)||void 0===t?void 0:t.nodeType)&&0===e.trim().length)return void u.focusBlock(n.id,{slate:r})}const o=e+1;u.insertBlock(i.type,{at:o,focus:!0})}})(e))},onBlur:e=>{var t;if((null===(t=u.refElement)||void 0===t?void 0:t.contains(e.relatedTarget))||f)return;g();const n=Z.getSelectedPaths(u);Array.isArray(n)&&n.length>0&&u.setPath({current:null,selected:null})},onCopy:b,onCut:b},{children:[e(Hl,{editor:u,marks:r,placeholder:n}),!1!==i&&e($l,{origin:p.origin,coords:p.coords,isOpen:p.selection&&!f}),s]}))};function Yl({type:e,hotkey:t,render:n}){return{type:e,hotkey:t,render:n}}const Xl=Yl({type:"fakeSelection",render:t=>e("span",Object.assign({style:{backgroundColor:"#d7e6fa"}},{children:t.children}))}),ql=(()=>{const e=I();return{[e]:F({id:e})}})(),Zl=new Vt,Jl=(e,t)=>Zl.on(e,t),Gl=(e,t)=>Zl.once(e,t),Ql=(e,t)=>Zl.off(e,t),es=(e,t)=>Zl.emit(e,t);const ts=({id:t,editor:n,value:r,marks:o,plugins:i,autoFocus:a,className:l,tools:s,selectionBoxRoot:p,children:h,placeholder:g,readOnly:v,width:m,style:y,onChange:b})=>{const w=d((()=>o?[Xl,...o]:[Xl]),[o]),x=d((()=>i.map((e=>e.getPlugin))),[i]),[k,E]=f((()=>{n.id||(n.id=t||I()),n.readOnly=v||!1,w&&(n.formats=ge(n,w)),n.blocks=function(e,t){const n={};return t.forEach((t=>{var r;const o=V(t.elements),i=null===(r=null==o?void 0:o.props)||void 0===r?void 0:r.nodeType;if("inline"!==i&&"inlineVoid"!==i){const r={};Object.keys(t.elements).forEach((e=>{const n=ue(t.elements[e],["render"]);r[e]=n}));const{display:o,placeholder:i,shortcuts:a}=t.options||{};n[t.type]={type:t.type,elements:r,hasCustomEditor:!!t.customEditor,options:{display:o,placeholder:i,shortcuts:a},isActive:()=>{const n=ne(e,{at:e.path.current});return(null==n?void 0:n.type)===t.type}}}})),n}(n,x);const e=function(e){return!!e&&"object"==typeof e&&0!==Object.keys(e).length}(r);return e||void 0===r||console.error(`Initial value is not valid. Should be an object with blocks. You passed: ${JSON.stringify(r)}`),n.children=e?r:ql,n.blockEditorsMap=ve(n),n.shortcuts=function(e){const t={};return Object.values(e.blocks).forEach((e=>{var n,r,o,i;e.options&&Array.isArray(null===(n=e.options)||void 0===n?void 0:n.shortcuts)&&(null===(r=e.options)||void 0===r?void 0:r.shortcuts.length)>0&&(null===(i=null===(o=e.options)||void 0===o?void 0:o.shortcuts)||void 0===i||i.forEach((n=>{t[n]=e})))})),t}(n),n.plugins=function(e){const t={},n={};return e.forEach((e=>{e.elements&&Object.keys(e.elements).forEach((t=>{var r;const o=e.elements[t],i=null===(r=o.props)||void 0===r?void 0:r.nodeType;"inline"!==i&&"inlineVoid"!==i||(n[t]=Object.assign(Object.assign({},o),{rootPlugin:e.type}))})),t[e.type]=e})),e.forEach((e=>{if(e.elements){const r=Object.assign(Object.assign({},e.elements),n);t[e.type]=Object.assign(Object.assign({},e),{elements:r})}})),t}(x),n.commands=function(e,t){const n={};return t.forEach((t=>{t.commands&&Object.keys(t.commands).forEach((r=>{var o;(null===(o=t.commands)||void 0===o?void 0:o[r])&&(n[r]=(...n)=>{var o;return null===(o=t.commands)||void 0===o?void 0:o[r](e,...n)})}))})),n}(n,x),n.on=Jl,n.once=Gl,n.off=Ql,n.emit=es,{editor:n,version:0}})),[O,S]=f(null),C=u((e=>{S(e)}),[]),_=u(((e,t)=>{if(E((e=>({editor:e.editor,version:e.version+1}))),"function"==typeof b&&Array.isArray(t.operations)){t.operations.filter((e=>"normalize_block_paths"!==e.type&&"set_block_path"!==e.type&&"set_slate"!==e.type)).length>0&&b(e,t)}}),[]);return c((()=>{const e=e=>{_(e.value,{operations:e.operations})};return n.on("change",e),n.on("path-change",C),()=>{n.off("change",e),n.off("path-change",C)}}),[n,_]),e(Tt,Object.assign({editorState:k},{children:e(Ya,Object.assign({tools:s},{children:e(Wl,Object.assign({placeholder:g,marks:w,autoFocus:a,className:l,selectionBoxRoot:p,width:m,style:y},{children:h}))}))}))},ns=Object.assign(Object.assign({},rl),{ExtendedBlockActions:({id:r,className:o,style:i,onClick:a,children:l})=>{const s=It(),[c,d]=f(!1),{refs:u,floatingStyles:p,context:h}=Ca({placement:"bottom-start",open:c,onOpenChange:d,middleware:[Ri(),ji(),Di(),ui(10)],whileElementsMounted:_i}),{isMounted:g,styles:v}=Ra(h,{duration:100}),m=Object.assign(Object.assign({},v),p);return s?null:t(n,{children:[g&&e(nl,Object.assign({isOpen:!0,onClose:()=>d(!1),refs:u,style:m},{children:l})),e("button",Object.assign({type:"button",contentEditable:!1,ref:u.setReference,id:r,className:`yoopta-button yoopta-extended-block-actions ${o||""}`,onClick:()=>{null==a||a(),d(!0)},style:c?Object.assign(Object.assign({},i),{opacity:1}):i},{children:e(Ia,{})}))]})},Portal:Ja,Overlay:Za});function rs(e,t){var n;const r=[];return t.forEach((t=>{if(t.nodeType===Node.TEXT_NODE&&r.push({text:t.textContent||""}),t.nodeType===Node.ELEMENT_NODE){const n=t;"P"!==n.nodeName&&"SPAN"!==n.nodeName&&"DIV"!==n.nodeName||r.push(Object.assign({},rs(e,n.childNodes)[0])),"B"!==n.nodeName&&"STRONG"!==n.nodeName||r.push(Object.assign({bold:!0},rs(e,n.childNodes)[0])),"I"!==n.nodeName&&"EM"!==n.nodeName||r.push(Object.assign({italic:!0},rs(e,n.childNodes)[0])),"S"!==n.nodeName&&"STRIKE"!==n.nodeName||r.push(Object.assign({strike:!0},rs(e,n.childNodes)[0])),"U"!==n.nodeName&&"INS"!==n.nodeName||r.push(Object.assign({underline:!0},rs(e,n.childNodes)[0])),"CODE"===n.nodeName&&r.push(Object.assign({code:!0},rs(e,n.childNodes)[0])),"A"===n.nodeName&&r.push({id:I(),type:"link",props:{url:n.getAttribute("href")||"",target:n.getAttribute("target")||"",rel:n.getAttribute("rel")||""},children:rs(e,n.childNodes)})}})),0!==r.length||(null===(n=r[0])||void 0===n?void 0:n.text)||r.push({text:""}),r}function os(e){return e.map((e=>{if("text"in e){let t=e.text;return e.bold&&(t=`<b>${t}</b>`),e.italic&&(t=`<i>${t}</i>`),e.strike&&(t=`<s>${t}</s>`),e.underline&&(t=`<u>${t}</u>`),e.code&&(t=`<code>${t}</code>`),t}if("link"===e.type){const{url:t,target:n,rel:r}=e.props;return`<a href="${t}" target="${n}" rel="${r}">${os(e.children)}</a>`}return""})).join("")}function is(e){return e.map((e=>{if("text"in e){let t=e.text;return e.bold&&(t=`**${t}**`),e.italic&&(t=`*${t}*`),e.strike&&(t=`~~${t}~~`),e.underline&&(t=`<u>${t}</u>`),e.code&&(t=`\`${t}\``),t}if("link"===e.type){const{url:t,target:n,rel:r}=e.props;return`[${is(e.children)}](${t})`}return""})).join("")}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".yoo-editor-z-\\[100\\]{z-index:100}.yoo-editor-mr-2{margin-right:.5rem}.yoo-editor-h-4{height:1rem}.yoo-editor-w-4{width:1rem}.yoopta-editor *{border:0 solid #e5e7eb;box-sizing:border-box;scrollbar-color:#d3d1cb transparent}::-moz-selection{background:#c6ddf8}::selection{background:#c6ddf8}.yoopta-placeholder{display:contents;position:relative}.yoopta-placeholder:after{color:inherit;content:attr(data-placeholder);font-size:75%;font-style:inherit;font-weight:inherit;opacity:.5;padding-left:5px;position:absolute;text-indent:2px;top:50%;transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yoopta-button{background-color:transparent;border-style:none;cursor:pointer}.yoopta-block{border-radius:.25rem;margin-bottom:1px;margin-top:2px;padding:0 2px;position:relative}.yoopta-selection-block{background-color:#2383e224;border-radius:.25rem;height:100%;left:0;opacity:1;pointer-events:none;position:absolute;top:0;width:100%;z-index:90}.yoopta-block-actions{display:flex;left:-50px;opacity:0;position:absolute;top:2px;transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoopta-block-actions[data-hovered-state-open=true]{opacity:1}.yoopta-block-actions-plus{align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;border-style:none;color:#37352f59;cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition-duration:.18s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);width:24px}.yoopta-block-actions-plus:active,.yoopta-block-actions-plus:focus,.yoopta-block-actions-plus:hover{background-color:#37362f14}.yoopta-block-actions-drag{align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;border-style:none;color:#37352f59;cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition-duration:.18s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);width:18px}.yoopta-block-actions-drag:active,.yoopta-block-actions-drag:focus,.yoopta-block-actions-drag:hover{background-color:#37362f14}.yoopta-slate:focus{outline:2px solid transparent;outline-offset:2px}.yoopta-slate:focus-visible{outline:2px solid transparent;outline-offset:2px}.yoopta-block-options-button{background-color:transparent;border-radius:.125rem;border-style:none;cursor:pointer;display:flex;justify-content:flex-start;line-height:120%;margin-left:4px;margin-right:4px;padding:.375rem .5rem;width:100%}.yoopta-block-options-button:hover{background-color:#37352f14}.yoopta-block-options-item{align-items:center;cursor:default;display:flex;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;position:relative;transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yoopta-block-options-item[data-disabled]{opacity:.5;pointer-events:none}.yoopta-extended-block-actions{--tw-bg-opacity:1;align-items:center;background-color:rgb(238 238 238/var(--tw-bg-opacity));border-radius:2px;border-style:none;cursor:pointer;display:flex;height:22px;justify-content:space-between;opacity:1;padding:0 4px;position:absolute;right:8px;top:8px;transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,1,1);width:22px;z-index:10}.yoopta-block-options-separator{background-color:#37352f14;height:1px;margin-bottom:4px;margin-top:4px;width:100%}.yoopta-block-options-menu-content{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(229 231 235/var(--tw-border-opacity));border-radius:.375rem;border-style:solid;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);min-width:200px;overflow:hidden;padding:6px 0;position:relative;width:auto}.yoopta-block-options-group{display:flex;flex-direction:column}.yoopta-align-left{justify-content:flex-start;text-align:left}.yoopta-align-center{justify-content:center;text-align:center}.yoopta-align-right{justify-content:flex-end;text-align:right}");export{Ct as Blocks,Et as Elements,kl as HOTKEYS,Z as Paths,ns as UI,M as YooptaPlugin,F as buildBlockData,z as buildBlockElement,K as buildBlockElementsStructure,pe as buildSlateEditor,At as createYooptaEditor,Yl as createYooptaMark,ts as default,rs as deserializeTextNodes,ne as findPluginBlockByPath,re as findSlateBySelectionPath,I as generateId,V as getRootBlockElement,H as getRootBlockElementType,os as serializeTextNodes,is as serializeTextNodesIntoMarkdown,Mt as useBlockData,Ft as useBlockSelected,Nt as useYooptaEditor,Lt as useYooptaFocused,zt as useYooptaPluginOptions,It as useYooptaReadOnly,Xa as useYooptaTools};
6
+ var Li=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Ii="undefined"==typeof Element,zi=Ii?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fi=!Ii&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Hi=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Vi=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Hi(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),s=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,s):o.push({scopeParent:a,candidates:s})}else{zi.call(a,Li)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),d=!Hi(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&d){var u=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return o},$i=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ui=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!$i(e)?0:e.tabIndex},Ki=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Wi=function(e){return"INPUT"===e.tagName},Yi=function(e){return function(e){return Wi(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Fi(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Xi=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},qi=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=zi.call(e,"details>summary:first-of-type")?e.parentElement:e;if(zi.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Xi(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,l=Fi(e);if(a&&!a.shadowRoot&&!0===r(a))return Xi(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,r,o,i=e&&Fi(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&a;){var s,c,d;l=!(null===(c=a=null===(s=i=Fi(a))||void 0===s?void 0:s.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(a))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Zi=function(e,t){return!(t.disabled||Hi(t)||function(e){return Wi(e)&&"hidden"===e.type}(t)||qi(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!zi.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Ji=function(e,t){return!(Yi(t)||Ui(t)<0||!Zi(e,t))},Gi=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Qi=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var n=Ui(e);return n<0&&t&&!$i(e)?0:n}(a,i),s=i?e(t.candidates):a;0===l?i?n.push.apply(n,s):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:s})})),r.sort(Ki).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},ea=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Vi([e],t.includeContainer,{filter:Ji.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Gi}):function(e,t,n){if(Hi(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Li));return t&&zi.call(e,Li)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Ji.bind(null,t)),Qi(n)};const ta=r["useInsertionEffect".toString()]||(e=>e());var na="undefined"!=typeof document?s:c;function ra(){return ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ra.apply(this,arguments)}let oa=!1,ia=0;const aa=()=>"floating-ui-"+ia++;const la=r["useId".toString()]||function(){const[e,t]=r.useState((()=>oa?aa():void 0));return na((()=>{null==e&&t(aa())}),[]),r.useEffect((()=>{oa||(oa=!0)}),[]),e};const sa=r.createContext(null),ca=r.createContext(null);function da(e){return"data-floating-ui-"+e}function ua(e){const t=l(e);return na((()=>{t.current=e})),t}const fa=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pa(e,t){const n=ea(e,fa());"prev"===t&&n.reverse();const r=n.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}((null==(o=e)?void 0:o.ownerDocument)||document));var o;return n.slice(r+1)[0]}function ha(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!function(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Po(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(n,r)}function ga(e){ea(e,fa()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function va(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const ma={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function ya(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const ba=r.forwardRef((function(e,t){const[n,o]=r.useState();na((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",ya),()=>{document.removeEventListener("keydown",ya)})),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[da("focus-guard")]:"",style:ma};return r.createElement("span",ra({},e,i))})),wa=r.createContext(null),xa=da("portal");function ka(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const a=function(e){let{id:t,root:n}=void 0===e?{}:e;const[o,i]=r.useState(null),a=la(),l=Ea(),s=r.useRef(null);return na((()=>()=>{null==o||o.remove(),queueMicrotask((()=>{s.current=null}))}),[o]),na((()=>{if(s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=a,n.setAttribute(xa,""),e.appendChild(n),s.current=n,i(n)}),[t,a]),na((()=>{if(s.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!Ro(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const o=document.createElement("div");o.id=a,o.setAttribute(xa,""),e=r||e,e.appendChild(o),s.current=o,i(o)}),[t,n,a,l]),o}({id:n,root:o}),[l,s]=r.useState(null),c=r.useRef(null),d=r.useRef(null),u=r.useRef(null),f=r.useRef(null),p=!!l&&!l.modal&&l.open&&i&&!(!o&&!a);return r.useEffect((()=>{if(a&&i&&(null==l||!l.modal))return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){if(a&&ha(e)){("focusin"===e.type?va:ga)(a)}}}),[a,i,null==l?void 0:l.modal]),r.createElement(wa.Provider,{value:r.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:s})),[i,a])},p&&a&&r.createElement(ba,{"data-type":"outside",ref:c,onFocus:e=>{if(ha(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=pa(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),p&&a&&r.createElement("span",{"aria-owns":a.id,style:ma}),a&&N(t,a),p&&a&&r.createElement(ba,{"data-type":"outside",ref:d,onFocus:e=>{if(ha(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=pa(document.body,"next")||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent))}}}))}const Ea=()=>r.useContext(wa),Oa=new Set,Sa=r.forwardRef((function(e,t){let{lockScroll:n=!1,...o}=e;const i=la();return na((()=>{if(!n)return;Oa.add(i);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",o&&(t[r]=o+"px"),e){var s,c;const e=(null==(s=window.visualViewport)?void 0:s.offsetLeft)||0,n=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(n))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{Oa.delete(i),0===Oa.size&&(Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,l)))}}),[i,n]),r.createElement("div",ra({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function Ca(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:o,nodeId:i}=e,[a,l]=r.useState(null),s=(null==(t=e.elements)?void 0:t.reference)||a,c=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:d}=e,[u,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Bi(p,o)||h(o);const[g,v]=r.useState(null),[m,y]=r.useState(null),b=r.useCallback((e=>{e!==E.current&&(E.current=e,v(e))}),[]),w=r.useCallback((e=>{e!==O.current&&(O.current=e,y(e))}),[]),x=a||g,k=l||m,E=r.useRef(null),O=r.useRef(null),S=r.useRef(u),C=null!=c,_=Mi(c),D=Mi(i),j=r.useCallback((()=>{if(!E.current||!O.current)return;const e={placement:t,strategy:n,middleware:p};D.current&&(e.platform=D.current),Ai(E.current,O.current,e).then((e=>{const t={...e,isPositioned:!0};R.current&&!Bi(S.current,t)&&(S.current=t,B.flushSync((()=>{f(t)})))}))}),[p,t,n,D]);Pi((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const R=r.useRef(!1);Pi((()=>(R.current=!0,()=>{R.current=!1})),[]),Pi((()=>{if(x&&(E.current=x),k&&(O.current=k),x&&k){if(_.current)return _.current(x,k,j);j()}}),[x,k,j,_,C]);const A=r.useMemo((()=>({reference:E,floating:O,setReference:b,setFloating:w})),[b,w]),P=r.useMemo((()=>({reference:x,floating:k})),[x,k]),T=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Ni(P.floating,u.x),r=Ni(P.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Ti(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,P.floating,u.x,u.y]);return r.useMemo((()=>({...u,update:j,refs:A,elements:P,floatingStyles:T})),[u,j,A,P,T])}(e),d=r.useContext(ca),u=null!=((null==(f=r.useContext(sa))?void 0:f.id)||null);var f;const p=function(e){const t=r.useRef((()=>{}));return ta((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,n)=>{e&&(g.current.openEvent=t),v.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==o||o(e,t,n)})),h=r.useRef(null),g=r.useRef({}),v=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}()))[0],m=la(),y=r.useCallback((e=>{const t=Ro(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c.refs.setReference(t)}),[c.refs]),b=r.useCallback((e=>{(Ro(e)||null===e)&&(h.current=e,l(e)),(Ro(c.refs.reference.current)||null===c.refs.reference.current||null!==e&&!Ro(e))&&c.refs.setReference(e)}),[c.refs]),w=r.useMemo((()=>({...c.refs,setReference:b,setPositionReference:y,domReference:h})),[c.refs,b,y]),x=r.useMemo((()=>({...c.elements,domReference:s})),[c.elements,s]),k=r.useMemo((()=>({...c,refs:w,elements:x,dataRef:g,nodeId:i,floatingId:m,events:v,open:n,onOpenChange:p})),[c,i,m,v,n,p,w,x]);return na((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===i));e&&(e.context=k)})),r.useMemo((()=>({...c,context:k,refs:w,elements:x})),[c,w,x,k])}const _a=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Da(e,t){return"function"==typeof e?e(t):e}function ja(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,s]=r.useState(!1),[c,d]=r.useState("unmounted"),u=function(e,t){const[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect((()=>{if(!e){const e=setTimeout((()=>o(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,a);return na((()=>{l&&!u&&d("unmounted")}),[l,u]),na((()=>{if(o){if(n){d("initial");const e=requestAnimationFrame((()=>{d("open")}));return()=>{cancelAnimationFrame(e)}}s(!0),d("close")}}),[n,o]),{isMounted:u,status:c}}function Ra(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:i,common:a,duration:l=250}=t,s=e.placement,c=s.split("-")[0],d=r.useMemo((()=>({side:c,placement:s})),[c,s]),u="number"==typeof l,f=(u?l:l.open)||0,p=(u?l:l.close)||0,[h,g]=r.useState((()=>({...Da(a,d),...Da(n,d)}))),{isMounted:v,status:m}=ja(e,{duration:l}),y=ua(n),b=ua(o),w=ua(i),x=ua(a);return na((()=>{const e=Da(y.current,d),t=Da(w.current,d),n=Da(x.current,d),r=Da(b.current,d)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===m&&g((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===m&&g({transitionProperty:Object.keys(r).map(_a).join(","),transitionDuration:f+"ms",...n,...r}),"close"===m){const r=t||e;g({transitionProperty:Object.keys(r).map(_a).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,w,y,b,x,f,m,d]),{isMounted:v,styles:h}}var Aa;function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pa.apply(this,arguments)}var Ba=function(e){return r.createElement("svg",Pa({viewBox:"0 0 16 16",className:"turn_svg__loop",style:{width:16,height:16,display:"block",fill:"currentcolor",flexShrink:0,backfaceVisibility:"hidden"}},e),Aa||(Aa=r.createElement("path",{d:"M5.804 3.123c.006.38.254.622.673.622h4.887c.59 0 .914.305.914.92v6.628l-.901-.978-.514-.514c-.267-.254-.629-.273-.895-.013-.254.26-.248.635.012.895l2.165 2.158c.476.47 1.022.47 1.498 0l2.165-2.158c.26-.26.266-.635.012-.895-.266-.26-.628-.241-.895.013l-.514.514-.895.971V4.564c0-1.358-.71-2.063-2.082-2.063H6.477c-.42 0-.68.241-.673.622ZM.186 7.06c.26.266.622.247.889-.013l.52-.508.889-.971v6.722c0 1.359.71 2.063 2.082 2.063h4.957c.42 0 .68-.241.673-.622-.006-.387-.254-.622-.673-.622h-4.88c-.591 0-.915-.311-.915-.927V5.554l.895.984.52.508c.26.26.629.28.89.013.26-.26.253-.629-.013-.89L3.855 4.013c-.476-.476-1.016-.476-1.492 0L.2 6.17c-.267.26-.273.628-.013.889Z"})))};function Ta(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Na=["color"],Ma=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ta(e,Na);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),La=["color"],Ia=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ta(e,La);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),za=["color"],Fa=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ta(e,za);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Ha=["color"],Va=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ta(e,Ha);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),$a=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},Ua={"text/plain":"Text","text/html":"Url",default:"Text"};var Ka=function(e,t){var n,r,o,i,a,l,s=!1;t||(t={}),n=t.debug||!1;try{if(o=$a(),i=document.createRange(),a=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=Ua[t.format]||Ua.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");s=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),s=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),l&&document.body.removeChild(l),o()}return s};const Wa=i(void 0),Ya=({children:r,tools:o})=>{const i=It(),a=d((()=>o?Object.keys(o).reduce(((e,t)=>{var n;return Object.assign(Object.assign({},e),{[t]:null===(n=o[t])||void 0===n?void 0:n.render})}),{}):{}),[o]),l=d((()=>!o||i?null:Object.keys(o).map((t=>{var n,r,i;const a=null===(n=null==o?void 0:o[t])||void 0===n?void 0:n.tool,l=null===(r=null==o?void 0:o[t])||void 0===r?void 0:r.render,s=null===(i=null==o?void 0:o[t])||void 0===i?void 0:i.props;return a?e(a,Object.assign({render:l},s),t):null}))),[o]);return e(Wa.Provider,Object.assign({value:a},{children:t(n,{children:[l,r]})}))},Xa=()=>{const e=a(Wa);if(void 0===e)throw new Error("useYooptaTools must be used within a ToolsProvider");return e};function qa({editor:e,view:t,onClose:n,mode:r="toggle"}){return{actions:(()=>{let t=Object.keys(e.blocks);return"toggle"===r&&(t=t.filter((t=>function(e,t){var n;const r=e.blocks[t];if(!r)return!1;const o=V(r.elements);return"void"!==(null===(n=null==o?void 0:o.props)||void 0===n?void 0:n.nodeType)}(e,t)))),t.map((t=>{var n,r,o,i,a,l;return{type:t,title:(null===(r=null===(n=e.blocks[t].options)||void 0===n?void 0:n.display)||void 0===r?void 0:r.title)||t,description:null===(i=null===(o=e.blocks[t].options)||void 0===o?void 0:o.display)||void 0===i?void 0:i.description,icon:null===(l=null===(a=e.blocks[t].options)||void 0===a?void 0:a.display)||void 0===l?void 0:l.icon}}))})(),onClose:n,empty:!1,getItemProps:t=>({onMouseEnter:()=>{},"data-action-menu-item":!0,"data-action-menu-item-type":t,"aria-selected":!1,onClick:()=>{e.toggleBlock(t,{deleteText:"toggle"===r,focus:!0}),n()}}),getRootProps:()=>({"data-action-menu-list":!0}),editor:e,view:t}}const Za=t=>{var{className:n,children:r,lockScroll:o=!0}=t,i=ue(t,["className","children","lockScroll"]);return e(Sa,Object.assign({lockScroll:o,className:n},i,{onClick:e=>{var t;e.stopPropagation(),null===(t=i.onClick)||void 0===t||t.call(i,e)},onMouseDown:e=>{var t;e.stopPropagation(),null===(t=i.onMouseDown)||void 0===t||t.call(i,e)}},{children:r}))},Ja=t=>{const[n,r]=f(!1),o=l(null),i=Nt();return c((()=>{r(!0);const e=i.refElement;if(!e)return;return e.querySelector(".yoopta-overlays")||(o.current=document.createElement("div"),o.current.className="yoopta-overlays",e.appendChild(o.current)),()=>{o.current&&o.current.remove()}}),[]),n?e(ka,Object.assign({id:`${t.id}-${i.id}`,root:o.current||i.refElement},{children:t.children})):null},Ga=({children:t})=>e("div",Object.assign({className:"yoopta-block-options-group"},{children:t})),Qa=({children:t})=>e("div",Object.assign({onClick:e=>e.stopPropagation(),className:"yoopta-block-options-menu-content data-[state=open]:yoo-editor-animate-in data-[state=closed]:yoo-editor-animate-out data-[state=closed]:yoo-editor-fade-out-0 data-[state=open]:yoo-editor-fade-in-0 data-[state=closed]:yoo-editor-zoom-out-95 data-[state=open]:yoo-editor-zoom-in-95 data-[side=bottom]:yoo-editor-slide-in-from-top-2 data-[side=left]:yoo-editor-slide-in-from-right-2 data-[side=right]:yoo-editor-slide-in-from-left-2 data-[side=top]:yoo-editor-slide-in-from-bottom-2"},{children:t})),el=({children:t})=>e("div",Object.assign({className:"yoopta-block-options-item"},{children:t})),tl=["delete","duplicate","turnInto","copy"],nl=({isOpen:n,onClose:r,refs:o,style:i,actions:a=tl,children:l})=>{var s,c,d;const u=Nt(),p=Xa(),[h,g]=f(!1),{refs:v,floatingStyles:m,context:y}=Ca({placement:"right",open:h,onOpenChange:g,middleware:[Ri(),ji(),Di(),ui(10)],whileElementsMounted:_i}),{isMounted:b,styles:w}=Ra(y,{duration:100});if(!n)return null;const x=ne(u,{at:u.path.current}),k=V(null===(s=u.blocks[(null==x?void 0:x.type)||""])||void 0===s?void 0:s.elements),E="void"===(null===(c=null==k?void 0:k.props)||void 0===c?void 0:c.nodeType),O=p.ActionMenu,S=Object.assign(Object.assign({},m),w),C=qa({editor:u,view:"small",onClose:()=>{g(!1),r()}});return e(Ja,Object.assign({id:"yoo-block-options-portal"},{children:e(Za,Object.assign({lockScroll:!0,className:"yoo-editor-z-[100]",onClick:r},{children:e("div",Object.assign({style:i,ref:o.setFloating,contentEditable:!1},{children:t(Qa,{children:[null!==a&&t(Ga,{children:[e(el,{children:t("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{u.deleteBlock({at:u.path.current}),u.setPath({current:null}),r()}},{children:[e(Va,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Delete"]}))}),e(el,{children:t("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{"number"==typeof u.path.current&&(u.duplicateBlock({original:{path:u.path.current},focus:!0}),r())}},{children:[e(Ma,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Duplicate"]}))}),!!O&&!E&&!(null===(d=u.blocks[(null==x?void 0:x.type)||""])||void 0===d?void 0:d.hasCustomEditor)&&t(el,{children:[b&&e(Ja,Object.assign({id:"yoo-block-options-portal"},{children:e(Za,Object.assign({lockScroll:!0,className:"yoo-editor-z-[100]",onClick:()=>g(!1)},{children:e("div",Object.assign({style:S,ref:v.setFloating},{children:e(O,Object.assign({},C))}))}))})),t("button",Object.assign({type:"button",className:"yoopta-block-options-button",ref:v.setReference,onClick:()=>g((e=>!e))},{children:[e(Ba,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Turn into"]}))]}),e(el,{children:t("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{const e=ne(u);e&&(Ka(`${window.location.origin}${window.location.pathname}#${e.id}`),u.emit("block:copy",e)),r()}},{children:[e(Fa,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Copy link to block"]}))})]}),l]})}))}))}))};var rl=Object.freeze({__proto__:null,BlockOptions:nl,BlockOptionsMenuContent:Qa,BlockOptionsMenuGroup:Ga,BlockOptionsMenuItem:el,BlockOptionsSeparator:({className:t=""})=>e("div",{className:`yoopta-block-options-separator ${t}`})});const ol=({block:n,editor:r,dragHandleProps:o,onChangeActiveBlock:i,showActions:a})=>{const[l,s]=f(!1),{isActionMenuOpen:c,actionMenuRefs:d,hasActionMenu:u,actionMenuStyles:p,onChangeActionMenuOpen:h,onCloseActionMenu:g,actionMenuRenderProps:v,ActionMenu:y}=(({editor:e})=>{const t=Xa().ActionMenu,[n,r]=f(!1),{refs:o,floatingStyles:i,context:a}=Ca({placement:"bottom-start",open:n,onOpenChange:r,middleware:[Ri(),ji(),Di(),ui(10)],whileElementsMounted:_i}),{isMounted:l,styles:s}=Ra(a,{duration:100}),c=Object.assign(Object.assign({},i),s),d=e=>r(e),u=()=>d(!1),p=qa({editor:e,view:"default",mode:"create",onClose:u});return{isActionMenuOpen:l,actionMenuStyles:c,actionMenuRefs:o,hasActionMenu:!!t,onChangeActionMenuOpen:d,actionMenuRenderProps:p,onCloseActionMenu:u,ActionMenu:t}})({editor:r}),{refs:b,floatingStyles:x,context:k}=Ca({placement:"right-start",open:l,onOpenChange:s,middleware:[Ri(),ji(),Di(),ui()]}),{isMounted:E,styles:O}=Ra(k,{duration:100}),{setActivatorNodeRef:S,attributes:C,listeners:D}=o,j=Object.assign(Object.assign({},x),O);return t("div",Object.assign({contentEditable:!1,"data-hovered-state-open":a,className:"yoopta-block-actions"},{children:[c&&u&&e(Ja,Object.assign({id:"yoo-block-options-portal"},{children:e(Za,Object.assign({lockScroll:!0,className:"yoo-editor-z-[100]",onClick:g},{children:e("div",Object.assign({style:p,ref:d.setFloating},{children:e(y,Object.assign({},v))}))}))})),e("button",Object.assign({type:"button",onClick:()=>{var e;const t=re(r,{at:n.meta.order}),o=r.blocks[n.type];if(!t)return;const i=document.querySelector(`[data-yoopta-block-id="${n.id}"]`),a=V(o.elements);let l;o.hasCustomEditor||(l=m.string(t,[0]));const s="string"==typeof l&&0===l.trim().length;if(u&&s&&"void"!==(null===(e=null==a?void 0:a.props)||void 0===e?void 0:e.nodeType))r.setPath({current:n.meta.order}),r.focusBlock(n.id),d.setReference(i),h(!0);else{const e=Ct.buildBlockData({id:I()}),t=n.meta.order+1;r.setPath({current:n.meta.order}),r.insertBlock(e.type,{at:t,focus:!0}),u&&setTimeout((()=>{i&&d.setReference(i.nextSibling),h(!0)}),0)}},className:"yoopta-block-actions-plus"},{children:e(So,{})})),e("button",Object.assign({type:"button",className:"yoopta-block-actions-drag",ref:e=>{S(e),b.setReference(e)}},C,D,{onClick:e=>{e.stopPropagation(),i(n.id);const t=re(r,{at:n.meta.order});r.focusBlock(n.id),t&&setTimeout((()=>{r.blocks[n.type].hasCustomEditor||(_.blur(t),_.deselect(t),w.deselect(t)),r.setPath({current:n.meta.order,selected:[n.meta.order]}),s(!0)}),10)},onMouseDown:e=>e.stopPropagation()},{children:e(Eo,{})})),e(nl,{isOpen:E,refs:b,style:j,onClose:()=>s(!1)})]}))},il=({children:n,block:r,blockId:i})=>{const a=Nt(),[l,s]=o.useState(null),{attributes:c,listeners:f,setNodeRef:p,setActivatorNodeRef:h,transform:g,transition:v,isOver:m,isDragging:y}=go({id:i,disabled:a.readOnly}),b=((e,t,n,r,o)=>d((()=>({container:{marginLeft:20*e.meta.depth+"px",transform:t?`translate3d(${t.x}px, ${t.y}px, 0)`:"none",transition:n,opacity:r?.7:1},content:o&&!r?{borderBottom:"2px solid #007aff"}:void 0})),[e.meta.depth,t,n,r,o]))(r,g,v,y,m),w=`yoopta-block yoopta-align-${r.meta.align||"left"}`,x=Z.isBlockSelected(a,r),k=l===i,E=u((()=>{a.readOnly||s(i)}),[a.readOnly,i]),O=u((()=>{a.readOnly||s(null)}),[a.readOnly]),S=d((()=>({setActivatorNodeRef:h,attributes:c,listeners:f})),[r]);return t("div",Object.assign({ref:p,className:w,onMouseEnter:E,onMouseLeave:O,style:b.container,"data-hovered-block":k,"data-yoopta-block":!0,"data-yoopta-block-id":i,"data-yoopta-block-type":r.type},{children:[!a.readOnly&&e(ol,{block:r,editor:a,dragHandleProps:S,showActions:k,onChangeActiveBlock:s}),e("div",Object.assign({style:b.content},{children:n})),x&&!a.readOnly&&e("div",{className:"yoopta-selection-block"})]}))};var al={};Object.defineProperty(al,"__esModule",{value:!0});for(var ll="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),sl={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},cl={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ll?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},dl={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},ul=1;ul<20;ul++)dl["f"+ul]=111+ul;function fl(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return pl(e,t)})),o=function(e){return r.some((function(t){return hl(t,e)}))};return null==n?o:o(n)}function pl(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),i=o.length;for(var a in sl)r[sl[a]]=!1;var l=!0,s=!1,c=void 0;try{for(var d,u=o[Symbol.iterator]();!(l=(d=u.next()).done);l=!0){var f=d.value,p=f.endsWith("?")&&f.length>1;p&&(f=f.slice(0,-1));var h=vl(f),g=sl[h];if(f.length>1&&!g&&!cl[f]&&!dl[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&g||(n?r.key=h:r.which=gl(f)),g&&(r[g]=!p||null)}}catch(e){s=!0,c=e}finally{try{!l&&u.return&&u.return()}finally{if(s)throw c}}return r}function hl(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function gl(e){return e=vl(e),dl[e]||e.toUpperCase().charCodeAt(0)}function vl(e){return e=e.toLowerCase(),e=cl[e]||e}al.default=fl,al.isHotkey=fl,al.isCodeHotkey=function(e,t){return fl(e,t)};var ml=al.isKeyHotkey=function(e,t){return fl(e,{byKey:!0},t)};al.parseHotkey=pl,al.compareHotkey=hl,al.toKeyCode=gl,al.toKeyName=vl;const yl={bold:"mod+b",italic:"mod+i",compose:["down","left","right","up","backspace","enter"],arrowLeft:"left",arrowUp:"up",arrowDown:"down",arrowRight:"right",ctrlLeft:"ctrl+left",escape:"esc",ctrlRight:"ctrl+right",deleteBackward:"shift?+backspace",backspace:"backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",shiftDelete:"shift+delete",extendForward:"shift+right",shiftEnter:"shift+enter",enter:"enter",space:"space",undo:"mod+z",select:"mod+a",shiftTab:"shift+tab",shiftArrowUp:"shift+up",shiftArrowDown:"shift+down",tab:"tab",cmd:"mod",cmdEnter:"mod+enter",cmdShiftEnter:"mod+shift+enter",slashCommand:"/",copy:"mod+c",cut:"mod+x",cmdShiftRight:"mod+shift+right",cmdShiftLeft:"mod+shift+left",cmdShiftDelete:"mod+shift+backspace",cmdShiftD:"mod+shift+d",cmdAltDelete:"mod+alt+backspace"},bl={moveLineBackward:"opt+up",moveLineForward:"opt+down",ctrlLeft:"opt+left",ctrlRight:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},wl={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},xl=e=>{const t=yl[e],n=bl[e],r=wl[e],o=t&&ml(t),i=n&&ml(n),a=r&&ml(r);return e=>!(!o||!o(e))||(!(!i||!i(e))||!(!a||!a(e)))},kl={isBold:xl("bold"),isCompose:xl("compose"),isArrowLeft:xl("arrowLeft"),isArrowRight:xl("arrowRight"),isArrowUp:xl("arrowUp"),isArrowDown:xl("arrowDown"),isDeleteBackward:xl("deleteBackward"),isDeleteForward:xl("deleteForward"),isDeleteLineBackward:xl("deleteLineBackward"),isDeleteLineForward:xl("deleteLineForward"),isDeleteWordBackward:xl("deleteWordBackward"),isDeleteWordForward:xl("deleteWordForward"),isExtendBackward:xl("extendBackward"),isExtendForward:xl("extendForward"),isExtendLineBackward:xl("extendLineBackward"),isExtendLineForward:xl("extendLineForward"),isItalic:xl("italic"),isMoveLineBackward:xl("moveLineBackward"),isMoveLineForward:xl("moveLineForward"),isCtrlLeft:xl("ctrlLeft"),isCtrlRight:xl("ctrlRight"),isRedo:xl("redo"),isShiftEnter:xl("shiftEnter"),isEnter:xl("enter"),isTransposeCharacter:xl("transposeCharacter"),isUndo:xl("undo"),isSpace:xl("space"),isSelect:xl("select"),isTab:xl("tab"),isShiftTab:xl("shiftTab"),isBackspace:xl("backspace"),isCmdEnter:xl("cmdEnter"),isCmd:xl("cmd"),isEscape:xl("escape"),isSlashCommand:xl("slashCommand"),isShiftArrowUp:xl("shiftArrowUp"),isShiftArrowDown:xl("shiftArrowDown"),isCopy:xl("copy"),isCut:xl("cut"),isShiftDelete:xl("shiftDelete"),isCmdShiftEnter:xl("cmdShiftEnter"),isCmdShiftRight:xl("cmdShiftRight"),isCmdShiftLeft:xl("cmdShiftLeft"),isCmdShiftDelete:xl("cmdShiftDelete"),isCmdAltDelete:xl("cmdAltDelete"),isCmdShiftD:xl("cmdShiftD")};const El={onKeyDown:function(e){return t=>{const n=re(e,{at:e.path.current});if(kl.isShiftEnter(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;return t.preventDefault(),void n.insertText("\n")}if(kl.isUndo(t))t.preventDefault();else if(kl.isRedo(t))t.preventDefault();else if(kl.isEnter(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;t.preventDefault();const r=m.first(n,[]),o=m.last(n,[]),i=m.isStart(n,n.selection.anchor,r[1]),a=m.isEnd(n,n.selection.anchor,o[1]);if(!i&&!a)return void e.splitBlock({slate:n,focus:!0});const l=Ct.getBlock(e,{at:e.path.current}),s=Ct.buildBlockData({id:I()}),c=m.string(n,[]),d=i&&c.length>0,u=Z.getNextPath(e);e.batchOperations((()=>{e.insertBlock(s.type,{at:d?e.path.current:u,focus:!d}),d&&l&&e.focusBlock(l.id)}))}else if(kl.isBackspace(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;const r=k.parent(n.selection.anchor.path);if(m.isStart(n,n.selection.anchor,r)){t.preventDefault();if(0===m.string(n,r).trim().length)return void e.deleteBlock({at:e.path.current,focus:!0});{if(O.isExpanded(n.selection))return w.delete(n,{at:n.selection});const t=Ct.getBlock(e,{at:Z.getPreviousPath(e)}),r=Ct.getSlate(e,{id:null==t?void 0:t.id});if(t&&r){const{node:n}=function(e){const t=m.last(e,[]);return{node:t[0],path:t[1]}}(r);if(0===E.string(n).trim().length)return e.deleteBlock({blockId:t.id,focus:!1}),void e.setPath({current:t.meta.order})}e.mergeBlock()}}}else{if(kl.isSelect(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;const[,r]=m.first(n,[0]),[,o]=m.last(n,[n.children.length-1]),i=m.range(n,r,o),a=O.equals(n.selection,i),l=0===m.string(n,i).trim().length;if(O.isExpanded(n.selection)&&a||l){t.preventDefault(),_.blur(n),_.deselect(n),w.deselect(n);const r=Array.from({length:Object.keys(e.children).length},((e,t)=>t));return void e.setPath({current:null,selected:r})}}if(kl.isShiftTab(t)){if(t.isDefaultPrevented())return;t.preventDefault();const n=e.path.selected;return Array.isArray(n)&&n.length>0?void e.batchOperations((()=>{n.forEach((t=>{const n=Ct.getBlock(e,{at:t});n&&n.meta.depth>0&&e.decreaseBlockDepth({at:t})}))})):void e.decreaseBlockDepth()}if(kl.isTab(t)){if(t.isDefaultPrevented())return;t.preventDefault();const n=e.path.selected;return Array.isArray(n)&&n.length>0?void e.batchOperations((()=>{n.forEach((t=>{e.increaseBlockDepth({at:t})}))})):void e.increaseBlockDepth()}if(kl.isArrowUp(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;if(1===new Set(n.selection.anchor.path).size){const n=Z.getPreviousPath(e),r=re(e,{at:n}),o=ne(e,{at:n}),i=e.blocks[(null==o?void 0:o.type)||""];if(r&&o&&!(null==i?void 0:i.hasCustomEditor)){const[,n]=m.last(r,[0]),i={path:n,offset:m.string(r,n).length};return t.preventDefault(),void e.focusBlock(o.id,{focusAt:i,waitExecution:!1,shouldUpdateBlockSelection:!0})}}}if(kl.isArrowDown(t)){if(t.isDefaultPrevented())return;if(!n||!n.selection)return;const r=k.parent(n.selection.anchor.path);if(m.isEnd(n,n.selection.anchor,r)){const n=Z.getNextPath(e),o=re(e,{at:n}),i=ne(e,{at:n}),a=e.blocks[(null==i?void 0:i.type)||""];if(o&&i&&!(null==a?void 0:a.hasCustomEditor)){const n=function(e,t){try{const[,n]=m.first(e,t);return{path:n,offset:0}}catch(e){return{path:[0,0],offset:0}}}(o,r);return t.preventDefault(),void e.focusBlock(i.id,{focusAt:n,waitExecution:!1})}}}if(n&&n.selection&&O.isExpanded(n.selection)){if(Object.values(e.formats).length>0)for(const n of Object.values(e.formats))if(n.hotkey&&ml(n.hotkey)(t)){t.preventDefault(),e.formats[n.type].toggle();break}}}}}},Ol=({children:t,attributes:n,placeholder:r})=>{const o=j(),i=Object.assign({},n);return o&&r&&(i["data-placeholder"]=r,i.className="yoopta-placeholder"),e("span",Object.assign({},i,{children:t}))};function Sl(e){return!!(e&&e.id&&e.type&&e.value&&e.meta)}const Cl={B:{type:"bold"},STRONG:{type:"bold"},I:{type:"italic"},U:{type:"underline"},S:{type:"strike"},CODE:{type:"code"},EM:{type:"italic"}},_l=["left","center","right",void 0];function Dl(e,t,n,r){var o,i;let a;if(t.parse){a=t.parse(n,e);if(y.isElement(a)&&"inline"===(null===(o=a.props)||void 0===o?void 0:o.nodeType))return a}const l=e.blocks[t.type],s=H(l.elements)||"",c=l.elements[s],d="void"===(null===(i=c.props)||void 0===i?void 0:i.nodeType);let u={id:I(),type:s,children:d&&!l.hasCustomEditor?[{text:""}]:r.map(Rl).flat(),props:Object.assign({nodeType:"block"},c.props)};if(a)if(y.isElement(a))u=a;else if(Array.isArray(a)){return a}if(0===u.children.length&&(u.children=[{text:""}]),!a&&t.parse)return;const f=n.getAttribute("data-meta-align"),p=parseInt(n.getAttribute("data-meta-depth")||"0",10);return Ct.buildBlockData({id:I(),type:t.type,value:[u],meta:{order:0,depth:p,align:_l.includes(f)?f:void 0}})}function jl(e,t,n){var r;if(3===n.nodeType){return{text:null===(r=n.textContent)||void 0===r?void 0:r.replace(/[\t\n\r\f\v]+/g," ")}}if(1!==n.nodeType)return null;if("BR"===n.nodeName)return{text:"\n"};const o=n;let i=Array.from(o.childNodes).map((n=>jl(e,t,n))).flat().filter(Boolean);if(Cl[o.nodeName]){const e=Cl[o.nodeName].type;return i.map((t=>"string"==typeof t?{[e]:!0,text:t}:t.text?Object.assign(Object.assign({},t),{[e]:!0}):t))}const a=t[o.nodeName];if(a){if(Array.isArray(a)){return a.map((t=>Dl(e,t,o,i))).filter(Boolean)}return Dl(e,a,o,i)}return i}function Rl(e){if("string"==typeof e)return{text:e};if(y.isElement(e))return e;if(Array.isArray(e))return e.map(Rl).flat();if(null==e?void 0:e.text)return e;if(Sl(e)){return e.value[0].children.map(Rl).flat()}return{text:""}}function Al(e,t){console.log("pasted html",t);const n=function(e){const t={};return Object.keys(e.plugins).forEach((n=>{const r=e.plugins[n],{parsers:o}=r;if(o){const{html:e}=o;if(e){const{deserialize:r}=e;if(r){const{nodeNames:e}=r;e&&e.forEach((e=>{const o=t[e];if(o){const i=Array.isArray(o)?o:[o];t[e]=[...i,{type:n,parse:r.parse}]}else t[e]={type:n,parse:r.parse}}))}}}})),t}(e);return jl(e,n,t).flat().filter(Sl)}function Pl(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}const Bl=(e,t,n)=>{var r,o,i,a;(e=>{const[t]=m.nodes(e,{match:e=>!m.isEditor(e)&&y.isElement(e)&&"link"===e.type});return!!t})(t)&&(e=>{w.unwrapNodes(e,{match:e=>!m.isEditor(e)&&y.isElement(e)&&"link"===e.type})})(t);const{selection:l}=t,s=l&&O.isCollapsed(l),c=null===(a=null===(i=null===(o=null===(r=e.plugins)||void 0===r?void 0:r.LinkPlugin)||void 0===o?void 0:o.elements)||void 0===i?void 0:i.link)||void 0===a?void 0:a.props,d={type:"link",children:s?[{text:n}]:[],props:{url:n,target:(null==c?void 0:c.target)||"_self",rel:(null==c?void 0:c.rel)||"noopener noreferrer"}};s?w.insertNodes(t,d):(w.wrapNodes(t,d,{split:!0}),w.collapse(t,{edge:"end"}))},Tl=(e,t,n,r,o)=>d((()=>{let i=t.blockEditorsMap[e];const{normalizeNode:a,insertText:l,apply:s}=i,c=Object.keys(r);return c.forEach((e=>{var n;const o=null===(n=r[e].props)||void 0===n?void 0:n.nodeType,a="inline"===o,l="void"===o,s="inlineVoid"===o;s&&(i.markableVoid=t=>t.type===e),(l||s)&&(i.isVoid=t=>t.type===e),(a||s)&&(i.isInline=t=>t.type===e,i=((e,t)=>{const{insertData:n,insertText:r}=t;return t.insertText=n=>{console.log("insertText",n),console.log("insertText isUrl(text)",Pl(n)),n&&Pl(n)?Bl(e,t,n):r(n)},t.insertData=r=>{const o=r.getData("text/plain");console.log("insertData",o),console.log("insertData isUrl(text)",Pl(o)),o&&Pl(o)?Bl(e,t,o):n(r)},t})(t,i))})),i.insertText=e=>{const n=Z.getSelectedPaths(t),r=Z.getPath(t);Array.isArray(n)&&n.length>0&&t.setPath({current:r}),l(e)},i.normalizeNode=e=>{const[r,o]=e,l=t.blocks[n.type].elements;if(Object.keys(l).length>1)return a(e);if(y.isElement(r)){const{type:e}=r,t=H(l);if(!c.includes(e))return void w.setNodes(i,{type:t,props:Object.assign({},r.props)},{at:o});if(r.type===t)for(const[e,t]of E.children(i,o))if(y.isElement(e)&&!i.isInline(e))return void w.unwrapNodes(i,{at:t})}a(e)},i.apply=n=>{var r,o,a;if(C.isSelectionOperation(n)){const e=Z.getSelectedPaths(t),n=Z.getPath(t);Array.isArray(e)&&i.selection&&O.isExpanded(i.selection)&&t.setPath({current:n})}let l=jt.isSavingHistory(t);if(void 0===l&&(l=Nl(n)),l){const l=t.historyStack.undos[t.historyStack.undos.length-1];if(!l||"set_slate"!==(null===(r=null==l?void 0:l.operations[0])||void 0===r?void 0:r.type)){const r={type:"set_slate",properties:{slateOps:[n],selectionBefore:i.selection},blockId:e,slate:i};return t.applyTransforms([r],{source:"api"}),void s(n)}const c=null===(a=null===(o=null==l?void 0:l.operations[0])||void 0===o?void 0:o.properties)||void 0===a?void 0:a.slateOps,d=c&&c[c.length-1];let u=Ml(n,d);if(0!==i.operations.length&&(u=!0),u)d!==n&&c.push(n);else{const r={operations:[n],selectionBefore:i.selection},o={type:"set_slate",properties:{slateOps:r.operations,selectionBefore:r.selectionBefore},blockId:e,slate:i};t.applyTransforms([o],{source:"api"})}}s(n)},o&&(i=o(i,t,e)),i}),[]),Nl=e=>"set_selection"!==e.type,Ml=(e,t)=>t===e||(!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!k.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!k.equals(e.path,t.path))),Ll=({id:t,customEditor:n,elements:r,marks:o,events:i,options:a,extensions:s,placeholder:c="Type '/' for commands"})=>{const f=Nt(),p=Mt(t);let h=l(p.value).current;const g=d((()=>(e=>{const t={};return Object.keys(e).forEach((n=>t[n]=e[n].render)),t})(r)),[r]),v=d((()=>(e=>{const t={};return e?(e.forEach((e=>t[e.type]=e)),t):t})(o)),[o]),y=Tl(t,f,p,r,s),b=((e,t,n,r)=>d((()=>{if(!e||t.readOnly)return{};const o=ue(e||{},["onBeforeCreate","onDestroy","onCreate"]),i={hotkeys:kl,currentBlock:n,defaultBlock:Ct.buildBlockData({id:I()})},a={};return Object.keys(o).forEach((e=>{a[e]=function(n){o[e]&&o[e](t,r,i)(n)}})),a}),[e,t,n]))(i,f,p,y),w=u((e=>{f.updateBlock(t,{value:e})}),[t]),x=u((n=>{const r=g[n.element.type],{attributes:o}=n,i=ue(n,["attributes"]);return o["data-element-type"]=i.element.type,r?e(r,Object.assign({},i,{attributes:o,blockId:t,HTMLAttributes:null==a?void 0:a.HTMLAttributes})):e(P,Object.assign({},i,{attributes:o}))}),[r]),E=u((t=>{var n,r,o,i;let{children:a,leaf:l,attributes:s}=t;const d=ue(l,["text"]),u=f.path.current===p.meta.order;d&&Object.keys(d).forEach((e=>{const t=v[e];t&&(a=t.render({children:a,leaf:l}))}));const h=!("void"===(null===(i=null===(o=null===(r=null===(n=t.children)||void 0===n?void 0:n.props)||void 0===r?void 0:r.parent)||void 0===o?void 0:o.props)||void 0===i?void 0:i.nodeType))&&u&&l.withPlaceholder;return e(Ol,Object.assign({attributes:s,placeholder:h?c:void 0},{children:a}))}),[o]),S=u((e=>{var t;f.readOnly||(null===(t=b.onKeyDown)||void 0===t||t.call(b,e),El.onKeyDown(f)(e))}),[b.onKeyDown,f.readOnly,f.path.current,p.meta.order]),C=u((e=>{var t;f.readOnly||null===(t=null==b?void 0:b.onKeyUp)||void 0===t||t.call(b,e)}),[b.onKeyUp,f.readOnly]),D=u((e=>{var t;f.readOnly||(e.preventDefault(),null===(t=null==b?void 0:b.onBlur)||void 0===t||t.call(b,e))}),[b.onBlur,f.readOnly]),j=u((e=>{var t;f.readOnly||(f.isFocused()||(ee.set(f,!0),f.emit("focus",!0)),null===(t=null==b?void 0:b.onFocus)||void 0===t||t.call(b,e))}),[b.onFocus,f.readOnly]),R=u((e=>{var t;if(f.readOnly)return;null===(t=null==b?void 0:b.onPaste)||void 0===t||t.call(b,e);const n=e.clipboardData.getData("text/html"),r=(new DOMParser).parseFromString(n,"text/html");if(console.log("parsedHTML",r),r.body.childNodes.length>0){const t=Al(f,r.body);if(t.length>0&&null!==f.path.current){e.preventDefault();let n=!1,r=!1;if(y&&y.selection){const e=k.parent(y.selection.anchor.path),t=m.string(y,e).trim(),o=m.isStart(y,y.selection.anchor,e);r=""===t&&o,n=!o||t.length>0,_.blur(y)}const o=f.path.current;if(null===o)return;return void f.batchOperations((()=>{const e=[];r&&f.deleteBlock({at:o}),t.forEach(((t,r)=>{let i=n?o+r+1:o+r;e.push(i);const a=ue(t,["type"]);f.insertBlock(t.type,{at:i,focus:!1,blockData:a})})),f.setPath({current:null,selected:e})}))}}}),[b.onPaste,f.readOnly]),A=u((e=>{const t=[];if(f.readOnly)return t;const[n,r]=e,o=f.path.current===p.meta.order;return y.selection&&o&&!m.isEditor(n)&&""===m.string(y,[r[0]])&&O.includes(y.selection,r)&&O.isCollapsed(y.selection)&&t.push(Object.assign(Object.assign({},y.selection),{withPlaceholder:!0})),t}),[f.readOnly,f.path.current,p.meta.order]);return e(Il,{id:t,slate:y,initialValue:h,onChange:w,decorate:A,renderLeaf:E,renderElement:x,eventHandlers:b,onKeyDown:S,onKeyUp:C,onFocus:j,onBlur:D,customEditor:n,readOnly:f.readOnly,onPaste:R})},Il=p((({id:t,slate:n,initialValue:r,onChange:o,renderLeaf:i,renderElement:a,eventHandlers:l,onKeyDown:s,onKeyUp:c,onFocus:d,onBlur:u,onPaste:f,customEditor:p,decorate:h,readOnly:g})=>"function"==typeof p?p({blockId:t}):e(R,Object.assign({editor:n,initialValue:r,onValueChange:o},{children:e(A,Object.assign({renderElement:a,renderLeaf:i,className:"yoopta-slate",spellCheck:!0},l,{onKeyDown:s,onKeyUp:c,onFocus:d,decorate:h,readOnly:g,onPaste:f}),`editable-${t}`)}),`slate-${t}`)));Il.displayName="SlateEditorInstance";const zl=({editor:e})=>({sensors:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d((()=>[...t].filter((e=>null!=e))),[...t])}(En(hr,{activationConstraint:{distance:20}}),En(cr,{coordinateGetter:yo})),handleDragEnd:u((t=>{const{active:n,over:r}=t;if(n&&r&&n.id!==r.id){const t=e.children[r.id].meta.order;e.moveBlock(n.id,t)}}),[]),handleDragStart:u((t=>{e.setPath({current:null})}),[])}),Fl=[],Hl=({editor:t,marks:r,placeholder:o})=>{const i=It(),{sensors:a,handleDragEnd:l,handleDragStart:s}=zl({editor:t}),c=Object.keys(t.children),u=d((()=>0===c.length?Fl:c.sort(((e,n)=>t.children[e].meta.order-t.children[n].meta.order))),[c]),f=[];for(let n=0;n<u.length;n++){const i=u[n],a=t.children[i],l=t.plugins[a.type];a&&l?f.push(e(il,Object.assign({block:a,blockId:i},{children:e(Ll,{type:a.type,id:i,marks:r,customEditor:l.customEditor,events:l.events,elements:l.elements,options:l.options,extensions:l.extensions,placeholder:o},i)}),i)):console.error(`Plugin ${a.type} not found`)}return i?e(n,{children:f}):e(Wr,Object.assign({id:"yoopta-dnd-context",sensors:a,collisionDetection:An,onDragStart:s,onDragEnd:l},{children:e(lo,Object.assign({disabled:i,items:u,strategy:oo},{children:f}))}))},Vl=({editor:e,root:t})=>{const[n,r]=f({origin:[0,0],coords:[0,0],selection:!1}),o=o=>{var i;if(e.readOnly||!1===t)return;const a=null===(i=e.refElement)||void 0===i?void 0:i.contains(o.target),s=Z.getSelectedPaths(e);if(!a&&!n.selection&&Array.isArray(s)&&s.length>0)return e.setPath({current:null}),l();a||r({origin:[o.pageX,o.pageY-window.pageYOffset],coords:[o.pageX,o.pageY-window.pageYOffset],selection:!0})},i=o=>{if(!n.selection||e.readOnly||!1===t)return;r((e=>Object.assign(Object.assign({},e),{coords:[o.pageX,o.pageY-window.pageYOffset]})));const i=((e,t,n)=>{var r;const o=[],i=null===(r=e.refElement)||void 0===r?void 0:r.querySelectorAll("[data-yoopta-block]");return i?(i.forEach(((e,r)=>{if(!e)return;const i=e.getBoundingClientRect(),a=Math.min(t[1],n[1]),l=Math.min(t[0],n[0]),s=Math.max(t[1],n[1]),c=Math.max(t[0],n[0]);a<i.bottom&&s>i.top&&l<i.right&&c>i.left&&o.push(r)})),o):o})(e,n.origin,[o.pageX,o.pageY-window.pageYOffset]);e.setPath({current:null,selected:i})},a=()=>{e.readOnly||l()};c((()=>{var n;if(e.readOnly||!1===t)return;const r=t&&"current"in t?t.current:t||document;if(!r)throw new Error("Root element not found. Please check the `selectionBoxRoot` prop");if(!("nodeType"in r))throw new Error("Root element should be a DOM element or a ref object. Please check the `selectionBoxRoot` prop");if(null===(n=e.refElement)||void 0===n?void 0:n.contains(r))throw new Error("Root element should not be a child of the editor. Please check the `selectionBoxRoot` prop");return r.addEventListener("mousedown",o),r.addEventListener("mousemove",i),r.addEventListener("mouseup",a),()=>{r.removeEventListener("mousedown",o),r.removeEventListener("mousemove",i),r.removeEventListener("mouseup",a)}}),[e.path,n,t,e.readOnly]);const l=()=>{r({origin:[0,0],coords:[0,0],selection:!1})};return Object.assign(Object.assign({},n),{onClose:l})},$l=({origin:t,coords:n,isOpen:r})=>{if(!r)return null;const o={zIndex:10,left:t[0],top:t[1],height:Math.abs(n[1]-t[1]-1),width:Math.abs(n[0]-t[0]-1),userSelect:"none",transformOrigin:"top left",transform:t[1]>n[1]&&t[0]>n[0]?"scaleY(-1) scaleX(-1)":t[1]>n[1]?"scaleY(-1)":t[0]>n[0]?"scaleX(-1)":void 0,position:"fixed",backgroundColor:"rgba(35, 131, 226, 0.14)"};return e("div",{style:o})},Ul={selectionStarted:!1,indexToSelect:null,startedIndexToSelect:null};function Kl({editor:e}){const t=l(!1),n=l(!1),r=l(null),o=l(null);let i=l(Ul).current;const a=()=>{const t=e.path.current;if("number"==typeof t){const n=Ct.getSlate(e,{at:t}),r=Ct.getBlock(e,{at:t}),o=e.blocks[(null==r?void 0:r.type)||""];if(!n||(null==o?void 0:o.hasCustomEditor))return;try{m.withoutNormalizing(n,(()=>{w.select(n,[0]),n.selection&&O.isExpanded(n.selection)&&(_.blur(n),_.deselect(n))}))}catch(e){}}},s=i=>{if(!t.current||e.readOnly)return;const l=document.elementFromPoint(i.clientX,i.clientY),s=null==l?void 0:l.closest("[data-yoopta-block]");s&&e.batchOperations((()=>{var t;const i=s.getAttribute("data-yoopta-block-id")||"",l=null===(t=e.children[i])||void 0===t?void 0:t.meta.order;if(n.current&&"number"==typeof l&&l===r.current)return o.current=l,void e.setPath({current:l,selected:[l]});if("number"==typeof l&&l!==o.current){o.current=l,n.current=!0;const t=Math.min(r.current,l),i=Math.max(r.current,l);a();const s=Array.from({length:i-t+1},((e,n)=>t+n));e.setPath({current:l,selected:s})}}))},c=()=>{var i,a;t.current=!1,n.current=!1,r.current=null,o.current=null,null===(i=e.refElement)||void 0===i||i.removeEventListener("mousemove",s),null===(a=e.refElement)||void 0===a||a.removeEventListener("mouseup",c),null===document||void 0===document||document.removeEventListener("mouseup",c)};return{onMouseDown:n=>{e.readOnly||e.batchOperations((()=>{var i,l,d;const u=Z.getSelectedPaths(e);Array.isArray(u)&&u.length>0&&!n.shiftKey&&!n.altKey&&e.setPath({current:null});const f=n.target.closest("[data-yoopta-block]");if(f&&0===n.button){const u=f.getAttribute("data-yoopta-block-id")||"",p=null===(i=e.children[u])||void 0===i?void 0:i.meta.order;if("number"==typeof p){if(t.current=!0,r.current=p,o.current=p,n.shiftKey&&!Z.isPathEmpty(e)&&p!==e.path.current)return void(t=>{a();const n=Z.getPath(e);if("number"!=typeof n)return;const r=Array.from({length:Math.abs(t-n)}).map(((e,r)=>t>n?n+r+1:n-r-1));e.setPath({current:t,selected:[...r,n]})})(p);p!==e.path.current&&e.setPath({current:p}),null===(l=e.refElement)||void 0===l||l.addEventListener("mousemove",s),null===(d=e.refElement)||void 0===d||d.addEventListener("mouseup",c),null===document||void 0===document||document.addEventListener("mouseup",c)}}}))},onShiftArrowUp:t=>{if("function"==typeof t.isDefaultPrevented&&t.isDefaultPrevented())return;if(i.selectionStarted&&null!==i.startedIndexToSelect&&null!==i.indexToSelect){const t=i.indexToSelect,n=t-1;if(0===t)return;if(t===i.startedIndexToSelect){const t=e.path.selected?[...e.path.selected,n]:[n];return e.setPath({current:n,selected:t}),void(i.indexToSelect=n)}if(n<i.startedIndexToSelect){const t=e.path.selected?[...e.path.selected,n]:[n];return e.setPath({current:n,selected:t}),void(i.indexToSelect=n)}const r=Z.getSelectedPaths(e);if((null==r?void 0:r.includes(t))&&t!==i.startedIndexToSelect){const o=r.filter((e=>e!==t));return e.setPath({current:n,selected:o}),void(i.indexToSelect=n)}return}const n=ne(e),r=re(e);if(!r||!r.selection||!n)return;const o=k.parent(r.selection.anchor.path),a=m.isStart(r,r.selection.focus,o);if(O.isExpanded(r.selection)&&a){const o=Y(e);if("number"!=typeof o)return;const a=ne(e,{at:o});if(n&&a){t.preventDefault(),_.blur(r),_.deselect(r),w.deselect(r);const o=e.path.selected?[...e.path.selected,null==n?void 0:n.meta.order,n.meta.order-1]:[null==n?void 0:n.meta.order,n.meta.order-1];e.setPath({current:null,selected:o}),i.startedIndexToSelect=n.meta.order,i.indexToSelect=n.meta.order-1,i.selectionStarted=!0}}},onShiftArrowDown:t=>{if(i.selectionStarted&&null!==i.indexToSelect&&null!==i.startedIndexToSelect){const t=i.indexToSelect,n=t+1;if(n===Object.keys(e.children).length)return;if(t===i.startedIndexToSelect){const t=e.path.selected?[...e.path.selected,n]:[n];return e.setPath({current:n,selected:t}),void(i.indexToSelect=n)}if(n>i.startedIndexToSelect){const t=e.path.selected?[...e.path.selected,n]:[n];return e.setPath({current:n,selected:t}),void(i.indexToSelect=n)}const r=Z.getSelectedPaths(e);if((null==r?void 0:r.includes(t))&&t!==i.startedIndexToSelect){const o=r.filter((e=>e!==t));return e.setPath({current:n,selected:o}),void(i.indexToSelect=n)}return}const n=ne(e),r=re(e);if(!r||!r.selection||!n)return;const o=k.parent(r.selection.anchor.path),a=m.isEnd(r,r.selection.focus,o);if(O.isExpanded(r.selection)&&a){const o=Z.getNextPath(e),a=ne(e,{at:o});if(n&&a){t.preventDefault(),_.blur(r),_.deselect(r),w.deselect(r);const o=e.path.selected?[...e.path.selected,null==n?void 0:n.meta.order,(null==n?void 0:n.meta.order)+1]:[null==n?void 0:n.meta.order,n.meta.order+1];e.setPath({current:null,selected:o}),i.startedIndexToSelect=n.meta.order,i.indexToSelect=n.meta.order+1,i.selectionStarted=!0}}},selectionState:i}}const Wl=({placeholder:n,marks:r,className:o,selectionBoxRoot:i,width:a,style:l,children:s,autoFocus:d=!0})=>{const u=Nt(),f=It(),p=Vl({editor:u,root:i}),h=Kl({editor:u});c((()=>{d&&!f&&u.focus()}),[d,f]),c((()=>{if(!f)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)}),[u.path,f]);const g=()=>{h.selectionState.indexToSelect=null,h.selectionState.startedIndexToSelect=null,h.selectionState.selectionStarted=!1},v=e=>{if(!f){if(kl.isRedo(e))return e.preventDefault(),void u.redo();if(kl.isUndo(e))return e.preventDefault(),void u.undo();if(kl.isSelect(e)){const t=Z.getSelectedPaths(u);if((null==t?void 0:t.length)===Object.keys(u.children).length)return void e.preventDefault();if(Array.isArray(t)&&t.length>0){e.preventDefault();const t=Object.keys(u.children).map(((e,t)=>t));return void u.setPath({current:null,selected:t})}}if(kl.isCopy(e)||kl.isCut(e)){const t=Z.getSelectedPaths(u);if(Array.isArray(t)&&t.length>0){e.preventDefault();const t=u.getHTML(u.getEditorValue()),n=u.getPlainText(u.getEditorValue()),r=new Blob([t],{type:"text/html"}),o=new Blob([n],{type:"text/plain"}),i=new ClipboardItem({"text/html":r,"text/plain":o});return navigator.clipboard.write([i]).then((()=>{const e=(new DOMParser).parseFromString(t,"text/html");console.log("HTML copied\n",e.body)})),void(kl.isCut(e)&&(u.batchOperations((()=>{const e=Z.getSelectedPaths(u);if(Array.isArray(e)&&e.length>0){const t=e.length===Object.keys(u.children).length;if(e.forEach((e=>{var t;const n=null===(t=Ct.getBlock(u,{at:e}))||void 0===t?void 0:t.id;n&&u.deleteBlock({blockId:n})})),t){const e=F({id:I()});u.insertBlock(e.type,{at:0,focus:!0})}}})),u.setPath({current:null,selected:null}),g()))}}if(kl.isBackspace(e)){e.stopPropagation();const t=Z.getSelectedPaths(u);return(null==t?void 0:t.length)===Object.keys(u.children).length?(e.preventDefault(),void u.batchOperations((()=>{Object.keys(u.children).forEach((e=>u.deleteBlock({blockId:e}))),u.setPath({current:null,selected:null}),g()}))):void u.batchOperations((()=>{const t=Z.getSelectedPaths(u);Array.isArray(t)&&(null==t?void 0:t.length)>0&&(e.preventDefault(),t.forEach((e=>u.deleteBlock({at:e}))),u.setPath({current:null,selected:null}),g())}))}if(kl.isShiftArrowUp(e)&&h.onShiftArrowUp(e),kl.isShiftArrowDown(e)&&h.onShiftArrowDown(e),kl.isTab(e)){const t=Z.getSelectedPaths(u);Array.isArray(t)&&t.length>0&&(e.preventDefault(),u.batchOperations((()=>{t.forEach((e=>{const t=Ct.getBlock(u,{at:e});u.increaseBlockDepth({blockId:null==t?void 0:t.id})}))})))}else if(kl.isShiftTab(e)){const t=Z.getSelectedPaths(u);Array.isArray(t)&&t.length>0&&(e.preventDefault(),u.batchOperations((()=>{t.forEach((e=>{const t=Ct.getBlock(u,{at:e});u.decreaseBlockDepth({blockId:null==t?void 0:t.id})}))})))}else;}},b=e=>{if(!f)return;const t=e.clipboardData,n=window.getSelection();if(n&&n.rangeCount>0){const e=n.getRangeAt(0);if(e.collapsed)return;const r=e.cloneContents().querySelectorAll("[data-yoopta-block-id]");if(!r.length)return;const o=Array.from(r).reduce(((e,t)=>{const n=t.getAttribute("data-yoopta-block-id")||"",r=u.children[n];return r&&(e[n]=r),e}),{}),i=u.getHTML(o),a=u.getPlainText(o);return t.setData("text/html",i),void t.setData("text/plain",a)}},w=(x={userSelect:p.selection?"none":"auto",pointerEvents:p.selection?"none":"auto",width:a||(null==l?void 0:l.width),paddingBottom:null==l?void 0:l.paddingBottom},Object.assign(Object.assign({},x),{width:x.width||400,paddingBottom:"number"==typeof x.paddingBottom?x.paddingBottom:100}));var x;return t("div",Object.assign({ref:e=>u.refElement=e,className:o?`yoopta-editor ${o}`:"yoopta-editor",style:w,onMouseDown:e=>{f||(h.onMouseDown(e),g(),(e=>{var t;const n=u.refElement;if(!n)return;const{bottom:r}=n.getBoundingClientRect(),o=r-parseInt(getComputedStyle(n).paddingBottom,10),i=F({id:I()});if(e.clientY>=o){const e=Object.keys(u.children).length-1,n=ne(u,{at:e}),r=re(u,{at:e});if(n&&r&&r.selection){const e=m.string(r,r.selection.anchor.path),o=k.parent(r.selection.anchor.path),[a]=m.node(r,o);if(n.type===i.type&&y.isElement(a)&&"void"!==(null===(t=a.props)||void 0===t?void 0:t.nodeType)&&0===e.trim().length)return void u.focusBlock(n.id,{slate:r})}const o=e+1;u.insertBlock(i.type,{at:o,focus:!0})}})(e))},onBlur:e=>{var t;if((null===(t=u.refElement)||void 0===t?void 0:t.contains(e.relatedTarget))||f)return;g();const n=Z.getSelectedPaths(u);Array.isArray(n)&&n.length>0&&u.setPath({current:null,selected:null})},onCopy:b,onCut:b},{children:[e(Hl,{editor:u,marks:r,placeholder:n}),!1!==i&&e($l,{origin:p.origin,coords:p.coords,isOpen:p.selection&&!f}),s]}))};function Yl({type:e,hotkey:t,render:n}){return{type:e,hotkey:t,render:n}}const Xl=Yl({type:"fakeSelection",render:t=>e("span",Object.assign({style:{backgroundColor:"#d7e6fa"}},{children:t.children}))}),ql=(()=>{const e=I();return{[e]:F({id:e})}})(),Zl=new Vt,Jl=(e,t)=>Zl.on(e,t),Gl=(e,t)=>Zl.once(e,t),Ql=(e,t)=>Zl.off(e,t),es=(e,t)=>Zl.emit(e,t);const ts=({id:t,editor:n,value:r,marks:o,plugins:i,autoFocus:a,className:l,tools:s,selectionBoxRoot:p,children:h,placeholder:g,readOnly:v,width:m,style:y,onChange:b})=>{const w=d((()=>o?[Xl,...o]:[Xl]),[o]),x=d((()=>i.map((e=>e.getPlugin))),[i]),[k,E]=f((()=>{n.id||(n.id=t||I()),n.readOnly=v||!1,w&&(n.formats=ge(n,w)),n.blocks=function(e,t){const n={};return t.forEach((t=>{var r;const o=V(t.elements),i=null===(r=null==o?void 0:o.props)||void 0===r?void 0:r.nodeType;if("inline"!==i&&"inlineVoid"!==i){const r={};Object.keys(t.elements).forEach((e=>{const n=ue(t.elements[e],["render"]);r[e]=n}));const{display:o,placeholder:i,shortcuts:a}=t.options||{};n[t.type]={type:t.type,elements:r,hasCustomEditor:!!t.customEditor,options:{display:o,placeholder:i,shortcuts:a},isActive:()=>{const n=ne(e,{at:e.path.current});return(null==n?void 0:n.type)===t.type}}}})),n}(n,x);const e=function(e){return!!e&&"object"==typeof e&&0!==Object.keys(e).length}(r);return e||void 0===r||console.error(`Initial value is not valid. Should be an object with blocks. You passed: ${JSON.stringify(r)}`),n.children=e?r:ql,n.blockEditorsMap=ve(n),n.shortcuts=function(e){const t={};return Object.values(e.blocks).forEach((e=>{var n,r,o,i;e.options&&Array.isArray(null===(n=e.options)||void 0===n?void 0:n.shortcuts)&&(null===(r=e.options)||void 0===r?void 0:r.shortcuts.length)>0&&(null===(i=null===(o=e.options)||void 0===o?void 0:o.shortcuts)||void 0===i||i.forEach((n=>{t[n]=e})))})),t}(n),n.plugins=function(e){const t={},n={};return e.forEach((e=>{e.elements&&Object.keys(e.elements).forEach((t=>{var r;const o=e.elements[t],i=null===(r=o.props)||void 0===r?void 0:r.nodeType;"inline"!==i&&"inlineVoid"!==i||(n[t]=Object.assign(Object.assign({},o),{rootPlugin:e.type}))})),t[e.type]=e})),e.forEach((e=>{if(e.elements){const r=Object.assign(Object.assign({},e.elements),n);t[e.type]=Object.assign(Object.assign({},e),{elements:r})}})),t}(x),n.commands=function(e,t){const n={};return t.forEach((t=>{t.commands&&Object.keys(t.commands).forEach((r=>{var o;(null===(o=t.commands)||void 0===o?void 0:o[r])&&(n[r]=(...n)=>{var o;return null===(o=t.commands)||void 0===o?void 0:o[r](e,...n)})}))})),n}(n,x),n.on=Jl,n.once=Gl,n.off=Ql,n.emit=es,{editor:n,version:0}})),[O,S]=f(null),C=u((e=>{S(e)}),[]),_=u(((e,t)=>{if(E((e=>({editor:e.editor,version:e.version+1}))),"function"==typeof b&&Array.isArray(t.operations)){t.operations.filter((e=>"normalize_block_paths"!==e.type&&"set_block_path"!==e.type&&"set_slate"!==e.type)).length>0&&b(e,t)}}),[]);return c((()=>{const e=e=>{_(e.value,{operations:e.operations})};return n.on("change",e),n.on("path-change",C),()=>{n.off("change",e),n.off("path-change",C)}}),[n,_]),e(Tt,Object.assign({editorState:k},{children:e(Ya,Object.assign({tools:s},{children:e(Wl,Object.assign({placeholder:g,marks:w,autoFocus:a,className:l,selectionBoxRoot:p,width:m,style:y},{children:h}))}))}))},ns=Object.assign(Object.assign({},rl),{ExtendedBlockActions:({id:r,className:o,style:i,onClick:a,children:l})=>{const s=It(),[c,d]=f(!1),{refs:u,floatingStyles:p,context:h}=Ca({placement:"bottom-start",open:c,onOpenChange:d,middleware:[Ri(),ji(),Di(),ui(10)],whileElementsMounted:_i}),{isMounted:g,styles:v}=Ra(h,{duration:100}),m=Object.assign(Object.assign({},v),p);return s?null:t(n,{children:[g&&e(nl,Object.assign({isOpen:!0,onClose:()=>d(!1),refs:u,style:m},{children:l})),e("button",Object.assign({type:"button",contentEditable:!1,ref:u.setReference,id:r,className:`yoopta-button yoopta-extended-block-actions ${o||""}`,onClick:()=>{null==a||a(),d(!0)},style:c?Object.assign(Object.assign({},i),{opacity:1}):i},{children:e(Ia,{})}))]})},Portal:Ja,Overlay:Za});function rs(e,t){var n;const r=[];return t.forEach((t=>{if(t.nodeType===Node.TEXT_NODE&&r.push({text:t.textContent||""}),t.nodeType===Node.ELEMENT_NODE){const n=t;"P"!==n.nodeName&&"SPAN"!==n.nodeName&&"DIV"!==n.nodeName||r.push(Object.assign({},rs(e,n.childNodes)[0])),"B"!==n.nodeName&&"STRONG"!==n.nodeName||r.push(Object.assign({bold:!0},rs(e,n.childNodes)[0])),"I"!==n.nodeName&&"EM"!==n.nodeName||r.push(Object.assign({italic:!0},rs(e,n.childNodes)[0])),"S"!==n.nodeName&&"STRIKE"!==n.nodeName||r.push(Object.assign({strike:!0},rs(e,n.childNodes)[0])),"U"!==n.nodeName&&"INS"!==n.nodeName||r.push(Object.assign({underline:!0},rs(e,n.childNodes)[0])),"CODE"===n.nodeName&&r.push(Object.assign({code:!0},rs(e,n.childNodes)[0])),"A"===n.nodeName&&r.push({id:I(),type:"link",props:{url:n.getAttribute("href")||"",target:n.getAttribute("target")||"",rel:n.getAttribute("rel")||""},children:rs(e,n.childNodes)})}})),0!==r.length||(null===(n=r[0])||void 0===n?void 0:n.text)||r.push({text:""}),r}function os(e){return e.map((e=>{if("text"in e){let t=e.text;return e.bold&&(t=`<b>${t}</b>`),e.italic&&(t=`<i>${t}</i>`),e.strike&&(t=`<s>${t}</s>`),e.underline&&(t=`<u>${t}</u>`),e.code&&(t=`<code>${t}</code>`),t}if("link"===e.type){const{url:t,target:n,rel:r}=e.props;return`<a href="${t}" target="${n}" rel="${r}">${os(e.children)}</a>`}return""})).join("")}function is(e){return e.map((e=>{if("text"in e){let t=e.text;return e.bold&&(t=`**${t}**`),e.italic&&(t=`*${t}*`),e.strike&&(t=`~~${t}~~`),e.underline&&(t=`<u>${t}</u>`),e.code&&(t=`\`${t}\``),t}if("link"===e.type){const{url:t,target:n,rel:r}=e.props;return`[${is(e.children)}](${t})`}return""})).join("")}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".yoo-editor-z-\\[100\\]{z-index:100}.yoo-editor-mr-2{margin-right:.5rem}.yoo-editor-h-4{height:1rem}.yoo-editor-w-4{width:1rem}.yoopta-editor *{border:0 solid #e5e7eb;box-sizing:border-box;scrollbar-color:#d3d1cb transparent}::-moz-selection{background:#c6ddf8}::selection{background:#c6ddf8}.yoopta-placeholder{display:contents;position:relative}.yoopta-placeholder:after{color:inherit;content:attr(data-placeholder);font-size:75%;font-style:inherit;font-weight:inherit;opacity:.5;padding-left:5px;position:absolute;text-indent:2px;top:50%;transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yoopta-button{background-color:transparent;border-style:none;cursor:pointer}.yoopta-block{border-radius:.25rem;margin-bottom:1px;margin-top:2px;padding:0 2px;position:relative}.yoopta-selection-block{background-color:#2383e224;border-radius:.25rem;height:100%;left:0;opacity:1;pointer-events:none;position:absolute;top:0;width:100%;z-index:90}.yoopta-block-actions{display:flex;left:-50px;opacity:0;position:absolute;top:2px;transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoopta-block-actions[data-hovered-state-open=true]{opacity:1}.yoopta-block-actions-plus{align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;border-style:none;color:#37352f59;cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition-duration:.18s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);width:24px}.yoopta-block-actions-plus:active,.yoopta-block-actions-plus:focus,.yoopta-block-actions-plus:hover{background-color:#37362f14}.yoopta-block-actions-drag{align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;border-style:none;color:#37352f59;cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition-duration:.18s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);width:18px}.yoopta-block-actions-drag:active,.yoopta-block-actions-drag:focus,.yoopta-block-actions-drag:hover{background-color:#37362f14}.yoopta-slate:focus{outline:2px solid transparent;outline-offset:2px}.yoopta-slate:focus-visible{outline:2px solid transparent;outline-offset:2px}.yoopta-block-options-button{background-color:transparent;border-radius:.125rem;border-style:none;cursor:pointer;display:flex;justify-content:flex-start;line-height:120%;margin-left:4px;margin-right:4px;padding:.375rem .5rem;width:100%}.yoopta-block-options-button:hover{background-color:#37352f14}.yoopta-block-options-item{align-items:center;cursor:default;display:flex;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;position:relative;transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yoopta-block-options-item[data-disabled]{opacity:.5;pointer-events:none}.yoopta-extended-block-actions{--tw-bg-opacity:1;align-items:center;background-color:rgb(238 238 238/var(--tw-bg-opacity));border-radius:2px;border-style:none;cursor:pointer;display:flex;height:22px;justify-content:space-between;opacity:1;padding:0 4px;position:absolute;right:8px;top:8px;transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,1,1);width:22px;z-index:10}.yoopta-block-options-separator{background-color:#37352f14;height:1px;margin-bottom:4px;margin-top:4px;width:100%}.yoopta-block-options-menu-content{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(229 231 235/var(--tw-border-opacity));border-radius:.375rem;border-style:solid;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);min-width:200px;overflow:hidden;padding:6px 0;position:relative;width:auto}.yoopta-block-options-group{display:flex;flex-direction:column}.yoopta-align-left{justify-content:flex-start;text-align:left}.yoopta-align-center{justify-content:center;text-align:center}.yoopta-align-right{justify-content:flex-end;text-align:right}");export{Ct as Blocks,Et as Elements,kl as HOTKEYS,Z as Paths,ns as UI,M as YooptaPlugin,F as buildBlockData,z as buildBlockElement,K as buildBlockElementsStructure,pe as buildSlateEditor,At as createYooptaEditor,Yl as createYooptaMark,ts as default,rs as deserializeTextNodes,ne as findPluginBlockByPath,re as findSlateBySelectionPath,I as generateId,V as getRootBlockElement,H as getRootBlockElementType,os as serializeTextNodes,is as serializeTextNodesIntoMarkdown,Mt as useBlockData,Ft as useBlockSelected,Nt as useYooptaEditor,Lt as useYooptaFocused,zt as useYooptaPluginOptions,It as useYooptaReadOnly,Xa as useYooptaTools};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/editor",
3
- "version": "4.8.5-rc.2",
3
+ "version": "4.8.5-rc.4",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -66,5 +66,5 @@
66
66
  "url": "https://github.com/Darginec05/Yoopta-Editor/issues"
67
67
  },
68
68
  "homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
69
- "gitHead": "016b0f92a45bfcc157e44a7f28820174d0cc5c7e"
69
+ "gitHead": "398f458507c17a5a5b9e21be939172d48244e3e0"
70
70
  }