arize-phoenix 8.19.0__py3-none-any.whl → 8.19.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

@@ -894,4 +894,4 @@ function print() { __p += __j.call(arguments, '') }
894
894
  To pick up a draggable item, press the space bar.
895
895
  While dragging, use the arrow keys to move the item.
896
896
  Press space again to drop the item in its new position, or press escape to cancel.
897
- `},nit={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 rit(e){let{announcements:t=nit,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=tit}=e;const{announce:a,announcement:o}=Xrt(),u=D3("DndLiveRegion"),[s,l]=I.useState(!1);if(I.useEffect(()=>{l(!0)},[]),Jrt(I.useMemo(()=>({onDragStart(f){let{active:d}=f;a(t.onDragStart({active:d}))},onDragMove(f){let{active:d,over:p}=f;t.onDragMove&&a(t.onDragMove({active:d,over:p}))},onDragOver(f){let{active:d,over:p}=f;a(t.onDragOver({active:d,over:p}))},onDragEnd(f){let{active:d,over:p}=f;a(t.onDragEnd({active:d,over:p}))},onDragCancel(f){let{active:d,over:p}=f;a(t.onDragCancel({active:d,over:p}))}}),[a,t])),!s)return null;const c=$e.createElement($e.Fragment,null,$e.createElement(Yrt,{id:r,value:i.draggable}),$e.createElement(Grt,{id:u,announcement:o}));return n?Yu.createPortal(c,n):c}var lo;(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"})(lo||(lo={}));function k4(){}function ict(e,t){return I.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function act(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return I.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Zf=Object.freeze({x:0,y:0});function iit(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ait(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function oit(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function cee(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function I1e(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const uit=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=cee(t),a=[];for(const o of r){const{id:u}=o,s=n.get(u);if(s){const l=cee(s),c=i.reduce((d,p,g)=>d+iit(l[g],p),0),f=Number((c/4).toFixed(4));a.push({id:u,data:{droppableContainer:o,value:f}})}}return a.sort(ait)};function sit(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,u=a-n;if(r<i&&n<a){const s=t.width*t.height,l=e.width*e.height,c=o*u,f=c/(s+l-c);return Number(f.toFixed(4))}return 0}const lit=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const a of r){const{id:o}=a,u=n.get(o);if(u){const s=sit(u,t);s>0&&i.push({id:o,data:{droppableContainer:a,value:s}})}}return i.sort(oit)};function cit(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function M1e(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Zf}function fit(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return i.reduce((o,u)=>({...o,top:o.top+e*u.y,bottom:o.bottom+e*u.y,left:o.left+e*u.x,right:o.right+e*u.x}),{...n})}}const dit=fit(1);function hit(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 pit(e,t,n){const r=hit(t);if(!r)return e;const{scaleX:i,scaleY:a,x:o,y:u}=r,s=e.left-o-(1-i)*parseFloat(n),l=e.top-u-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:c,height:f,top:l,right:s+c,bottom:l+f,left:s}}const mit={ignoreTransform:!1};function Hb(e,t){t===void 0&&(t=mit);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:c}=Ks(e).getComputedStyle(e);l&&(n=pit(n,l,c))}const{top:r,left:i,width:a,height:o,bottom:u,right:s}=n;return{top:r,left:i,width:a,height:o,bottom:u,right:s}}function fee(e){return Hb(e,{ignoreTransform:!0})}function git(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function vit(e,t){return t===void 0&&(t=Ks(e).getComputedStyle(e)),t.position==="fixed"}function yit(e,t){t===void 0&&(t=Ks(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function Nw(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(MN(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!C3(i)||T1e(i)||n.includes(i))return n;const a=Ks(e).getComputedStyle(i);return i!==e&&yit(i,a)&&n.push(i),vit(i,a)?n:r(i.parentNode)}return e?r(e):n}function L1e(e){const[t]=Nw(e,1);return t??null}function m7(e){return!Lw||!e?null:Kb(e)?e:IN(e)?MN(e)||e===Zb(e).scrollingElement?window:C3(e)?e:null:null}function N1e(e){return Kb(e)?e.scrollX:e.scrollLeft}function Q1e(e){return Kb(e)?e.scrollY:e.scrollTop}function W9(e){return{x:N1e(e),y:Q1e(e)}}var Co;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Co||(Co={}));function B1e(e){return!Lw||!e?!1:e===document.scrollingElement}function z1e(e){const t={x:0,y:0},n=B1e(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=r.y,u=e.scrollLeft>=r.x;return{isTop:i,isLeft:a,isBottom:o,isRight:u,maxScroll:r,minScroll:t}}const bit={x:.2,y:.2};function Oit(e,t,n,r,i){let{top:a,left:o,right:u,bottom:s}=n;r===void 0&&(r=10),i===void 0&&(i=bit);const{isTop:l,isBottom:c,isLeft:f,isRight:d}=z1e(e),p={x:0,y:0},g={x:0,y:0},v={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+v.height?(p.y=Co.Backward,g.y=r*Math.abs((t.top+v.height-a)/v.height)):!c&&s>=t.bottom-v.height&&(p.y=Co.Forward,g.y=r*Math.abs((t.bottom-v.height-s)/v.height)),!d&&u>=t.right-v.width?(p.x=Co.Forward,g.x=r*Math.abs((t.right-v.width-u)/v.width)):!f&&o<=t.left+v.width&&(p.x=Co.Backward,g.x=r*Math.abs((t.left+v.width-o)/v.width)),{direction:p,speed:g}}function xit(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function q1e(e){return e.reduce((t,n)=>eb(t,W9(n)),Zf)}function _it(e){return e.reduce((t,n)=>t+N1e(n),0)}function Sit(e){return e.reduce((t,n)=>t+Q1e(n),0)}function Eit(e,t){if(t===void 0&&(t=Hb),!e)return;const{top:n,left:r,bottom:i,right:a}=t(e);L1e(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const $it=[["x",["left","right"],_it],["y",["top","bottom"],Sit]];class QN{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=Nw(n),i=q1e(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,o,u]of $it)for(const s of o)Object.defineProperty(this,s,{get:()=>{const l=u(r),c=i[a]-l;return this.rect[s]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ax{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 i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function wit(e){const{EventTarget:t}=Ks(e);return e instanceof t?e:Zb(e)}function g7(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 $c;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})($c||($c={}));function dee(e){e.preventDefault()}function Cit(e){e.stopPropagation()}var gr;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(gr||(gr={}));const U1e={start:[gr.Space,gr.Enter],cancel:[gr.Esc],end:[gr.Space,gr.Enter]},Pit=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case gr.Right:return{...n,x:n.x+25};case gr.Left:return{...n,x:n.x-25};case gr.Down:return{...n,y:n.y+25};case gr.Up:return{...n,y:n.y-25}}};class V1e{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 Ax(Zb(n)),this.windowListeners=new Ax(Ks(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add($c.Resize,this.handleCancel),this.windowListeners.add($c.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add($c.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Eit(r),n(Zf)}handleKeyDown(t){if(NN(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:a=U1e,coordinateGetter:o=Pit,scrollBehavior:u="smooth"}=i,{code:s}=t;if(a.end.includes(s)){this.handleEnd(t);return}if(a.cancel.includes(s)){this.handleCancel(t);return}const{collisionRect:l}=r.current,c=l?{x:l.left,y:l.top}:Zf;this.referenceCoordinates||(this.referenceCoordinates=c);const f=o(t,{active:n,context:r.current,currentCoordinates:c});if(f){const d=q_(f,c),p={x:0,y:0},{scrollableAncestors:g}=r.current;for(const v of g){const b=t.code,{isTop:x,isRight:S,isLeft:E,isBottom:R,maxScroll:w,minScroll:D}=z1e(v),U=xit(v),k={x:Math.min(b===gr.Right?U.right-U.width/2:U.right,Math.max(b===gr.Right?U.left:U.left+U.width/2,f.x)),y:Math.min(b===gr.Down?U.bottom-U.height/2:U.bottom,Math.max(b===gr.Down?U.top:U.top+U.height/2,f.y))},K=b===gr.Right&&!S||b===gr.Left&&!E,B=b===gr.Down&&!R||b===gr.Up&&!x;if(K&&k.x!==f.x){const V=v.scrollLeft+d.x,Z=b===gr.Right&&V<=w.x||b===gr.Left&&V>=D.x;if(Z&&!d.y){v.scrollTo({left:V,behavior:u});return}Z?p.x=v.scrollLeft-V:p.x=b===gr.Right?v.scrollLeft-w.x:v.scrollLeft-D.x,p.x&&v.scrollBy({left:-p.x,behavior:u});break}else if(B&&k.y!==f.y){const V=v.scrollTop+d.y,Z=b===gr.Down&&V<=w.y||b===gr.Up&&V>=D.y;if(Z&&!d.x){v.scrollTo({top:V,behavior:u});return}Z?p.y=v.scrollTop-V:p.y=b===gr.Down?v.scrollTop-w.y:v.scrollTop-D.y,p.y&&v.scrollBy({top:-p.y,behavior:u});break}}this.handleMove(t,eb(q_(f,this.referenceCoordinates),p))}}}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()}}V1e.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=U1e,onActivation:i}=t,{active:a}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const u=a.activatorNode.current;return u&&e.target!==u?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function hee(e){return!!(e&&"distance"in e)}function pee(e){return!!(e&&"delay"in e)}class BN{constructor(t,n,r){var i;r===void 0&&(r=wit(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:a}=t,{target:o}=a;this.props=t,this.events=n,this.document=Zb(o),this.documentListeners=new Ax(this.document),this.listeners=new Ax(r),this.windowListeners=new Ax(Ks(o)),this.initialCoordinates=(i=j9(a))!=null?i:Zf,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($c.Resize,this.handleCancel),this.windowListeners.add($c.DragStart,dee),this.windowListeners.add($c.VisibilityChange,this.handleCancel),this.windowListeners.add($c.ContextMenu,dee),this.documentListeners.add($c.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(pee(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(hee(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($c.Click,Cit,{capture:!0}),this.removeTextSelection(),this.documentListeners.add($c.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:a}=this,{onMove:o,options:{activationConstraint:u}}=a;if(!i)return;const s=(n=j9(t))!=null?n:Zf,l=q_(i,s);if(!r&&u){if(hee(u)){if(u.tolerance!=null&&g7(l,u.tolerance))return this.handleCancel();if(g7(l,u.distance))return this.handleStart()}return pee(u)&&g7(l,u.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),o(s)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===gr.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Dit={move:{name:"pointermove"},end:{name:"pointerup"}};class j1e extends BN{constructor(t){const{event:n}=t,r=Zb(n.target);super(t,Dit,r)}}j1e.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 Rit={move:{name:"mousemove"},end:{name:"mouseup"}};var K9;(function(e){e[e.RightClick=2]="RightClick"})(K9||(K9={}));class kit extends BN{constructor(t){super(t,Rit,Zb(t.event.target))}}kit.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===K9.RightClick?!1:(r==null||r({event:n}),!0)}}];const v7={move:{name:"touchmove"},end:{name:"touchend"}};class Tit extends BN{constructor(t){super(t,v7)}static setup(){return window.addEventListener(v7.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(v7.move.name,t)};function t(){}}}Tit.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var Fx;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Fx||(Fx={}));var T4;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(T4||(T4={}));function Ait(e){let{acceleration:t,activator:n=Fx.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:u=T4.TreeOrder,pointerCoordinates:s,scrollableAncestors:l,scrollableAncestorRects:c,delta:f,threshold:d}=e;const p=Iit({delta:f,disabled:!a}),[g,v]=jrt(),b=I.useRef({x:0,y:0}),x=I.useRef({x:0,y:0}),S=I.useMemo(()=>{switch(n){case Fx.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case Fx.DraggableRect:return i}},[n,i,s]),E=I.useRef(null),R=I.useCallback(()=>{const D=E.current;if(!D)return;const U=b.current.x*x.current.x,k=b.current.y*x.current.y;D.scrollBy(U,k)},[]),w=I.useMemo(()=>u===T4.TreeOrder?[...l].reverse():l,[u,l]);I.useEffect(()=>{if(!a||!l.length||!S){v();return}for(const D of w){if((r==null?void 0:r(D))===!1)continue;const U=l.indexOf(D),k=c[U];if(!k)continue;const{direction:K,speed:B}=Oit(D,k,S,t,d);for(const V of["x","y"])p[V][K[V]]||(B[V]=0,K[V]=0);if(B.x>0||B.y>0){v(),E.current=D,g(R,o),b.current=B,x.current=K;return}}b.current={x:0,y:0},x.current={x:0,y:0},v()},[t,R,r,v,a,o,JSON.stringify(S),JSON.stringify(p),g,l,w,c,JSON.stringify(d)])}const Fit={x:{[Co.Backward]:!1,[Co.Forward]:!1},y:{[Co.Backward]:!1,[Co.Forward]:!1}};function Iit(e){let{delta:t,disabled:n}=e;const r=V9(t);return P3(i=>{if(n||!r||!i)return Fit;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Co.Backward]:i.x[Co.Backward]||a.x===-1,[Co.Forward]:i.x[Co.Forward]||a.x===1},y:{[Co.Backward]:i.y[Co.Backward]||a.y===-1,[Co.Forward]:i.y[Co.Forward]||a.y===1}}},[n,t,r])}function Mit(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return P3(i=>{var a;return t===null?null:(a=r??i)!=null?a:null},[r,t])}function Lit(e,t){return I.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,a=i.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,r)}));return[...n,...a]},[]),[e,t])}var U_;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(U_||(U_={}));var Z9;(function(e){e.Optimized="optimized"})(Z9||(Z9={}));const mee=new Map;function Nit(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,o]=I.useState(null),{frequency:u,measure:s,strategy:l}=i,c=I.useRef(e),f=b(),d=z_(f),p=I.useCallback(function(x){x===void 0&&(x=[]),!d.current&&o(S=>S===null?x:S.concat(x.filter(E=>!S.includes(E))))},[d]),g=I.useRef(null),v=P3(x=>{if(f&&!n)return mee;if(!x||x===mee||c.current!==e||a!=null){const S=new Map;for(let E of e){if(!E)continue;if(a&&a.length>0&&!a.includes(E.id)&&E.rect.current){S.set(E.id,E.rect.current);continue}const R=E.node.current,w=R?new QN(s(R),R):null;E.rect.current=w,w&&S.set(E.id,w)}return S}return x},[e,a,n,f,s]);return I.useEffect(()=>{c.current=e},[e]),I.useEffect(()=>{f||p()},[n,f]),I.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),I.useEffect(()=>{f||typeof u!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},u))},[u,f,p,...r]),{droppableRects:v,measureDroppableContainers:p,measuringScheduled:a!=null};function b(){switch(l){case U_.Always:return!1;case U_.BeforeDragging:return n;default:return!n}}}function W1e(e,t){return P3(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Qit(e,t){return W1e(e,t)}function Bit(e){let{callback:t,disabled:n}=e;const r=LN(t),i=I.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return I.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Qw(e){let{callback:t,disabled:n}=e;const r=LN(t),i=I.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return I.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function zit(e){return new QN(Hb(e),e)}function gee(e,t,n){t===void 0&&(t=zit);const[r,i]=I.useReducer(u,null),a=Bit({callback(s){if(e)for(const l of s){const{type:c,target:f}=l;if(c==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),o=Qw({callback:i});return Kf(()=>{i(),e?(o==null||o.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(o==null||o.disconnect(),a==null||a.disconnect())},[e]),r;function u(s){if(!e)return null;if(e.isConnected===!1){var l;return(l=s??n)!=null?l:null}const c=t(e);return JSON.stringify(s)===JSON.stringify(c)?s:c}}function qit(e){const t=W1e(e);return M1e(e,t)}const vee=[];function Uit(e){const t=I.useRef(e),n=P3(r=>e?r&&r!==vee&&e&&t.current&&e.parentNode===t.current.parentNode?r:Nw(e):vee,[e]);return I.useEffect(()=>{t.current=e},[e]),n}function Vit(e){const[t,n]=I.useState(null),r=I.useRef(e),i=I.useCallback(a=>{const o=m7(a.target);o&&n(u=>u?(u.set(o,W9(o)),new Map(u)):null)},[]);return I.useEffect(()=>{const a=r.current;if(e!==a){o(a);const u=e.map(s=>{const l=m7(s);return l?(l.addEventListener("scroll",i,{passive:!0}),[l,W9(l)]):null}).filter(s=>s!=null);n(u.length?new Map(u):null),r.current=e}return()=>{o(e),o(a)};function o(u){u.forEach(s=>{const l=m7(s);l==null||l.removeEventListener("scroll",i)})}},[i,e]),I.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>eb(a,o),Zf):q1e(e):Zf,[e,t])}function yee(e,t){t===void 0&&(t=[]);const n=I.useRef(null);return I.useEffect(()=>{n.current=null},t),I.useEffect(()=>{const r=e!==Zf;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?q_(e,n.current):Zf}function jit(e){I.useEffect(()=>{if(!Lw)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 Wit(e,t){return I.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:a}=r;return n[i]=o=>{a(o,t)},n},{}),[e,t])}function K1e(e){return I.useMemo(()=>e?git(e):null,[e])}const y7=[];function Kit(e,t){t===void 0&&(t=Hb);const[n]=e,r=K1e(n?Ks(n):null),[i,a]=I.useReducer(u,y7),o=Qw({callback:a});return e.length>0&&i===y7&&a(),Kf(()=>{e.length?e.forEach(s=>o==null?void 0:o.observe(s)):(o==null||o.disconnect(),a())},[e]),i;function u(){return e.length?e.map(s=>B1e(s)?r:new QN(t(s),s)):y7}}function Zit(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return C3(t)?t:e}function Hit(e){let{measure:t}=e;const[n,r]=I.useState(null),i=I.useCallback(l=>{for(const{target:c}of l)if(C3(c)){r(f=>{const d=t(c);return f?{...f,width:d.width,height:d.height}:d});break}},[t]),a=Qw({callback:i}),o=I.useCallback(l=>{const c=Zit(l);a==null||a.disconnect(),c&&(a==null||a.observe(c)),r(c?t(c):null)},[t,a]),[u,s]=D4(o);return I.useMemo(()=>({nodeRef:u,rect:n,setRef:s}),[n,u,s])}const Yit=[{sensor:j1e,options:{}},{sensor:V1e,options:{}}],Git={current:{}},U2={draggable:{measure:fee},droppable:{measure:fee,strategy:U_.WhileDragging,frequency:Z9.Optimized},dragOverlay:{measure:Hb}};class Ix 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 Xit={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ix,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:k4},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:U2,measureDroppableContainers:k4,windowRect:null,measuringScheduled:!1},Jit={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:k4,draggableNodes:new Map,over:null,measureDroppableContainers:k4},Bw=I.createContext(Jit),Z1e=I.createContext(Xit);function eat(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ix}}}function tat(e,t){switch(t.type){case lo.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case lo.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 lo.DragEnd:case lo.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case lo.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ix(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case lo.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const o=new Ix(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case lo.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ix(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function nat(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=I.useContext(Bw),a=V9(r),o=V9(n==null?void 0:n.id);return I.useEffect(()=>{if(!t&&!r&&a&&o!=null){if(!NN(a)||document.activeElement===a.target)return;const u=i.get(o);if(!u)return;const{activatorNode:s,node:l}=u;if(!s.current&&!l.current)return;requestAnimationFrame(()=>{for(const c of[s.current,l.current]){if(!c)continue;const f=Zrt(c);if(f){f.focus();break}}})}},[r,t,i,o,a]),null}function rat(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...r}),n):n}function iat(e){return I.useMemo(()=>({draggable:{...U2.draggable,...e==null?void 0:e.draggable},droppable:{...U2.droppable,...e==null?void 0:e.droppable},dragOverlay:{...U2.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 aat(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=I.useRef(!1),{x:o,y:u}=typeof i=="boolean"?{x:i,y:i}:i;Kf(()=>{if(!o&&!u||!t){a.current=!1;return}if(a.current||!r)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const c=n(l),f=M1e(c,r);if(o||(f.x=0),u||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const d=L1e(l);d&&d.scrollBy({top:f.y,left:f.x})}},[t,o,u,r,n])}const H1e=I.createContext({...Zf,scaleX:1,scaleY:1});var im;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(im||(im={}));const oct=I.memo(function(t){var n,r,i,a;let{id:o,accessibility:u,autoScroll:s=!0,children:l,sensors:c=Yit,collisionDetection:f=lit,measuring:d,modifiers:p,...g}=t;const v=I.useReducer(tat,void 0,eat),[b,x]=v,[S,E]=eit(),[R,w]=I.useState(im.Uninitialized),D=R===im.Initialized,{draggable:{active:U,nodes:k,translate:K},droppable:{containers:B}}=b,V=U?k.get(U):null,Z=I.useRef({initial:null,translated:null}),A=I.useMemo(()=>{var bt;return U!=null?{id:U,data:(bt=V==null?void 0:V.data)!=null?bt:Git,rect:Z}:null},[U,V]),Y=I.useRef(null),[P,L]=I.useState(null),[z,T]=I.useState(null),Q=z_(g,Object.values(g)),F=D3("DndDescribedBy",o),M=I.useMemo(()=>B.getEnabled(),[B]),H=iat(d),{droppableRects:j,measureDroppableContainers:ee,measuringScheduled:te}=Nit(M,{dragging:D,dependencies:[K.x,K.y],config:H.droppable}),re=Mit(k,U),ge=I.useMemo(()=>z?j9(z):null,[z]),ce=Tt(),ve=Qit(re,H.draggable.measure);aat({activeNode:U?k.get(U):null,config:ce.layoutShiftCompensation,initialRect:ve,measure:H.draggable.measure});const me=gee(re,H.draggable.measure,ve),_e=gee(re?re.parentElement:null),fe=I.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:B,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),se=B.getNodeFor((n=fe.current.over)==null?void 0:n.id),X=Hit({measure:H.dragOverlay.measure}),oe=(r=X.nodeRef.current)!=null?r:re,he=D?(i=X.rect)!=null?i:me:null,de=!!(X.nodeRef.current&&X.rect),ue=qit(de?null:me),pe=K1e(oe?Ks(oe):null),ye=Uit(D?se??re:null),Se=Kit(ye),De=rat(p,{transform:{x:K.x-ue.x,y:K.y-ue.y,scaleX:1,scaleY:1},activatorEvent:z,active:A,activeNodeRect:me,containerNodeRect:_e,draggingNodeRect:he,over:fe.current.over,overlayNodeRect:X.rect,scrollableAncestors:ye,scrollableAncestorRects:Se,windowRect:pe}),Ce=ge?eb(ge,K):null,Le=Vit(ye),He=yee(Le),Ae=yee(Le,[me]),Ne=eb(De,He),Je=he?dit(he,De):null,ct=A&&Je?f({active:A,collisionRect:Je,droppableRects:j,droppableContainers:M,pointerCoordinates:Ce}):null,st=I1e(ct,"id"),[Et,$t]=I.useState(null),Ht=de?De:eb(De,Ae),Vt=cit(Ht,(a=Et==null?void 0:Et.rect)!=null?a:null,me),ke=I.useCallback((bt,Xt)=>{let{sensor:rn,options:_n}=Xt;if(Y.current==null)return;const qn=k.get(Y.current);if(!qn)return;const xr=bt.nativeEvent,Te=new rn({active:Y.current,activeNode:qn,event:xr,options:_n,context:fe,onStart(je){const it=Y.current;if(it==null)return;const mt=k.get(it);if(!mt)return;const{onDragStart:Nt}=Q.current,Qt={active:{id:it,data:mt.data,rect:Z}};Yu.unstable_batchedUpdates(()=>{Nt==null||Nt(Qt),w(im.Initializing),x({type:lo.DragStart,initialCoordinates:je,active:it}),S({type:"onDragStart",event:Qt})})},onMove(je){x({type:lo.DragMove,coordinates:je})},onEnd:ze(lo.DragEnd),onCancel:ze(lo.DragCancel)});Yu.unstable_batchedUpdates(()=>{L(Te),T(bt.nativeEvent)});function ze(je){return async function(){const{active:mt,collisions:Nt,over:Qt,scrollAdjustedTranslate:At}=fe.current;let Mt=null;if(mt&&At){const{cancelDrop:St}=Q.current;Mt={activatorEvent:xr,active:mt,collisions:Nt,delta:At,over:Qt},je===lo.DragEnd&&typeof St=="function"&&await Promise.resolve(St(Mt))&&(je=lo.DragCancel)}Y.current=null,Yu.unstable_batchedUpdates(()=>{x({type:je}),w(im.Uninitialized),$t(null),L(null),T(null);const St=je===lo.DragEnd?"onDragEnd":"onDragCancel";if(Mt){const jt=Q.current[St];jt==null||jt(Mt),S({type:St,event:Mt})}})}}},[k]),Ue=I.useCallback((bt,Xt)=>(rn,_n)=>{const qn=rn.nativeEvent,xr=k.get(_n);if(Y.current!==null||!xr||qn.dndKit||qn.defaultPrevented)return;const Te={active:xr};bt(rn,Xt.options,Te)===!0&&(qn.dndKit={capturedBy:Xt.sensor},Y.current=_n,ke(rn,Xt))},[k,ke]),tt=Lit(c,Ue);jit(c),Kf(()=>{me&&R===im.Initializing&&w(im.Initialized)},[me,R]),I.useEffect(()=>{const{onDragMove:bt}=Q.current,{active:Xt,activatorEvent:rn,collisions:_n,over:qn}=fe.current;if(!Xt||!rn)return;const xr={active:Xt,activatorEvent:rn,collisions:_n,delta:{x:Ne.x,y:Ne.y},over:qn};Yu.unstable_batchedUpdates(()=>{bt==null||bt(xr),S({type:"onDragMove",event:xr})})},[Ne.x,Ne.y]),I.useEffect(()=>{const{active:bt,activatorEvent:Xt,collisions:rn,droppableContainers:_n,scrollAdjustedTranslate:qn}=fe.current;if(!bt||Y.current==null||!Xt||!qn)return;const{onDragOver:xr}=Q.current,Te=_n.get(st),ze=Te&&Te.rect.current?{id:Te.id,rect:Te.rect.current,data:Te.data,disabled:Te.disabled}:null,je={active:bt,activatorEvent:Xt,collisions:rn,delta:{x:qn.x,y:qn.y},over:ze};Yu.unstable_batchedUpdates(()=>{$t(ze),xr==null||xr(je),S({type:"onDragOver",event:je})})},[st]),Kf(()=>{fe.current={activatorEvent:z,active:A,activeNode:re,collisionRect:Je,collisions:ct,droppableRects:j,draggableNodes:k,draggingNode:oe,draggingNodeRect:he,droppableContainers:B,over:Et,scrollableAncestors:ye,scrollAdjustedTranslate:Ne},Z.current={initial:he,translated:Je}},[A,re,ct,Je,k,oe,he,j,B,Et,ye,Ne]),Ait({...ce,delta:K,draggingRect:Je,pointerCoordinates:Ce,scrollableAncestors:ye,scrollableAncestorRects:Se});const at=I.useMemo(()=>({active:A,activeNode:re,activeNodeRect:me,activatorEvent:z,collisions:ct,containerNodeRect:_e,dragOverlay:X,draggableNodes:k,droppableContainers:B,droppableRects:j,over:Et,measureDroppableContainers:ee,scrollableAncestors:ye,scrollableAncestorRects:Se,measuringConfiguration:H,measuringScheduled:te,windowRect:pe}),[A,re,me,z,ct,_e,X,k,B,j,Et,ee,ye,Se,H,te,pe]),wt=I.useMemo(()=>({activatorEvent:z,activators:tt,active:A,activeNodeRect:me,ariaDescribedById:{draggable:F},dispatch:x,draggableNodes:k,over:Et,measureDroppableContainers:ee}),[z,tt,A,me,x,F,k,Et,ee]);return $e.createElement(F1e.Provider,{value:E},$e.createElement(Bw.Provider,{value:wt},$e.createElement(Z1e.Provider,{value:at},$e.createElement(H1e.Provider,{value:Vt},l)),$e.createElement(nat,{disabled:(u==null?void 0:u.restoreFocus)===!1})),$e.createElement(rit,{...u,hiddenTextDescribedById:F}));function Tt(){const bt=(P==null?void 0:P.autoScrollEnabled)===!1,Xt=typeof s=="object"?s.enabled===!1:s===!1,rn=D&&!bt&&!Xt;return typeof s=="object"?{...s,enabled:rn}:{enabled:rn}}}),oat=I.createContext(null),bee="button",uat="Droppable";function sat(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=D3(uat),{activators:o,activatorEvent:u,active:s,activeNodeRect:l,ariaDescribedById:c,draggableNodes:f,over:d}=I.useContext(Bw),{role:p=bee,roleDescription:g="draggable",tabIndex:v=0}=i??{},b=(s==null?void 0:s.id)===t,x=I.useContext(b?H1e:oat),[S,E]=D4(),[R,w]=D4(),D=Wit(o,t),U=z_(n);Kf(()=>(f.set(t,{id:t,key:a,node:S,activatorNode:R,data:U}),()=>{const K=f.get(t);K&&K.key===a&&f.delete(t)}),[f,t]);const k=I.useMemo(()=>({role:p,tabIndex:v,"aria-disabled":r,"aria-pressed":b&&p===bee?!0:void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[r,p,v,b,g,c.draggable]);return{active:s,activatorEvent:u,activeNodeRect:l,attributes:k,isDragging:b,listeners:r?void 0:D,node:S,over:d,setNodeRef:E,setActivatorNodeRef:w,transform:x}}function lat(){return I.useContext(Z1e)}const cat="Droppable",fat={timeout:25};function dat(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=D3(cat),{active:o,dispatch:u,over:s,measureDroppableContainers:l}=I.useContext(Bw),c=I.useRef({disabled:n}),f=I.useRef(!1),d=I.useRef(null),p=I.useRef(null),{disabled:g,updateMeasurementsFor:v,timeout:b}={...fat,...i},x=z_(v??r),S=I.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(x.current)?x.current:[x.current]),p.current=null},b)},[b]),E=Qw({callback:S,disabled:g||!o}),R=I.useCallback((k,K)=>{E&&(K&&(E.unobserve(K),f.current=!1),k&&E.observe(k))},[E]),[w,D]=D4(R),U=z_(t);return I.useEffect(()=>{!E||!w.current||(E.disconnect(),f.current=!1,E.observe(w.current))},[w,E]),Kf(()=>(u({type:lo.RegisterDroppable,element:{id:r,key:a,disabled:n,node:w,rect:d,data:U}}),()=>u({type:lo.UnregisterDroppable,key:a,id:r})),[r]),I.useEffect(()=>{n!==c.current.disabled&&(u({type:lo.SetDroppableDisabled,id:r,key:a,disabled:n}),c.current.disabled=n)},[r,a,n,u]),{active:o,rect:d,isOver:(s==null?void 0:s.id)===r,node:w,over:s,setNodeRef:D}}function Y1e(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function hat(e,t){return e.reduce((n,r,i)=>{const a=t.get(r);return a&&(n[i]=a),n},Array(e.length))}function f2(e){return e!==null&&e>=0}function pat(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 mat(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const G1e=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const a=Y1e(t,r,n),o=t[i],u=a[i];return!u||!o?null:{x:u.left-o.left,y:u.top-o.top,scaleX:u.width/o.width,scaleY:u.height/o.height}},X1e="Sortable",J1e=$e.createContext({activeIndex:-1,containerId:X1e,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:G1e,disabled:{draggable:!1,droppable:!1}});function uct(e){let{children:t,id:n,items:r,strategy:i=G1e,disabled:a=!1}=e;const{active:o,dragOverlay:u,droppableRects:s,over:l,measureDroppableContainers:c}=lat(),f=D3(X1e,n),d=u.rect!==null,p=I.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),g=o!=null,v=o?p.indexOf(o.id):-1,b=l?p.indexOf(l.id):-1,x=I.useRef(p),S=!pat(p,x.current),E=b!==-1&&v===-1||S,R=mat(a);Kf(()=>{S&&g&&c(p)},[S,p,g,c]),I.useEffect(()=>{x.current=p},[p]);const w=I.useMemo(()=>({activeIndex:v,containerId:f,disabled:R,disableTransforms:E,items:p,overIndex:b,useDragOverlay:d,sortedRects:hat(p,s),strategy:i}),[v,f,R.draggable,R.droppable,E,p,b,s,d,i]);return $e.createElement(J1e.Provider,{value:w},t)}const gat=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Y1e(n,r,i).indexOf(t)},vat=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:u,previousContainerId:s,transition:l}=e;return!l||!r||u!==a&&i===o?!1:n?!0:o!==i&&t===s},yat={duration:200,easing:"ease"},ebe="transform",bat=R4.Transition.toString({property:ebe,duration:0,easing:"linear"}),Oat={roleDescription:"sortable"};function xat(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,o]=I.useState(null),u=I.useRef(n);return Kf(()=>{if(!t&&n!==u.current&&r.current){const s=i.current;if(s){const l=Hb(r.current,{ignoreTransform:!0}),c={x:s.left-l.left,y:s.top-l.top,scaleX:s.width/l.width,scaleY:s.height/l.height};(c.x||c.y)&&o(c)}}n!==u.current&&(u.current=n)},[t,n,r,i]),I.useEffect(()=>{a&&o(null)},[a]),a}function sct(e){let{animateLayoutChanges:t=vat,attributes:n,disabled:r,data:i,getNewIndex:a=gat,id:o,strategy:u,resizeObserverConfig:s,transition:l=yat}=e;const{items:c,containerId:f,activeIndex:d,disabled:p,disableTransforms:g,sortedRects:v,overIndex:b,useDragOverlay:x,strategy:S}=I.useContext(J1e),E=_at(r,p),R=c.indexOf(o),w=I.useMemo(()=>({sortable:{containerId:f,index:R,items:c},...i}),[f,i,R,c]),D=I.useMemo(()=>c.slice(c.indexOf(o)),[c,o]),{rect:U,node:k,isOver:K,setNodeRef:B}=dat({id:o,data:w,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...s}}),{active:V,activatorEvent:Z,activeNodeRect:A,attributes:Y,setNodeRef:P,listeners:L,isDragging:z,over:T,setActivatorNodeRef:Q,transform:F}=sat({id:o,data:w,attributes:{...Oat,...n},disabled:E.draggable}),M=Vrt(B,P),H=!!V,j=H&&!g&&f2(d)&&f2(b),ee=!x&&z,te=ee&&j?F:null,ge=j?te??(u??S)({rects:v,activeNodeRect:A,activeIndex:d,overIndex:b,index:R}):null,ce=f2(d)&&f2(b)?a({id:o,items:c,activeIndex:d,overIndex:b}):R,ve=V==null?void 0:V.id,me=I.useRef({activeId:ve,items:c,newIndex:ce,containerId:f}),_e=c!==me.current.items,fe=t({active:V,containerId:f,isDragging:z,isSorting:H,id:o,index:R,items:c,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:l,wasDragging:me.current.activeId!=null}),se=xat({disabled:!fe,index:R,node:k,rect:U});return I.useEffect(()=>{H&&me.current.newIndex!==ce&&(me.current.newIndex=ce),f!==me.current.containerId&&(me.current.containerId=f),c!==me.current.items&&(me.current.items=c)},[H,ce,f,c]),I.useEffect(()=>{if(ve===me.current.activeId)return;if(ve&&!me.current.activeId){me.current.activeId=ve;return}const oe=setTimeout(()=>{me.current.activeId=ve},50);return()=>clearTimeout(oe)},[ve]),{active:V,activeIndex:d,attributes:Y,data:w,rect:U,index:R,newIndex:ce,items:c,isOver:K,isSorting:H,isDragging:z,listeners:L,node:k,overIndex:b,over:T,setNodeRef:M,setActivatorNodeRef:Q,setDroppableNodeRef:B,setDraggableNodeRef:P,transform:se??ge,transition:X()};function X(){if(se||_e&&me.current.newIndex===R)return bat;if(!(ee&&!NN(Z)||!l)&&(H||fe))return R4.Transition.toString({...l,property:ebe})}}function _at(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}}function A4(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Sat=[gr.Down,gr.Right,gr.Up,gr.Left],lct=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:u}}=t;if(Sat.includes(e.code)){if(e.preventDefault(),!n||!r)return;const s=[];a.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const d=i.get(f.id);if(d)switch(e.code){case gr.Down:r.top<d.top&&s.push(f);break;case gr.Up:r.top>d.top&&s.push(f);break;case gr.Left:r.left>d.left&&s.push(f);break;case gr.Right:r.left<d.left&&s.push(f);break}});const l=uit({collisionRect:r,droppableRects:i,droppableContainers:s});let c=I1e(l,"id");if(c===(o==null?void 0:o.id)&&l.length>1&&(c=l[1].id),c!=null){const f=a.get(n.id),d=a.get(c),p=d?i.get(d.id):null,g=d==null?void 0:d.node.current;if(g&&p&&f&&d){const b=Nw(g).some((D,U)=>u[U]!==D),x=tbe(f,d),S=Eat(f,d),E=b||!x?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},R={x:p.left,y:p.top};return E.x&&E.y?R:q_(R,E)}}}};function tbe(e,t){return!A4(e)||!A4(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Eat(e,t){return!A4(e)||!A4(t)||!tbe(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var Oee=Object.prototype.hasOwnProperty;function xee(e,t,n){for(n of e.keys())if(Mx(n,t))return n}function Mx(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Mx(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=xee(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=xee(t,i),!i)||!Mx(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Oee.call(e,n)&&++r&&!Oee.call(t,n)||!(n in t)||!Mx(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function $at(e){var t=I.useRef(e),n=I.useRef(0);return Mx(e,t.current)||(t.current=e,n.current+=1),I.useMemo(function(){return t.current},[n.current])}function cct(e,t){return I.useEffect(e,$at(t))}export{Da as $,vut as A,Eut as B,iut as C,Dpe as D,h4e as E,Rst as F,FAe as G,ost as H,Yat as I,ist as J,Mut as K,f_ as L,ast as M,rst as N,Pat as O,Uut as P,Iut as Q,$e as R,RAe as S,Lut as T,qut as U,Hut as V,Xut as W,Zat as X,js as Y,zut as Z,Qut as _,dut as a,rut as a$,sst as a0,mst as a1,hst as a2,pst as a3,Zut as a4,ust as a5,put as a6,Bpe as a7,Gut as a8,Yut as a9,Nst as aA,Lst as aB,Ist as aC,Qst as aD,BL as aE,Qot as aF,Gat as aG,TFe as aH,NM as aI,xst as aJ,Lot as aK,eot as aL,tct as aM,nct as aN,nut as aO,Hot as aP,p$ as aQ,Wot as aR,rct as aS,Jat as aT,Xat as aU,tut as aV,Vot as aW,Yot as aX,Zot as aY,Xot as aZ,Jot as a_,Jut as aa,est as ab,Tst as ac,J_ as ad,tst as ae,nst as af,kst as ag,Nut as ah,Aat as ai,vst as aj,gst as ak,T$ as al,Gp as am,hh as an,jut as ao,Kut as ap,Wut as aq,Vut as ar,lst as as,cst as at,fst as au,dst as av,oot as aw,But as ax,AFe as ay,Bst as az,kPe as b,Ite as b$,eut as b0,Got as b1,Qee as b2,$ut as b3,kut as b4,wut as b5,Rut as b6,_st as b7,Fst as b8,Mot as b9,Est as bA,yst as bB,Aut as bC,uot as bD,cct as bE,$st as bF,Mst as bG,bst as bH,G7e as bI,BPe as bJ,sut as bK,zU as bL,iot as bM,rot as bN,Fat as bO,zat as bP,rx as bQ,Bf as bR,br as bS,not as bT,kot as bU,Hp as bV,Kp as bW,Hat as bX,Nat as bY,tot as bZ,a$ as b_,wst as ba,Ost as bb,ilt as bc,ect as bd,lut as be,Sst as bf,ph as bg,sGe as bh,FGe as bi,TGe as bj,Dst as bk,Cut as bl,Put as bm,Dut as bn,Tut as bo,Fut as bp,act as bq,ict as br,uct as bs,Y1e as bt,oct as bu,lct as bv,V1e as bw,j1e as bx,sct as by,R4 as bz,cut as c,Ust as c$,vre as c0,n4e as c1,qat as c2,Sot as c3,xot as c4,li as c5,w7 as c6,Mat as c7,_ot as c8,Uat as c9,_ie as cA,Aot as cB,Tot as cC,PSe as cD,Cot as cE,wot as cF,_u as cG,Eot as cH,Rot as cI,l4e as cJ,_Ee as cK,Pot as cL,Dot as cM,Out as cN,xut as cO,_ut as cP,kv as cQ,_E as cR,Si as cS,Ns as cT,tu as cU,hF as cV,oke as cW,Uf as cX,mke as cY,Sut as cZ,qst as c_,jat as ca,$ot as cb,yot as cc,SI as cd,swe as ce,G$e as cf,Wat as cg,yne as ch,mot as ci,Oot as cj,vot as ck,uE as cl,bot as cm,Bat as cn,dot as co,got as cp,b$e as cq,j$e as cr,hot as cs,ib as ct,pot as cu,U$e as cv,W$e as cw,Vat as cx,Kat as cy,Sie as cz,aut as d,flt as d$,d0e as d0,EMe as d1,zst as d2,Vst as d3,ta as d4,BI as d5,ym as d6,Wf as d7,Kst as d8,Ml as d9,Ilt as dA,zlt as dB,rN as dC,Nve as dD,EZe as dE,Mlt as dF,Nlt as dG,Llt as dH,Dlt as dI,yY as dJ,Tlt as dK,klt as dL,F_ as dM,Rlt as dN,Qlt as dO,Blt as dP,qlt as dQ,llt as dR,GWe as dS,Clt as dT,Plt as dU,wlt as dV,$lt as dW,Elt as dX,Slt as dY,rve as dZ,_lt as d_,Yst as da,Gst as db,Wst as dc,Xst as dd,yut as de,Jst as df,ult as dg,olt as dh,nlt as di,elt as dj,rlt as dk,tlt as dl,alt as dm,bI as dn,ylt as dp,slt as dq,vlt as dr,glt as ds,mlt as dt,plt as du,hlt as dv,dlt as dw,XWe as dx,Alt as dy,Flt as dz,UPe as e,clt as e0,blt as e1,xlt as e2,Olt as e3,pN as e4,Ult as e5,Vlt as e6,jlt as e7,Wlt as e8,Klt as e9,Ylt as ea,Hlt as eb,Xlt as ec,Glt as ed,Zlt as ee,Jlt as ef,Kot as eg,Hst as eh,Pst as ei,Cst as ej,Ast as ek,aFe as el,kat as em,IPe as f,fut as g,out as h,uut as i,Dat as j,hut as k,Rat as l,Bot as m,mut as n,gut as o,qot as p,zot as q,I as r,lj as s,Iot as t,Fot as u,Not as v,Tat as w,vF as x,noe as y,Xe as z};
897
+ `},nit={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 rit(e){let{announcements:t=nit,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=tit}=e;const{announce:a,announcement:o}=Xrt(),u=D3("DndLiveRegion"),[s,l]=I.useState(!1);if(I.useEffect(()=>{l(!0)},[]),Jrt(I.useMemo(()=>({onDragStart(f){let{active:d}=f;a(t.onDragStart({active:d}))},onDragMove(f){let{active:d,over:p}=f;t.onDragMove&&a(t.onDragMove({active:d,over:p}))},onDragOver(f){let{active:d,over:p}=f;a(t.onDragOver({active:d,over:p}))},onDragEnd(f){let{active:d,over:p}=f;a(t.onDragEnd({active:d,over:p}))},onDragCancel(f){let{active:d,over:p}=f;a(t.onDragCancel({active:d,over:p}))}}),[a,t])),!s)return null;const c=$e.createElement($e.Fragment,null,$e.createElement(Yrt,{id:r,value:i.draggable}),$e.createElement(Grt,{id:u,announcement:o}));return n?Yu.createPortal(c,n):c}var lo;(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"})(lo||(lo={}));function k4(){}function ict(e,t){return I.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function act(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return I.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Zf=Object.freeze({x:0,y:0});function iit(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ait(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function oit(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function cee(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function I1e(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const uit=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=cee(t),a=[];for(const o of r){const{id:u}=o,s=n.get(u);if(s){const l=cee(s),c=i.reduce((d,p,g)=>d+iit(l[g],p),0),f=Number((c/4).toFixed(4));a.push({id:u,data:{droppableContainer:o,value:f}})}}return a.sort(ait)};function sit(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,u=a-n;if(r<i&&n<a){const s=t.width*t.height,l=e.width*e.height,c=o*u,f=c/(s+l-c);return Number(f.toFixed(4))}return 0}const lit=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const a of r){const{id:o}=a,u=n.get(o);if(u){const s=sit(u,t);s>0&&i.push({id:o,data:{droppableContainer:a,value:s}})}}return i.sort(oit)};function cit(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function M1e(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Zf}function fit(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return i.reduce((o,u)=>({...o,top:o.top+e*u.y,bottom:o.bottom+e*u.y,left:o.left+e*u.x,right:o.right+e*u.x}),{...n})}}const dit=fit(1);function hit(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 pit(e,t,n){const r=hit(t);if(!r)return e;const{scaleX:i,scaleY:a,x:o,y:u}=r,s=e.left-o-(1-i)*parseFloat(n),l=e.top-u-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:c,height:f,top:l,right:s+c,bottom:l+f,left:s}}const mit={ignoreTransform:!1};function Hb(e,t){t===void 0&&(t=mit);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:c}=Ks(e).getComputedStyle(e);l&&(n=pit(n,l,c))}const{top:r,left:i,width:a,height:o,bottom:u,right:s}=n;return{top:r,left:i,width:a,height:o,bottom:u,right:s}}function fee(e){return Hb(e,{ignoreTransform:!0})}function git(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function vit(e,t){return t===void 0&&(t=Ks(e).getComputedStyle(e)),t.position==="fixed"}function yit(e,t){t===void 0&&(t=Ks(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function Nw(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(MN(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!C3(i)||T1e(i)||n.includes(i))return n;const a=Ks(e).getComputedStyle(i);return i!==e&&yit(i,a)&&n.push(i),vit(i,a)?n:r(i.parentNode)}return e?r(e):n}function L1e(e){const[t]=Nw(e,1);return t??null}function m7(e){return!Lw||!e?null:Kb(e)?e:IN(e)?MN(e)||e===Zb(e).scrollingElement?window:C3(e)?e:null:null}function N1e(e){return Kb(e)?e.scrollX:e.scrollLeft}function Q1e(e){return Kb(e)?e.scrollY:e.scrollTop}function W9(e){return{x:N1e(e),y:Q1e(e)}}var Co;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Co||(Co={}));function B1e(e){return!Lw||!e?!1:e===document.scrollingElement}function z1e(e){const t={x:0,y:0},n=B1e(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=r.y,u=e.scrollLeft>=r.x;return{isTop:i,isLeft:a,isBottom:o,isRight:u,maxScroll:r,minScroll:t}}const bit={x:.2,y:.2};function Oit(e,t,n,r,i){let{top:a,left:o,right:u,bottom:s}=n;r===void 0&&(r=10),i===void 0&&(i=bit);const{isTop:l,isBottom:c,isLeft:f,isRight:d}=z1e(e),p={x:0,y:0},g={x:0,y:0},v={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+v.height?(p.y=Co.Backward,g.y=r*Math.abs((t.top+v.height-a)/v.height)):!c&&s>=t.bottom-v.height&&(p.y=Co.Forward,g.y=r*Math.abs((t.bottom-v.height-s)/v.height)),!d&&u>=t.right-v.width?(p.x=Co.Forward,g.x=r*Math.abs((t.right-v.width-u)/v.width)):!f&&o<=t.left+v.width&&(p.x=Co.Backward,g.x=r*Math.abs((t.left+v.width-o)/v.width)),{direction:p,speed:g}}function xit(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function q1e(e){return e.reduce((t,n)=>eb(t,W9(n)),Zf)}function _it(e){return e.reduce((t,n)=>t+N1e(n),0)}function Sit(e){return e.reduce((t,n)=>t+Q1e(n),0)}function Eit(e,t){if(t===void 0&&(t=Hb),!e)return;const{top:n,left:r,bottom:i,right:a}=t(e);L1e(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const $it=[["x",["left","right"],_it],["y",["top","bottom"],Sit]];class QN{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=Nw(n),i=q1e(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,o,u]of $it)for(const s of o)Object.defineProperty(this,s,{get:()=>{const l=u(r),c=i[a]-l;return this.rect[s]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ax{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 i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function wit(e){const{EventTarget:t}=Ks(e);return e instanceof t?e:Zb(e)}function g7(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 $c;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})($c||($c={}));function dee(e){e.preventDefault()}function Cit(e){e.stopPropagation()}var gr;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(gr||(gr={}));const U1e={start:[gr.Space,gr.Enter],cancel:[gr.Esc],end:[gr.Space,gr.Enter]},Pit=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case gr.Right:return{...n,x:n.x+25};case gr.Left:return{...n,x:n.x-25};case gr.Down:return{...n,y:n.y+25};case gr.Up:return{...n,y:n.y-25}}};class V1e{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 Ax(Zb(n)),this.windowListeners=new Ax(Ks(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add($c.Resize,this.handleCancel),this.windowListeners.add($c.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add($c.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Eit(r),n(Zf)}handleKeyDown(t){if(NN(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:a=U1e,coordinateGetter:o=Pit,scrollBehavior:u="smooth"}=i,{code:s}=t;if(a.end.includes(s)){this.handleEnd(t);return}if(a.cancel.includes(s)){this.handleCancel(t);return}const{collisionRect:l}=r.current,c=l?{x:l.left,y:l.top}:Zf;this.referenceCoordinates||(this.referenceCoordinates=c);const f=o(t,{active:n,context:r.current,currentCoordinates:c});if(f){const d=q_(f,c),p={x:0,y:0},{scrollableAncestors:g}=r.current;for(const v of g){const b=t.code,{isTop:x,isRight:S,isLeft:E,isBottom:R,maxScroll:w,minScroll:D}=z1e(v),U=xit(v),k={x:Math.min(b===gr.Right?U.right-U.width/2:U.right,Math.max(b===gr.Right?U.left:U.left+U.width/2,f.x)),y:Math.min(b===gr.Down?U.bottom-U.height/2:U.bottom,Math.max(b===gr.Down?U.top:U.top+U.height/2,f.y))},K=b===gr.Right&&!S||b===gr.Left&&!E,B=b===gr.Down&&!R||b===gr.Up&&!x;if(K&&k.x!==f.x){const V=v.scrollLeft+d.x,Z=b===gr.Right&&V<=w.x||b===gr.Left&&V>=D.x;if(Z&&!d.y){v.scrollTo({left:V,behavior:u});return}Z?p.x=v.scrollLeft-V:p.x=b===gr.Right?v.scrollLeft-w.x:v.scrollLeft-D.x,p.x&&v.scrollBy({left:-p.x,behavior:u});break}else if(B&&k.y!==f.y){const V=v.scrollTop+d.y,Z=b===gr.Down&&V<=w.y||b===gr.Up&&V>=D.y;if(Z&&!d.x){v.scrollTo({top:V,behavior:u});return}Z?p.y=v.scrollTop-V:p.y=b===gr.Down?v.scrollTop-w.y:v.scrollTop-D.y,p.y&&v.scrollBy({top:-p.y,behavior:u});break}}this.handleMove(t,eb(q_(f,this.referenceCoordinates),p))}}}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()}}V1e.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=U1e,onActivation:i}=t,{active:a}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const u=a.activatorNode.current;return u&&e.target!==u?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function hee(e){return!!(e&&"distance"in e)}function pee(e){return!!(e&&"delay"in e)}class BN{constructor(t,n,r){var i;r===void 0&&(r=wit(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:a}=t,{target:o}=a;this.props=t,this.events=n,this.document=Zb(o),this.documentListeners=new Ax(this.document),this.listeners=new Ax(r),this.windowListeners=new Ax(Ks(o)),this.initialCoordinates=(i=j9(a))!=null?i:Zf,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($c.Resize,this.handleCancel),this.windowListeners.add($c.DragStart,dee),this.windowListeners.add($c.VisibilityChange,this.handleCancel),this.windowListeners.add($c.ContextMenu,dee),this.documentListeners.add($c.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(pee(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(hee(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($c.Click,Cit,{capture:!0}),this.removeTextSelection(),this.documentListeners.add($c.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:a}=this,{onMove:o,options:{activationConstraint:u}}=a;if(!i)return;const s=(n=j9(t))!=null?n:Zf,l=q_(i,s);if(!r&&u){if(hee(u)){if(u.tolerance!=null&&g7(l,u.tolerance))return this.handleCancel();if(g7(l,u.distance))return this.handleStart()}return pee(u)&&g7(l,u.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),o(s)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===gr.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Dit={move:{name:"pointermove"},end:{name:"pointerup"}};class j1e extends BN{constructor(t){const{event:n}=t,r=Zb(n.target);super(t,Dit,r)}}j1e.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 Rit={move:{name:"mousemove"},end:{name:"mouseup"}};var K9;(function(e){e[e.RightClick=2]="RightClick"})(K9||(K9={}));class kit extends BN{constructor(t){super(t,Rit,Zb(t.event.target))}}kit.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===K9.RightClick?!1:(r==null||r({event:n}),!0)}}];const v7={move:{name:"touchmove"},end:{name:"touchend"}};class Tit extends BN{constructor(t){super(t,v7)}static setup(){return window.addEventListener(v7.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(v7.move.name,t)};function t(){}}}Tit.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var Fx;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Fx||(Fx={}));var T4;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(T4||(T4={}));function Ait(e){let{acceleration:t,activator:n=Fx.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:u=T4.TreeOrder,pointerCoordinates:s,scrollableAncestors:l,scrollableAncestorRects:c,delta:f,threshold:d}=e;const p=Iit({delta:f,disabled:!a}),[g,v]=jrt(),b=I.useRef({x:0,y:0}),x=I.useRef({x:0,y:0}),S=I.useMemo(()=>{switch(n){case Fx.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case Fx.DraggableRect:return i}},[n,i,s]),E=I.useRef(null),R=I.useCallback(()=>{const D=E.current;if(!D)return;const U=b.current.x*x.current.x,k=b.current.y*x.current.y;D.scrollBy(U,k)},[]),w=I.useMemo(()=>u===T4.TreeOrder?[...l].reverse():l,[u,l]);I.useEffect(()=>{if(!a||!l.length||!S){v();return}for(const D of w){if((r==null?void 0:r(D))===!1)continue;const U=l.indexOf(D),k=c[U];if(!k)continue;const{direction:K,speed:B}=Oit(D,k,S,t,d);for(const V of["x","y"])p[V][K[V]]||(B[V]=0,K[V]=0);if(B.x>0||B.y>0){v(),E.current=D,g(R,o),b.current=B,x.current=K;return}}b.current={x:0,y:0},x.current={x:0,y:0},v()},[t,R,r,v,a,o,JSON.stringify(S),JSON.stringify(p),g,l,w,c,JSON.stringify(d)])}const Fit={x:{[Co.Backward]:!1,[Co.Forward]:!1},y:{[Co.Backward]:!1,[Co.Forward]:!1}};function Iit(e){let{delta:t,disabled:n}=e;const r=V9(t);return P3(i=>{if(n||!r||!i)return Fit;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Co.Backward]:i.x[Co.Backward]||a.x===-1,[Co.Forward]:i.x[Co.Forward]||a.x===1},y:{[Co.Backward]:i.y[Co.Backward]||a.y===-1,[Co.Forward]:i.y[Co.Forward]||a.y===1}}},[n,t,r])}function Mit(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return P3(i=>{var a;return t===null?null:(a=r??i)!=null?a:null},[r,t])}function Lit(e,t){return I.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,a=i.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,r)}));return[...n,...a]},[]),[e,t])}var U_;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(U_||(U_={}));var Z9;(function(e){e.Optimized="optimized"})(Z9||(Z9={}));const mee=new Map;function Nit(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,o]=I.useState(null),{frequency:u,measure:s,strategy:l}=i,c=I.useRef(e),f=b(),d=z_(f),p=I.useCallback(function(x){x===void 0&&(x=[]),!d.current&&o(S=>S===null?x:S.concat(x.filter(E=>!S.includes(E))))},[d]),g=I.useRef(null),v=P3(x=>{if(f&&!n)return mee;if(!x||x===mee||c.current!==e||a!=null){const S=new Map;for(let E of e){if(!E)continue;if(a&&a.length>0&&!a.includes(E.id)&&E.rect.current){S.set(E.id,E.rect.current);continue}const R=E.node.current,w=R?new QN(s(R),R):null;E.rect.current=w,w&&S.set(E.id,w)}return S}return x},[e,a,n,f,s]);return I.useEffect(()=>{c.current=e},[e]),I.useEffect(()=>{f||p()},[n,f]),I.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),I.useEffect(()=>{f||typeof u!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},u))},[u,f,p,...r]),{droppableRects:v,measureDroppableContainers:p,measuringScheduled:a!=null};function b(){switch(l){case U_.Always:return!1;case U_.BeforeDragging:return n;default:return!n}}}function W1e(e,t){return P3(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Qit(e,t){return W1e(e,t)}function Bit(e){let{callback:t,disabled:n}=e;const r=LN(t),i=I.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return I.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Qw(e){let{callback:t,disabled:n}=e;const r=LN(t),i=I.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return I.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function zit(e){return new QN(Hb(e),e)}function gee(e,t,n){t===void 0&&(t=zit);const[r,i]=I.useReducer(u,null),a=Bit({callback(s){if(e)for(const l of s){const{type:c,target:f}=l;if(c==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),o=Qw({callback:i});return Kf(()=>{i(),e?(o==null||o.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(o==null||o.disconnect(),a==null||a.disconnect())},[e]),r;function u(s){if(!e)return null;if(e.isConnected===!1){var l;return(l=s??n)!=null?l:null}const c=t(e);return JSON.stringify(s)===JSON.stringify(c)?s:c}}function qit(e){const t=W1e(e);return M1e(e,t)}const vee=[];function Uit(e){const t=I.useRef(e),n=P3(r=>e?r&&r!==vee&&e&&t.current&&e.parentNode===t.current.parentNode?r:Nw(e):vee,[e]);return I.useEffect(()=>{t.current=e},[e]),n}function Vit(e){const[t,n]=I.useState(null),r=I.useRef(e),i=I.useCallback(a=>{const o=m7(a.target);o&&n(u=>u?(u.set(o,W9(o)),new Map(u)):null)},[]);return I.useEffect(()=>{const a=r.current;if(e!==a){o(a);const u=e.map(s=>{const l=m7(s);return l?(l.addEventListener("scroll",i,{passive:!0}),[l,W9(l)]):null}).filter(s=>s!=null);n(u.length?new Map(u):null),r.current=e}return()=>{o(e),o(a)};function o(u){u.forEach(s=>{const l=m7(s);l==null||l.removeEventListener("scroll",i)})}},[i,e]),I.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>eb(a,o),Zf):q1e(e):Zf,[e,t])}function yee(e,t){t===void 0&&(t=[]);const n=I.useRef(null);return I.useEffect(()=>{n.current=null},t),I.useEffect(()=>{const r=e!==Zf;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?q_(e,n.current):Zf}function jit(e){I.useEffect(()=>{if(!Lw)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 Wit(e,t){return I.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:a}=r;return n[i]=o=>{a(o,t)},n},{}),[e,t])}function K1e(e){return I.useMemo(()=>e?git(e):null,[e])}const y7=[];function Kit(e,t){t===void 0&&(t=Hb);const[n]=e,r=K1e(n?Ks(n):null),[i,a]=I.useReducer(u,y7),o=Qw({callback:a});return e.length>0&&i===y7&&a(),Kf(()=>{e.length?e.forEach(s=>o==null?void 0:o.observe(s)):(o==null||o.disconnect(),a())},[e]),i;function u(){return e.length?e.map(s=>B1e(s)?r:new QN(t(s),s)):y7}}function Zit(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return C3(t)?t:e}function Hit(e){let{measure:t}=e;const[n,r]=I.useState(null),i=I.useCallback(l=>{for(const{target:c}of l)if(C3(c)){r(f=>{const d=t(c);return f?{...f,width:d.width,height:d.height}:d});break}},[t]),a=Qw({callback:i}),o=I.useCallback(l=>{const c=Zit(l);a==null||a.disconnect(),c&&(a==null||a.observe(c)),r(c?t(c):null)},[t,a]),[u,s]=D4(o);return I.useMemo(()=>({nodeRef:u,rect:n,setRef:s}),[n,u,s])}const Yit=[{sensor:j1e,options:{}},{sensor:V1e,options:{}}],Git={current:{}},U2={draggable:{measure:fee},droppable:{measure:fee,strategy:U_.WhileDragging,frequency:Z9.Optimized},dragOverlay:{measure:Hb}};class Ix 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 Xit={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ix,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:k4},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:U2,measureDroppableContainers:k4,windowRect:null,measuringScheduled:!1},Jit={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:k4,draggableNodes:new Map,over:null,measureDroppableContainers:k4},Bw=I.createContext(Jit),Z1e=I.createContext(Xit);function eat(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ix}}}function tat(e,t){switch(t.type){case lo.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case lo.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 lo.DragEnd:case lo.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case lo.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ix(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case lo.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const o=new Ix(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case lo.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ix(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function nat(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=I.useContext(Bw),a=V9(r),o=V9(n==null?void 0:n.id);return I.useEffect(()=>{if(!t&&!r&&a&&o!=null){if(!NN(a)||document.activeElement===a.target)return;const u=i.get(o);if(!u)return;const{activatorNode:s,node:l}=u;if(!s.current&&!l.current)return;requestAnimationFrame(()=>{for(const c of[s.current,l.current]){if(!c)continue;const f=Zrt(c);if(f){f.focus();break}}})}},[r,t,i,o,a]),null}function rat(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...r}),n):n}function iat(e){return I.useMemo(()=>({draggable:{...U2.draggable,...e==null?void 0:e.draggable},droppable:{...U2.droppable,...e==null?void 0:e.droppable},dragOverlay:{...U2.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 aat(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=I.useRef(!1),{x:o,y:u}=typeof i=="boolean"?{x:i,y:i}:i;Kf(()=>{if(!o&&!u||!t){a.current=!1;return}if(a.current||!r)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const c=n(l),f=M1e(c,r);if(o||(f.x=0),u||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const d=L1e(l);d&&d.scrollBy({top:f.y,left:f.x})}},[t,o,u,r,n])}const H1e=I.createContext({...Zf,scaleX:1,scaleY:1});var im;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(im||(im={}));const oct=I.memo(function(t){var n,r,i,a;let{id:o,accessibility:u,autoScroll:s=!0,children:l,sensors:c=Yit,collisionDetection:f=lit,measuring:d,modifiers:p,...g}=t;const v=I.useReducer(tat,void 0,eat),[b,x]=v,[S,E]=eit(),[R,w]=I.useState(im.Uninitialized),D=R===im.Initialized,{draggable:{active:U,nodes:k,translate:K},droppable:{containers:B}}=b,V=U?k.get(U):null,Z=I.useRef({initial:null,translated:null}),A=I.useMemo(()=>{var bt;return U!=null?{id:U,data:(bt=V==null?void 0:V.data)!=null?bt:Git,rect:Z}:null},[U,V]),Y=I.useRef(null),[P,L]=I.useState(null),[z,T]=I.useState(null),Q=z_(g,Object.values(g)),F=D3("DndDescribedBy",o),M=I.useMemo(()=>B.getEnabled(),[B]),H=iat(d),{droppableRects:j,measureDroppableContainers:ee,measuringScheduled:te}=Nit(M,{dragging:D,dependencies:[K.x,K.y],config:H.droppable}),re=Mit(k,U),ge=I.useMemo(()=>z?j9(z):null,[z]),ce=Tt(),ve=Qit(re,H.draggable.measure);aat({activeNode:U?k.get(U):null,config:ce.layoutShiftCompensation,initialRect:ve,measure:H.draggable.measure});const me=gee(re,H.draggable.measure,ve),_e=gee(re?re.parentElement:null),fe=I.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:B,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),se=B.getNodeFor((n=fe.current.over)==null?void 0:n.id),X=Hit({measure:H.dragOverlay.measure}),oe=(r=X.nodeRef.current)!=null?r:re,he=D?(i=X.rect)!=null?i:me:null,de=!!(X.nodeRef.current&&X.rect),ue=qit(de?null:me),pe=K1e(oe?Ks(oe):null),ye=Uit(D?se??re:null),Se=Kit(ye),De=rat(p,{transform:{x:K.x-ue.x,y:K.y-ue.y,scaleX:1,scaleY:1},activatorEvent:z,active:A,activeNodeRect:me,containerNodeRect:_e,draggingNodeRect:he,over:fe.current.over,overlayNodeRect:X.rect,scrollableAncestors:ye,scrollableAncestorRects:Se,windowRect:pe}),Ce=ge?eb(ge,K):null,Le=Vit(ye),He=yee(Le),Ae=yee(Le,[me]),Ne=eb(De,He),Je=he?dit(he,De):null,ct=A&&Je?f({active:A,collisionRect:Je,droppableRects:j,droppableContainers:M,pointerCoordinates:Ce}):null,st=I1e(ct,"id"),[Et,$t]=I.useState(null),Ht=de?De:eb(De,Ae),Vt=cit(Ht,(a=Et==null?void 0:Et.rect)!=null?a:null,me),ke=I.useCallback((bt,Xt)=>{let{sensor:rn,options:_n}=Xt;if(Y.current==null)return;const qn=k.get(Y.current);if(!qn)return;const xr=bt.nativeEvent,Te=new rn({active:Y.current,activeNode:qn,event:xr,options:_n,context:fe,onStart(je){const it=Y.current;if(it==null)return;const mt=k.get(it);if(!mt)return;const{onDragStart:Nt}=Q.current,Qt={active:{id:it,data:mt.data,rect:Z}};Yu.unstable_batchedUpdates(()=>{Nt==null||Nt(Qt),w(im.Initializing),x({type:lo.DragStart,initialCoordinates:je,active:it}),S({type:"onDragStart",event:Qt})})},onMove(je){x({type:lo.DragMove,coordinates:je})},onEnd:ze(lo.DragEnd),onCancel:ze(lo.DragCancel)});Yu.unstable_batchedUpdates(()=>{L(Te),T(bt.nativeEvent)});function ze(je){return async function(){const{active:mt,collisions:Nt,over:Qt,scrollAdjustedTranslate:At}=fe.current;let Mt=null;if(mt&&At){const{cancelDrop:St}=Q.current;Mt={activatorEvent:xr,active:mt,collisions:Nt,delta:At,over:Qt},je===lo.DragEnd&&typeof St=="function"&&await Promise.resolve(St(Mt))&&(je=lo.DragCancel)}Y.current=null,Yu.unstable_batchedUpdates(()=>{x({type:je}),w(im.Uninitialized),$t(null),L(null),T(null);const St=je===lo.DragEnd?"onDragEnd":"onDragCancel";if(Mt){const jt=Q.current[St];jt==null||jt(Mt),S({type:St,event:Mt})}})}}},[k]),Ue=I.useCallback((bt,Xt)=>(rn,_n)=>{const qn=rn.nativeEvent,xr=k.get(_n);if(Y.current!==null||!xr||qn.dndKit||qn.defaultPrevented)return;const Te={active:xr};bt(rn,Xt.options,Te)===!0&&(qn.dndKit={capturedBy:Xt.sensor},Y.current=_n,ke(rn,Xt))},[k,ke]),tt=Lit(c,Ue);jit(c),Kf(()=>{me&&R===im.Initializing&&w(im.Initialized)},[me,R]),I.useEffect(()=>{const{onDragMove:bt}=Q.current,{active:Xt,activatorEvent:rn,collisions:_n,over:qn}=fe.current;if(!Xt||!rn)return;const xr={active:Xt,activatorEvent:rn,collisions:_n,delta:{x:Ne.x,y:Ne.y},over:qn};Yu.unstable_batchedUpdates(()=>{bt==null||bt(xr),S({type:"onDragMove",event:xr})})},[Ne.x,Ne.y]),I.useEffect(()=>{const{active:bt,activatorEvent:Xt,collisions:rn,droppableContainers:_n,scrollAdjustedTranslate:qn}=fe.current;if(!bt||Y.current==null||!Xt||!qn)return;const{onDragOver:xr}=Q.current,Te=_n.get(st),ze=Te&&Te.rect.current?{id:Te.id,rect:Te.rect.current,data:Te.data,disabled:Te.disabled}:null,je={active:bt,activatorEvent:Xt,collisions:rn,delta:{x:qn.x,y:qn.y},over:ze};Yu.unstable_batchedUpdates(()=>{$t(ze),xr==null||xr(je),S({type:"onDragOver",event:je})})},[st]),Kf(()=>{fe.current={activatorEvent:z,active:A,activeNode:re,collisionRect:Je,collisions:ct,droppableRects:j,draggableNodes:k,draggingNode:oe,draggingNodeRect:he,droppableContainers:B,over:Et,scrollableAncestors:ye,scrollAdjustedTranslate:Ne},Z.current={initial:he,translated:Je}},[A,re,ct,Je,k,oe,he,j,B,Et,ye,Ne]),Ait({...ce,delta:K,draggingRect:Je,pointerCoordinates:Ce,scrollableAncestors:ye,scrollableAncestorRects:Se});const at=I.useMemo(()=>({active:A,activeNode:re,activeNodeRect:me,activatorEvent:z,collisions:ct,containerNodeRect:_e,dragOverlay:X,draggableNodes:k,droppableContainers:B,droppableRects:j,over:Et,measureDroppableContainers:ee,scrollableAncestors:ye,scrollableAncestorRects:Se,measuringConfiguration:H,measuringScheduled:te,windowRect:pe}),[A,re,me,z,ct,_e,X,k,B,j,Et,ee,ye,Se,H,te,pe]),wt=I.useMemo(()=>({activatorEvent:z,activators:tt,active:A,activeNodeRect:me,ariaDescribedById:{draggable:F},dispatch:x,draggableNodes:k,over:Et,measureDroppableContainers:ee}),[z,tt,A,me,x,F,k,Et,ee]);return $e.createElement(F1e.Provider,{value:E},$e.createElement(Bw.Provider,{value:wt},$e.createElement(Z1e.Provider,{value:at},$e.createElement(H1e.Provider,{value:Vt},l)),$e.createElement(nat,{disabled:(u==null?void 0:u.restoreFocus)===!1})),$e.createElement(rit,{...u,hiddenTextDescribedById:F}));function Tt(){const bt=(P==null?void 0:P.autoScrollEnabled)===!1,Xt=typeof s=="object"?s.enabled===!1:s===!1,rn=D&&!bt&&!Xt;return typeof s=="object"?{...s,enabled:rn}:{enabled:rn}}}),oat=I.createContext(null),bee="button",uat="Droppable";function sat(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=D3(uat),{activators:o,activatorEvent:u,active:s,activeNodeRect:l,ariaDescribedById:c,draggableNodes:f,over:d}=I.useContext(Bw),{role:p=bee,roleDescription:g="draggable",tabIndex:v=0}=i??{},b=(s==null?void 0:s.id)===t,x=I.useContext(b?H1e:oat),[S,E]=D4(),[R,w]=D4(),D=Wit(o,t),U=z_(n);Kf(()=>(f.set(t,{id:t,key:a,node:S,activatorNode:R,data:U}),()=>{const K=f.get(t);K&&K.key===a&&f.delete(t)}),[f,t]);const k=I.useMemo(()=>({role:p,tabIndex:v,"aria-disabled":r,"aria-pressed":b&&p===bee?!0:void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[r,p,v,b,g,c.draggable]);return{active:s,activatorEvent:u,activeNodeRect:l,attributes:k,isDragging:b,listeners:r?void 0:D,node:S,over:d,setNodeRef:E,setActivatorNodeRef:w,transform:x}}function lat(){return I.useContext(Z1e)}const cat="Droppable",fat={timeout:25};function dat(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=D3(cat),{active:o,dispatch:u,over:s,measureDroppableContainers:l}=I.useContext(Bw),c=I.useRef({disabled:n}),f=I.useRef(!1),d=I.useRef(null),p=I.useRef(null),{disabled:g,updateMeasurementsFor:v,timeout:b}={...fat,...i},x=z_(v??r),S=I.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(x.current)?x.current:[x.current]),p.current=null},b)},[b]),E=Qw({callback:S,disabled:g||!o}),R=I.useCallback((k,K)=>{E&&(K&&(E.unobserve(K),f.current=!1),k&&E.observe(k))},[E]),[w,D]=D4(R),U=z_(t);return I.useEffect(()=>{!E||!w.current||(E.disconnect(),f.current=!1,E.observe(w.current))},[w,E]),Kf(()=>(u({type:lo.RegisterDroppable,element:{id:r,key:a,disabled:n,node:w,rect:d,data:U}}),()=>u({type:lo.UnregisterDroppable,key:a,id:r})),[r]),I.useEffect(()=>{n!==c.current.disabled&&(u({type:lo.SetDroppableDisabled,id:r,key:a,disabled:n}),c.current.disabled=n)},[r,a,n,u]),{active:o,rect:d,isOver:(s==null?void 0:s.id)===r,node:w,over:s,setNodeRef:D}}function Y1e(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function hat(e,t){return e.reduce((n,r,i)=>{const a=t.get(r);return a&&(n[i]=a),n},Array(e.length))}function f2(e){return e!==null&&e>=0}function pat(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 mat(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const G1e=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const a=Y1e(t,r,n),o=t[i],u=a[i];return!u||!o?null:{x:u.left-o.left,y:u.top-o.top,scaleX:u.width/o.width,scaleY:u.height/o.height}},X1e="Sortable",J1e=$e.createContext({activeIndex:-1,containerId:X1e,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:G1e,disabled:{draggable:!1,droppable:!1}});function uct(e){let{children:t,id:n,items:r,strategy:i=G1e,disabled:a=!1}=e;const{active:o,dragOverlay:u,droppableRects:s,over:l,measureDroppableContainers:c}=lat(),f=D3(X1e,n),d=u.rect!==null,p=I.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),g=o!=null,v=o?p.indexOf(o.id):-1,b=l?p.indexOf(l.id):-1,x=I.useRef(p),S=!pat(p,x.current),E=b!==-1&&v===-1||S,R=mat(a);Kf(()=>{S&&g&&c(p)},[S,p,g,c]),I.useEffect(()=>{x.current=p},[p]);const w=I.useMemo(()=>({activeIndex:v,containerId:f,disabled:R,disableTransforms:E,items:p,overIndex:b,useDragOverlay:d,sortedRects:hat(p,s),strategy:i}),[v,f,R.draggable,R.droppable,E,p,b,s,d,i]);return $e.createElement(J1e.Provider,{value:w},t)}const gat=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Y1e(n,r,i).indexOf(t)},vat=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:u,previousContainerId:s,transition:l}=e;return!l||!r||u!==a&&i===o?!1:n?!0:o!==i&&t===s},yat={duration:200,easing:"ease"},ebe="transform",bat=R4.Transition.toString({property:ebe,duration:0,easing:"linear"}),Oat={roleDescription:"sortable"};function xat(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,o]=I.useState(null),u=I.useRef(n);return Kf(()=>{if(!t&&n!==u.current&&r.current){const s=i.current;if(s){const l=Hb(r.current,{ignoreTransform:!0}),c={x:s.left-l.left,y:s.top-l.top,scaleX:s.width/l.width,scaleY:s.height/l.height};(c.x||c.y)&&o(c)}}n!==u.current&&(u.current=n)},[t,n,r,i]),I.useEffect(()=>{a&&o(null)},[a]),a}function sct(e){let{animateLayoutChanges:t=vat,attributes:n,disabled:r,data:i,getNewIndex:a=gat,id:o,strategy:u,resizeObserverConfig:s,transition:l=yat}=e;const{items:c,containerId:f,activeIndex:d,disabled:p,disableTransforms:g,sortedRects:v,overIndex:b,useDragOverlay:x,strategy:S}=I.useContext(J1e),E=_at(r,p),R=c.indexOf(o),w=I.useMemo(()=>({sortable:{containerId:f,index:R,items:c},...i}),[f,i,R,c]),D=I.useMemo(()=>c.slice(c.indexOf(o)),[c,o]),{rect:U,node:k,isOver:K,setNodeRef:B}=dat({id:o,data:w,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...s}}),{active:V,activatorEvent:Z,activeNodeRect:A,attributes:Y,setNodeRef:P,listeners:L,isDragging:z,over:T,setActivatorNodeRef:Q,transform:F}=sat({id:o,data:w,attributes:{...Oat,...n},disabled:E.draggable}),M=Vrt(B,P),H=!!V,j=H&&!g&&f2(d)&&f2(b),ee=!x&&z,te=ee&&j?F:null,ge=j?te??(u??S)({rects:v,activeNodeRect:A,activeIndex:d,overIndex:b,index:R}):null,ce=f2(d)&&f2(b)?a({id:o,items:c,activeIndex:d,overIndex:b}):R,ve=V==null?void 0:V.id,me=I.useRef({activeId:ve,items:c,newIndex:ce,containerId:f}),_e=c!==me.current.items,fe=t({active:V,containerId:f,isDragging:z,isSorting:H,id:o,index:R,items:c,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:l,wasDragging:me.current.activeId!=null}),se=xat({disabled:!fe,index:R,node:k,rect:U});return I.useEffect(()=>{H&&me.current.newIndex!==ce&&(me.current.newIndex=ce),f!==me.current.containerId&&(me.current.containerId=f),c!==me.current.items&&(me.current.items=c)},[H,ce,f,c]),I.useEffect(()=>{if(ve===me.current.activeId)return;if(ve&&!me.current.activeId){me.current.activeId=ve;return}const oe=setTimeout(()=>{me.current.activeId=ve},50);return()=>clearTimeout(oe)},[ve]),{active:V,activeIndex:d,attributes:Y,data:w,rect:U,index:R,newIndex:ce,items:c,isOver:K,isSorting:H,isDragging:z,listeners:L,node:k,overIndex:b,over:T,setNodeRef:M,setActivatorNodeRef:Q,setDroppableNodeRef:B,setDraggableNodeRef:P,transform:se??ge,transition:X()};function X(){if(se||_e&&me.current.newIndex===R)return bat;if(!(ee&&!NN(Z)||!l)&&(H||fe))return R4.Transition.toString({...l,property:ebe})}}function _at(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}}function A4(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Sat=[gr.Down,gr.Right,gr.Up,gr.Left],lct=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:u}}=t;if(Sat.includes(e.code)){if(e.preventDefault(),!n||!r)return;const s=[];a.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const d=i.get(f.id);if(d)switch(e.code){case gr.Down:r.top<d.top&&s.push(f);break;case gr.Up:r.top>d.top&&s.push(f);break;case gr.Left:r.left>d.left&&s.push(f);break;case gr.Right:r.left<d.left&&s.push(f);break}});const l=uit({collisionRect:r,droppableRects:i,droppableContainers:s});let c=I1e(l,"id");if(c===(o==null?void 0:o.id)&&l.length>1&&(c=l[1].id),c!=null){const f=a.get(n.id),d=a.get(c),p=d?i.get(d.id):null,g=d==null?void 0:d.node.current;if(g&&p&&f&&d){const b=Nw(g).some((D,U)=>u[U]!==D),x=tbe(f,d),S=Eat(f,d),E=b||!x?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},R={x:p.left,y:p.top};return E.x&&E.y?R:q_(R,E)}}}};function tbe(e,t){return!A4(e)||!A4(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Eat(e,t){return!A4(e)||!A4(t)||!tbe(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var Oee=Object.prototype.hasOwnProperty;function xee(e,t,n){for(n of e.keys())if(Mx(n,t))return n}function Mx(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Mx(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=xee(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=xee(t,i),!i)||!Mx(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Oee.call(e,n)&&++r&&!Oee.call(t,n)||!(n in t)||!Mx(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function $at(e){var t=I.useRef(e),n=I.useRef(0);return Mx(e,t.current)||(t.current=e,n.current+=1),I.useMemo(function(){return t.current},[n.current])}function cct(e,t){return I.useEffect(e,$at(t))}export{Da as $,vut as A,Eut as B,iut as C,Dpe as D,h4e as E,Rst as F,FAe as G,ost as H,Zat as I,Yat as J,ist as K,f_ as L,Mut as M,ast as N,rst as O,Pat as P,Uut as Q,$e as R,Iut as S,RAe as T,Lut as U,qut as V,Hut as W,Xut as X,js as Y,zut as Z,Qut as _,dut as a,rut as a$,sst as a0,mst as a1,hst as a2,pst as a3,Zut as a4,ust as a5,put as a6,Bpe as a7,Gut as a8,Yut as a9,Nst as aA,Lst as aB,Ist as aC,Qst as aD,BL as aE,Qot as aF,Gat as aG,TFe as aH,NM as aI,xst as aJ,Lot as aK,eot as aL,tct as aM,nct as aN,nut as aO,Hot as aP,p$ as aQ,Wot as aR,rct as aS,Jat as aT,Xat as aU,tut as aV,Vot as aW,Yot as aX,Zot as aY,Xot as aZ,Jot as a_,Jut as aa,est as ab,Tst as ac,J_ as ad,tst as ae,nst as af,kst as ag,Nut as ah,Aat as ai,vst as aj,gst as ak,T$ as al,Gp as am,hh as an,jut as ao,Kut as ap,Wut as aq,Vut as ar,lst as as,cst as at,fst as au,dst as av,oot as aw,But as ax,AFe as ay,Bst as az,kPe as b,Ite as b$,eut as b0,Got as b1,Qee as b2,$ut as b3,kut as b4,wut as b5,Rut as b6,_st as b7,Fst as b8,Mot as b9,Est as bA,yst as bB,Aut as bC,uot as bD,cct as bE,$st as bF,Mst as bG,bst as bH,G7e as bI,BPe as bJ,sut as bK,zU as bL,iot as bM,rot as bN,Fat as bO,zat as bP,rx as bQ,Bf as bR,br as bS,not as bT,kot as bU,Hp as bV,Kp as bW,Hat as bX,Nat as bY,tot as bZ,a$ as b_,wst as ba,Ost as bb,ilt as bc,ect as bd,lut as be,Sst as bf,ph as bg,sGe as bh,FGe as bi,TGe as bj,Dst as bk,Cut as bl,Put as bm,Dut as bn,Tut as bo,Fut as bp,act as bq,ict as br,uct as bs,Y1e as bt,oct as bu,lct as bv,V1e as bw,j1e as bx,sct as by,R4 as bz,cut as c,Ust as c$,vre as c0,n4e as c1,qat as c2,Sot as c3,xot as c4,li as c5,w7 as c6,Mat as c7,_ot as c8,Uat as c9,_ie as cA,Aot as cB,Tot as cC,PSe as cD,Cot as cE,wot as cF,_u as cG,Eot as cH,Rot as cI,l4e as cJ,_Ee as cK,Pot as cL,Dot as cM,Out as cN,xut as cO,_ut as cP,kv as cQ,_E as cR,Si as cS,Ns as cT,tu as cU,hF as cV,oke as cW,Uf as cX,mke as cY,Sut as cZ,qst as c_,jat as ca,$ot as cb,yot as cc,SI as cd,swe as ce,G$e as cf,Wat as cg,yne as ch,mot as ci,Oot as cj,vot as ck,uE as cl,bot as cm,Bat as cn,dot as co,got as cp,b$e as cq,j$e as cr,hot as cs,ib as ct,pot as cu,U$e as cv,W$e as cw,Vat as cx,Kat as cy,Sie as cz,aut as d,flt as d$,d0e as d0,EMe as d1,zst as d2,Vst as d3,ta as d4,BI as d5,ym as d6,Wf as d7,Kst as d8,Ml as d9,Ilt as dA,zlt as dB,rN as dC,Nve as dD,EZe as dE,Mlt as dF,Nlt as dG,Llt as dH,Dlt as dI,yY as dJ,Tlt as dK,klt as dL,F_ as dM,Rlt as dN,Qlt as dO,Blt as dP,qlt as dQ,llt as dR,GWe as dS,Clt as dT,Plt as dU,wlt as dV,$lt as dW,Elt as dX,Slt as dY,rve as dZ,_lt as d_,Yst as da,Gst as db,Wst as dc,Xst as dd,yut as de,Jst as df,ult as dg,olt as dh,nlt as di,elt as dj,rlt as dk,tlt as dl,alt as dm,bI as dn,ylt as dp,slt as dq,vlt as dr,glt as ds,mlt as dt,plt as du,hlt as dv,dlt as dw,XWe as dx,Alt as dy,Flt as dz,UPe as e,clt as e0,blt as e1,xlt as e2,Olt as e3,pN as e4,Ult as e5,Vlt as e6,jlt as e7,Wlt as e8,Klt as e9,Ylt as ea,Hlt as eb,Xlt as ec,Glt as ed,Zlt as ee,Jlt as ef,Kot as eg,Hst as eh,Pst as ei,Cst as ej,Ast as ek,aFe as el,kat as em,IPe as f,fut as g,out as h,uut as i,Dat as j,hut as k,Rat as l,Bot as m,mut as n,gut as o,qot as p,zot as q,I as r,lj as s,Iot as t,Fot as u,Not as v,Tat as w,vF as x,noe as y,Xe as z};