1import{r as a,R as I,b as ge,j as Cn}from"./app-belrbPXN.js";function Sn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pe(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function vt(e){return"nodeType"in e}function z(e){var t,n;return e?pe(e)?e:vt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function pt(e){const{Document:t}=z(e);return e instanceof t}function ke(e){return pe(e)?!1:e instanceof z(e).HTMLElement}function Yt(e){return e instanceof z(e).SVGElement}function be(e){return e?pe(e)?e.document:vt(e)?pt(e)?e:ke(e)||Yt(e)?e.ownerDocument:document:document:document}const K=et?a.useLayoutEffect:a.useEffect;function bt(e){const t=a.useRef(e);return K(()=>{t.current=e}),a.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Rn(){const e=a.useRef(null),t=a.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=a.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Ae(e,t){t===void 0&&(t=[e]);const n=a.useRef(e);return K(()=>{n.current!==e&&(n.current=e)},t),n}function Pe(e,t){const n=a.useRef();return a.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ve(e){const t=bt(e),n=a.useRef(null),r=a.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function ut(e){const t=a.useRef();return a.useEffect(()=>{t.current=e},[e]),t.current}let it={};function ze(e,t){return a.useMemo(()=>{if(t)return t;const n=it[e]==null?0:it[e]+1;return it[e]=n,e+"-"+n},[e,t])}function Ut(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((i,s)=>{const c=Object.entries(s);for(const[l,u]of c){const d=i[l];d!=null&&(i[l]=d+e*u)}return i},{...t})}}const ve=Ut(1),qe=Ut(-1);function En(e){return"clientX"in e&&"clientY"in e}function mt(e){if(!e)return!1;const{KeyboardEvent:t}=z(e.target);return t&&e instanceof t}function On(e){if(!e)return!1;const{TouchEvent:t}=z(e.target);return t&&e instanceof t}function dt(e){if(On(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return En(e)?{x:e.clientX,y:e.clientY}:null}const Ne=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[Ne.Translate.toString(e),Ne.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),At="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Mn(e){return e.matches(At)?e:e.querySelector(At)}const In={display:"none"};function Tn(e){let{id:t,value:n}=e;return I.createElement("div",{id:t,style:In},n)}function An(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={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"};return I.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Nn(){const[e,t]=a.useState("");return{announce:a.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ht=a.createContext(null);function Ln(e){const t=a.useContext(Ht);a.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function kn(){const[e]=a.useState(()=>new Set),t=a.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[a.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var c;return(c=s[o])==null?void 0:c.call(s,i)})},[e]),t]}const Pn={draggable:` 2 To pick up a draggable item, press the space bar. 3 While dragging, use the arrow keys to move the item. 4 Press space again to drop the item in its new position, or press escape to cancel. 5 `},zn={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 jn(e){let{announcements:t=zn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Pn}=e;const{announce:i,announcement:s}=Nn(),c=ze("DndLiveRegion"),[l,u]=a.useState(!1);if(a.useEffect(()=>{u(!0)},[]),Ln(a.useMemo(()=>({onDragStart(f){let{active:v}=f;i(t.onDragStart({active:v}))},onDragMove(f){let{active:v,over:h}=f;t.onDragMove&&i(t.onDragMove({active:v,over:h}))},onDragOver(f){let{active:v,over:h}=f;i(t.onDragOver({active:v,over:h}))},onDragEnd(f){let{active:v,over:h}=f;i(t.onDragEnd({active:v,over:h}))},onDragCancel(f){let{active:v,over:h}=f;
5i(t.onDragCancel({active:v,over:h}))}}),[i,t])),!l)return null;const d=I.createElement(I.Fragment,null,I.createElement(Tn,{id:r,value:o.draggable}),I.createElement(An,{id:c,announcement:s}));return n?ge.createPortal(d,n):d}var A;(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"})(A||(A={}));function Ge(){}const V=Object.freeze({x:0,y:0});function Bn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Fn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function $n(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Xn(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function Nt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const bo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Nt(t,t.left,t.top),i=[];for(const s of r){const{id:c}=s,l=n.get(c);if(l){const u=Bn(Nt(l),o);i.push({id:c,data:{droppableContainer:s,value:u}})}}return i.sort(Fn)};function Wn(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),s=o-r,c=i-n;if(r<o&&n<i){const l=t.width*t.height,u=e.width*e.height,d=s*c,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const _n=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:s}=i,c=n.get(s);if(c){const l=Wn(c,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort($n)};function Yn(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Kt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:V}function Un(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((s,c)=>({...s,top:s.top+e*c.y,bottom:s.bottom+e*c.y,left:s.left+e*c.x,right:s.right+e*c.x}),{...n})}}const Hn=Un(1);function Kn(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]}}else 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}function Vn(e,t,n){const r=Kn(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:c}=r,l=e.left-s-(1-o)*parseFloat(n),u=e.top-c-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const qn={ignoreTransform:!1};function me(e,t){t===void 0&&(t=qn);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=z(e).getComputedStyle(e);u&&(n=Vn(n,u,d))}const{top:r,left:o,width:i,height:s,bottom:c,right:l}=n;return{top:r,left:o,width:i,height:s,bottom:c,right:l}}function Lt(e){return me(e,{ignoreTransform:!0})}function Gn(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Jn(e,t){return t===void 0&&(t=z(e).getComputedStyle(e)),t.position==="fixed"}function Qn(e,t){t===void 0&&(t=z(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function yt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(pt(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ke(o)||Yt(o)||n.includes(o))return n;const i=z(e).getComputedStyle(o);return o!==e&&Qn(o,i)&&n.push(o),Jn(o,i)?n:r(o.parentNode)}return e?r(e):n}function Vt(e){const[t]=yt(e,1);return t??null}function st(e){return!et||!e?null:pe(e)?e:vt(e)?pt(e)||e===be(e).scrollingElement?window:ke(e)?e:null:null}function qt(e){return pe(e)?e.scrollX:e.scrollLeft}function Gt(e){return pe(e)?e.scrollY:e.scrollTop}function ft(e){return{x:qt(e),y:Gt(e)}}var L;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(L||(L={}));function Jt(e){return!et||!e?!1:e===document.scrollingElement}function Qt(e){const t={x:0,y:0},n=Jt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,c=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:s,isRight:c,maxScroll:r,minScroll:t}}const Zn={x:.2,y:.2};function er(e,t,n,r,o){let{top:i,left:s,right:c,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=Zn);
5const{isTop:u,isBottom:d,isLeft:f,isRight:v}=Qt(e),h={x:0,y:0},O={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+g.height?(h.y=L.Backward,O.y=r*Math.abs((t.top+g.height-i)/g.height)):!d&&l>=t.bottom-g.height&&(h.y=L.Forward,O.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!v&&c>=t.right-g.width?(h.x=L.Forward,O.x=r*Math.abs((t.right-g.width-c)/g.width)):!f&&s<=t.left+g.width&&(h.x=L.Backward,O.x=r*Math.abs((t.left+g.width-s)/g.width)),{direction:h,speed:O}}function tr(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}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 Zt(e){return e.reduce((t,n)=>ve(t,ft(n)),V)}function nr(e){return e.reduce((t,n)=>t+qt(n),0)}function rr(e){return e.reduce((t,n)=>t+Gt(n),0)}function or(e,t){if(t===void 0&&(t=me),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Vt(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ir=[["x",["left","right"],nr],["y",["top","bottom"],rr]];class wt{constructor(t,n){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 r=yt(n),o=Zt(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,c]of ir)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=c(r),d=o[i]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Me{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function sr(e){const{EventTarget:t}=z(e);return e instanceof t?e:be(e)}function at(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?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:!1}var W;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(W||(W={}));function kt(e){e.preventDefault()}function ar(e){e.stopPropagation()}var x;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(x||(x={}));const en={start:[x.Space,x.Enter],cancel:[x.Esc],end:[x.Space,x.Enter]},cr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case x.Right:return{...n,x:n.x+25};case x.Left:return{...n,x:n.x-25};case x.Down:return{...n,y:n.y+25};case x.Up:return{...n,y:n.y-25}}};class tn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Me(be(n)),this.windowListeners=new Me(z(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(W.Resize,this.handleCancel),this.windowListeners.add(W.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(W.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&or(r),n(V)}handleKeyDown(t){if(mt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=en,coordinateGetter:s=cr,scrollBehavior:c="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:V;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:n,context:r.current,currentCoordinates:d});if(f){const v=qe(f,d),h={x:0,y:0},{scrollableAncestors:O}=r.current;for(const g of O){const p=t.code,{isTop:m,isRight:D,isLeft:b,isBottom:C,maxScroll:S,minScroll:R}=Qt(g),y=tr(g),w={x:Math.min(p===x.Right?y.right-y.width/2:y.right,Math.max(p===x.Right?y.left:y.left+y.width/2,f.x)),y:Math.min(p===x.Down?y.bottom-y.height/2:y.bottom,Math.max(p===x.Down?y.top:y.top+y.height/2,f.y))},T=p===x.Right&&!D||p===x.Left&&!b,N=p===x.Down&&!C||p===x.Up&&!m;if(T&&w.x!==f.x){const M=g.scrollLeft+v.x,_=p===x.Right&&M<=S.x||p===x.Left&&M>=R.x;if(_&&!v.y){g.scrollTo({left:M,behavior:c});return}_?h.x=g.scrollLeft-M:h.x=p===x.Right?g.scrollLeft-S.x:g.scrollLeft-R.x,h.x&&g.scrollBy({left:-h.x,behavior:c});break}else if(N&&w.y!==f.y){const M=g.scrollTop+v.y,_=p===x.Down&&M<=S.y||p===x.Up&&M>=R.y;if(_&&!v.x){g.scrollTo({top:M,behavior:c});return}_?h.y=g.scrollTop-M:h.y=p===x.Down?g.scrollTop-S.y:g.scrollTop-R.y,h.y&&g.scrollBy({top:-h.y,behavior:c});break}}this.handleMove(t,ve(qe(f,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}tn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=en,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const c=i.activatorNode.current;return c&&e.target!==c?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Pt(e){return!!(e&&"distance"in e)}function zt(e){return!!(e&&"delay"in e)}class xt{constructor(t,n,r){var o;r===void 0&&(r=sr(t.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=t,this.events=n;const{event:i}=t,{target:s}=i;this.props=t,this.events=n,this.document=be(s),this.documentListeners=new Me(this.document),this.listeners=new Me(r),this.windowListeners=new Me(z(s)),this.initialCoordinates=(o=dt(i))!=null?o:V,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:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(W.Resize,this.handleCancel),this.windowListeners.add(W.DragStart,kt),this.windowListeners.add(W.VisibilityChange,this.handleCancel),this.windowListeners.add(W.ContextMenu,kt),this.documentListeners.add(W.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(zt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(Pt(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(W.Click,ar,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(W.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:c}}=i;if(!o)return;const l=(n=dt(t))!=null?n:V,u=qe(o,l);
5if(!r&&c){if(Pt(c)){if(c.tolerance!=null&&at(u,c.tolerance))return this.handleCancel();if(at(u,c.distance))return this.handleStart()}return zt(c)&&at(u,c.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===x.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const lr={move:{name:"pointermove"},end:{name:"pointerup"}};class nn extends xt{constructor(t){const{event:n}=t,r=be(n.target);super(t,lr,r)}}nn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const ur={move:{name:"mousemove"},end:{name:"mouseup"}};var ht;(function(e){e[e.RightClick=2]="RightClick"})(ht||(ht={}));class dr extends xt{constructor(t){super(t,ur,be(t.event.target))}}dr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ht.RightClick?!1:(r==null||r({event:n}),!0)}}];const ct={move:{name:"touchmove"},end:{name:"touchend"}};class fr extends xt{constructor(t){super(t,ct)}static setup(){return window.addEventListener(ct.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(ct.move.name,t)};function t(){}}}fr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Ie;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ie||(Ie={}));var Je;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Je||(Je={}));function hr(e){let{acceleration:t,activator:n=Ie.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:c=Je.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:v}=e;const h=vr({delta:f,disabled:!i}),[O,g]=Rn(),p=a.useRef({x:0,y:0}),m=a.useRef({x:0,y:0}),D=a.useMemo(()=>{switch(n){case Ie.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Ie.DraggableRect:return o}},[n,o,l]),b=a.useRef(null),C=a.useCallback(()=>{const R=b.current;if(!R)return;const y=p.current.x*m.current.x,w=p.current.y*m.current.y;R.scrollBy(y,w)},[]),S=a.useMemo(()=>c===Je.TreeOrder?[...u].reverse():u,[c,u]);a.useEffect(()=>{if(!i||!u.length||!D){g();return}for(const R of S){if((r==null?void 0:r(R))===!1)continue;const y=u.indexOf(R),w=d[y];if(!w)continue;const{direction:T,speed:N}=er(R,w,D,t,v);for(const M of["x","y"])h[M][T[M]]||(N[M]=0,T[M]=0);if(N.x>0||N.y>0){g(),b.current=R,O(C,s),p.current=N,m.current=T;return}}p.current={x:0,y:0},m.current={x:0,y:0},g()},[t,C,r,g,i,s,JSON.stringify(D),JSON.stringify(h),O,u,S,d,JSON.stringify(v)])}const gr={x:{[L.Backward]:!1,[L.Forward]:!1},y:{[L.Backward]:!1,[L.Forward]:!1}};function vr(e){let{delta:t,disabled:n}=e;const r=ut(t);return Pe(o=>{if(n||!r||!o)return gr;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[L.Backward]:o.x[L.Backward]||i.x===-1,[L.Forward]:o.x[L.Forward]||i.x===1},y:{[L.Backward]:o.y[L.Backward]||i.y===-1,[L.Forward]:o.y[L.Forward]||i.y===1}}},[n,t,r])}function pr(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Pe(o=>{var i;return t===null?null:(i=r??o)!=null?i:null},[r,t])}function br(e,t){return a.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...i]},[]),[e,t])}var Le;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Le||(Le={}));var gt;(function(e){e.Optimized="optimized"})(gt||(gt={}));const jt=new Map;function mr(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=a.useState(null),{frequency:c,measure:l,strategy:u}=o,d=a.useRef(e),f=p(),v=Ae(f),h=a.useCallback(function(m){m===void 0&&(m=[]),!v.current&&s(D=>D===null?m:D.concat(m.filter(b=>!D.includes(b))))},[v]),O=a.useRef(null),g=Pe(m=>{if(f&&!n)return jt;if(!m||m===jt||d.current!==e||i!=null){const D=new Map;for(let b of e){if(!b)continue;if(i&&i.length>0&&!i.includes(b.id)&&b.rect.current){D.set(b.id,b.rect.current);continue}const C=b.node.current,S=C?new wt(l(C),C):null;b.rect.current=S,S&&D.set(b.id,S)}return D}return m},[e,i,n,f,l]);return a.useEffect(()=>{d.current=e},[e]),a.useEffect(()=>{f||h()},[n,f]),a.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),a.useEffect(()=>{f||typeof c!="number"||O.current!==null||(O.current=setTimeout(()=>{h(),O.current=null},c))},[c,f,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:i!=null};function p(){switch(u){case Le.Always:return!1;case Le.BeforeDragging:return n;default:return!n}}}function rn(e,t){return Pe(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function yr(e,t){return rn(e,t)}function wr(e){let{callback:t,disabled:n}=e;const r=bt(t),o=a.useMemo(()=>
5{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return a.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function tt(e){let{callback:t,disabled:n}=e;const r=bt(t),o=a.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return a.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function xr(e){return new wt(me(e),e)}function Bt(e,t,n){t===void 0&&(t=xr);const[r,o]=a.useReducer(c,null),i=wr({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=tt({callback:o});return K(()=>{o(),e?(s==null||s.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),i==null||i.disconnect())},[e]),r;function c(l){if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d}}function Dr(e){const t=rn(e);return Kt(e,t)}const Ft=[];function Cr(e){const t=a.useRef(e),n=Pe(r=>e?r&&r!==Ft&&e&&t.current&&e.parentNode===t.current.parentNode?r:yt(e):Ft,[e]);return a.useEffect(()=>{t.current=e},[e]),n}function Sr(e){const[t,n]=a.useState(null),r=a.useRef(e),o=a.useCallback(i=>{const s=st(i.target);s&&n(c=>c?(c.set(s,ft(s)),new Map(c)):null)},[]);return a.useEffect(()=>{const i=r.current;if(e!==i){s(i);const c=e.map(l=>{const u=st(l);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,ft(u)]):null}).filter(l=>l!=null);n(c.length?new Map(c):null),r.current=e}return()=>{s(e),s(i)};function s(c){c.forEach(l=>{const u=st(l);u==null||u.removeEventListener("scroll",o)})}},[o,e]),a.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>ve(i,s),V):Zt(e):V,[e,t])}function $t(e,t){t===void 0&&(t=[]);const n=a.useRef(null);return a.useEffect(()=>{n.current=null},t),a.useEffect(()=>{const r=e!==V;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?qe(e,n.current):V}function Rr(e){a.useEffect(()=>{if(!et)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Er(e,t){return a.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=s=>{i(s,t)},n},{}),[e,t])}function on(e){return a.useMemo(()=>e?Gn(e):null,[e])}const lt=[];function Or(e,t){t===void 0&&(t=me);const[n]=e,r=on(n?z(n):null),[o,i]=a.useReducer(c,lt),s=tt({callback:i});return e.length>0&&o===lt&&i(),K(()=>{e.length?e.forEach(l=>s==null?void 0:s.observe(l)):(s==null||s.disconnect(),i())},[e]),o;function c(){return e.length?e.map(l=>Jt(l)?r:new wt(t(l),l)):lt}}function Mr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ke(t)?t:e}function Ir(e){let{measure:t}=e;const[n,r]=a.useState(null),o=a.useCallback(u=>{for(const{target:d}of u)if(ke(d)){r(f=>{const v=t(d);return f?{...f,width:v.width,height:v.height}:v});break}},[t]),i=tt({callback:o}),s=a.useCallback(u=>{const d=Mr(u);i==null||i.disconnect(),d&&(i==null||i.observe(d)),r(d?t(d):null)},[t,i]),[c,l]=Ve(s);return a.useMemo(()=>({nodeRef:c,rect:n,setRef:l}),[n,c,l])}const Tr=[{sensor:nn,options:{}},{sensor:tn,options:{}}],Ar={current:{}},Ke={draggable:{measure:Lt},droppable:{measure:Lt,strategy:Le.WhileDragging,frequency:gt.Optimized},dragOverlay:{measure:me}};class Te extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Nr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Te,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ge},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ke,measureDroppableContainers:Ge,windowRect:null,measuringScheduled:!1},Lr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ge,draggableNodes:new Map,over:null,measureDroppableContainers:Ge},nt=a.createContext(Lr),sn=a.createContext(Nr);function kr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Te}}}function Pr(e,t){switch(t.type){case A.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case A.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 A.DragEnd:case A.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case A.RegisterDroppable:{const{element:n}=t,{id:r}
5=n,o=new Te(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case A.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new Te(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case A.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Te(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function zr(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=a.useContext(nt),i=ut(r),s=ut(n==null?void 0:n.id);return a.useEffect(()=>{if(!t&&!r&&i&&s!=null){if(!mt(i)||document.activeElement===i.target)return;const c=o.get(s);if(!c)return;const{activatorNode:l,node:u}=c;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=Mn(d);if(f){f.focus();break}}})}},[r,t,o,s,i]),null}function jr(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function Br(e){return a.useMemo(()=>({draggable:{...Ke.draggable,...e==null?void 0:e.draggable},droppable:{...Ke.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ke.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Fr(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=a.useRef(!1),{x:s,y:c}=typeof o=="boolean"?{x:o,y:o}:o;K(()=>{if(!s&&!c||!t){i.current=!1;return}if(i.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=Kt(d,r);if(s||(f.x=0),c||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const v=Vt(u);v&&v.scrollBy({top:f.y,left:f.x})}},[t,s,c,r,n])}const an=a.createContext({...V,scaleX:1,scaleY:1});var ie;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ie||(ie={}));const mo=a.memo(function(t){var n,r,o,i;let{id:s,accessibility:c,autoScroll:l=!0,children:u,sensors:d=Tr,collisionDetection:f=_n,measuring:v,modifiers:h,...O}=t;const g=a.useReducer(Pr,void 0,kr),[p,m]=g,[D,b]=kn(),[C,S]=a.useState(ie.Uninitialized),R=C===ie.Initialized,{draggable:{active:y,nodes:w,translate:T},droppable:{containers:N}}=p,M=y?w.get(y):null,_=a.useRef({initial:null,translated:null}),Y=a.useMemo(()=>{var k;return y!=null?{id:y,data:(k=M==null?void 0:M.data)!=null?k:Ar,rect:_}:null},[y,M]),q=a.useRef(null),[ye,je]=a.useState(null),[j,Be]=a.useState(null),se=Ae(O,Object.values(O)),we=ze("DndDescribedBy",s),Fe=a.useMemo(()=>N.getEnabled(),[N]),P=Br(v),{droppableRects:Q,measureDroppableContainers:ae,measuringScheduled:xe}=mr(Fe,{dragging:R,dependencies:[T.x,T.y],config:P.droppable}),$=pr(w,y),$e=a.useMemo(()=>j?dt(j):null,[j]),te=Dn(),Z=yr($,P.draggable.measure);Fr({activeNode:y?w.get(y):null,config:te.layoutShiftCompensation,initialRect:Z,measure:P.draggable.measure});const E=Bt($,P.draggable.measure,Z),De=Bt($?$.parentElement:null),G=a.useRef({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:Q,draggableNodes:w,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=N.getNodeFor((n=G.current.over)==null?void 0:n.id),ee=Ir({measure:P.dragOverlay.measure}),le=(r=ee.nodeRef.current)!=null?r:$,ue=R?(o=ee.rect)!=null?o:E:null,Dt=!!(ee.nodeRef.current&&ee.rect),Ct=Dr(Dt?null:E),rt=on(le?z(le):null),ne=Cr(R?ce??$:null),Xe=Or(ne),We=jr(h,{transform:{x:T.x-Ct.x,y:T.y-Ct.y,scaleX:1,scaleY:1},activatorEvent:j,active:Y,activeNodeRect:E,containerNodeRect:De,draggingNodeRect:ue,over:G.current.over,overlayNodeRect:ee.rect,scrollableAncestors:ne,scrollableAncestorRects:Xe,windowRect:rt}),St=$e?ve($e,T):null,Rt=Sr(ne),vn=$t(Rt),pn=$t(Rt,[E]),de=ve(We,vn),fe=ue?Hn(ue,We):null,Ce=Y&&fe?f({active:Y,collisionRect:fe,droppableRects:Q,droppableContainers:Fe,pointerCoordinates:St}):null,Et=Xn(Ce,"id"),[re,Ot]=a.useState(null),bn=Dt?We:ve(We,pn),mn=Yn(bn,(i=re==null?void 0:re.rect)!=null?i:null,E),Mt=a.useCallback((k,B)=>{let{sensor:F,options:oe}=B;if(q.current==null)return;const X=w.get(q.current);if(!X)return;const U=k.nativeEvent,J=new F({active:q.current,activeNode:X,event:U,options:oe,context:G,onStart(H){const Se=q.current;if(Se==null)return;const Re=w.get(Se);if(!Re)return;const{onDragStart:_e}=se.current,Ye={active:{id:Se,data:Re.data,rect:_}};ge.unstable_batchedUpdates(()=>{_e==null||_e(Ye),S(ie.Initializing),m({type:A.DragStart,initialCoordinates:H,active:Se}),D({type:"onDragStart",event:Ye})})},onMove(H){m({type:A.DragMove,coordinates:H})},onEnd:he(A.DragEnd),onCancel:he(A.DragCancel)});ge.unstable_batchedUpdates(()=>{je(J),Be(k.nativeEvent)});function he(H){return async function(){const{active:Re,collisions:_e,over:Ye,scrollAdjustedTranslate:Tt}=G.current;let Ee=null;if(Re&&Tt){const{cancelDrop:Oe}=se.current;Ee={activatorEvent:U,active:Re,collisions:_e,delta:Tt,over:Ye},H===A.DragEnd&&typeof Oe=="function"&&await Promise.resolve(Oe(Ee))&&(H=A.DragCancel)}q.current=null,ge.unstable_batchedUpdates(()=>{m({type:H}),S(ie.Uninitialized),Ot(null),je(null),Be(null);const Oe=H===A.DragEnd?"onDragEnd":"onDragCancel";if(Ee){const ot=se.current[Oe];ot==null||ot(Ee),D({type:Oe,event:Ee})}})}}},[w]),yn=a.useCallback((k,B)=>(F,oe)=>{const X=F.nativeEvent,U=w.get(oe);if(q.current!==null||!U||X.dndKit||X.defaultPrevented)return;const J={active:U};k(F,B.options,J)===!0&&(X.dndKit={capturedBy:B.sensor},q.current=oe,Mt(F,B))},[w,Mt]),It=br(d,yn);Rr(d),K(()=>{E&&C===ie.Initializing&&S(ie.Initialized)},[E,C]),a.useEffect(()=>{const{onDragMove:k}=se.current,{active:B,activatorEvent:F,collisions:oe,over:X}=G.current;if(!B||!F)return;const U={active:B,activatorEvent:F,collisions:oe,delta:{x:de.x,y:de.y},over:X};ge.unstable_batchedUpdates(()=>{k==null||k(U),D({type:"onDragMove",event:U})})},[de.x,de.y]),a.useEffect(()=>{const{active:k,activatorEvent:B,collisions:F,droppableContainers:oe,scrollAdjustedTranslate:X}=G.current;if(!k||q.current==null||!B||!X)return;const{onDragOver:U}=se.current,J=oe.get(Et),he=J&&J.rect.current?{id:J.id,rect:J.rect.current,data:J.data,disabled:J.disabled}:null,H={active:k,activatorEvent:B,collisions:F,delta:{x:X.x,y:X.y},over:he};ge.unstable_batchedUpdates(()=>{Ot(he),U==null||U(H),D({type:"onDragOver",event:H})})},[Et]),K(()=>{G.current={activatorEvent:j,active:Y,activeNode:$,collisionRect:fe,collisions:Ce,droppableRects:Q,draggableNodes:w,draggingNode:le,draggingNodeRect:ue,droppableContainers:N,over:re,scrollableAncestors:ne,scrollAdjustedTranslate:de},_.current={initial:ue,translated:fe}},[Y,$,Ce,fe,w,le,ue,Q,N,re,ne,de]),hr({...te,delta:T,draggingRect:fe,pointerCoordinates:St,scrollableAncestors:ne,scrollableAncestorRects:Xe});const wn=a.useMemo(()=>({active:Y,activeNode:$,activeNodeRect:E,activatorEvent:j,collisions:Ce,containerNodeRect:De,dragOverlay:ee,draggableNodes:w,droppableContainers:N,droppableRects:Q,over:re,measureDroppableContainers:ae,scrollableAncestors:ne,scrollableAncestorRects:Xe,measuringConfiguration:P,measuringScheduled:xe,windowRect:rt}),[Y,$,E,j,Ce,De,ee,w,N,Q,re,ae,ne,Xe,P,xe,rt]),xn=a.useMemo(()=>({activatorEvent:j,activators:It,active:Y,activeNodeRect:E,ariaDescribedById:{draggable:we},dispatch:m,draggableNodes:w,over:re,measureDroppableContainers:ae}),[j,It,Y,E,m,we,w,re,ae]);return I.createElement(Ht.Provider,{value:b},I.createElement(nt.Provider,{value:xn},I.createElement(sn.Provider,{value:wn},I.createElement(an.Provider,{value:mn},u)),I.createElement(zr,{disabled:(c==null?void 0:c.restoreFocus)===!1})),I.createElement(jn,{...c,hiddenTextDescribedById:we}));function Dn(){const k=(ye==null?void 0:ye.autoScrollEnabled)===!1,B=typeof l=="object"?l.enabled===!1:l===!1,F=R&&!k&&!B;return typeof l=="object"?{...l,enabled:F}:{enabled:F}}}),$r=a.createContext(null),Xt="button",Xr="Droppable";function Wr(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=ze(Xr),{activators:s,activatorEvent:c,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:v}=a.useContext(nt),{role:h=Xt,roleDescription:O="draggable",tabIndex:g=0}=o??{},p=(l==null?void 0:l.id)===t,m=a.useContext(p?an:$r),[D,b]=Ve(),[C,S]=Ve(),R=Er(s,t),y=Ae(n);K(()=>(f.set(t,{id:t,key:i,node:D,activatorNode:C,data:y}),()=>{const T=f.get(t);T&&T.key===i&&f.delete(t)}),[f,t]);const w=a.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":p&&h===Xt?!0:void 0,"aria-roledescription":O,"aria-describedby":d.draggable}),[r,h,g,p,O,d.draggable]);return{active:l,activatorEvent:c,activeNodeRect:u,attributes:w,isDragging:p,listeners:r?void 0:R,node:D,over:v,setNodeRef:b,setActivatorNodeRef:S,transform:m}}function _r(){return a.useContext(sn)}const Yr="Droppable",Ur={timeout:25};function Hr(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=ze(Yr),{active:s,dispatch:c,over:l,measureDroppableContainers:u}=a.useContext(nt),d=a.useRef({disabled:n}),f=a.useRef(!1),v=a.useRef(null),h=a.useRef(null),{disabled:O,updateMeasurementsFor:g,timeout:p}={...Ur,...o},m=Ae(g??r),D=a.useCallback(()=>
5{if(!f.current){f.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null},p)},[p]),b=tt({callback:D,disabled:O||!s}),C=a.useCallback((w,T)=>{b&&(T&&(b.unobserve(T),f.current=!1),w&&b.observe(w))},[b]),[S,R]=Ve(C),y=Ae(t);return a.useEffect(()=>{!b||!S.current||(b.disconnect(),f.current=!1,b.observe(S.current))},[S,b]),K(()=>(c({type:A.RegisterDroppable,element:{id:r,key:i,disabled:n,node:S,rect:v,data:y}}),()=>c({type:A.UnregisterDroppable,key:i,id:r})),[r]),a.useEffect(()=>{n!==d.current.disabled&&(c({type:A.SetDroppableDisabled,id:r,key:i,disabled:n}),d.current.disabled=n)},[r,i,n,c]),{active:s,rect:v,isOver:(l==null?void 0:l.id)===r,node:S,over:l,setNodeRef:R}}function cn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Kr(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function Ue(e){return e!==null&&e>=0}function Vr(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}function qr(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ln=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=cn(t,r,n),s=t[o],c=i[o];return!c||!s?null:{x:c.left-s.left,y:c.top-s.top,scaleX:c.width/s.width,scaleY:c.height/s.height}},He={scaleX:1,scaleY:1},yo=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:s}=e;const c=(t=i[n])!=null?t:r;if(!c)return null;if(o===n){const u=i[s];return u?{x:0,y:n<s?u.top+u.height-(c.top+c.height):u.top-c.top,...He}:null}const l=Gr(i,o,n);return o>n&&o<=s?{x:0,y:-c.height-l,...He}:o<n&&o>=s?{x:0,y:c.height+l,...He}:{x:0,y:0,...He}};function Gr(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}const un="Sortable",dn=I.createContext({activeIndex:-1,containerId:un,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ln,disabled:{draggable:!1,droppable:!1}});function wo(e){let{children:t,id:n,items:r,strategy:o=ln,disabled:i=!1}=e;const{active:s,dragOverlay:c,droppableRects:l,over:u,measureDroppableContainers:d}=_r(),f=ze(un,n),v=c.rect!==null,h=a.useMemo(()=>r.map(R=>typeof R=="object"&&"id"in R?R.id:R),[r]),O=s!=null,g=s?h.indexOf(s.id):-1,p=u?h.indexOf(u.id):-1,m=a.useRef(h),D=!Vr(h,m.current),b=p!==-1&&g===-1||D,C=qr(i);K(()=>{D&&O&&d(h)},[D,h,O,d]),a.useEffect(()=>{m.current=h},[h]);const S=a.useMemo(()=>({activeIndex:g,containerId:f,disabled:C,disableTransforms:b,items:h,overIndex:p,useDragOverlay:v,sortedRects:Kr(h,l),strategy:o}),[g,f,C.draggable,C.droppable,b,h,p,l,v,o]);return I.createElement(dn.Provider,{value:S},t)}const Jr=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return cn(n,r,o).indexOf(t)},Qr=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:c,previousContainerId:l,transition:u}=e;return!u||!r||c!==i&&o===s?!1:n?!0:s!==o&&t===l},Zr={duration:200,easing:"ease"},fn="transform",eo=Ne.Transition.toString({property:fn,duration:0,easing:"linear"}),to={roleDescription:"sortable"};function no(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,s]=a.useState(null),c=a.useRef(n);return K(()=>{if(!t&&n!==c.current&&r.current){const l=o.current;if(l){const u=me(r.current,{ignoreTransform:!0}),d={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(d.x||d.y)&&s(d)}}n!==c.current&&(c.current=n)},[t,n,r,o]),a.useEffect(()=>{i&&s(null)},[i]),i}function ro(e){let{animateLayoutChanges:t=Qr,attributes:n,disabled:r,data:o,getNewIndex:i=Jr,id:s,strategy:c,resizeObserverConfig:l,transition:u=Zr}=e;const{items:d,containerId:f,activeIndex:v,disabled:h,disableTransforms:O,sortedRects:g,overIndex:p,useDragOverlay:m,strategy:D}=a.useContext(dn),b=oo(r,h),C=d.indexOf(s),S=a.useMemo(()=>({sortable:{containerId:f,index:C,items:d},...o}),[f,o,C,d]),R=a.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:y,node:w,isOver:T,setNodeRef:N}=Hr({id:s,data:S,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:R,...l}}),{active:M,activatorEvent:_,activeNodeRect:Y,attributes:q,setNodeRef:ye,listeners:je,isDragging:j,over:Be,setActivatorNodeRef:se,transform:we}=Wr({id:s,data:S,attributes:{...to,...n},disabled:b.draggable}),Fe=Sn(N,ye),P=!!M,Q=P&&!O&&Ue(v)&&Ue(p),ae=!m&&j,xe=ae&&Q?we:null,$e=Q?xe??(c??D)({rects:g,activeNodeRect:Y,activeIndex:v,overIndex:p,index:C}):null,te=Ue(v)&&Ue(p)?i({id:s,items:d,activeIndex:v,overIndex:p}):C,Z=M==null?void 0:M.id,E=a.useRef({activeId:Z,items:d,newIndex:te,containerId:f}
5),De=d!==E.current.items,G=t({active:M,containerId:f,isDragging:j,isSorting:P,id:s,index:C,items:d,newIndex:E.current.newIndex,previousItems:E.current.items,previousContainerId:E.current.containerId,transition:u,wasDragging:E.current.activeId!=null}),ce=no({disabled:!G,index:C,node:w,rect:y});return a.useEffect(()=>{P&&E.current.newIndex!==te&&(E.current.newIndex=te),f!==E.current.containerId&&(E.current.containerId=f),d!==E.current.items&&(E.current.items=d)},[P,te,f,d]),a.useEffect(()=>{if(Z===E.current.activeId)return;if(Z&&!E.current.activeId){E.current.activeId=Z;return}const le=setTimeout(()=>{E.current.activeId=Z},50);return()=>clearTimeout(le)},[Z]),{active:M,activeIndex:v,attributes:q,data:S,rect:y,index:C,newIndex:te,items:d,isOver:T,isSorting:P,isDragging:j,listeners:je,node:w,overIndex:p,over:Be,setNodeRef:Fe,setActivatorNodeRef:se,setDroppableNodeRef:N,setDraggableNodeRef:ye,transform:ce??$e,transition:ee()};function ee(){if(ce||De&&E.current.newIndex===C)return eo;if(!(ae&&!mt(_)||!u)&&(P||G))return Ne.Transition.toString({...u,property:fn})}}function oo(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}x.Down,x.Right,x.Up,x.Left;var hn={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Wt=I.createContext&&I.createContext(hn),io=["attr","size","title"];function so(e,t){if(e==null)return{};var n=ao(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ao(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Qe(){return Qe=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},Qe.apply(this,arguments)}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_t(Object(n),!0).forEach(function(r){co(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function co(e,t,n){return t=lo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lo(e){var t=uo(e,"string");return typeof t=="symbol"?t:String(t)}function uo(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gn(e){return e&&e.map((t,n)=>I.createElement(t.tag,Ze({key:n},t.attr),gn(t.child)))}function fo(e){return t=>I.createElement(ho,Qe({attr:Ze({},e.attr)},t),gn(e.child))}function ho(e){var t=n=>{var{attr:r,size:o,title:i}=e,s=so(e,io),c=o||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),I.createElement("svg",Qe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Ze(Ze({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),i&&I.createElement("title",null,i),e.children)};return Wt!==void 0?I.createElement(Wt.Consumer,null,n=>t(n)):t(hn)}function go(e){return fo({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},child:[]},{tag:"path",attr:{d:"M4 10h16"},child:[]},{tag:"path",attr:{d:"M4 14h16"},child:[]},{tag:"path",attr:{d:"M9 18l3 3l3 -3"},child:[]},{tag:"path",attr:{d:"M9 6l3 -3l3 3"},child:[]}]})(e)}const vo=e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:i}=ro({id:e.id}),s={transform:Ne.Transform.toString(o),transition:i};return a.createElement("li",{ref:r,...t,...n,style:s,className:"my-2 cursor-grab p-2 bg-amber-100 flex justify-start items-center gap-2 border-1 border-default-200 rounded-md active:cursor-grabbing active:opacity-95 ",key:e==null?void 0:e.id},Cn.jsx(go,{}),e==null?void 0:e.name_complete)},xo=Object.freeze(Object.defineProperty({__proto__:null,SortableItem:vo},Symbol.toStringTag,{value:"Module"}));
5export{mo as D,wo as S,vo as a,xo as b,bo as c,yo as v};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.