Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dnd-kit/core

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dnd-kit/core - npm Package Compare versions

Comparing version 5.1.0-next-202221523720 to 5.1.0-next-202221724226

dist/hooks/utilities/useMutationObserver.d.ts

21

CHANGELOG.md
# @dnd-kit/core
## 5.1.0-next-202221523720
## 5.1.0-next-202221724226
### Minor Changes
- [#660](https://github.com/clauderic/dnd-kit/pull/660) [`a41e5b8`](https://github.com/clauderic/dnd-kit/commit/a41e5b8eff84f0528ffc8b3455b94b95ab60a4a9) Thanks [@clauderic](https://github.com/clauderic)! - Fixed a bug with the `delta` property returned in `onDragMove`, `onDragOver`, `onDragEnd` and `onDragCancel`. The `delta` property represents the `transform` delta since dragging was initiated, along with the scroll delta. However, due to an oversight, the `delta` property was actually returning the `transform` delta and the _current_ scroll offsets rather than the scroll _delta_.
This same change has been made to the `scrollAdjustedTranslate` property that is exposed to sensors.
- [#660](https://github.com/clauderic/dnd-kit/pull/660) [`a41e5b8`](https://github.com/clauderic/dnd-kit/commit/a41e5b8eff84f0528ffc8b3455b94b95ab60a4a9) Thanks [@clauderic](https://github.com/clauderic)! - The `activeNodeRect` and `containerNodeRect` are now observed by a `ResizeObserver` in case they resize while dragging.
- [#660](https://github.com/clauderic/dnd-kit/pull/660) [`a41e5b8`](https://github.com/clauderic/dnd-kit/commit/a41e5b8eff84f0528ffc8b3455b94b95ab60a4a9) Thanks [@clauderic](https://github.com/clauderic)! - Improved `useDraggable` usage without `<DragOverlay>`:
- The active draggable now scrolls with the page even if there is no `<DragOverlay>` used.
- Fixed issues when re-ordering the active draggable node in the DOM while dragging.
- [#660](https://github.com/clauderic/dnd-kit/pull/660) [`77e3d44`](https://github.com/clauderic/dnd-kit/commit/77e3d44502383d2f9a9f9af014b053619b3e37b3) Thanks [@clauderic](https://github.com/clauderic)! - Fixed an issue with `useDroppable` hook needlessly dispatching `SetDroppableDisabled` actions even if the `disabled` property had not changed since registering the droppable.
- [#656](https://github.com/clauderic/dnd-kit/pull/656) [`c1b3b5a`](https://github.com/clauderic/dnd-kit/commit/c1b3b5a0be5759b707e22c4e1b1236aaa82773a2) Thanks [@clauderic](https://github.com/clauderic)! - Fixed an issue with collision detection using stale rects. The `droppableRects` property has been added to the `CollisionDetection` interface.

@@ -18,4 +31,8 @@

This is not a breaking change. Hoever, if you've forked any of the built-in collision detection algorithms or you've authored custom ones, we highly recommend you update your use-cases to avoid possibly computing collisions against stale rects.
This is not a breaking change. However, if you've forked any of the built-in collision detection algorithms or you've authored custom ones, we highly recommend you update your use-cases to avoid possibly computing collisions against stale rects.
### Patch Changes
- [#660](https://github.com/clauderic/dnd-kit/pull/660) [`e6e242c`](https://github.com/clauderic/dnd-kit/commit/e6e242cbc718ed687a26f5c622eeed4dbd6c2425) Thanks [@clauderic](https://github.com/clauderic)! - The `KeyboardSensor` was updated to use `scrollTo` instead of `scrollBy` when it is able to fully scroll to the new coordinates returned by the coordinate getter function. This resolves issues that can happen with `scrollBy` when called in rapid succession.
## 5.0.3

@@ -22,0 +39,0 @@

2

dist/core.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-dom"),o=require("@dnd-kit/utilities"),i=require("@dnd-kit/accessibility");const a={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},s={onDragStart:e=>`Picked up draggable item ${e}.`,onDragOver:(e,t)=>t?`Draggable item ${e} was moved over droppable area ${t}.`:`Draggable item ${e} is no longer over a droppable area.`,onDragEnd:(e,t)=>t?`Draggable item ${e} was dropped over droppable area ${t}`:`Draggable item ${e} was dropped.`,onDragCancel:e=>`Dragging was cancelled. Draggable item ${e} was dropped.`};var l;function c(...e){}!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"}(l||(l={}));class d extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(({disabled:e})=>!e)}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const u={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:{},droppableRects:new Map,droppableContainers:new d,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:c},scrollableAncestors:[],scrollableAncestorRects:[],measureDroppableContainers:c,windowRect:null,measuringScheduled:!1},p={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:c,draggableNodes:{},over:null,measureDroppableContainers:c},h=t.createContext(p),g=t.createContext(u);function v(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:{},translate:{x:0,y:0}},droppable:{containers:new d}}}function f(e,t){switch(t.type){case l.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case l.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 l.DragEnd:case l.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case l.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new d(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case l.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new d(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case l.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new d(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}const b=t.createContext({type:null,event:null});function m({onDragStart:e,onDragMove:n,onDragOver:r,onDragEnd:o,onDragCancel:i}){const a=t.useContext(b),s=t.useRef(a);t.useEffect(()=>{if(a!==s.current){const{type:t,event:c}=a;switch(t){case l.DragStart:null==e||e(c);break;case l.DragMove:null==n||n(c);break;case l.DragOver:null==r||r(c);break;case l.DragCancel:null==i||i(c);break;case l.DragEnd:null==o||o(c)}s.current=a}},[a,e,n,r,o,i])}function y({announcements:e=s,hiddenTextDescribedById:a,screenReaderInstructions:l}){const{announce:c,announcement:d}=i.useAnnouncement(),u=o.useUniqueId("DndLiveRegion"),[p,h]=t.useState(!1);return t.useEffect(()=>{h(!0)},[]),m(t.useMemo(()=>({onDragStart({active:t}){c(e.onDragStart(t.id))},onDragMove({active:t,over:n}){e.onDragMove&&c(e.onDragMove(t.id,null==n?void 0:n.id))},onDragOver({active:t,over:n}){c(e.onDragOver(t.id,null==n?void 0:n.id))},onDragEnd({active:t,over:n}){c(e.onDragEnd(t.id,null==n?void 0:n.id))},onDragCancel({active:t}){c(e.onDragCancel(t.id))}}),[c,e])),p?r.createPortal(n.createElement(n.Fragment,null,n.createElement(i.HiddenText,{id:a,value:l.draggable}),n.createElement(i.LiveRegion,{id:u,announcement:d})),document.body):null}const x=Object.freeze({x:0,y:0});function w(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function C(e,t){const n=o.getEventCoordinates(e);return n?`${(n.x-t.left)/t.width*100}% ${(n.y-t.top)/t.height*100}%`:"0 0"}function D({data:{value:e}},{data:{value:t}}){return e-t}function R({data:{value:e}},{data:{value:t}}){return t-e}function E({left:e,top:t,height:n,width:r}){return[{x:e,y:t},{x:e+r,y:t},{x:e,y:t+n},{x:e+r,y:t+n}]}function S(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function M(e,t=e.left,n=e.top){return{x:t+.5*e.width,y:n+.5*e.height}}function N(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);if(r<o&&n<i){const a=(o-r)*(i-n);return Number((a/(t.width*t.height+e.width*e.height-a)).toFixed(4))}return 0}const A=({collisionRect:e,droppableRects:t,droppableContainers:n})=>{const r=[];for(const o of n){const{id:n}=o,i=t.get(n);if(i){const t=N(i,e);t>0&&r.push({id:n,data:{droppableContainer:o,value:t}})}}return r.sort(R)};function L(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}function O(e){return function(t,...n){return n.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const T=O(1),k={ignoreTransform:!1};function K(e,t=k){let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:t}=o.getWindow(e),{transform:r,transformOrigin:i}=t(e);r&&(n=function(e,t,n){let r,o,i,a,s;if(t.startsWith("matrix3d("))r=t.slice(9,-1).split(/, /),o=+r[0],i=+r[5],a=+r[12],s=+r[13];else{if(!t.startsWith("matrix("))return e;r=t.slice(7,-1).split(/, /),o=+r[0],i=+r[3],a=+r[4],s=+r[5]}const l=e.left-a-(1-o)*parseFloat(n),c=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}(n,r,i))}const{top:r,left:i,width:a,height:s,bottom:l,right:c}=n;return{top:r,left:i,width:a,height:s,bottom:l,right:c}}function B(e){return K(e,{ignoreTransform:!0})}function I(e){const t=[];return e?function n(r){if(!r)return t;if(o.isDocument(r)&&null!=r.scrollingElement&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!o.isHTMLElement(r)||o.isSVGElement(r))return t;if(t.includes(r))return t;const{getComputedStyle:i}=o.getWindow(r),a=i(r);return r!==e&&function(e,t=o.getWindow(e).getComputedStyle(e)){const n=/(auto|scroll|overlay)/;return null!=["overflow","overflowX","overflowY"].find(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(r,a)&&t.push(r),function(e,t=o.getWindow(e).getComputedStyle(e)){return"fixed"===t.position}(r,a)?t:n(r.parentNode)}(e):t}function W(e){return o.canUseDOM&&e?o.isWindow(e)?e:o.isNode(e)?o.isDocument(e)||e===o.getOwnerDocument(e).scrollingElement?window:o.isHTMLElement(e)?e:null:null:null}function z(e){return o.isWindow(e)?e.scrollX:e.scrollLeft}function P(e){return o.isWindow(e)?e.scrollY:e.scrollTop}function U(e){return{x:z(e),y:P(e)}}var F;function q(e){const t={x:0,y:0},n={x:e.scrollWidth-e.clientWidth,y:e.scrollHeight-e.clientHeight};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=n.y,isRight:e.scrollLeft>=n.x,maxScroll:n,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(F||(F={}));const j={x:.2,y:.2};function H(e,t,{top:n,left:r,right:i,bottom:a},s=10,l=j){const{clientHeight:c,clientWidth:d}=e,u=(p=e,o.canUseDOM&&p&&p===document.scrollingElement?{top:0,left:0,right:d,bottom:c,width:d,height:c}:t);var p;const{isTop:h,isBottom:g,isLeft:v,isRight:f}=q(e),b={x:0,y:0},m={x:0,y:0},y=u.height*l.y,x=u.width*l.x;return!h&&n<=u.top+y?(b.y=F.Backward,m.y=s*Math.abs((u.top+y-n)/y)):!g&&a>=u.bottom-y&&(b.y=F.Forward,m.y=s*Math.abs((u.bottom-y-a)/y)),!f&&i>=u.right-x?(b.x=F.Forward,m.x=s*Math.abs((u.right-x-i)/x)):!v&&r<=u.left+x&&(b.x=F.Backward,m.x=s*Math.abs((u.left+x-r)/x)),{direction:b,speed:m}}function $(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function V(e){return e.reduce((e,t)=>o.add(e,U(t)),x)}const X=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+z(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+P(t),0)}]];class Y{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=I(t),r=V(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of X)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n);return this.rect[i]+(r[e]-t)},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}var _,G,J;(_=exports.AutoScrollActivator||(exports.AutoScrollActivator={}))[_.Pointer=0]="Pointer",_[_.DraggableRect=1]="DraggableRect",(G=exports.TraversalOrder||(exports.TraversalOrder={}))[G.TreeOrder=0]="TreeOrder",G[G.ReversedTreeOrder=1]="ReversedTreeOrder",(J=exports.MeasuringStrategy||(exports.MeasuringStrategy={}))[J.Always=0]="Always",J[J.BeforeDragging=1]="BeforeDragging",J[J.WhileDragging=2]="WhileDragging",(exports.MeasuringFrequency||(exports.MeasuringFrequency={})).Optimized="optimized";const Q=new Map,Z={measure:B,strategy:exports.MeasuringStrategy.WhileDragging,frequency:exports.MeasuringFrequency.Optimized};function ee({onResize:e,disabled:n}){const r=t.useMemo(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:t}=window;return new t(e)},[n,e]);return t.useEffect(()=>()=>null==r?void 0:r.disconnect(),[r]),r}const te=[],ne=ie(B),re=ae(B);function oe(e,n,r){const i=t.useRef(e);return o.useLazyMemo(t=>e?r||!t&&e||e!==i.current?o.isHTMLElement(e)&&null==e.parentNode?null:new Y(n(e),e):null!=t?t:null:null,[e,r,n])}function ie(e){return(t,n)=>oe(t,e,n)}function ae(e){const n=[];return function(r,i){const a=t.useRef(r);return o.useLazyMemo(t=>r.length?i||!t&&r.length||r!==a.current?r.map(t=>new Y(e(t),t)):null!=t?t:n:n,[r,i])}}function se(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return o.isHTMLElement(t)?t:e}class le{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ce(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var de,ue;function pe(e){e.preventDefault()}function he(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(de||(de={})),(ue=exports.KeyboardCode||(exports.KeyboardCode={})).Space="Space",ue.Down="ArrowDown",ue.Right="ArrowRight",ue.Left="ArrowLeft",ue.Up="ArrowUp",ue.Esc="Escape",ue.Enter="Enter";const ge={start:[exports.KeyboardCode.Space,exports.KeyboardCode.Enter],cancel:[exports.KeyboardCode.Esc],end:[exports.KeyboardCode.Space,exports.KeyboardCode.Enter]},ve=(e,{currentCoordinates:t})=>{switch(e.code){case exports.KeyboardCode.Right:return{...t,x:t.x+25};case exports.KeyboardCode.Left:return{...t,x:t.x-25};case exports.KeyboardCode.Down:return{...t,y:t.y+25};case exports.KeyboardCode.Up:return{...t,y:t.y-25}}};class fe{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.coordinates=x,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new le(o.getOwnerDocument(t)),this.windowListeners=new le(o.getWindow(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(de.Resize,this.handleCancel),this.windowListeners.add(de.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(de.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props;if(!e.node.current)throw new Error("Active draggable node is undefined");const n=B(e.node.current),r={x:n.left,y:n.top};this.coordinates=r,t(r)}handleKeyDown(e){if(o.isKeyboardEvent(e)){const{coordinates:t}=this,{active:n,context:r,options:i}=this.props,{keyboardCodes:a=ge,coordinateGetter:s=ve,scrollBehavior:l="smooth"}=i,{code:c}=e;if(a.end.includes(c))return void this.handleEnd(e);if(a.cancel.includes(c))return void this.handleCancel(e);const d=s(e,{active:n,context:r.current,currentCoordinates:t});if(d){const n={x:0,y:0},{scrollableAncestors:i}=r.current;for(const r of i){const i=e.code,a=o.subtract(d,t),{isTop:s,isRight:c,isLeft:u,isBottom:p,maxScroll:h,minScroll:g}=q(r),v=$(r),f={x:Math.min(i===exports.KeyboardCode.Right?v.right-v.width/2:v.right,Math.max(i===exports.KeyboardCode.Right?v.left:v.left+v.width/2,d.x)),y:Math.min(i===exports.KeyboardCode.Down?v.bottom-v.height/2:v.bottom,Math.max(i===exports.KeyboardCode.Down?v.top:v.top+v.height/2,d.y))},b=i===exports.KeyboardCode.Right&&!c||i===exports.KeyboardCode.Left&&!u,m=i===exports.KeyboardCode.Down&&!p||i===exports.KeyboardCode.Up&&!s;if(b&&f.x!==d.x){if(i===exports.KeyboardCode.Right&&r.scrollLeft+a.x<=h.x||i===exports.KeyboardCode.Left&&r.scrollLeft+a.x>=g.x)return void r.scrollBy({left:a.x,behavior:l});n.x=i===exports.KeyboardCode.Right?r.scrollLeft-h.x:r.scrollLeft-g.x,r.scrollBy({left:-n.x,behavior:l});break}if(m&&f.y!==d.y){if(i===exports.KeyboardCode.Down&&r.scrollTop+a.y<=h.y||i===exports.KeyboardCode.Up&&r.scrollTop+a.y>=g.y)return void r.scrollBy({top:a.y,behavior:l});n.y=i===exports.KeyboardCode.Down?r.scrollTop-h.y:r.scrollTop-g.y,r.scrollBy({top:-n.y,behavior:l});break}}this.handleMove(e,o.add(d,n))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t),this.coordinates=t}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function be(e){return Boolean(e&&"distance"in e)}function me(e){return Boolean(e&&"delay"in e)}fe.activators=[{eventName:"onKeyDown",handler:(e,{keyboardCodes:t=ge,onActivation:n})=>{const{code:r}=e.nativeEvent;return!!t.start.includes(r)&&(e.preventDefault(),null==n||n({event:e.nativeEvent}),!0)}}];class ye{constructor(e,t,n=function(e){const{EventTarget:t}=o.getWindow(e);return e instanceof t?e:o.getOwnerDocument(e)}(e.event.target)){var r;this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=o.getOwnerDocument(a),this.documentListeners=new le(this.document),this.listeners=new le(n),this.windowListeners=new le(o.getWindow(a)),this.initialCoordinates=null!=(r=o.getEventCoordinates(i))?r:x,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(de.Resize,this.handleCancel),this.windowListeners.add(de.DragStart,pe),this.windowListeners.add(de.VisibilityChange,this.handleCancel),this.windowListeners.add(de.ContextMenu,pe),this.documentListeners.add(de.Keydown,this.handleKeydown),t){if(be(t))return;if(me(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(de.Click,he,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(de.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!r)return;const l=null!=(t=o.getEventCoordinates(e))?t:x,c=o.subtract(r,l);if(!n&&s){if(me(s))return ce(c,s.tolerance)?this.handleCancel():void 0;if(be(s))return null!=s.tolerance&&ce(c,s.tolerance)?this.handleCancel():ce(c,s.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===exports.KeyboardCode.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const xe={move:{name:"pointermove"},end:{name:"pointerup"}};class we extends ye{constructor(e){const{event:t}=e,n=o.getOwnerDocument(t.target);super(e,xe,n)}}we.activators=[{eventName:"onPointerDown",handler:({nativeEvent:e},{onActivation:t})=>!(!e.isPrimary||0!==e.button||(null==t||t({event:e}),0))}];const Ce={move:{name:"mousemove"},end:{name:"mouseup"}};var De;!function(e){e[e.RightClick=2]="RightClick"}(De||(De={}));class Re extends ye{constructor(e){super(e,Ce,o.getOwnerDocument(e.event.target))}}Re.activators=[{eventName:"onMouseDown",handler:({nativeEvent:e},{onActivation:t})=>e.button!==De.RightClick&&(null==t||t({event:e}),!0)}];const Ee={move:{name:"touchmove"},end:{name:"touchend"}};class Se extends ye{constructor(e){super(e,Ee)}static setup(){return window.addEventListener(Ee.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ee.move.name,e)};function e(){}}}function Me(e,{transform:t,...n}){return(null==e?void 0:e.length)?e.reduce((e,t)=>t({transform:e,...n}),t):t}Se.activators=[{eventName:"onTouchStart",handler:({nativeEvent:e},{onActivation:t})=>{const{touches:n}=e;return!(n.length>1||(null==t||t({event:e}),0))}}];const Ne=[{sensor:we,options:{}},{sensor:fe,options:{}}],Ae={current:{}},Le=t.createContext({...x,scaleX:1,scaleY:1}),Oe=t.memo((function({id:e,autoScroll:i=!0,announcements:s,children:c,sensors:d=Ne,collisionDetection:u=A,measuring:p,modifiers:m,screenReaderInstructions:w=a,...C}){var D,R,E,M,N,L,O;const k=t.useReducer(f,void 0,v),[z,P]=k,[F,q]=t.useState(()=>({type:null,event:null})),[j,$]=t.useState(!1),{draggable:{active:X,nodes:_,translate:G},droppable:{containers:J}}=z,ie=X?_[X]:null,ae=t.useRef({initial:null,translated:null}),le=t.useMemo(()=>{var e;return null!=X?{id:X,data:null!=(e=null==ie?void 0:ie.data)?e:Ae,rect:ae}:null},[X,ie]),ce=t.useRef(null),[de,ue]=t.useState(null),[pe,he]=t.useState(null),ge=o.useLatestValue(C,Object.values(C)),ve=o.useUniqueId("DndDescribedBy",e),fe=t.useMemo(()=>J.getEnabled(),[J]),{droppableRects:be,measureDroppableContainers:me,measuringScheduled:ye}=function(e,{dragging:n,dependencies:r,config:i}){const[a,s]=t.useState(null),l=null!=a,{frequency:c,measure:d,strategy:u}={...Z,...i},p=t.useRef(e),h=t.useCallback((e=[])=>s(t=>t?t.concat(e):e),[]),g=t.useRef(null),v=function(){switch(u){case exports.MeasuringStrategy.Always:return!1;case exports.MeasuringStrategy.BeforeDragging:return n;default:return!n}}(),f=o.useLazyMemo(t=>{if(v&&!n)return Q;const r=a;if(!t||t===Q||p.current!==e||null!=r){const t=new Map;for(let n of e){if(!n)continue;if(r&&r.length>0&&!r.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Y(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t},[e,a,n,v,d]);return t.useEffect(()=>{p.current=e},[e]),t.useEffect(()=>{v||requestAnimationFrame(()=>h())},[n,v]),t.useEffect(()=>{l&&s(null)},[l]),t.useEffect(()=>{v||"number"!=typeof c||null!==g.current||(g.current=setTimeout(()=>{h(),g.current=null},c))},[c,v,h,...r]),{droppableRects:f,measureDroppableContainers:h,measuringScheduled:l}}(fe,{dragging:j,dependencies:[G.x,G.y],config:null==p?void 0:p.droppable}),xe=function(e,t){const n=null!==t?e[t]:void 0,r=n?n.node.current:null;return o.useLazyMemo(e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(_,X),we=pe?o.getEventCoordinates(pe):null,Ce=oe(xe,null!=(D=null==p||null==(R=p.draggable)?void 0:R.measure)?D:B),De=ne(xe?xe.parentElement:null),Re=t.useRef({active:null,activeNode:xe,collisionRect:null,collisions:null,droppableRects:be,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:J,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ee=J.getNodeFor(null==(E=Re.current.over)?void 0:E.id),Se=function({measure:e=K}){const[n,r]=t.useState(null),i=ee({onResize:t.useCallback(t=>{for(const{target:n}of t)if(o.isHTMLElement(n)){r(t=>{const r=e(n);return t?{...t,width:r.width,height:r.height}:r});break}},[e])}),a=t.useCallback(t=>{const n=se(t);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?e(n):null)},[e,i]),[s,l]=o.useNodeRef(a);return t.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}({measure:null==p||null==(M=p.dragOverlay)?void 0:M.measure}),Oe=null!=(N=Se.nodeRef.current)?N:xe,Te=null!=(L=Se.rect)?L:Ce,ke=t.useRef(null),Ke=Te===Ce?(Ie=ke.current,(Be=Ce)&&Ie?{x:Be.left-Ie.left,y:Be.top-Ie.top}:x):x;var Be,Ie;const We=t.useMemo(()=>ze?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(ze):null,[ze=Oe?Oe.ownerDocument.defaultView:null]);var ze;const Pe=function(e){const n=t.useRef(e),r=o.useLazyMemo(t=>e?t&&e&&n.current&&e.parentNode===n.current.parentNode?t:I(e):te,[e]);return t.useEffect(()=>{n.current=e},[e]),r}(X?null!=Ee?Ee:Oe:null),Ue=re(Pe),Fe=Me(m,{transform:{x:G.x-Ke.x,y:G.y-Ke.y,scaleX:1,scaleY:1},activatorEvent:pe,active:le,activeNodeRect:Ce,containerNodeRect:De,draggingNodeRect:Te,over:Re.current.over,overlayNodeRect:Se.rect,scrollableAncestors:Pe,scrollableAncestorRects:Ue,windowRect:We}),qe=we?o.add(we,G):null,je=function(e){const[n,r]=t.useState(null),i=t.useRef(e),a=t.useCallback(e=>{const t=W(e.target);t&&r(e=>e?(e.set(t,U(t)),new Map(e)):null)},[]);return t.useEffect(()=>{const t=i.current;if(e!==t){n(t);const o=e.map(e=>{const t=W(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,U(t)]):null}).filter(e=>null!=e);r(o.length?new Map(o):null),i.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{const t=W(e);null==t||t.removeEventListener("scroll",a)})}},[a,e]),t.useMemo(()=>e.length?n?Array.from(n.values()).reduce((e,t)=>o.add(e,t),x):V(e):x,[e,n])}(Pe),He=o.add(Fe,je),$e=Te?T(Te,Fe):null,Ve=le&&$e?u({active:le,collisionRect:$e,droppableRects:be,droppableContainers:fe,pointerCoordinates:qe}):null,Xe=S(Ve,"id"),[Ye,_e]=t.useState(null),Ge=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Fe,null!=(O=null==Ye?void 0:Ye.rect)?O:null,Ce),Je=t.useCallback((e,{sensor:t,options:n})=>{if(!ce.current)return;const o=_[ce.current];if(!o)return;const i=new t({active:ce.current,activeNode:o,event:e.nativeEvent,options:n,context:Re,onStart(e){const t=ce.current;if(!t)return;const n=_[t];if(!n)return;const{onDragStart:o}=ge.current,i={active:{id:t,data:n.data,rect:ae}};r.unstable_batchedUpdates(()=>{P({type:l.DragStart,initialCoordinates:e,active:t}),q({type:l.DragStart,event:i})}),null==o||o(i)},onMove(e){P({type:l.DragMove,coordinates:e})},onEnd:a(l.DragEnd),onCancel:a(l.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:i}=Re.current;let a=null;if(t&&i){const{cancelDrop:r}=ge.current;a={active:t,collisions:n,delta:i,over:o},e===l.DragEnd&&"function"==typeof r&&await Promise.resolve(r(a))&&(e=l.DragCancel)}ce.current=null,r.unstable_batchedUpdates(()=>{if(P({type:e}),_e(null),$(!1),ue(null),he(null),a&&q({type:e,event:a}),a){const{onDragCancel:t,onDragEnd:n}=ge.current,r=e===l.DragEnd?n:t;null==r||r(a)}})}}r.unstable_batchedUpdates(()=>{ue(i),he(e.nativeEvent)})},[_]),Qe=function(e,n){return t.useMemo(()=>e.reduce((e,t)=>{const{sensor:r}=t;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:n(e.handler,t)}))]},[]),[e,n])}(d,t.useCallback((e,t)=>(n,r)=>{const o=n.nativeEvent;null!==ce.current||o.dndKit||o.defaultPrevented||!0===e(n,t.options)&&(o.dndKit={capturedBy:t.sensor},ce.current=r,Je(n,t))},[Je]));!function(e){t.useEffect(()=>{if(!o.canUseDOM)return;const t=e.map(({sensor:e})=>null==e.setup?void 0:e.setup());return()=>{for(const e of t)null==e||e()}},e.map(({sensor:e})=>e))}(d),t.useEffect(()=>{null!=X&&$(!0)},[X]),t.useEffect(()=>{le||(ke.current=null),le&&Ce&&!ke.current&&(ke.current=Ce)},[Ce,le]),t.useEffect(()=>{const{onDragMove:e}=ge.current,{active:t,collisions:n,over:r}=Re.current;if(!t)return;const o={active:t,collisions:n,delta:{x:He.x,y:He.y},over:r};q({type:l.DragMove,event:o}),null==e||e(o)},[He.x,He.y]),t.useEffect(()=>{const{active:e,collisions:t,droppableContainers:n,scrollAdjustedTranslate:o}=Re.current;if(!e||!ce.current||!o)return;const{onDragOver:i}=ge.current,a=n.get(Xe),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,c={active:e,collisions:t,delta:{x:o.x,y:o.y},over:s};r.unstable_batchedUpdates(()=>{_e(s),q({type:l.DragOver,event:c}),null==i||i(c)})},[Xe]),o.useIsomorphicLayoutEffect(()=>{Re.current={active:le,activeNode:xe,collisionRect:$e,collisions:Ve,droppableRects:be,draggableNodes:_,draggingNode:Oe,draggingNodeRect:Te,droppableContainers:J,over:Ye,scrollableAncestors:Pe,scrollAdjustedTranslate:He},ae.current={initial:Te,translated:$e}},[le,xe,Ve,$e,_,Oe,Te,be,J,Ye,Pe,He]),function({acceleration:e,activator:n=exports.AutoScrollActivator.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:l=exports.TraversalOrder.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:u,threshold:p}){const[h,g]=o.useInterval(),v=t.useRef({x:1,y:1}),f=t.useMemo(()=>{switch(n){case exports.AutoScrollActivator.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case exports.AutoScrollActivator.DraggableRect:return i}return null},[n,i,c]),b=t.useRef(x),m=t.useRef(null),y=t.useCallback(()=>{const e=m.current;e&&e.scrollBy(v.current.x*b.current.x,v.current.y*b.current.y)},[]),w=t.useMemo(()=>l===exports.TraversalOrder.TreeOrder?[...d].reverse():d,[l,d]);t.useEffect(()=>{if(a&&d.length&&f){for(const t of w){if(!1===(null==r?void 0:r(t)))continue;const n=d.indexOf(t),o=u[n];if(!o)continue;const{direction:i,speed:a}=H(t,o,f,e,p);if(a.x>0||a.y>0)return g(),m.current=t,h(y,s),v.current=a,void(b.current=i)}v.current={x:0,y:0},b.current={x:0,y:0},g()}else g()},[e,y,r,g,a,s,JSON.stringify(f),h,d,w,u,JSON.stringify(p)])}({...function(){const e=!(!1===(null==de?void 0:de.autoScrollEnabled)||("object"==typeof i?!1===i.enabled:!1===i));return"object"==typeof i?{...i,enabled:e}:{enabled:e}}(),draggingRect:$e,pointerCoordinates:qe,scrollableAncestors:Pe,scrollableAncestorRects:Ue});const Ze=t.useMemo(()=>({active:le,activeNode:xe,activeNodeRect:Ce,activatorEvent:pe,collisions:Ve,containerNodeRect:De,dragOverlay:Se,draggableNodes:_,droppableContainers:J,droppableRects:be,over:Ye,measureDroppableContainers:me,scrollableAncestors:Pe,scrollableAncestorRects:Ue,measuringScheduled:ye,windowRect:We}),[le,xe,Ce,pe,Ve,De,Se,_,J,be,Ye,me,Pe,Ue,ye,We]),et=t.useMemo(()=>({activatorEvent:pe,activators:Qe,active:le,activeNodeRect:Ce,ariaDescribedById:{draggable:ve},dispatch:P,draggableNodes:_,over:Ye,measureDroppableContainers:me}),[pe,Qe,le,Ce,P,ve,_,Ye,me]);return n.createElement(b.Provider,{value:F},n.createElement(h.Provider,{value:et},n.createElement(g.Provider,{value:Ze},n.createElement(Le.Provider,{value:Ge},c))),n.createElement(y,{announcements:s,hiddenTextDescribedById:ve,screenReaderInstructions:w}))})),Te=t.createContext(null),ke="button";function Ke(){return t.useContext(g)}const Be={timeout:25},Ie={duration:250,easing:"ease",dragSourceOpacity:0},We={x:0,y:0,scaleX:1,scaleY:1},ze=e=>o.isKeyboardEvent(e)?"transform 250ms ease":void 0,Pe=n.memo(({adjustScale:e=!1,children:r,dropAnimation:i=Ie,style:a,transition:s=ze,modifiers:l,wrapperElement:c="div",className:d,zIndex:u=999})=>{var g,v;const{active:f,activeNodeRect:b,containerNodeRect:m,draggableNodes:y,activatorEvent:x,over:w,dragOverlay:D,scrollableAncestors:R,scrollableAncestorRects:E,windowRect:S}=Ke(),M=t.useContext(Le),N=Me(l,{activatorEvent:x,active:f,activeNodeRect:b,containerNodeRect:m,draggingNodeRect:D.rect,over:w,overlayNodeRect:D.rect,scrollableAncestors:R,scrollableAncestorRects:E,transform:M,windowRect:S}),A=null!==f,L=e?N:{...N,scaleX:1,scaleY:1},O=o.useLazyMemo(e=>A?e||(b?{...b}:null):null,[A,b]),T=O?{position:"fixed",width:O.width,height:O.height,top:O.top,left:O.left,zIndex:u,transform:o.CSS.Transform.toString(L),touchAction:"none",transformOrigin:e&&x?C(x,O):void 0,transition:"function"==typeof s?s(x):s,...a}:void 0,k=A?{style:T,children:r,className:d,transform:L}:void 0,K=t.useRef(k),I=null!=k?k:K.current,{children:W,...z}=null!=I?I:{},P=t.useRef(null!=(g=null==f?void 0:f.id)?g:null),U=function({animate:e,adjustScale:n,activeId:r,draggableNodes:i,duration:a,dragSourceOpacity:s,easing:l,node:c,transform:d}){const[u,p]=t.useState(!1);return o.useIsomorphicLayoutEffect(()=>{var t;if(!(e&&r&&l&&a))return void(e&&p(!0));const u=null==(t=i[r])?void 0:t.node.current;if(d&&c&&u&&null!==u.parentNode){const e=se(c);if(e){const t=e.getBoundingClientRect(),r=B(u),i={x:t.left-r.left,y:t.top-r.top};if(Math.abs(i.x)||Math.abs(i.y)){const e=o.CSS.Transform.toString({x:d.x-i.x,y:d.y-i.y,scaleX:n?r.width*d.scaleX/t.width:1,scaleY:n?r.height*d.scaleY/t.height:1}),h=u.style.opacity;return null!=s&&(u.style.opacity=""+s),void(c.animate([{transform:o.CSS.Transform.toString(d)},{transform:e}],{easing:l,duration:a}).onfinish=()=>{c.style.display="none",p(!0),u&&null!=s&&(u.style.opacity=h)})}}}p(!0)},[e,r,n,i,a,l,s,c,d]),o.useIsomorphicLayoutEffect(()=>{u&&p(!1)},[u]),u}({animate:Boolean(i&&P.current&&!f),adjustScale:e,activeId:P.current,draggableNodes:y,duration:null==i?void 0:i.duration,easing:null==i?void 0:i.easing,dragSourceOpacity:null==i?void 0:i.dragSourceOpacity,node:D.nodeRef.current,transform:null==(v=K.current)?void 0:v.transform}),F=Boolean(W&&(r||i&&!U));return t.useEffect(()=>{var e;(null==f?void 0:f.id)!==P.current&&(P.current=null!=(e=null==f?void 0:f.id)?e:null),f&&K.current!==k&&(K.current=k)},[f,k]),t.useEffect(()=>{U&&(K.current=void 0)},[U]),F?n.createElement(h.Provider,{value:p},n.createElement(Le.Provider,{value:We},n.createElement(c,{...z,ref:D.setRef},W))):null});exports.DndContext=Oe,exports.DragOverlay=Pe,exports.KeyboardSensor=fe,exports.MouseSensor=Re,exports.PointerSensor=we,exports.TouchSensor=Se,exports.applyModifiers=Me,exports.closestCenter=({collisionRect:e,droppableRects:t,droppableContainers:n})=>{const r=M(e,e.left,e.top),o=[];for(const e of n){const{id:n}=e,i=t.get(n);if(i){const t=w(M(i),r);o.push({id:n,data:{droppableContainer:e,value:t}})}}return o.sort(D)},exports.closestCorners=({collisionRect:e,droppableRects:t,droppableContainers:n})=>{const r=E(e),o=[];for(const e of n){const{id:n}=e,i=t.get(n);if(i){const t=E(i),a=r.reduce((e,n,r)=>e+w(t[r],n),0),s=Number((a/4).toFixed(4));o.push({id:n,data:{droppableContainer:e,value:s}})}}return o.sort(D)},exports.defaultAnnouncements=s,exports.defaultCoordinates=x,exports.defaultDropAnimation=Ie,exports.getClientRect=K,exports.getFirstCollision=S,exports.getScrollableAncestors=I,exports.pointerWithin=({droppableContainers:e,droppableRects:t,pointerCoordinates:n})=>{if(!n)return[];const r=[];for(const o of e){const{id:e}=o,i=t.get(e);if(i&&L(n,i)){const t=E(i).reduce((e,t)=>e+w(n,t),0),a=Number((t/4).toFixed(4));r.push({id:e,data:{droppableContainer:o,value:a}})}}return r.sort(D)},exports.rectIntersection=A,exports.useDndContext=Ke,exports.useDndMonitor=m,exports.useDraggable=function({id:e,data:n,disabled:r=!1,attributes:i}){const a=o.useUniqueId("Droppable"),{activators:s,activatorEvent:l,active:c,activeNodeRect:d,ariaDescribedById:u,draggableNodes:p,over:g}=t.useContext(h),{role:v=ke,roleDescription:f="draggable",tabIndex:b=0}=null!=i?i:{},m=(null==c?void 0:c.id)===e,y=t.useContext(m?Le:Te),[x,w]=o.useNodeRef(),C=function(e,n){return t.useMemo(()=>e.reduce((e,{eventName:t,handler:r})=>(e[t]=e=>{r(e,n)},e),{}),[e,n])}(s,e),D=o.useLatestValue(n);return o.useIsomorphicLayoutEffect(()=>(p[e]={id:e,key:a,node:x,data:D},()=>{const t=p[e];t&&t.key===a&&delete p[e]}),[p,e]),{active:c,activatorEvent:l,activeNodeRect:d,attributes:t.useMemo(()=>({role:v,tabIndex:b,"aria-pressed":!(!m||v!==ke)||void 0,"aria-roledescription":f,"aria-describedby":u.draggable}),[v,b,m,f,u.draggable]),isDragging:m,listeners:r?void 0:C,node:x,over:g,setNodeRef:w,transform:y}},exports.useDroppable=function({data:e,disabled:n=!1,id:r,resizeObserverConfig:i}){const a=o.useUniqueId("Droppable"),{active:s,dispatch:c,over:d,measureDroppableContainers:u}=t.useContext(h),p=t.useRef(!1),g=t.useRef(null),v=t.useRef(null),{disabled:f,updateMeasurementsFor:b,timeout:m}={...Be,...i},y=o.useLatestValue(null!=b?b:r),x=ee({onResize:t.useCallback(()=>{p.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{u("string"==typeof y.current?[y.current]:y.current),v.current=null},m)):p.current=!0},[m]),disabled:f||!s}),w=t.useCallback((e,t)=>{x&&(t&&(x.unobserve(t),p.current=!1),e&&x.observe(e))},[x]),[C,D]=o.useNodeRef(w),R=o.useLatestValue(e);return t.useEffect(()=>{x&&C.current&&(x.disconnect(),p.current=!1,x.observe(C.current))},[C,x]),o.useIsomorphicLayoutEffect(()=>(c({type:l.RegisterDroppable,element:{id:r,key:a,disabled:n,node:C,rect:g,data:R}}),()=>c({type:l.UnregisterDroppable,key:a,id:r})),[r]),t.useEffect(()=>{c({type:l.SetDroppableDisabled,id:r,key:a,disabled:n})},[n]),{active:s,rect:g,isOver:(null==d?void 0:d.id)===r,node:C,over:d,setNodeRef:D}},exports.useSensor=function(e,n){return t.useMemo(()=>({sensor:e,options:null!=n?n:{}}),[e,n])},exports.useSensors=function(...e){return t.useMemo(()=>[...e].filter(e=>null!=e),[...e])};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-dom"),o=require("@dnd-kit/utilities"),i=require("@dnd-kit/accessibility");const s={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},a={onDragStart:e=>`Picked up draggable item ${e}.`,onDragOver:(e,t)=>t?`Draggable item ${e} was moved over droppable area ${t}.`:`Draggable item ${e} is no longer over a droppable area.`,onDragEnd:(e,t)=>t?`Draggable item ${e} was dropped over droppable area ${t}`:`Draggable item ${e} was dropped.`,onDragCancel:e=>`Dragging was cancelled. Draggable item ${e} was dropped.`};var l;function c(...e){}!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"}(l||(l={}));class d extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(({disabled:e})=>!e)}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const u={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:{},droppableRects:new Map,droppableContainers:new d,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:c},scrollableAncestors:[],scrollableAncestorRects:[],measureDroppableContainers:c,windowRect:null,measuringScheduled:!1},p={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:c,draggableNodes:{},over:null,measureDroppableContainers:c},h=t.createContext(p),g=t.createContext(u);function v(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:{},translate:{x:0,y:0}},droppable:{containers:new d}}}function f(e,t){switch(t.type){case l.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case l.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 l.DragEnd:case l.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case l.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new d(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case l.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 d(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case l.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new d(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}const b=t.createContext({type:null,event:null});function m({onDragStart:e,onDragMove:n,onDragOver:r,onDragEnd:o,onDragCancel:i}){const s=t.useContext(b),a=t.useRef(s);t.useEffect(()=>{if(s!==a.current){const{type:t,event:c}=s;switch(t){case l.DragStart:null==e||e(c);break;case l.DragMove:null==n||n(c);break;case l.DragOver:null==r||r(c);break;case l.DragCancel:null==i||i(c);break;case l.DragEnd:null==o||o(c)}a.current=s}},[s,e,n,r,o,i])}function y({announcements:e=a,hiddenTextDescribedById:s,screenReaderInstructions:l}){const{announce:c,announcement:d}=i.useAnnouncement(),u=o.useUniqueId("DndLiveRegion"),[p,h]=t.useState(!1);return t.useEffect(()=>{h(!0)},[]),m(t.useMemo(()=>({onDragStart({active:t}){c(e.onDragStart(t.id))},onDragMove({active:t,over:n}){e.onDragMove&&c(e.onDragMove(t.id,null==n?void 0:n.id))},onDragOver({active:t,over:n}){c(e.onDragOver(t.id,null==n?void 0:n.id))},onDragEnd({active:t,over:n}){c(e.onDragEnd(t.id,null==n?void 0:n.id))},onDragCancel({active:t}){c(e.onDragCancel(t.id))}}),[c,e])),p?r.createPortal(n.createElement(n.Fragment,null,n.createElement(i.HiddenText,{id:s,value:l.draggable}),n.createElement(i.LiveRegion,{id:u,announcement:d})),document.body):null}const x=Object.freeze({x:0,y:0});function w(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function C(e,t){const n=o.getEventCoordinates(e);return n?`${(n.x-t.left)/t.width*100}% ${(n.y-t.top)/t.height*100}%`:"0 0"}function D({data:{value:e}},{data:{value:t}}){return e-t}function R({data:{value:e}},{data:{value:t}}){return t-e}function E({left:e,top:t,height:n,width:r}){return[{x:e,y:t},{x:e+r,y:t},{x:e,y:t+n},{x:e+r,y:t+n}]}function S(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function M(e,t=e.left,n=e.top){return{x:t+.5*e.width,y:n+.5*e.height}}function N(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);if(r<o&&n<i){const s=(o-r)*(i-n);return Number((s/(t.width*t.height+e.width*e.height-s)).toFixed(4))}return 0}const L=({collisionRect:e,droppableRects:t,droppableContainers:n})=>{const r=[];for(const o of n){const{id:n}=o,i=t.get(n);if(i){const t=N(i,e);t>0&&r.push({id:n,data:{droppableContainer:o,value:t}})}}return r.sort(R)};function A(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}function O(e){return function(t,...n){return n.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const T=O(1),k={ignoreTransform:!1};function K(e,t=k){let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:t}=o.getWindow(e),{transform:r,transformOrigin:i}=t(e);r&&(n=function(e,t,n){let r,o,i,s,a;if(t.startsWith("matrix3d("))r=t.slice(9,-1).split(/, /),o=+r[0],i=+r[5],s=+r[12],a=+r[13];else{if(!t.startsWith("matrix("))return e;r=t.slice(7,-1).split(/, /),o=+r[0],i=+r[3],s=+r[4],a=+r[5]}const l=e.left-s-(1-o)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}(n,r,i))}const{top:r,left:i,width:s,height:a,bottom:l,right:c}=n;return{top:r,left:i,width:s,height:a,bottom:l,right:c}}function I(e){return K(e,{ignoreTransform:!0})}function B(e){const t=[];return e?function n(r){if(!r)return t;if(o.isDocument(r)&&null!=r.scrollingElement&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!o.isHTMLElement(r)||o.isSVGElement(r))return t;if(t.includes(r))return t;const{getComputedStyle:i}=o.getWindow(r),s=i(r);return r!==e&&function(e,t=o.getWindow(e).getComputedStyle(e)){const n=/(auto|scroll|overlay)/;return null!=["overflow","overflowX","overflowY"].find(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(r,s)&&t.push(r),function(e,t=o.getWindow(e).getComputedStyle(e)){return"fixed"===t.position}(r,s)?t:n(r.parentNode)}(e):t}function W(e){return o.canUseDOM&&e?o.isWindow(e)?e:o.isNode(e)?o.isDocument(e)||e===o.getOwnerDocument(e).scrollingElement?window:o.isHTMLElement(e)?e:null:null:null}function P(e){return o.isWindow(e)?e.scrollX:e.scrollLeft}function U(e){return o.isWindow(e)?e.scrollY:e.scrollTop}function z(e){return{x:P(e),y:U(e)}}var F;function q(e){const t={x:0,y:0},n={x:e.scrollWidth-e.clientWidth,y:e.scrollHeight-e.clientHeight};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=n.y,isRight:e.scrollLeft>=n.x,maxScroll:n,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(F||(F={}));const j={x:.2,y:.2};function H(e,t,{top:n,left:r,right:i,bottom:s},a=10,l=j){const{clientHeight:c,clientWidth:d}=e,u=(p=e,o.canUseDOM&&p&&p===document.scrollingElement?{top:0,left:0,right:d,bottom:c,width:d,height:c}:t);var p;const{isTop:h,isBottom:g,isLeft:v,isRight:f}=q(e),b={x:0,y:0},m={x:0,y:0},y=u.height*l.y,x=u.width*l.x;return!h&&n<=u.top+y?(b.y=F.Backward,m.y=a*Math.abs((u.top+y-n)/y)):!g&&s>=u.bottom-y&&(b.y=F.Forward,m.y=a*Math.abs((u.bottom-y-s)/y)),!f&&i>=u.right-x?(b.x=F.Forward,m.x=a*Math.abs((u.right-x-i)/x)):!v&&r<=u.left+x&&(b.x=F.Backward,m.x=a*Math.abs((u.left+x-r)/x)),{direction:b,speed:m}}function $(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function V(e){return e.reduce((e,t)=>o.add(e,z(t)),x)}const X=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+P(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+U(t),0)}]];class Y{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=B(t),r=V(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of X)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n);return this.rect[i]+(r[e]-t)},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}var _,J,G;(_=exports.AutoScrollActivator||(exports.AutoScrollActivator={}))[_.Pointer=0]="Pointer",_[_.DraggableRect=1]="DraggableRect",(J=exports.TraversalOrder||(exports.TraversalOrder={}))[J.TreeOrder=0]="TreeOrder",J[J.ReversedTreeOrder=1]="ReversedTreeOrder",(G=exports.MeasuringStrategy||(exports.MeasuringStrategy={}))[G.Always=0]="Always",G[G.BeforeDragging=1]="BeforeDragging",G[G.WhileDragging=2]="WhileDragging",(exports.MeasuringFrequency||(exports.MeasuringFrequency={})).Optimized="optimized";const Q=new Map,Z={measure:I,strategy:exports.MeasuringStrategy.WhileDragging,frequency:exports.MeasuringFrequency.Optimized};function ee({callback:e,disabled:n}){const r=t.useMemo(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:t}=window;return new t(e)},[n,e]);return t.useEffect(()=>()=>null==r?void 0:r.disconnect(),[r]),r}function te(e,n=K){const[r,i]=t.useReducer((function(t){if(!e)return null;if(!t&&s)return s;const r=n(e);return JSON.stringify(t)===JSON.stringify(r)?t:r}),null),s=t.useMemo(()=>e?n(e):null,[e,n]),a=function({callback:e,disabled:n}){const r=t.useMemo(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:t}=window;return new t(e)},[e,n]);return t.useEffect(()=>()=>null==r?void 0:r.disconnect(),[r]),r}({callback:t.useCallback(t=>{if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}},[e])}),l=ee({callback:i});return o.useIsomorphicLayoutEffect(()=>{i(),e?(null==l||l.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==a||a.disconnect())},[e]),null!=r?r:s}function ne(e,n=[]){const r=t.useRef(null);return t.useEffect(()=>{r.current=null},n),t.useEffect(()=>{const t=e!==x;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?o.subtract(e,r.current):x}const re=[],oe=[];function ie(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return o.isHTMLElement(t)?t:e}class se{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ae(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var le,ce;function de(e){e.preventDefault()}function ue(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(le||(le={})),(ce=exports.KeyboardCode||(exports.KeyboardCode={})).Space="Space",ce.Down="ArrowDown",ce.Right="ArrowRight",ce.Left="ArrowLeft",ce.Up="ArrowUp",ce.Esc="Escape",ce.Enter="Enter";const pe={start:[exports.KeyboardCode.Space,exports.KeyboardCode.Enter],cancel:[exports.KeyboardCode.Esc],end:[exports.KeyboardCode.Space,exports.KeyboardCode.Enter]},he=(e,{currentCoordinates:t})=>{switch(e.code){case exports.KeyboardCode.Right:return{...t,x:t.x+25};case exports.KeyboardCode.Left:return{...t,x:t.x-25};case exports.KeyboardCode.Down:return{...t,y:t.y+25};case exports.KeyboardCode.Up:return{...t,y:t.y-25}}};class ge{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.coordinates=x,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new se(o.getOwnerDocument(t)),this.windowListeners=new se(o.getWindow(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(le.Resize,this.handleCancel),this.windowListeners.add(le.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(le.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props;if(!e.node.current)throw new Error("Active draggable node is undefined");const n=I(e.node.current),r={x:n.left,y:n.top};this.coordinates=r,t(r)}handleKeyDown(e){if(o.isKeyboardEvent(e)){const{coordinates:t}=this,{active:n,context:r,options:i}=this.props,{keyboardCodes:s=pe,coordinateGetter:a=he,scrollBehavior:l="smooth"}=i,{code:c}=e;if(s.end.includes(c))return void this.handleEnd(e);if(s.cancel.includes(c))return void this.handleCancel(e);const d=a(e,{active:n,context:r.current,currentCoordinates:t});if(d){const n={x:0,y:0},{scrollableAncestors:i}=r.current;for(const r of i){const i=e.code,s=o.subtract(d,t),{isTop:a,isRight:c,isLeft:u,isBottom:p,maxScroll:h,minScroll:g}=q(r),v=$(r),f={x:Math.min(i===exports.KeyboardCode.Right?v.right-v.width/2:v.right,Math.max(i===exports.KeyboardCode.Right?v.left:v.left+v.width/2,d.x)),y:Math.min(i===exports.KeyboardCode.Down?v.bottom-v.height/2:v.bottom,Math.max(i===exports.KeyboardCode.Down?v.top:v.top+v.height/2,d.y))},b=i===exports.KeyboardCode.Right&&!c||i===exports.KeyboardCode.Left&&!u,m=i===exports.KeyboardCode.Down&&!p||i===exports.KeyboardCode.Up&&!a;if(b&&f.x!==d.x){const e=r.scrollLeft+s.x;if(i===exports.KeyboardCode.Right&&e<=h.x||i===exports.KeyboardCode.Left&&e>=g.x)return void r.scrollTo({left:e,behavior:l});n.x=i===exports.KeyboardCode.Right?r.scrollLeft-h.x:r.scrollLeft-g.x,r.scrollBy({left:-n.x,behavior:l});break}if(m&&f.y!==d.y){const e=r.scrollTop+s.y;if(i===exports.KeyboardCode.Down&&e<=h.y||i===exports.KeyboardCode.Up&&e>=g.y)return void r.scrollTo({top:e,behavior:l});n.y=i===exports.KeyboardCode.Down?r.scrollTop-h.y:r.scrollTop-g.y,r.scrollBy({top:-n.y,behavior:l});break}}this.handleMove(e,o.add(d,n))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t),this.coordinates=t}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ve(e){return Boolean(e&&"distance"in e)}function fe(e){return Boolean(e&&"delay"in e)}ge.activators=[{eventName:"onKeyDown",handler:(e,{keyboardCodes:t=pe,onActivation:n})=>{const{code:r}=e.nativeEvent;return!!t.start.includes(r)&&(e.preventDefault(),null==n||n({event:e.nativeEvent}),!0)}}];class be{constructor(e,t,n=function(e){const{EventTarget:t}=o.getWindow(e);return e instanceof t?e:o.getOwnerDocument(e)}(e.event.target)){var r;this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:s}=i;this.props=e,this.events=t,this.document=o.getOwnerDocument(s),this.documentListeners=new se(this.document),this.listeners=new se(n),this.windowListeners=new se(o.getWindow(s)),this.initialCoordinates=null!=(r=o.getEventCoordinates(i))?r:x,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(le.Resize,this.handleCancel),this.windowListeners.add(le.DragStart,de),this.windowListeners.add(le.VisibilityChange,this.handleCancel),this.windowListeners.add(le.ContextMenu,de),this.documentListeners.add(le.Keydown,this.handleKeydown),t){if(ve(t))return;if(fe(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(le.Click,ue,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(le.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!r)return;const l=null!=(t=o.getEventCoordinates(e))?t:x,c=o.subtract(r,l);if(!n&&a){if(fe(a))return ae(c,a.tolerance)?this.handleCancel():void 0;if(ve(a))return null!=a.tolerance&&ae(c,a.tolerance)?this.handleCancel():ae(c,a.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),s(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===exports.KeyboardCode.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const me={move:{name:"pointermove"},end:{name:"pointerup"}};class ye extends be{constructor(e){const{event:t}=e,n=o.getOwnerDocument(t.target);super(e,me,n)}}ye.activators=[{eventName:"onPointerDown",handler:({nativeEvent:e},{onActivation:t})=>!(!e.isPrimary||0!==e.button||(null==t||t({event:e}),0))}];const xe={move:{name:"mousemove"},end:{name:"mouseup"}};var we;!function(e){e[e.RightClick=2]="RightClick"}(we||(we={}));class Ce extends be{constructor(e){super(e,xe,o.getOwnerDocument(e.event.target))}}Ce.activators=[{eventName:"onMouseDown",handler:({nativeEvent:e},{onActivation:t})=>e.button!==we.RightClick&&(null==t||t({event:e}),!0)}];const De={move:{name:"touchmove"},end:{name:"touchend"}};class Re extends be{constructor(e){super(e,De)}static setup(){return window.addEventListener(De.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(De.move.name,e)};function e(){}}}function Ee(e,{transform:t,...n}){return(null==e?void 0:e.length)?e.reduce((e,t)=>t({transform:e,...n}),t):t}Re.activators=[{eventName:"onTouchStart",handler:({nativeEvent:e},{onActivation:t})=>{const{touches:n}=e;return!(n.length>1||(null==t||t({event:e}),0))}}];const Se=[{sensor:ye,options:{}},{sensor:ge,options:{}}],Me={current:{}},Ne=t.createContext({...x,scaleX:1,scaleY:1}),Le=t.memo((function({id:e,autoScroll:i=!0,announcements:a,children:c,sensors:d=Se,collisionDetection:u=L,measuring:p,modifiers:m,screenReaderInstructions:w=s,...C}){var D,R,E,M,N,A,O;const k=t.useReducer(f,void 0,v),[P,U]=k,[F,q]=t.useState(()=>({type:null,event:null})),[j,$]=t.useState(!1),{draggable:{active:X,nodes:_,translate:J},droppable:{containers:G}}=P,se=X?_[X]:null,ae=t.useRef({initial:null,translated:null}),le=t.useMemo(()=>{var e;return null!=X?{id:X,data:null!=(e=null==se?void 0:se.data)?e:Me,rect:ae}:null},[X,se]),ce=t.useRef(null),[de,ue]=t.useState(null),[pe,he]=t.useState(null),ge=o.useLatestValue(C,Object.values(C)),ve=o.useUniqueId("DndDescribedBy",e),fe=t.useMemo(()=>G.getEnabled(),[G]),{droppableRects:be,measureDroppableContainers:me,measuringScheduled:ye}=function(e,{dragging:n,dependencies:r,config:i}){const[s,a]=t.useState(null),l=null!=s,{frequency:c,measure:d,strategy:u}={...Z,...i},p=t.useRef(e),h=t.useCallback((e=[])=>a(t=>t?t.concat(e):e),[]),g=t.useRef(null),v=function(){switch(u){case exports.MeasuringStrategy.Always:return!1;case exports.MeasuringStrategy.BeforeDragging:return n;default:return!n}}(),f=o.useLazyMemo(t=>{if(v&&!n)return Q;const r=s;if(!t||t===Q||p.current!==e||null!=r){const t=new Map;for(let n of e){if(!n)continue;if(r&&r.length>0&&!r.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Y(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t},[e,s,n,v,d]);return t.useEffect(()=>{p.current=e},[e]),t.useEffect(()=>{v||requestAnimationFrame(()=>h())},[n,v]),t.useEffect(()=>{l&&a(null)},[l]),t.useEffect(()=>{v||"number"!=typeof c||null!==g.current||(g.current=setTimeout(()=>{h(),g.current=null},c))},[c,v,h,...r]),{droppableRects:f,measureDroppableContainers:h,measuringScheduled:l}}(fe,{dragging:j,dependencies:[J.x,J.y],config:null==p?void 0:p.droppable}),xe=function(e,t){const n=null!==t?e[t]:void 0,r=n?n.node.current:null;return o.useLazyMemo(e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(_,X),we=pe?o.getEventCoordinates(pe):null,Ce=te(xe,null!=(D=null==p||null==(R=p.draggable)?void 0:R.measure)?D:I),De=te(xe?xe.parentElement:null),Re=t.useRef({active:null,activeNode:xe,collisionRect:null,collisions:null,droppableRects:be,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Le=G.getNodeFor(null==(E=Re.current.over)?void 0:E.id),Ae=function({measure:e=K}){const[n,r]=t.useState(null),i=ee({callback:t.useCallback(t=>{for(const{target:n}of t)if(o.isHTMLElement(n)){r(t=>{const r=e(n);return t?{...t,width:r.width,height:r.height}:r});break}},[e])}),s=t.useCallback(t=>{const n=ie(t);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?e(n):null)},[e,i]),[a,l]=o.useNodeRef(s);return t.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}({measure:null==p||null==(M=p.dragOverlay)?void 0:M.measure}),Oe=null!=(N=Ae.nodeRef.current)?N:xe,Te=null!=(A=Ae.rect)?A:Ce,ke=Ae.nodeRef.current&&Ae.rect,Ke=t.useRef(null),Ie=ke?x:(We=Ke.current,(Be=Ce)&&We?{x:Be.left-We.left,y:Be.top-We.top}:x);var Be,We;const Pe=t.useMemo(()=>Ue?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(Ue):null,[Ue=Oe?Oe.ownerDocument.defaultView:null]);var Ue;const ze=function(e){const n=t.useRef(e),r=o.useLazyMemo(t=>e?t&&e&&n.current&&e.parentNode===n.current.parentNode?t:B(e):re,[e]);return t.useEffect(()=>{n.current=e},[e]),r}(X?null!=Le?Le:Oe:null),Fe=function(e,n,r=I){const i=t.useRef(e);return o.useLazyMemo(t=>e.length?n||!t&&e.length||e!==i.current?e.map(e=>new Y(r(e),e)):null!=t?t:oe:oe,[e,r,n])}(ze),qe=Ee(m,{transform:{x:J.x-Ie.x,y:J.y-Ie.y,scaleX:1,scaleY:1},activatorEvent:pe,active:le,activeNodeRect:Ce,containerNodeRect:De,draggingNodeRect:Te,over:Re.current.over,overlayNodeRect:Ae.rect,scrollableAncestors:ze,scrollableAncestorRects:Fe,windowRect:Pe}),je=we?o.add(we,J):null,He=function(e){const[n,r]=t.useState(null),i=t.useRef(e),s=t.useCallback(e=>{const t=W(e.target);t&&r(e=>e?(e.set(t,z(t)),new Map(e)):null)},[]);return t.useEffect(()=>{const t=i.current;if(e!==t){n(t);const o=e.map(e=>{const t=W(e);return t?(t.addEventListener("scroll",s,{passive:!0}),[t,z(t)]):null}).filter(e=>null!=e);r(o.length?new Map(o):null),i.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{const t=W(e);null==t||t.removeEventListener("scroll",s)})}},[s,e]),t.useMemo(()=>e.length?n?Array.from(n.values()).reduce((e,t)=>o.add(e,t),x):V(e):x,[e,n])}(ze),$e=ne(He),Ve=ne(He,[Ce]),Xe=o.add(qe,$e),Ye=Te?T(Te,qe):null,_e=le&&Ye?u({active:le,collisionRect:Ye,droppableRects:be,droppableContainers:fe,pointerCoordinates:je}):null,Je=S(_e,"id"),[Ge,Qe]=t.useState(null),Ze=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ke?qe:o.add(qe,Ve),null!=(O=null==Ge?void 0:Ge.rect)?O:null,Ce),et=t.useCallback((e,{sensor:t,options:n})=>{if(!ce.current)return;const o=_[ce.current];if(!o)return;const i=new t({active:ce.current,activeNode:o,event:e.nativeEvent,options:n,context:Re,onStart(e){const t=ce.current;if(!t)return;const n=_[t];if(!n)return;const{onDragStart:o}=ge.current,i={active:{id:t,data:n.data,rect:ae}};r.unstable_batchedUpdates(()=>{U({type:l.DragStart,initialCoordinates:e,active:t}),q({type:l.DragStart,event:i})}),null==o||o(i)},onMove(e){U({type:l.DragMove,coordinates:e})},onEnd:s(l.DragEnd),onCancel:s(l.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:i}=Re.current;let s=null;if(t&&i){const{cancelDrop:r}=ge.current;s={active:t,collisions:n,delta:i,over:o},e===l.DragEnd&&"function"==typeof r&&await Promise.resolve(r(s))&&(e=l.DragCancel)}ce.current=null,r.unstable_batchedUpdates(()=>{if(U({type:e}),Qe(null),$(!1),ue(null),he(null),s&&q({type:e,event:s}),s){const{onDragCancel:t,onDragEnd:n}=ge.current,r=e===l.DragEnd?n:t;null==r||r(s)}})}}r.unstable_batchedUpdates(()=>{ue(i),he(e.nativeEvent)})},[_]),tt=function(e,n){return t.useMemo(()=>e.reduce((e,t)=>{const{sensor:r}=t;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:n(e.handler,t)}))]},[]),[e,n])}(d,t.useCallback((e,t)=>(n,r)=>{const o=n.nativeEvent;null!==ce.current||o.dndKit||o.defaultPrevented||!0===e(n,t.options)&&(o.dndKit={capturedBy:t.sensor},ce.current=r,et(n,t))},[et]));!function(e){t.useEffect(()=>{if(!o.canUseDOM)return;const t=e.map(({sensor:e})=>null==e.setup?void 0:e.setup());return()=>{for(const e of t)null==e||e()}},e.map(({sensor:e})=>e))}(d),t.useEffect(()=>{null!=X&&$(!0)},[X]),t.useEffect(()=>{le||(Ke.current=null),le&&Ce&&!Ke.current&&(Ke.current=Ce)},[Ce,le]),t.useEffect(()=>{const{onDragMove:e}=ge.current,{active:t,collisions:n,over:r}=Re.current;if(!t)return;const o={active:t,collisions:n,delta:{x:Xe.x,y:Xe.y},over:r};q({type:l.DragMove,event:o}),null==e||e(o)},[Xe.x,Xe.y]),t.useEffect(()=>{const{active:e,collisions:t,droppableContainers:n,scrollAdjustedTranslate:o}=Re.current;if(!e||!ce.current||!o)return;const{onDragOver:i}=ge.current,s=n.get(Je),a=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,c={active:e,collisions:t,delta:{x:o.x,y:o.y},over:a};r.unstable_batchedUpdates(()=>{Qe(a),q({type:l.DragOver,event:c}),null==i||i(c)})},[Je]),o.useIsomorphicLayoutEffect(()=>{Re.current={active:le,activeNode:xe,collisionRect:Ye,collisions:_e,droppableRects:be,draggableNodes:_,draggingNode:Oe,draggingNodeRect:Te,droppableContainers:G,over:Ge,scrollableAncestors:ze,scrollAdjustedTranslate:Xe},ae.current={initial:Te,translated:Ye}},[le,xe,_e,Ye,_,Oe,Te,be,G,Ge,ze,Xe]),function({acceleration:e,activator:n=exports.AutoScrollActivator.Pointer,canScroll:r,draggingRect:i,enabled:s,interval:a=5,order:l=exports.TraversalOrder.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:u,threshold:p}){const[h,g]=o.useInterval(),v=t.useRef({x:1,y:1}),f=t.useMemo(()=>{switch(n){case exports.AutoScrollActivator.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case exports.AutoScrollActivator.DraggableRect:return i}return null},[n,i,c]),b=t.useRef(x),m=t.useRef(null),y=t.useCallback(()=>{const e=m.current;e&&e.scrollBy(v.current.x*b.current.x,v.current.y*b.current.y)},[]),w=t.useMemo(()=>l===exports.TraversalOrder.TreeOrder?[...d].reverse():d,[l,d]);t.useEffect(()=>{if(s&&d.length&&f){for(const t of w){if(!1===(null==r?void 0:r(t)))continue;const n=d.indexOf(t),o=u[n];if(!o)continue;const{direction:i,speed:s}=H(t,o,f,e,p);if(s.x>0||s.y>0)return g(),m.current=t,h(y,a),v.current=s,void(b.current=i)}v.current={x:0,y:0},b.current={x:0,y:0},g()}else g()},[e,y,r,g,s,a,JSON.stringify(f),h,d,w,u,JSON.stringify(p)])}({...function(){const e=!(!1===(null==de?void 0:de.autoScrollEnabled)||("object"==typeof i?!1===i.enabled:!1===i));return"object"==typeof i?{...i,enabled:e}:{enabled:e}}(),draggingRect:Ye,pointerCoordinates:je,scrollableAncestors:ze,scrollableAncestorRects:Fe});const nt=t.useMemo(()=>({active:le,activeNode:xe,activeNodeRect:Ce,activatorEvent:pe,collisions:_e,containerNodeRect:De,dragOverlay:Ae,draggableNodes:_,droppableContainers:G,droppableRects:be,over:Ge,measureDroppableContainers:me,scrollableAncestors:ze,scrollableAncestorRects:Fe,measuringScheduled:ye,windowRect:Pe}),[le,xe,Ce,pe,_e,De,Ae,_,G,be,Ge,me,ze,Fe,ye,Pe]),rt=t.useMemo(()=>({activatorEvent:pe,activators:tt,active:le,activeNodeRect:Ce,ariaDescribedById:{draggable:ve},dispatch:U,draggableNodes:_,over:Ge,measureDroppableContainers:me}),[pe,tt,le,Ce,U,ve,_,Ge,me]);return n.createElement(b.Provider,{value:F},n.createElement(h.Provider,{value:rt},n.createElement(g.Provider,{value:nt},n.createElement(Ne.Provider,{value:Ze},c))),n.createElement(y,{announcements:a,hiddenTextDescribedById:ve,screenReaderInstructions:w}))})),Ae=t.createContext(null),Oe="button";function Te(){return t.useContext(g)}const ke={timeout:25},Ke={duration:250,easing:"ease",dragSourceOpacity:0},Ie={x:0,y:0,scaleX:1,scaleY:1},Be=e=>o.isKeyboardEvent(e)?"transform 250ms ease":void 0,We=n.memo(({adjustScale:e=!1,children:r,dropAnimation:i=Ke,style:s,transition:a=Be,modifiers:l,wrapperElement:c="div",className:d,zIndex:u=999})=>{var g,v;const{active:f,activeNodeRect:b,containerNodeRect:m,draggableNodes:y,activatorEvent:x,over:w,dragOverlay:D,scrollableAncestors:R,scrollableAncestorRects:E,windowRect:S}=Te(),M=t.useContext(Ne),N=Ee(l,{activatorEvent:x,active:f,activeNodeRect:b,containerNodeRect:m,draggingNodeRect:D.rect,over:w,overlayNodeRect:D.rect,scrollableAncestors:R,scrollableAncestorRects:E,transform:M,windowRect:S}),L=null!==f,A=e?N:{...N,scaleX:1,scaleY:1},O=o.useLazyMemo(e=>L?e||(b?{...b}:null):null,[L,b]),T=O?D.setRef:void 0,k=O?{position:"fixed",width:O.width,height:O.height,top:O.top,left:O.left,zIndex:u,transform:o.CSS.Transform.toString(A),touchAction:"none",transformOrigin:e&&x?C(x,O):void 0,transition:"function"==typeof a?a(x):a,...s}:void 0,K=L?{style:k,children:r,className:d,transform:A}:void 0,B=t.useRef(K),W=null!=K?K:B.current,{children:P,...U}=null!=W?W:{},z=t.useRef(null!=(g=null==f?void 0:f.id)?g:null),F=function({animate:e,adjustScale:n,activeId:r,draggableNodes:i,duration:s,dragSourceOpacity:a,easing:l,node:c,transform:d}){const[u,p]=t.useState(!1);return o.useIsomorphicLayoutEffect(()=>{var t;if(!(e&&r&&l&&s))return void(e&&p(!0));const u=null==(t=i[r])?void 0:t.node.current;if(d&&c&&u&&null!==u.parentNode){const e=ie(c);if(e){const t=e.getBoundingClientRect(),r=I(u),i={x:t.left-r.left,y:t.top-r.top};if(Math.abs(i.x)||Math.abs(i.y)){const e=o.CSS.Transform.toString({x:d.x-i.x,y:d.y-i.y,scaleX:n?r.width*d.scaleX/t.width:1,scaleY:n?r.height*d.scaleY/t.height:1}),h=u.style.opacity;return null!=a&&(u.style.opacity=""+a),void(c.animate([{transform:o.CSS.Transform.toString(d)},{transform:e}],{easing:l,duration:s}).onfinish=()=>{c.style.display="none",p(!0),u&&null!=a&&(u.style.opacity=h)})}}}p(!0)},[e,r,n,i,s,l,a,c,d]),o.useIsomorphicLayoutEffect(()=>{u&&p(!1)},[u]),u}({animate:Boolean(i&&z.current&&!f),adjustScale:e,activeId:z.current,draggableNodes:y,duration:null==i?void 0:i.duration,easing:null==i?void 0:i.easing,dragSourceOpacity:null==i?void 0:i.dragSourceOpacity,node:D.nodeRef.current,transform:null==(v=B.current)?void 0:v.transform}),q=Boolean(P&&(r||i&&!F));return t.useEffect(()=>{var e;(null==f?void 0:f.id)!==z.current&&(z.current=null!=(e=null==f?void 0:f.id)?e:null),f&&B.current!==K&&(B.current=K)},[f,K]),t.useEffect(()=>{F&&(B.current=void 0)},[F]),q?n.createElement(h.Provider,{value:p},n.createElement(Ne.Provider,{value:Ie},n.createElement(c,{...U,ref:T},P))):null});exports.DndContext=Le,exports.DragOverlay=We,exports.KeyboardSensor=ge,exports.MouseSensor=Ce,exports.PointerSensor=ye,exports.TouchSensor=Re,exports.applyModifiers=Ee,exports.closestCenter=({collisionRect:e,droppableRects:t,droppableContainers:n})=>{const r=M(e,e.left,e.top),o=[];for(const e of n){const{id:n}=e,i=t.get(n);if(i){const t=w(M(i),r);o.push({id:n,data:{droppableContainer:e,value:t}})}}return o.sort(D)},exports.closestCorners=({collisionRect:e,droppableRects:t,droppableContainers:n})=>{const r=E(e),o=[];for(const e of n){const{id:n}=e,i=t.get(n);if(i){const t=E(i),s=r.reduce((e,n,r)=>e+w(t[r],n),0),a=Number((s/4).toFixed(4));o.push({id:n,data:{droppableContainer:e,value:a}})}}return o.sort(D)},exports.defaultAnnouncements=a,exports.defaultCoordinates=x,exports.defaultDropAnimation=Ke,exports.getClientRect=K,exports.getFirstCollision=S,exports.getScrollableAncestors=B,exports.pointerWithin=({droppableContainers:e,droppableRects:t,pointerCoordinates:n})=>{if(!n)return[];const r=[];for(const o of e){const{id:e}=o,i=t.get(e);if(i&&A(n,i)){const t=E(i).reduce((e,t)=>e+w(n,t),0),s=Number((t/4).toFixed(4));r.push({id:e,data:{droppableContainer:o,value:s}})}}return r.sort(D)},exports.rectIntersection=L,exports.useDndContext=Te,exports.useDndMonitor=m,exports.useDraggable=function({id:e,data:n,disabled:r=!1,attributes:i}){const s=o.useUniqueId("Droppable"),{activators:a,activatorEvent:l,active:c,activeNodeRect:d,ariaDescribedById:u,draggableNodes:p,over:g}=t.useContext(h),{role:v=Oe,roleDescription:f="draggable",tabIndex:b=0}=null!=i?i:{},m=(null==c?void 0:c.id)===e,y=t.useContext(m?Ne:Ae),[x,w]=o.useNodeRef(),C=function(e,n){return t.useMemo(()=>e.reduce((e,{eventName:t,handler:r})=>(e[t]=e=>{r(e,n)},e),{}),[e,n])}(a,e),D=o.useLatestValue(n);return o.useIsomorphicLayoutEffect(()=>(p[e]={id:e,key:s,node:x,data:D},()=>{const t=p[e];t&&t.key===s&&delete p[e]}),[p,e]),{active:c,activatorEvent:l,activeNodeRect:d,attributes:t.useMemo(()=>({role:v,tabIndex:b,"aria-pressed":!(!m||v!==Oe)||void 0,"aria-roledescription":f,"aria-describedby":u.draggable}),[v,b,m,f,u.draggable]),isDragging:m,listeners:r?void 0:C,node:x,over:g,setNodeRef:w,transform:y}},exports.useDroppable=function({data:e,disabled:n=!1,id:r,resizeObserverConfig:i}){const s=o.useUniqueId("Droppable"),{active:a,dispatch:c,over:d,measureDroppableContainers:u}=t.useContext(h),p=t.useRef({disabled:n}),g=t.useRef(!1),v=t.useRef(null),f=t.useRef(null),{disabled:b,updateMeasurementsFor:m,timeout:y}={...ke,...i},x=o.useLatestValue(null!=m?m:r),w=ee({callback:t.useCallback(()=>{g.current?(null!=f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{u("string"==typeof x.current?[x.current]:x.current),f.current=null},y)):g.current=!0},[y]),disabled:b||!a}),C=t.useCallback((e,t)=>{w&&(t&&(w.unobserve(t),g.current=!1),e&&w.observe(e))},[w]),[D,R]=o.useNodeRef(C),E=o.useLatestValue(e);return t.useEffect(()=>{w&&D.current&&(w.disconnect(),g.current=!1,w.observe(D.current))},[D,w]),o.useIsomorphicLayoutEffect(()=>(c({type:l.RegisterDroppable,element:{id:r,key:s,disabled:n,node:D,rect:v,data:E}}),()=>c({type:l.UnregisterDroppable,key:s,id:r})),[r]),t.useEffect(()=>{n!==p.current.disabled&&(c({type:l.SetDroppableDisabled,id:r,key:s,disabled:n}),p.current.disabled=n)},[r,s,n,c]),{active:a,rect:v,isOver:(null==d?void 0:d.id)===r,node:D,over:d,setNodeRef:R}},exports.useSensor=function(e,n){return t.useMemo(()=>({sensor:e,options:null!=n?n:{}}),[e,n])},exports.useSensors=function(...e){return t.useMemo(()=>[...e].filter(e=>null!=e),[...e])};
//# sourceMappingURL=core.cjs.production.min.js.map

@@ -7,4 +7,6 @@ export { AutoScrollActivator, TraversalOrder, useAutoScroller, } from './useAutoScroller';

export type { DroppableMeasuring } from './useDroppableMeasuring';
export { useObservedRect } from './useObservedRect';
export { useResizeObserver } from './useResizeObserver';
export { useScrollOffsets } from './useScrollOffsets';
export { useScrollOffsetsDelta } from './useScrollOffsetsDelta';
export { useScrollableAncestors } from './useScrollableAncestors';

@@ -14,3 +16,4 @@ export { useSensorSetup } from './useSensorSetup';

export type { SyntheticListener, SyntheticListeners, SyntheticListenerMap, } from './useSyntheticListeners';
export { useRect, useClientRect, useClientRects, useWindowRect } from './useRect';
export { useRects } from './useRects';
export { useWindowRect } from './useWindowRect';
export { useDragOverlayMeasuring } from './useDragOverlayMeasuring';
interface Arguments {
callback: ResizeObserverCallback;
disabled?: boolean;
onResize: ResizeObserverCallback;
}

@@ -9,3 +9,3 @@ /**

*/
export declare function useResizeObserver({ onResize, disabled }: Arguments): ResizeObserver | undefined;
export declare function useResizeObserver({ callback, disabled }: Arguments): ResizeObserver | undefined;
export {};

@@ -8,3 +8,3 @@ import type { ClientRect } from '../../types';

*/
export declare function getClientRect(element: HTMLElement, options?: Options): {
export declare function getClientRect(element: Element, options?: Options): {
top: number;

@@ -25,3 +25,3 @@ left: number;

*/
export declare function getTransformAgnosticClientRect(element: HTMLElement): ClientRect;
export declare function getTransformAgnosticClientRect(element: Element): ClientRect;
export {};
import type { ClientRect } from '../../types/rect';
export declare class Rect {
constructor(rect: ClientRect, element: HTMLElement);
constructor(rect: ClientRect, element: Element);
private rect;

@@ -5,0 +5,0 @@ width: number;

{
"name": "@dnd-kit/core",
"version": "5.1.0-next-202221523720",
"version": "5.1.0-next-202221724226",
"description": "dnd kit – a lightweight React library for building performant and accessible drag and drop experiences",

@@ -5,0 +5,0 @@ "author": "Claudéric Demers",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc