HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/adspray/wp-content/plugins/lazy-blocks/build/control-radio.js
(()=>{var e={1991:(e,t)=>{var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty,r=/\s+/;function o(e,o){if(o){var i=typeof o;"string"===i?function(e,t){for(var n=t.split(r),o=n.length,i=0;i<o;++i)e[n[i]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===i?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,o):"number"===i&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=new e;t(i,r);var a=[];for(var l in i)i[l]&&a.push(l);return a.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.hooks,r=window.wp.components;var o=n(1991),i=n.n(o),a=["label","help","className","children"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e){var t=e.label,n=e.help,r=e.className,o=e.children,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a);return wp.element.createElement("div",l({},c,{className:i()("lazyblocks-component-base-control",r)}),t?wp.element.createElement("div",{className:"lazyblocks-component-base-control__label"},t):null,o,n?wp.element.createElement("div",{className:"lazyblocks-component-base-control__help"},n):null)}const s=window.React;var u=n.n(s);const d=window.ReactDOM,f="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function p(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function v(e){return"nodeType"in e}function h(e){var t,n;return e?p(e)?e:v(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function g(e){const{Document:t}=h(e);return e instanceof t}function b(e){return!p(e)&&e instanceof h(e).HTMLElement}function m(e){return e instanceof h(e).SVGElement}function y(e){return e?p(e)?e.document:v(e)?g(e)?e:b(e)||m(e)?e.ownerDocument:document:document:document}const w=f?s.useLayoutEffect:s.useEffect;function x(e){const t=(0,s.useRef)(e);return w((()=>{t.current=e})),(0,s.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function E(e,t){void 0===t&&(t=[e]);const n=(0,s.useRef)(e);return w((()=>{n.current!==e&&(n.current=e)}),t),n}function C(e,t){const n=(0,s.useRef)();return(0,s.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function D(e){const t=x(e),n=(0,s.useRef)(null),r=(0,s.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function O(e){const t=(0,s.useRef)();return(0,s.useEffect)((()=>{t.current=e}),[e]),t.current}let R={};function S(e,t){return(0,s.useMemo)((()=>{if(t)return t;const n=null==R[e]?0:R[e]+1;return R[e]=n,e+"-"+n}),[e,t])}function M(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const k=M(1),I=M(-1);function N(e){if(!e)return!1;const{KeyboardEvent:t}=h(e.target);return t&&e instanceof t}function j(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=h(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const P=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[P.Translate.toString(e),P.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),A="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function T(e){return e.matches(A)?e:e.querySelector(A)}const z={display:"none"};function L(e){let{id:t,value:n}=e;return u().createElement("div",{id:t,style:z},n)}function _(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return u().createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const B=(0,s.createContext)(null),F={draggable:"\n    To pick up a draggable item, press the space bar.\n    While dragging, use the arrow keys to move the item.\n    Press space again to drop the item in its new position, or press escape to cancel.\n  "},U={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function H(e){let{announcements:t=U,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=F}=e;const{announce:i,announcement:a}=function(){const[e,t]=(0,s.useState)("");return{announce:(0,s.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),l=S("DndLiveRegion"),[c,f]=(0,s.useState)(!1);if((0,s.useEffect)((()=>{f(!0)}),[]),function(e){const t=(0,s.useContext)(B);(0,s.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,s.useMemo)((()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}})),[i,t])),!c)return null;const p=u().createElement(u().Fragment,null,u().createElement(L,{id:r,value:o.draggable}),u().createElement(_,{id:l,announcement:a}));return n?(0,d.createPortal)(p,n):p}var V;function Y(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(V||(V={}));const X=Object.freeze({x:0,y:0});function K(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function W(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Z(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const q=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Z(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=(a=Z(r),l=o,Math.sqrt(Math.pow(a.x-l.x,2)+Math.pow(a.y-l.y,2)));i.push({id:t,data:{droppableContainer:e,value:n}})}}var a,l;return i.sort(K)};function J(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const G=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=J(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(W)};function $(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:X}function Q(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const ee=Q(1);const te={ignoreTransform:!1};function ne(e,t){void 0===t&&(t=te);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=h(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,c=e.left-a-(1-o)*parseFloat(n),s=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:s,right:c+u,bottom:s+d,left:c}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:l,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:l,right:c}}function re(e){return ne(e,{ignoreTransform:!0})}function oe(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(g(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!b(o)||m(o))return n;if(n.includes(o))return n;const i=h(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=h(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=h(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function ie(e){const[t]=oe(e,1);return null!=t?t:null}function ae(e){return f&&e?p(e)?e:v(e)?g(e)||e===y(e).scrollingElement?window:b(e)?e:null:null:null}function le(e){return p(e)?e.scrollX:e.scrollLeft}function ce(e){return p(e)?e.scrollY:e.scrollTop}function se(e){return{x:le(e),y:ce(e)}}var ue;function de(e){return!(!f||!e)&&e===document.scrollingElement}function fe(e){const t={x:0,y:0},n=de(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(ue||(ue={}));const pe={x:.2,y:.2};function ve(e,t,n,r,o){let{top:i,left:a,right:l,bottom:c}=n;void 0===r&&(r=10),void 0===o&&(o=pe);const{isTop:s,isBottom:u,isLeft:d,isRight:f}=fe(e),p={x:0,y:0},v={x:0,y:0},h=t.height*o.y,g=t.width*o.x;return!s&&i<=t.top+h?(p.y=ue.Backward,v.y=r*Math.abs((t.top+h-i)/h)):!u&&c>=t.bottom-h&&(p.y=ue.Forward,v.y=r*Math.abs((t.bottom-h-c)/h)),!f&&l>=t.right-g?(p.x=ue.Forward,v.x=r*Math.abs((t.right-g-l)/g)):!d&&a<=t.left+g&&(p.x=ue.Backward,v.x=r*Math.abs((t.left+g-a)/g)),{direction:p,speed:v}}function he(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ge(e){return e.reduce(((e,t)=>k(e,se(t))),X)}const be=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+le(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+ce(t)),0)}]];class me{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=oe(t),r=ge(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of be)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ye{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function we(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var xe,Ee,Ce;function De(e){e.preventDefault()}function Oe(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(xe||(xe={})),(Ce=Ee||(Ee={})).Space="Space",Ce.Down="ArrowDown",Ce.Right="ArrowRight",Ce.Left="ArrowLeft",Ce.Up="ArrowUp",Ce.Esc="Escape",Ce.Enter="Enter";const Re={start:[Ee.Space,Ee.Enter],cancel:[Ee.Esc],end:[Ee.Space,Ee.Enter]},Se=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ee.Right:return{...n,x:n.x+25};case Ee.Left:return{...n,x:n.x-25};case Ee.Down:return{...n,y:n.y+25};case Ee.Up:return{...n,y:n.y-25}}};class Me{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ye(y(t)),this.windowListeners=new ye(h(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xe.Resize,this.handleCancel),this.windowListeners.add(xe.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(xe.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=ne),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);ie(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(X)}handleKeyDown(e){if(N(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=Re,coordinateGetter:i=Se,scrollBehavior:a="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,s=c?{x:c.left,y:c.top}:X;this.referenceCoordinates||(this.referenceCoordinates=s);const u=i(e,{active:t,context:n.current,currentCoordinates:s});if(u){const t=I(u,s),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:l,isLeft:c,isBottom:s,maxScroll:d,minScroll:f}=fe(n),p=he(n),v={x:Math.min(o===Ee.Right?p.right-p.width/2:p.right,Math.max(o===Ee.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(o===Ee.Down?p.bottom-p.height/2:p.bottom,Math.max(o===Ee.Down?p.top:p.top+p.height/2,u.y))},h=o===Ee.Right&&!l||o===Ee.Left&&!c,g=o===Ee.Down&&!s||o===Ee.Up&&!i;if(h&&v.x!==u.x){const e=n.scrollLeft+t.x,i=o===Ee.Right&&e<=d.x||o===Ee.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Ee.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(g&&v.y!==u.y){const e=n.scrollTop+t.y,i=o===Ee.Down&&e<=d.y||o===Ee.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Ee.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,k(I(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ke(e){return Boolean(e&&"distance"in e)}function Ie(e){return Boolean(e&&"delay"in e)}Me.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Re,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class Ne{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=h(e);return e instanceof t?e:y(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=y(i),this.documentListeners=new ye(this.document),this.listeners=new ye(n),this.windowListeners=new ye(h(i)),this.initialCoordinates=null!=(r=j(o))?r:X,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(xe.Resize,this.handleCancel),this.windowListeners.add(xe.DragStart,De),this.windowListeners.add(xe.VisibilityChange,this.handleCancel),this.windowListeners.add(xe.ContextMenu,De),this.documentListeners.add(xe.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ie(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(ke(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(xe.Click,Oe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xe.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const l=null!=(t=j(e))?t:X,c=I(r,l);if(!n&&a){if(ke(a)){if(null!=a.tolerance&&we(c,a.tolerance))return this.handleCancel();if(we(c,a.distance))return this.handleStart()}return Ie(a)&&we(c,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Ee.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const je={move:{name:"pointermove"},end:{name:"pointerup"}};class Pe extends Ne{constructor(e){const{event:t}=e,n=y(t.target);super(e,je,n)}}Pe.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const Ae={move:{name:"mousemove"},end:{name:"mouseup"}};var Te;!function(e){e[e.RightClick=2]="RightClick"}(Te||(Te={})),class extends Ne{constructor(e){super(e,Ae,y(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Te.RightClick&&(null==r||r({event:n}),!0)}}];const ze={move:{name:"touchmove"},end:{name:"touchend"}};var Le,_e;(class extends Ne{constructor(e){super(e,ze)}static setup(){return window.addEventListener(ze.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ze.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Le||(Le={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(_e||(_e={}));const Be={x:{[ue.Backward]:!1,[ue.Forward]:!1},y:{[ue.Backward]:!1,[ue.Forward]:!1}};var Fe,Ue;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Fe||(Fe={})),function(e){e.Optimized="optimized"}(Ue||(Ue={}));const He=new Map;function Ve(e,t){return C((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ye(e){let{callback:t,disabled:n}=e;const r=x(t),o=(0,s.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,s.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}function Xe(e){return new me(ne(e),e)}function Ke(e,t,n){void 0===t&&(t=Xe);const[r,o]=(0,s.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),i=function(e){let{callback:t,disabled:n}=e;const r=x(t),o=(0,s.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,s.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),a=Ye({callback:o});return w((()=>{o(),e?(null==a||a.observe(e),null==i||i.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==i||i.disconnect())}),[e]),r}const We=[];function Ze(e,t){void 0===t&&(t=[]);const n=(0,s.useRef)(null);return(0,s.useEffect)((()=>{n.current=null}),t),(0,s.useEffect)((()=>{const t=e!==X;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?I(e,n.current):X}function qe(e){return(0,s.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Je=[];const Ge=[{sensor:Pe,options:{}},{sensor:Me,options:{}}],$e={current:{}},Qe={draggable:{measure:re},droppable:{measure:re,strategy:Fe.WhileDragging,frequency:Ue.Optimized},dragOverlay:{measure:ne}};class et extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const tt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new et,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Y},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Qe,measureDroppableContainers:Y,windowRect:null,measuringScheduled:!1},nt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Y,draggableNodes:new Map,over:null,measureDroppableContainers:Y},rt=(0,s.createContext)(nt),ot=(0,s.createContext)(tt);function it(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new et}}}function at(e,t){switch(t.type){case V.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case V.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case V.DragEnd:case V.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case V.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new et(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case V.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new et(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case V.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new et(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function lt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,s.useContext)(rt),i=O(r),a=O(null==n?void 0:n.id);return(0,s.useEffect)((()=>{if(!t&&!r&&i&&null!=a){if(!N(i))return;if(document.activeElement===i.target)return;const e=o.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=T(e);if(t){t.focus();break}}}))}}),[r,t,o,a,i]),null}const ct=(0,s.createContext)({...X,scaleX:1,scaleY:1});var st;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(st||(st={}));const ut=(0,s.memo)((function(e){var t,n,r,o;let{id:i,accessibility:a,autoScroll:l=!0,children:c,sensors:p=Ge,collisionDetection:v=G,measuring:g,modifiers:m,...y}=e;const x=(0,s.useReducer)(at,void 0,it),[R,M]=x,[I,N]=function(){const[e]=(0,s.useState)((()=>new Set)),t=(0,s.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]),n=(0,s.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]);return[n,t]}(),[P,A]=(0,s.useState)(st.Uninitialized),T=P===st.Initialized,{draggable:{active:z,nodes:L,translate:_},droppable:{containers:F}}=R,U=z?L.get(z):null,Y=(0,s.useRef)({initial:null,translated:null}),K=(0,s.useMemo)((()=>{var e;return null!=z?{id:z,data:null!=(e=null==U?void 0:U.data)?e:$e,rect:Y}:null}),[z,U]),W=(0,s.useRef)(null),[Z,q]=(0,s.useState)(null),[J,Q]=(0,s.useState)(null),te=E(y,Object.values(y)),re=S("DndDescribedBy",i),le=(0,s.useMemo)((()=>F.getEnabled()),[F]),ce=(fe=g,(0,s.useMemo)((()=>({draggable:{...Qe.draggable,...null==fe?void 0:fe.draggable},droppable:{...Qe.droppable,...null==fe?void 0:fe.droppable},dragOverlay:{...Qe.dragOverlay,...null==fe?void 0:fe.dragOverlay}})),[null==fe?void 0:fe.draggable,null==fe?void 0:fe.droppable,null==fe?void 0:fe.dragOverlay]));var fe;const{droppableRects:pe,measureDroppableContainers:he,measuringScheduled:be}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=(0,s.useState)(null),{frequency:l,measure:c,strategy:u}=o,d=(0,s.useRef)(e),f=function(){switch(u){case Fe.Always:return!1;case Fe.BeforeDragging:return n;default:return!n}}(),p=E(f),v=(0,s.useCallback)((function(e){void 0===e&&(e=[]),p.current||a((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[p]),h=(0,s.useRef)(null),g=C((t=>{if(f&&!n)return He;if(!t||t===He||d.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new me(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,i,n,f,c]);return(0,s.useEffect)((()=>{d.current=e}),[e]),(0,s.useEffect)((()=>{f||v()}),[n,f]),(0,s.useEffect)((()=>{i&&i.length>0&&a(null)}),[JSON.stringify(i)]),(0,s.useEffect)((()=>{f||"number"!=typeof l||null!==h.current||(h.current=setTimeout((()=>{v(),h.current=null}),l))}),[l,f,v,...r]),{droppableRects:g,measureDroppableContainers:v,measuringScheduled:null!=i}}(le,{dragging:T,dependencies:[_.x,_.y],config:ce.droppable}),ye=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return C((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(L,z),we=(0,s.useMemo)((()=>J?j(J):null),[J]),xe=function(){const e=!1===(null==Z?void 0:Z.autoScrollEnabled),t="object"==typeof l?!1===l.enabled:!1===l,n=T&&!e&&!t;return"object"==typeof l?{...l,enabled:n}:{enabled:n}}(),Ee=function(e,t){return Ve(e,t)}(ye,ce.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=(0,s.useRef)(!1),{x:a,y:l}="boolean"==typeof o?{x:o,y:o}:o;w((()=>{if(!a&&!l||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=$(n(e),r);if(a||(o.x=0),l||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=ie(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,a,l,r,n])}({activeNode:z?L.get(z):null,config:xe.layoutShiftCompensation,initialRect:Ee,measure:ce.draggable.measure});const Ce=Ke(ye,ce.draggable.measure,Ee),De=Ke(ye?ye.parentElement:null),Oe=(0,s.useRef)({activatorEvent:null,active:null,activeNode:ye,collisionRect:null,collisions:null,droppableRects:pe,draggableNodes:L,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Re=F.getNodeFor(null==(t=Oe.current.over)?void 0:t.id),Se=function(e){let{measure:t}=e;const[n,r]=(0,s.useState)(null),o=Ye({callback:(0,s.useCallback)((e=>{for(const{target:n}of e)if(b(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),i=(0,s.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return b(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)}),[t,o]),[a,l]=D(i);return(0,s.useMemo)((()=>({nodeRef:a,rect:n,setRef:l})),[n,a,l])}({measure:ce.dragOverlay.measure}),Me=null!=(n=Se.nodeRef.current)?n:ye,ke=T?null!=(r=Se.rect)?r:Ce:null,Ie=Boolean(Se.nodeRef.current&&Se.rect),Ne=$(je=Ie?null:Ce,Ve(je));var je;const Pe=qe(Me?h(Me):null),Ae=function(e){const t=(0,s.useRef)(e),n=C((n=>e?n&&n!==We&&e&&t.current&&e.parentNode===t.current.parentNode?n:oe(e):We),[e]);return(0,s.useEffect)((()=>{t.current=e}),[e]),n}(T?null!=Re?Re:ye:null),Te=function(e,t){void 0===t&&(t=ne);const[n]=e,r=qe(n?h(n):null),[o,i]=(0,s.useReducer)((function(){return e.length?e.map((e=>de(e)?r:new me(t(e),e))):Je}),Je),a=Ye({callback:i});return e.length>0&&o===Je&&i(),w((()=>{e.length?e.forEach((e=>null==a?void 0:a.observe(e))):(null==a||a.disconnect(),i())}),[e]),o}(Ae),ze=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(m,{transform:{x:_.x-Ne.x,y:_.y-Ne.y,scaleX:1,scaleY:1},activatorEvent:J,active:K,activeNodeRect:Ce,containerNodeRect:De,draggingNodeRect:ke,over:Oe.current.over,overlayNodeRect:Se.rect,scrollableAncestors:Ae,scrollableAncestorRects:Te,windowRect:Pe}),Ue=we?k(we,_):null,Xe=function(e){const[t,n]=(0,s.useState)(null),r=(0,s.useRef)(e),o=(0,s.useCallback)((e=>{const t=ae(e.target);t&&n((e=>e?(e.set(t,se(t)),new Map(e)):null))}),[]);return(0,s.useEffect)((()=>{const t=r.current;if(e!==t){i(t);const a=e.map((e=>{const t=ae(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,se(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach((e=>{const t=ae(e);null==t||t.removeEventListener("scroll",o)}))}}),[o,e]),(0,s.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>k(e,t)),X):ge(e):X),[e,t])}(Ae),et=Ze(Xe),tt=Ze(Xe,[Ce]),nt=k(ze,et),ut=ke?ee(ke,ze):null,dt=K&&ut?v({active:K,collisionRect:ut,droppableRects:pe,droppableContainers:le,pointerCoordinates:Ue}):null,ft=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n.id}(dt),[pt,vt]=(0,s.useState)(null),ht=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Ie?ze:k(ze,tt),null!=(o=null==pt?void 0:pt.rect)?o:null,Ce),gt=(0,s.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==W.current)return;const o=L.get(W.current);if(!o)return;const i=e.nativeEvent,a=new n({active:W.current,activeNode:o,event:i,options:r,context:Oe,onStart(e){const t=W.current;if(null==t)return;const n=L.get(t);if(!n)return;const{onDragStart:r}=te.current,o={active:{id:t,data:n.data,rect:Y}};(0,d.unstable_batchedUpdates)((()=>{null==r||r(o),A(st.Initializing),M({type:V.DragStart,initialCoordinates:e,active:t}),I({type:"onDragStart",event:o})}))},onMove(e){M({type:V.DragMove,coordinates:e})},onEnd:l(V.DragEnd),onCancel:l(V.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=Oe.current;let a=null;if(t&&o){const{cancelDrop:l}=te.current;a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===V.DragEnd&&"function"==typeof l&&await Promise.resolve(l(a))&&(e=V.DragCancel)}W.current=null,(0,d.unstable_batchedUpdates)((()=>{M({type:e}),A(st.Uninitialized),vt(null),q(null),Q(null);const t=e===V.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=te.current[t];null==e||e(a),I({type:t,event:a})}}))}}(0,d.unstable_batchedUpdates)((()=>{q(a),Q(e.nativeEvent)}))}),[L]),bt=(0,s.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=L.get(r);if(null!==W.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},W.current=r,gt(n,t))}),[L,gt]),mt=function(e,t){return(0,s.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(p,bt);!function(e){(0,s.useEffect)((()=>{if(!f)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(p),w((()=>{Ce&&P===st.Initializing&&A(st.Initialized)}),[Ce,P]),(0,s.useEffect)((()=>{const{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:r,over:o}=Oe.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:nt.x,y:nt.y},over:o};(0,d.unstable_batchedUpdates)((()=>{null==e||e(i),I({type:"onDragMove",event:i})}))}),[nt.x,nt.y]),(0,s.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=Oe.current;if(!e||null==W.current||!t||!o)return;const{onDragOver:i}=te.current,a=r.get(ft),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};(0,d.unstable_batchedUpdates)((()=>{vt(l),null==i||i(c),I({type:"onDragOver",event:c})}))}),[ft]),w((()=>{Oe.current={activatorEvent:J,active:K,activeNode:ye,collisionRect:ut,collisions:dt,droppableRects:pe,draggableNodes:L,draggingNode:Me,draggingNodeRect:ke,droppableContainers:F,over:pt,scrollableAncestors:Ae,scrollAdjustedTranslate:nt},Y.current={initial:ke,translated:ut}}),[K,ye,dt,ut,L,Me,ke,pe,F,pt,Ae,nt]),function(e){let{acceleration:t,activator:n=Le.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:l=_e.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e;const v=function(e){let{delta:t,disabled:n}=e;const r=O(t);return C((e=>{if(n||!r||!e)return Be;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[ue.Backward]:e.x[ue.Backward]||-1===o,[ue.Forward]:e.x[ue.Forward]||1===o},y:{[ue.Backward]:e.y[ue.Backward]||-1===i,[ue.Forward]:e.y[ue.Forward]||1===i}}}),[n,t,r])}({delta:f,disabled:!i}),[h,g]=function(){const e=(0,s.useRef)(null);return[(0,s.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,s.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),b=(0,s.useRef)({x:0,y:0}),m=(0,s.useRef)({x:0,y:0}),y=(0,s.useMemo)((()=>{switch(n){case Le.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Le.DraggableRect:return o}}),[n,o,c]),w=(0,s.useRef)(null),x=(0,s.useCallback)((()=>{const e=w.current;if(!e)return;const t=b.current.x*m.current.x,n=b.current.y*m.current.y;e.scrollBy(t,n)}),[]),E=(0,s.useMemo)((()=>l===_e.TreeOrder?[...u].reverse():u),[l,u]);(0,s.useEffect)((()=>{if(i&&u.length&&y){for(const e of E){if(!1===(null==r?void 0:r(e)))continue;const n=u.indexOf(e),o=d[n];if(!o)continue;const{direction:i,speed:l}=ve(e,o,y,t,p);for(const e of["x","y"])v[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return g(),w.current=e,h(x,a),b.current=l,void(m.current=i)}b.current={x:0,y:0},m.current={x:0,y:0},g()}else g()}),[t,x,r,g,i,a,JSON.stringify(y),JSON.stringify(v),h,u,E,d,JSON.stringify(p)])}({...xe,delta:_,draggingRect:ut,pointerCoordinates:Ue,scrollableAncestors:Ae,scrollableAncestorRects:Te});const yt=(0,s.useMemo)((()=>({active:K,activeNode:ye,activeNodeRect:Ce,activatorEvent:J,collisions:dt,containerNodeRect:De,dragOverlay:Se,draggableNodes:L,droppableContainers:F,droppableRects:pe,over:pt,measureDroppableContainers:he,scrollableAncestors:Ae,scrollableAncestorRects:Te,measuringConfiguration:ce,measuringScheduled:be,windowRect:Pe})),[K,ye,Ce,J,dt,De,Se,L,F,pe,pt,he,Ae,Te,ce,be,Pe]),wt=(0,s.useMemo)((()=>({activatorEvent:J,activators:mt,active:K,activeNodeRect:Ce,ariaDescribedById:{draggable:re},dispatch:M,draggableNodes:L,over:pt,measureDroppableContainers:he})),[J,mt,K,Ce,M,re,L,pt,he]);return u().createElement(B.Provider,{value:N},u().createElement(rt.Provider,{value:wt},u().createElement(ot.Provider,{value:yt},u().createElement(ct.Provider,{value:ht},c)),u().createElement(lt,{disabled:!1===(null==a?void 0:a.restoreFocus)})),u().createElement(H,{...a,hiddenTextDescribedById:re}))})),dt=(0,s.createContext)(null),ft="button",pt="Droppable";const vt={timeout:25};function ht(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function gt(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function bt(e){return null!==e&&e>=0}const mt=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=ht(t,r,n),a=t[o],l=i[o];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},yt={scaleX:1,scaleY:1},wt=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...yt}:null}const c=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-c,...yt}:o<n&&o>=a?{x:0,y:l.height+c,...yt}:{x:0,y:0,...yt}},xt="Sortable",Et=u().createContext({activeIndex:-1,containerId:xt,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:mt,disabled:{draggable:!1,droppable:!1}});function Ct(e){let{children:t,id:n,items:r,strategy:o=mt,disabled:i=!1}=e;const{active:a,dragOverlay:l,droppableRects:c,over:d,measureDroppableContainers:f}=(0,s.useContext)(ot),p=S(xt,n),v=Boolean(null!==l.rect),h=(0,s.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),g=null!=a,b=a?h.indexOf(a.id):-1,m=d?h.indexOf(d.id):-1,y=(0,s.useRef)(h),x=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(h,y.current),E=-1!==m&&-1===b||x,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(i);w((()=>{x&&g&&f(h)}),[x,h,g,f]),(0,s.useEffect)((()=>{y.current=h}),[h]);const D=(0,s.useMemo)((()=>({activeIndex:b,containerId:p,disabled:C,disableTransforms:E,items:h,overIndex:m,useDragOverlay:v,sortedRects:gt(h,c),strategy:o})),[b,p,C.draggable,C.droppable,E,h,m,c,v,o]);return u().createElement(Et.Provider,{value:D},t)}const Dt=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return ht(n,r,o).indexOf(t)},Ot=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:c,transition:s}=e;return!(!s||!r||l!==i&&o===a||!n&&(a===o||t!==c))},Rt={duration:200,easing:"ease"},St="transform",Mt=P.Transition.toString({property:St,duration:0,easing:"linear"}),kt={roleDescription:"sortable"};function It(e){let{animateLayoutChanges:t=Ot,attributes:n,disabled:r,data:o,getNewIndex:i=Dt,id:a,strategy:l,resizeObserverConfig:c,transition:u=Rt}=e;const{items:d,containerId:f,activeIndex:p,disabled:v,disableTransforms:h,sortedRects:g,overIndex:b,useDragOverlay:m,strategy:y}=(0,s.useContext)(Et),x=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,v),C=d.indexOf(a),O=(0,s.useMemo)((()=>({sortable:{containerId:f,index:C,items:d},...o})),[f,o,C,d]),R=(0,s.useMemo)((()=>d.slice(d.indexOf(a))),[d,a]),{rect:M,node:k,isOver:I,setNodeRef:j}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=S("Droppable"),{active:a,dispatch:l,over:c,measureDroppableContainers:u}=(0,s.useContext)(rt),d=(0,s.useRef)({disabled:n}),f=(0,s.useRef)(!1),p=(0,s.useRef)(null),v=(0,s.useRef)(null),{disabled:h,updateMeasurementsFor:g,timeout:b}={...vt,...o},m=E(null!=g?g:r),y=Ye({callback:(0,s.useCallback)((()=>{f.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{u(Array.isArray(m.current)?m.current:[m.current]),v.current=null}),b)):f.current=!0}),[b]),disabled:h||!a}),x=(0,s.useCallback)(((e,t)=>{y&&(t&&(y.unobserve(t),f.current=!1),e&&y.observe(e))}),[y]),[C,O]=D(x),R=E(t);return(0,s.useEffect)((()=>{y&&C.current&&(y.disconnect(),f.current=!1,y.observe(C.current))}),[C,y]),w((()=>(l({type:V.RegisterDroppable,element:{id:r,key:i,disabled:n,node:C,rect:p,data:R}}),()=>l({type:V.UnregisterDroppable,key:i,id:r}))),[r]),(0,s.useEffect)((()=>{n!==d.current.disabled&&(l({type:V.SetDroppableDisabled,id:r,key:i,disabled:n}),d.current.disabled=n)}),[r,i,n,l]),{active:a,rect:p,isOver:(null==c?void 0:c.id)===r,node:C,over:c,setNodeRef:O}}({id:a,data:O,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:R,...c}}),{active:A,activatorEvent:T,activeNodeRect:z,attributes:L,setNodeRef:_,listeners:B,isDragging:F,over:U,setActivatorNodeRef:H,transform:Y}=function(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=S(pt),{activators:a,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=(0,s.useContext)(rt),{role:v=ft,roleDescription:h="draggable",tabIndex:g=0}=null!=o?o:{},b=(null==c?void 0:c.id)===t,m=(0,s.useContext)(b?ct:dt),[y,x]=D(),[C,O]=D(),R=function(e,t){return(0,s.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(a,t),M=E(n);return w((()=>(f.set(t,{id:t,key:i,node:y,activatorNode:C,data:M}),()=>{const e=f.get(t);e&&e.key===i&&f.delete(t)})),[f,t]),{active:c,activatorEvent:l,activeNodeRect:u,attributes:(0,s.useMemo)((()=>({role:v,tabIndex:g,"aria-disabled":r,"aria-pressed":!(!b||v!==ft)||void 0,"aria-roledescription":h,"aria-describedby":d.draggable})),[r,v,g,b,h,d.draggable]),isDragging:b,listeners:r?void 0:R,node:y,over:p,setNodeRef:x,setActivatorNodeRef:O,transform:m}}({id:a,data:O,attributes:{...kt,...n},disabled:x.draggable}),X=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}(j,_),K=Boolean(A),W=K&&!h&&bt(p)&&bt(b),Z=!m&&F,q=Z&&W?Y:null,J=W?null!=q?q:(null!=l?l:y)({rects:g,activeNodeRect:z,activeIndex:p,overIndex:b,index:C}):null,G=bt(p)&&bt(b)?i({id:a,items:d,activeIndex:p,overIndex:b}):C,$=null==A?void 0:A.id,Q=(0,s.useRef)({activeId:$,items:d,newIndex:G,containerId:f}),ee=d!==Q.current.items,te=t({active:A,containerId:f,isDragging:F,isSorting:K,id:a,index:C,items:d,newIndex:Q.current.newIndex,previousItems:Q.current.items,previousContainerId:Q.current.containerId,transition:u,wasDragging:null!=Q.current.activeId}),re=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,a]=(0,s.useState)(null),l=(0,s.useRef)(n);return w((()=>{if(!t&&n!==l.current&&r.current){const e=o.current;if(e){const t=ne(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&a(n)}}n!==l.current&&(l.current=n)}),[t,n,r,o]),(0,s.useEffect)((()=>{i&&a(null)}),[i]),i}({disabled:!te,index:C,node:k,rect:M});return(0,s.useEffect)((()=>{K&&Q.current.newIndex!==G&&(Q.current.newIndex=G),f!==Q.current.containerId&&(Q.current.containerId=f),d!==Q.current.items&&(Q.current.items=d)}),[K,G,f,d]),(0,s.useEffect)((()=>{if($===Q.current.activeId)return;if($&&!Q.current.activeId)return void(Q.current.activeId=$);const e=setTimeout((()=>{Q.current.activeId=$}),50);return()=>clearTimeout(e)}),[$]),{active:A,activeIndex:p,attributes:L,data:O,rect:M,index:C,newIndex:G,items:d,isOver:I,isSorting:K,isDragging:F,listeners:B,node:k,overIndex:b,over:U,setNodeRef:X,setActivatorNodeRef:H,setDroppableNodeRef:j,setDraggableNodeRef:_,transform:null!=re?re:J,transition:re||ee&&Q.current.newIndex===C?Mt:Z&&!N(T)||!u?void 0:K||te?P.Transition.toString({...u,property:St}):void 0}}Ee.Down,Ee.Right,Ee.Up,Ee.Left;const Nt=window.wp.compose;function jt(e){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(e)}function Pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==jt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o),"symbol"===jt(i)?i:String(i)),r)}var o,i}function At(e){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},At(e)}function Tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zt(e,t){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zt(e,t)}var Lt=function(e){function t(e,n){var r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,n){return t=At(t),function(e,t){if(t&&("object"===jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tt(e)}(e,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,n||[],At(e).constructor):t.apply(e,n))}(this,t,[e,n])).customAttach=o.customAttach.bind(Tt(o)),o.customDetach=o.customDetach.bind(Tt(o)),o.customPointerMove=o.customPointerMove.bind(Tt(o)),o.customPointerUp=o.customPointerUp.bind(Tt(o)),o.customResize=o.customResize.bind(Tt(o));var i=null==e||null===(r=e.event)||void 0===r||null===(r=r.target)||void 0===r||null===(r=r.ownerDocument)||void 0===r?void 0:r.defaultView;return i&&(o.editorIframe=i,o.customAttach()),o}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zt(e,t)}(t,e),n=t,(r=[{key:"customAttach",value:function(){this.editorIframe&&(this.editorIframe.addEventListener("pointermove",this.customPointerMove),this.editorIframe.addEventListener("pointerup",this.customPointerUp),this.editorIframe.addEventListener("resize",this.customResize))}},{key:"customDetach",value:function(){this.editorIframe&&(this.editorIframe.removeEventListener("pointermove",this.customPointerMove),this.editorIframe.removeEventListener("pointerup",this.customPointerUp),this.editorIframe.removeEventListener("resize",this.customResize))}},{key:"customPointerMove",value:function(e){this.editorIframe&&this.handleMove(e)}},{key:"customPointerUp",value:function(e){this.editorIframe&&this.handleEnd(e)}},{key:"customResize",value:function(e){this.editorIframe&&this.handleCancel(e)}},{key:"handleEnd",value:function(){var e=this.props.onEnd;this.detach(),this.customDetach(),e()}},{key:"handleCancel",value:function(){var e=this.props.onCancel;this.detach(),this.customDetach(),e()}}])&&Pt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(Pe);function _t(e){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(e)}function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){Vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ht(){return Ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ht.apply(this,arguments)}function Vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==_t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==_t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===_t(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yt=function(e){var t=e.id,n=e.values,o=e.focusInput,a=It({id:t}),l=a.attributes,c=a.listeners,s=a.setNodeRef,u=a.transform,d=a.transition,f=a.isDragging,p=a.isSorting,v={transform:P.Translate.toString(u),transition:p?d:""};return wp.element.createElement("div",{className:i()("lzb-constructor-controls-item-settings-choices-item",f?"lzb-constructor-controls-item-settings-choices-item-dragging":""),ref:s,style:v},n.map((function(t,n){return wp.element.createElement(r.TextControl,{key:t.name,placeholder:t.label,value:t.value,onChange:function(n){return e.updateChoice(Vt({},t.name,n))},autoFocus:o&&0===n})})),wp.element.createElement("div",Ht({className:"lzb-constructor-controls-item-settings-choices-item-handler"},l,c),wp.element.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M10 4.99976H8V6.99976H10V4.99976Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M10 10.9998H8V12.9998H10V10.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M10 16.9998H8V18.9998H10V16.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 4.99976H14V6.99976H16V4.99976Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 10.9998H14V12.9998H16V10.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 16.9998H14V18.9998H16V16.9998Z",fill:"currentColor"}))),wp.element.createElement("button",{className:"lzb-constructor-controls-item-settings-choices-item-remove",onClick:function(){return e.removeChoice()}},wp.element.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M6.33734 7.1706C6.23299 6.4793 6.76826 5.85717 7.4674 5.85717H16.5326C17.2317 5.85717 17.767 6.4793 17.6627 7.17061L15.9807 18.3134C15.8963 18.8724 15.416 19.2857 14.8507 19.2857H9.14934C8.58403 19.2857 8.10365 18.8724 8.01928 18.3134L6.33734 7.1706Z",stroke:"currentColor",strokeWidth:"1.71429"}),wp.element.createElement("rect",{x:"4",y:"5",width:"16",height:"2",fill:"currentColor"}),wp.element.createElement("path",{d:"M14.2857 5C14.2857 5 13.2624 5 12 5C10.7376 5 9.71428 5 9.71428 5C9.71428 3.73763 10.7376 2.71429 12 2.71429C13.2624 2.71429 14.2857 3.73763 14.2857 5Z",fill:"currentColor"}))))};function Xt(t){var n=t.value,o=void 0===n?[]:n,i=t.onChange,a=t.options,l=void 0===a?[{name:"label",label:(0,e.__)("Label","lazy-blocks")},{name:"value",label:(0,e.__)("Value","lazy-blocks")}]:a,c=t.label,u=void 0===c?(0,e.__)("Choices","lazy-blocks"):c,d=t.labelAddChoice,f=void 0===d?(0,e.__)("+ Add Choice","lazy-blocks"):d,p=t.id,v=void 0===p?"lzb-component-choices":p,h=t.help,g=(0,Nt.usePrevious)(o&&o.length),b=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}(function(e,t){return(0,s.useMemo)((()=>({sensor:e,options:{}})),[e,t])}(Lt)),m=[],y=!1;return o&&o.length&&(o.forEach((function(e,t){var n=[];l.forEach((function(t){var r;n.push({name:t.name,label:t.label,value:null!==(r=e[t.name])&&void 0!==r?r:""})})),m.push({id:t+1,values:n,removeChoice:function(){!function(e){o.splice(e,1),i(o)}(t)},updateChoice:function(e){!function(e,t){o[e]&&(o[e]=Ft(Ft({},o[e]),t),i(o))}(t,e)}})})),g<o.length&&(y=!0)),wp.element.createElement(r.BaseControl,{id:v,label:u,help:h},wp.element.createElement("div",{className:"lzb-constructor-controls-item-settings-choices"},m.length?wp.element.createElement("div",{className:"lzb-constructor-controls-item-settings-choices-items"},wp.element.createElement(ut,{sensors:b,collisionDetection:q,onDragEnd:function(e){var t,n,r,a,l,c=e.active,s=e.over;c.id!==s.id&&(t=c.id-1,n=s.id-1,r=o,a=t,l=n,function(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const r=n<0?e.length+n:n,[o]=e.splice(t,1);e.splice(r,0,o)}}(r=[...r],a,l),i(r))}},wp.element.createElement(Ct,{items:m,strategy:wt},m.map((function(e,t){return wp.element.createElement(Yt,Ht({key:"lzb-constructor-controls-item-settings-choices-item-".concat(e.id)},e,{focusInput:t+1===o.length&&y}))}))))):null,wp.element.createElement("div",null,wp.element.createElement(r.Button,{onClick:function(){return t={},l.forEach((function(e){var n;t[e.name]=null!==(n=e.defaults)&&void 0!==n?n:""})),void i([].concat((e=o,function(e){if(Array.isArray(e))return Ut(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ut(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ut(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[t]));var e,t},variant:"secondary",size:"small"},f))))}var Kt=(window.lazyblocksConstructorData||window.lazyblocksGutenberg).controls,Wt=void 0===Kt?{}:Kt;function Zt(e){return Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zt(e)}var qt=["className"];function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Zt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Zt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $t(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.className,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,qt),a=(t=e.data.type)&&Wt[t]?Wt[t]:!!Wt.undefined&&Wt.undefined,l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(n),!0).forEach((function(t){Gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({label:!!a.restrictions.label_settings&&e.data.label,help:!!a.restrictions.help_settings&&e.data.help,className:i()("lazyblocks-control lazyblocks-control-".concat(e.data.type),r),"data-lazyblocks-control-name":e.data.name},o);return l}(0,t.addFilter)("lzb.editor.control.radio.render","lzb.editor",(function(e,t){return wp.element.createElement(c,$t(t,{label:!1}),wp.element.createElement(r.RadioControl,{label:t.data.label,selected:t.getValue(),options:t.data.choices,onChange:t.onChange}))})),(0,t.addFilter)("lzb.editor.control.radio.validate","lzb.editor",(function(e,t,n){return"true"===n.allow_null?{valid:!0}:t?e:{valid:!1,message:"Please select an item in the list."}})),(0,t.addFilter)("lzb.constructor.control.radio.settings","lzb.constructor",(function(t,n){var o=n.updateData,i=n.data,a=i.choices;return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(r.PanelBody,null,wp.element.createElement(Xt,{value:a,onChange:function(e){return o({choices:e})}})),wp.element.createElement(r.PanelBody,null,wp.element.createElement(c,{id:"lazyblocks-control-radio-allow-null",label:(0,e.__)("Allow Null","lazy-blocks"),help:(0,e.__)("Allows you to reset selected option value to null","lazy-blocks")},wp.element.createElement(r.ToggleControl,{id:"lazyblocks-control-radio-allow-null",label:(0,e.__)("Yes","lazy-blocks"),checked:"true"===i.allow_null,onChange:function(e){return o({allow_null:e?"true":"false"})}}))),wp.element.createElement(r.PanelBody,null,wp.element.createElement(c,{id:"lazyblocks-control-radio-output-format",label:(0,e.__)("Output Format","lazy-blocks"),help:(0,e.__)("Allows you to change attribute output format","lazy-blocks")},wp.element.createElement(r.RadioControl,{options:[{label:(0,e.__)("Value","lazy-blocks"),value:""},{label:(0,e.__)("Label","lazy-blocks"),value:"label"},{label:(0,e.__)("Both (Array)","lazy-blocks"),value:"array"}],selected:i.output_format||"",onChange:function(e){return o({output_format:e})}}))))}))})()})();