import{d as e,i as t}from"./usePrimitiveElement-DC7UloPZ.js";import{$n as n,B as r,D as i,Ht as a,L as o,On as s,Tn as c,Zn as l,b as u,ct as d,et as f,ft as p,g as m,gn as h,k as g,mt as _,o as v,qt as y,tt as b,un as x,v as S,vn as ee,xt as C,y as w,z as T}from"./runtime-core.esm-bundler-B8D2lM98.js";import{C as te,w as E}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{b as ne,d as D,k as re,l as ie,p as ae,s as oe}from"./dist-DtGNiYlK.js";import{n as se,r as ce,t as le}from"./VisuallyHiddenInput-BMUp3blB.js";var ue=re({name:`grip-vertical`,size:24,node:[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]}),de=re({name:`heading`,size:24,node:[[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M6 20V4`,key:`1w1bmo`}],[`path`,{d:`M18 20V4`,key:`o2hl4u`}]]}),fe=re({name:`text-align-start`,size:24,node:[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]],aliases:[`text`,`align-left`]}),[pe,me]=e(`SwitchRoot`),he=g({inheritAttrs:!1,__name:`SwitchRoot`,props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:`on`},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:a}=c(n),o=ne(n,`modelValue`,r,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),l=m(()=>o.value===n.trueValue);function d(){a.value||(o.value=l.value?n.falseValue:n.trueValue)}let{forwardRef:p,currentElement:h}=ae(),g=ce(h),b=se(),x=m(()=>n.id&&h.value?document.querySelector(`[for="${n.id}"]`)?.innerText:void 0);return me({checked:l,toggleCheck:d,disabled:a}),(e,t)=>(_(),u(v,null,[i(s(D),f({id:e.id,ref:s(p),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||x.value,"aria-checked":l.value,"aria-required":e.required,"data-state":l.value?`checked`:`unchecked`,"data-disabled":s(a)?``:void 0,"as-child":e.asChild,as:e.as,disabled:s(a)},{...s(b),...e.$attrs},{onClick:d,onKeydown:te(E(d,[`prevent`]),[`enter`])}),{default:y(()=>[C(e.$slots,`default`,{modelValue:s(o),checked:l.value})]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]),s(g)&&e.name?(_(),S(s(le),f({key:0,type:`checkbox`,name:e.name,disabled:s(a),required:e.required,value:e.value,checked:l.value},s(b)),null,16,[`name`,`disabled`,`required`,`value`,`checked`])):w(`v-if`,!0)],64))}}),ge=g({__name:`SwitchThumb`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=pe();return ae(),(e,n)=>(_(),S(s(D),{"data-state":s(t).checked.value?`checked`:`unchecked`,"data-disabled":s(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:y(()=>[C(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`]))}}),_e=Object.defineProperty,ve=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,xe=(e,t,n)=>t in e?_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Se=(e,t)=>{for(var n in t||={})ye.call(t,n)&&xe(e,n,t[n]);if(ve)for(var n of ve(t))be.call(t,n)&&xe(e,n,t[n]);return e},Ce=(e,t)=>{var n={};for(var r in e)ye.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ve)for(var r of ve(e))t.indexOf(r)<0&&be.call(e,r)&&(n[r]=e[r]);return n},we=`[vue-draggable-plus]: `;function Te(e){console.warn(we+e)}function Ee(e){console.error(we+e)}function De(e,t,n){return n>=0&&nt?t.toUpperCase():``)}function ke(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[Oe(n)]=e[n]),t),{})}function Ae(e,t){return Array.isArray(e)&&e.splice(t,1),e}function je(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function Me(e){return e===void 0}function Ne(e){return typeof e==`string`}function Pe(e,t,n){let r=e.children[n];e.insertBefore(t,r)}function Fe(e){e.parentNode&&e.parentNode.removeChild(e)}function Ie(e,t=document){let n=null;return n=typeof t?.querySelector==`function`?(t?.querySelector)?.call(t,e):document.querySelector(e),n||Te(`Element not found: ${e}`),n}function Le(e,t,n=null){return function(...r){return e.apply(n,r),t.apply(n,r)}}function Re(e,t){let n=Se({},e);return Object.keys(t).forEach(r=>{n[r]?n[r]=Le(e[r],t[r]):n[r]=t[r]}),n}function ze(e){return e instanceof HTMLElement}function Be(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Ve(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}var He=Object.assign;function Ue(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 O(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function qe(e,t){if(e==null)return{};var n=Ke(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Je=`1.15.2`;function A(e){if(typeof window<`u`&&window.navigator)return!!navigator.userAgent.match(e)}var j=A(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ye=A(/Edge/i),Xe=A(/firefox/i),Ze=A(/safari/i)&&!A(/chrome/i)&&!A(/android/i),Qe=A(/iP(ad|od|hone)/i),$e=A(/chrome/i)&&A(/android/i),et={capture:!1,passive:!1};function M(e,t,n){e.addEventListener(t,n,!j&&et)}function N(e,t,n){e.removeEventListener(t,n,!j&&et)}function tt(e,t){if(t){if(t[0]===`>`&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function nt(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function P(e,t,n,r){if(e){n||=document;do{if(t!=null&&(t[0]===`>`?e.parentNode===n&&tt(e,t):tt(e,t))||r&&e===n)return e;if(e===n)break}while(e=nt(e))}return null}var rt=/\s+/g;function F(e,t,n){e&&t&&(e.classList?e.classList[n?`add`:`remove`](t):e.className=((` `+e.className+` `).replace(rt,` `).replace(` `+t+` `,` `)+(n?` `+t:``)).replace(rt,` `))}function I(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,``):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf(`webkit`)===-1&&(t=`-webkit-`+t),r[t]=n+(typeof n==`string`?``:`px`)}}function it(e,t){var n=``;if(typeof e==`string`)n=e;else do{var r=I(e,`transform`);r&&r!==`none`&&(n=r+` `+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function at(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i=a,!o)return r;if(r===L())break;r=dt(r,!1)}return!1}function st(e,t,n,r){for(var i=0,a=0,o=e.children;a2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=qe(n,Dt);Tt.pluginEvent.bind(Q)(e,t,O({dragEl:U,parentEl:W,ghostEl:G,rootEl:K,nextEl:Ot,lastDownEl:kt,cloneEl:q,cloneHidden:At,dragStarted:Ut,putSortable:Y,activeSortable:Q.active,originalEvent:r,oldIndex:jt,oldDraggableIndex:Mt,newIndex:J,newDraggableIndex:Nt,hideGhostForTarget:cn,unhideGhostForTarget:ln,cloneNowHidden:function(){At=!0},cloneNowShown:function(){At=!1},dispatchSortableEvent:function(e){H({sortable:t,name:e,originalEvent:r})}},i))};function H(e){Et(O({putSortable:Y,cloneEl:q,targetEl:U,rootEl:K,oldIndex:jt,oldDraggableIndex:Mt,newIndex:J,newDraggableIndex:Nt},e))}var U,W,G,K,Ot,kt,q,At,jt,J,Mt,Nt,Pt,Y,Ft=!1,It=!1,Lt=[],Rt,X,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt=!1,qt=!1,Jt,Z,Yt=[],Xt=!1,Zt=[],Qt=typeof document<`u`,$t=Qe,en=Ye||j?`cssFloat`:`float`,tn=Qt&&!$e&&!Qe&&`draggable`in document.createElement(`div`),nn=function(){if(Qt){if(j)return!1;var e=document.createElement(`x`);return e.style.cssText=`pointer-events:auto`,e.style.pointerEvents===`auto`}}(),rn=function(e,t){var n=I(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=st(e,0,t),a=st(e,1,t),o=i&&I(i),s=a&&I(a),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+R(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+R(a).width;if(n.display===`flex`)return n.flexDirection===`column`||n.flexDirection===`column-reverse`?`vertical`:`horizontal`;if(n.display===`grid`)return n.gridTemplateColumns.split(` `).length<=1?`vertical`:`horizontal`;if(i&&o.float&&o.float!==`none`){var u=o.float===`left`?`left`:`right`;return a&&(s.clear===`both`||s.clear===u)?`vertical`:`horizontal`}return i&&(o.display===`block`||o.display===`flex`||o.display===`table`||o.display===`grid`||c>=r&&n[en]===`none`||a&&n[en]===`none`&&c+l>r)?`vertical`:`horizontal`},an=function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,c=n?t.width:t.height;return r===o||i===s||r+a/2===o+c/2},on=function(e,t){var n;return Lt.some(function(r){var i=r[B].options.emptyInsertThreshold;if(i&&!ct(r)){var a=R(r),o=e>=a.left-i&&e<=a.right+i,s=t>=a.top-i&&t<=a.bottom+i;if(o&&s)return n=r}}),n},sn=function(e){function t(e,n){return function(r,i,a,o){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(e==null&&(n||s))return!0;if(e==null||e===!1)return!1;if(n&&e===`clone`)return e;if(typeof e==`function`)return t(e(r,i,a,o),n)(r,i,a,o);var c=(n?r:i).options.group.name;return e===!0||typeof e==`string`&&e===c||e.join&&e.indexOf(c)>-1}}var n={},r=e.group;(!r||We(r)!=`object`)&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},cn=function(){!nn&&G&&I(G,`display`,`none`)},ln=function(){!nn&&G&&I(G,`display`,``)};Qt&&!$e&&document.addEventListener(`click`,function(e){if(It)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),It=!1,!1},!0);var un=function(e){if(U){e=e.touches?e.touches[0]:e;var t=on(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[B]._onDragOver(n)}}},dn=function(e){U&&U.parentNode[B]._isOutsideThisEl(e.target)};function Q(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;this.el=e,this.options=t=k({},t),e[B]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?`>li`:`>*`,swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return rn(e,this.options)},ghostClass:`sortable-ghost`,chosenClass:`sortable-chosen`,dragClass:`sortable-drag`,ignore:`a, img`,filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData(`Text`,t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:`data-id`,delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:`sortable-fallback`,fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Q.supportPointer!==!1&&`PointerEvent`in window&&!Ze,emptyInsertThreshold:5};for(var r in Tt.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in sn(t),this)i.charAt(0)===`_`&&typeof this[i]==`function`&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&tn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?M(e,`pointerdown`,this._onTapStart):(M(e,`mousedown`,this._onTapStart),M(e,`touchstart`,this._onTapStart)),this.nativeDraggable&&(M(e,`dragover`,this),M(e,`dragenter`,this)),Lt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),k(this,bt())}Q.prototype={constructor:Q,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Wt=null)},_getDirection:function(e,t){return typeof this.options.direction==`function`?this.options.direction.call(this,e,t,U):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType===`touch`&&e,s=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=r.filter;if(xn(n),!U&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Ze&&s&&s.tagName.toUpperCase()===`SELECT`)&&(s=P(s,r.draggable,n,!1),!(s&&s.animated)&&kt!==s)){if(jt=z(s),Mt=z(s,r.draggable),typeof l==`function`){if(l.call(this,e,s,this)){H({sortable:t,rootEl:c,name:`filter`,targetEl:s,toEl:n,fromEl:n}),V(`filter`,t,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(l&&(l=l.split(`,`).some(function(r){if(r=P(c,r.trim(),n,!1),r)return H({sortable:t,rootEl:r,name:`filter`,targetEl:s,fromEl:n,toEl:n}),V(`filter`,t,{evt:e}),!0}),l)){i&&e.cancelable&&e.preventDefault();return}r.handle&&!P(c,r.handle,n,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var r=this,i=r.el,a=r.options,o=i.ownerDocument,s;if(n&&!U&&n.parentNode===i){var c=R(n);if(K=i,U=n,W=U.parentNode,Ot=U.nextSibling,kt=n,Pt=a.group,Q.dragged=U,Rt={target:U,clientX:(t||e).clientX,clientY:(t||e).clientY},Vt=Rt.clientX-c.left,Ht=Rt.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,U.style[`will-change`]=`all`,s=function(){if(V(`delayEnded`,r,{evt:e}),Q.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Xe&&r.nativeDraggable&&(U.draggable=!0),r._triggerDragStart(e,t),H({sortable:r,name:`choose`,originalEvent:e}),F(U,a.chosenClass,!0)},a.ignore.split(`,`).forEach(function(e){at(U,e.trim(),mn)}),M(o,`dragover`,un),M(o,`mousemove`,un),M(o,`touchmove`,un),M(o,`mouseup`,r._onDrop),M(o,`touchend`,r._onDrop),M(o,`touchcancel`,r._onDrop),Xe&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),V(`delayStart`,this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ye||j))){if(Q.eventCanceled){this._onDrop();return}M(o,`mouseup`,r._disableDelayedDrag),M(o,`touchend`,r._disableDelayedDrag),M(o,`touchcancel`,r._disableDelayedDrag),M(o,`mousemove`,r._delayedDragTouchMoveHandler),M(o,`touchmove`,r._delayedDragTouchMoveHandler),a.supportPointer&&M(o,`pointermove`,r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){U&&mn(U),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;N(e,`mouseup`,this._disableDelayedDrag),N(e,`touchend`,this._disableDelayedDrag),N(e,`touchcancel`,this._disableDelayedDrag),N(e,`mousemove`,this._delayedDragTouchMoveHandler),N(e,`touchmove`,this._delayedDragTouchMoveHandler),N(e,`pointermove`,this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t||=e.pointerType==`touch`&&e,!this.nativeDraggable||t?this.options.supportPointer?M(document,`pointermove`,this._onTouchMove):t?M(document,`touchmove`,this._onTouchMove):M(document,`mousemove`,this._onTouchMove):(M(U,`dragend`,this),M(K,`dragstart`,this._onDragStart));try{document.selection?Sn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Ft=!1,K&&U){V(`dragStarted`,this,{evt:t}),this.nativeDraggable&&M(document,`dragover`,dn);var n=this.options;!e&&F(U,n.dragClass,!1),F(U,n.ghostClass,!0),Q.active=this,e&&this._appendGhost(),H({sortable:this,name:`start`,originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(X){this._lastX=X.clientX,this._lastY=X.clientY,cn();for(var e=document.elementFromPoint(X.clientX,X.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(X.clientX,X.clientY),e!==t);)t=e;if(U.parentNode[B]._isOutsideThisEl(e),t)do{if(t[B]){var n=void 0;if(n=t[B]._onDragOver({clientX:X.clientX,clientY:X.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);ln()}},_onTouchMove:function(e){if(Rt){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=G&&it(G,!0),o=G&&a&&a.a,s=G&&a&&a.d,c=$t&&Z&<(Z),l=(i.clientX-Rt.clientX+r.x)/(o||1)+(c?c[0]-Yt[0]:0)/(o||1),u=(i.clientY-Rt.clientY+r.y)/(s||1)+(c?c[1]-Yt[1]:0)/(s||1);if(!Q.active&&!Ft){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))=0&&(H({sortable:this,name:`update`,toEl:W,originalEvent:e}),H({sortable:this,name:`sort`,toEl:W,originalEvent:e})):(J>=0&&(H({rootEl:W,name:`add`,toEl:W,fromEl:K,originalEvent:e}),H({sortable:this,name:`remove`,toEl:W,originalEvent:e}),H({rootEl:W,name:`sort`,toEl:W,fromEl:K,originalEvent:e}),H({sortable:this,name:`sort`,toEl:W,originalEvent:e})),Y&&Y.save()),Q.active&&((J==null||J===-1)&&(J=jt,Nt=Mt),H({sortable:this,name:`end`,toEl:W,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){V(`nulling`,this),K=U=W=G=Ot=q=kt=At=Rt=X=Ut=J=Nt=jt=Mt=Wt=Gt=Y=Pt=Q.dragged=Q.ghost=Q.clone=Q.active=null,Zt.forEach(function(e){e.checked=!0}),Zt.length=zt=Bt=0},handleEvent:function(e){switch(e.type){case`drop`:case`dragend`:this._onDrop(e);break;case`dragenter`:case`dragover`:U&&(this._onDragOver(e),fn(e));break;case`selectstart`:e.preventDefault()}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,i=n.length,a=this.options;ri.right+a||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>i.bottom+a||e.clientX>r.right&&e.clientY>r.top}function vn(e,t,n,r,i,a,o,s){var c=r?e.clientY:e.clientX,l=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!o){if(s&&Jtu+l*a/2:cd-Jt)return-Gt}else if(c>u+l*(1-i)/2&&cd-l*a/2)?c>u+l/2?1:-1:0}function yn(e){return z(U){if(e&&n?.length!==a.childNodes.length)return i.insertBefore(e,t.nextSibling),!0;let o=a.childNodes[r];e=a?.replaceChild(t,o)})}}catch(e){o=e}finally{n=null}b(()=>{if(Un(),o)throw o})}let S={onUpdate:v,onStart:h,onAdd:g,onRemove:_,onEnd:y};function ee(e){let n=s(r);return e||=Ne(n)?Ie(n,t?.$el):n,e&&!ze(e)&&(e=e.$el),e||Ee(`Root element not found`),e}function C(){let e=s(c)??{},{immediate:t,clone:n}=e,r=Ce(e,[`immediate`,`clone`]);return Be(r,(e,t)=>{Ve(e)&&(r[e]=(e,...n)=>(He(e,Wn()),t(e,...n)))}),Re(i===null?{}:S,r)}let w=e=>{e=ee(e),l&&T.destroy(),l=new Q(e,C())};a(()=>c,()=>{l&&Be(C(),(e,t)=>{l?.option(e,t)})},{deep:!0});let T={option:(e,t)=>l?.option(e,t),destroy:()=>{l?.destroy(),l=null},save:()=>l?.save(),toArray:()=>l?.toArray(),closest:(...e)=>l?.closest(...e)};return Bn(()=>{u&&w()}),zn(T.destroy),Se({start:w,pause:()=>T?.option(`disabled`,!0),resume:()=>T?.option(`disabled`,!1)},T)}var qn=[`update`,`start`,`add`,`remove`,`choose`,`unchoose`,`end`,`sort`,`filter`,`clone`,`move`,`change`],Jn=[`clone`,`animation`,`ghostClass`,`group`,`sort`,`disabled`,`store`,`handle`,`draggable`,`swapThreshold`,`invertSwap`,`invertedSwapThreshold`,`removeCloneOnHide`,`direction`,`chosenClass`,`dragClass`,`ignore`,`filter`,`preventOnFilter`,`easing`,`setData`,`dropBubble`,`dragoverBubble`,`dataIdAttr`,`delay`,`delayOnTouchOnly`,`touchStartThreshold`,`forceFallback`,`fallbackClass`,`fallbackOnBody`,`fallbackTolerance`,`fallbackOffset`,`supportPointer`,`emptyInsertThreshold`,`scroll`,`forceAutoScrollFallback`,`scrollSensitivity`,`scrollSpeed`,`bubbleScroll`,`modelValue`,`tag`,`target`,`customUpdate`,...qn.map(e=>`on${e.replace(/^\S/,e=>e.toUpperCase())}`)],Yn=g({name:`VueDraggable`,model:{prop:`modelValue`,event:`update:modelValue`},props:Jn,emits:[`update:modelValue`,...qn],setup(e,{slots:t,emit:n,expose:i,attrs:a}){let o=qn.reduce((e,t)=>{let r=`on${t.replace(/^\S/,e=>e.toUpperCase())}`;return e[r]=(...e)=>n(t,...e),e},{}),l=m(()=>{let t=c(e),{modelValue:n}=t,r=Ce(t,[`modelValue`]),i=Object.entries(r).reduce((e,[t,n])=>{let r=s(n);return r!==void 0&&(e[t]=r),e},{});return Se(Se({},o),ke(Se(Se({},a),i)))}),u=m({get:()=>e.modelValue,set:e=>n(`update:modelValue`,e)}),d=ee(),f=h(Kn(e.target||d,u,l));return i(f),()=>r(e.tag||`div`,{ref:d},(t?.default)?.call(t,f))}}),Xn={mounted:`mounted`,unmounted:`unmounted`};Xn.mounted,Xn.unmounted;var Zn=g({__name:`Switch`,props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},id:{},value:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:[`update:modelValue`],setup(e,{emit:r}){let a=e,o=r,c=oe(a,`class`),u=t(c,o);return(e,t)=>(_(),S(s(he),f({"data-slot":`switch`},s(u),{class:s(ie)(`peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50`,a.class)}),{default:y(t=>[i(s(ge),{"data-slot":`switch-thumb`,class:l(s(ie)(`bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0`))},{default:y(()=>[C(e.$slots,`thumb`,n(T(t)))]),_:2},1032,[`class`])]),_:3},16,[`class`]))}});export{ue as a,de as i,Yn as n,fe as r,Zn as t};