@yoopta/embed 4.0.0-rc.10 → 4.0.0-rc.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@yoopta/editor"),t=require("react/jsx-runtime"),o=require("react"),i=require("react-dom");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var r=n(o),s=n(i);function a(e,{threshold:t=0,root:i=null,rootMargin:n="0%",freezeOnceVisible:r=!1}={}){const[s,a]=o.useState({}),l=s.isIntersecting&&r,d=([e])=>a(e);return o.useEffect((()=>{const o=null==e?void 0:e.current;if(!window.IntersectionObserver||l||!o)return;const r=new IntersectionObserver(d,{threshold:t,root:i,rootMargin:n});return r.observe(o),()=>r.disconnect()}),[e,t,i,n,l]),s}const l={vimeo:function({provider:e,width:i,height:n,blockId:r}){const s=o.useRef(null),[l,d]=o.useState(null),[c,u]=o.useState(!1),{isIntersecting:h}=a(s,{freezeOnceVisible:!0,rootMargin:"50%"});return o.useEffect((()=>{fetch(`https://vimeo.com/api/v2/embed/${e.id}.json`).then((e=>e.json())).then((e=>d(e[0].thumbnail_medium))).catch((()=>d(null)))}),[e.id]),t.jsxs("div",Object.assign({ref:s,className:"yoo-embed-relative"},{children:[t.jsx("img",{src:l||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:h&&c?0:1,zIndex:h&&c?-1:0}}),h&&t.jsx("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${e.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>u(!0),className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:i,height:n})]}))},youtube:function({provider:e,width:i,height:n,blockId:r}){const s=o.useRef(null),[l,d]=o.useState(!1),{isIntersecting:c}=a(s,{freezeOnceVisible:!0,rootMargin:"50%"});return t.jsxs("div",Object.assign({ref:s,className:"yoo-embed-relative"},{children:[t.jsx("img",{src:`https://i.ytimg.com/vi/${e.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:c&&l?0:1,zIndex:c&&l?-1:0}}),c&&t.jsx("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${e.id}`,frameBorder:0,onLoad:()=>d(!0),allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:i,height:n})]}))},dailymotion:function({provider:e,width:i,height:n,blockId:r}){const s=o.useRef(null),[l,d]=o.useState(null),[c,u]=o.useState(!1),{isIntersecting:h}=a(s,{freezeOnceVisible:!0,rootMargin:"50%"});return o.useEffect((()=>{var t;fetch((t=e.id,`https://api.dailymotion.com/embed/${t}?fields=thumbnail_url`)).then((e=>e.json())).then((e=>d(e.thumbnail_url))).catch((()=>d(null)))}),[e.id]),t.jsxs("div",Object.assign({ref:s,className:"yoo-embed-relative"},{children:[t.jsx("img",{src:l||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:h&&c?0:1,zIndex:h&&c?-1:0}}),h&&t.jsx("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>u(!0),src:`https://www.dailymotion.com/embed/embed/${e.id}`,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:i,height:n})]}))},figma:({provider:e,width:i,height:n,blockId:r})=>{const s=o.useRef(null),{isIntersecting:l}=a(s,{freezeOnceVisible:!0,rootMargin:"50%"});return t.jsx("div",Object.assign({className:"yoo-embed-relative",ref:s},{children:l&&t.jsx("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(e.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:i,height:n})}))},twitter:function({provider:i,blockId:n}){const r=o.useRef(null),s=e.useYooptaEditor(),{isIntersecting:l}=a(r,{freezeOnceVisible:!0,rootMargin:"50%"}),d=`${n}-${i.id}`;return o.useEffect((()=>{var e;if(!l)return;const t=document.createElement("script");t.src="https://platform.twitter.com/widgets.js",null===(e=r.current)||void 0===e||e.appendChild(t),t.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(i.id,document.getElementById(d),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),s.blocks.Embed.updateElement(n,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[i.id,l]),t.jsx("div",Object.assign({className:"yoo-embed-w-full yoo-embed-h-full",ref:r},{children:t.jsx("div",{id:d})}))}},d=({width:e,height:o,provider:i,blockId:n})=>{if(!i)return null;if(i&&i.id&&i.type&&l[i.type]){const r=l[i.type];return t.jsx(r,{provider:i,width:e,height:o,blockId:n})}return t.jsx("div",Object.assign({className:"yoo-embed-w-full"},{children:t.jsx("iframe",{src:i.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0"})}))};var c,u=(c=function(e,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},c(e,t)},function(e,t){function o(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),h=function(){return h=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},h.apply(this,arguments)},p={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},f={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},m={width:"20px",height:"20px",position:"absolute"},b={top:h(h({},p),{top:"-5px"}),right:h(h({},f),{left:void 0,right:"-5px"}),bottom:h(h({},p),{top:void 0,bottom:"-5px"}),left:h(h({},f),{left:"-5px"}),topRight:h(h({},m),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:h(h({},m),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:h(h({},m),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:h(h({},m),{left:"-10px",top:"-10px",cursor:"nw-resize"})},y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return u(t,e),t.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:h(h({position:"absolute",userSelect:"none"},b[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(r.PureComponent),g=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),x=function(){return x=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},x.apply(this,arguments)},w={width:"auto",height:"auto"},v=function(e,t,o){return Math.max(Math.min(e,o),t)},z=function(e,t){return Math.round(e/t)*t},R=function(e,t){return new RegExp(e,"i").test(t)},S=function(e){return Boolean(e.touches&&e.touches.length)},E=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},_=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},C=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},j=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],k="__resizable_base__",O=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(k):t.className+=k,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return g(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return _(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?_(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?_(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&R("left",r),a=n&&R("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,s=n.original,a=this.props,l=a.lockAspectRatio,d=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,u=s.width,h=s.height,p=d||0,f=c||0;return R("right",r)&&(u=s.width+(e-s.x)*i/o,l&&(h=(u-f)/this.ratio+p)),R("left",r)&&(u=s.width-(e-s.x)*i/o,l&&(h=(u-f)/this.ratio+p)),R("bottom",r)&&(h=s.height+(t-s.y)*i/o,l&&(u=(h-p)*this.ratio+f)),R("top",r)&&(h=s.height-(t-s.y)*i/o,l&&(u=(h-p)*this.ratio+f)),{newWidth:u,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,d=void 0===o.width||o.width<0?e:o.width,c=void 0===i.height?10:i.height,u=void 0===o.height||o.height<0?t:o.height,h=s||0,p=a||0;if(r){var f=(c-h)*this.ratio+p,m=(u-h)*this.ratio+p,b=(l-p)/this.ratio+h,y=(d-p)/this.ratio+h,g=Math.max(l,f),x=Math.min(d,m),w=Math.max(c,b),z=Math.min(u,y);e=v(e,g,x),t=v(t,w,z)}else e=v(e,l,d),t=v(t,c,u);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=n,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&S(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:x(x({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&S(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,n=o.maxWidth,r=o.maxHeight,s=o.minWidth,a=o.minHeight,l=S(e)?e.touches[0].clientX:e.clientX,d=S(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,h=c.original,p=c.width,f=c.height,m=this.getParentSize(),b=function(e,t,o,i,n,r,s){return i=C(i,e.width,t,o),n=C(n,e.height,t,o),r=C(r,e.width,t,o),s=C(s,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(m,this.window.innerWidth,this.window.innerHeight,n,r,s,a);n=b.maxWidth,r=b.maxHeight,s=b.minWidth,a=b.minHeight;var y=this.calculateNewSizeFromDirection(l,d),g=y.newHeight,x=y.newWidth,w=this.calculateNewMaxFromBoundary(n,r);this.props.snap&&this.props.snap.x&&(x=E(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=E(g,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(x,g,{width:w.maxWidth,height:w.maxHeight},{width:s,height:a});if(x=v.newWidth,g=v.newHeight,this.props.grid){var R=z(x,this.props.grid[0]),_=z(g,this.props.grid[1]),j=this.props.snapGap||0;x=0===j||Math.abs(R-x)<=j?R:x,g=0===j||Math.abs(_-g)<=j?_:g}var k={width:x-h.width,height:g-h.height};if(p&&"string"==typeof p)if(p.endsWith("%"))x=x/m.width*100+"%";else if(p.endsWith("vw")){x=x/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){x=x/this.window.innerHeight*100+"vh"}if(f&&"string"==typeof f)if(f.endsWith("%"))g=g/m.height*100+"%";else if(f.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}var O={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?O.flexBasis=O.width:"column"===this.flexDir&&(O.flexBasis=O.height),i.flushSync((function(){t.setState(O)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,k)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:x(x({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,s=t.handleWrapperStyle,a=t.handleWrapperClass,l=t.handleComponent;if(!o)return null;var d=Object.keys(o).map((function(t){return!1!==o[t]?r.createElement(y,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},l&&l[t]?l[t]:null):null}));return r.createElement("div",{className:a,style:s},d)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==j.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=x(x(x({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r.createElement(i,x({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(r.PureComponent);function N(e){return W(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function M(e){var t;return null==(t=(W(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function W(e){return e instanceof Node||e instanceof L(e).Node}function A(e){return e instanceof Element||e instanceof L(e).Element}function T(e){return e instanceof HTMLElement||e instanceof L(e).HTMLElement}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}function P(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function I(e){return["table","td","th"].includes(N(e))}function H(e){const t=D(),o=V(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function D(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function F(e){return["html","body","#document"].includes(N(e))}function V(e){return L(e).getComputedStyle(e)}function U(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y(e){if("html"===N(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||M(e);return B(t)?t.host:t}function $(e){const t=Y(e);return F(t)?e.ownerDocument?e.ownerDocument.body:e.body:T(t)&&P(t)?t:$(t)}function X(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=$(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=L(n);return r?t.concat(s,s.visualViewport||[],P(n)?n:[],s.frameElement&&o?X(s.frameElement):[]):t.concat(n,X(n,[],o))}const q=Math.min,G=Math.max,Z=Math.round,J=e=>({x:e,y:e}),K={left:"right",right:"left",bottom:"top",top:"bottom"},Q={start:"end",end:"start"};function ee(e,t,o){return G(e,q(t,o))}function te(e,t){return"function"==typeof e?e(t):e}function oe(e){return e.split("-")[0]}function ie(e){return e.split("-")[1]}function ne(e){return"x"===e?"y":"x"}function re(e){return"y"===e?"height":"width"}function se(e){return["top","bottom"].includes(oe(e))?"y":"x"}function ae(e){return ne(se(e))}function le(e){return e.replace(/start|end/g,(e=>Q[e]))}function de(e){return e.replace(/left|right|bottom|top/g,(e=>K[e]))}function ce(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ue(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function he(e,t,o){let{reference:i,floating:n}=e;const r=se(t),s=ae(t),a=re(s),l=oe(t),d="y"===r,c=i.x+i.width/2-n.width/2,u=i.y+i.height/2-n.height/2,h=i[a]/2-n[a]/2;let p;switch(l){case"top":p={x:c,y:i.y-n.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:u};break;case"left":p={x:i.x-n.width,y:u};break;default:p={x:i.x,y:i.y}}switch(ie(t)){case"start":p[s]-=h*(o&&d?-1:1);break;case"end":p[s]+=h*(o&&d?-1:1)}return p}async function pe(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=te(t,e),f=ce(p),m=a[h?"floating"===u?"reference":"floating":u],b=ue(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),y="floating"===u?{...s.floating,x:i,y:n}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),x=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},w=ue(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(b.top-w.top+f.top)/x.y,bottom:(w.bottom-b.bottom+f.bottom)/x.y,left:(b.left-w.left+f.left)/x.x,right:(w.right-b.right+f.right)/x.x}}function fe(e){const t=q(...e.map((e=>e.left))),o=q(...e.map((e=>e.top)));return{x:t,y:o,width:G(...e.map((e=>e.right)))-t,height:G(...e.map((e=>e.bottom)))-o}}const me=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),s=oe(o),a=ie(o),l="y"===se(o),d=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,u=te(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*d}:{x:h*d,y:p*c}}(t,e);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}}};function be(e){const t=V(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=T(e),r=n?e.offsetWidth:o,s=n?e.offsetHeight:i,a=Z(o)!==r||Z(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function ye(e){return A(e)?e:e.contextElement}function ge(e){const t=ye(e);if(!T(t))return J(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=be(t);let s=(r?Z(o.width):o.width)/i,a=(r?Z(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const xe=J(0);function we(e){const t=L(e);return D()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:xe}function ve(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=ye(e);let s=J(1);t&&(i?A(i)&&(s=ge(i)):s=ge(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==L(e))&&t}(r,o,i)?we(r):J(0);let l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,c=n.width/s.x,u=n.height/s.y;if(r){const e=L(r),t=i&&A(i)?L(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=ge(n),t=n.getBoundingClientRect(),i=V(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,u*=e.y,l+=r,d+=s,o=L(n),n=o.frameElement}}return ue({width:c,height:u,x:l,y:d})}const ze=[":popover-open",":modal"];function Re(e){return ze.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Se(e){return ve(M(e)).left+U(e).scrollLeft}function Ee(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=L(e),i=M(e),n=o.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){r=n.width,s=n.height;const e=D();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:a,y:l}}(e,o);else if("document"===t)i=function(e){const t=M(e),o=U(e),i=e.ownerDocument.body,n=G(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=G(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Se(e);const a=-o.scrollTop;return"rtl"===V(i).direction&&(s+=G(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(M(e));else if(A(t))i=function(e,t){const o=ve(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=T(e)?ge(e):J(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=we(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return ue(i)}function _e(e,t){const o=Y(e);return!(o===t||!A(o)||F(o))&&("fixed"===V(o).position||_e(o,t))}function Ce(e,t,o){const i=T(t),n=M(t),r="fixed"===o,s=ve(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=J(0);if(i||!i&&!r)if(("body"!==N(t)||P(n))&&(a=U(t)),i){const e=ve(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Se(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function je(e,t){return T(e)&&"fixed"!==V(e).position?t?t(e):e.offsetParent:null}function ke(e,t){const o=L(e);if(!T(e)||Re(e))return o;let i=je(e,t);for(;i&&I(i)&&"static"===V(i).position;)i=je(i,t);return i&&("html"===N(i)||"body"===N(i)&&"static"===V(i).position&&!H(i))?o:i||function(e){let t=Y(e);for(;T(t)&&!F(t);){if(H(t))return t;t=Y(t)}return null}(e)||o}const Oe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=M(i),a=!!t&&Re(t.floating);if(i===s||a&&r)return o;let l={scrollLeft:0,scrollTop:0},d=J(1);const c=J(0),u=T(i);if((u||!u&&!r)&&(("body"!==N(i)||P(s))&&(l=U(i)),T(i))){const e=ve(i);d=ge(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-l.scrollLeft*d.x+c.x,y:o.y*d.y-l.scrollTop*d.y+c.y}},getDocumentElement:M,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=X(e,[],!1).filter((e=>A(e)&&"body"!==N(e))),n=null;const r="fixed"===V(e).position;let s=r?Y(e):e;for(;A(s)&&!F(s);){const t=V(s),o=H(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||P(s)&&!o&&_e(e,s))?i=i.filter((e=>e!==s)):n=t,s=Y(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=Ee(t,o,n);return e.top=G(i.top,e.top),e.right=q(i.right,e.right),e.bottom=q(i.bottom,e.bottom),e.left=G(i.left,e.left),e}),Ee(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ke,getElementRects:async function(e){const t=this.getOffsetParent||ke,o=this.getDimensions;return{reference:Ce(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=be(e);return{width:t,height:o}},getScale:ge,isElement:A,isRTL:function(e){return"rtl"===V(e).direction}},Ne=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=te(e,t),d={x:o,y:i},c=await pe(t,l),u=se(oe(n)),h=ne(u);let p=d[h],f=d[u];if(r){const e="y"===h?"bottom":"right";p=ee(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===u?"bottom":"right";f=ee(f+c["y"===u?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Le=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...b}=te(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=oe(n),g=oe(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=h||(g||!m?[de(a)]:function(e){const t=de(e);return[le(e),t,le(t)]}(a));h||"none"===f||w.push(...function(e,t,o,i){const n=ie(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:s;default:return[]}}(oe(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(le)))),r}(a,m,f,x));const v=[a,...w],z=await pe(t,b),R=[];let S=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&R.push(z[y]),u){const e=function(e,t,o){void 0===o&&(o=!1);const i=ie(e),n=ae(e),r=re(n);let s="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=de(s)),[s,de(s)]}(n,s,x);R.push(z[e[0]],z[e[1]])}if(S=[...S,{placement:n,overflows:R}],!R.every((e=>e<=0))){var E,_;const e=((null==(E=r.flip)?void 0:E.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let o=null==(_=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:_.placement;if(!o)switch(p){case"bestFit":{var C;const e=null==(C=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},Me=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:s}=t,{padding:a=2,x:l,y:d}=te(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>ue(fe(e))))}(c),h=ue(fe(c)),p=ce(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=d)return u.find((e=>l>e.left-p.left&&l<e.right+p.right&&d>e.top-p.top&&d<e.bottom+p.bottom))||h;if(u.length>=2){if("y"===se(o)){const e=u[0],t=u[u.length-1],i="top"===oe(o),n=e.top,r=t.bottom,s=i?e.left:t.left,a=i?e.right:t.right;return{top:n,bottom:r,left:s,right:a,width:a-s,height:r-n,x:s,y:n}}const e="left"===oe(o),t=G(...u.map((e=>e.right))),i=q(...u.map((e=>e.left))),n=u.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,s=n[n.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return h}},floating:i.floating,strategy:s});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},We=(e,t,o)=>{const i=new Map,n={platform:Oe,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:s}=o,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:u}=he(d,i,l),h=i,p={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:m}=a[o],{x:b,y:y,data:g,reset:x}=await m({x:c,y:u,initialPlacement:i,placement:h,strategy:n,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=b?b:c,u=null!=y?y:u,p={...p,[r]:{...p[r],...g}},x&&f<=50&&(f++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(d=!0===x.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):x.rects),({x:c,y:u}=he(d,h,l))),o=-1)}return{x:c,y:u,placement:h,strategy:n,middlewareData:p}})(e,t,{...n,platform:r})};var Ae="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function Te(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!Te(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!Te(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Be(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pe(e,t){const o=Be(e);return Math.round(t*o)/o}function Ie(e){const t=r.useRef(e);return Ae((()=>{t.current=e})),t}
1
+ import{useYooptaEditor as e,UI as t,useBlockData as o,useYooptaPluginOptions as i,useYooptaReadOnly as n,useBlockSelected as r,YooptaPlugin as s,generateId as a}from"@yoopta/editor";import{jsxs as l,jsx as d}from"react/jsx-runtime";import*as c from"react";import{useState as u,useEffect as h,useRef as p,useLayoutEffect as f,forwardRef as m,createElement as b,useMemo as y}from"react";import*as g from"react-dom";import{flushSync as w,createPortal as x}from"react-dom";function v(e,{threshold:t=0,root:o=null,rootMargin:i="0%",freezeOnceVisible:n=!1}={}){const[r,s]=u({}),a=r.isIntersecting&&n,l=([e])=>s(e);return h((()=>{const n=null==e?void 0:e.current;if(!window.IntersectionObserver||a||!n)return;const r=new IntersectionObserver(l,{threshold:t,root:o,rootMargin:i});return r.observe(n),()=>r.disconnect()}),[e,t,o,i,a]),r}const z={vimeo:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(null),[a,c]=u(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch(`https://vimeo.com/api/v2/embed/${e.id}.json`).then((e=>e.json())).then((e=>s(e[0].thumbnail_medium))).catch((()=>s(null)))}),[e.id]),l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:r||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&d("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${e.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>c(!0),className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},youtube:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(!1),{isIntersecting:a}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:`https://i.ytimg.com/vi/${e.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:a&&r?0:1,zIndex:a&&r?-1:0}}),a&&d("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${e.id}`,frameBorder:0,onLoad:()=>s(!0),allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},dailymotion:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(null),[a,c]=u(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{var t;fetch((t=e.id,`https://api.dailymotion.com/embed/${t}?fields=thumbnail_url`)).then((e=>e.json())).then((e=>s(e.thumbnail_url))).catch((()=>s(null)))}),[e.id]),l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:r||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&d("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>c(!0),src:`https://www.dailymotion.com/embed/embed/${e.id}`,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},figma:({provider:e,width:t,height:o,blockId:i})=>{const n=p(null),{isIntersecting:r}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return d("div",Object.assign({className:"yoo-embed-relative",ref:n},{children:r&&d("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(e.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})}))},twitter:function({provider:t,blockId:o}){const i=p(null),n=e(),{isIntersecting:r}=v(i,{freezeOnceVisible:!0,rootMargin:"50%"}),s=`${o}-${t.id}`;return h((()=>{var e;if(!r)return;const a=document.createElement("script");a.src="https://platform.twitter.com/widgets.js",null===(e=i.current)||void 0===e||e.appendChild(a),a.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(t.id,document.getElementById(s),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),n.blocks.Embed.updateElement(o,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[t.id,r]),d("div",Object.assign({className:"yoo-embed-w-full yoo-embed-h-full",ref:i},{children:d("div",{id:s})}))}},R=({width:e,height:t,provider:o,blockId:i})=>{if(!o)return null;if(o&&o.id&&o.type&&z[o.type]){const n=z[o.type];return d(n,{provider:o,width:e,height:t,blockId:i})}return d("div",Object.assign({className:"yoo-embed-w-full"},{children:d("iframe",{src:o.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0"})}))};var S,_=(S=function(e,t){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},S(e,t)},function(e,t){function o(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),E=function(){return E=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},E.apply(this,arguments)},C={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},k={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},O={width:"20px",height:"20px",position:"absolute"},N={top:E(E({},C),{top:"-5px"}),right:E(E({},k),{left:void 0,right:"-5px"}),bottom:E(E({},C),{top:void 0,bottom:"-5px"}),left:E(E({},k),{left:"-5px"}),topRight:E(E({},O),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:E(E({},O),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:E(E({},O),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:E(E({},O),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return _(t,e),t.prototype.render=function(){return c.createElement("div",{className:this.props.className||"",style:E(E({position:"absolute",userSelect:"none"},N[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(c.PureComponent),M=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),W=function(){return W=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},W.apply(this,arguments)},A={width:"auto",height:"auto"},T=function(e,t,o){return Math.max(Math.min(e,o),t)},j=function(e,t){return Math.round(e/t)*t},B=function(e,t){return new RegExp(e,"i").test(t)},I=function(e){return Boolean(e.touches&&e.touches.length)},P=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},H=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},D=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},F=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],V="__resizable_base__",U=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(V):t.className+=V,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return M(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||A},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return H(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?H(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?H(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&B("left",r),a=n&&B("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,s=n.original,a=this.props,l=a.lockAspectRatio,d=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,u=s.width,h=s.height,p=d||0,f=c||0;return B("right",r)&&(u=s.width+(e-s.x)*i/o,l&&(h=(u-f)/this.ratio+p)),B("left",r)&&(u=s.width-(e-s.x)*i/o,l&&(h=(u-f)/this.ratio+p)),B("bottom",r)&&(h=s.height+(t-s.y)*i/o,l&&(u=(h-p)*this.ratio+f)),B("top",r)&&(h=s.height-(t-s.y)*i/o,l&&(u=(h-p)*this.ratio+f)),{newWidth:u,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,d=void 0===o.width||o.width<0?e:o.width,c=void 0===i.height?10:i.height,u=void 0===o.height||o.height<0?t:o.height,h=s||0,p=a||0;if(r){var f=(c-h)*this.ratio+p,m=(u-h)*this.ratio+p,b=(l-p)/this.ratio+h,y=(d-p)/this.ratio+h,g=Math.max(l,f),w=Math.min(d,m),x=Math.max(c,b),v=Math.min(u,y);e=T(e,g,w),t=T(t,x,v)}else e=T(e,l,d),t=T(t,c,u);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=n,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&I(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&I(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,i=o.maxWidth,n=o.maxHeight,r=o.minWidth,s=o.minHeight,a=I(e)?e.touches[0].clientX:e.clientX,l=I(e)?e.touches[0].clientY:e.clientY,d=this.state,c=d.direction,u=d.original,h=d.width,p=d.height,f=this.getParentSize(),m=function(e,t,o,i,n,r,s){return i=D(i,e.width,t,o),n=D(n,e.height,t,o),r=D(r,e.width,t,o),s=D(s,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,n,r,s);i=m.maxWidth,n=m.maxHeight,r=m.minWidth,s=m.minHeight;var b=this.calculateNewSizeFromDirection(a,l),y=b.newHeight,g=b.newWidth,x=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(g=P(g,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=P(y,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(g,y,{width:x.maxWidth,height:x.maxHeight},{width:r,height:s});if(g=v.newWidth,y=v.newHeight,this.props.grid){var z=j(g,this.props.grid[0]),R=j(y,this.props.grid[1]),S=this.props.snapGap||0;g=0===S||Math.abs(z-g)<=S?z:g,y=0===S||Math.abs(R-y)<=S?R:y}var _={width:g-u.width,height:y-u.height};if(h&&"string"==typeof h)if(h.endsWith("%"))g=g/f.width*100+"%";else if(h.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}if(p&&"string"==typeof p)if(p.endsWith("%"))y=y/f.height*100+"%";else if(p.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(g,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),w((function(){t.setState(E)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,_)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,r=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!o)return null;var l=Object.keys(o).map((function(t){return!1!==o[t]?c.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}));return c.createElement("div",{className:s,style:r},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==F.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=W(W(W({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return c.createElement(i,W({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&c.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(c.PureComponent);function $(e){return G(e)?(e.nodeName||"").toLowerCase():"#document"}function X(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Y(e){var t;return null==(t=(G(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function G(e){return e instanceof Node||e instanceof X(e).Node}function Z(e){return e instanceof Element||e instanceof X(e).Element}function q(e){return e instanceof HTMLElement||e instanceof X(e).HTMLElement}function J(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof X(e).ShadowRoot)}function K(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function Q(e){return["table","td","th"].includes($(e))}function ee(e){const t=te(),o=ie(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function te(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function oe(e){return["html","body","#document"].includes($(e))}function ie(e){return X(e).getComputedStyle(e)}function ne(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){if("html"===$(e))return e;const t=e.assignedSlot||e.parentNode||J(e)&&e.host||Y(e);return J(t)?t.host:t}function se(e){const t=re(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&K(t)?t:se(t)}function ae(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=se(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=X(n);return r?t.concat(s,s.visualViewport||[],K(n)?n:[],s.frameElement&&o?ae(s.frameElement):[]):t.concat(n,ae(n,[],o))}const le=Math.min,de=Math.max,ce=Math.round,ue=e=>({x:e,y:e}),he={left:"right",right:"left",bottom:"top",top:"bottom"},pe={start:"end",end:"start"};function fe(e,t,o){return de(e,le(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function be(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function ge(e){return"x"===e?"y":"x"}function we(e){return"y"===e?"height":"width"}function xe(e){return["top","bottom"].includes(be(e))?"y":"x"}function ve(e){return ge(xe(e))}function ze(e){return e.replace(/start|end/g,(e=>pe[e]))}function Re(e){return e.replace(/left|right|bottom|top/g,(e=>he[e]))}function Se(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function _e(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ee(e,t,o){let{reference:i,floating:n}=e;const r=xe(t),s=ve(t),a=we(s),l=be(t),d="y"===r,c=i.x+i.width/2-n.width/2,u=i.y+i.height/2-n.height/2,h=i[a]/2-n[a]/2;let p;switch(l){case"top":p={x:c,y:i.y-n.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:u};break;case"left":p={x:i.x-n.width,y:u};break;default:p={x:i.x,y:i.y}}switch(ye(t)){case"start":p[s]-=h*(o&&d?-1:1);break;case"end":p[s]+=h*(o&&d?-1:1)}return p}async function Ce(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=me(t,e),f=Se(p),m=a[h?"floating"===u?"reference":"floating":u],b=_e(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),y="floating"===u?{...s.floating,x:i,y:n}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},x=_e(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(b.top-x.top+f.top)/w.y,bottom:(x.bottom-b.bottom+f.bottom)/w.y,left:(b.left-x.left+f.left)/w.x,right:(x.right-b.right+f.right)/w.x}}function ke(e){const t=le(...e.map((e=>e.left))),o=le(...e.map((e=>e.top)));return{x:t,y:o,width:de(...e.map((e=>e.right)))-t,height:de(...e.map((e=>e.bottom)))-o}}const Oe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),s=be(o),a=ye(o),l="y"===xe(o),d=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,u=me(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*d}:{x:h*d,y:p*c}}(t,e);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}}};function Ne(e){const t=ie(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=q(e),r=n?e.offsetWidth:o,s=n?e.offsetHeight:i,a=ce(o)!==r||ce(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function Le(e){return Z(e)?e:e.contextElement}function Me(e){const t=Le(e);if(!q(t))return ue(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=Ne(t);let s=(r?ce(o.width):o.width)/i,a=(r?ce(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const We=ue(0);function Ae(e){const t=X(e);return te()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:We}function Te(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Le(e);let s=ue(1);t&&(i?Z(i)&&(s=Me(i)):s=Me(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==X(e))&&t}(r,o,i)?Ae(r):ue(0);let l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,c=n.width/s.x,u=n.height/s.y;if(r){const e=X(r),t=i&&Z(i)?X(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Me(n),t=n.getBoundingClientRect(),i=ie(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,u*=e.y,l+=r,d+=s,o=X(n),n=o.frameElement}}return _e({width:c,height:u,x:l,y:d})}const je=[":popover-open",":modal"];function Be(e){return je.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ie(e){return Te(Y(e)).left+ne(e).scrollLeft}function Pe(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=X(e),i=Y(e),n=o.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){r=n.width,s=n.height;const e=te();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:a,y:l}}(e,o);else if("document"===t)i=function(e){const t=Y(e),o=ne(e),i=e.ownerDocument.body,n=de(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=de(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Ie(e);const a=-o.scrollTop;return"rtl"===ie(i).direction&&(s+=de(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(Y(e));else if(Z(t))i=function(e,t){const o=Te(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=q(e)?Me(e):ue(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=Ae(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return _e(i)}function He(e,t){const o=re(e);return!(o===t||!Z(o)||oe(o))&&("fixed"===ie(o).position||He(o,t))}function De(e,t,o){const i=q(t),n=Y(t),r="fixed"===o,s=Te(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=ue(0);if(i||!i&&!r)if(("body"!==$(t)||K(n))&&(a=ne(t)),i){const e=Te(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Ie(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Fe(e,t){return q(e)&&"fixed"!==ie(e).position?t?t(e):e.offsetParent:null}function Ve(e,t){const o=X(e);if(!q(e)||Be(e))return o;let i=Fe(e,t);for(;i&&Q(i)&&"static"===ie(i).position;)i=Fe(i,t);return i&&("html"===$(i)||"body"===$(i)&&"static"===ie(i).position&&!ee(i))?o:i||function(e){let t=re(e);for(;q(t)&&!oe(t);){if(ee(t))return t;t=re(t)}return null}(e)||o}const Ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=Y(i),a=!!t&&Be(t.floating);if(i===s||a&&r)return o;let l={scrollLeft:0,scrollTop:0},d=ue(1);const c=ue(0),u=q(i);if((u||!u&&!r)&&(("body"!==$(i)||K(s))&&(l=ne(i)),q(i))){const e=Te(i);d=Me(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-l.scrollLeft*d.x+c.x,y:o.y*d.y-l.scrollTop*d.y+c.y}},getDocumentElement:Y,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=ae(e,[],!1).filter((e=>Z(e)&&"body"!==$(e))),n=null;const r="fixed"===ie(e).position;let s=r?re(e):e;for(;Z(s)&&!oe(s);){const t=ie(s),o=ee(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||K(s)&&!o&&He(e,s))?i=i.filter((e=>e!==s)):n=t,s=re(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=Pe(t,o,n);return e.top=de(i.top,e.top),e.right=le(i.right,e.right),e.bottom=le(i.bottom,e.bottom),e.left=de(i.left,e.left),e}),Pe(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ve,getElementRects:async function(e){const t=this.getOffsetParent||Ve,o=this.getDimensions;return{reference:De(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=Ne(e);return{width:t,height:o}},getScale:Me,isElement:Z,isRTL:function(e){return"rtl"===ie(e).direction}},$e=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=me(e,t),d={x:o,y:i},c=await Ce(t,l),u=xe(be(n)),h=ge(u);let p=d[h],f=d[u];if(r){const e="y"===h?"bottom":"right";p=fe(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===u?"bottom":"right";f=fe(f+c["y"===u?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Xe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...b}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=be(n),g=be(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=h||(g||!m?[Re(a)]:function(e){const t=Re(e);return[ze(e),t,ze(t)]}(a));h||"none"===f||x.push(...function(e,t,o,i){const n=ye(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:s;default:return[]}}(be(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(ze)))),r}(a,m,f,w));const v=[a,...x],z=await Ce(t,b),R=[];let S=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&R.push(z[y]),u){const e=function(e,t,o){void 0===o&&(o=!1);const i=ye(e),n=ve(e),r=we(n);let s="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Re(s)),[s,Re(s)]}(n,s,w);R.push(z[e[0]],z[e[1]])}if(S=[...S,{placement:n,overflows:R}],!R.every((e=>e<=0))){var _,E;const e=((null==(_=r.flip)?void 0:_.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let o=null==(E=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!o)switch(p){case"bestFit":{var C;const e=null==(C=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},Ye=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:s}=t,{padding:a=2,x:l,y:d}=me(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>_e(ke(e))))}(c),h=_e(ke(c)),p=Se(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=d)return u.find((e=>l>e.left-p.left&&l<e.right+p.right&&d>e.top-p.top&&d<e.bottom+p.bottom))||h;if(u.length>=2){if("y"===xe(o)){const e=u[0],t=u[u.length-1],i="top"===be(o),n=e.top,r=t.bottom,s=i?e.left:t.left,a=i?e.right:t.right;return{top:n,bottom:r,left:s,right:a,width:a-s,height:r-n,x:s,y:n}}const e="left"===be(o),t=de(...u.map((e=>e.right))),i=le(...u.map((e=>e.left))),n=u.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,s=n[n.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return h}},floating:i.floating,strategy:s});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Ge=(e,t,o)=>{const i=new Map,n={platform:Ue,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:s}=o,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:u}=Ee(d,i,l),h=i,p={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:m}=a[o],{x:b,y:y,data:g,reset:w}=await m({x:c,y:u,initialPlacement:i,placement:h,strategy:n,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=b?b:c,u=null!=y?y:u,p={...p,[r]:{...p[r],...g}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(d=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:c,y:u}=Ee(d,h,l))),o=-1)}return{x:c,y:u,placement:h,strategy:n,middlewareData:p}})(e,t,{...n,platform:r})};var Ze="undefined"!=typeof document?f:h;function qe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!qe(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!qe(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Je(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ke(e,t){const o=Je(e);return Math.round(t*o)/o}function Qe(e){const t=c.useRef(e);return Ze((()=>{t.current=e})),t}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
5
  */
6
- var He=["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(","),De="undefined"==typeof Element,Fe=De?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ve=!De&&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},Ue=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},Ye=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var s=r.shift();if(!Ue(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,i);i.flatten?n.push.apply(n,l):n.push({scopeParent:s,candidates:l})}else{Fe.call(s,He)&&i.filter(s)&&(o||!t.includes(s))&&n.push(s);var d=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),c=!Ue(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&c){var u=e(!0===d?s.children:d.children,!0,i);i.flatten?n.push.apply(n,u):n.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return n},$e=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Xe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!$e(e)?0:e.tabIndex},qe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ge=function(e){return"INPUT"===e.tagName},Ze=function(e){return function(e){return Ge(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||Ve(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(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 n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},Je=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},Ke=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=Fe.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Fe.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return Je(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,a=Ve(e);if(s&&!s.shadowRoot&&!0===i(s))return Je(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=r}if(function(e){var t,o,i,n,r=e&&Ve(e),s=null===(t=r)||void 0===t?void 0:t.host,a=!1;if(r&&r!==e)for(a=!!(null!==(o=s)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!a&&s;){var l,d,c;a=!(null===(d=s=null===(l=r=Ve(s))||void 0===l?void 0:l.host)||void 0===d||null===(c=d.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},Qe=function(e,t){return!(t.disabled||Ue(t)||function(e){return Ge(e)&&"hidden"===e.type}(t)||Ke(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 o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!Fe.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},et=function(e,t){return!(Ze(t)||Xe(t)<0||!Qe(e,t))},tt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ot=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,s=r?t.scopeParent:t,a=function(e,t){var o=Xe(e);return o<0&&t&&!$e(e)?0:o}(s,r),l=r?e(t.candidates):s;0===a?r?o.push.apply(o,l):o.push(s):i.push({documentOrder:n,tabIndex:a,item:t,isScope:r,content:l})})),i.sort(qe).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},it=function(e,t){var o;return o=(t=t||{}).getShadowRoot?Ye([e],t.includeContainer,{filter:et.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:tt}):function(e,t,o){if(Ue(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(He));return t&&Fe.call(e,He)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,et.bind(null,t)),ot(o)};const nt=r["useInsertionEffect".toString()]||(e=>e());var rt="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function st(){return st=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},st.apply(this,arguments)}let at=!1,lt=0;const dt=()=>"floating-ui-"+lt++;const ct=r["useId".toString()]||function(){const[e,t]=r.useState((()=>at?dt():void 0));return rt((()=>{null==e&&t(dt())}),[]),r.useEffect((()=>{at||(at=!0)}),[]),e};const ut=r.createContext(null),ht=r.createContext(null);function pt(e){return"data-floating-ui-"+e}const ft=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function mt(e,t){const o=it(e,ft());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function bt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&B(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function yt(e){it(e,ft()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function gt(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 xt={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 wt(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const vt=r.forwardRef((function(e,t){const[o,i]=r.useState();rt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",wt),()=>{document.removeEventListener("keydown",wt)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[pt("focus-guard")]:"",style:xt};return r.createElement("span",st({},e,n))})),zt=r.createContext(null),Rt=pt("portal");function St(e){let{children:t,id:o,root:n=null,preserveTabOrder:s=!0}=e;const a=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=r.useState(null),s=ct(),a=Et(),l=r.useRef(null);return rt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{l.current=null}))}),[i]),rt((()=>{if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=s,o.setAttribute(Rt,""),e.appendChild(o),l.current=o,n(o)}),[t,s]),rt((()=>{if(l.current)return;let e=o||(null==a?void 0:a.portalNode);e&&!A(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const r=document.createElement("div");r.id=s,r.setAttribute(Rt,""),e=i||e,e.appendChild(r),l.current=r,n(r)}),[t,o,s,a]),i}({id:o,root:n}),[l,d]=r.useState(null),c=r.useRef(null),u=r.useRef(null),h=r.useRef(null),p=r.useRef(null),f=!!l&&!l.modal&&l.open&&s&&!(!n&&!a);return r.useEffect((()=>{if(a&&s&&(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&&bt(e)){("focusin"===e.type?gt:yt)(a)}}}),[a,s,null==l?void 0:l.modal]),r.createElement(zt.Provider,{value:r.useMemo((()=>({preserveTabOrder:s,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:h,afterInsideRef:p,portalNode:a,setFocusManagerState:d})),[s,a])},f&&a&&r.createElement(vt,{"data-type":"outside",ref:c,onFocus:e=>{if(bt(e,a)){var t;null==(t=h.current)||t.focus()}else{const e=mt(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),f&&a&&r.createElement("span",{"aria-owns":a.id,style:xt}),a&&i.createPortal(t,a),f&&a&&r.createElement(vt,{"data-type":"outside",ref:u,onFocus:e=>{if(bt(e,a)){var t;null==(t=p.current)||t.focus()}else{const t=mt(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 Et=()=>r.useContext(zt),_t=new Set,Ct=r.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=ct();return rt((()=>{if(!o)return;_t.add(n);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,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,a=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var l,d;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,o=(null==(d=window.visualViewport)?void 0:d.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(o))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{_t.delete(n),0===_t.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[n,o]),r.createElement("div",st({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function jt(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[a,l]=r.useState(null),d=(null==(t=e.elements)?void 0:t.reference)||a,c=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:a,floating:l}={},transform:d=!0,whileElementsMounted:c,open:u}=e,[h,p]=r.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=r.useState(i);Te(f,i)||m(i);const[b,y]=r.useState(null),[g,x]=r.useState(null),w=r.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),v=r.useCallback((e=>{e!==E.current&&(E.current=e,x(e))}),[]),z=a||b,R=l||g,S=r.useRef(null),E=r.useRef(null),_=r.useRef(h),C=null!=c,j=Ie(c),k=Ie(n),O=r.useCallback((()=>{if(!S.current||!E.current)return;const e={placement:t,strategy:o,middleware:f};k.current&&(e.platform=k.current),We(S.current,E.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Te(_.current,t)&&(_.current=t,s.flushSync((()=>{p(t)})))}))}),[f,t,o,k]);Ae((()=>{!1===u&&_.current.isPositioned&&(_.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const N=r.useRef(!1);Ae((()=>(N.current=!0,()=>{N.current=!1})),[]),Ae((()=>{if(z&&(S.current=z),R&&(E.current=R),z&&R){if(j.current)return j.current(z,R,O);O()}}),[z,R,O,j,C]);const L=r.useMemo((()=>({reference:S,floating:E,setReference:w,setFloating:v})),[w,v]),M=r.useMemo((()=>({reference:z,floating:R})),[z,R]),W=r.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=Pe(M.floating,h.x),i=Pe(M.floating,h.y);return d?{...e,transform:"translate("+t+"px, "+i+"px)",...Be(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,d,M.floating,h.x,h.y]);return r.useMemo((()=>({...h,update:O,refs:L,elements:M,floatingStyles:W})),[h,O,L,M,W])}(e),u=r.useContext(ht),h=null!=((null==(p=r.useContext(ut))?void 0:p.id)||null);var p;const f=function(e){const t=r.useRef((()=>{}));return nt((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(b.current.openEvent=t),y.emit("openchange",{open:e,event:t,reason:o,nested:h}),null==i||i(e,t,o)})),m=r.useRef(null),b=r.useRef({}),y=r.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],g=ct(),x=r.useCallback((e=>{const t=A(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c.refs.setReference(t)}),[c.refs]),w=r.useCallback((e=>{(A(e)||null===e)&&(m.current=e,l(e)),(A(c.refs.reference.current)||null===c.refs.reference.current||null!==e&&!A(e))&&c.refs.setReference(e)}),[c.refs]),v=r.useMemo((()=>({...c.refs,setReference:w,setPositionReference:x,domReference:m})),[c.refs,w,x]),z=r.useMemo((()=>({...c.elements,domReference:d})),[c.elements,d]),R=r.useMemo((()=>({...c,refs:v,elements:z,dataRef:b,nodeId:n,floatingId:g,events:y,open:o,onOpenChange:f})),[c,n,g,y,o,f,v,z]);return rt((()=>{const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===n));e&&(e.context=R)})),r.useMemo((()=>({...c,context:R,refs:v,elements:z})),[c,v,z,R])}function kt(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Ot=["color"],Nt=o.forwardRef((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,r=kt(e,Ot);return o.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),o.createElement("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Lt=["color"],Mt=o.forwardRef((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,r=kt(e,Lt);return o.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),o.createElement("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}));const Wt={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null},twitter:function(e){const t=e.match(/\/status\/(\d+)/);return t?t[1]:null},figma:function(e){const t=new URL(e).searchParams,o=t.get("node-id");return t.get("node-id")?o:"unknown"}},At=({blockId:i,onClose:n})=>{const r=e.useYooptaEditor(),[s,a]=o.useState(""),l=0===s.length;return t.jsxs("div",Object.assign({className:"yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-white-space-nowrap yoo-embed-w-full"},{children:[t.jsx("input",{type:"text",placeholder:"Paste embed link",value:s,className:"yoo-embed-items-center yoo-embed-bg-[hsla(45,13%,94%,.6)] yoo-embed-rounded-[4px] yoo-embed-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-embed-cursor-text yoo-embed-flex yoo-embed-text-[14px] yoo-embed-h-[32px] yoo-embed-leading-[20px] yoo-embed-px-[6px] yoo-embed-relative yoo-embed-w-full yoo-embed-border-none",onChange:e=>a(e.target.value)}),t.jsx("button",Object.assign({type:"button",className:"yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-cursor-pointer yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-flex-shrink-0 yoo-embed-white-space-nowrap yoo-embed-h-[28px] yoo-embed-rounded-[4px] yoo-embed-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-embed-bg-[rgb(35,131,226)] yoo-embed-text-white yoo-embed-fill-white yoo-embed-leading-[1.2] yoo-embed-px-[12px] yoo-embed-text-[14px] yoo-embed-font-medium yoo-embed-w-full yoo-embed-max-w-[300px] yoo-embed-mx-auto yoo-embed-m-[12px_0_6px] disabled:yoo-embed-bg-[rgba(35,131,226,0.5)] disabled:yoo-embed-cursor-not-allowed",disabled:l,onClick:()=>{var e;if(0===s.length)return;const t=(o=s).includes("youtube.com")||o.includes("youtu.be")?"youtube":o.includes("vimeo.com")?"vimeo":o.includes("dailymotion.com")||o.includes("dai.ly")?"dailymotion":o.includes("twitter")?"twitter":o.includes("figma")?"figma":null;var o;const a=t?null===(e=Wt[t])||void 0===e?void 0:e.call(Wt,s):null,l={type:t,id:a,url:s};t&&a||(l.id=s),r.blocks.Embed.updateElement(i,"embed",{provider:l}),n()}},{children:"Embed embed"}))]}))},Tt=({floatingStyles:e,refs:o,onClose:i,blockId:n})=>t.jsx(St,Object.assign({id:"yoo-embed-uploader-portal",root:document.getElementById("yoopta-editor")},{children:t.jsx(Ct,Object.assign({lockScroll:!0,className:"yoo-embed-z-[100]",onClick:i},{children:t.jsx("div",Object.assign({ref:o.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:t.jsxs("div",Object.assign({className:"yoo-embed-flex yoo-embed-flex-col yoo-embed-min-w-[540px] yoo-embed-max-w-[calc(100vw-24px)] yoo-embed-h-full yoo-embed-max-h-[420px] yoo-embed-bg-white yoo-embed-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[t.jsx("div",Object.assign({className:"yoo-embed-w-full yoo-embed-flex yoo-embed-text-[14px] yoo-embed-p-[0_8px] yoo-embed-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-embed-relative yoo-embed-z-10 yoo-embed-h-[40px]"},{children:t.jsx("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"yoo-embed-py-[6px] yoo-embed-whitespace-nowrap yoo-embed-min-w-0 yoo-embed-flex-shrink-0 yoo-embed-text-[rgb(55,53,47)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-bg-inherit yoo-embed-transition-[height_20ms_ease-in] yoo-embed-inline-flex yoo-embed-items-center yoo-embed-h-full yoo-embed-text-[14px] yoo-embed-leading-[1.2] yoo-embed-px-[8px]"},{children:"Embed link"}))})),t.jsx("div",Object.assign({className:"yoo-embed-pt-[6px] yoo-embed-pb-[6px] yoo-embed-mt-[4px] yoo-embed-flex yoo-embed-justify-center yoo-embed-mr-[12px] yoo-embed-ml-[12px]"},{children:t.jsx(At,{onClose:i,blockId:n})}))]}))}))}))})),Bt=({attributes:e,children:i,blockId:n})=>{const[r,s]=o.useState(!1),{refs:a,floatingStyles:l}=jt({placement:"bottom",open:r,onOpenChange:s,middleware:[Me(),Le(),Ne(),me(10)]});return t.jsxs("div",Object.assign({className:"yoo-embed-w-full yoo-embed-user-select-none yoo-embed-m-[20px_0_10px] yoo-embed-relative yoo-embed-flex"},e,{contentEditable:!1},{children:[t.jsxs("button",Object.assign({className:"yoo-embed-p-[12px_36px_12px_12px] yoo-embed-flex yoo-embed-items-center yoo-embed-text-left yoo-embed-w-full yoo-embed-overflow-hidden yoo-embed-rounded-[3px] yoo-embed-text-[14px] yoo-embed-text-[rgba(55,53,47,0.65)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-border-none yoo-embed-bg-[#efefef] yoo-embed-transition-[background-color_100ms_ease-in] hover:yoo-embed-bg-[#e3e3e3]",onClick:()=>s(!0),ref:a.setReference},{children:[t.jsx(Nt,{className:"yoo-embed-mr-2 yoo-embed-user-select-none",width:24,height:24}),t.jsx("span",Object.assign({className:"yoo-embed-font-medium"},{children:"Click to add embed"}))]})),r&&t.jsx(Tt,{blockId:n,floatingStyles:l,refs:a,onClose:()=>s(!1)}),i]}))},{ExtendedBlockActions:Pt,BlockOptionsMenuGroup:It,BlockOptionsMenuItem:Ht,BlockOptionsSeparator:Dt}=e.UI,Ft=({editor:e,block:o,props:i})=>t.jsxs(Pt,Object.assign({onClick:()=>e.setSelection([o.meta.order])},{children:[t.jsx(Dt,{}),t.jsx(It,{children:t.jsx(Ht,{children:t.jsxs("button",Object.assign({type:"button",className:"yoo-embed-rounded-sm hover:yoo-embed-bg-[#37352f14] yoo-embed-leading-[120%] yoo-embed-px-2 yoo-embed-py-1.5 yoo-embed-mx-[4px] yoo-embed-cursor-pointer yoo-embed-w-full yoo-embed-flex yoo-embed-justify-start",onClick:()=>{var e;window.open(null===(e=null==i?void 0:i.provider)||void 0===e?void 0:e.url,"_blank")}},{children:[t.jsx(Mt,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}))})})]})),Vt=({position:e})=>t.jsx("div",Object.assign({contentEditable:!1,className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-z-10 yoo-embed-opacity-1 yoo-embed-h-full yoo-embed-w-[15px] yoo-embed-cursor-col-resize yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in "+("left"===e?"yoo-embed-left-0 yoo-embed-top-0":"yoo-embed-right-0 yoo-embed-top-0")},{children:t.jsx("div",{className:"yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-300 yoo-embed-ease-in yoo-embed-rounded-[20px] yoo-embed-bg-[rgba(15,15,15,0.6)] yoo-embed-border yoo-embed-border-[rgba(255,255,255,0.9)] yoo-embed-w-[6px] yoo-embed-h-[48px] yoo-embed-max-h-[50%] yoo-embed-shadow-[0_0_0_.5px_#FFF]"})})),Ut=new e.YooptaPlugin({type:"Embed",elements:{embed:{render:({element:i,attributes:n,children:r,blockId:s})=>{const{sizes:a,provider:l}=i.props||{},c=e.useBlockData(s),u=e.useYooptaEditor(),h=e.useYooptaPluginOptions("Embed"),p=e.useYooptaReadOnly(),[f,m]=o.useState({width:(null==a?void 0:a.width)||750,height:(null==a?void 0:a.height)||440});o.useEffect((()=>m({width:(null==a?void 0:a.width)||650,height:(null==a?void 0:a.height)||440})),[i.props]);const b=e.useBlockSelected({blockId:s}),y=o.useMemo((()=>{var e,o;return{minWidth:300,size:{width:f.width,height:f.height},maxWidth:(null===(e=null==h?void 0:h.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(o=null==h?void 0:h.maxSizes)||void 0===o?void 0:o.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!p,right:!p},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{m({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{u.blocks.Embed.updateElement(s,"embed",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:t.jsx(Vt,{position:"left"}),right:t.jsx(Vt,{position:"right"})}}}),[f.width,f.height]);return l&&(null==l?void 0:l.id)?t.jsx("div",Object.assign({"data-element-type":i.type,contentEditable:!1,draggable:!1,className:"yoo-embed-mt-4 yoo-embed-relative yoopta-embed"},n,{children:t.jsxs(O,Object.assign({},y,{className:"yoo-embed-mx-auto yoo-embed-my-0 yoo-embed-flex"},{children:[b&&t.jsx("div",{className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-inset-0 yoo-embed-bg-[rgba(35,131,226,0.14)] yoo-embed-z-[81] yoo-embed-rounded-[3px] yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in"}),t.jsx(d,{width:null==f?void 0:f.width,height:null==f?void 0:f.height,provider:l,blockId:s}),!p&&t.jsx(Ft,{block:c,editor:u,props:i.props}),r]}))})):t.jsx(Bt,Object.assign({attributes:n,blockId:s},{children:r}))},props:{sizes:{width:650,height:400},nodeType:"void"}}},options:{display:{title:"Embed",description:"For embed videos, google maps and more"},maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IFRAME"],parse:t=>{if("IFRAME"===t.nodeName){const o=new URL(t.getAttribute("src")||"");return{id:e.generateId(),type:"embed",children:[{text:""}],props:{provider:{id:o.href,type:o.hostname,url:o.href},sizes:{width:t.getAttribute("width")?parseInt(t.getAttribute("width")||"650",10):650,height:t.getAttribute("height")?parseInt(t.getAttribute("height")||"400",10):400}}}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoo-embed-pointer-events-none{pointer-events:none}.yoo-embed-absolute{position:absolute}.yoo-embed-relative{position:relative}.yoo-embed-inset-0{inset:0}.yoo-embed-left-0{left:0}.yoo-embed-right-0{right:0}.yoo-embed-top-0{top:0}.yoo-embed-z-10{z-index:10}.yoo-embed-z-\\[100\\]{z-index:100}.yoo-embed-z-\\[81\\]{z-index:81}.yoo-embed-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-embed-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-embed-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-embed-mx-auto{margin-left:auto;margin-right:auto}.yoo-embed-my-0{margin-bottom:0;margin-top:0}.yoo-embed-ml-\\[12px\\]{margin-left:12px}.yoo-embed-mr-2{margin-right:.5rem}.yoo-embed-mr-\\[12px\\]{margin-right:12px}.yoo-embed-mt-4{margin-top:1rem}.yoo-embed-mt-\\[4px\\]{margin-top:4px}.yoo-embed-flex{display:flex}.yoo-embed-inline-flex{display:inline-flex}.yoo-embed-h-4{height:1rem}.yoo-embed-h-\\[28px\\]{height:28px}.yoo-embed-h-\\[32px\\]{height:32px}.yoo-embed-h-\\[40px\\]{height:40px}.yoo-embed-h-\\[48px\\]{height:48px}.yoo-embed-h-full{height:100%}.yoo-embed-max-h-\\[420px\\]{max-height:420px}.yoo-embed-max-h-\\[50\\%\\]{max-height:50%}.yoo-embed-w-4{width:1rem}.yoo-embed-w-\\[15px\\]{width:15px}.yoo-embed-w-\\[6px\\]{width:6px}.yoo-embed-w-full{width:100%}.yoo-embed-min-w-0{min-width:0}.yoo-embed-min-w-\\[540px\\]{min-width:540px}.yoo-embed-max-w-\\[300px\\]{max-width:300px}.yoo-embed-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-embed-flex-shrink-0{flex-shrink:0}.yoo-embed-cursor-col-resize{cursor:col-resize}.yoo-embed-cursor-pointer{cursor:pointer}.yoo-embed-cursor-text{cursor:text}.yoo-embed-flex-col{flex-direction:column}.yoo-embed-items-center{align-items:center}.yoo-embed-justify-start{justify-content:flex-start}.yoo-embed-justify-center{justify-content:center}.yoo-embed-overflow-hidden{overflow:hidden}.yoo-embed-whitespace-nowrap{white-space:nowrap}.yoo-embed-rounded-\\[20px\\]{border-radius:20px}.yoo-embed-rounded-\\[3px\\]{border-radius:3px}.yoo-embed-rounded-\\[4px\\]{border-radius:4px}.yoo-embed-rounded-sm{border-radius:.125rem}.yoo-embed-border{border-width:1px}.yoo-embed-border-none{border-style:none}.yoo-embed-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-embed-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-embed-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-embed-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-embed-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-embed-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-embed-bg-inherit{background-color:inherit}.yoo-embed-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-embed-fill-white{fill:#fff}.yoo-embed-p-\\[0_8px\\]{padding:0 8px}.yoo-embed-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-embed-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-embed-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-embed-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-embed-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-embed-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-embed-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-embed-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-embed-pb-\\[6px\\]{padding-bottom:6px}.yoo-embed-pt-\\[6px\\]{padding-top:6px}.yoo-embed-text-left{text-align:left}.yoo-embed-text-\\[14px\\]{font-size:14px}.yoo-embed-font-medium{font-weight:500}.yoo-embed-leading-\\[1\\.2\\]{line-height:1.2}.yoo-embed-leading-\\[120\\%\\]{line-height:120%}.yoo-embed-leading-\\[20px\\]{line-height:20px}.yoo-embed-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-embed-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-embed-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-embed-opacity-100{opacity:1}.yoo-embed-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-duration-150{transition-duration:.15s}.yoo-embed-duration-300{transition-duration:.3s}.yoo-embed-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-embed .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}.yoopta-embed:hover .yoopta-extended-block-actions{opacity:1}.hover\\:yoo-embed-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-embed-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-embed-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-embed-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}"),exports.default=Ut;
6
+ var et=["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(","),tt="undefined"==typeof Element,ot=tt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,it=!tt&&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},nt=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},rt=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var s=r.shift();if(!nt(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,i);i.flatten?n.push.apply(n,l):n.push({scopeParent:s,candidates:l})}else{ot.call(s,et)&&i.filter(s)&&(o||!t.includes(s))&&n.push(s);var d=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),c=!nt(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&c){var u=e(!0===d?s.children:d.children,!0,i);i.flatten?n.push.apply(n,u):n.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return n},st=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},at=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!st(e)?0:e.tabIndex},lt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},dt=function(e){return"INPUT"===e.tagName},ct=function(e){return function(e){return dt(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||it(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(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 n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},ut=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},ht=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=ot.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ot.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return ut(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,a=it(e);if(s&&!s.shadowRoot&&!0===i(s))return ut(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=r}if(function(e){var t,o,i,n,r=e&&it(e),s=null===(t=r)||void 0===t?void 0:t.host,a=!1;if(r&&r!==e)for(a=!!(null!==(o=s)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!a&&s;){var l,d,c;a=!(null===(d=s=null===(l=r=it(s))||void 0===l?void 0:l.host)||void 0===d||null===(c=d.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},pt=function(e,t){return!(t.disabled||nt(t)||function(e){return dt(e)&&"hidden"===e.type}(t)||ht(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 o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!ot.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},ft=function(e,t){return!(ct(t)||at(t)<0||!pt(e,t))},mt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},bt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,s=r?t.scopeParent:t,a=function(e,t){var o=at(e);return o<0&&t&&!st(e)?0:o}(s,r),l=r?e(t.candidates):s;0===a?r?o.push.apply(o,l):o.push(s):i.push({documentOrder:n,tabIndex:a,item:t,isScope:r,content:l})})),i.sort(lt).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},yt=function(e,t){var o;return o=(t=t||{}).getShadowRoot?rt([e],t.includeContainer,{filter:ft.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mt}):function(e,t,o){if(nt(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(et));return t&&ot.call(e,et)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,ft.bind(null,t)),bt(o)};const gt=c["useInsertionEffect".toString()]||(e=>e());var wt="undefined"!=typeof document?f:h;function xt(){return xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},xt.apply(this,arguments)}let vt=!1,zt=0;const Rt=()=>"floating-ui-"+zt++;const St=c["useId".toString()]||function(){const[e,t]=c.useState((()=>vt?Rt():void 0));return wt((()=>{null==e&&t(Rt())}),[]),c.useEffect((()=>{vt||(vt=!0)}),[]),e};const _t=c.createContext(null),Et=c.createContext(null);function Ct(e){return"data-floating-ui-"+e}const kt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ot(e,t){const o=yt(e,kt());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function Nt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&J(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function Lt(e){yt(e,kt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Mt(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 Wt={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 At(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Tt=c.forwardRef((function(e,t){const[o,i]=c.useState();wt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",At),()=>{document.removeEventListener("keydown",At)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Ct("focus-guard")]:"",style:Wt};return c.createElement("span",xt({},e,n))})),jt=c.createContext(null),Bt=Ct("portal");function It(e){let{children:t,id:o,root:i=null,preserveTabOrder:n=!0}=e;const r=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=c.useState(null),r=St(),s=Pt(),a=c.useRef(null);return wt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{a.current=null}))}),[i]),wt((()=>{if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=r,o.setAttribute(Bt,""),e.appendChild(o),a.current=o,n(o)}),[t,r]),wt((()=>{if(a.current)return;let e=o||(null==s?void 0:s.portalNode);e&&!Z(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Bt,""),e=i||e,e.appendChild(l),a.current=l,n(l)}),[t,o,r,s]),i}({id:o,root:i}),[s,a]=c.useState(null),l=c.useRef(null),d=c.useRef(null),u=c.useRef(null),h=c.useRef(null),p=!!s&&!s.modal&&s.open&&n&&!(!i&&!r);return c.useEffect((()=>{if(r&&n&&(null==s||!s.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&Nt(e)){("focusin"===e.type?Mt:Lt)(r)}}}),[r,n,null==s?void 0:s.modal]),c.createElement(jt.Provider,{value:c.useMemo((()=>({preserveTabOrder:n,beforeOutsideRef:l,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:h,portalNode:r,setFocusManagerState:a})),[n,r])},p&&r&&c.createElement(Tt,{"data-type":"outside",ref:l,onFocus:e=>{if(Nt(e,r)){var t;null==(t=u.current)||t.focus()}else{const e=Ot(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),p&&r&&c.createElement("span",{"aria-owns":r.id,style:Wt}),r&&x(t,r),p&&r&&c.createElement(Tt,{"data-type":"outside",ref:d,onFocus:e=>{if(Nt(e,r)){var t;null==(t=h.current)||t.focus()}else{const t=Ot(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent))}}}))}const Pt=()=>c.useContext(jt),Ht=new Set,Dt=c.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=St();return wt((()=>{if(!o)return;Ht.add(n);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,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,a=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var l,d;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,o=(null==(d=window.visualViewport)?void 0:d.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(o))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{Ht.delete(n),0===Ht.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[n,o]),c.createElement("div",xt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function Ft(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,s]=c.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||r,l=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:l,open:d}=e,[u,h]=c.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=c.useState(i);qe(p,i)||f(i);const[m,b]=c.useState(null),[y,w]=c.useState(null),x=c.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),v=c.useCallback((e=>{e!==_.current&&(_.current=e,w(e))}),[]),z=r||m,R=s||y,S=c.useRef(null),_=c.useRef(null),E=c.useRef(u),C=null!=l,k=Qe(l),O=Qe(n),N=c.useCallback((()=>{if(!S.current||!_.current)return;const e={placement:t,strategy:o,middleware:p};O.current&&(e.platform=O.current),Ge(S.current,_.current,e).then((e=>{const t={...e,isPositioned:!0};L.current&&!qe(E.current,t)&&(E.current=t,g.flushSync((()=>{h(t)})))}))}),[p,t,o,O]);Ze((()=>{!1===d&&E.current.isPositioned&&(E.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const L=c.useRef(!1);Ze((()=>(L.current=!0,()=>{L.current=!1})),[]),Ze((()=>{if(z&&(S.current=z),R&&(_.current=R),z&&R){if(k.current)return k.current(z,R,N);N()}}),[z,R,N,k,C]);const M=c.useMemo((()=>({reference:S,floating:_,setReference:x,setFloating:v})),[x,v]),W=c.useMemo((()=>({reference:z,floating:R})),[z,R]),A=c.useMemo((()=>{const e={position:o,left:0,top:0};if(!W.floating)return e;const t=Ke(W.floating,u.x),i=Ke(W.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...Je(W.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,a,W.floating,u.x,u.y]);return c.useMemo((()=>({...u,update:N,refs:M,elements:W,floatingStyles:A})),[u,N,M,W,A])}(e),d=c.useContext(Et),u=null!=((null==(h=c.useContext(_t))?void 0:h.id)||null);var h;const p=function(e){const t=c.useRef((()=>{}));return gt((()=>{t.current=e})),c.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(m.current.openEvent=t),b.emit("openchange",{open:e,event:t,reason:o,nested:u}),null==i||i(e,t,o)})),f=c.useRef(null),m=c.useRef({}),b=c.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],y=St(),w=c.useCallback((e=>{const t=Z(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),x=c.useCallback((e=>{(Z(e)||null===e)&&(f.current=e,s(e)),(Z(l.refs.reference.current)||null===l.refs.reference.current||null!==e&&!Z(e))&&l.refs.setReference(e)}),[l.refs]),v=c.useMemo((()=>({...l.refs,setReference:x,setPositionReference:w,domReference:f})),[l.refs,x,w]),z=c.useMemo((()=>({...l.elements,domReference:a})),[l.elements,a]),R=c.useMemo((()=>({...l,refs:v,elements:z,dataRef:m,nodeId:n,floatingId:y,events:b,open:o,onOpenChange:p})),[l,n,y,b,o,p,v,z]);return wt((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===n));e&&(e.context=R)})),c.useMemo((()=>({...l,context:R,refs:v,elements:z})),[l,v,z,R])}function Vt(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Ut=["color"],$t=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Ut);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Xt=["color"],Yt=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Xt);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const Gt={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null},twitter:function(e){const t=e.match(/\/status\/(\d+)/);return t?t[1]:null},figma:function(e){const t=new URL(e).searchParams,o=t.get("node-id");return t.get("node-id")?o:"unknown"}},Zt=({blockId:t,onClose:o})=>{const i=e(),[n,r]=u(""),s=0===n.length;return l("div",Object.assign({className:"yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-white-space-nowrap yoo-embed-w-full"},{children:[d("input",{type:"text",placeholder:"Paste embed link",value:n,className:"yoo-embed-items-center yoo-embed-bg-[hsla(45,13%,94%,.6)] yoo-embed-rounded-[4px] yoo-embed-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-embed-cursor-text yoo-embed-flex yoo-embed-text-[14px] yoo-embed-h-[32px] yoo-embed-leading-[20px] yoo-embed-px-[6px] yoo-embed-relative yoo-embed-w-full yoo-embed-border-none",onChange:e=>r(e.target.value)}),d("button",Object.assign({type:"button",className:"yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-cursor-pointer yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-flex-shrink-0 yoo-embed-white-space-nowrap yoo-embed-h-[28px] yoo-embed-rounded-[4px] yoo-embed-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-embed-bg-[rgb(35,131,226)] yoo-embed-text-white yoo-embed-fill-white yoo-embed-leading-[1.2] yoo-embed-px-[12px] yoo-embed-text-[14px] yoo-embed-font-medium yoo-embed-w-full yoo-embed-max-w-[300px] yoo-embed-mx-auto yoo-embed-m-[12px_0_6px] disabled:yoo-embed-bg-[rgba(35,131,226,0.5)] disabled:yoo-embed-cursor-not-allowed",disabled:s,onClick:()=>{var e;if(0===n.length)return;const r=(s=n).includes("youtube.com")||s.includes("youtu.be")?"youtube":s.includes("vimeo.com")?"vimeo":s.includes("dailymotion.com")||s.includes("dai.ly")?"dailymotion":s.includes("twitter")?"twitter":s.includes("figma")?"figma":null;var s;const a=r?null===(e=Gt[r])||void 0===e?void 0:e.call(Gt,n):null,l={type:r,id:a,url:n};r&&a||(l.id=n),i.blocks.Embed.updateElement(t,"embed",{provider:l}),o()}},{children:"Embed embed"}))]}))},qt=({floatingStyles:e,refs:t,onClose:o,blockId:i})=>d(It,Object.assign({id:"yoo-embed-uploader-portal",root:document.getElementById("yoopta-editor")},{children:d(Dt,Object.assign({lockScroll:!0,className:"yoo-embed-z-[100]",onClick:o},{children:d("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:l("div",Object.assign({className:"yoo-embed-flex yoo-embed-flex-col yoo-embed-min-w-[540px] yoo-embed-max-w-[calc(100vw-24px)] yoo-embed-h-full yoo-embed-max-h-[420px] yoo-embed-bg-white yoo-embed-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[d("div",Object.assign({className:"yoo-embed-w-full yoo-embed-flex yoo-embed-text-[14px] yoo-embed-p-[0_8px] yoo-embed-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-embed-relative yoo-embed-z-10 yoo-embed-h-[40px]"},{children:d("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"yoo-embed-py-[6px] yoo-embed-whitespace-nowrap yoo-embed-min-w-0 yoo-embed-flex-shrink-0 yoo-embed-text-[rgb(55,53,47)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-bg-inherit yoo-embed-transition-[height_20ms_ease-in] yoo-embed-inline-flex yoo-embed-items-center yoo-embed-h-full yoo-embed-text-[14px] yoo-embed-leading-[1.2] yoo-embed-px-[8px]"},{children:"Embed link"}))})),d("div",Object.assign({className:"yoo-embed-pt-[6px] yoo-embed-pb-[6px] yoo-embed-mt-[4px] yoo-embed-flex yoo-embed-justify-center yoo-embed-mr-[12px] yoo-embed-ml-[12px]"},{children:d(Zt,{onClose:o,blockId:i})}))]}))}))}))})),Jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=u(!1),{refs:r,floatingStyles:s}=Ft({placement:"bottom",open:i,onOpenChange:n,middleware:[Ye(),Xe(),$e(),Oe(10)]});return l("div",Object.assign({className:"yoo-embed-w-full yoo-embed-user-select-none yoo-embed-m-[20px_0_10px] yoo-embed-relative yoo-embed-flex"},e,{contentEditable:!1},{children:[l("button",Object.assign({className:"yoo-embed-p-[12px_36px_12px_12px] yoo-embed-flex yoo-embed-items-center yoo-embed-text-left yoo-embed-w-full yoo-embed-overflow-hidden yoo-embed-rounded-[3px] yoo-embed-text-[14px] yoo-embed-text-[rgba(55,53,47,0.65)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-border-none yoo-embed-bg-[#efefef] yoo-embed-transition-[background-color_100ms_ease-in] hover:yoo-embed-bg-[#e3e3e3]",onClick:()=>n(!0),ref:r.setReference},{children:[d($t,{className:"yoo-embed-mr-2 yoo-embed-user-select-none",width:24,height:24}),d("span",Object.assign({className:"yoo-embed-font-medium"},{children:"Click to add embed"}))]})),i&&d(qt,{blockId:o,floatingStyles:s,refs:r,onClose:()=>n(!1)}),t]}))},{ExtendedBlockActions:Kt,BlockOptionsMenuGroup:Qt,BlockOptionsMenuItem:eo,BlockOptionsSeparator:to}=t,oo=({editor:e,block:t,props:o})=>l(Kt,Object.assign({onClick:()=>e.setSelection([t.meta.order])},{children:[d(to,{}),d(Qt,{children:d(eo,{children:l("button",Object.assign({type:"button",className:"yoo-embed-rounded-sm hover:yoo-embed-bg-[#37352f14] yoo-embed-leading-[120%] yoo-embed-px-2 yoo-embed-py-1.5 yoo-embed-mx-[4px] yoo-embed-cursor-pointer yoo-embed-w-full yoo-embed-flex yoo-embed-justify-start",onClick:()=>{var e;window.open(null===(e=null==o?void 0:o.provider)||void 0===e?void 0:e.url,"_blank")}},{children:[d(Yt,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}))})})]})),io=({position:e})=>d("div",Object.assign({contentEditable:!1,className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-z-10 yoo-embed-opacity-1 yoo-embed-h-full yoo-embed-w-[15px] yoo-embed-cursor-col-resize yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in "+("left"===e?"yoo-embed-left-0 yoo-embed-top-0":"yoo-embed-right-0 yoo-embed-top-0")},{children:d("div",{className:"yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-300 yoo-embed-ease-in yoo-embed-rounded-[20px] yoo-embed-bg-[rgba(15,15,15,0.6)] yoo-embed-border yoo-embed-border-[rgba(255,255,255,0.9)] yoo-embed-w-[6px] yoo-embed-h-[48px] yoo-embed-max-h-[50%] yoo-embed-shadow-[0_0_0_.5px_#FFF]"})})),no=new s({type:"Embed",elements:{embed:{render:({element:t,attributes:s,children:a,blockId:c})=>{const{sizes:p,provider:f}=t.props||{},m=o(c),b=e(),g=i("Embed"),w=n(),[x,v]=u({width:(null==p?void 0:p.width)||750,height:(null==p?void 0:p.height)||440});h((()=>v({width:(null==p?void 0:p.width)||650,height:(null==p?void 0:p.height)||440})),[t.props]);const z=r({blockId:c}),S=y((()=>{var e,t;return{minWidth:300,size:{width:x.width,height:x.height},maxWidth:(null===(e=null==g?void 0:g.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==g?void 0:g.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!w,right:!w},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{v({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{b.blocks.Embed.updateElement(c,"embed",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:d(io,{position:"left"}),right:d(io,{position:"right"})}}}),[x.width,x.height]);return f&&(null==f?void 0:f.id)?d("div",Object.assign({"data-element-type":t.type,contentEditable:!1,draggable:!1,className:"yoo-embed-mt-4 yoo-embed-relative yoopta-embed"},s,{children:l(U,Object.assign({},S,{className:"yoo-embed-mx-auto yoo-embed-my-0 yoo-embed-flex"},{children:[z&&d("div",{className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-inset-0 yoo-embed-bg-[rgba(35,131,226,0.14)] yoo-embed-z-[81] yoo-embed-rounded-[3px] yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in"}),d(R,{width:null==x?void 0:x.width,height:null==x?void 0:x.height,provider:f,blockId:c}),!w&&d(oo,{block:m,editor:b,props:t.props}),a]}))})):d(Jt,Object.assign({attributes:s,blockId:c},{children:a}))},props:{sizes:{width:650,height:400},nodeType:"void"}}},options:{display:{title:"Embed",description:"For embed videos, google maps and more"},maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IFRAME"],parse:e=>{if("IFRAME"===e.nodeName){const t=new URL(e.getAttribute("src")||"");return{id:a(),type:"embed",children:[{text:""}],props:{provider:{id:t.href,type:t.hostname,url:t.href},sizes:{width:e.getAttribute("width")?parseInt(e.getAttribute("width")||"650",10):650,height:e.getAttribute("height")?parseInt(e.getAttribute("height")||"400",10):400}}}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoo-embed-pointer-events-none{pointer-events:none}.yoo-embed-absolute{position:absolute}.yoo-embed-relative{position:relative}.yoo-embed-inset-0{inset:0}.yoo-embed-left-0{left:0}.yoo-embed-right-0{right:0}.yoo-embed-top-0{top:0}.yoo-embed-z-10{z-index:10}.yoo-embed-z-\\[100\\]{z-index:100}.yoo-embed-z-\\[81\\]{z-index:81}.yoo-embed-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-embed-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-embed-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-embed-mx-auto{margin-left:auto;margin-right:auto}.yoo-embed-my-0{margin-bottom:0;margin-top:0}.yoo-embed-ml-\\[12px\\]{margin-left:12px}.yoo-embed-mr-2{margin-right:.5rem}.yoo-embed-mr-\\[12px\\]{margin-right:12px}.yoo-embed-mt-4{margin-top:1rem}.yoo-embed-mt-\\[4px\\]{margin-top:4px}.yoo-embed-flex{display:flex}.yoo-embed-inline-flex{display:inline-flex}.yoo-embed-h-4{height:1rem}.yoo-embed-h-\\[28px\\]{height:28px}.yoo-embed-h-\\[32px\\]{height:32px}.yoo-embed-h-\\[40px\\]{height:40px}.yoo-embed-h-\\[48px\\]{height:48px}.yoo-embed-h-full{height:100%}.yoo-embed-max-h-\\[420px\\]{max-height:420px}.yoo-embed-max-h-\\[50\\%\\]{max-height:50%}.yoo-embed-w-4{width:1rem}.yoo-embed-w-\\[15px\\]{width:15px}.yoo-embed-w-\\[6px\\]{width:6px}.yoo-embed-w-full{width:100%}.yoo-embed-min-w-0{min-width:0}.yoo-embed-min-w-\\[540px\\]{min-width:540px}.yoo-embed-max-w-\\[300px\\]{max-width:300px}.yoo-embed-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-embed-flex-shrink-0{flex-shrink:0}.yoo-embed-cursor-col-resize{cursor:col-resize}.yoo-embed-cursor-pointer{cursor:pointer}.yoo-embed-cursor-text{cursor:text}.yoo-embed-flex-col{flex-direction:column}.yoo-embed-items-center{align-items:center}.yoo-embed-justify-start{justify-content:flex-start}.yoo-embed-justify-center{justify-content:center}.yoo-embed-overflow-hidden{overflow:hidden}.yoo-embed-whitespace-nowrap{white-space:nowrap}.yoo-embed-rounded-\\[20px\\]{border-radius:20px}.yoo-embed-rounded-\\[3px\\]{border-radius:3px}.yoo-embed-rounded-\\[4px\\]{border-radius:4px}.yoo-embed-rounded-sm{border-radius:.125rem}.yoo-embed-border{border-width:1px}.yoo-embed-border-none{border-style:none}.yoo-embed-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-embed-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-embed-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-embed-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-embed-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-embed-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-embed-bg-inherit{background-color:inherit}.yoo-embed-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-embed-fill-white{fill:#fff}.yoo-embed-p-\\[0_8px\\]{padding:0 8px}.yoo-embed-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-embed-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-embed-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-embed-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-embed-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-embed-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-embed-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-embed-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-embed-pb-\\[6px\\]{padding-bottom:6px}.yoo-embed-pt-\\[6px\\]{padding-top:6px}.yoo-embed-text-left{text-align:left}.yoo-embed-text-\\[14px\\]{font-size:14px}.yoo-embed-font-medium{font-weight:500}.yoo-embed-leading-\\[1\\.2\\]{line-height:1.2}.yoo-embed-leading-\\[120\\%\\]{line-height:120%}.yoo-embed-leading-\\[20px\\]{line-height:20px}.yoo-embed-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-embed-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-embed-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-embed-opacity-100{opacity:1}.yoo-embed-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-duration-150{transition-duration:.15s}.yoo-embed-duration-300{transition-duration:.3s}.yoo-embed-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-embed .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}.yoopta-embed:hover .yoopta-extended-block-actions{opacity:1}.hover\\:yoo-embed-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-embed-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-embed-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-embed-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{no as default};
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@yoopta/embed",
3
- "version": "4.0.0-rc.10",
3
+ "version": "4.0.0-rc.11",
4
4
  "description": "> TODO: description",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
7
7
  "license": "MIT",
8
8
  "private": false,
9
9
  "main": "dist/index.js",
10
- "module": "dist/index.es.js",
10
+ "type": "module",
11
+ "module": "dist/index.js",
11
12
  "types": "./dist/index.d.ts",
12
13
  "files": [
13
14
  "dist/"
@@ -38,5 +39,5 @@
38
39
  "@radix-ui/react-icons": "^1.3.0",
39
40
  "re-resizable": "^6.9.11"
40
41
  },
41
- "gitHead": "567acde8d698e93e42b9090db68d66d93f3cc30d"
42
+ "gitHead": "a4599f8ecac6c322b01ae25b4829d120db250736"
42
43
  }
package/dist/index.es.js DELETED
@@ -1,6 +0,0 @@
1
- import{useYooptaEditor as e,UI as t,useBlockData as o,useYooptaPluginOptions as i,useYooptaReadOnly as n,useBlockSelected as r,YooptaPlugin as s,generateId as a}from"@yoopta/editor";import{jsxs as l,jsx as d}from"react/jsx-runtime";import*as c from"react";import{useState as u,useEffect as h,useRef as p,useLayoutEffect as f,forwardRef as m,createElement as b,useMemo as y}from"react";import*as g from"react-dom";import{flushSync as w,createPortal as x}from"react-dom";function v(e,{threshold:t=0,root:o=null,rootMargin:i="0%",freezeOnceVisible:n=!1}={}){const[r,s]=u({}),a=r.isIntersecting&&n,l=([e])=>s(e);return h((()=>{const n=null==e?void 0:e.current;if(!window.IntersectionObserver||a||!n)return;const r=new IntersectionObserver(l,{threshold:t,root:o,rootMargin:i});return r.observe(n),()=>r.disconnect()}),[e,t,o,i,a]),r}const z={vimeo:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(null),[a,c]=u(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch(`https://vimeo.com/api/v2/embed/${e.id}.json`).then((e=>e.json())).then((e=>s(e[0].thumbnail_medium))).catch((()=>s(null)))}),[e.id]),l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:r||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&d("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${e.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>c(!0),className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},youtube:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(!1),{isIntersecting:a}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:`https://i.ytimg.com/vi/${e.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:a&&r?0:1,zIndex:a&&r?-1:0}}),a&&d("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${e.id}`,frameBorder:0,onLoad:()=>s(!0),allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},dailymotion:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(null),[a,c]=u(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{var t;fetch((t=e.id,`https://api.dailymotion.com/embed/${t}?fields=thumbnail_url`)).then((e=>e.json())).then((e=>s(e.thumbnail_url))).catch((()=>s(null)))}),[e.id]),l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:r||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&d("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>c(!0),src:`https://www.dailymotion.com/embed/embed/${e.id}`,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},figma:({provider:e,width:t,height:o,blockId:i})=>{const n=p(null),{isIntersecting:r}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return d("div",Object.assign({className:"yoo-embed-relative",ref:n},{children:r&&d("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(e.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})}))},twitter:function({provider:t,blockId:o}){const i=p(null),n=e(),{isIntersecting:r}=v(i,{freezeOnceVisible:!0,rootMargin:"50%"}),s=`${o}-${t.id}`;return h((()=>{var e;if(!r)return;const a=document.createElement("script");a.src="https://platform.twitter.com/widgets.js",null===(e=i.current)||void 0===e||e.appendChild(a),a.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(t.id,document.getElementById(s),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),n.blocks.Embed.updateElement(o,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[t.id,r]),d("div",Object.assign({className:"yoo-embed-w-full yoo-embed-h-full",ref:i},{children:d("div",{id:s})}))}},R=({width:e,height:t,provider:o,blockId:i})=>{if(!o)return null;if(o&&o.id&&o.type&&z[o.type]){const n=z[o.type];return d(n,{provider:o,width:e,height:t,blockId:i})}return d("div",Object.assign({className:"yoo-embed-w-full"},{children:d("iframe",{src:o.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0"})}))};var S,_=(S=function(e,t){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},S(e,t)},function(e,t){function o(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),E=function(){return E=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},E.apply(this,arguments)},C={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},k={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},O={width:"20px",height:"20px",position:"absolute"},N={top:E(E({},C),{top:"-5px"}),right:E(E({},k),{left:void 0,right:"-5px"}),bottom:E(E({},C),{top:void 0,bottom:"-5px"}),left:E(E({},k),{left:"-5px"}),topRight:E(E({},O),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:E(E({},O),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:E(E({},O),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:E(E({},O),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return _(t,e),t.prototype.render=function(){return c.createElement("div",{className:this.props.className||"",style:E(E({position:"absolute",userSelect:"none"},N[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(c.PureComponent),M=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),W=function(){return W=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},W.apply(this,arguments)},A={width:"auto",height:"auto"},T=function(e,t,o){return Math.max(Math.min(e,o),t)},j=function(e,t){return Math.round(e/t)*t},B=function(e,t){return new RegExp(e,"i").test(t)},I=function(e){return Boolean(e.touches&&e.touches.length)},P=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},H=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},D=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},F=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],V="__resizable_base__",U=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(V):t.className+=V,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return M(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||A},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return H(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?H(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?H(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&B("left",r),a=n&&B("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,s=n.original,a=this.props,l=a.lockAspectRatio,d=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,u=s.width,h=s.height,p=d||0,f=c||0;return B("right",r)&&(u=s.width+(e-s.x)*i/o,l&&(h=(u-f)/this.ratio+p)),B("left",r)&&(u=s.width-(e-s.x)*i/o,l&&(h=(u-f)/this.ratio+p)),B("bottom",r)&&(h=s.height+(t-s.y)*i/o,l&&(u=(h-p)*this.ratio+f)),B("top",r)&&(h=s.height-(t-s.y)*i/o,l&&(u=(h-p)*this.ratio+f)),{newWidth:u,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,d=void 0===o.width||o.width<0?e:o.width,c=void 0===i.height?10:i.height,u=void 0===o.height||o.height<0?t:o.height,h=s||0,p=a||0;if(r){var f=(c-h)*this.ratio+p,m=(u-h)*this.ratio+p,b=(l-p)/this.ratio+h,y=(d-p)/this.ratio+h,g=Math.max(l,f),w=Math.min(d,m),x=Math.max(c,b),v=Math.min(u,y);e=T(e,g,w),t=T(t,x,v)}else e=T(e,l,d),t=T(t,c,u);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=n,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&I(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&I(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,i=o.maxWidth,n=o.maxHeight,r=o.minWidth,s=o.minHeight,a=I(e)?e.touches[0].clientX:e.clientX,l=I(e)?e.touches[0].clientY:e.clientY,d=this.state,c=d.direction,u=d.original,h=d.width,p=d.height,f=this.getParentSize(),m=function(e,t,o,i,n,r,s){return i=D(i,e.width,t,o),n=D(n,e.height,t,o),r=D(r,e.width,t,o),s=D(s,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,n,r,s);i=m.maxWidth,n=m.maxHeight,r=m.minWidth,s=m.minHeight;var b=this.calculateNewSizeFromDirection(a,l),y=b.newHeight,g=b.newWidth,x=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(g=P(g,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=P(y,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(g,y,{width:x.maxWidth,height:x.maxHeight},{width:r,height:s});if(g=v.newWidth,y=v.newHeight,this.props.grid){var z=j(g,this.props.grid[0]),R=j(y,this.props.grid[1]),S=this.props.snapGap||0;g=0===S||Math.abs(z-g)<=S?z:g,y=0===S||Math.abs(R-y)<=S?R:y}var _={width:g-u.width,height:y-u.height};if(h&&"string"==typeof h)if(h.endsWith("%"))g=g/f.width*100+"%";else if(h.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}if(p&&"string"==typeof p)if(p.endsWith("%"))y=y/f.height*100+"%";else if(p.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(g,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),w((function(){t.setState(E)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,_)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,r=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!o)return null;var l=Object.keys(o).map((function(t){return!1!==o[t]?c.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}));return c.createElement("div",{className:s,style:r},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==F.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=W(W(W({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return c.createElement(i,W({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&c.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(c.PureComponent);function $(e){return G(e)?(e.nodeName||"").toLowerCase():"#document"}function X(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Y(e){var t;return null==(t=(G(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function G(e){return e instanceof Node||e instanceof X(e).Node}function Z(e){return e instanceof Element||e instanceof X(e).Element}function q(e){return e instanceof HTMLElement||e instanceof X(e).HTMLElement}function J(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof X(e).ShadowRoot)}function K(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function Q(e){return["table","td","th"].includes($(e))}function ee(e){const t=te(),o=ie(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function te(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function oe(e){return["html","body","#document"].includes($(e))}function ie(e){return X(e).getComputedStyle(e)}function ne(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){if("html"===$(e))return e;const t=e.assignedSlot||e.parentNode||J(e)&&e.host||Y(e);return J(t)?t.host:t}function se(e){const t=re(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&K(t)?t:se(t)}function ae(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=se(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=X(n);return r?t.concat(s,s.visualViewport||[],K(n)?n:[],s.frameElement&&o?ae(s.frameElement):[]):t.concat(n,ae(n,[],o))}const le=Math.min,de=Math.max,ce=Math.round,ue=e=>({x:e,y:e}),he={left:"right",right:"left",bottom:"top",top:"bottom"},pe={start:"end",end:"start"};function fe(e,t,o){return de(e,le(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function be(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function ge(e){return"x"===e?"y":"x"}function we(e){return"y"===e?"height":"width"}function xe(e){return["top","bottom"].includes(be(e))?"y":"x"}function ve(e){return ge(xe(e))}function ze(e){return e.replace(/start|end/g,(e=>pe[e]))}function Re(e){return e.replace(/left|right|bottom|top/g,(e=>he[e]))}function Se(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function _e(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ee(e,t,o){let{reference:i,floating:n}=e;const r=xe(t),s=ve(t),a=we(s),l=be(t),d="y"===r,c=i.x+i.width/2-n.width/2,u=i.y+i.height/2-n.height/2,h=i[a]/2-n[a]/2;let p;switch(l){case"top":p={x:c,y:i.y-n.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:u};break;case"left":p={x:i.x-n.width,y:u};break;default:p={x:i.x,y:i.y}}switch(ye(t)){case"start":p[s]-=h*(o&&d?-1:1);break;case"end":p[s]+=h*(o&&d?-1:1)}return p}async function Ce(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=me(t,e),f=Se(p),m=a[h?"floating"===u?"reference":"floating":u],b=_e(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),y="floating"===u?{...s.floating,x:i,y:n}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},x=_e(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(b.top-x.top+f.top)/w.y,bottom:(x.bottom-b.bottom+f.bottom)/w.y,left:(b.left-x.left+f.left)/w.x,right:(x.right-b.right+f.right)/w.x}}function ke(e){const t=le(...e.map((e=>e.left))),o=le(...e.map((e=>e.top)));return{x:t,y:o,width:de(...e.map((e=>e.right)))-t,height:de(...e.map((e=>e.bottom)))-o}}const Oe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),s=be(o),a=ye(o),l="y"===xe(o),d=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,u=me(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*d}:{x:h*d,y:p*c}}(t,e);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}}};function Ne(e){const t=ie(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=q(e),r=n?e.offsetWidth:o,s=n?e.offsetHeight:i,a=ce(o)!==r||ce(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function Le(e){return Z(e)?e:e.contextElement}function Me(e){const t=Le(e);if(!q(t))return ue(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=Ne(t);let s=(r?ce(o.width):o.width)/i,a=(r?ce(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const We=ue(0);function Ae(e){const t=X(e);return te()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:We}function Te(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Le(e);let s=ue(1);t&&(i?Z(i)&&(s=Me(i)):s=Me(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==X(e))&&t}(r,o,i)?Ae(r):ue(0);let l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,c=n.width/s.x,u=n.height/s.y;if(r){const e=X(r),t=i&&Z(i)?X(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Me(n),t=n.getBoundingClientRect(),i=ie(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,u*=e.y,l+=r,d+=s,o=X(n),n=o.frameElement}}return _e({width:c,height:u,x:l,y:d})}const je=[":popover-open",":modal"];function Be(e){return je.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ie(e){return Te(Y(e)).left+ne(e).scrollLeft}function Pe(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=X(e),i=Y(e),n=o.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){r=n.width,s=n.height;const e=te();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:a,y:l}}(e,o);else if("document"===t)i=function(e){const t=Y(e),o=ne(e),i=e.ownerDocument.body,n=de(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=de(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Ie(e);const a=-o.scrollTop;return"rtl"===ie(i).direction&&(s+=de(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(Y(e));else if(Z(t))i=function(e,t){const o=Te(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=q(e)?Me(e):ue(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=Ae(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return _e(i)}function He(e,t){const o=re(e);return!(o===t||!Z(o)||oe(o))&&("fixed"===ie(o).position||He(o,t))}function De(e,t,o){const i=q(t),n=Y(t),r="fixed"===o,s=Te(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=ue(0);if(i||!i&&!r)if(("body"!==$(t)||K(n))&&(a=ne(t)),i){const e=Te(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Ie(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Fe(e,t){return q(e)&&"fixed"!==ie(e).position?t?t(e):e.offsetParent:null}function Ve(e,t){const o=X(e);if(!q(e)||Be(e))return o;let i=Fe(e,t);for(;i&&Q(i)&&"static"===ie(i).position;)i=Fe(i,t);return i&&("html"===$(i)||"body"===$(i)&&"static"===ie(i).position&&!ee(i))?o:i||function(e){let t=re(e);for(;q(t)&&!oe(t);){if(ee(t))return t;t=re(t)}return null}(e)||o}const Ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=Y(i),a=!!t&&Be(t.floating);if(i===s||a&&r)return o;let l={scrollLeft:0,scrollTop:0},d=ue(1);const c=ue(0),u=q(i);if((u||!u&&!r)&&(("body"!==$(i)||K(s))&&(l=ne(i)),q(i))){const e=Te(i);d=Me(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-l.scrollLeft*d.x+c.x,y:o.y*d.y-l.scrollTop*d.y+c.y}},getDocumentElement:Y,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=ae(e,[],!1).filter((e=>Z(e)&&"body"!==$(e))),n=null;const r="fixed"===ie(e).position;let s=r?re(e):e;for(;Z(s)&&!oe(s);){const t=ie(s),o=ee(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||K(s)&&!o&&He(e,s))?i=i.filter((e=>e!==s)):n=t,s=re(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=Pe(t,o,n);return e.top=de(i.top,e.top),e.right=le(i.right,e.right),e.bottom=le(i.bottom,e.bottom),e.left=de(i.left,e.left),e}),Pe(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ve,getElementRects:async function(e){const t=this.getOffsetParent||Ve,o=this.getDimensions;return{reference:De(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=Ne(e);return{width:t,height:o}},getScale:Me,isElement:Z,isRTL:function(e){return"rtl"===ie(e).direction}},$e=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=me(e,t),d={x:o,y:i},c=await Ce(t,l),u=xe(be(n)),h=ge(u);let p=d[h],f=d[u];if(r){const e="y"===h?"bottom":"right";p=fe(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===u?"bottom":"right";f=fe(f+c["y"===u?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Xe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...b}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=be(n),g=be(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=h||(g||!m?[Re(a)]:function(e){const t=Re(e);return[ze(e),t,ze(t)]}(a));h||"none"===f||x.push(...function(e,t,o,i){const n=ye(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:s;default:return[]}}(be(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(ze)))),r}(a,m,f,w));const v=[a,...x],z=await Ce(t,b),R=[];let S=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&R.push(z[y]),u){const e=function(e,t,o){void 0===o&&(o=!1);const i=ye(e),n=ve(e),r=we(n);let s="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Re(s)),[s,Re(s)]}(n,s,w);R.push(z[e[0]],z[e[1]])}if(S=[...S,{placement:n,overflows:R}],!R.every((e=>e<=0))){var _,E;const e=((null==(_=r.flip)?void 0:_.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let o=null==(E=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!o)switch(p){case"bestFit":{var C;const e=null==(C=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},Ye=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:s}=t,{padding:a=2,x:l,y:d}=me(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>_e(ke(e))))}(c),h=_e(ke(c)),p=Se(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=d)return u.find((e=>l>e.left-p.left&&l<e.right+p.right&&d>e.top-p.top&&d<e.bottom+p.bottom))||h;if(u.length>=2){if("y"===xe(o)){const e=u[0],t=u[u.length-1],i="top"===be(o),n=e.top,r=t.bottom,s=i?e.left:t.left,a=i?e.right:t.right;return{top:n,bottom:r,left:s,right:a,width:a-s,height:r-n,x:s,y:n}}const e="left"===be(o),t=de(...u.map((e=>e.right))),i=le(...u.map((e=>e.left))),n=u.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,s=n[n.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return h}},floating:i.floating,strategy:s});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Ge=(e,t,o)=>{const i=new Map,n={platform:Ue,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:s}=o,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:u}=Ee(d,i,l),h=i,p={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:m}=a[o],{x:b,y:y,data:g,reset:w}=await m({x:c,y:u,initialPlacement:i,placement:h,strategy:n,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=b?b:c,u=null!=y?y:u,p={...p,[r]:{...p[r],...g}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(d=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:c,y:u}=Ee(d,h,l))),o=-1)}return{x:c,y:u,placement:h,strategy:n,middlewareData:p}})(e,t,{...n,platform:r})};var Ze="undefined"!=typeof document?f:h;function qe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!qe(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!qe(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Je(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ke(e,t){const o=Je(e);return Math.round(t*o)/o}function Qe(e){const t=c.useRef(e);return Ze((()=>{t.current=e})),t}
2
- /*!
3
- * tabbable 6.2.0
4
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
- */
6
- var et=["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(","),tt="undefined"==typeof Element,ot=tt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,it=!tt&&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},nt=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},rt=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var s=r.shift();if(!nt(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,i);i.flatten?n.push.apply(n,l):n.push({scopeParent:s,candidates:l})}else{ot.call(s,et)&&i.filter(s)&&(o||!t.includes(s))&&n.push(s);var d=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),c=!nt(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&c){var u=e(!0===d?s.children:d.children,!0,i);i.flatten?n.push.apply(n,u):n.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return n},st=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},at=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!st(e)?0:e.tabIndex},lt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},dt=function(e){return"INPUT"===e.tagName},ct=function(e){return function(e){return dt(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||it(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(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 n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},ut=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},ht=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=ot.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ot.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return ut(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,a=it(e);if(s&&!s.shadowRoot&&!0===i(s))return ut(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=r}if(function(e){var t,o,i,n,r=e&&it(e),s=null===(t=r)||void 0===t?void 0:t.host,a=!1;if(r&&r!==e)for(a=!!(null!==(o=s)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!a&&s;){var l,d,c;a=!(null===(d=s=null===(l=r=it(s))||void 0===l?void 0:l.host)||void 0===d||null===(c=d.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},pt=function(e,t){return!(t.disabled||nt(t)||function(e){return dt(e)&&"hidden"===e.type}(t)||ht(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 o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!ot.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},ft=function(e,t){return!(ct(t)||at(t)<0||!pt(e,t))},mt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},bt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,s=r?t.scopeParent:t,a=function(e,t){var o=at(e);return o<0&&t&&!st(e)?0:o}(s,r),l=r?e(t.candidates):s;0===a?r?o.push.apply(o,l):o.push(s):i.push({documentOrder:n,tabIndex:a,item:t,isScope:r,content:l})})),i.sort(lt).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},yt=function(e,t){var o;return o=(t=t||{}).getShadowRoot?rt([e],t.includeContainer,{filter:ft.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mt}):function(e,t,o){if(nt(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(et));return t&&ot.call(e,et)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,ft.bind(null,t)),bt(o)};const gt=c["useInsertionEffect".toString()]||(e=>e());var wt="undefined"!=typeof document?f:h;function xt(){return xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},xt.apply(this,arguments)}let vt=!1,zt=0;const Rt=()=>"floating-ui-"+zt++;const St=c["useId".toString()]||function(){const[e,t]=c.useState((()=>vt?Rt():void 0));return wt((()=>{null==e&&t(Rt())}),[]),c.useEffect((()=>{vt||(vt=!0)}),[]),e};const _t=c.createContext(null),Et=c.createContext(null);function Ct(e){return"data-floating-ui-"+e}const kt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ot(e,t){const o=yt(e,kt());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function Nt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&J(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function Lt(e){yt(e,kt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Mt(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 Wt={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 At(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Tt=c.forwardRef((function(e,t){const[o,i]=c.useState();wt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",At),()=>{document.removeEventListener("keydown",At)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Ct("focus-guard")]:"",style:Wt};return c.createElement("span",xt({},e,n))})),jt=c.createContext(null),Bt=Ct("portal");function It(e){let{children:t,id:o,root:i=null,preserveTabOrder:n=!0}=e;const r=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=c.useState(null),r=St(),s=Pt(),a=c.useRef(null);return wt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{a.current=null}))}),[i]),wt((()=>{if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=r,o.setAttribute(Bt,""),e.appendChild(o),a.current=o,n(o)}),[t,r]),wt((()=>{if(a.current)return;let e=o||(null==s?void 0:s.portalNode);e&&!Z(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Bt,""),e=i||e,e.appendChild(l),a.current=l,n(l)}),[t,o,r,s]),i}({id:o,root:i}),[s,a]=c.useState(null),l=c.useRef(null),d=c.useRef(null),u=c.useRef(null),h=c.useRef(null),p=!!s&&!s.modal&&s.open&&n&&!(!i&&!r);return c.useEffect((()=>{if(r&&n&&(null==s||!s.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&Nt(e)){("focusin"===e.type?Mt:Lt)(r)}}}),[r,n,null==s?void 0:s.modal]),c.createElement(jt.Provider,{value:c.useMemo((()=>({preserveTabOrder:n,beforeOutsideRef:l,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:h,portalNode:r,setFocusManagerState:a})),[n,r])},p&&r&&c.createElement(Tt,{"data-type":"outside",ref:l,onFocus:e=>{if(Nt(e,r)){var t;null==(t=u.current)||t.focus()}else{const e=Ot(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),p&&r&&c.createElement("span",{"aria-owns":r.id,style:Wt}),r&&x(t,r),p&&r&&c.createElement(Tt,{"data-type":"outside",ref:d,onFocus:e=>{if(Nt(e,r)){var t;null==(t=h.current)||t.focus()}else{const t=Ot(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent))}}}))}const Pt=()=>c.useContext(jt),Ht=new Set,Dt=c.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=St();return wt((()=>{if(!o)return;Ht.add(n);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,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,a=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var l,d;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,o=(null==(d=window.visualViewport)?void 0:d.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(o))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{Ht.delete(n),0===Ht.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[n,o]),c.createElement("div",xt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function Ft(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,s]=c.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||r,l=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:l,open:d}=e,[u,h]=c.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=c.useState(i);qe(p,i)||f(i);const[m,b]=c.useState(null),[y,w]=c.useState(null),x=c.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),v=c.useCallback((e=>{e!==_.current&&(_.current=e,w(e))}),[]),z=r||m,R=s||y,S=c.useRef(null),_=c.useRef(null),E=c.useRef(u),C=null!=l,k=Qe(l),O=Qe(n),N=c.useCallback((()=>{if(!S.current||!_.current)return;const e={placement:t,strategy:o,middleware:p};O.current&&(e.platform=O.current),Ge(S.current,_.current,e).then((e=>{const t={...e,isPositioned:!0};L.current&&!qe(E.current,t)&&(E.current=t,g.flushSync((()=>{h(t)})))}))}),[p,t,o,O]);Ze((()=>{!1===d&&E.current.isPositioned&&(E.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const L=c.useRef(!1);Ze((()=>(L.current=!0,()=>{L.current=!1})),[]),Ze((()=>{if(z&&(S.current=z),R&&(_.current=R),z&&R){if(k.current)return k.current(z,R,N);N()}}),[z,R,N,k,C]);const M=c.useMemo((()=>({reference:S,floating:_,setReference:x,setFloating:v})),[x,v]),W=c.useMemo((()=>({reference:z,floating:R})),[z,R]),A=c.useMemo((()=>{const e={position:o,left:0,top:0};if(!W.floating)return e;const t=Ke(W.floating,u.x),i=Ke(W.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...Je(W.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,a,W.floating,u.x,u.y]);return c.useMemo((()=>({...u,update:N,refs:M,elements:W,floatingStyles:A})),[u,N,M,W,A])}(e),d=c.useContext(Et),u=null!=((null==(h=c.useContext(_t))?void 0:h.id)||null);var h;const p=function(e){const t=c.useRef((()=>{}));return gt((()=>{t.current=e})),c.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(m.current.openEvent=t),b.emit("openchange",{open:e,event:t,reason:o,nested:u}),null==i||i(e,t,o)})),f=c.useRef(null),m=c.useRef({}),b=c.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],y=St(),w=c.useCallback((e=>{const t=Z(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),x=c.useCallback((e=>{(Z(e)||null===e)&&(f.current=e,s(e)),(Z(l.refs.reference.current)||null===l.refs.reference.current||null!==e&&!Z(e))&&l.refs.setReference(e)}),[l.refs]),v=c.useMemo((()=>({...l.refs,setReference:x,setPositionReference:w,domReference:f})),[l.refs,x,w]),z=c.useMemo((()=>({...l.elements,domReference:a})),[l.elements,a]),R=c.useMemo((()=>({...l,refs:v,elements:z,dataRef:m,nodeId:n,floatingId:y,events:b,open:o,onOpenChange:p})),[l,n,y,b,o,p,v,z]);return wt((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===n));e&&(e.context=R)})),c.useMemo((()=>({...l,context:R,refs:v,elements:z})),[l,v,z,R])}function Vt(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Ut=["color"],$t=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Ut);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Xt=["color"],Yt=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Xt);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const Gt={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null},twitter:function(e){const t=e.match(/\/status\/(\d+)/);return t?t[1]:null},figma:function(e){const t=new URL(e).searchParams,o=t.get("node-id");return t.get("node-id")?o:"unknown"}},Zt=({blockId:t,onClose:o})=>{const i=e(),[n,r]=u(""),s=0===n.length;return l("div",Object.assign({className:"yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-white-space-nowrap yoo-embed-w-full"},{children:[d("input",{type:"text",placeholder:"Paste embed link",value:n,className:"yoo-embed-items-center yoo-embed-bg-[hsla(45,13%,94%,.6)] yoo-embed-rounded-[4px] yoo-embed-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-embed-cursor-text yoo-embed-flex yoo-embed-text-[14px] yoo-embed-h-[32px] yoo-embed-leading-[20px] yoo-embed-px-[6px] yoo-embed-relative yoo-embed-w-full yoo-embed-border-none",onChange:e=>r(e.target.value)}),d("button",Object.assign({type:"button",className:"yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-cursor-pointer yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-flex-shrink-0 yoo-embed-white-space-nowrap yoo-embed-h-[28px] yoo-embed-rounded-[4px] yoo-embed-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-embed-bg-[rgb(35,131,226)] yoo-embed-text-white yoo-embed-fill-white yoo-embed-leading-[1.2] yoo-embed-px-[12px] yoo-embed-text-[14px] yoo-embed-font-medium yoo-embed-w-full yoo-embed-max-w-[300px] yoo-embed-mx-auto yoo-embed-m-[12px_0_6px] disabled:yoo-embed-bg-[rgba(35,131,226,0.5)] disabled:yoo-embed-cursor-not-allowed",disabled:s,onClick:()=>{var e;if(0===n.length)return;const r=(s=n).includes("youtube.com")||s.includes("youtu.be")?"youtube":s.includes("vimeo.com")?"vimeo":s.includes("dailymotion.com")||s.includes("dai.ly")?"dailymotion":s.includes("twitter")?"twitter":s.includes("figma")?"figma":null;var s;const a=r?null===(e=Gt[r])||void 0===e?void 0:e.call(Gt,n):null,l={type:r,id:a,url:n};r&&a||(l.id=n),i.blocks.Embed.updateElement(t,"embed",{provider:l}),o()}},{children:"Embed embed"}))]}))},qt=({floatingStyles:e,refs:t,onClose:o,blockId:i})=>d(It,Object.assign({id:"yoo-embed-uploader-portal",root:document.getElementById("yoopta-editor")},{children:d(Dt,Object.assign({lockScroll:!0,className:"yoo-embed-z-[100]",onClick:o},{children:d("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:l("div",Object.assign({className:"yoo-embed-flex yoo-embed-flex-col yoo-embed-min-w-[540px] yoo-embed-max-w-[calc(100vw-24px)] yoo-embed-h-full yoo-embed-max-h-[420px] yoo-embed-bg-white yoo-embed-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[d("div",Object.assign({className:"yoo-embed-w-full yoo-embed-flex yoo-embed-text-[14px] yoo-embed-p-[0_8px] yoo-embed-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-embed-relative yoo-embed-z-10 yoo-embed-h-[40px]"},{children:d("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"yoo-embed-py-[6px] yoo-embed-whitespace-nowrap yoo-embed-min-w-0 yoo-embed-flex-shrink-0 yoo-embed-text-[rgb(55,53,47)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-bg-inherit yoo-embed-transition-[height_20ms_ease-in] yoo-embed-inline-flex yoo-embed-items-center yoo-embed-h-full yoo-embed-text-[14px] yoo-embed-leading-[1.2] yoo-embed-px-[8px]"},{children:"Embed link"}))})),d("div",Object.assign({className:"yoo-embed-pt-[6px] yoo-embed-pb-[6px] yoo-embed-mt-[4px] yoo-embed-flex yoo-embed-justify-center yoo-embed-mr-[12px] yoo-embed-ml-[12px]"},{children:d(Zt,{onClose:o,blockId:i})}))]}))}))}))})),Jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=u(!1),{refs:r,floatingStyles:s}=Ft({placement:"bottom",open:i,onOpenChange:n,middleware:[Ye(),Xe(),$e(),Oe(10)]});return l("div",Object.assign({className:"yoo-embed-w-full yoo-embed-user-select-none yoo-embed-m-[20px_0_10px] yoo-embed-relative yoo-embed-flex"},e,{contentEditable:!1},{children:[l("button",Object.assign({className:"yoo-embed-p-[12px_36px_12px_12px] yoo-embed-flex yoo-embed-items-center yoo-embed-text-left yoo-embed-w-full yoo-embed-overflow-hidden yoo-embed-rounded-[3px] yoo-embed-text-[14px] yoo-embed-text-[rgba(55,53,47,0.65)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-border-none yoo-embed-bg-[#efefef] yoo-embed-transition-[background-color_100ms_ease-in] hover:yoo-embed-bg-[#e3e3e3]",onClick:()=>n(!0),ref:r.setReference},{children:[d($t,{className:"yoo-embed-mr-2 yoo-embed-user-select-none",width:24,height:24}),d("span",Object.assign({className:"yoo-embed-font-medium"},{children:"Click to add embed"}))]})),i&&d(qt,{blockId:o,floatingStyles:s,refs:r,onClose:()=>n(!1)}),t]}))},{ExtendedBlockActions:Kt,BlockOptionsMenuGroup:Qt,BlockOptionsMenuItem:eo,BlockOptionsSeparator:to}=t,oo=({editor:e,block:t,props:o})=>l(Kt,Object.assign({onClick:()=>e.setSelection([t.meta.order])},{children:[d(to,{}),d(Qt,{children:d(eo,{children:l("button",Object.assign({type:"button",className:"yoo-embed-rounded-sm hover:yoo-embed-bg-[#37352f14] yoo-embed-leading-[120%] yoo-embed-px-2 yoo-embed-py-1.5 yoo-embed-mx-[4px] yoo-embed-cursor-pointer yoo-embed-w-full yoo-embed-flex yoo-embed-justify-start",onClick:()=>{var e;window.open(null===(e=null==o?void 0:o.provider)||void 0===e?void 0:e.url,"_blank")}},{children:[d(Yt,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}))})})]})),io=({position:e})=>d("div",Object.assign({contentEditable:!1,className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-z-10 yoo-embed-opacity-1 yoo-embed-h-full yoo-embed-w-[15px] yoo-embed-cursor-col-resize yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in "+("left"===e?"yoo-embed-left-0 yoo-embed-top-0":"yoo-embed-right-0 yoo-embed-top-0")},{children:d("div",{className:"yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-300 yoo-embed-ease-in yoo-embed-rounded-[20px] yoo-embed-bg-[rgba(15,15,15,0.6)] yoo-embed-border yoo-embed-border-[rgba(255,255,255,0.9)] yoo-embed-w-[6px] yoo-embed-h-[48px] yoo-embed-max-h-[50%] yoo-embed-shadow-[0_0_0_.5px_#FFF]"})})),no=new s({type:"Embed",elements:{embed:{render:({element:t,attributes:s,children:a,blockId:c})=>{const{sizes:p,provider:f}=t.props||{},m=o(c),b=e(),g=i("Embed"),w=n(),[x,v]=u({width:(null==p?void 0:p.width)||750,height:(null==p?void 0:p.height)||440});h((()=>v({width:(null==p?void 0:p.width)||650,height:(null==p?void 0:p.height)||440})),[t.props]);const z=r({blockId:c}),S=y((()=>{var e,t;return{minWidth:300,size:{width:x.width,height:x.height},maxWidth:(null===(e=null==g?void 0:g.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==g?void 0:g.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!w,right:!w},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{v({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{b.blocks.Embed.updateElement(c,"embed",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:d(io,{position:"left"}),right:d(io,{position:"right"})}}}),[x.width,x.height]);return f&&(null==f?void 0:f.id)?d("div",Object.assign({"data-element-type":t.type,contentEditable:!1,draggable:!1,className:"yoo-embed-mt-4 yoo-embed-relative yoopta-embed"},s,{children:l(U,Object.assign({},S,{className:"yoo-embed-mx-auto yoo-embed-my-0 yoo-embed-flex"},{children:[z&&d("div",{className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-inset-0 yoo-embed-bg-[rgba(35,131,226,0.14)] yoo-embed-z-[81] yoo-embed-rounded-[3px] yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in"}),d(R,{width:null==x?void 0:x.width,height:null==x?void 0:x.height,provider:f,blockId:c}),!w&&d(oo,{block:m,editor:b,props:t.props}),a]}))})):d(Jt,Object.assign({attributes:s,blockId:c},{children:a}))},props:{sizes:{width:650,height:400},nodeType:"void"}}},options:{display:{title:"Embed",description:"For embed videos, google maps and more"},maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IFRAME"],parse:e=>{if("IFRAME"===e.nodeName){const t=new URL(e.getAttribute("src")||"");return{id:a(),type:"embed",children:[{text:""}],props:{provider:{id:t.href,type:t.hostname,url:t.href},sizes:{width:e.getAttribute("width")?parseInt(e.getAttribute("width")||"650",10):650,height:e.getAttribute("height")?parseInt(e.getAttribute("height")||"400",10):400}}}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoo-embed-pointer-events-none{pointer-events:none}.yoo-embed-absolute{position:absolute}.yoo-embed-relative{position:relative}.yoo-embed-inset-0{inset:0}.yoo-embed-left-0{left:0}.yoo-embed-right-0{right:0}.yoo-embed-top-0{top:0}.yoo-embed-z-10{z-index:10}.yoo-embed-z-\\[100\\]{z-index:100}.yoo-embed-z-\\[81\\]{z-index:81}.yoo-embed-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-embed-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-embed-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-embed-mx-auto{margin-left:auto;margin-right:auto}.yoo-embed-my-0{margin-bottom:0;margin-top:0}.yoo-embed-ml-\\[12px\\]{margin-left:12px}.yoo-embed-mr-2{margin-right:.5rem}.yoo-embed-mr-\\[12px\\]{margin-right:12px}.yoo-embed-mt-4{margin-top:1rem}.yoo-embed-mt-\\[4px\\]{margin-top:4px}.yoo-embed-flex{display:flex}.yoo-embed-inline-flex{display:inline-flex}.yoo-embed-h-4{height:1rem}.yoo-embed-h-\\[28px\\]{height:28px}.yoo-embed-h-\\[32px\\]{height:32px}.yoo-embed-h-\\[40px\\]{height:40px}.yoo-embed-h-\\[48px\\]{height:48px}.yoo-embed-h-full{height:100%}.yoo-embed-max-h-\\[420px\\]{max-height:420px}.yoo-embed-max-h-\\[50\\%\\]{max-height:50%}.yoo-embed-w-4{width:1rem}.yoo-embed-w-\\[15px\\]{width:15px}.yoo-embed-w-\\[6px\\]{width:6px}.yoo-embed-w-full{width:100%}.yoo-embed-min-w-0{min-width:0}.yoo-embed-min-w-\\[540px\\]{min-width:540px}.yoo-embed-max-w-\\[300px\\]{max-width:300px}.yoo-embed-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-embed-flex-shrink-0{flex-shrink:0}.yoo-embed-cursor-col-resize{cursor:col-resize}.yoo-embed-cursor-pointer{cursor:pointer}.yoo-embed-cursor-text{cursor:text}.yoo-embed-flex-col{flex-direction:column}.yoo-embed-items-center{align-items:center}.yoo-embed-justify-start{justify-content:flex-start}.yoo-embed-justify-center{justify-content:center}.yoo-embed-overflow-hidden{overflow:hidden}.yoo-embed-whitespace-nowrap{white-space:nowrap}.yoo-embed-rounded-\\[20px\\]{border-radius:20px}.yoo-embed-rounded-\\[3px\\]{border-radius:3px}.yoo-embed-rounded-\\[4px\\]{border-radius:4px}.yoo-embed-rounded-sm{border-radius:.125rem}.yoo-embed-border{border-width:1px}.yoo-embed-border-none{border-style:none}.yoo-embed-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-embed-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-embed-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-embed-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-embed-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-embed-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-embed-bg-inherit{background-color:inherit}.yoo-embed-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-embed-fill-white{fill:#fff}.yoo-embed-p-\\[0_8px\\]{padding:0 8px}.yoo-embed-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-embed-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-embed-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-embed-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-embed-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-embed-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-embed-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-embed-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-embed-pb-\\[6px\\]{padding-bottom:6px}.yoo-embed-pt-\\[6px\\]{padding-top:6px}.yoo-embed-text-left{text-align:left}.yoo-embed-text-\\[14px\\]{font-size:14px}.yoo-embed-font-medium{font-weight:500}.yoo-embed-leading-\\[1\\.2\\]{line-height:1.2}.yoo-embed-leading-\\[120\\%\\]{line-height:120%}.yoo-embed-leading-\\[20px\\]{line-height:20px}.yoo-embed-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-embed-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-embed-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-embed-opacity-100{opacity:1}.yoo-embed-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-duration-150{transition-duration:.15s}.yoo-embed-duration-300{transition-duration:.3s}.yoo-embed-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-embed .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}.yoopta-embed:hover .yoopta-extended-block-actions{opacity:1}.hover\\:yoo-embed-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-embed-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-embed-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-embed-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{no as default};