@yoopta/video 4.5.0-alpha.2 → 4.5.0-alpha.3

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 +1 @@
1
- import{useYooptaEditor as e,Elements as t,useYooptaPluginOptions as o,UI as i,useBlockData as n,useYooptaReadOnly as r,useBlockSelected as s,YooptaPlugin as a,generateId as l}from"@yoopta/editor";import{jsxs as d,jsx as c,Fragment as h}from"react/jsx-runtime";import*as p from"react";import{useState as u,useEffect as f,useRef as v,useLayoutEffect as y,forwardRef as g,createElement as m,useMemo as w}from"react";import*as b from"react-dom";import{flushSync as x}from"react-dom";function C(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o}function z(e,t,o,i){return new(o||(o=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))}function _(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 f((()=>{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}"function"==typeof SuppressedError&&SuppressedError;const S={vimeo:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=v(null),[n,r]=u(null),[s,a]=u(!1),{isIntersecting:l}=_(i,{freezeOnceVisible:!0,rootMargin:"50%"});return f((()=>{fetch(`https://vimeo.com/api/v2/video/${t}.json`).then((e=>e.json())).then((e=>r(e[0].thumbnail_medium))).catch((()=>r(null)))}),[t]),d("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[c("img",{src:n||"",alt:"vimeo_video_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:l&&s?0:1,zIndex:l&&s?-1:0}}),l&&c("iframe",Object.assign({title:"Video Player",src:`https://player.vimeo.com/video/${t}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>a(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))},youtube:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=v(null),[n,r]=u(!1),{isIntersecting:s}=_(i,{freezeOnceVisible:!0,rootMargin:"50%"});return d("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[c("img",{src:`https://i.ytimg.com/vi/${t}/default.jpg`,alt:"youtube_video_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:s&&n?0:1,zIndex:s&&n?-1:0}}),s&&c("iframe",Object.assign({title:"Video Player",src:`https://www.youtube.com/embed/${t}`,frameBorder:0,onLoad:()=>r(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))},dailymotion:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=v(null),[n,r]=u(null),[s,a]=u(!1),{isIntersecting:l}=_(i,{freezeOnceVisible:!0,rootMargin:"50%"});return f((()=>{fetch((e=>`https://api.dailymotion.com/video/${e}?fields=thumbnail_url`)(t)).then((e=>e.json())).then((e=>r(e.thumbnail_url))).catch((()=>r(null)))}),[t]),d("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[c("img",{src:n||"",alt:"daylimotion_video_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:l&&s?0:1,zIndex:l&&s?-1:0}}),l&&c("iframe",Object.assign({title:"Dailymotion Video Player",frameBorder:0,onLoad:()=>a(!0),src:`https://www.dailymotion.com/embed/video/${t}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))}},R=({width:e,height:t,src:o,bgColor:i,poster:n,provider:r,fit:s})=>{const a={backgroundColor:i||"transparent",objectFit:s||"contain"};if(r&&r.id&&r.type&&S[r.type]){const o=S[r.type];return c(o,{videoId:r.id,width:e,height:t})}return c("div",Object.assign({className:"yoo-video-w-full"},{children:o&&c("video",{preload:"metadata",poster:n,src:o,width:e,height:t,onDragStart:e=>e.preventDefault(),className:"yoo-video-object-cover yoo-video-w-full yoo-video-h-full",style:a,playsInline:!0,controls:!0})}))};var k,O=(k=function(e,t){return k=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])},k(e,t)},function(e,t){function o(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),L=function(){return L=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},L.apply(this,arguments)},j={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},N={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},E={width:"20px",height:"20px",position:"absolute"},M={top:L(L({},j),{top:"-5px"}),right:L(L({},N),{left:void 0,right:"-5px"}),bottom:L(L({},j),{top:void 0,bottom:"-5px"}),left:L(L({},N),{left:"-5px"}),topRight:L(L({},E),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:L(L({},E),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:L(L({},E),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:L(L({},E),{left:"-10px",top:"-10px",cursor:"nw-resize"})},W=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 O(t,e),t.prototype.render=function(){return p.createElement("div",{className:this.props.className||"",style:L(L({position:"absolute",userSelect:"none"},M[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(p.PureComponent),B=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)}}(),P=function(){return P=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},P.apply(this,arguments)},H={width:"auto",height:"auto"},A=function(e,t,o){return Math.max(Math.min(e,o),t)},T=function(e,t){return Math.round(e/t)*t},F=function(e,t){return new RegExp(e,"i").test(t)},V=function(e){return Boolean(e.touches&&e.touches.length)},D=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},I=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"},U=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},Z=["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"],$="__resizable_base__",Y=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($):t.className+=$,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 B(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||H},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 I(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?I(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?I(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&&F("left",r),a=n&&F("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,h=s.width,p=s.height,u=d||0,f=c||0;return F("right",r)&&(h=s.width+(e-s.x)*i/o,l&&(p=(h-f)/this.ratio+u)),F("left",r)&&(h=s.width-(e-s.x)*i/o,l&&(p=(h-f)/this.ratio+u)),F("bottom",r)&&(p=s.height+(t-s.y)*i/o,l&&(h=(p-u)*this.ratio+f)),F("top",r)&&(p=s.height-(t-s.y)*i/o,l&&(h=(p-u)*this.ratio+f)),{newWidth:h,newHeight:p}},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,h=void 0===o.height||o.height<0?t:o.height,p=s||0,u=a||0;if(r){var f=(c-p)*this.ratio+u,v=(h-p)*this.ratio+u,y=(l-u)/this.ratio+p,g=(d-u)/this.ratio+p,m=Math.max(l,f),w=Math.min(d,v),b=Math.max(c,y),x=Math.min(h,g);e=A(e,m,w),t=A(t,b,x)}else e=A(e,l,d),t=A(t,c,h);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&&V(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:P(P({},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&&V(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=V(e)?e.touches[0].clientX:e.clientX,l=V(e)?e.touches[0].clientY:e.clientY,d=this.state,c=d.direction,h=d.original,p=d.width,u=d.height,f=this.getParentSize(),v=function(e,t,o,i,n,r,s){return i=U(i,e.width,t,o),n=U(n,e.height,t,o),r=U(r,e.width,t,o),s=U(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=v.maxWidth,n=v.maxHeight,r=v.minWidth,s=v.minHeight;var y=this.calculateNewSizeFromDirection(a,l),g=y.newHeight,m=y.newWidth,w=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(m=D(m,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=D(g,this.props.snap.y,this.props.snapGap));var b=this.calculateNewSizeFromAspectRatio(m,g,{width:w.maxWidth,height:w.maxHeight},{width:r,height:s});if(m=b.newWidth,g=b.newHeight,this.props.grid){var C=T(m,this.props.grid[0]),z=T(g,this.props.grid[1]),_=this.props.snapGap||0;m=0===_||Math.abs(C-m)<=_?C:m,g=0===_||Math.abs(z-g)<=_?z:g}var S={width:m-h.width,height:g-h.height};if(p&&"string"==typeof p)if(p.endsWith("%"))m=m/f.width*100+"%";else if(p.endsWith("vw")){m=m/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){m=m/this.window.innerHeight*100+"vh"}if(u&&"string"==typeof u)if(u.endsWith("%"))g=g/f.height*100+"%";else if(u.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(u.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}var R={width:this.createSizeForCssProperty(m,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?R.flexBasis=R.width:"column"===this.flexDir&&(R.flexBasis=R.height),x((function(){t.setState(R)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,S)}},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:P(P({},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]?p.createElement(W,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}));return p.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!==Z.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=P(P(P({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 p.createElement(i,P({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&p.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}(p.PureComponent);function X(e){return J(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function q(e){var t;return null==(t=(J(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function J(e){return e instanceof Node||e instanceof G(e).Node}function K(e){return e instanceof Element||e instanceof G(e).Element}function Q(e){return e instanceof HTMLElement||e instanceof G(e).HTMLElement}function ee(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof G(e).ShadowRoot)}function te(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=se(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function oe(e){return["table","td","th"].includes(X(e))}function ie(e){const t=ne(),o=se(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 ne(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function re(e){return["html","body","#document"].includes(X(e))}function se(e){return G(e).getComputedStyle(e)}function ae(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function le(e){if("html"===X(e))return e;const t=e.assignedSlot||e.parentNode||ee(e)&&e.host||q(e);return ee(t)?t.host:t}function de(e){const t=le(e);return re(t)?e.ownerDocument?e.ownerDocument.body:e.body:Q(t)&&te(t)?t:de(t)}function ce(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=de(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=G(n);return r?t.concat(s,s.visualViewport||[],te(n)?n:[],s.frameElement&&o?ce(s.frameElement):[]):t.concat(n,ce(n,[],o))}const he=Math.min,pe=Math.max,ue=Math.round,fe=e=>({x:e,y:e}),ve={left:"right",right:"left",bottom:"top",top:"bottom"},ye={start:"end",end:"start"};function ge(e,t,o){return pe(e,he(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function we(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function xe(e){return"x"===e?"y":"x"}function Ce(e){return"y"===e?"height":"width"}function ze(e){return["top","bottom"].includes(we(e))?"y":"x"}function _e(e){return xe(ze(e))}function Se(e){return e.replace(/start|end/g,(e=>ye[e]))}function Re(e){return e.replace(/left|right|bottom|top/g,(e=>ve[e]))}function ke(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 Oe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Le(e,t,o){let{reference:i,floating:n}=e;const r=ze(t),s=_e(t),a=Ce(s),l=we(t),d="y"===r,c=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2;let u;switch(l){case"top":u={x:c,y:i.y-n.height};break;case"bottom":u={x:c,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-n.width,y:h};break;default:u={x:i.x,y:i.y}}switch(be(t)){case"start":u[s]-=p*(o&&d?-1:1);break;case"end":u[s]+=p*(o&&d?-1:1)}return u}async function je(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:h="floating",altBoundary:p=!1,padding:u=0}=me(t,e),f=ke(u),v=a[p?"floating"===h?"reference":"floating":h],y=Oe(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(v)))||o?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),g="floating"===h?{...s.floating,x:i,y:n}:s.reference,m=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(m))&&await(null==r.getScale?void 0:r.getScale(m))||{x:1,y:1},b=Oe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:m,strategy:l}):g);return{top:(y.top-b.top+f.top)/w.y,bottom:(b.bottom-y.bottom+f.bottom)/w.y,left:(y.left-b.left+f.left)/w.x,right:(b.right-y.right+f.right)/w.x}}function Ne(e){const t=he(...e.map((e=>e.left))),o=he(...e.map((e=>e.top)));return{x:t,y:o,width:pe(...e.map((e=>e.right)))-t,height:pe(...e.map((e=>e.bottom)))-o}}const Ee=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=we(o),a=be(o),l="y"===ze(o),d=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,h=me(t,e);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*c,y:p*d}:{x:p*d,y:u*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 Me(e){const t=se(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=ue(o)!==r||ue(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function We(e){return K(e)?e:e.contextElement}function Be(e){const t=We(e);if(!Q(t))return fe(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=Me(t);let s=(r?ue(o.width):o.width)/i,a=(r?ue(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Pe=fe(0);function He(e){const t=G(e);return ne()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Pe}function Ae(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=We(e);let s=fe(1);t&&(i?K(i)&&(s=Be(i)):s=Be(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==G(e))&&t}(r,o,i)?He(r):fe(0);let l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,c=n.width/s.x,h=n.height/s.y;if(r){const e=G(r),t=i&&K(i)?G(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Be(n),t=n.getBoundingClientRect(),i=se(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,h*=e.y,l+=r,d+=s,o=G(n),n=o.frameElement}}return Oe({width:c,height:h,x:l,y:d})}const Te=[":popover-open",":modal"];function Fe(e){return Te.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ve(e){return Ae(q(e)).left+ae(e).scrollLeft}function De(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=G(e),i=q(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=ne();(!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=q(e),o=ae(e),i=e.ownerDocument.body,n=pe(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=pe(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Ve(e);const a=-o.scrollTop;return"rtl"===se(i).direction&&(s+=pe(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(q(e));else if(K(t))i=function(e,t){const o=Ae(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=Q(e)?Be(e):fe(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=He(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return Oe(i)}function Ie(e,t){const o=le(e);return!(o===t||!K(o)||re(o))&&("fixed"===se(o).position||Ie(o,t))}function Ue(e,t,o){const i=Q(t),n=q(t),r="fixed"===o,s=Ae(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=fe(0);if(i||!i&&!r)if(("body"!==X(t)||te(n))&&(a=ae(t)),i){const e=Ae(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Ve(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ze(e,t){return Q(e)&&"fixed"!==se(e).position?t?t(e):e.offsetParent:null}function $e(e,t){const o=G(e);if(!Q(e)||Fe(e))return o;let i=Ze(e,t);for(;i&&oe(i)&&"static"===se(i).position;)i=Ze(i,t);return i&&("html"===X(i)||"body"===X(i)&&"static"===se(i).position&&!ie(i))?o:i||function(e){let t=le(e);for(;Q(t)&&!re(t);){if(ie(t))return t;t=le(t)}return null}(e)||o}const Ye={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=q(i),a=!!t&&Fe(t.floating);if(i===s||a&&r)return o;let l={scrollLeft:0,scrollTop:0},d=fe(1);const c=fe(0),h=Q(i);if((h||!h&&!r)&&(("body"!==X(i)||te(s))&&(l=ae(i)),Q(i))){const e=Ae(i);d=Be(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:q,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=ce(e,[],!1).filter((e=>K(e)&&"body"!==X(e))),n=null;const r="fixed"===se(e).position;let s=r?le(e):e;for(;K(s)&&!re(s);){const t=se(s),o=ie(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||te(s)&&!o&&Ie(e,s))?i=i.filter((e=>e!==s)):n=t,s=le(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=De(t,o,n);return e.top=pe(i.top,e.top),e.right=he(i.right,e.right),e.bottom=he(i.bottom,e.bottom),e.left=pe(i.left,e.left),e}),De(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:$e,getElementRects:async function(e){const t=this.getOffsetParent||$e,o=this.getDimensions;return{reference:Ue(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}=Me(e);return{width:t,height:o}},getScale:Be,isElement:K,isRTL:function(e){return"rtl"===se(e).direction}},Xe=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 je(t,l),h=ze(we(n)),p=xe(h);let u=d[p],f=d[h];if(r){const e="y"===p?"bottom":"right";u=ge(u+c["y"===p?"top":"left"],u,u-c[e])}if(s){const e="y"===h?"bottom":"right";f=ge(f+c["y"===h?"top":"left"],f,f-c[e])}const v=a.fn({...t,[p]:u,[h]:f});return{...v,data:{x:v.x-o,y:v.y-i}}}}},Ge=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:h=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:v=!0,...y}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=we(n),m=we(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(d.floating)),b=p||(m||!v?[Re(a)]:function(e){const t=Re(e);return[Se(e),t,Se(t)]}(a));p||"none"===f||b.push(...function(e,t,o,i){const n=be(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[]}}(we(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(Se)))),r}(a,v,f,w));const x=[a,...b],C=await je(t,y),z=[];let _=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&z.push(C[g]),h){const e=function(e,t,o){void 0===o&&(o=!1);const i=be(e),n=_e(e),r=Ce(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);z.push(C[e[0]],C[e[1]])}if(_=[..._,{placement:n,overflows:z}],!z.every((e=>e<=0))){var S,R;const e=((null==(S=r.flip)?void 0:S.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:_},reset:{placement:t}};let o=null==(R=_.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!o)switch(u){case"bestFit":{var k;const e=null==(k=_.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:k[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},qe=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))||[]),h=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=>Oe(Ne(e))))}(c),p=Oe(Ne(c)),u=ke(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=l&&null!=d)return h.find((e=>l>e.left-u.left&&l<e.right+u.right&&d>e.top-u.top&&d<e.bottom+u.bottom))||p;if(h.length>=2){if("y"===ze(o)){const e=h[0],t=h[h.length-1],i="top"===we(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"===we(o),t=pe(...h.map((e=>e.right))),i=he(...h.map((e=>e.left))),n=h.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 p}},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}}:{}}}},Je=(e,t,o)=>{const i=new Map,n={platform:Ye,...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:h}=Le(d,i,l),p=i,u={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:v}=a[o],{x:y,y:g,data:m,reset:w}=await v({x:c,y:h,initialPlacement:i,placement:p,strategy:n,middlewareData:u,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=y?y:c,h=null!=g?g:h,u={...u,[r]:{...u[r],...m}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(d=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:c,y:h}=Le(d,p,l))),o=-1)}return{x:c,y:h,placement:p,strategy:n,middlewareData:u}})(e,t,{...n,platform:r})};var Ke="undefined"!=typeof document?y:f;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 et(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tt(e,t){const o=et(e);return Math.round(t*o)/o}function ot(e){const t=p.useRef(e);return Ke((()=>{t.current=e})),t}const it=p["useInsertionEffect".toString()]||(e=>e());var nt="undefined"!=typeof document?y:f;let rt=!1,st=0;const at=()=>"floating-ui-"+st++;const lt=p["useId".toString()]||function(){const[e,t]=p.useState((()=>rt?at():void 0));return nt((()=>{null==e&&t(at())}),[]),p.useEffect((()=>{rt||(rt=!0)}),[]),e};const dt=p.createContext(null),ct=p.createContext(null);function ht(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,s]=p.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,[c,h]=p.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[u,f]=p.useState(i);Qe(u,i)||f(i);const[v,y]=p.useState(null),[g,m]=p.useState(null),w=p.useCallback((e=>{e!==_.current&&(_.current=e,y(e))}),[]),x=p.useCallback((e=>{e!==S.current&&(S.current=e,m(e))}),[]),C=r||v,z=s||g,_=p.useRef(null),S=p.useRef(null),R=p.useRef(c),k=null!=l,O=ot(l),L=ot(n),j=p.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:o,middleware:u};L.current&&(e.platform=L.current),Je(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Qe(R.current,t)&&(R.current=t,b.flushSync((()=>{h(t)})))}))}),[u,t,o,L]);Ke((()=>{!1===d&&R.current.isPositioned&&(R.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const N=p.useRef(!1);Ke((()=>(N.current=!0,()=>{N.current=!1})),[]),Ke((()=>{if(C&&(_.current=C),z&&(S.current=z),C&&z){if(O.current)return O.current(C,z,j);j()}}),[C,z,j,O,k]);const E=p.useMemo((()=>({reference:_,floating:S,setReference:w,setFloating:x})),[w,x]),M=p.useMemo((()=>({reference:C,floating:z})),[C,z]),W=p.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=tt(M.floating,c.x),i=tt(M.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...et(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,a,M.floating,c.x,c.y]);return p.useMemo((()=>({...c,update:j,refs:E,elements:M,floatingStyles:W})),[c,j,E,M,W])}(e),d=p.useContext(ct),c=null!=((null==(h=p.useContext(dt))?void 0:h.id)||null);var h;const u=function(e){const t=p.useRef((()=>{}));return it((()=>{t.current=e})),p.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&&(v.current.openEvent=t),y.emit("openchange",{open:e,event:t,reason:o,nested:c}),null==i||i(e,t,o)})),f=p.useRef(null),v=p.useRef({}),y=p.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=lt(),m=p.useCallback((e=>{const t=K(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),w=p.useCallback((e=>{(K(e)||null===e)&&(f.current=e,s(e)),(K(l.refs.reference.current)||null===l.refs.reference.current||null!==e&&!K(e))&&l.refs.setReference(e)}),[l.refs]),x=p.useMemo((()=>({...l.refs,setReference:w,setPositionReference:m,domReference:f})),[l.refs,w,m]),C=p.useMemo((()=>({...l.elements,domReference:a})),[l.elements,a]),z=p.useMemo((()=>({...l,refs:x,elements:C,dataRef:v,nodeId:n,floatingId:g,events:y,open:o,onOpenChange:u})),[l,n,g,y,o,u,x,C]);return nt((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===n));e&&(e.context=z)})),p.useMemo((()=>({...l,context:z,refs:x,elements:C})),[l,x,C,z])}function pt(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"],ft=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=pt(e,ut);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("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"}))})),vt=["color"],yt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=pt(e,vt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),gt=["color"],mt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=pt(e,gt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),wt=["color"],bt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=pt(e,wt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M4.76447 3.12199C5.63151 3.04859 6.56082 3 7.5 3C8.43918 3 9.36849 3.04859 10.2355 3.12199C11.2796 3.21037 11.9553 3.27008 12.472 3.39203C12.9425 3.50304 13.2048 3.64976 13.4306 3.88086C13.4553 3.90618 13.4902 3.94414 13.5133 3.97092C13.7126 4.20149 13.8435 4.4887 13.918 5.03283C13.9978 5.6156 14 6.37644 14 7.52493C14 8.66026 13.9978 9.41019 13.9181 9.98538C13.8439 10.5206 13.7137 10.8061 13.5125 11.0387C13.4896 11.0651 13.4541 11.1038 13.4296 11.1287C13.2009 11.3625 12.9406 11.5076 12.4818 11.6164C11.9752 11.7365 11.3143 11.7942 10.2878 11.8797C9.41948 11.9521 8.47566 12 7.5 12C6.52434 12 5.58052 11.9521 4.7122 11.8797C3.68572 11.7942 3.02477 11.7365 2.51816 11.6164C2.05936 11.5076 1.7991 11.3625 1.57037 11.1287C1.54593 11.1038 1.51035 11.0651 1.48748 11.0387C1.28628 10.8061 1.15612 10.5206 1.08193 9.98538C1.00221 9.41019 1 8.66026 1 7.52493C1 6.37644 1.00216 5.6156 1.082 5.03283C1.15654 4.4887 1.28744 4.20149 1.48666 3.97092C1.5098 3.94414 1.54468 3.90618 1.56942 3.88086C1.7952 3.64976 2.05752 3.50304 2.52796 3.39203C3.04473 3.27008 3.7204 3.21037 4.76447 3.12199ZM0 7.52493C0 5.28296 0 4.16198 0.729985 3.31713C0.766457 3.27491 0.815139 3.22194 0.854123 3.18204C1.63439 2.38339 2.64963 2.29744 4.68012 2.12555C5.56923 2.05028 6.52724 2 7.5 2C8.47276 2 9.43077 2.05028 10.3199 2.12555C12.3504 2.29744 13.3656 2.38339 14.1459 3.18204C14.1849 3.22194 14.2335 3.27491 14.27 3.31713C15 4.16198 15 5.28296 15 7.52493C15 9.74012 15 10.8477 14.2688 11.6929C14.2326 11.7348 14.1832 11.7885 14.1444 11.8281C13.3629 12.6269 12.3655 12.71 10.3709 12.8763C9.47971 12.9505 8.50782 13 7.5 13C6.49218 13 5.52028 12.9505 4.62915 12.8763C2.63446 12.71 1.63712 12.6269 0.855558 11.8281C0.816844 11.7885 0.767442 11.7348 0.731221 11.6929C0 10.8477 0 9.74012 0 7.52493ZM5.25 5.38264C5.25 5.20225 5.43522 5.08124 5.60041 5.15369L10.428 7.27105C10.6274 7.35853 10.6274 7.64147 10.428 7.72895L5.60041 9.84631C5.43522 9.91876 5.25 9.79775 5.25 9.61736V5.38264Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),xt=["color"],Ct=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=pt(e,xt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const zt={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\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null}},_t=({blockId:o,onClose:i})=>{const n=e(),[r,s]=u(""),a=0===r.length;return d("div",Object.assign({className:"yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-white-space-nowrap yoo-video-w-full"},{children:[c("input",{type:"text",placeholder:"Paste video link",value:r,className:"yoo-video-items-center yoo-video-bg-[hsla(45,13%,94%,.6)] yoo-video-rounded-[4px] yoo-video-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-video-cursor-text yoo-video-flex yoo-video-text-[14px] yoo-video-h-[32px] yoo-video-leading-[20px] yoo-video-px-[6px] yoo-video-relative yoo-video-w-full yoo-video-border-none",onChange:e=>s(e.target.value)}),c("button",Object.assign({type:"button",className:"yoopta-button yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-cursor-pointer yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-flex-shrink-0 yoo-video-white-space-nowrap yoo-video-h-[28px] yoo-video-rounded-[4px] yoo-video-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-video-bg-[rgb(35,131,226)] yoo-video-text-white yoo-video-fill-white yoo-video-leading-[1.2] yoo-video-px-[12px] yoo-video-text-[14px] yoo-video-font-medium yoo-video-w-full yoo-video-max-w-[300px] yoo-video-mx-auto yoo-video-m-[12px_0_6px] disabled:yoo-video-bg-[rgba(35,131,226,0.5)] disabled:yoo-video-cursor-not-allowed",disabled:a,onClick:()=>{var e;if(0===r.length)return;const s=(a=r).includes("youtube.com")||a.includes("youtu.be")?"youtube":a.includes("vimeo.com")?"vimeo":a.includes("dailymotion.com")||a.includes("dai.ly")?"dailymotion":null;var a;const l=s?null===(e=zt[s])||void 0===e?void 0:e.call(zt,r):null;if(!s||!l)return console.warn("Unsopperted video provider or video id is not found.");t.updateElement(n,o,"video",{src:r,provider:{type:s,id:l,url:r}}),i()}},{children:"Embed video"}))]}))},St=({accept:i="video/*",onClose:n,blockId:r,onSetLoading:s})=>{const a=o("Video"),l=e();return c("div",Object.assign({className:"yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-white-space-nowrap yoo-video-rounded-[4px] yoo-video-h-[32px] yoo-video-px-[12px] yoo-video-border yoo-video-border-solid yoo-video-border-[rgba(55,53,47,0.16)] yoo-video-w-full yoo-video-cursor-pointer"},{children:d("label",Object.assign({htmlFor:"video-uploader",className:"yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-font-medium yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-h-full"},{children:[c("input",{type:"file",id:"video-uploader",className:"yoo-video-absolute yoo-video-left-0 yoo-video-top-0 yoo-video-invisible",accept:(null==a?void 0:a.accept)||i,onChange:e=>{const o=e.target.files[0];o&&(e=>{z(void 0,void 0,void 0,(function*(){if(!(null==a?void 0:a.onUpload))throw new Error("onUpload not provided in plugin options. Check Video.extend({}) method");n(),s(!0);try{const o=yield null==a?void 0:a.onUpload(e);t.updateElement(l,r,"video",{src:o.src,sizes:o.sizes,bgColor:o.bgColor,fit:o.fit||"contain"})}catch(e){}finally{s(!1)}}))})(o)},multiple:!1}),"Upload video"]}))}))},{Overlay:Rt,Portal:kt}=i,Ot=({floatingStyles:e,refs:t,onClose:o,blockId:i,onSetLoading:n})=>{const[r,s]=u("upload"),a=e=>s(e),l="upload"===r,h="embed"===r,p=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return c(kt,Object.assign({id:"yoo-video-uploader-portal"},{children:c(Rt,Object.assign({lockScroll:!0,className:"yoo-video-z-[100]",onClick:o},{children:c("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:d("div",Object.assign({className:"yoo-video-flex yoo-video-flex-col yoo-video-min-w-[540px] yoo-video-max-w-[calc(100vw-24px)] yoo-video-h-full yoo-video-max-h-[420px] yoo-video-bg-[#FFFFFF] yoo-video-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-video-w-full yoo-video-flex yoo-video-text-[14px] yoo-video-p-[0_8px] yoo-video-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-video-relative yoo-video-z-10 yoo-video-h-[40px]"},{children:[c("button",Object.assign({type:"button",onClick:()=>a("upload"),style:p(l),className:"yoopta-button yoo-video-py-[6px] yoo-video-whitespace-nowrap yoo-video-min-w-0 yoo-video-flex-shrink-0 yoo-video-text-[rgb(55,53,47)] yoo-video-relative yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-bg-inherit yoo-video-transition-[height_20ms_ease-in] yoo-video-inline-flex yoo-video-items-center yoo-video-h-full yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-px-[8px]"},{children:"Upload"})),c("button",Object.assign({type:"button",onClick:()=>a("embed"),style:p(h),className:"yoopta-button yoo-video-py-[6px] yoo-video-whitespace-nowrap yoo-video-min-w-0 yoo-video-flex-shrink-0 yoo-video-text-[rgb(55,53,47)] yoo-video-relative yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-bg-inherit yoo-video-transition-[height_20ms_ease-in] yoo-video-inline-flex yoo-video-items-center yoo-video-h-full yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-px-[8px]"},{children:"Video link"}))]})),d("div",Object.assign({className:"yoo-video-pt-[6px] yoo-video-pb-[6px] yoo-video-mt-[4px] yoo-video-flex yoo-video-justify-center yoo-video-mr-[12px] yoo-video-ml-[12px]"},{children:[h&&c(_t,{onClose:o,blockId:i}),l&&c(St,{onClose:o,blockId:i,onSetLoading:n})]}))]}))}))}))}))},Lt=({className:e,width:t,height:o,children:i})=>d("div",Object.assign({className:e},{children:[i,c("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 yoo-video-h-4 yoo-video-w-4 yoo-video-animate-spin"},{children:c("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=u(!1),[r,s]=u(!1),{refs:a,floatingStyles:l}=ht({placement:"bottom",open:i,onOpenChange:n,middleware:[qe(),Ge(),Xe(),Ee(10)]});return d("div",Object.assign({className:"yoo-video-w-full yoo-video-user-select-none yoo-video-m-[20px_0_10px] yoo-video-relative yoo-video-flex"},e,{contentEditable:!1},{children:[d("button",Object.assign({type:"button",className:"yoopta-button yoo-video-p-[12px_36px_12px_12px] yoo-video-flex yoo-video-items-center yoo-video-text-left yoo-video-w-full yoo-video-overflow-hidden yoo-video-rounded-[3px] yoo-video-text-[14px] yoo-video-text-[rgba(55,53,47,0.65)] yoo-video-relative yoo-video-cursor-pointer yoo-video-border-none yoo-video-bg-[#efefef] yoo-video-transition-[background-color_100ms_ease-in] hover:yoo-video-bg-[#e3e3e3]",onClick:()=>n(!0),disabled:r,ref:a.setReference},{children:[c(r?Lt:bt,{className:"yoo-video-mr-2 yoo-video-user-select-none",width:24,height:24}),c("span",Object.assign({className:"yoo-video-font-medium"},{children:r?"Loading...":"Click to add video"})),r&&c("div",{className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-h-full yoo-video-bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),i&&c(Ot,{blockId:o,floatingStyles:l,refs:a,onClose:()=>n(!1),onSetLoading:e=>s(e)}),t]}))};var Nt;function Et(){return Et=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},Et.apply(this,arguments)}var Mt,Wt=function(e){return p.createElement("svg",Et({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"checkmark_svg__lucide checkmark_svg__lucide-check"},e),Nt||(Nt=p.createElement("path",{d:"M20 6 9 17l-5-5"})))};function Bt(){return Bt=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},Bt.apply(this,arguments)}var Pt=function(e){return p.createElement("svg",Bt({viewBox:"0 0 16 16",style:{width:16,height:16,display:"block",fill:"rgba(55,53,47,.85)",flexShrink:0}},e),Mt||(Mt=p.createElement("path",{d:"M8.215 15.126c3.862 0 7.061-3.192 7.061-7.062 0-3.862-3.199-7.061-7.068-7.061-3.862 0-7.055 3.2-7.055 7.061 0 3.87 3.2 7.062 7.062 7.062zm0-1.388a5.654 5.654 0 0 1-5.667-5.674 5.642 5.642 0 0 1 5.66-5.667 5.66 5.66 0 0 1 5.68 5.667 5.66 5.66 0 0 1-5.673 5.674zm0-9.174c-.342 0-.602.247-.602.588v3.234l.062 1.401-.622-.766-.766-.8a.557.557 0 0 0-.41-.177.54.54 0 0 0-.56.547c0 .164.054.3.163.41l2.256 2.283c.15.157.294.226.479.226.191 0 .335-.075.485-.226l2.256-2.283a.557.557 0 0 0 .164-.41.539.539 0 0 0-.56-.547.523.523 0 0 0-.41.178l-.766.793-.622.779.054-1.408V5.152c0-.341-.253-.588-.601-.588z"})))};const{ExtendedBlockActions:Ht,BlockOptionsMenuGroup:At,BlockOptionsMenuItem:Tt,BlockOptionsSeparator:Ft}=i,Vt=({editor:e,block:o,props:i})=>{var n;const r=!!(null===(n=null==i?void 0:i.provider)||void 0===n?void 0:n.id);return d(Ht,Object.assign({onClick:()=>e.setSelection([o.meta.order]),id:"yoopta-video-options"},{children:[c(Ft,{}),!r&&d(At,{children:[c(Tt,{children:d("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-video-justify-between",onClick:()=>{t.updateElement(e,o.id,"video",{fit:"contain"})}},{children:[d("span",Object.assign({className:"yoo-video-flex"},{children:[c(yt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Fit"]})),"contain"===(null==i?void 0:i.fit)&&c(Wt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4"})]}))}),c(Tt,{children:d("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-video-justify-between",onClick:()=>{t.updateElement(e,o.id,"video",{fit:"fill"})}},{children:[d("span",Object.assign({className:"yoo-video-flex"},{children:[c(Ct,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Fill"]})),"fill"===(null==i?void 0:i.fit)&&c(Wt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4"})]}))}),c(Tt,{children:d("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-video-justify-between",onClick:()=>{t.updateElement(e,o.id,"video",{fit:"cover"})}},{children:[d("span",Object.assign({className:"yoo-video-flex"},{children:[c(mt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Cover"]})),"cover"===(null==i?void 0:i.fit)&&c(Wt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4"})]}))})]}),c(Ft,{}),c(At,{children:c(Tt,{children:c("button",Object.assign({type:"button",className:"yoopta-button yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:r?()=>{var e,t;(null===(e=null==i?void 0:i.provider)||void 0===e?void 0:e.url)&&window.open(null===(t=null==i?void 0:i.provider)||void 0===t?void 0:t.url,"_blank")}:()=>{if(!i||!i.src||r)return;const e=document.createElement("a");e.href=i.src,e.download=i.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:d(h,r?{children:[c(ft,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}:{children:[c(Pt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Download"]})}))})})]}))},Dt=({position:e})=>c("div",Object.assign({contentEditable:!1,className:"yoo-video-absolute yoo-video-pointer-events-none yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-z-10 yoo-video-opacity-1 yoo-video-h-full yoo-video-w-[15px] yoo-video-cursor-col-resize yoo-video-transition-opacity yoo-video-duration-150 yoo-video-ease-in "+("left"===e?"yoo-video-left-0 yoo-video-top-0":"yoo-video-right-0 yoo-video-top-0")},{children:c("div",{className:"yoo-video-opacity-100 yoo-video-transition-opacity yoo-video-duration-300 yoo-video-ease-in yoo-video-rounded-[20px] yoo-video-bg-[rgba(15,15,15,0.6)] yoo-video-border yoo-video-border-solid yoo-video-border-[rgba(255,255,255,0.9)] yoo-video-w-[6px] yoo-video-h-[48px] yoo-video-max-h-[50%] yoo-video-shadow-[0_0_0_.5px_#FFF]"})})),It=new a({type:"Video",elements:{video:{render:({element:i,attributes:a,children:l,blockId:h})=>{const{src:p,srcSet:v,bgColor:y,settings:g,sizes:m,poster:b,provider:x,fit:C}=i.props||{},z=n(h),_=e(),S=o("Video"),k=r(),[O,L]=u({width:(null==m?void 0:m.width)||750,height:(null==m?void 0:m.height)||440});f((()=>L({width:(null==m?void 0:m.width)||650,height:(null==m?void 0:m.height)||440})),[i.props]);const j=s({blockId:h}),N=w((()=>{var e,o;return{minWidth:300,size:{width:O.width,height:O.height},maxWidth:(null===(e=null==S?void 0:S.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(o=null==S?void 0:S.maxSizes)||void 0===o?void 0:o.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!k,right:!k},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{L({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,o,i)=>{t.updateElement(_,h,"video",{sizes:{width:i.offsetWidth,height:i.offsetHeight}})},handleComponent:{left:c(Dt,{position:"left"}),right:c(Dt,{position:"right"})}}}),[O.width,O.height]);return p?c("div",Object.assign({contentEditable:!1,draggable:!1,className:"yoo-video-mt-4 yoo-video-relative yoopta-video"},a,{children:d(Y,Object.assign({},N,{className:"yoo-video-mx-auto yoo-video-my-0 yoo-video-flex"},{children:[j&&c("div",{className:"yoo-video-absolute yoo-video-pointer-events-none yoo-video-inset-0 yoo-video-bg-[rgba(35,131,226,0.14)] yoo-video-z-[81] yoo-video-rounded-[3px] yoo-video-opacity-100 yoo-video-transition-opacity yoo-video-duration-150 yoo-video-ease-in"}),c(R,{src:p,srcSet:v,width:null==O?void 0:O.width,settings:g,bgColor:y,height:null==O?void 0:O.height,poster:b,provider:x,fit:C}),!k&&c(Vt,{block:z,editor:_,settings:g,props:i.props}),l]}))})):c(jt,Object.assign({attributes:a,blockId:h},{children:l}))},props:{src:null,srcSet:null,bgColor:null,sizes:{width:650,height:400},nodeType:"void",provider:{type:null,id:""},settings:{controls:!1,loop:!0,muted:!0,autoPlay:!0}}}},options:{accept:"video/*",maxSizes:{maxWidth:650,maxHeight:550},onUpload:()=>z(void 0,void 0,void 0,(function*(){return Promise.resolve({src:""})})),display:{title:"Video",description:"Upload from device, embed from Youtube, Vimeo"}},parsers:{html:{deserialize:{nodeNames:["VIDEO"],parse:e=>{if("VIDEO"===e.nodeName){const t={src:e.getAttribute("src"),srcSet:e.getAttribute("srcset"),bgColor:e.getAttribute("bgcolor"),sizes:{width:e.getAttribute("width"),height:e.getAttribute("height")},settings:{controls:!!e.getAttribute("controls"),loop:!!e.getAttribute("loop"),muted:!!e.getAttribute("muted"),autoPlay:!!e.getAttribute("autoplay")}};return{id:l(),type:"video",children:[{text:""}],props:t}}}}}}});!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-video-pointer-events-none{pointer-events:none}.yoo-video-invisible{visibility:hidden}.yoo-video-absolute{position:absolute}.yoo-video-relative{position:relative}.yoo-video-inset-0{inset:0}.yoo-video-left-0{left:0}.yoo-video-right-0{right:0}.yoo-video-top-0{top:0}.yoo-video-z-10{z-index:10}.yoo-video-z-\\[100\\]{z-index:100}.yoo-video-z-\\[81\\]{z-index:81}.yoo-video-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-video-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-video-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-video-mx-auto{margin-left:auto;margin-right:auto}.yoo-video-my-0{margin-bottom:0;margin-top:0}.yoo-video-ml-\\[12px\\]{margin-left:12px}.yoo-video-mr-2{margin-right:.5rem}.yoo-video-mr-\\[12px\\]{margin-right:12px}.yoo-video-mt-4{margin-top:1rem}.yoo-video-mt-\\[4px\\]{margin-top:4px}.yoo-video-flex{display:flex}.yoo-video-inline-flex{display:inline-flex}.yoo-video-h-4{height:1rem}.yoo-video-h-\\[28px\\]{height:28px}.yoo-video-h-\\[32px\\]{height:32px}.yoo-video-h-\\[40px\\]{height:40px}.yoo-video-h-\\[48px\\]{height:48px}.yoo-video-h-full{height:100%}.yoo-video-max-h-\\[420px\\]{max-height:420px}.yoo-video-max-h-\\[50\\%\\]{max-height:50%}.yoo-video-w-4{width:1rem}.yoo-video-w-\\[15px\\]{width:15px}.yoo-video-w-\\[6px\\]{width:6px}.yoo-video-w-full{width:100%}.yoo-video-min-w-0{min-width:0}.yoo-video-min-w-\\[540px\\]{min-width:540px}.yoo-video-max-w-\\[300px\\]{max-width:300px}.yoo-video-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-video-flex-shrink-0{flex-shrink:0}@keyframes yoo-video-spin{to{transform:rotate(1turn)}}.yoo-video-animate-spin{animation:yoo-video-spin 1s linear infinite}.yoo-video-cursor-col-resize{cursor:col-resize}.yoo-video-cursor-pointer{cursor:pointer}.yoo-video-cursor-text{cursor:text}.yoo-video-flex-col{flex-direction:column}.yoo-video-items-center{align-items:center}.yoo-video-justify-start{justify-content:flex-start}.yoo-video-justify-center{justify-content:center}.yoo-video-justify-between{justify-content:space-between}.yoo-video-overflow-hidden{overflow:hidden}.yoo-video-whitespace-nowrap{white-space:nowrap}.yoo-video-rounded-\\[20px\\]{border-radius:20px}.yoo-video-rounded-\\[3px\\]{border-radius:3px}.yoo-video-rounded-\\[4px\\]{border-radius:4px}.yoo-video-rounded-sm{border-radius:.125rem}.yoo-video-border{border-width:1px}.yoo-video-border-solid{border-style:solid}.yoo-video-border-none{border-style:none}.yoo-video-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-video-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}.yoo-video-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-video-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-video-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-video-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-video-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-video-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-video-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}.yoo-video-bg-inherit{background-color:inherit}.yoo-video-fill-white{fill:#fff}.yoo-video-object-cover{-o-object-fit:cover;object-fit:cover}.yoo-video-p-\\[0_8px\\]{padding:0 8px}.yoo-video-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-video-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-video-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-video-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-video-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-video-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-video-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-video-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-video-pb-\\[6px\\]{padding-bottom:6px}.yoo-video-pt-\\[6px\\]{padding-top:6px}.yoo-video-text-left{text-align:left}.yoo-video-text-\\[14px\\]{font-size:14px}.yoo-video-font-medium{font-weight:500}.yoo-video-leading-\\[1\\.2\\]{line-height:1.2}.yoo-video-leading-\\[120\\%\\]{line-height:120%}.yoo-video-leading-\\[20px\\]{line-height:20px}.yoo-video-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-video-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-video-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-video-opacity-100{opacity:1}.yoo-video-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-video-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-video-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-video-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-video-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-video-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-video-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-duration-150{transition-duration:.15s}.yoo-video-duration-300{transition-duration:.3s}.yoo-video-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-video .yoopta-video-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-video:hover .yoopta-video-options{opacity:1}.hover\\:yoo-video-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-video-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-video-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-video-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{It as default};
1
+ import{useYooptaEditor as e,Elements as t,useYooptaPluginOptions as o,UI as i,useBlockData as n,useYooptaReadOnly as r,useBlockSelected as s,YooptaPlugin as a,generateId as l}from"@yoopta/editor";import{jsxs as d,jsx as c,Fragment as p}from"react/jsx-runtime";import*as h from"react";import{useState as u,useEffect as f,useRef as v,useLayoutEffect as y,forwardRef as g,createElement as m,useMemo as w}from"react";import*as b from"react-dom";import{flushSync as x}from"react-dom";function C(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o}function z(e,t,o,i){return new(o||(o=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))}function _(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 f((()=>{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}"function"==typeof SuppressedError&&SuppressedError;const S={vimeo:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=v(null),[n,r]=u(null),[s,a]=u(!1),{isIntersecting:l}=_(i,{freezeOnceVisible:!0,rootMargin:"50%"});return f((()=>{fetch(`https://vimeo.com/api/v2/video/${t}.json`).then((e=>e.json())).then((e=>r(e[0].thumbnail_medium))).catch((()=>r(null)))}),[t]),d("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[c("img",{src:n||"",alt:"vimeo_video_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:l&&s?0:1,zIndex:l&&s?-1:0}}),l&&c("iframe",Object.assign({title:"Video Player",src:`https://player.vimeo.com/video/${t}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>a(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))},youtube:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=v(null),[n,r]=u(!1),{isIntersecting:s}=_(i,{freezeOnceVisible:!0,rootMargin:"50%"});return d("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[c("img",{src:`https://i.ytimg.com/vi/${t}/default.jpg`,alt:"youtube_video_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:s&&n?0:1,zIndex:s&&n?-1:0}}),s&&c("iframe",Object.assign({title:"Video Player",src:`https://www.youtube.com/embed/${t}`,frameBorder:0,onLoad:()=>r(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))},dailymotion:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=v(null),[n,r]=u(null),[s,a]=u(!1),{isIntersecting:l}=_(i,{freezeOnceVisible:!0,rootMargin:"50%"});return f((()=>{fetch((e=>`https://api.dailymotion.com/video/${e}?fields=thumbnail_url`)(t)).then((e=>e.json())).then((e=>r(e.thumbnail_url))).catch((()=>r(null)))}),[t]),d("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[c("img",{src:n||"",alt:"daylimotion_video_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:l&&s?0:1,zIndex:l&&s?-1:0}}),l&&c("iframe",Object.assign({title:"Dailymotion Video Player",frameBorder:0,onLoad:()=>a(!0),src:`https://www.dailymotion.com/embed/video/${t}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))}},R=({width:e,height:t,src:o,bgColor:i,poster:n,provider:r,fit:s})=>{const a={backgroundColor:i||"transparent",objectFit:s||"contain"};if(r&&r.id&&r.type&&S[r.type]){const o=S[r.type];return c(o,{videoId:r.id,width:e,height:t})}return c("div",Object.assign({className:"yoo-video-w-full"},{children:o&&c("video",{preload:"metadata",poster:n,src:o,width:e,height:t,onDragStart:e=>e.preventDefault(),className:"yoo-video-object-cover yoo-video-w-full yoo-video-h-full",style:a,playsInline:!0,controls:!0})}))};var k,O=(k=function(e,t){return k=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])},k(e,t)},function(e,t){function o(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),L=function(){return L=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},L.apply(this,arguments)},j={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},N={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},E={width:"20px",height:"20px",position:"absolute"},M={top:L(L({},j),{top:"-5px"}),right:L(L({},N),{left:void 0,right:"-5px"}),bottom:L(L({},j),{top:void 0,bottom:"-5px"}),left:L(L({},N),{left:"-5px"}),topRight:L(L({},E),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:L(L({},E),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:L(L({},E),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:L(L({},E),{left:"-10px",top:"-10px",cursor:"nw-resize"})},W=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 O(t,e),t.prototype.render=function(){return h.createElement("div",{className:this.props.className||"",style:L(L({position:"absolute",userSelect:"none"},M[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(h.PureComponent),B=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)}}(),P=function(){return P=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},P.apply(this,arguments)},H={width:"auto",height:"auto"},A=function(e,t,o){return Math.max(Math.min(e,o),t)},T=function(e,t){return Math.round(e/t)*t},F=function(e,t){return new RegExp(e,"i").test(t)},V=function(e){return Boolean(e.touches&&e.touches.length)},D=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},I=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"},U=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},Z=["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"],$="__resizable_base__",Y=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($):t.className+=$,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 B(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||H},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 I(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?I(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?I(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&&F("left",r),a=n&&F("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,p=s.width,h=s.height,u=d||0,f=c||0;return F("right",r)&&(p=s.width+(e-s.x)*i/o,l&&(h=(p-f)/this.ratio+u)),F("left",r)&&(p=s.width-(e-s.x)*i/o,l&&(h=(p-f)/this.ratio+u)),F("bottom",r)&&(h=s.height+(t-s.y)*i/o,l&&(p=(h-u)*this.ratio+f)),F("top",r)&&(h=s.height-(t-s.y)*i/o,l&&(p=(h-u)*this.ratio+f)),{newWidth:p,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,p=void 0===o.height||o.height<0?t:o.height,h=s||0,u=a||0;if(r){var f=(c-h)*this.ratio+u,v=(p-h)*this.ratio+u,y=(l-u)/this.ratio+h,g=(d-u)/this.ratio+h,m=Math.max(l,f),w=Math.min(d,v),b=Math.max(c,y),x=Math.min(p,g);e=A(e,m,w),t=A(t,b,x)}else e=A(e,l,d),t=A(t,c,p);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&&V(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:P(P({},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&&V(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=V(e)?e.touches[0].clientX:e.clientX,l=V(e)?e.touches[0].clientY:e.clientY,d=this.state,c=d.direction,p=d.original,h=d.width,u=d.height,f=this.getParentSize(),v=function(e,t,o,i,n,r,s){return i=U(i,e.width,t,o),n=U(n,e.height,t,o),r=U(r,e.width,t,o),s=U(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=v.maxWidth,n=v.maxHeight,r=v.minWidth,s=v.minHeight;var y=this.calculateNewSizeFromDirection(a,l),g=y.newHeight,m=y.newWidth,w=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(m=D(m,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=D(g,this.props.snap.y,this.props.snapGap));var b=this.calculateNewSizeFromAspectRatio(m,g,{width:w.maxWidth,height:w.maxHeight},{width:r,height:s});if(m=b.newWidth,g=b.newHeight,this.props.grid){var C=T(m,this.props.grid[0]),z=T(g,this.props.grid[1]),_=this.props.snapGap||0;m=0===_||Math.abs(C-m)<=_?C:m,g=0===_||Math.abs(z-g)<=_?z:g}var S={width:m-p.width,height:g-p.height};if(h&&"string"==typeof h)if(h.endsWith("%"))m=m/f.width*100+"%";else if(h.endsWith("vw")){m=m/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){m=m/this.window.innerHeight*100+"vh"}if(u&&"string"==typeof u)if(u.endsWith("%"))g=g/f.height*100+"%";else if(u.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(u.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}var R={width:this.createSizeForCssProperty(m,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?R.flexBasis=R.width:"column"===this.flexDir&&(R.flexBasis=R.height),x((function(){t.setState(R)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,S)}},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:P(P({},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]?h.createElement(W,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}));return h.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!==Z.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=P(P(P({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 h.createElement(i,P({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&h.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}(h.PureComponent);function X(e){return J(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function q(e){var t;return null==(t=(J(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function J(e){return e instanceof Node||e instanceof G(e).Node}function K(e){return e instanceof Element||e instanceof G(e).Element}function Q(e){return e instanceof HTMLElement||e instanceof G(e).HTMLElement}function ee(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof G(e).ShadowRoot)}function te(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=se(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function oe(e){return["table","td","th"].includes(X(e))}function ie(e){const t=ne(),o=se(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 ne(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function re(e){return["html","body","#document"].includes(X(e))}function se(e){return G(e).getComputedStyle(e)}function ae(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function le(e){if("html"===X(e))return e;const t=e.assignedSlot||e.parentNode||ee(e)&&e.host||q(e);return ee(t)?t.host:t}function de(e){const t=le(e);return re(t)?e.ownerDocument?e.ownerDocument.body:e.body:Q(t)&&te(t)?t:de(t)}function ce(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=de(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=G(n);return r?t.concat(s,s.visualViewport||[],te(n)?n:[],s.frameElement&&o?ce(s.frameElement):[]):t.concat(n,ce(n,[],o))}const pe=Math.min,he=Math.max,ue=Math.round,fe=e=>({x:e,y:e}),ve={left:"right",right:"left",bottom:"top",top:"bottom"},ye={start:"end",end:"start"};function ge(e,t,o){return he(e,pe(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function we(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function xe(e){return"x"===e?"y":"x"}function Ce(e){return"y"===e?"height":"width"}function ze(e){return["top","bottom"].includes(we(e))?"y":"x"}function _e(e){return xe(ze(e))}function Se(e){return e.replace(/start|end/g,(e=>ye[e]))}function Re(e){return e.replace(/left|right|bottom|top/g,(e=>ve[e]))}function ke(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 Oe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Le(e,t,o){let{reference:i,floating:n}=e;const r=ze(t),s=_e(t),a=Ce(s),l=we(t),d="y"===r,c=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,h=i[a]/2-n[a]/2;let u;switch(l){case"top":u={x:c,y:i.y-n.height};break;case"bottom":u={x:c,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:p};break;case"left":u={x:i.x-n.width,y:p};break;default:u={x:i.x,y:i.y}}switch(be(t)){case"start":u[s]-=h*(o&&d?-1:1);break;case"end":u[s]+=h*(o&&d?-1:1)}return u}async function je(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:p="floating",altBoundary:h=!1,padding:u=0}=me(t,e),f=ke(u),v=a[h?"floating"===p?"reference":"floating":p],y=Oe(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(v)))||o?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),g="floating"===p?{...s.floating,x:i,y:n}:s.reference,m=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(m))&&await(null==r.getScale?void 0:r.getScale(m))||{x:1,y:1},b=Oe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:m,strategy:l}):g);return{top:(y.top-b.top+f.top)/w.y,bottom:(b.bottom-y.bottom+f.bottom)/w.y,left:(y.left-b.left+f.left)/w.x,right:(b.right-y.right+f.right)/w.x}}function Ne(e){const t=pe(...e.map((e=>e.left))),o=pe(...e.map((e=>e.top)));return{x:t,y:o,width:he(...e.map((e=>e.right)))-t,height:he(...e.map((e=>e.bottom)))-o}}const Ee=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=we(o),a=be(o),l="y"===ze(o),d=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,p=me(t,e);let{mainAxis:h,crossAxis:u,alignmentAxis:f}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*c,y:h*d}:{x:h*d,y:u*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 Me(e){const t=se(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=ue(o)!==r||ue(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function We(e){return K(e)?e:e.contextElement}function Be(e){const t=We(e);if(!Q(t))return fe(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=Me(t);let s=(r?ue(o.width):o.width)/i,a=(r?ue(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Pe=fe(0);function He(e){const t=G(e);return ne()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Pe}function Ae(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=We(e);let s=fe(1);t&&(i?K(i)&&(s=Be(i)):s=Be(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==G(e))&&t}(r,o,i)?He(r):fe(0);let l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,c=n.width/s.x,p=n.height/s.y;if(r){const e=G(r),t=i&&K(i)?G(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Be(n),t=n.getBoundingClientRect(),i=se(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,p*=e.y,l+=r,d+=s,o=G(n),n=o.frameElement}}return Oe({width:c,height:p,x:l,y:d})}const Te=[":popover-open",":modal"];function Fe(e){return Te.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ve(e){return Ae(q(e)).left+ae(e).scrollLeft}function De(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=G(e),i=q(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=ne();(!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=q(e),o=ae(e),i=e.ownerDocument.body,n=he(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=he(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Ve(e);const a=-o.scrollTop;return"rtl"===se(i).direction&&(s+=he(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(q(e));else if(K(t))i=function(e,t){const o=Ae(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=Q(e)?Be(e):fe(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=He(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return Oe(i)}function Ie(e,t){const o=le(e);return!(o===t||!K(o)||re(o))&&("fixed"===se(o).position||Ie(o,t))}function Ue(e,t,o){const i=Q(t),n=q(t),r="fixed"===o,s=Ae(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=fe(0);if(i||!i&&!r)if(("body"!==X(t)||te(n))&&(a=ae(t)),i){const e=Ae(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Ve(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ze(e,t){return Q(e)&&"fixed"!==se(e).position?t?t(e):e.offsetParent:null}function $e(e,t){const o=G(e);if(!Q(e)||Fe(e))return o;let i=Ze(e,t);for(;i&&oe(i)&&"static"===se(i).position;)i=Ze(i,t);return i&&("html"===X(i)||"body"===X(i)&&"static"===se(i).position&&!ie(i))?o:i||function(e){let t=le(e);for(;Q(t)&&!re(t);){if(ie(t))return t;t=le(t)}return null}(e)||o}const Ye={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=q(i),a=!!t&&Fe(t.floating);if(i===s||a&&r)return o;let l={scrollLeft:0,scrollTop:0},d=fe(1);const c=fe(0),p=Q(i);if((p||!p&&!r)&&(("body"!==X(i)||te(s))&&(l=ae(i)),Q(i))){const e=Ae(i);d=Be(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:q,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=ce(e,[],!1).filter((e=>K(e)&&"body"!==X(e))),n=null;const r="fixed"===se(e).position;let s=r?le(e):e;for(;K(s)&&!re(s);){const t=se(s),o=ie(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||te(s)&&!o&&Ie(e,s))?i=i.filter((e=>e!==s)):n=t,s=le(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=De(t,o,n);return e.top=he(i.top,e.top),e.right=pe(i.right,e.right),e.bottom=pe(i.bottom,e.bottom),e.left=he(i.left,e.left),e}),De(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:$e,getElementRects:async function(e){const t=this.getOffsetParent||$e,o=this.getDimensions;return{reference:Ue(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}=Me(e);return{width:t,height:o}},getScale:Be,isElement:K,isRTL:function(e){return"rtl"===se(e).direction}},Xe=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 je(t,l),p=ze(we(n)),h=xe(p);let u=d[h],f=d[p];if(r){const e="y"===h?"bottom":"right";u=ge(u+c["y"===h?"top":"left"],u,u-c[e])}if(s){const e="y"===p?"bottom":"right";f=ge(f+c["y"===p?"top":"left"],f,f-c[e])}const v=a.fn({...t,[h]:u,[p]:f});return{...v,data:{x:v.x-o,y:v.y-i}}}}},Ge=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:p=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:v=!0,...y}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=we(n),m=we(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(d.floating)),b=h||(m||!v?[Re(a)]:function(e){const t=Re(e);return[Se(e),t,Se(t)]}(a));h||"none"===f||b.push(...function(e,t,o,i){const n=be(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[]}}(we(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(Se)))),r}(a,v,f,w));const x=[a,...b],C=await je(t,y),z=[];let _=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&z.push(C[g]),p){const e=function(e,t,o){void 0===o&&(o=!1);const i=be(e),n=_e(e),r=Ce(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);z.push(C[e[0]],C[e[1]])}if(_=[..._,{placement:n,overflows:z}],!z.every((e=>e<=0))){var S,R;const e=((null==(S=r.flip)?void 0:S.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:_},reset:{placement:t}};let o=null==(R=_.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!o)switch(u){case"bestFit":{var k;const e=null==(k=_.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:k[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},qe=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))||[]),p=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=>Oe(Ne(e))))}(c),h=Oe(Ne(c)),u=ke(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=l&&null!=d)return p.find((e=>l>e.left-u.left&&l<e.right+u.right&&d>e.top-u.top&&d<e.bottom+u.bottom))||h;if(p.length>=2){if("y"===ze(o)){const e=p[0],t=p[p.length-1],i="top"===we(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"===we(o),t=he(...p.map((e=>e.right))),i=pe(...p.map((e=>e.left))),n=p.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}}:{}}}},Je=(e,t,o)=>{const i=new Map,n={platform:Ye,...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:p}=Le(d,i,l),h=i,u={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:v}=a[o],{x:y,y:g,data:m,reset:w}=await v({x:c,y:p,initialPlacement:i,placement:h,strategy:n,middlewareData:u,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=y?y:c,p=null!=g?g:p,u={...u,[r]:{...u[r],...m}},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:p}=Le(d,h,l))),o=-1)}return{x:c,y:p,placement:h,strategy:n,middlewareData:u}})(e,t,{...n,platform:r})};var Ke="undefined"!=typeof document?y:f;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 et(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tt(e,t){const o=et(e);return Math.round(t*o)/o}function ot(e){const t=h.useRef(e);return Ke((()=>{t.current=e})),t}const it=h["useInsertionEffect".toString()]||(e=>e());var nt="undefined"!=typeof document?y:f;let rt=!1,st=0;const at=()=>"floating-ui-"+st++;const lt=h["useId".toString()]||function(){const[e,t]=h.useState((()=>rt?at():void 0));return nt((()=>{null==e&&t(at())}),[]),h.useEffect((()=>{rt||(rt=!0)}),[]),e};const dt=h.createContext(null),ct=h.createContext(null);function pt(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,s]=h.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,[c,p]=h.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[u,f]=h.useState(i);Qe(u,i)||f(i);const[v,y]=h.useState(null),[g,m]=h.useState(null),w=h.useCallback((e=>{e!==_.current&&(_.current=e,y(e))}),[]),x=h.useCallback((e=>{e!==S.current&&(S.current=e,m(e))}),[]),C=r||v,z=s||g,_=h.useRef(null),S=h.useRef(null),R=h.useRef(c),k=null!=l,O=ot(l),L=ot(n),j=h.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:o,middleware:u};L.current&&(e.platform=L.current),Je(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Qe(R.current,t)&&(R.current=t,b.flushSync((()=>{p(t)})))}))}),[u,t,o,L]);Ke((()=>{!1===d&&R.current.isPositioned&&(R.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const N=h.useRef(!1);Ke((()=>(N.current=!0,()=>{N.current=!1})),[]),Ke((()=>{if(C&&(_.current=C),z&&(S.current=z),C&&z){if(O.current)return O.current(C,z,j);j()}}),[C,z,j,O,k]);const E=h.useMemo((()=>({reference:_,floating:S,setReference:w,setFloating:x})),[w,x]),M=h.useMemo((()=>({reference:C,floating:z})),[C,z]),W=h.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=tt(M.floating,c.x),i=tt(M.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...et(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,a,M.floating,c.x,c.y]);return h.useMemo((()=>({...c,update:j,refs:E,elements:M,floatingStyles:W})),[c,j,E,M,W])}(e),d=h.useContext(ct),c=null!=((null==(p=h.useContext(dt))?void 0:p.id)||null);var p;const u=function(e){const t=h.useRef((()=>{}));return it((()=>{t.current=e})),h.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&&(v.current.openEvent=t),y.emit("openchange",{open:e,event:t,reason:o,nested:c}),null==i||i(e,t,o)})),f=h.useRef(null),v=h.useRef({}),y=h.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=lt(),m=h.useCallback((e=>{const t=K(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),w=h.useCallback((e=>{(K(e)||null===e)&&(f.current=e,s(e)),(K(l.refs.reference.current)||null===l.refs.reference.current||null!==e&&!K(e))&&l.refs.setReference(e)}),[l.refs]),x=h.useMemo((()=>({...l.refs,setReference:w,setPositionReference:m,domReference:f})),[l.refs,w,m]),C=h.useMemo((()=>({...l.elements,domReference:a})),[l.elements,a]),z=h.useMemo((()=>({...l,refs:x,elements:C,dataRef:v,nodeId:n,floatingId:g,events:y,open:o,onOpenChange:u})),[l,n,g,y,o,u,x,C]);return nt((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===n));e&&(e.context=z)})),h.useMemo((()=>({...l,context:z,refs:x,elements:C})),[l,x,C,z])}function ht(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"],ft=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ht(e,ut);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("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"}))})),vt=["color"],yt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ht(e,vt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),gt=["color"],mt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ht(e,gt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),wt=["color"],bt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ht(e,wt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M4.76447 3.12199C5.63151 3.04859 6.56082 3 7.5 3C8.43918 3 9.36849 3.04859 10.2355 3.12199C11.2796 3.21037 11.9553 3.27008 12.472 3.39203C12.9425 3.50304 13.2048 3.64976 13.4306 3.88086C13.4553 3.90618 13.4902 3.94414 13.5133 3.97092C13.7126 4.20149 13.8435 4.4887 13.918 5.03283C13.9978 5.6156 14 6.37644 14 7.52493C14 8.66026 13.9978 9.41019 13.9181 9.98538C13.8439 10.5206 13.7137 10.8061 13.5125 11.0387C13.4896 11.0651 13.4541 11.1038 13.4296 11.1287C13.2009 11.3625 12.9406 11.5076 12.4818 11.6164C11.9752 11.7365 11.3143 11.7942 10.2878 11.8797C9.41948 11.9521 8.47566 12 7.5 12C6.52434 12 5.58052 11.9521 4.7122 11.8797C3.68572 11.7942 3.02477 11.7365 2.51816 11.6164C2.05936 11.5076 1.7991 11.3625 1.57037 11.1287C1.54593 11.1038 1.51035 11.0651 1.48748 11.0387C1.28628 10.8061 1.15612 10.5206 1.08193 9.98538C1.00221 9.41019 1 8.66026 1 7.52493C1 6.37644 1.00216 5.6156 1.082 5.03283C1.15654 4.4887 1.28744 4.20149 1.48666 3.97092C1.5098 3.94414 1.54468 3.90618 1.56942 3.88086C1.7952 3.64976 2.05752 3.50304 2.52796 3.39203C3.04473 3.27008 3.7204 3.21037 4.76447 3.12199ZM0 7.52493C0 5.28296 0 4.16198 0.729985 3.31713C0.766457 3.27491 0.815139 3.22194 0.854123 3.18204C1.63439 2.38339 2.64963 2.29744 4.68012 2.12555C5.56923 2.05028 6.52724 2 7.5 2C8.47276 2 9.43077 2.05028 10.3199 2.12555C12.3504 2.29744 13.3656 2.38339 14.1459 3.18204C14.1849 3.22194 14.2335 3.27491 14.27 3.31713C15 4.16198 15 5.28296 15 7.52493C15 9.74012 15 10.8477 14.2688 11.6929C14.2326 11.7348 14.1832 11.7885 14.1444 11.8281C13.3629 12.6269 12.3655 12.71 10.3709 12.8763C9.47971 12.9505 8.50782 13 7.5 13C6.49218 13 5.52028 12.9505 4.62915 12.8763C2.63446 12.71 1.63712 12.6269 0.855558 11.8281C0.816844 11.7885 0.767442 11.7348 0.731221 11.6929C0 10.8477 0 9.74012 0 7.52493ZM5.25 5.38264C5.25 5.20225 5.43522 5.08124 5.60041 5.15369L10.428 7.27105C10.6274 7.35853 10.6274 7.64147 10.428 7.72895L5.60041 9.84631C5.43522 9.91876 5.25 9.79775 5.25 9.61736V5.38264Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),xt=["color"],Ct=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ht(e,xt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const zt={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\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null}},_t=({blockId:o,onClose:i})=>{const n=e(),[r,s]=u(""),a=0===r.length;return d("div",Object.assign({className:"yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-white-space-nowrap yoo-video-w-full"},{children:[c("input",{type:"text",placeholder:"Paste video link",value:r,className:"yoo-video-items-center yoo-video-bg-[hsla(45,13%,94%,.6)] yoo-video-rounded-[4px] yoo-video-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-video-cursor-text yoo-video-flex yoo-video-text-[14px] yoo-video-h-[32px] yoo-video-leading-[20px] yoo-video-px-[6px] yoo-video-relative yoo-video-w-full yoo-video-border-none",onChange:e=>s(e.target.value)}),c("button",Object.assign({type:"button",className:"yoopta-button yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-cursor-pointer yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-flex-shrink-0 yoo-video-white-space-nowrap yoo-video-h-[28px] yoo-video-rounded-[4px] yoo-video-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-video-bg-[rgb(35,131,226)] yoo-video-text-white yoo-video-fill-white yoo-video-leading-[1.2] yoo-video-px-[12px] yoo-video-text-[14px] yoo-video-font-medium yoo-video-w-full yoo-video-max-w-[300px] yoo-video-mx-auto yoo-video-m-[12px_0_6px] disabled:yoo-video-bg-[rgba(35,131,226,0.5)] disabled:yoo-video-cursor-not-allowed",disabled:a,onClick:()=>{var e;if(0===r.length)return;const s=(a=r).includes("youtube.com")||a.includes("youtu.be")?"youtube":a.includes("vimeo.com")?"vimeo":a.includes("dailymotion.com")||a.includes("dai.ly")?"dailymotion":null;var a;const l=s?null===(e=zt[s])||void 0===e?void 0:e.call(zt,r):null;if(!s||!l)return console.warn("Unsopperted video provider or video id is not found.");t.updateElement(n,o,{type:"video",props:{src:r,provider:{type:s,id:l,url:r}}}),i()}},{children:"Embed video"}))]}))},St=({accept:i="video/*",onClose:n,blockId:r,onSetLoading:s})=>{const a=o("Video"),l=e();return c("div",Object.assign({className:"yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-white-space-nowrap yoo-video-rounded-[4px] yoo-video-h-[32px] yoo-video-px-[12px] yoo-video-border yoo-video-border-solid yoo-video-border-[rgba(55,53,47,0.16)] yoo-video-w-full yoo-video-cursor-pointer"},{children:d("label",Object.assign({htmlFor:"video-uploader",className:"yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-font-medium yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-h-full"},{children:[c("input",{type:"file",id:"video-uploader",className:"yoo-video-absolute yoo-video-left-0 yoo-video-top-0 yoo-video-invisible",accept:(null==a?void 0:a.accept)||i,onChange:e=>{const o=e.target.files[0];o&&(e=>{z(void 0,void 0,void 0,(function*(){if(!(null==a?void 0:a.onUpload))throw new Error("onUpload not provided in plugin options. Check Video.extend({}) method");n(),s(!0);try{const o=yield null==a?void 0:a.onUpload(e);t.updateElement(l,r,{type:"video",props:{src:o.src,sizes:o.sizes,bgColor:o.bgColor,fit:o.fit||"contain"}})}catch(e){}finally{s(!1)}}))})(o)},multiple:!1}),"Upload video"]}))}))},{Overlay:Rt,Portal:kt}=i,Ot=({floatingStyles:e,refs:t,onClose:o,blockId:i,onSetLoading:n})=>{const[r,s]=u("upload"),a=e=>s(e),l="upload"===r,p="embed"===r,h=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return c(kt,Object.assign({id:"yoo-video-uploader-portal"},{children:c(Rt,Object.assign({lockScroll:!0,className:"yoo-video-z-[100]",onClick:o},{children:c("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:d("div",Object.assign({className:"yoo-video-flex yoo-video-flex-col yoo-video-min-w-[540px] yoo-video-max-w-[calc(100vw-24px)] yoo-video-h-full yoo-video-max-h-[420px] yoo-video-bg-[#FFFFFF] yoo-video-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-video-w-full yoo-video-flex yoo-video-text-[14px] yoo-video-p-[0_8px] yoo-video-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-video-relative yoo-video-z-10 yoo-video-h-[40px]"},{children:[c("button",Object.assign({type:"button",onClick:()=>a("upload"),style:h(l),className:"yoopta-button yoo-video-py-[6px] yoo-video-whitespace-nowrap yoo-video-min-w-0 yoo-video-flex-shrink-0 yoo-video-text-[rgb(55,53,47)] yoo-video-relative yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-bg-inherit yoo-video-transition-[height_20ms_ease-in] yoo-video-inline-flex yoo-video-items-center yoo-video-h-full yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-px-[8px]"},{children:"Upload"})),c("button",Object.assign({type:"button",onClick:()=>a("embed"),style:h(p),className:"yoopta-button yoo-video-py-[6px] yoo-video-whitespace-nowrap yoo-video-min-w-0 yoo-video-flex-shrink-0 yoo-video-text-[rgb(55,53,47)] yoo-video-relative yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-bg-inherit yoo-video-transition-[height_20ms_ease-in] yoo-video-inline-flex yoo-video-items-center yoo-video-h-full yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-px-[8px]"},{children:"Video link"}))]})),d("div",Object.assign({className:"yoo-video-pt-[6px] yoo-video-pb-[6px] yoo-video-mt-[4px] yoo-video-flex yoo-video-justify-center yoo-video-mr-[12px] yoo-video-ml-[12px]"},{children:[p&&c(_t,{onClose:o,blockId:i}),l&&c(St,{onClose:o,blockId:i,onSetLoading:n})]}))]}))}))}))}))},Lt=({className:e,width:t,height:o,children:i})=>d("div",Object.assign({className:e},{children:[i,c("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 yoo-video-h-4 yoo-video-w-4 yoo-video-animate-spin"},{children:c("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=u(!1),[r,s]=u(!1),{refs:a,floatingStyles:l}=pt({placement:"bottom",open:i,onOpenChange:n,middleware:[qe(),Ge(),Xe(),Ee(10)]});return d("div",Object.assign({className:"yoo-video-w-full yoo-video-user-select-none yoo-video-m-[20px_0_10px] yoo-video-relative yoo-video-flex"},e,{contentEditable:!1},{children:[d("button",Object.assign({type:"button",className:"yoopta-button yoo-video-p-[12px_36px_12px_12px] yoo-video-flex yoo-video-items-center yoo-video-text-left yoo-video-w-full yoo-video-overflow-hidden yoo-video-rounded-[3px] yoo-video-text-[14px] yoo-video-text-[rgba(55,53,47,0.65)] yoo-video-relative yoo-video-cursor-pointer yoo-video-border-none yoo-video-bg-[#efefef] yoo-video-transition-[background-color_100ms_ease-in] hover:yoo-video-bg-[#e3e3e3]",onClick:()=>n(!0),disabled:r,ref:a.setReference},{children:[c(r?Lt:bt,{className:"yoo-video-mr-2 yoo-video-user-select-none",width:24,height:24}),c("span",Object.assign({className:"yoo-video-font-medium"},{children:r?"Loading...":"Click to add video"})),r&&c("div",{className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-h-full yoo-video-bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),i&&c(Ot,{blockId:o,floatingStyles:l,refs:a,onClose:()=>n(!1),onSetLoading:e=>s(e)}),t]}))};var Nt;function Et(){return Et=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},Et.apply(this,arguments)}var Mt,Wt=function(e){return h.createElement("svg",Et({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"checkmark_svg__lucide checkmark_svg__lucide-check"},e),Nt||(Nt=h.createElement("path",{d:"M20 6 9 17l-5-5"})))};function Bt(){return Bt=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},Bt.apply(this,arguments)}var Pt=function(e){return h.createElement("svg",Bt({viewBox:"0 0 16 16",style:{width:16,height:16,display:"block",fill:"rgba(55,53,47,.85)",flexShrink:0}},e),Mt||(Mt=h.createElement("path",{d:"M8.215 15.126c3.862 0 7.061-3.192 7.061-7.062 0-3.862-3.199-7.061-7.068-7.061-3.862 0-7.055 3.2-7.055 7.061 0 3.87 3.2 7.062 7.062 7.062zm0-1.388a5.654 5.654 0 0 1-5.667-5.674 5.642 5.642 0 0 1 5.66-5.667 5.66 5.66 0 0 1 5.68 5.667 5.66 5.66 0 0 1-5.673 5.674zm0-9.174c-.342 0-.602.247-.602.588v3.234l.062 1.401-.622-.766-.766-.8a.557.557 0 0 0-.41-.177.54.54 0 0 0-.56.547c0 .164.054.3.163.41l2.256 2.283c.15.157.294.226.479.226.191 0 .335-.075.485-.226l2.256-2.283a.557.557 0 0 0 .164-.41.539.539 0 0 0-.56-.547.523.523 0 0 0-.41.178l-.766.793-.622.779.054-1.408V5.152c0-.341-.253-.588-.601-.588z"})))};const{ExtendedBlockActions:Ht,BlockOptionsMenuGroup:At,BlockOptionsMenuItem:Tt,BlockOptionsSeparator:Ft}=i,Vt=({editor:e,block:o,props:i})=>{var n;const r=!!(null===(n=null==i?void 0:i.provider)||void 0===n?void 0:n.id);return d(Ht,Object.assign({onClick:()=>e.setSelection([o.meta.order]),id:"yoopta-video-options"},{children:[c(Ft,{}),!r&&d(At,{children:[c(Tt,{children:d("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-video-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"video",props:{fit:"contain"}})}},{children:[d("span",Object.assign({className:"yoo-video-flex"},{children:[c(yt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Fit"]})),"contain"===(null==i?void 0:i.fit)&&c(Wt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4"})]}))}),c(Tt,{children:d("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-video-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"video",props:{fit:"fill"}})}},{children:[d("span",Object.assign({className:"yoo-video-flex"},{children:[c(Ct,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Fill"]})),"fill"===(null==i?void 0:i.fit)&&c(Wt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4"})]}))}),c(Tt,{children:d("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-video-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"video",props:{fit:"cover"}})}},{children:[d("span",Object.assign({className:"yoo-video-flex"},{children:[c(mt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Cover"]})),"cover"===(null==i?void 0:i.fit)&&c(Wt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4"})]}))})]}),c(Ft,{}),c(At,{children:c(Tt,{children:c("button",Object.assign({type:"button",className:"yoopta-button yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:r?()=>{var e,t;(null===(e=null==i?void 0:i.provider)||void 0===e?void 0:e.url)&&window.open(null===(t=null==i?void 0:i.provider)||void 0===t?void 0:t.url,"_blank")}:()=>{if(!i||!i.src||r)return;const e=document.createElement("a");e.href=i.src,e.download=i.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:d(p,r?{children:[c(ft,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}:{children:[c(Pt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Download"]})}))})})]}))},Dt=({position:e})=>c("div",Object.assign({contentEditable:!1,className:"yoo-video-absolute yoo-video-pointer-events-none yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-z-10 yoo-video-opacity-1 yoo-video-h-full yoo-video-w-[15px] yoo-video-cursor-col-resize yoo-video-transition-opacity yoo-video-duration-150 yoo-video-ease-in "+("left"===e?"yoo-video-left-0 yoo-video-top-0":"yoo-video-right-0 yoo-video-top-0")},{children:c("div",{className:"yoo-video-opacity-100 yoo-video-transition-opacity yoo-video-duration-300 yoo-video-ease-in yoo-video-rounded-[20px] yoo-video-bg-[rgba(15,15,15,0.6)] yoo-video-border yoo-video-border-solid yoo-video-border-[rgba(255,255,255,0.9)] yoo-video-w-[6px] yoo-video-h-[48px] yoo-video-max-h-[50%] yoo-video-shadow-[0_0_0_.5px_#FFF]"})})),It=new a({type:"Video",elements:{video:{render:({element:i,attributes:a,children:l,blockId:p})=>{const{src:h,srcSet:v,bgColor:y,settings:g,sizes:m,poster:b,provider:x,fit:C}=i.props||{},z=n(p),_=e(),S=o("Video"),k=r(),[O,L]=u({width:(null==m?void 0:m.width)||750,height:(null==m?void 0:m.height)||440});f((()=>L({width:(null==m?void 0:m.width)||650,height:(null==m?void 0:m.height)||440})),[i.props]);const j=s({blockId:p}),N=w((()=>{var e,o;return{minWidth:300,size:{width:O.width,height:O.height},maxWidth:(null===(e=null==S?void 0:S.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(o=null==S?void 0:S.maxSizes)||void 0===o?void 0:o.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!k,right:!k},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{L({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,o,i)=>{t.updateElement(_,p,{type:"video",props:{sizes:{width:i.offsetWidth,height:i.offsetHeight}}})},handleComponent:{left:c(Dt,{position:"left"}),right:c(Dt,{position:"right"})}}}),[O.width,O.height]);return h?c("div",Object.assign({contentEditable:!1,draggable:!1,className:"yoo-video-mt-4 yoo-video-relative yoopta-video"},a,{children:d(Y,Object.assign({},N,{className:"yoo-video-mx-auto yoo-video-my-0 yoo-video-flex"},{children:[j&&c("div",{className:"yoo-video-absolute yoo-video-pointer-events-none yoo-video-inset-0 yoo-video-bg-[rgba(35,131,226,0.14)] yoo-video-z-[81] yoo-video-rounded-[3px] yoo-video-opacity-100 yoo-video-transition-opacity yoo-video-duration-150 yoo-video-ease-in"}),c(R,{src:h,srcSet:v,width:null==O?void 0:O.width,settings:g,bgColor:y,height:null==O?void 0:O.height,poster:b,provider:x,fit:C}),!k&&c(Vt,{block:z,editor:_,settings:g,props:i.props}),l]}))})):c(jt,Object.assign({attributes:a,blockId:p},{children:l}))},props:{src:null,srcSet:null,bgColor:null,sizes:{width:650,height:400},nodeType:"void",provider:{type:null,id:""},settings:{controls:!1,loop:!0,muted:!0,autoPlay:!0}}}},options:{accept:"video/*",maxSizes:{maxWidth:650,maxHeight:550},onUpload:()=>z(void 0,void 0,void 0,(function*(){return Promise.resolve({src:""})})),display:{title:"Video",description:"Upload from device, embed from Youtube, Vimeo"}},parsers:{html:{deserialize:{nodeNames:["VIDEO"],parse:e=>{if("VIDEO"===e.nodeName){const t={src:e.getAttribute("src"),srcSet:e.getAttribute("srcset"),bgColor:e.getAttribute("bgcolor"),sizes:{width:e.getAttribute("width"),height:e.getAttribute("height")},settings:{controls:!!e.getAttribute("controls"),loop:!!e.getAttribute("loop"),muted:!!e.getAttribute("muted"),autoPlay:!!e.getAttribute("autoplay")}};return{id:l(),type:"video",children:[{text:""}],props:t}}}}}}});!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-video-pointer-events-none{pointer-events:none}.yoo-video-invisible{visibility:hidden}.yoo-video-absolute{position:absolute}.yoo-video-relative{position:relative}.yoo-video-inset-0{inset:0}.yoo-video-left-0{left:0}.yoo-video-right-0{right:0}.yoo-video-top-0{top:0}.yoo-video-z-10{z-index:10}.yoo-video-z-\\[100\\]{z-index:100}.yoo-video-z-\\[81\\]{z-index:81}.yoo-video-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-video-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-video-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-video-mx-auto{margin-left:auto;margin-right:auto}.yoo-video-my-0{margin-bottom:0;margin-top:0}.yoo-video-ml-\\[12px\\]{margin-left:12px}.yoo-video-mr-2{margin-right:.5rem}.yoo-video-mr-\\[12px\\]{margin-right:12px}.yoo-video-mt-4{margin-top:1rem}.yoo-video-mt-\\[4px\\]{margin-top:4px}.yoo-video-flex{display:flex}.yoo-video-inline-flex{display:inline-flex}.yoo-video-h-4{height:1rem}.yoo-video-h-\\[28px\\]{height:28px}.yoo-video-h-\\[32px\\]{height:32px}.yoo-video-h-\\[40px\\]{height:40px}.yoo-video-h-\\[48px\\]{height:48px}.yoo-video-h-full{height:100%}.yoo-video-max-h-\\[420px\\]{max-height:420px}.yoo-video-max-h-\\[50\\%\\]{max-height:50%}.yoo-video-w-4{width:1rem}.yoo-video-w-\\[15px\\]{width:15px}.yoo-video-w-\\[6px\\]{width:6px}.yoo-video-w-full{width:100%}.yoo-video-min-w-0{min-width:0}.yoo-video-min-w-\\[540px\\]{min-width:540px}.yoo-video-max-w-\\[300px\\]{max-width:300px}.yoo-video-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-video-flex-shrink-0{flex-shrink:0}@keyframes yoo-video-spin{to{transform:rotate(1turn)}}.yoo-video-animate-spin{animation:yoo-video-spin 1s linear infinite}.yoo-video-cursor-col-resize{cursor:col-resize}.yoo-video-cursor-pointer{cursor:pointer}.yoo-video-cursor-text{cursor:text}.yoo-video-flex-col{flex-direction:column}.yoo-video-items-center{align-items:center}.yoo-video-justify-start{justify-content:flex-start}.yoo-video-justify-center{justify-content:center}.yoo-video-justify-between{justify-content:space-between}.yoo-video-overflow-hidden{overflow:hidden}.yoo-video-whitespace-nowrap{white-space:nowrap}.yoo-video-rounded-\\[20px\\]{border-radius:20px}.yoo-video-rounded-\\[3px\\]{border-radius:3px}.yoo-video-rounded-\\[4px\\]{border-radius:4px}.yoo-video-rounded-sm{border-radius:.125rem}.yoo-video-border{border-width:1px}.yoo-video-border-solid{border-style:solid}.yoo-video-border-none{border-style:none}.yoo-video-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-video-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}.yoo-video-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-video-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-video-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-video-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-video-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-video-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-video-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}.yoo-video-bg-inherit{background-color:inherit}.yoo-video-fill-white{fill:#fff}.yoo-video-object-cover{-o-object-fit:cover;object-fit:cover}.yoo-video-p-\\[0_8px\\]{padding:0 8px}.yoo-video-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-video-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-video-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-video-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-video-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-video-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-video-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-video-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-video-pb-\\[6px\\]{padding-bottom:6px}.yoo-video-pt-\\[6px\\]{padding-top:6px}.yoo-video-text-left{text-align:left}.yoo-video-text-\\[14px\\]{font-size:14px}.yoo-video-font-medium{font-weight:500}.yoo-video-leading-\\[1\\.2\\]{line-height:1.2}.yoo-video-leading-\\[120\\%\\]{line-height:120%}.yoo-video-leading-\\[20px\\]{line-height:20px}.yoo-video-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-video-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-video-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-video-opacity-100{opacity:1}.yoo-video-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-video-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-video-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-video-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-video-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-video-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-video-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-duration-150{transition-duration:.15s}.yoo-video-duration-300{transition-duration:.3s}.yoo-video-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-video .yoopta-video-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-video:hover .yoopta-video-options{opacity:1}.hover\\:yoo-video-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-video-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-video-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-video-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{It as default};
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedUploader.d.ts","sourceRoot":"","sources":["../../src/ui/EmbedUploader.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa;;;6CA2ClB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"EmbedUploader.d.ts","sourceRoot":"","sources":["../../src/ui/EmbedUploader.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa;;;6CA8ClB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../src/ui/FileUploader.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,YAAY,+CAA4D,KAAK,4CAkDlF,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../src/ui/FileUploader.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,YAAY,+CAA4D,KAAK,4CAqDlF,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../src/ui/Video.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,wBAAwB,EAMzB,MAAM,gBAAgB,CAAC;AAQxB,QAAA,MAAM,WAAW,+CAAgD,wBAAwB,4CA0FxF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../src/ui/Video.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,wBAAwB,EAMzB,MAAM,gBAAgB,CAAC;AAQxB,QAAA,MAAM,WAAW,+CAAgD,wBAAwB,4CA6FxF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VideoBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/VideoBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAuB,MAAM,UAAU,CAAC;AAMlE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC1C,CAAC;AAEF,QAAA,MAAM,iBAAiB,yCAA0C,KAAK,4CAmGrE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"VideoBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/VideoBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAuB,MAAM,UAAU,CAAC;AAMlE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC1C,CAAC;AAEF,QAAA,MAAM,iBAAiB,yCAA0C,KAAK,4CA4GrE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/video",
3
- "version": "4.5.0-alpha.2",
3
+ "version": "4.5.0-alpha.3",
4
4
  "description": "Video plugin for Yoopta Editor",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
@@ -39,5 +39,5 @@
39
39
  "@radix-ui/react-icons": "^1.3.0",
40
40
  "re-resizable": "^6.9.11"
41
41
  },
42
- "gitHead": "8624ba9cc43c7262dd20e7d113e35989d027a448"
42
+ "gitHead": "28c70e71798d0d4dc176bbcf3a4b1082e7b4295b"
43
43
  }