| 72 | `},Uet={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Het(e){let{announcements:t=Uet,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=zet}=e,{announce:a,announcement:o}=EAe(),s=kx("DndLiveRegion"),[l,u]=(0,ot.useState)(!1);if((0,ot.useEffect)(()=>{u(!0)},[]),mo((0,ot.useMemo)(()=>({onDragStart(f){let{active:d}=f;a(t.onDragStart({active:d}))},onDragMove(f){let{active:d,over:p}=f;t.onDragMove&&a(t.onDragMove({active:d,over:p}))},onDragOver(f){let{active:d,over:p}=f;a(t.onDragOver({active:d,over:p}))},onDragEnd(f){let{active:d,over:p}=f;a(t.onDragEnd({active:d,over:p}))},onDragCancel(f){let{active:d,over:p}=f;a(t.onDragCancel({active:d,over:p}))}}),[a,t])),!l)return null;let c=ot.default.createElement(ot.default.Fragment,null,ot.default.createElement(wAe,{id:n,value:i.draggable}),ot.default.createElement(SAe,{id:s,announcement:o}));return r?(0,Nx.createPortal)(c,r):c}var al;(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"})(al||(al={}));function oI(){}function jf(e,t){return(0,ot.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function E1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,ot.useMemo)(()=>[...t].filter(n=>n!=null),[...t])}var Jm=Object.freeze({x:0,y:0});function WK(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vet(e,t){let r=e3(e);if(!r)return"0 0";let n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function QK(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function Get(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function UK(e){let{left:t,top:r,height:n,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+n},{x:t+i,y:r+n}]}function YK(e,t){if(!e||e.length===0)return null;let[r]=e;return t?r[t]:r}function kAe(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}var HE=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=kAe(t,t.left,t.top),a=[];for(let o of n){let{id:s}=o,l=r.get(s);if(l){let u=WK(kAe(l),i);a.push({id:s,data:{droppableContainer:o,value:u}})}}return a.sort(QK)},LAe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=UK(t),a=[];for(let o of n){let{id:s}=o,l=r.get(s);if(l){let u=UK(l),c=i.reduce((d,p,h)=>d+WK(u[h],p),0),f=Number((c/4).toFixed(4));a.push({id:s,data:{droppableContainer:o,value:f}})}}return a.sort(QK)};function Wet(e,t){let r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-n,s=a-r;if(n<i&&r<a){let l=t.width*t.height,u=e.width*e.height,c=o*s,f=c/(l+u-c);return Number(f.toFixed(4))}return 0}var Qet=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=[];for(let a of n){let{id:o}=a,s=r.get(o);if(s){let l=Wet(s,t);l>0&&i.push({id:o,data:{droppableContainer:a,value:l}})}}return i.sort(Get)};function Yet(e,t){let{top:r,left:n,bottom:i,right:a}=t;return r<=e.y&&e.y<=i&&n<=e.x&&e.x<=a}var RAe=e=>{let{droppableContainers:t,droppableRects:r,pointerCoordinates:n}=e;if(!n)return[];let i=[];for(let a of t){let{id:o}=a,s=r.get(o);if(s&&Yet(n,s)){let u=UK(s).reduce((f,d)=>f+WK(n,d),0),c=Number((u/4).toFixed(4));i.push({id:o,data:{droppableContainer:a,value:c}})}}return i.sort(QK)};function Xet(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function qAe(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jm}function Ket(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((o,s)=>({...o,top:o.top+e*s.y,bottom:o.bottom+e*s.y,left:o.left+e*s.x,right:o.right+e*s.x}),{...r})}}var Jet=Ket(1);function $Ae(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Zet(e,t,r){let n=$Ae(t);if(!n)return e;let{scaleX:i,scaleY:a,x:o,y:s}=n,l=e.left-o-(1-i)*parseFloat(r),u=e.top-s-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:c,height:f,top:u,right:l+c,bottom:u+f,left:l}}var ett={ignoreTransform:!1};function Fx(e,t){t===void 0&&(t=ett);let r=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:u,transformOrigin:c}=rc(e).getComputedStyle(e);u&&(r=Zet(r,u,c))}let{top:n,left:i,width:a,height:o,bottom:s,right:l}=r;return{top:n,left:i,width:a,height:o,bottom:s,right:l}}function CAe(e){return Fx(e,{ignoreTransform:!0})}function ttt(e){let t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function rtt(e,t){return t===void 0&&(t=rc(e).getComputedStyle(e)),t.position==="fixed"}function ntt(e,t){t===void 0&&(t=rc(e).getComputedStyle(e));let r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{let a=t[i];return typeof a=="string"?r.test(a):!1})}function i3(e,t){let r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(iI(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!RE(i)||RK(i)||r.includes(i))return r;let a=rc(e).getComputedStyle(i);return i!==e&&ntt(i,a)&&r.push(i),rtt(i,a)?r:n(i.parentNode)}return e?n(e):r}function zAe(e){let[t]=i3(e,1);return t??null}function qK(e){return!XN||!e?null:Sx(e)?e:nI(e)?iI(e)||e===Ex(e).scrollingElement?window:RE(e)?e:null:null}function UAe(e){return Sx(e)?e.scrollX:e.scrollLeft}function HAe(e){return Sx(e)?e.scrollY:e.scrollTop}function HK(e){return{x:UAe(e),y:HAe(e)}}var Fl;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Fl||(Fl={}));function VAe(e){return!XN||!e?!1:e===document.scrollingElement}function GAe(e){let t={x:0,y:0},r=VAe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:a,isBottom:o,isRight:s,maxScroll:n,minScroll:t}}var itt={x:.2,y:.2};function att(e,t,r,n,i){let{top:a,left:o,right:s,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=itt);let{isTop:u,isBottom:c,isLeft:f,isRight:d}=GAe(e),p={x:0,y:0},h={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&a<=t.top+m.height?(p.y=Fl.Backward,h.y=n*Math.abs((t.top+m.height-a)/m.height)):!c&&l>=t.bottom-m.height&&(p.y=Fl.Forward,h.y=n*Math.abs((t.bottom-m.height-l)/m.height)),!d&&s>=t.right-m.width?(p.x=Fl.Forward,h.x=n*Math.abs((t.right-m.width-s)/m.width)):!f&&o<=t.left+m.width&&(p.x=Fl.Backward,h.x=n*Math.abs((t.left+m.width-o)/m.width)),{direction:p,speed:h}}function ott(e){if(e===document.scrollingElement){let{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}let{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function WAe(e){return e.reduce((t,r)=>Cx(t,HK(r)),Jm)}function stt(e){return e.reduce((t,r)=>t+UAe(r),0)}function ltt(e){return e.reduce((t,r)=>t+HAe(r),0)}function QAe(e,t){if(t===void 0&&(t=Fx),!e)return;let{top:r,left:n,bottom:i,right:a}=t(e);!zAe(e)||(i<=0||a<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var utt=[["x",["left","right"],stt],["y",["top","bottom"],ltt]],r3=class{constructor(t,r){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;let n=i3(r),i=WAe(n);this.rect={...t},this.width=t.width,this.height=t.height;for(let[a,o,s]of utt)for(let l of o)Object.defineProperty(this,l,{get:()=>{let u=s(n),c=i[a]-u;return this.rect[l]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Mx=class{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}};function ctt(e){let{EventTarget:t}=rc(e);return e instanceof t?e:Ex(e)}function $K(e,t){let r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Hp;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Hp||(Hp={}));function DAe(e){e.preventDefault()}function ftt(e){e.stopPropagation()}var li;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(li||(li={}));var YAe={start:[li.Space,li.Enter],cancel:[li.Esc],end:[li.Space,li.Enter,li.Tab]},dtt=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case li.Right:return{...r,x:r.x+25};case li.Left:return{...r,x:r.x-25};case li.Down:return{...r,y:r.y+25};case li.Up:return{...r,y:r.y-25}}},mg=class{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:r}}=t;this.props=t,this.listeners=new Mx(Ex(r)),this.windowListeners=new Mx(rc(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Hp.Resize,this.handleCancel),this.windowListeners.add(Hp.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Hp.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&QAe(n),r(Jm)}handleKeyDown(t){if(zE(t)){let{active:r,context:n,options:i}=this.props,{keyboardCodes:a=YAe,coordinateGetter:o=dtt,scrollBehavior:s="smooth"}=i,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}let{collisionRect:u}=n.current,c=u?{x:u.left,y:u.top}:Jm;this.referenceCoordinates||(this.referenceCoordinates=c);let f=o(t,{active:r,context:n.current,currentCoordinates:c});if(f){let d=Dx(f,c),p={x:0,y:0},{scrollableAncestors:h}=n.current;for(let m of h){let v=t.code,{isTop:A,isRight:x,isLeft:g,isBottom:w,maxScroll:b,minScroll:y}=GAe(m),S=ott(m),T={x:Math.min(v===li.Right?S.right-S.width/2:S.right,Math.max(v===li.Right?S.left:S.left+S.width/2,f.x)),y:Math.min(v===li.Down?S.bottom-S.height/2:S.bottom,Math.max(v===li.Down?S.top:S.top+S.height/2,f.y))},D=v===li.Right&&!x||v===li.Left&&!g,k=v===li.Down&&!w||v===li.Up&&!A;if(D&&T.x!==f.x){let M=m.scrollLeft+d.x,E=v===li.Right&&M<=b.x||v===li.Left&&M>=y.x;if(E&&!d.y){m.scrollTo({left:M,behavior:s});return}E?p.x=m.scrollLeft-M:p.x=v===li.Right?m.scrollLeft-b.x:m.scrollLeft-y.x,p.x&&m.scrollBy({left:-p.x,behavior:s});break}else if(k&&T.y!==f.y){let M=m.scrollTop+d.y,E=v===li.Down&&M<=b.y||v===li.Up&&M>=y.y;if(E&&!d.x){m.scrollTo({top:M,behavior:s});return}E?p.y=m.scrollTop-M:p.y=v===li.Down?m.scrollTop-b.y:m.scrollTop-y.y,p.y&&m.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,Cx(Dx(f,this.referenceCoordinates),p))}}}handleMove(t,r){let{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){let{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){let{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};mg.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=YAe,onActivation:i}=t,{active:a}=r,{code:o}=e.nativeEvent;if(n.start.includes(o)){let s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function TAe(e){return Boolean(e&&"distance"in e)}function NAe(e){return Boolean(e&&"delay"in e)}var n3=class{constructor(t,r,n){var i;n===void 0&&(n=ctt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;let{event:a}=t,{target:o}=a;this.props=t,this.events=r,this.document=Ex(o),this.documentListeners=new Mx(this.document),this.listeners=new Mx(n),this.windowListeners=new Mx(rc(o)),this.initialCoordinates=(i=e3(a))!=null?i:Jm,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(){let{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Hp.Resize,this.handleCancel),this.windowListeners.add(Hp.DragStart,DAe),this.windowListeners.add(Hp.VisibilityChange,this.handleCancel),this.windowListeners.add(Hp.ContextMenu,DAe),this.documentListeners.add(Hp.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(NAe(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(TAe(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){let{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){let{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Hp.Click,ftt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Hp.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;let{activated:n,initialCoordinates:i,props:a}=this,{onMove:o,options:{activationConstraint:s}}=a;if(!i)return;let l=(r=e3(t))!=null?r:Jm,u=Dx(i,l);if(!n&&s){if(TAe(s)){if(s.tolerance!=null&&$K(u,s.tolerance))return this.handleCancel();if($K(u,s.distance))return this.handleStart()}if(NAe(s)&&$K(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),o(l)}handleEnd(){let{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){let{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===li.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}},ptt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},UE=class extends n3{constructor(t){let{event:r}=t,n=Ex(r.target);super(t,ptt,n)}};UE.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n?.({event:r}),!0)}}];var mtt={move:{name:"mousemove"},end:{name:"mouseup"}},VK;(function(e){e[e.RightClick=2]="RightClick"})(VK||(VK={}));var x0=class extends n3{constructor(t){super(t,mtt,Ex(t.event.target))}};x0.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===VK.RightClick?!1:(n?.({event:r}),!0)}}];var zK={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},w0=class extends n3{constructor(t){super(t,zK)}static setup(){return window.addEventListener(zK.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(zK.move.name,t)};function t(){}}};w0.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t,{touches:i}=r;return i.length>1?!1:(n?.({event:r}),!0)}}];var t3;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(t3||(t3={}));var sI;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(sI||(sI={}));function htt(e){let{acceleration:t,activator:r=t3.Pointer,canScroll:n,draggingRect:i,enabled:a,interval:o=5,order:s=sI.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:f,threshold:d}=e,p=Att({delta:f,disabled:!a}),[h,m]=yAe(),v=(0,ot.useRef)({x:0,y:0}),A=(0,ot.useRef)({x:0,y:0}),x=(0,ot.useMemo)(()=>{switch(r){case t3.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case t3.DraggableRect:return i}},[r,i,l]),g=(0,ot.useRef)(null),w=(0,ot.useCallback)(()=>{let y=g.current;if(!y)return;let S=v.current.x*A.current.x,T=v.current.y*A.current.y;y.scrollBy(S,T)},[]),b=(0,ot.useMemo)(()=>s===sI.TreeOrder?[...u].reverse():u,[s,u]);(0,ot.useEffect)(()=>{if(!a||!u.length||!x){m();return}for(let y of b){if(n?.(y)===!1)continue;let S=u.indexOf(y),T=c[S];if(!T)continue;let{direction:D,speed:k}=att(y,T,x,t,d);for(let M of["x","y"])p[M][D[M]]||(k[M]=0,D[M]=0);if(k.x>0||k.y>0){m(),g.current=y,h(w,o),v.current=k,A.current=D;return}}v.current={x:0,y:0},A.current={x:0,y:0},m()},[t,w,n,m,a,o,JSON.stringify(x),JSON.stringify(p),h,u,b,c,JSON.stringify(d)])}var gtt={x:{[Fl.Backward]:!1,[Fl.Forward]:!1},y:{[Fl.Backward]:!1,[Fl.Forward]:!1}};function Att(e){let{delta:t,disabled:r}=e,n=ZN(t);return $E(i=>{if(r||!n||!i)return gtt;let a={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Fl.Backward]:i.x[Fl.Backward]||a.x===-1,[Fl.Forward]:i.x[Fl.Forward]||a.x===1},y:{[Fl.Backward]:i.y[Fl.Backward]||a.y===-1,[Fl.Forward]:i.y[Fl.Forward]||a.y===1}}},[r,t,n])}function vtt(e,t){let r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return $E(i=>{var a;return t==null?null:(a=n??i)!=null?a:null},[n,t])}function ytt(e,t){return(0,ot.useMemo)(()=>e.reduce((r,n)=>{let{sensor:i}=n,a=i.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,n)}));return[...r,...a]},[]),[e,t])}var jd;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(jd||(jd={}));var GK;(function(e){e.Optimized="optimized"})(GK||(GK={}));var MAe=new Map;function btt(e,t){let{dragging:r,dependencies:n,config:i}=t,[a,o]=(0,ot.useState)(null),{frequency:s,measure:l,strategy:u}=i,c=(0,ot.useRef)(e),f=v(),d=qE(f),p=(0,ot.useCallback)(function(A){A===void 0&&(A=[]),!d.current&&o(x=>x===null?A:x.concat(A.filter(g=>!x.includes(g))))},[d]),h=(0,ot.useRef)(null),m=$E(A=>{if(f&&!r)return MAe;if(!A||A===MAe||c.current!==e||a!=null){let x=new Map;for(let g of e){if(!g)continue;if(a&&a.length>0&&!a.includes(g.id)&&g.rect.current){x.set(g.id,g.rect.current);continue}let w=g.node.current,b=w?new r3(l(w),w):null;g.rect.current=b,b&&x.set(g.id,b)}return x}return A},[e,a,r,f,l]);return(0,ot.useEffect)(()=>{c.current=e},[e]),(0,ot.useEffect)(()=>{f||p()},[r,f]),(0,ot.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,ot.useEffect)(()=>{f||typeof s!="number"||h.current!==null||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,f,p,...n]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:a!=null};function v(){switch(u){case jd.Always:return!1;case jd.BeforeDragging:return r;default:return!r}}}function XK(e,t){return $E(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function xtt(e,t){return XK(e,t)}function wtt(e){let{callback:t,disabled:r}=e,n=KN(t),i=(0,ot.useMemo)(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:a}=window;return new a(n)},[n,r]);return(0,ot.useEffect)(()=>()=>i?.disconnect(),[i]),i}function lI(e){let{callback:t,disabled:r}=e,n=KN(t),i=(0,ot.useMemo)(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:a}=window;return new a(n)},[r]);return(0,ot.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Stt(e){return new r3(Fx(e),e)}function OAe(e,t,r){t===void 0&&(t=Stt);let[n,i]=(0,ot.useState)(null);function a(){i(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??r)!=null?u:null}let c=t(e);return JSON.stringify(l)===JSON.stringify(c)?l:c})}let o=wtt({callback(l){if(!!e)for(let u of l){let{type:c,target:f}=u;if(c==="childList"&&f instanceof HTMLElement&&f.contains(e)){a();break}}}}),s=lI({callback:a});return Fd(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),n}function Ett(e){let t=XK(e);return qAe(e,t)}var FAe=[];function ktt(e){let t=(0,ot.useRef)(e),r=$E(n=>e?n&&n!==FAe&&e&&t.current&&e.parentNode===t.current.parentNode?n:i3(e):FAe,[e]);return(0,ot.useEffect)(()=>{t.current=e},[e]),r}function Ctt(e){let[t,r]=(0,ot.useState)(null),n=(0,ot.useRef)(e),i=(0,ot.useCallback)(a=>{let o=qK(a.target);!o||r(s=>s?(s.set(o,HK(o)),new Map(s)):null)},[]);return(0,ot.useEffect)(()=>{let a=n.current;if(e!==a){o(a);let s=e.map(l=>{let u=qK(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,HK(u)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),n.current=e}return()=>{o(e),o(a)};function o(s){s.forEach(l=>{let u=qK(l);u?.removeEventListener("scroll",i)})}},[i,e]),(0,ot.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>Cx(a,o),Jm):WAe(e):Jm,[e,t])}function jAe(e,t){t===void 0&&(t=[]);let r=(0,ot.useRef)(null);return(0,ot.useEffect)(()=>{r.current=null},t),(0,ot.useEffect)(()=>{let n=e!==Jm;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?Dx(e,r.current):Jm}function Dtt(e){(0,ot.useEffect)(()=>{if(!XN)return;let t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(let r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function Ttt(e,t){return(0,ot.useMemo)(()=>e.reduce((r,n)=>{let{eventName:i,handler:a}=n;return r[i]=o=>{a(o,t)},r},{}),[e,t])}function XAe(e){return(0,ot.useMemo)(()=>e?ttt(e):null,[e])}var PAe=[];function Ntt(e,t){t===void 0&&(t=Fx);let[r]=e,n=XAe(r?rc(r):null),[i,a]=(0,ot.useState)(PAe);function o(){a(()=>e.length?e.map(l=>VAe(l)?n:new r3(t(l),l)):PAe)}let s=lI({callback:o});return Fd(()=>{s?.disconnect(),o(),e.forEach(l=>s?.observe(l))},[e]),i}function KAe(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return RE(t)?t:e}function Mtt(e){let{measure:t}=e,[r,n]=(0,ot.useState)(null),i=(0,ot.useCallback)(u=>{for(let{target:c}of u)if(RE(c)){n(f=>{let d=t(c);return f?{...f,width:d.width,height:d.height}:d});break}},[t]),a=lI({callback:i}),o=(0,ot.useCallback)(u=>{let c=KAe(u);a?.disconnect(),c&&a?.observe(c),n(c?t(c):null)},[t,a]),[s,l]=JN(o);return(0,ot.useMemo)(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}var Ott=[{sensor:UE,options:{}},{sensor:mg,options:{}}],Ftt={current:{}},aI={draggable:{measure:CAe},droppable:{measure:CAe,strategy:jd.WhileDragging,frequency:GK.Optimized},dragOverlay:{measure:Fx}},Ox=class extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}},jtt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ox,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:oI},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:aI,measureDroppableContainers:oI,windowRect:null,measuringScheduled:!1},JAe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:oI,draggableNodes:new Map,over:null,measureDroppableContainers:oI},a3=(0,ot.createContext)(JAe),ZAe=(0,ot.createContext)(jtt);function Ptt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ox}}}function _tt(e,t){switch(t.type){case al.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case al.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case al.DragEnd:case al.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case al.RegisterDroppable:{let{element:r}=t,{id:n}=r,i=new Ox(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case al.SetDroppableDisabled:{let{id:r,key:n,disabled:i}=t,a=e.droppable.containers.get(r);if(!a||n!==a.key)return e;let o=new Ox(e.droppable.containers);return o.set(r,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case al.UnregisterDroppable:{let{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;let a=new Ox(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Itt(e){let{disabled:t}=e,{active:r,activatorEvent:n,draggableNodes:i}=(0,ot.useContext)(a3),a=ZN(n),o=ZN(r?.id);return(0,ot.useEffect)(()=>{if(!t&&!n&&a&&o!=null){if(!zE(a)||document.activeElement===a.target)return;let s=i.get(o);if(!s)return;let{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(let c of[l.current,u.current]){if(!c)continue;let f=xAe(c);if(f){f.focus();break}}})}},[n,t,i,o,a]),null}function e0e(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...n}),r):r}function Btt(e){return(0,ot.useMemo)(()=>({draggable:{...aI.draggable,...e?.draggable},droppable:{...aI.droppable,...e?.droppable},dragOverlay:{...aI.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Ltt(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e,a=(0,ot.useRef)(!1),{x:o,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Fd(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!n)return;let u=t?.node.current;if(!u||u.isConnected===!1)return;let c=r(u),f=qAe(c,n);if(o||(f.x=0),s||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){let d=zAe(u);d&&d.scrollBy({top:f.y,left:f.x})}},[t,o,s,n,r])}var uI=(0,ot.createContext)({...Jm,scaleX:1,scaleY:1}),S1;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(S1||(S1={}));var k1=(0,ot.memo)(function(t){var r,n,i,a;let{id:o,accessibility:s,autoScroll:l=!0,children:u,sensors:c=Ott,collisionDetection:f=Qet,measuring:d,modifiers:p,...h}=t,m=(0,ot.useReducer)(_tt,void 0,Ptt),[v,A]=m,[x,g]=$et(),[w,b]=(0,ot.useState)(S1.Uninitialized),y=w===S1.Initialized,{draggable:{active:S,nodes:T,translate:D},droppable:{containers:k}}=v,M=S!=null?T.get(S):null,E=(0,ot.useRef)({initial:null,translated:null}),O=(0,ot.useMemo)(()=>{var gt;return S!=null?{id:S,data:(gt=M?.data)!=null?gt:Ftt,rect:E}:null},[S,M]),P=(0,ot.useRef)(null),[_,B]=(0,ot.useState)(null),[F,L]=(0,ot.useState)(null),I=qE(h,Object.values(h)),R=kx("DndDescribedBy",o),J=(0,ot.useMemo)(()=>k.getEnabled(),[k]),Q=Btt(d),{droppableRects:q,measureDroppableContainers:ie,measuringScheduled:Ae}=btt(J,{dragging:y,dependencies:[D.x,D.y],config:Q.droppable}),le=vtt(T,S),pe=(0,ot.useMemo)(()=>F?e3(F):null,[F]),ae=ft(),oe=xtt(le,Q.draggable.measure);Ltt({activeNode:S!=null?T.get(S):null,config:ae.layoutShiftCompensation,initialRect:oe,measure:Q.draggable.measure});let ue=OAe(le,Q.draggable.measure,oe),Se=OAe(le?le.parentElement:null),H=(0,ot.useRef)({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ye=k.getNodeFor((r=H.current.over)==null?void 0:r.id),ne=Mtt({measure:Q.dragOverlay.measure}),z=(n=ne.nodeRef.current)!=null?n:le,U=y?(i=ne.rect)!=null?i:ue:null,V=Boolean(ne.nodeRef.current&&ne.rect),Y=Ett(V?null:ue),Z=XAe(z?rc(z):null),re=ktt(y?ye??le:null),he=Ntt(re),fe=e0e(p,{transform:{x:D.x-Y.x,y:D.y-Y.y,scaleX:1,scaleY:1},activatorEvent:F,active:O,activeNodeRect:ue,containerNodeRect:Se,draggingNodeRect:U,over:H.current.over,overlayNodeRect:ne.rect,scrollableAncestors:re,scrollableAncestorRects:he,windowRect:Z}),ke=pe?Cx(pe,D):null,se=Ctt(re),Le=jAe(se),Ne=jAe(se,[ue]),Ge=Cx(fe,Le),Ye=U?Jet(U,fe):null,ve=O&&Ye?f({active:O,collisionRect:Ye,droppableRects:q,droppableContainers:J,pointerCoordinates:ke}):null,Oe=YK(ve,"id"),[Te,Ie]=(0,ot.useState)(null),$e=V?fe:Cx(fe,Ne),Ue=Xet($e,(a=Te?.rect)!=null?a:null,ue),Qe=(0,ot.useRef)(null),We=(0,ot.useCallback)((gt,rr)=>{let{sensor:Nr,options:Rr}=rr;if(P.current==null)return;let cr=T.get(P.current);if(!cr)return;let br=gt.nativeEvent,Br=new Nr({active:P.current,activeNode:cr,event:br,options:Rr,context:H,onAbort(nn){if(!T.get(nn))return;let{onDragAbort:Qs}=I.current,Pc={id:nn};Qs?.(Pc),x({type:"onDragAbort",event:Pc})},onPending(nn,Eo,Qs,Pc){if(!T.get(nn))return;let{onDragPending:Tm}=I.current,Ru={id:nn,constraint:Eo,initialCoordinates:Qs,offset:Pc};Tm?.(Ru),x({type:"onDragPending",event:Ru})},onStart(nn){let Eo=P.current;if(Eo==null)return;let Qs=T.get(Eo);if(!Qs)return;let{onDragStart:Pc}=I.current,hp={activatorEvent:br,active:{id:Eo,data:Qs.data,rect:E}};(0,Nx.unstable_batchedUpdates)(()=>{Pc?.(hp),b(S1.Initializing),A({type:al.DragStart,initialCoordinates:nn,active:Eo}),x({type:"onDragStart",event:hp}),B(Qe.current),L(br)})},onMove(nn){A({type:al.DragMove,coordinates:nn})},onEnd:vn(al.DragEnd),onCancel:vn(al.DragCancel)});Qe.current=Br;function vn(nn){return async function(){let{active:Qs,collisions:Pc,over:hp,scrollAdjustedTranslate:Tm}=H.current,Ru=null;if(Qs&&Tm){let{cancelDrop:gp}=I.current;Ru={activatorEvent:br,active:Qs,collisions:Pc,delta:Tm,over:hp},nn===al.DragEnd&&typeof gp=="function"&&await Promise.resolve(gp(Ru))&&(nn=al.DragCancel)}P.current=null,(0,Nx.unstable_batchedUpdates)(()=>{A({type:nn}),b(S1.Uninitialized),Ie(null),B(null),L(null),Qe.current=null;let gp=nn===al.DragEnd?"onDragEnd":"onDragCancel";if(Ru){let Ap=I.current[gp];Ap?.(Ru),x({type:gp,event:Ru})}})}}},[T]),K=(0,ot.useCallback)((gt,rr)=>(Nr,Rr)=>{let cr=Nr.nativeEvent,br=T.get(Rr);if(P.current!==null||!br||cr.dndKit||cr.defaultPrevented)return;let Br={active:br};gt(Nr,rr.options,Br)===!0&&(cr.dndKit={capturedBy:rr.sensor},P.current=Rr,We(Nr,rr))},[T,We]),me=ytt(c,K);Dtt(c),Fd(()=>{ue&&w===S1.Initializing&&b(S1.Initialized)},[ue,w]),(0,ot.useEffect)(()=>{let{onDragMove:gt}=I.current,{active:rr,activatorEvent:Nr,collisions:Rr,over:cr}=H.current;if(!rr||!Nr)return;let br={active:rr,activatorEvent:Nr,collisions:Rr,delta:{x:Ge.x,y:Ge.y},over:cr};(0,Nx.unstable_batchedUpdates)(()=>{gt?.(br),x({type:"onDragMove",event:br})})},[Ge.x,Ge.y]),(0,ot.useEffect)(()=>{let{active:gt,activatorEvent:rr,collisions:Nr,droppableContainers:Rr,scrollAdjustedTranslate:cr}=H.current;if(!gt||P.current==null||!rr||!cr)return;let{onDragOver:br}=I.current,Br=Rr.get(Oe),vn=Br&&Br.rect.current?{id:Br.id,rect:Br.rect.current,data:Br.data,disabled:Br.disabled}:null,nn={active:gt,activatorEvent:rr,collisions:Nr,delta:{x:cr.x,y:cr.y},over:vn};(0,Nx.unstable_batchedUpdates)(()=>{Ie(vn),br?.(nn),x({type:"onDragOver",event:nn})})},[Oe]),Fd(()=>{H.current={activatorEvent:F,active:O,activeNode:le,collisionRect:Ye,collisions:ve,droppableRects:q,draggableNodes:T,draggingNode:z,draggingNodeRect:U,droppableContainers:k,over:Te,scrollableAncestors:re,scrollAdjustedTranslate:Ge},E.current={initial:U,translated:Ye}},[O,le,ve,Ye,T,z,U,q,k,Te,re,Ge]),htt({...ae,delta:D,draggingRect:Ye,pointerCoordinates:ke,scrollableAncestors:re,scrollableAncestorRects:he});let Fe=(0,ot.useMemo)(()=>({active:O,activeNode:le,activeNodeRect:ue,activatorEvent:F,collisions:ve,containerNodeRect:Se,dragOverlay:ne,draggableNodes:T,droppableContainers:k,droppableRects:q,over:Te,measureDroppableContainers:ie,scrollableAncestors:re,scrollableAncestorRects:he,measuringConfiguration:Q,measuringScheduled:Ae,windowRect:Z}),[O,le,ue,F,ve,Se,ne,T,k,q,Te,ie,re,he,Q,Ae,Z]),Ce=(0,ot.useMemo)(()=>({activatorEvent:F,activators:me,active:O,activeNodeRect:ue,ariaDescribedById:{draggable:R},dispatch:A,draggableNodes:T,over:Te,measureDroppableContainers:ie}),[F,me,O,ue,A,R,T,Te,ie]);return ot.default.createElement(BAe.Provider,{value:g},ot.default.createElement(a3.Provider,{value:Ce},ot.default.createElement(ZAe.Provider,{value:Fe},ot.default.createElement(uI.Provider,{value:Ue},u)),ot.default.createElement(Itt,{disabled:s?.restoreFocus===!1})),ot.default.createElement(Het,{...s,hiddenTextDescribedById:R}));function ft(){let gt=_?.autoScrollEnabled===!1,rr=typeof l=="object"?l.enabled===!1:l===!1,Nr=y&&!gt&&!rr;return typeof l=="object"?{...l,enabled:Nr}:{enabled:Nr}}}),Rtt=(0,ot.createContext)(null),_Ae="button",qtt="Draggable";function jl(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e,a=kx(qtt),{activators:o,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:f,over:d}=(0,ot.useContext)(a3),{role:p=_Ae,roleDescription:h="draggable",tabIndex:m=0}=i??{},v=l?.id===t,A=(0,ot.useContext)(v?uI:Rtt),[x,g]=JN(),[w,b]=JN(),y=Ttt(o,t),S=qE(r);Fd(()=>(f.set(t,{id:t,key:a,node:x,activatorNode:w,data:S}),()=>{let D=f.get(t);D&&D.key===a&&f.delete(t)}),[f,t]);let T=(0,ot.useMemo)(()=>({role:p,tabIndex:m,"aria-disabled":n,"aria-pressed":v&&p===_Ae?!0:void 0,"aria-roledescription":h,"aria-describedby":c.draggable}),[n,p,m,v,h,c.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:T,isDragging:v,listeners:n?void 0:y,node:x,over:d,setNodeRef:g,setActivatorNodeRef:b,transform:A}}function KK(){return(0,ot.useContext)(ZAe)}var $tt="Droppable",ztt={timeout:25};function Qc(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e,a=kx($tt),{active:o,dispatch:s,over:l,measureDroppableContainers:u}=(0,ot.useContext)(a3),c=(0,ot.useRef)({disabled:r}),f=(0,ot.useRef)(!1),d=(0,ot.useRef)(null),p=(0,ot.useRef)(null),{disabled:h,updateMeasurementsFor:m,timeout:v}={...ztt,...i},A=qE(m??n),x=(0,ot.useCallback)(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(A.current)?A.current:[A.current]),p.current=null},v)},[v]),g=lI({callback:x,disabled:h||!o}),w=(0,ot.useCallback)((T,D)=>{!g||(D&&(g.unobserve(D),f.current=!1),T&&g.observe(T))},[g]),[b,y]=JN(w),S=qE(t);return(0,ot.useEffect)(()=>{!g||!b.current||(g.disconnect(),f.current=!1,g.observe(b.current))},[b,g]),(0,ot.useEffect)(()=>(s({type:al.RegisterDroppable,element:{id:n,key:a,disabled:r,node:b,rect:d,data:S}}),()=>s({type:al.UnregisterDroppable,key:a,id:n})),[n]),(0,ot.useEffect)(()=>{r!==c.current.disabled&&(s({type:al.SetDroppableDisabled,id:n,key:a,disabled:r}),c.current.disabled=r)},[n,a,r,s]),{active:o,rect:d,isOver:l?.id===n,node:b,over:l,setNodeRef:y}}function Utt(e){let{animation:t,children:r}=e,[n,i]=(0,ot.useState)(null),[a,o]=(0,ot.useState)(null),s=ZN(r);return!r&&!n&&s&&i(s),Fd(()=>{if(!a)return;let l=n?.key,u=n?.props.id;if(l==null||u==null){i(null);return}Promise.resolve(t(u,a)).then(()=>{i(null)})},[t,n,a]),ot.default.createElement(ot.default.Fragment,null,r,n?(0,ot.cloneElement)(n,{ref:o}):null)}var Htt={x:0,y:0,scaleX:1,scaleY:1};function Vtt(e){let{children:t}=e;return ot.default.createElement(a3.Provider,{value:JAe},ot.default.createElement(uI.Provider,{value:Htt},t))}var Gtt={position:"fixed",touchAction:"none"},Wtt=e=>zE(e)?"transform 250ms ease":void 0,Qtt=(0,ot.forwardRef)((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:a,className:o,rect:s,style:l,transform:u,transition:c=Wtt}=e;if(!s)return null;let f=i?u:{...u,scaleX:1,scaleY:1},d={...Gtt,width:s.width,height:s.height,top:s.top,left:s.left,transform:fu.Transform.toString(f),transformOrigin:i&&n?Vet(n,s):void 0,transition:typeof c=="function"?c(n):c,...l};return ot.default.createElement(r,{className:o,style:d,ref:t},a)}),Ytt=e=>t=>{let{active:r,dragOverlay:n}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[s,l]of Object.entries(a.active))l!==void 0&&(i[s]=r.node.style.getPropertyValue(s),r.node.style.setProperty(s,l));if(a!=null&&a.dragOverlay)for(let[s,l]of Object.entries(a.dragOverlay))l!==void 0&&n.node.style.setProperty(s,l);return o!=null&&o.active&&r.node.classList.add(o.active),o!=null&&o.dragOverlay&&n.node.classList.add(o.dragOverlay),function(){for(let[l,u]of Object.entries(i))r.node.style.setProperty(l,u);o!=null&&o.active&&r.node.classList.remove(o.active)}},Xtt=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:fu.Transform.toString(t)},{transform:fu.Transform.toString(r)}]},JK={duration:250,easing:"ease",keyframes:Xtt,sideEffects:Ytt({styles:{active:{opacity:"0"}}})};function Ktt(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return KN((a,o)=>{if(t===null)return;let s=r.get(a);if(!s)return;let l=s.node.current;if(!l)return;let u=KAe(o);if(!u)return;let{transform:c}=rc(o).getComputedStyle(o),f=$Ae(c);if(!f)return;let d=typeof t=="function"?t:Jtt(t);return QAe(l,i.draggable.measure),d({active:{id:a,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:o,rect:i.dragOverlay.measure(u)},droppableContainers:n,measuringConfiguration:i,transform:f})})}function Jtt(e){let{duration:t,easing:r,sideEffects:n,keyframes:i}={...JK,...e};return a=>{let{active:o,dragOverlay:s,transform:l,...u}=a;if(!t)return;let c={x:s.rect.left-o.rect.left,y:s.rect.top-o.rect.top},f={scaleX:l.scaleX!==1?o.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?o.rect.height*l.scaleY/s.rect.height:1},d={x:l.x-c.x,y:l.y-c.y,...f},p=i({...u,active:o,dragOverlay:s,transform:{initial:l,final:d}}),[h]=p,m=p[p.length-1];if(JSON.stringify(h)===JSON.stringify(m))return;let v=n?.({active:o,dragOverlay:s,...u}),A=s.node.animate(p,{duration:t,easing:r,fill:"forwards"});return new Promise(x=>{A.onfinish=()=>{v?.(),x()}})}}var IAe=0;function Ztt(e){return(0,ot.useMemo)(()=>{if(e!=null)return IAe++,IAe},[e])}var hg=ot.default.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:i,transition:a,modifiers:o,wrapperElement:s="div",className:l,zIndex:u=999}=e,{activatorEvent:c,active:f,activeNodeRect:d,containerNodeRect:p,draggableNodes:h,droppableContainers:m,dragOverlay:v,over:A,measuringConfiguration:x,scrollableAncestors:g,scrollableAncestorRects:w,windowRect:b}=KK(),y=(0,ot.useContext)(uI),S=Ztt(f?.id),T=e0e(o,{activatorEvent:c,active:f,activeNodeRect:d,containerNodeRect:p,draggingNodeRect:v.rect,over:A,overlayNodeRect:v.rect,scrollableAncestors:g,scrollableAncestorRects:w,transform:y,windowRect:b}),D=XK(d),k=Ktt({config:n,draggableNodes:h,droppableContainers:m,measuringConfiguration:x}),M=D?v.setRef:void 0;return ot.default.createElement(Vtt,null,ot.default.createElement(Utt,{animation:k},f&&S?ot.default.createElement(Qtt,{key:S,id:f.id,ref:M,as:s,activatorEvent:c,adjustScale:t,className:l,transition:a,rect:D,style:{zIndex:u,...i},transform:T},r):null))});function js(e,t,r){let n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function ert(e,t){return e.reduce((r,n,i)=>{let a=t.get(n);return a&&(r[i]=a),r},Array(e.length))}function cI(e){return e!==null&&e>=0}function trt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function rrt(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}var o3=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e,a=js(t,n,r),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}};var fI={scaleX:1,scaleY:1},t0e=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:i,rects:a,overIndex:o}=e,s=(t=a[r])!=null?t:n;if(!s)return null;if(i===r){let u=a[o];return u?{x:0,y:r<o?u.top+u.height-(s.top+s.height):u.top-s.top,...fI}:null}let l=nrt(a,i,r);return i>r&&i<=o?{x:0,y:-s.height-l,...fI}:i<r&&i>=o?{x:0,y:s.height+l,...fI}:{x:0,y:0,...fI}};function nrt(e,t,r){let n=e[t],i=e[t-1],a=e[t+1];return n?r<t?i?n.top-(i.top+i.height):a?a.top-(n.top+n.height):0:a?a.top-(n.top+n.height):i?n.top-(i.top+i.height):0:0}var r0e="Sortable",n0e=ms.default.createContext({activeIndex:-1,containerId:r0e,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:o3,disabled:{draggable:!1,droppable:!1}});function s3(e){let{children:t,id:r,items:n,strategy:i=o3,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:l,over:u,measureDroppableContainers:c}=KK(),f=kx(r0e,r),d=Boolean(s.rect!==null),p=(0,ms.useMemo)(()=>n.map(y=>typeof y=="object"&&"id"in y?y.id:y),[n]),h=o!=null,m=o?p.indexOf(o.id):-1,v=u?p.indexOf(u.id):-1,A=(0,ms.useRef)(p),x=!trt(p,A.current),g=v!==-1&&m===-1||x,w=rrt(a);Fd(()=>{x&&h&&c(p)},[x,p,h,c]),(0,ms.useEffect)(()=>{A.current=p},[p]);let b=(0,ms.useMemo)(()=>({activeIndex:m,containerId:f,disabled:w,disableTransforms:g,items:p,overIndex:v,useDragOverlay:d,sortedRects:ert(p,l),strategy:i}),[m,f,w.draggable,w.droppable,g,p,v,l,d,i]);return ms.default.createElement(n0e.Provider,{value:b},t)}var irt=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return js(r,n,i).indexOf(t)},ZK=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:l,transition:u}=e;return!u||!n||s!==a&&i===o?!1:r?!0:o!==i&&t===l},art={duration:200,easing:"ease"},i0e="transform",ort=fu.Transition.toString({property:i0e,duration:0,easing:"linear"}),srt={roleDescription:"sortable"};function lrt(e){let{disabled:t,index:r,node:n,rect:i}=e,[a,o]=(0,ms.useState)(null),s=(0,ms.useRef)(r);return Fd(()=>{if(!t&&r!==s.current&&n.current){let l=i.current;if(l){let u=Fx(n.current,{ignoreTransform:!0}),c={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(c.x||c.y)&&o(c)}}r!==s.current&&(s.current=r)},[t,r,n,i]),(0,ms.useEffect)(()=>{a&&o(null)},[a]),a}function pI(e){let{animateLayoutChanges:t=ZK,attributes:r,disabled:n,data:i,getNewIndex:a=irt,id:o,strategy:s,resizeObserverConfig:l,transition:u=art}=e,{items:c,containerId:f,activeIndex:d,disabled:p,disableTransforms:h,sortedRects:m,overIndex:v,useDragOverlay:A,strategy:x}=(0,ms.useContext)(n0e),g=urt(n,p),w=c.indexOf(o),b=(0,ms.useMemo)(()=>({sortable:{containerId:f,index:w,items:c},...i}),[f,i,w,c]),y=(0,ms.useMemo)(()=>c.slice(c.indexOf(o)),[c,o]),{rect:S,node:T,isOver:D,setNodeRef:k}=Qc({id:o,data:b,disabled:g.droppable,resizeObserverConfig:{updateMeasurementsFor:y,...l}}),{active:M,activatorEvent:E,activeNodeRect:O,attributes:P,setNodeRef:_,listeners:B,isDragging:F,over:L,setActivatorNodeRef:I,transform:R}=jl({id:o,data:b,attributes:{...srt,...r},disabled:g.draggable}),J=vAe(k,_),Q=Boolean(M),q=Q&&!h&&cI(d)&&cI(v),ie=!A&&F,Ae=ie&&q?R:null,pe=q?Ae??(s??x)({rects:m,activeNodeRect:O,activeIndex:d,overIndex:v,index:w}):null,ae=cI(d)&&cI(v)?a({id:o,items:c,activeIndex:d,overIndex:v}):w,oe=M?.id,ue=(0,ms.useRef)({activeId:oe,items:c,newIndex:ae,containerId:f}),Se=c!==ue.current.items,H=t({active:M,containerId:f,isDragging:F,isSorting:Q,id:o,index:w,items:c,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:u,wasDragging:ue.current.activeId!=null}),ye=lrt({disabled:!H,index:w,node:T,rect:S});return(0,ms.useEffect)(()=>{Q&&ue.current.newIndex!==ae&&(ue.current.newIndex=ae),f!==ue.current.containerId&&(ue.current.containerId=f),c!==ue.current.items&&(ue.current.items=c)},[Q,ae,f,c]),(0,ms.useEffect)(()=>{if(oe===ue.current.activeId)return;if(oe&&!ue.current.activeId){ue.current.activeId=oe;return}let z=setTimeout(()=>{ue.current.activeId=oe},50);return()=>clearTimeout(z)},[oe]),{active:M,activeIndex:d,attributes:P,data:b,rect:S,index:w,newIndex:ae,items:c,isOver:D,isSorting:Q,isDragging:F,listeners:B,node:T,overIndex:v,over:L,setNodeRef:J,setActivatorNodeRef:I,setDroppableNodeRef:k,setDraggableNodeRef:_,transform:ye??pe,transition:ne()};function ne(){if(ye||Se&&ue.current.newIndex===w)return ort;if(!(ie&&!zE(E)||!u)&&(Q||H))return fu.Transition.toString({...u,property:i0e})}}function urt(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:t.draggable,droppable:(n=e?.droppable)!=null?n:t.droppable}}function dI(e){if(!e)return!1;let t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var crt=[li.Down,li.Right,li.Up,li.Left],VE=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(crt.includes(e.code)){if(e.preventDefault(),!r||!n)return;let l=[];a.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;let d=i.get(f.id);if(!!d)switch(e.code){case li.Down:n.top<d.top&&l.push(f);break;case li.Up:n.top>d.top&&l.push(f);break;case li.Left:n.left>d.left&&l.push(f);break;case li.Right:n.left<d.left&&l.push(f);break}});let u=LAe({active:r,collisionRect:n,droppableRects:i,droppableContainers:l,pointerCoordinates:null}),c=YK(u,"id");if(c===o?.id&&u.length>1&&(c=u[1].id),c!=null){let f=a.get(r.id),d=a.get(c),p=d?i.get(d.id):null,h=d?.node.current;if(h&&p&&f&&d){let v=i3(h).some((y,S)=>s[S]!==y),A=a0e(f,d),x=frt(f,d),g=v||!A?{x:0,y:0}:{x:x?n.width-p.width:0,y:x?n.height-p.height:0},w={x:p.left,y:p.top};return g.x&&g.y?w:Dx(w,g)}}}};function a0e(e,t){return!dI(e)||!dI(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function frt(e,t){return!dI(e)||!dI(t)||!a0e(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var mI=async(e,t)=>{let r=e.spaceManager.uriByString(t);if(!r)return null;let n=r.basePath,i=e.spacesIndex.get(r.basePath);if(!i)return null;let a,o,s,l;if(r.refType=="frame"){s=r.ref;let u=await e.spaceManager.readAllFrames(n).then(c=>Object.values(c).map(f=>f.schema));s&&u&&(l=u.find(c=>c.id==s)?.name,a=or(u.find(c=>c.id==s)?.def)?.db,o=e.contextsIndex.get(n)?.schemas.find(c=>c.id==a)?.name)}else r.refType=="context"&&(a=r.ref,o=e.contextsIndex.get(n)?.schemas.find(u=>u.id==a)?.name);return{space:n,spaceName:i.name,schema:a,schemaName:o,view:s,viewName:l}},hI=async(e,t,r,n)=>{let i=await e.readTable(t.path,r);i&&await n(i,t)},S0=async(e,t,r)=>{let n=await e.contextForSpace(t.path);n&&await r(n,t)},_f=async(e,t,r,n,i=!0)=>{await e.saveTable(t.path,r,n).then(a=>a&&e.superstate.reloadContextByPath(t.path,{force:!0,calculate:i}))};var eJ=(e,t,r,n,i)=>({...e,rows:e.rows.map(a=>a[t]==r?{...a,[n]:Ui(Rt(a[n]).filter(o=>o!=i))}:a)}),drt=(e,t,r,n,i)=>({...e,rows:e.rows.map(a=>a[t]==r?{...a,[n]:i}:a)});var prt=(e,t,r)=>({...e,rows:r?NS(e.rows,r,t):[...e.rows,...t]}),mrt=(e,t,r)=>({...e,rows:e.rows.map((n,i)=>i==r?t:n)}),o0e=async(e,t,r,n,i,a,o)=>{hI(e,t,r,async s=>{let l={...s,rows:s.rows.map((u,c)=>c==n?{...u,[i]:a}:u)};return o&&(l={...l,rows:js(l.rows,n,o)}),Pf.default.isEqual(s,l)||(e.superstate.settings.enhancedLogs,await _f(e,t,l)),l})},jx=async(e,t,r,n,i,a,o,s,l)=>e.contextForSpace(t.path).then(u=>{let f=(a??drt)(u,ut,r,n,i);return o&&(f=yY(f,[r],o)),e.superstate.settings.enhancedLogs,_f(e,t,f,s,l)});var hrt=async(e,t,r)=>{let n=t;e.spacesIndex.has(n)&&(n=Zm(e,e.spacesIndex.get(n).space));let i=await e.spaceManager.readProperties(n);return i?Object.keys(i).reduce((a,o)=>r.some(s=>s.name==o)?{...a,[o]:fa(o,i[o],r.find(s=>s.name==o).type)}:a,{}):{}},s0e=(e,t)=>t=="$space"?jpe:t=="$context"?Tp.rows:e.contextsIndex.get(t)?.contextTable?.cols??[],tJ=async(e,t,r)=>{let n=async a=>{let o=a.rows.some(l=>l[ut]===t),s=await hrt(e,t,a.cols.filter(l=>l.name!=ut&&l.type!="fileprop"&&l.type!="flex"));return o?a.rows.map(l=>l[ut]==t?{...l,...s}:l):[...a.rows,{[ut]:t,...s}]},i=r.map(a=>S0(e.spaceManager,a,async(o,s)=>{let l=await n(o),u={...o,rows:l};return Pf.default.isEqual(o,u)||(e.settings.enhancedLogs,await _f(e.spaceManager,s,u,!0)),u}));await Promise.all(i)},l0e=async(e,t,r,n,i)=>hI(e,t,r,async(a,o)=>{let s=mrt(a,i,n);return Pf.default.isEqual(a,s)||(e.superstate.settings.enhancedLogs,await _f(e,o,s)),s}),u0e=async(e,t,r,n,i)=>{let a=o=>({...o,rows:o.rows.map(s=>s[ut]==t?{...s,[r]:n}:s)});return S0(e,i,async(o,s)=>{let l=a(o);return Pf.default.isEqual(o,l)||(e.superstate.settings.enhancedLogs,await _f(e,s,l)),l})},c0e=async(e,t,r,n)=>{let i=o=>{let s=o.cols.map(l=>l.type.startsWith("context")&&l.value==t?{...l,value:r}:l);return{...o,cols:s}},a=n.map(o=>S0(e,o,async(s,l)=>{let u=i(s);return Pf.default.isEqual(s,u)||(e.superstate.settings.enhancedLogs,await _f(e,l,u)),u}));return Promise.all(a)},f0e=async(e,t,r)=>{let n=a=>{let o=a.cols.map(s=>s.type.startsWith("context")&&s.value==t?{...s,type:"link-multi"}:s);return{...a,cols:o}},i=r.map(a=>S0(e,a,async(o,s)=>{let l=n(o);return Pf.default.isEqual(o,l)||(e.superstate.settings.enhancedLogs,await _f(e,s,l)),l}));return Promise.all(i)},d0e=async(e,t,r,n,i)=>hI(e,r,n,async(a,o)=>{let s=prt(a,[t],i);return Pf.default.isEqual(a,s)||(e.superstate.settings.enhancedLogs,await _f(e,o,s)),s}),p0e=async(e,t,r,n)=>hI(e,t,r,async(i,a)=>{let o={...i,rows:i.rows.filter((s,l)=>l!=n)};return Pf.default.isEqual(i,o)||(e.superstate.settings.enhancedLogs,await _f(e,a,o)),o});var m0e=async(e,t,r,n)=>{let i=n.map(a=>S0(e,a,async(o,s)=>{let l=vY(o.cols),u={...o,rows:o.rows.map(c=>Bpe(e,c,t,r,l))};return Pf.default.isEqual(o,u)||(e.superstate.settings.enhancedLogs,await _f(e,s,u)),u}));return Promise.all(i)},h0e=async(e,t,r)=>{let n=r.map(i=>S0(e,i,async(a,o)=>{let s=vY(a.cols),l={...a,rows:a.rows.map(u=>Ipe(e,u,t,s))};return Pf.default.isEqual(a,l)||(e.superstate.settings.enhancedLogs,await _f(e,o,l)),l}));return Promise.all(n)},g0e=async(e,t,r,n)=>{let i=n.map(a=>S0(e,a,async(o,s)=>{let l=Lpe(o,t,r);return Pf.default.isEqual(o,l)||await _f(e,s,l),l}));return Promise.all(i)},rJ=async(e,t,r)=>{let n=r.map(i=>S0(e,i,async(a,o)=>{let s=Rpe(a,t);return Pf.default.isEqual(a,s)||(e.superstate.settings.enhancedLogs,await _f(e,o,s)),s}));return Promise.all(n)},A0e=async(e,t,r,n)=>S0(e,n,async(i,a)=>{let o=yY(i,t,r);return Pf.default.isEqual(i,o)||(e.superstate.settings.enhancedLogs,await _f(e,a,o,!0)),o});function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mi.apply(null,arguments)}var Px={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function hr(e){return typeof e=="number"}function er(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function ol(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function Pd(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function hs(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Ya(e){return typeof e=="string"}var mn=Array.isArray;function jt(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function ho(e){return Array.isArray(e)||jt(e)}function E0(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function _d(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function C1(e){return e&&e.constructor.prototype.isRange===!0||!1}function gg(e){return e&&e.constructor.prototype.isIndex===!0||!1}function gI(e){return typeof e=="boolean"}function AI(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function GE(e){return e&&e.constructor.prototype.isHelp===!0||!1}function vI(e){return typeof e=="function"}function yI(e){return e instanceof Date}function bI(e){return e instanceof RegExp}function Ag(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!ol(e)&&!Pd(e))}function xI(e){return e===null}function wI(e){return e===void 0}function Yc(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function sl(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function SI(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function EI(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function kI(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Hr(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function l3(e){return Hr(e)||ta(e)&&e.args.length===1&&Hr(e.args[0])&&"-+~".includes(e.op)}function Vp(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function du(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function If(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function an(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function vg(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function ta(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function ll(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function CI(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function DI(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Oi(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function WE(e){return e&&e.constructor.prototype.isChain===!0||!1}function yn(e){var t=typeof e;return t==="object"?e===null?"null":er(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function nr(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(r){return nr(r)});if(e instanceof Date)return new Date(e.valueOf());if(er(e))return e;if(Ag(e))return QE(e,nr);throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function QE(e,t){var r={};for(var n in e)Pt(e,n)&&(r[n]=t(e[n]));return r}function TI(e,t){for(var r in t)Pt(t,r)&&(e[r]=t[r]);return e}function nJ(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var r in t)if(Pt(t,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(t[r]&&t[r].constructor===Object)e[r]===void 0&&(e[r]={}),e[r]&&e[r].constructor===Object?nJ(e[r],t[r]):e[r]=t[r];else{if(Array.isArray(t[r]))throw new TypeError("Arrays are not supported by deepExtend");e[r]=t[r]}return e}function eh(e,t){var r,n,i;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;n++)if(!eh(e[n],t[n]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(r in e)if(!(r in t)||!eh(e[r],t[r]))return!1;for(r in t)if(!(r in e))return!1;return!0}else return e===t}}function v0e(e){var t={};return y0e(e,t),t}function y0e(e,t){for(var r in e)if(Pt(e,r)){var n=e[r];typeof n=="object"&&n!==null?y0e(n,t):t[r]=n}}function YE(e,t,r){var n=!0,i;Object.defineProperty(e,t,{get:function(){return n&&(i=r(),n=!1),i},set:function(o){i=o,n=!1},configurable:!0,enumerable:!0})}function Pt(e,t){return e&&Object.hasOwnProperty.call(e,t)}function b0e(e){return e&&typeof e.factory=="function"}function x0e(e,t){for(var r={},n=0;n<t.length;n++){var i=t[n],a=e[i];a!==void 0&&(r[i]=a)}return r}var NI=["Matrix","Array"],MI=["number","BigNumber","Fraction"];function S0e(e,t){function r(n){if(n){var i=QE(e,nr);w0e(n,"matrix",NI),w0e(n,"number",MI),nJ(e,n);var a=QE(e,nr),o=QE(n,nr);return t("config",a,i,o),a}else return QE(e,nr)}return r.MATRIX_OPTIONS=NI,r.NUMBER_OPTIONS=MI,Object.keys(Px).forEach(n=>{Object.defineProperty(r,n,{get:()=>e[n],enumerable:!0,configurable:!0})}),r}function w0e(e,t,r){e[t]!==void 0&&!r.includes(e[t])&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+r.map(n=>JSON.stringify(n)).join(", ")+".")}var st=function(t){if(t)throw new Error(`The global config is readonly. |