@nocobase/app 1.6.10 → 1.7.0-alpha.10
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.
- package/dist/client/2167.a74bd66f.async.js +58 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/dist/client/npm._at_ant-design.47a729f3.async.js +141 -0
- package/dist/client/npm._at_dnd-kit.0058c596.async.js +5 -0
- package/dist/client/npm._at_formily.5f112117.async.js +100 -0
- package/dist/client/npm._at_rc-component.12d32a22.async.js +8 -0
- package/dist/client/{npm.ahooks.4b44f0c8.async.js → npm.ahooks.c5b165dc.async.js} +1 -1
- package/dist/client/npm.antd.1b1bd213.async.js +464 -0
- package/dist/client/npm.dayjs.54ff5ad9.async.js +1 -0
- package/dist/client/{npm.dompurify.d5071c22.async.js → npm.dompurify.2ca7a7c6.async.js} +1 -1
- package/dist/client/{npm.highlight.js.83fe0142.async.js → npm.highlight.js.f727dfe3.async.js} +1 -1
- package/dist/client/{npm.lodash.0ff318b3.async.js → npm.lodash.5dcc1c5e.async.js} +2 -2
- package/dist/client/{npm.mermaid.721cd79c.async.js → npm.mermaid.42f5ed21.async.js} +4 -4
- package/dist/client/npm.rc-cascader.cf6ec555.async.js +4 -0
- package/dist/client/npm.rc-image.c695cc37.async.js +1 -0
- package/dist/client/npm.rc-menu.ab059b1c.async.js +1 -0
- package/dist/client/npm.rc-picker.89eafb74.async.js +22 -0
- package/dist/client/npm.rc-select.6b32e443.async.js +3 -0
- package/dist/client/npm.rc-slider.d2d511ab.async.js +1 -0
- package/dist/client/npm.rc-table.c5aa8a0d.async.js +22 -0
- package/dist/client/npm.rc-tree-select.5597dcbf.async.js +5 -0
- package/dist/client/npm.rc-tree.a1cc1b34.async.js +1 -0
- package/dist/client/{npm.sanitize-html.4386b2d9.async.js → npm.sanitize-html.5dd1860c.async.js} +4 -4
- package/dist/client/p__index.02649ab9.async.js +1597 -0
- package/dist/client/umi.45b44148.js +63 -0
- package/package.json +6 -6
- package/dist/client/4750.667c5051.async.js +0 -69
- package/dist/client/npm._at_ant-design.5ba41bf5.async.js +0 -139
- package/dist/client/npm._at_dnd-kit.2fac5dde.async.js +0 -9
- package/dist/client/npm._at_formily.07fa921d.async.js +0 -96
- package/dist/client/npm._at_rc-component.43f95f42.async.js +0 -5
- package/dist/client/npm.antd.483a9a61.async.js +0 -440
- package/dist/client/npm.dayjs.0a5fd152.async.js +0 -1
- package/dist/client/npm.rc-cascader.04b47add.async.js +0 -1
- package/dist/client/npm.rc-menu.adf5ade6.async.js +0 -1
- package/dist/client/npm.rc-picker.9e629062.async.js +0 -1
- package/dist/client/npm.rc-select.7c36e54e.async.js +0 -3
- package/dist/client/npm.rc-table.a153e021.async.js +0 -1
- package/dist/client/npm.rc-tree.f61b7d87.async.js +0 -1
- package/dist/client/p__index.3208496d.async.js +0 -1583
- package/dist/client/umi.ccfaf768.js +0 -60
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4989],{42617:function(mt,ne,k){k.r(ne),k.d(ne,{HiddenText:function(){return f},LiveRegion:function(){return Y},useAnnouncement:function(){return he}});var s=k(67294);const W={display:"none"};function f(X){let{id:D,value:_}=X;return s.createElement("div",{id:D,style:W},_)}function Y(X){let{id:D,announcement:_,ariaLiveType:V="assertive"}=X;const N={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return s.createElement("div",{id:D,style:N,role:"status","aria-live":V,"aria-atomic":!0},_)}function he(){const[X,D]=(0,s.useState)("");return{announce:(0,s.useCallback)(V=>{V!=null&&D(V)},[]),announcement:X}}},94697:function(mt,ne,k){k.r(ne),k.d(ne,{AutoScrollActivator:function(){return ye},DndContext:function(){return Fn},DragOverlay:function(){return jn},KeyboardCode:function(){return F},KeyboardSensor:function(){return kt},MeasuringFrequency:function(){return je},MeasuringStrategy:function(){return Me},MouseSensor:function(){return on},PointerSensor:function(){return Xt},TouchSensor:function(){return sn},TraversalOrder:function(){return He},applyModifiers:function(){return Ht},closestCenter:function(){return _e},closestCorners:function(){return et},defaultAnnouncements:function(){return X},defaultCoordinates:function(){return Z},defaultDropAnimation:function(){return ln},getClientRect:function(){return x},getFirstCollision:function(){return Xe},getScrollableAncestors:function(){return re},pointerWithin:function(){return l},rectIntersection:function(){return o},useDndContext:function(){return un},useDndMonitor:function(){return Ke},useDraggable:function(){return Un},useDroppable:function(){return Xn},useSensor:function(){return Tn},useSensors:function(){return On}});var s=k(67294),W=k(73935),f=k(24285),Y=k(42617);const he={draggable:`
|
|
2
|
+
To pick up a draggable item, press the space bar.
|
|
3
|
+
While dragging, use the arrow keys to move the item.
|
|
4
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
5
|
+
`},X={onDragStart(e){return`Picked up draggable item ${e}.`},onDragOver(e,t){return t?`Draggable item ${e} was moved over droppable area ${t}.`:`Draggable item ${e} is no longer over a droppable area.`},onDragEnd(e,t){return t?`Draggable item ${e} was dropped over droppable area ${t}`:`Draggable item ${e} was dropped.`},onDragCancel(e){return`Dragging was cancelled. Draggable item ${e} was dropped.`}};var D;(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"})(D||(D={}));function _(...e){}class V 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(({disabled:t})=>!t)}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const N={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:{},droppableRects:new Map,droppableContainers:new V,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:_},scrollableAncestors:[],scrollableAncestorRects:[],measureDroppableContainers:_,windowRect:null,measuringScheduled:!1},T={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:_,draggableNodes:{},over:null,measureDroppableContainers:_},S=(0,s.createContext)(T),P=(0,s.createContext)(N);function ie(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:{},translate:{x:0,y:0}},droppable:{containers:new V}}}function Fe(e,t){switch(t.type){case D.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case D.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 D.DragEnd:case D.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case D.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new V(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case D.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,c=e.droppable.containers.get(n);if(!c||r!==c.key)return e;const a=new V(e.droppable.containers);return a.set(n,{...c,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case D.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const c=new V(e.droppable.containers);return c.delete(n),{...e,droppable:{...e.droppable,containers:c}}}default:return e}}const De=(0,s.createContext)({type:null,event:null});function Ke({onDragStart:e,onDragMove:t,onDragOver:n,onDragEnd:r,onDragCancel:i}){const c=(0,s.useContext)(De),a=(0,s.useRef)(c);(0,s.useEffect)(()=>{if(c!==a.current){const{type:h,event:g}=c;switch(h){case D.DragStart:e==null||e(g);break;case D.DragMove:t==null||t(g);break;case D.DragOver:n==null||n(g);break;case D.DragCancel:i==null||i(g);break;case D.DragEnd:r==null||r(g);break}a.current=c}},[c,e,t,n,r,i])}function $e({announcements:e=X,hiddenTextDescribedById:t,screenReaderInstructions:n}){const{announce:r,announcement:i}=(0,Y.useAnnouncement)(),c=(0,f.useUniqueId)("DndLiveRegion"),[a,h]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{h(!0)},[]),Ke((0,s.useMemo)(()=>({onDragStart({active:g}){r(e.onDragStart(g.id))},onDragMove({active:g,over:p}){e.onDragMove&&r(e.onDragMove(g.id,p==null?void 0:p.id))},onDragOver({active:g,over:p}){r(e.onDragOver(g.id,p==null?void 0:p.id))},onDragEnd({active:g,over:p}){r(e.onDragEnd(g.id,p==null?void 0:p.id))},onDragCancel({active:g}){r(e.onDragCancel(g.id))}}),[r,e])),a?(0,W.createPortal)(s.createElement(s.Fragment,null,s.createElement(Y.HiddenText,{id:t,value:n.draggable}),s.createElement(Y.LiveRegion,{id:c,announcement:i})),document.body):null}const Z=Object.freeze({x:0,y:0});function Ce(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Qe(e,t){const n=(0,f.getEventCoordinates)(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return`${r.x}% ${r.y}%`}function Ue({data:{value:e}},{data:{value:t}}){return e-t}function ke({data:{value:e}},{data:{value:t}}){return t-e}function ze({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 Xe(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function Ze(e,t=e.left,n=e.top){return{x:t+e.width*.5,y:n+e.height*.5}}const _e=({collisionRect:e,droppableContainers:t})=>{const n=Ze(e,e.left,e.top),r=[];for(const i of t){const{id:c,rect:{current:a}}=i;if(a){const h=Ce(Ze(a),n);r.push({id:c,data:{droppableContainer:i,value:h}})}}return r.sort(Ue)},et=({collisionRect:e,droppableContainers:t})=>{const n=ze(e),r=[];for(const i of t){const{id:c,rect:{current:a}}=i;if(a){const h=ze(a),g=n.reduce((b,m,L)=>b+Ce(h[L],m),0),p=Number((g/4).toFixed(4));r.push({id:c,data:{droppableContainer:i,value:p}})}}return r.sort(Ue)};function ut(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),c=Math.min(t.top+t.height,e.top+e.height),a=i-r,h=c-n;if(r<i&&n<c){const g=t.width*t.height,p=e.width*e.height,b=a*h,m=b/(g+p-b);return Number(m.toFixed(4))}return 0}const o=({collisionRect:e,droppableContainers:t})=>{const n=[];for(const r of t){const{id:i,rect:{current:c}}=r;if(c){const a=ut(c,e);a>0&&n.push({id:i,data:{droppableContainer:r,value:a}})}}return n.sort(ke)};function u(e,t){const{top:n,left:r,bottom:i,right:c}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=c}const l=({droppableContainers:e,pointerCoordinates:t})=>{if(!t)return[];const n=[];for(const r of e){const{id:i,rect:{current:c}}=r;if(c&&u(t,c)){const h=ze(c).reduce((p,b)=>p+Ce(t,b),0),g=Number((h/4).toFixed(4));n.push({id:i,data:{droppableContainer:r,value:g}})}}return n.sort(Ue)};function d(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function v(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Z}function y(e){return function(n,...r){return r.reduce((i,c)=>({...i,top:i.top+e*c.y,bottom:i.bottom+e*c.y,left:i.left+e*c.x,right:i.right+e*c.x}),{...n})}}const O=y(1);function U(e,t,n){let r,i,c,a,h;if(t.startsWith("matrix3d("))r=t.slice(9,-1).split(/, /),i=+r[0],c=+r[5],a=+r[12],h=+r[13];else if(t.startsWith("matrix("))r=t.slice(7,-1).split(/, /),i=+r[0],c=+r[3],a=+r[4],h=+r[5];else return e;const g=e.left-a-(1-i)*parseFloat(n),p=e.top-h-(1-c)*parseFloat(n.slice(n.indexOf(" ")+1)),b=i?e.width/i:e.width,m=c?e.height/c:e.height;return{width:b,height:m,top:p,right:g+b,bottom:p+m,left:g}}const C={ignoreTransform:!1};function x(e,t=C){let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:p}=(0,f.getWindow)(e),{transform:b,transformOrigin:m}=p(e);b&&(n=U(n,b,m))}const{top:r,left:i,width:c,height:a,bottom:h,right:g}=n;return{top:r,left:i,width:c,height:a,bottom:h,right:g}}function K(e){return x(e,{ignoreTransform:!0})}function ge(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function q(e,t=(0,f.getWindow)(e).getComputedStyle(e)){return t.position==="fixed"}function Re(e,t=(0,f.getWindow)(e).getComputedStyle(e)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].find(i=>{const c=t[i];return typeof c=="string"?n.test(c):!1})!=null}function re(e){const t=[];function n(r){if(!r)return t;if((0,f.isDocument)(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!(0,f.isHTMLElement)(r)||(0,f.isSVGElement)(r)||t.includes(r))return t;const{getComputedStyle:i}=(0,f.getWindow)(r),c=i(r);return r!==e&&Re(r,c)&&t.push(r),q(r,c)?t:n(r.parentNode)}return e?n(e):t}function ve(e){return!f.canUseDOM||!e?null:(0,f.isWindow)(e)?e:(0,f.isNode)(e)?(0,f.isDocument)(e)||e===(0,f.getOwnerDocument)(e).scrollingElement?window:(0,f.isHTMLElement)(e)?e:null:null}function Se(e){return(0,f.isWindow)(e)?e.scrollX:e.scrollLeft}function ee(e){return(0,f.isWindow)(e)?e.scrollY:e.scrollTop}function Ee(e){return{x:Se(e),y:ee(e)}}var be;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(be||(be={}));function xe(e){const t={x:0,y:0},n={x:e.scrollWidth-e.clientWidth,y:e.scrollHeight-e.clientHeight},r=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,c=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:r,isLeft:i,isBottom:c,isRight:a,maxScroll:n,minScroll:t}}function wt(e){return!f.canUseDOM||!e?!1:e===document.scrollingElement}const It={x:.2,y:.2};function Dt(e,t,{top:n,left:r,right:i,bottom:c},a=10,h=It){const{clientHeight:g,clientWidth:p}=e,b=wt(e)?{top:0,left:0,right:p,bottom:g,width:p,height:g}:t,{isTop:m,isBottom:L,isLeft:R,isRight:M}=xe(e),E={x:0,y:0},I={x:0,y:0},w={height:b.height*h.y,width:b.width*h.x};return!m&&n<=b.top+w.height?(E.y=be.Backward,I.y=a*Math.abs((b.top+w.height-n)/w.height)):!L&&c>=b.bottom-w.height&&(E.y=be.Forward,I.y=a*Math.abs((b.bottom-w.height-c)/w.height)),!M&&i>=b.right-w.width?(E.x=be.Forward,I.x=a*Math.abs((b.right-w.width-i)/w.width)):!R&&r<=b.left+w.width&&(E.x=be.Backward,I.x=a*Math.abs((b.left+w.width-r)/w.width)),{direction:E,speed:I}}function Ye(e){if(e===document.scrollingElement){const{innerWidth:c,innerHeight:a}=window;return{top:0,left:0,right:c,bottom:a,width:c,height:a}}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 Ct(e){return e.reduce((t,n)=>(0,f.add)(t,Ee(n)),Z)}function Nt(e){return e.reduce((t,n)=>t+Se(n),0)}function Pt(e){return e.reduce((t,n)=>t+ee(n),0)}const Rt=[["x",["left","right"],Nt],["y",["top","bottom"],Pt]];class lt{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=re(n),i=Ct(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[c,a,h]of Rt)for(const g of a)Object.defineProperty(this,g,{get:()=>{const p=h(r),b=i[c]-p;return this.rect[g]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}var ye;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ye||(ye={}));var He;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(He||(He={}));function Bt({acceleration:e,activator:t=ye.Pointer,canScroll:n,draggingRect:r,enabled:i,interval:c=5,order:a=He.TreeOrder,pointerCoordinates:h,scrollableAncestors:g,scrollableAncestorRects:p,threshold:b}){const[m,L]=(0,f.useInterval)(),R=(0,s.useRef)({x:1,y:1}),M=(0,s.useMemo)(()=>{switch(t){case ye.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case ye.DraggableRect:return r}return null},[t,r,h]),E=(0,s.useRef)(Z),I=(0,s.useRef)(null),w=(0,s.useCallback)(()=>{const A=I.current;if(!A)return;const $=R.current.x*E.current.x,z=R.current.y*E.current.y;A.scrollBy($,z)},[]),H=(0,s.useMemo)(()=>a===He.TreeOrder?[...g].reverse():g,[a,g]);(0,s.useEffect)(()=>{if(!i||!g.length||!M){L();return}for(const A of H){if((n==null?void 0:n(A))===!1)continue;const $=g.indexOf(A),z=p[$];if(!z)continue;const{direction:B,speed:te}=Dt(A,z,M,e,b);if(te.x>0||te.y>0){L(),I.current=A,m(w,c),R.current=te,E.current=B;return}}R.current={x:0,y:0},E.current={x:0,y:0},L()},[e,w,n,L,i,c,JSON.stringify(M),m,g,H,p,JSON.stringify(b)])}function Wt(e,t){const n=t!==null?e[t]:void 0,r=n?n.node.current:null;return(0,f.useLazyMemo)(i=>{var c;return t===null?null:(c=r??i)!=null?c:null},[r,t])}function Ae(e,t){return(0,s.useMemo)(()=>e.reduce((n,r)=>{const{sensor:i}=r,c=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...c]},[]),[e,t])}var Me;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Me||(Me={}));var je;(function(e){e.Optimized="optimized"})(je||(je={}));const at=new Map,Jt={measure:K,strategy:Me.WhileDragging,frequency:je.Optimized};function Ft(e,{dragging:t,dependencies:n,config:r}){const[i,c]=(0,s.useState)(null),a=i!=null,{frequency:h,measure:g,strategy:p}={...Jt,...r},b=(0,s.useRef)(e),m=(0,s.useCallback)((I=[])=>c(w=>w?w.concat(I):I),[]),L=(0,s.useRef)(null),R=E(),M=(0,f.useLazyMemo)(I=>{if(R&&!t)return at;const w=i;if(!I||I===at||b.current!==e||w!=null){const H=new Map;for(let A of e){if(!A)continue;if(w&&w.length>0&&!w.includes(A.id)&&A.rect.current){H.set(A.id,A.rect.current);continue}const $=A.node.current,z=$?new lt(g($),$):null;A.rect.current=z,z&&H.set(A.id,z)}return H}return I},[e,i,t,R,g]);return(0,s.useEffect)(()=>{b.current=e},[e]),(0,s.useEffect)(()=>{R||requestAnimationFrame(()=>m())},[t,R]),(0,s.useEffect)(()=>{a&&c(null)},[a]),(0,s.useEffect)(()=>{R||typeof h!="number"||L.current!==null||(L.current=setTimeout(()=>{m(),L.current=null},h))},[h,R,m,...n]),{droppableRects:M,measureDroppableContainers:m,measuringScheduled:a};function E(){switch(p){case Me.Always:return!1;case Me.BeforeDragging:return t;default:return!t}}}function Ie({onResize:e,disabled:t}){const n=(0,s.useMemo)(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:r}=window;return new r(e)},[t,e]);return(0,s.useEffect)(()=>()=>n==null?void 0:n.disconnect(),[n]),n}function tt(e){const[t,n]=(0,s.useState)(null),r=(0,s.useRef)(e),i=(0,s.useCallback)(c=>{const a=ve(c.target);a&&n(h=>h?(h.set(a,Ee(a)),new Map(h)):null)},[]);return(0,s.useEffect)(()=>{const c=r.current;if(e!==c){a(c);const h=e.map(g=>{const p=ve(g);return p?(p.addEventListener("scroll",i,{passive:!0}),[p,Ee(p)]):null}).filter(g=>g!=null);n(h.length?new Map(h):null),r.current=e}return()=>{a(e),a(c)};function a(h){h.forEach(g=>{const p=ve(g);p==null||p.removeEventListener("scroll",i)})}},[i,e]),(0,s.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((c,a)=>(0,f.add)(c,a),Z):Ct(e):Z,[e,t])}const J=[];function Kt(e){const t=(0,s.useRef)(e),n=(0,f.useLazyMemo)(r=>e?r&&e&&t.current&&e.parentNode===t.current.parentNode?r:re(e):J,[e]);return(0,s.useEffect)(()=>{t.current=e},[e]),n}function St(e){(0,s.useEffect)(()=>{if(!f.canUseDOM)return;const t=e.map(({sensor:n})=>n.setup==null?void 0:n.setup());return()=>{for(const n of t)n==null||n()}},e.map(({sensor:t})=>t))}function dt(e,t){return(0,s.useMemo)(()=>e.reduce((n,{eventName:r,handler:i})=>(n[r]=c=>{i(c,t)},n),{}),[e,t])}const $t=Sn(K),Rn=En(K);function Qt(e,t,n){const r=(0,s.useRef)(e);return(0,f.useLazyMemo)(i=>e?n||!i&&e||e!==r.current?(0,f.isHTMLElement)(e)&&e.parentNode==null?null:new lt(t(e),e):i??null:null,[e,n,t])}function Sn(e){return(t,n)=>Qt(t,e,n)}function En(e){const t=[];return function(r,i){const c=(0,s.useRef)(r);return(0,f.useLazyMemo)(a=>r.length?i||!a&&r.length||r!==c.current?r.map(h=>new lt(e(h),h)):a??t:t,[r,i])}}function xn(e){return(0,s.useMemo)(()=>e?ge(e):null,[e])}function Zt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,f.isHTMLElement)(t)?t:e}function Mn({measure:e=x}){const[t,n]=(0,s.useState)(null),r=(0,s.useCallback)(g=>{for(const{target:p}of g)if((0,f.isHTMLElement)(p)){n(b=>{const m=e(p);return b?{...b,width:m.width,height:m.height}:m});break}},[e]),i=Ie({onResize:r}),c=(0,s.useCallback)(g=>{const p=Zt(g);i==null||i.disconnect(),p&&(i==null||i.observe(p)),n(p?e(p):null)},[e,i]),[a,h]=(0,f.useNodeRef)(c);return(0,s.useMemo)(()=>({nodeRef:a,rect:t,setRef:h}),[t,a,h])}function Tn(e,t){return(0,s.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function On(...e){return(0,s.useMemo)(()=>[...e].filter(t=>t!=null),[...e])}class ft{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 Ln(e){const{EventTarget:t}=(0,f.getWindow)(e);return e instanceof t?e:(0,f.getOwnerDocument)(e)}function Ut(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 ce;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ce||(ce={}));function en(e){e.preventDefault()}function An(e){e.stopPropagation()}var F;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(F||(F={}));const tn={start:[F.Space,F.Enter],cancel:[F.Esc],end:[F.Space,F.Enter]},In=(e,{currentCoordinates:t})=>{switch(e.code){case F.Right:return{...t,x:t.x+25};case F.Left:return{...t,x:t.x-25};case F.Down:return{...t,y:t.y+25};case F.Up:return{...t,y:t.y-25}}};class kt{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.coordinates=Z,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new ft((0,f.getOwnerDocument)(n)),this.windowListeners=new ft((0,f.getWindow)(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ce.Resize,this.handleCancel),this.windowListeners.add(ce.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ce.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props;if(!t.node.current)throw new Error("Active draggable node is undefined");const r=K(t.node.current),i={x:r.left,y:r.top};this.coordinates=i,n(i)}handleKeyDown(t){if((0,f.isKeyboardEvent)(t)){const{coordinates:n}=this,{active:r,context:i,options:c}=this.props,{keyboardCodes:a=tn,coordinateGetter:h=In,scrollBehavior:g="smooth"}=c,{code:p}=t;if(a.end.includes(p)){this.handleEnd(t);return}if(a.cancel.includes(p)){this.handleCancel(t);return}const b=h(t,{active:r,context:i.current,currentCoordinates:n});if(b){const m={x:0,y:0},{scrollableAncestors:L}=i.current;for(const R of L){const M=t.code,E=(0,f.subtract)(b,n),{isTop:I,isRight:w,isLeft:H,isBottom:A,maxScroll:$,minScroll:z}=xe(R),B=Ye(R),te={x:Math.min(M===F.Right?B.right-B.width/2:B.right,Math.max(M===F.Right?B.left:B.left+B.width/2,b.x)),y:Math.min(M===F.Down?B.bottom-B.height/2:B.bottom,Math.max(M===F.Down?B.top:B.top+B.height/2,b.y))},Ve=M===F.Right&&!w||M===F.Left&&!H,j=M===F.Down&&!A||M===F.Up&&!I;if(Ve&&te.x!==b.x){if(M===F.Right&&R.scrollLeft+E.x<=$.x||M===F.Left&&R.scrollLeft+E.x>=z.x){R.scrollBy({left:E.x,behavior:g});return}m.x=M===F.Right?R.scrollLeft-$.x:R.scrollLeft-z.x,R.scrollBy({left:-m.x,behavior:g});break}else if(j&&te.y!==b.y){if(M===F.Down&&R.scrollTop+E.y<=$.y||M===F.Up&&R.scrollTop+E.y>=z.y){R.scrollBy({top:E.y,behavior:g});return}m.y=M===F.Down?R.scrollTop-$.y:R.scrollTop-z.y,R.scrollBy({top:-m.y,behavior:g});break}}this.handleMove(t,(0,f.add)(b,m))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n),this.coordinates=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()}}kt.activators=[{eventName:"onKeyDown",handler:(e,{keyboardCodes:t=tn,onActivation:n})=>{const{code:r}=e.nativeEvent;return t.start.includes(r)?(e.preventDefault(),n==null||n({event:e.nativeEvent}),!0):!1}}];function nn(e){return!!(e&&"distance"in e)}function rn(e){return!!(e&&"delay"in e)}class zt{constructor(t,n,r=Ln(t.event.target)){var i;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:c}=t,{target:a}=c;this.props=t,this.events=n,this.document=(0,f.getOwnerDocument)(a),this.documentListeners=new ft(this.document),this.listeners=new ft(r),this.windowListeners=new ft((0,f.getWindow)(a)),this.initialCoordinates=(i=(0,f.getEventCoordinates)(c))!=null?i:Z,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}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(ce.Resize,this.handleCancel),this.windowListeners.add(ce.DragStart,en),this.windowListeners.add(ce.VisibilityChange,this.handleCancel),this.windowListeners.add(ce.ContextMenu,en),this.documentListeners.add(ce.Keydown,this.handleKeydown),n){if(nn(n))return;if(rn(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);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(ce.Click,An,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ce.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:c}=this,{onMove:a,options:{activationConstraint:h}}=c;if(!i)return;const g=(n=(0,f.getEventCoordinates)(t))!=null?n:Z,p=(0,f.subtract)(i,g);if(!r&&h){if(rn(h))return Ut(p,h.tolerance)?this.handleCancel():void 0;if(nn(h))return h.tolerance!=null&&Ut(p,h.tolerance)?this.handleCancel():Ut(p,h.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),a(g)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===F.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Nn={move:{name:"pointermove"},end:{name:"pointerup"}};class Xt extends zt{constructor(t){const{event:n}=t,r=(0,f.getOwnerDocument)(n.target);super(t,Nn,r)}}Xt.activators=[{eventName:"onPointerDown",handler:({nativeEvent:e},{onActivation:t})=>!e.isPrimary||e.button!==0?!1:(t==null||t({event:e}),!0)}];const Pn={move:{name:"mousemove"},end:{name:"mouseup"}};var _t;(function(e){e[e.RightClick=2]="RightClick"})(_t||(_t={}));class on extends zt{constructor(t){super(t,Pn,(0,f.getOwnerDocument)(t.event.target))}}on.activators=[{eventName:"onMouseDown",handler:({nativeEvent:e},{onActivation:t})=>e.button===_t.RightClick?!1:(t==null||t({event:e}),!0)}];const Yt={move:{name:"touchmove"},end:{name:"touchend"}};class sn extends zt{constructor(t){super(t,Yt)}static setup(){return window.addEventListener(Yt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Yt.move.name,t)};function t(){}}}sn.activators=[{eventName:"onTouchStart",handler:({nativeEvent:e},{onActivation:t})=>{const{touches:n}=e;return n.length>1?!1:(t==null||t({event:e}),!0)}}];function Ht(e,{transform:t,...n}){return e!=null&&e.length?e.reduce((r,i)=>i({transform:r,...n}),t):t}const Bn=[{sensor:Xt,options:{}},{sensor:kt,options:{}}],Wn={current:{}},Et=(0,s.createContext)({...Z,scaleX:1,scaleY:1}),Fn=(0,s.memo)(function({id:t,autoScroll:n=!0,announcements:r,children:i,sensors:c=Bn,collisionDetection:a=o,measuring:h,modifiers:g,screenReaderInstructions:p=he,...b}){var m,L,R,M,E,I,w;const H=(0,s.useReducer)(Fe,void 0,ie),[A,$]=H,[z,B]=(0,s.useState)(()=>({type:null,event:null})),[te,Ve]=(0,s.useState)(!1),{draggable:{active:j,nodes:Q,translate:ue},droppable:{containers:oe}}=A,nt=j?Q[j]:null,rt=(0,s.useRef)({initial:null,translated:null}),se=(0,s.useMemo)(()=>{var G;return j!=null?{id:j,data:(G=nt==null?void 0:nt.data)!=null?G:Wn,rect:rt}:null},[j,nt]),me=(0,s.useRef)(null),[Ge,ot]=(0,s.useState)(null),[Te,Ne]=(0,s.useState)(null),ht=(0,f.useLatestValue)(b,Object.values(b)),jt=(0,f.useUniqueId)("DndDescribedBy",t),an=(0,s.useMemo)(()=>oe.getEnabled(),[oe]),{droppableRects:gt,measureDroppableContainers:xt,measuringScheduled:dn}=Ft(an,{dragging:te,dependencies:[ue.x,ue.y],config:h==null?void 0:h.droppable}),Oe=Wt(Q,j),fn=Te?(0,f.getEventCoordinates)(Te):null,le=Qt(Oe,(m=h==null||(L=h.draggable)==null?void 0:L.measure)!=null?m:K),Vt=$t(Oe?Oe.parentElement:null),qe=(0,s.useRef)({active:null,activeNode:Oe,collisionRect:null,collisions:null,droppableRects:gt,draggableNodes:Q,draggingNode:null,draggingNodeRect:null,droppableContainers:oe,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),hn=oe.getNodeFor((R=qe.current.over)==null?void 0:R.id),vt=Mn({measure:h==null||(M=h.dragOverlay)==null?void 0:M.measure}),pt=(E=vt.nodeRef.current)!=null?E:Oe,Je=(I=vt.rect)!=null?I:le,Mt=(0,s.useRef)(null),Vn=Mt.current,gn=Je===le?v(le,Vn):Z,Gt=xn(pt?pt.ownerDocument.defaultView:null),Pe=Kt(j?hn??pt:null),Tt=Rn(Pe),qt=Ht(g,{transform:{x:ue.x-gn.x,y:ue.y-gn.y,scaleX:1,scaleY:1},activatorEvent:Te,active:se,activeNodeRect:le,containerNodeRect:Vt,draggingNodeRect:Je,over:qe.current.over,overlayNodeRect:vt.rect,scrollableAncestors:Pe,scrollableAncestorRects:Tt,windowRect:Gt}),vn=fn?(0,f.add)(fn,ue):null,Gn=tt(Pe),st=(0,f.add)(qt,Gn),it=Je?O(Je,qt):null,bt=se&&it?a({active:se,collisionRect:it,droppableContainers:an,pointerCoordinates:vn}):null,pn=Xe(bt,"id"),[Be,bn]=(0,s.useState)(null),qn=d(qt,(w=Be==null?void 0:Be.rect)!=null?w:null,le),yn=(0,s.useCallback)((G,{sensor:ae,options:de})=>{if(!me.current)return;const we=Q[me.current];if(!we)return;const pe=new ae({active:me.current,activeNode:we,event:G.nativeEvent,options:de,context:qe,onStart(fe){const We=me.current;if(!We)return;const yt=Q[We];if(!yt)return;const{onDragStart:Ot}=ht.current,Lt={active:{id:We,data:yt.data,rect:rt}};(0,W.unstable_batchedUpdates)(()=>{$({type:D.DragStart,initialCoordinates:fe,active:We}),B({type:D.DragStart,event:Lt})}),Ot==null||Ot(Lt)},onMove(fe){$({type:D.DragMove,coordinates:fe})},onEnd:Le(D.DragEnd),onCancel:Le(D.DragCancel)});(0,W.unstable_batchedUpdates)(()=>{ot(pe),Ne(G.nativeEvent)});function Le(fe){return async function(){const{active:yt,collisions:Ot,over:Lt,scrollAdjustedTranslate:wn}=qe.current;let ct=null;if(yt&&wn){const{cancelDrop:At}=ht.current;ct={active:yt,collisions:Ot,delta:wn,over:Lt},fe===D.DragEnd&&typeof At=="function"&&await Promise.resolve(At(ct))&&(fe=D.DragCancel)}me.current=null,(0,W.unstable_batchedUpdates)(()=>{if($({type:fe}),bn(null),Ve(!1),ot(null),Ne(null),ct&&B({type:fe,event:ct}),ct){const{onDragCancel:At,onDragEnd:Dn}=ht.current,Cn=fe===D.DragEnd?Dn:At;Cn==null||Cn(ct)}})}}},[Q]),Jn=(0,s.useCallback)((G,ae)=>(de,we)=>{const pe=de.nativeEvent;me.current!==null||pe.dndKit||pe.defaultPrevented||G(de,ae.options)===!0&&(pe.dndKit={capturedBy:ae.sensor},me.current=we,yn(de,ae))},[yn]),mn=Ae(c,Jn);St(c),(0,s.useEffect)(()=>{j!=null&&Ve(!0)},[j]),(0,s.useEffect)(()=>{se||(Mt.current=null),se&&le&&!Mt.current&&(Mt.current=le)},[le,se]),(0,s.useEffect)(()=>{const{onDragMove:G}=ht.current,{active:ae,collisions:de,over:we}=qe.current;if(!ae)return;const pe={active:ae,collisions:de,delta:{x:st.x,y:st.y},over:we};B({type:D.DragMove,event:pe}),G==null||G(pe)},[st.x,st.y]),(0,s.useEffect)(()=>{const{active:G,collisions:ae,droppableContainers:de,scrollAdjustedTranslate:we}=qe.current;if(!G||!me.current||!we)return;const{onDragOver:pe}=ht.current,Le=de.get(pn),fe=Le&&Le.rect.current?{id:Le.id,rect:Le.rect.current,data:Le.data,disabled:Le.disabled}:null,We={active:G,collisions:ae,delta:{x:we.x,y:we.y},over:fe};(0,W.unstable_batchedUpdates)(()=>{bn(fe),B({type:D.DragOver,event:We}),pe==null||pe(We)})},[pn]),(0,f.useIsomorphicLayoutEffect)(()=>{qe.current={active:se,activeNode:Oe,collisionRect:it,collisions:bt,droppableRects:gt,draggableNodes:Q,draggingNode:pt,draggingNodeRect:Je,droppableContainers:oe,over:Be,scrollableAncestors:Pe,scrollAdjustedTranslate:st},rt.current={initial:Je,translated:it}},[se,Oe,bt,it,Q,pt,Je,gt,oe,Be,Pe,st]),Bt({...er(),draggingRect:it,pointerCoordinates:vn,scrollableAncestors:Pe,scrollableAncestorRects:Tt});const Qn=(0,s.useMemo)(()=>({active:se,activeNode:Oe,activeNodeRect:le,activatorEvent:Te,collisions:bt,containerNodeRect:Vt,dragOverlay:vt,draggableNodes:Q,droppableContainers:oe,droppableRects:gt,over:Be,measureDroppableContainers:xt,scrollableAncestors:Pe,scrollableAncestorRects:Tt,measuringScheduled:dn,windowRect:Gt}),[se,Oe,le,Te,bt,Vt,vt,Q,oe,gt,Be,xt,Pe,Tt,dn,Gt]),Zn=(0,s.useMemo)(()=>({activatorEvent:Te,activators:mn,active:se,activeNodeRect:le,ariaDescribedById:{draggable:jt},dispatch:$,draggableNodes:Q,over:Be,measureDroppableContainers:xt}),[Te,mn,se,le,$,jt,Q,Be,xt]);return s.createElement(De.Provider,{value:z},s.createElement(S.Provider,{value:Zn},s.createElement(P.Provider,{value:Qn},s.createElement(Et.Provider,{value:qn},i))),s.createElement($e,{announcements:r,hiddenTextDescribedById:jt,screenReaderInstructions:p}));function er(){const G=(Ge==null?void 0:Ge.autoScrollEnabled)===!1,ae=typeof n=="object"?n.enabled===!1:n===!1,de=!G&&!ae;return typeof n=="object"?{...n,enabled:de}:{enabled:de}}}),Kn=(0,s.createContext)(null),cn="button",$n="Droppable";function Un({id:e,data:t,disabled:n=!1,attributes:r}){const i=(0,f.useUniqueId)($n),{activators:c,activatorEvent:a,active:h,activeNodeRect:g,ariaDescribedById:p,draggableNodes:b,over:m}=(0,s.useContext)(S),{role:L=cn,roleDescription:R="draggable",tabIndex:M=0}=r??{},E=(h==null?void 0:h.id)===e,I=(0,s.useContext)(E?Et:Kn),[w,H]=(0,f.useNodeRef)(),A=dt(c,e),$=(0,f.useLatestValue)(t);(0,f.useIsomorphicLayoutEffect)(()=>(b[e]={id:e,key:i,node:w,data:$},()=>{const B=b[e];B&&B.key===i&&delete b[e]}),[b,e]);const z=(0,s.useMemo)(()=>({role:L,tabIndex:M,"aria-pressed":E&&L===cn?!0:void 0,"aria-roledescription":R,"aria-describedby":p.draggable}),[L,M,E,R,p.draggable]);return{active:h,activatorEvent:a,activeNodeRect:g,attributes:z,isDragging:E,listeners:n?void 0:A,node:w,over:m,setNodeRef:H,transform:I}}function un(){return(0,s.useContext)(P)}const kn="Droppable",zn={timeout:25};function Xn({data:e,disabled:t=!1,id:n,resizeObserverConfig:r}){const i=(0,f.useUniqueId)(kn),{active:c,dispatch:a,over:h,measureDroppableContainers:g}=(0,s.useContext)(S),p=(0,s.useRef)(!1),b=(0,s.useRef)(null),m=(0,s.useRef)(null),{disabled:L,updateMeasurementsFor:R,timeout:M}={...zn,...r},E=(0,f.useLatestValue)(R??n),I=(0,s.useCallback)(()=>{if(!p.current){p.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{g(typeof E.current=="string"?[E.current]:E.current),m.current=null},M)},[M]),w=Ie({onResize:I,disabled:L||!c}),H=(0,s.useCallback)((B,te)=>{w&&(te&&(w.unobserve(te),p.current=!1),B&&w.observe(B))},[w]),[A,$]=(0,f.useNodeRef)(H),z=(0,f.useLatestValue)(e);return(0,s.useEffect)(()=>{!w||!A.current||(w.disconnect(),p.current=!1,w.observe(A.current))},[A,w]),(0,f.useIsomorphicLayoutEffect)(()=>(a({type:D.RegisterDroppable,element:{id:n,key:i,disabled:t,node:A,rect:b,data:z}}),()=>a({type:D.UnregisterDroppable,key:i,id:n})),[n]),(0,s.useEffect)(()=>{a({type:D.SetDroppableDisabled,id:n,key:i,disabled:t})},[t]),{active:c,rect:b,isOver:(h==null?void 0:h.id)===n,node:A,over:h,setNodeRef:$}}const ln={duration:250,easing:"ease",dragSourceOpacity:0};function _n({animate:e,adjustScale:t,activeId:n,draggableNodes:r,duration:i,dragSourceOpacity:c,easing:a,node:h,transform:g}){const[p,b]=(0,s.useState)(!1);return(0,f.useIsomorphicLayoutEffect)(()=>{var m;if(!e||!n||!a||!i){e&&b(!0);return}const L=(m=r[n])==null?void 0:m.node.current;if(g&&h&&L&&L.parentNode!==null){const R=Zt(h);if(R){const M=R.getBoundingClientRect(),E=K(L),I={x:M.left-E.left,y:M.top-E.top};if(Math.abs(I.x)||Math.abs(I.y)){const w={scaleX:t?E.width*g.scaleX/M.width:1,scaleY:t?E.height*g.scaleY/M.height:1},H=f.CSS.Transform.toString({x:g.x-I.x,y:g.y-I.y,...w}),A=L.style.opacity;c!=null&&(L.style.opacity=`${c}`);const $=h.animate([{transform:f.CSS.Transform.toString(g)},{transform:H}],{easing:a,duration:i});$.onfinish=()=>{h.style.display="none",b(!0),L&&c!=null&&(L.style.opacity=A)};return}}}b(!0)},[e,n,t,r,i,a,c,h,g]),(0,f.useIsomorphicLayoutEffect)(()=>{p&&b(!1)},[p]),p}const Yn={x:0,y:0,scaleX:1,scaleY:1},Hn=e=>(0,f.isKeyboardEvent)(e)?"transform 250ms ease":void 0,jn=s.memo(({adjustScale:e=!1,children:t,dropAnimation:n=ln,style:r,transition:i=Hn,modifiers:c,wrapperElement:a="div",className:h,zIndex:g=999})=>{var p,b;const{active:m,activeNodeRect:L,containerNodeRect:R,draggableNodes:M,activatorEvent:E,over:I,dragOverlay:w,scrollableAncestors:H,scrollableAncestorRects:A,windowRect:$}=un(),z=(0,s.useContext)(Et),B=Ht(c,{activatorEvent:E,active:m,activeNodeRect:L,containerNodeRect:R,draggingNodeRect:w.rect,over:I,overlayNodeRect:w.rect,scrollableAncestors:H,scrollableAncestorRects:A,transform:z,windowRect:$}),te=m!==null,Ve=e?B:{...B,scaleX:1,scaleY:1},j=(0,f.useLazyMemo)(Ne=>te?Ne||(L?{...L}:null):null,[te,L]),Q=j?{position:"fixed",width:j.width,height:j.height,top:j.top,left:j.left,zIndex:g,transform:f.CSS.Transform.toString(Ve),touchAction:"none",transformOrigin:e&&E?Qe(E,j):void 0,transition:typeof i=="function"?i(E):i,...r}:void 0,ue=te?{style:Q,children:t,className:h,transform:Ve}:void 0,oe=(0,s.useRef)(ue),nt=ue??oe.current,{children:rt,transform:se,...me}=nt??{},Ge=(0,s.useRef)((p=m==null?void 0:m.id)!=null?p:null),ot=_n({animate:!!(n&&Ge.current&&!m),adjustScale:e,activeId:Ge.current,draggableNodes:M,duration:n==null?void 0:n.duration,easing:n==null?void 0:n.easing,dragSourceOpacity:n==null?void 0:n.dragSourceOpacity,node:w.nodeRef.current,transform:(b=oe.current)==null?void 0:b.transform}),Te=!!(rt&&(t||n&&!ot));return(0,s.useEffect)(()=>{if((m==null?void 0:m.id)!==Ge.current){var Ne;Ge.current=(Ne=m==null?void 0:m.id)!=null?Ne:null}m&&oe.current!==ue&&(oe.current=ue)},[m,ue]),(0,s.useEffect)(()=>{ot&&(oe.current=void 0)},[ot]),Te?s.createElement(S.Provider,{value:T},s.createElement(Et.Provider,{value:Yn},s.createElement(a,{...me,ref:w.setRef},rt))):null})},32339:function(mt,ne,k){k.r(ne),k.d(ne,{createSnapModifier:function(){return W},restrictToFirstScrollableAncestor:function(){return X},restrictToHorizontalAxis:function(){return f},restrictToParentElement:function(){return he},restrictToVerticalAxis:function(){return D},restrictToWindowEdges:function(){return _},snapCenterToCursor:function(){return V}});var s=k(24285);function W(N){return T=>{let{transform:S}=T;return{...S,x:Math.ceil(S.x/N)*N,y:Math.ceil(S.y/N)*N}}}const f=N=>{let{transform:T}=N;return{...T,y:0}};function Y(N,T,S){const P={...N};return T.top+N.y<=S.top?P.y=S.top-T.top:T.bottom+N.y>=S.top+S.height&&(P.y=S.top+S.height-T.bottom),T.left+N.x<=S.left?P.x=S.left-T.left:T.right+N.x>=S.left+S.width&&(P.x=S.left+S.width-T.right),P}const he=N=>{let{containerNodeRect:T,draggingNodeRect:S,transform:P}=N;return!S||!T?P:Y(P,S,T)},X=N=>{let{draggingNodeRect:T,transform:S,scrollableAncestorRects:P}=N;const ie=P[0];return!T||!ie?S:Y(S,T,ie)},D=N=>{let{transform:T}=N;return{...T,x:0}},_=N=>{let{transform:T,draggingNodeRect:S,windowRect:P}=N;return!S||!P?T:Y(T,S,P)},V=N=>{let{activatorEvent:T,draggingNodeRect:S,transform:P}=N;if(S&&T){const ie=(0,s.getEventCoordinates)(T);if(!ie)return P;const Fe=ie.x-S.left,De=ie.y-S.top;return{...P,x:P.x+Fe-S.width/2,y:P.y+De-S.height/2}}return P}},45587:function(mt,ne,k){k.r(ne),k.d(ne,{SortableContext:function(){return $e},arrayMove:function(){return Y},arraySwap:function(){return he},defaultAnimateLayoutChanges:function(){return Qe},defaultNewIndexGetter:function(){return Ce},horizontalListSortingStrategy:function(){return V},rectSortingStrategy:function(){return T},rectSwappingStrategy:function(){return S},sortableKeyboardCoordinates:function(){return ut},useSortable:function(){return _e},verticalListSortingStrategy:function(){return ie}});var s=k(67294),W=k(94697),f=k(24285);function Y(o,u,l){const d=o.slice();return d.splice(l<0?d.length+l:l,0,d.splice(u,1)[0]),d}function he(o,u,l){const d=o.slice();return d[u]=o[l],d[l]=o[u],d}function X(o,u){return o.reduce((l,d,v)=>{const y=u.get(d);return y&&(l[v]=y),l},Array(o.length))}function D(o){return o!==null&&o>=0}const _={scaleX:1,scaleY:1},V=({rects:o,activeNodeRect:u,activeIndex:l,overIndex:d,index:v})=>{var y;const O=(y=o[l])!=null?y:u;if(!O)return null;const U=N(o,v,l);if(v===l){const C=o[d];return C?{x:l<d?C.left+C.width-(O.left+O.width):C.left-O.left,y:0,..._}:null}return v>l&&v<=d?{x:-O.width-U,y:0,..._}:v<l&&v>=d?{x:O.width+U,y:0,..._}:{x:0,y:0,..._}};function N(o,u,l){const d=o[u],v=o[u-1],y=o[u+1];return!d||!v&&!y?0:l<u?v?d.left-(v.left+v.width):y.left-(d.left+d.width):y?y.left-(d.left+d.width):d.left-(v.left+v.width)}const T=({rects:o,activeIndex:u,overIndex:l,index:d})=>{const v=Y(o,l,u),y=o[d],O=v[d];return!O||!y?null:{x:O.left-y.left,y:O.top-y.top,scaleX:O.width/y.width,scaleY:O.height/y.height}},S=({activeIndex:o,index:u,rects:l,overIndex:d})=>{let v,y;return u===o&&(v=l[u],y=l[d]),u===d&&(v=l[u],y=l[o]),!y||!v?null:{x:y.left-v.left,y:y.top-v.top,scaleX:y.width/v.width,scaleY:y.height/v.height}},P={scaleX:1,scaleY:1},ie=({activeIndex:o,activeNodeRect:u,index:l,rects:d,overIndex:v})=>{var y;const O=(y=d[o])!=null?y:u;if(!O)return null;if(l===o){const C=d[v];return C?{x:0,y:o<v?C.top+C.height-(O.top+O.height):C.top-O.top,...P}:null}const U=Fe(d,l,o);return l>o&&l<=v?{x:0,y:-O.height-U,...P}:l<o&&l>=v?{x:0,y:O.height+U,...P}:{x:0,y:0,...P}};function Fe(o,u,l){const d=o[u],v=o[u-1],y=o[u+1];return d?l<u?v?d.top-(v.top+v.height):y?y.top-(d.top+d.height):0:y?y.top-(d.top+d.height):v?d.top-(v.top+v.height):0:0}const De="Sortable",Ke=s.createContext({activeIndex:-1,containerId:De,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:T});function $e({children:o,id:u,items:l,strategy:d=T}){const{active:v,dragOverlay:y,droppableRects:O,over:U,measureDroppableContainers:C,measuringScheduled:x}=(0,W.useDndContext)(),K=(0,f.useUniqueId)(De,u),ge=y.rect!==null,q=(0,s.useMemo)(()=>l.map(xe=>typeof xe=="string"?xe:xe.id),[l]),Re=v!=null,re=v?q.indexOf(v.id):-1,ve=U?q.indexOf(U.id):-1,Se=(0,s.useRef)(q),ee=!Z(q,Se.current),Ee=ve!==-1&&re===-1||ee;(0,f.useIsomorphicLayoutEffect)(()=>{ee&&Re&&!x&&C(q)},[ee,q,Re,C,x]),(0,s.useEffect)(()=>{Se.current=q},[q]);const be=(0,s.useMemo)(()=>({activeIndex:re,containerId:K,disableTransforms:Ee,items:q,overIndex:ve,useDragOverlay:ge,sortedRects:X(q,O),strategy:d}),[re,K,Ee,q,ve,O,ge,d]);return s.createElement(Ke.Provider,{value:be},o)}function Z(o,u){return o.join()===u.join()}const Ce=({id:o,items:u,activeIndex:l,overIndex:d})=>Y(u,l,d).indexOf(o),Qe=({containerId:o,isSorting:u,wasDragging:l,index:d,items:v,newIndex:y,previousItems:O,previousContainerId:U,transition:C})=>!C||!l||O!==v&&d===y?!1:u?!0:y!==d&&o===U,Ue={duration:200,easing:"ease"},ke="transform",ze=f.CSS.Transition.toString({property:ke,duration:0,easing:"linear"}),Xe={roleDescription:"sortable"};function Ze({disabled:o,index:u,node:l,rect:d}){const[v,y]=(0,s.useState)(null),O=(0,s.useRef)(u);return(0,f.useIsomorphicLayoutEffect)(()=>{if(!o&&u!==O.current&&l.current){const U=d.current;if(U){const C=(0,W.getClientRect)(l.current,{ignoreTransform:!0}),x={x:U.left-C.left,y:U.top-C.top,scaleX:U.width/C.width,scaleY:U.height/C.height};(x.x||x.y)&&y(x)}}u!==O.current&&(O.current=u)},[o,u,l,d]),(0,s.useEffect)(()=>{v&&requestAnimationFrame(()=>{y(null)})},[v]),v}function _e({animateLayoutChanges:o=Qe,attributes:u,disabled:l,data:d,getNewIndex:v=Ce,id:y,strategy:O,resizeObserverConfig:U,transition:C=Ue}){const{items:x,containerId:K,activeIndex:ge,disableTransforms:q,sortedRects:Re,overIndex:re,useDragOverlay:ve,strategy:Se}=(0,s.useContext)(Ke),ee=x.indexOf(y),Ee=(0,s.useMemo)(()=>({sortable:{containerId:K,index:ee,items:x},...d}),[K,d,ee,x]),be=(0,s.useMemo)(()=>x.slice(x.indexOf(y)),[x,y]),{rect:xe,node:wt,isOver:It,setNodeRef:Dt}=(0,W.useDroppable)({id:y,data:Ee,resizeObserverConfig:{updateMeasurementsFor:be,...U}}),{active:Ye,activatorEvent:Ct,activeNodeRect:Nt,attributes:Pt,setNodeRef:Rt,listeners:lt,isDragging:ye,over:He,transform:Bt}=(0,W.useDraggable)({id:y,data:Ee,attributes:{...Xe,...u},disabled:l}),Wt=(0,f.useCombinedRefs)(Dt,Rt),Ae=!!Ye,Me=Ae&&!q&&D(ge)&&D(re),je=!ve&&ye,at=je&&Me?Bt:null,Ft=Me?at??(O??Se)({rects:Re,activeNodeRect:Nt,activeIndex:ge,overIndex:re,index:ee}):null,Ie=D(ge)&&D(re)?v({id:y,items:x,activeIndex:ge,overIndex:re}):ee,tt=Ye==null?void 0:Ye.id,J=(0,s.useRef)({activeId:tt,items:x,newIndex:Ie,containerId:K}),Kt=x!==J.current.items,St=o({active:Ye,containerId:K,isDragging:ye,isSorting:Ae,id:y,index:ee,items:x,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:C,wasDragging:J.current.activeId!=null}),dt=Ze({disabled:!St,index:ee,node:wt,rect:xe});return(0,s.useEffect)(()=>{Ae&&J.current.newIndex!==Ie&&(J.current.newIndex=Ie),K!==J.current.containerId&&(J.current.containerId=K),x!==J.current.items&&(J.current.items=x),tt!==J.current.activeId&&(J.current.activeId=tt)},[tt,Ae,Ie,K,x]),{active:Ye,activeIndex:ge,attributes:Pt,rect:xe,index:ee,newIndex:Ie,items:x,isOver:It,isSorting:Ae,isDragging:ye,listeners:lt,node:wt,overIndex:re,over:He,setNodeRef:Wt,setDroppableNodeRef:Dt,setDraggableNodeRef:Rt,transform:dt??Ft,transition:$t()};function $t(){if(dt||Kt&&J.current.newIndex===ee)return ze;if(!(je&&!(0,f.isKeyboardEvent)(Ct)||!C)&&(Ae||St))return f.CSS.Transition.toString({...C,property:ke})}}const et=[W.KeyboardCode.Down,W.KeyboardCode.Right,W.KeyboardCode.Up,W.KeyboardCode.Left],ut=(o,{context:{active:u,droppableContainers:l,collisionRect:d,scrollableAncestors:v}})=>{if(et.includes(o.code)){if(o.preventDefault(),!u||!d)return;const y=[];l.getEnabled().forEach(C=>{if(!C||C!=null&&C.disabled)return;const x=C==null?void 0:C.rect.current;if(x)switch(o.code){case W.KeyboardCode.Down:d.top+d.height<=x.top&&y.push(C);break;case W.KeyboardCode.Up:d.top>=x.top+x.height&&y.push(C);break;case W.KeyboardCode.Left:d.left>=x.left+x.width&&y.push(C);break;case W.KeyboardCode.Right:d.left+d.width<=x.left&&y.push(C);break}});const O=(0,W.closestCorners)({active:u,collisionRect:d,droppableContainers:y,pointerCoordinates:null}),U=(0,W.getFirstCollision)(O,"id");if(U!=null){const C=l.get(U),x=C==null?void 0:C.node.current,K=C==null?void 0:C.rect.current;if(x&&K){const Re=(0,W.getScrollableAncestors)(x).some((ve,Se)=>v[Se]!==ve)?{x:0,y:0}:{x:d.width-K.width,y:d.height-K.height};return{x:K.left-Re.x,y:K.top-Re.y}}}}}},24285:function(mt,ne,k){k.r(ne),k.d(ne,{CSS:function(){return _e},add:function(){return Qe},canUseDOM:function(){return f},findFirstFocusableNode:function(){return ut},getEventCoordinates:function(){return Ze},getOwnerDocument:function(){return N},getWindow:function(){return X},hasViewportRelativeCoordinates:function(){return ke},isDocument:function(){return D},isHTMLElement:function(){return _},isKeyboardEvent:function(){return ze},isNode:function(){return he},isSVGElement:function(){return V},isTouchEvent:function(){return Xe},isWindow:function(){return Y},subtract:function(){return Ue},useCombinedRefs:function(){return W},useEvent:function(){return S},useInterval:function(){return P},useIsomorphicLayoutEffect:function(){return T},useLatestValue:function(){return ie},useLazyMemo:function(){return Fe},useNodeRef:function(){return De},usePrevious:function(){return Ke},useUniqueId:function(){return Z}});var s=k(67294);function W(){for(var o=arguments.length,u=new Array(o),l=0;l<o;l++)u[l]=arguments[l];return(0,s.useMemo)(()=>d=>{u.forEach(v=>v(d))},u)}const f=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Y(o){const u=Object.prototype.toString.call(o);return u==="[object Window]"||u==="[object global]"}function he(o){return"nodeType"in o}function X(o){var u,l;return o?Y(o)?o:he(o)&&(u=(l=o.ownerDocument)==null?void 0:l.defaultView)!=null?u:window:window}function D(o){const{Document:u}=X(o);return o instanceof u}function _(o){return Y(o)?!1:o instanceof X(o).HTMLElement}function V(o){return o instanceof X(o).SVGElement}function N(o){return o?Y(o)?o.document:he(o)?D(o)?o:_(o)||V(o)?o.ownerDocument:document:document:document}const T=f?s.useLayoutEffect:s.useEffect;function S(o){const u=(0,s.useRef)(o);return T(()=>{u.current=o}),(0,s.useCallback)(function(){for(var l=arguments.length,d=new Array(l),v=0;v<l;v++)d[v]=arguments[v];return u.current==null?void 0:u.current(...d)},[])}function P(){const o=(0,s.useRef)(null),u=(0,s.useCallback)((d,v)=>{o.current=setInterval(d,v)},[]),l=(0,s.useCallback)(()=>{o.current!==null&&(clearInterval(o.current),o.current=null)},[]);return[u,l]}function ie(o,u){u===void 0&&(u=[o]);const l=(0,s.useRef)(o);return T(()=>{l.current!==o&&(l.current=o)},u),l}function Fe(o,u){const l=(0,s.useRef)();return(0,s.useMemo)(()=>{const d=o(l.current);return l.current=d,d},[...u])}function De(o){const u=S(o),l=(0,s.useRef)(null),d=(0,s.useCallback)(v=>{v!==l.current&&(u==null||u(v,l.current)),l.current=v},[]);return[l,d]}function Ke(o){const u=(0,s.useRef)();return(0,s.useEffect)(()=>{u.current=o},[o]),u.current}let $e={};function Z(o,u){return(0,s.useMemo)(()=>{if(u)return u;const l=$e[o]==null?0:$e[o]+1;return $e[o]=l,o+"-"+l},[o,u])}function Ce(o){return function(u){for(var l=arguments.length,d=new Array(l>1?l-1:0),v=1;v<l;v++)d[v-1]=arguments[v];return d.reduce((y,O)=>{const U=Object.entries(O);for(const[C,x]of U){const K=y[C];K!=null&&(y[C]=K+o*x)}return y},{...u})}}const Qe=Ce(1),Ue=Ce(-1);function ke(o){return"clientX"in o&&"clientY"in o}function ze(o){if(!o)return!1;const{KeyboardEvent:u}=X(o.target);return u&&o instanceof u}function Xe(o){if(!o)return!1;const{TouchEvent:u}=X(o.target);return u&&o instanceof u}function Ze(o){if(Xe(o)){if(o.touches&&o.touches.length){const{clientX:u,clientY:l}=o.touches[0];return{x:u,y:l}}else if(o.changedTouches&&o.changedTouches.length){const{clientX:u,clientY:l}=o.changedTouches[0];return{x:u,y:l}}}return ke(o)?{x:o.clientX,y:o.clientY}:null}const _e=Object.freeze({Translate:{toString(o){if(!o)return;const{x:u,y:l}=o;return"translate3d("+(u?Math.round(u):0)+"px, "+(l?Math.round(l):0)+"px, 0)"}},Scale:{toString(o){if(!o)return;const{scaleX:u,scaleY:l}=o;return"scaleX("+u+") scaleY("+l+")"}},Transform:{toString(o){if(o)return[_e.Translate.toString(o),_e.Scale.toString(o)].join(" ")}},Transition:{toString(o){let{property:u,duration:l,easing:d}=o;return u+" "+l+"ms "+d}}}),et="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ut(o){return o.matches(et)?o:o.querySelector(et)}}}]);
|