/*! For license information please see vendors.6accb675f27e0f427956.js.LICENSE.txt */ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="efe106ff-bd86-4905-8cbf-6082be8c5194",e._sentryDebugIdIdentifier="sentry-dbid-efe106ff-bd86-4905-8cbf-6082be8c5194")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"2815863fd0dfc3f1bc730619e818cbe2a0b9b66c"},(globalThis.webpackChunkHacksterIO=globalThis.webpackChunkHacksterIO||[]).push([[96],{43375:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AutoScrollActivator:()=>ve,DndContext:()=>Ke,DragOverlay:()=>ft,KeyboardCode:()=>ie,KeyboardSensor:()=>ce,MeasuringFrequency:()=>we,MeasuringStrategy:()=>Ce,MouseSensor:()=>ye,PointerSensor:()=>fe,TouchSensor:()=>_e,TraversalOrder:()=>Ee,applyModifiers:()=>Ge,closestCenter:()=>x,closestCorners:()=>O,defaultAnnouncements:()=>d,defaultCoordinates:()=>b,defaultDropAnimation:()=>pt,defaultDropAnimationSideEffects:()=>ut,defaultScreenReaderInstructions:()=>p,getClientRect:()=>V,getFirstCollision:()=>w,getScrollableAncestors:()=>U,pointerWithin:()=>A,rectIntersection:()=>D,useDndContext:()=>et,useDndMonitor:()=>u,useDraggable:()=>Ze,useDroppable:()=>rt,useSensor:()=>m,useSensors:()=>y});var r=n(96540),i=n(40961),o=n(74979);const a={display:"none"};function s(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:a},n)}function l(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return r.createElement("div",{id:t,style:{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"},role:"status","aria-live":i,"aria-atomic":!0},n)}const c=(0,r.createContext)(null);function u(e){const t=(0,r.useContext)(c);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}const p={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function h(e){let{announcements:t=d,container:n,hiddenTextDescribedById:a,screenReaderInstructions:c=p}=e;const{announce:h,announcement:f}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),g=(0,o.useUniqueId)("DndLiveRegion"),[m,y]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{y(!0)}),[]),u((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;h(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&h(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;h(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;h(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;h(t.onDragCancel({active:n,over:r}))}})),[h,t])),!m)return null;const b=r.createElement(r.Fragment,null,r.createElement(s,{id:a,value:c.draggable}),r.createElement(l,{id:g,announcement:f}));return n?(0,i.createPortal)(b,n):b}var f;function g(){}function m(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function y(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter((e=>null!=e))),[...t])}!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"}(f||(f={}));const b=Object.freeze({x:0,y:0});function _(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function v(e,t){const n=(0,o.getEventCoordinates)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function E(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function S(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function C(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function w(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function T(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const x=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=T(t,t.left,t.top),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=_(T(r),i);o.push({id:t,data:{droppableContainer:e,value:n}})}}return o.sort(E)},O=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=C(t),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=C(r),a=i.reduce(((e,t,r)=>e+_(n[r],t)),0),s=Number((a/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:s}})}}return o.sort(E)};function I(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),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=n.get(r);if(o){const n=I(o,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(S)};function R(e,t){const{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}const A=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const i=[];for(const e of t){const{id:t}=e,o=n.get(t);if(o&&R(r,o)){const n=C(o).reduce(((e,t)=>e+_(r,t)),0),a=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:a}})}}return i.sort(E)};function P(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function N(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const k=N(1);function M(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const L={ignoreTransform:!1};function V(e,t){void 0===t&&(t=L);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,o.getWindow)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=M(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),c=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,p=o?e.height/o:e.height;return{width:u,height:p,top:c,right:l+u,bottom:c+p,left:l}}(n,t,r))}const{top:r,left:i,width:a,height:s,bottom:l,right:c}=n;return{top:r,left:i,width:a,height:s,bottom:l,right:c}}function F(e){return V(e,{ignoreTransform:!0})}function U(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if((0,o.isDocument)(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!(0,o.isHTMLElement)(i)||(0,o.isSVGElement)(i))return n;if(n.includes(i))return n;const a=(0,o.getWindow)(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=(0,o.getWindow)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(i,a)&&n.push(i),function(e,t){return void 0===t&&(t=(0,o.getWindow)(e).getComputedStyle(e)),"fixed"===t.position}(i,a)?n:r(i.parentNode)}(e):n}function B(e){const[t]=U(e,1);return null!=t?t:null}function j(e){return o.canUseDOM&&e?(0,o.isWindow)(e)?e:(0,o.isNode)(e)?(0,o.isDocument)(e)||e===(0,o.getOwnerDocument)(e).scrollingElement?window:(0,o.isHTMLElement)(e)?e:null:null:null}function q(e){return(0,o.isWindow)(e)?e.scrollX:e.scrollLeft}function H(e){return(0,o.isWindow)(e)?e.scrollY:e.scrollTop}function z(e){return{x:q(e),y:H(e)}}var W;function G(e){return!(!o.canUseDOM||!e)&&e===document.scrollingElement}function Q(e){const t={x:0,y:0},n=G(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(W||(W={}));const Y={x:.2,y:.2};function K(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=Y);const{isTop:c,isBottom:u,isLeft:p,isRight:d}=Q(e),h={x:0,y:0},f={x:0,y:0},g=t.height*i.y,m=t.width*i.x;return!c&&o<=t.top+g?(h.y=W.Backward,f.y=r*Math.abs((t.top+g-o)/g)):!u&&l>=t.bottom-g&&(h.y=W.Forward,f.y=r*Math.abs((t.bottom-g-l)/g)),!d&&s>=t.right-m?(h.x=W.Forward,f.x=r*Math.abs((t.right-m-s)/m)):!p&&a<=t.left+m&&(h.x=W.Backward,f.x=r*Math.abs((t.left+m-a)/m)),{direction:h,speed:f}}function $(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function J(e){return e.reduce(((e,t)=>(0,o.add)(e,z(t))),b)}function X(e,t){if(void 0===t&&(t=V),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);B(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Z=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+q(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+H(t)),0)}]];class ee{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=U(t),r=J(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of Z)for(const o of t)Object.defineProperty(this,o,{get:()=>{const t=i(n),a=r[e]-t;return this.rect[o]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class te{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ne(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var re,ie;function oe(e){e.preventDefault()}function ae(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(re||(re={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ie||(ie={}));const se={start:[ie.Space,ie.Enter],cancel:[ie.Esc],end:[ie.Space,ie.Enter]},le=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ie.Right:return{...n,x:n.x+25};case ie.Left:return{...n,x:n.x-25};case ie.Down:return{...n,y:n.y+25};case ie.Up:return{...n,y:n.y-25}}};class ce{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new te((0,o.getOwnerDocument)(t)),this.windowListeners=new te((0,o.getWindow)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(re.Resize,this.handleCancel),this.windowListeners.add(re.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(re.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&X(n),t(b)}handleKeyDown(e){if((0,o.isKeyboardEvent)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=se,coordinateGetter:a=le,scrollBehavior:s="smooth"}=r,{code:l}=e;if(i.end.includes(l))return void this.handleEnd(e);if(i.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:b;this.referenceCoordinates||(this.referenceCoordinates=u);const p=a(e,{active:t,context:n.current,currentCoordinates:u});if(p){const t=(0,o.subtract)(p,u),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:o,isRight:a,isLeft:l,isBottom:c,maxScroll:u,minScroll:d}=Q(n),h=$(n),f={x:Math.min(i===ie.Right?h.right-h.width/2:h.right,Math.max(i===ie.Right?h.left:h.left+h.width/2,p.x)),y:Math.min(i===ie.Down?h.bottom-h.height/2:h.bottom,Math.max(i===ie.Down?h.top:h.top+h.height/2,p.y))},g=i===ie.Right&&!a||i===ie.Left&&!l,m=i===ie.Down&&!c||i===ie.Up&&!o;if(g&&f.x!==p.x){const e=n.scrollLeft+t.x,o=i===ie.Right&&e<=u.x||i===ie.Left&&e>=d.x;if(o&&!t.y)return void n.scrollTo({left:e,behavior:s});r.x=o?n.scrollLeft-e:i===ie.Right?n.scrollLeft-u.x:n.scrollLeft-d.x,r.x&&n.scrollBy({left:-r.x,behavior:s});break}if(m&&f.y!==p.y){const e=n.scrollTop+t.y,o=i===ie.Down&&e<=u.y||i===ie.Up&&e>=d.y;if(o&&!t.x)return void n.scrollTo({top:e,behavior:s});r.y=o?n.scrollTop-e:i===ie.Down?n.scrollTop-u.y:n.scrollTop-d.y,r.y&&n.scrollBy({top:-r.y,behavior:s});break}}this.handleMove(e,(0,o.add)((0,o.subtract)(p,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ue(e){return Boolean(e&&"distance"in e)}function pe(e){return Boolean(e&&"delay"in e)}ce.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=se,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=o.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class de{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,o.getWindow)(e);return e instanceof t?e:(0,o.getOwnerDocument)(e)}(e.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=e,this.events=t;const{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=(0,o.getOwnerDocument)(a),this.documentListeners=new te(this.document),this.listeners=new te(n),this.windowListeners=new te((0,o.getWindow)(a)),this.initialCoordinates=null!=(r=(0,o.getEventCoordinates)(i))?r:b,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(re.Resize,this.handleCancel),this.windowListeners.add(re.DragStart,oe),this.windowListeners.add(re.VisibilityChange,this.handleCancel),this.windowListeners.add(re.ContextMenu,oe),this.documentListeners.add(re.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(pe(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(ue(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(re.Click,ae,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(re.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!r)return;const l=null!=(t=(0,o.getEventCoordinates)(e))?t:b,c=(0,o.subtract)(r,l);if(!n&&s){if(ue(s)){if(null!=s.tolerance&&ne(c,s.tolerance))return this.handleCancel();if(ne(c,s.distance))return this.handleStart()}return pe(s)&&ne(c,s.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===ie.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const he={move:{name:"pointermove"},end:{name:"pointerup"}};class fe extends de{constructor(e){const{event:t}=e,n=(0,o.getOwnerDocument)(t.target);super(e,he,n)}}fe.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const ge={move:{name:"mousemove"},end:{name:"mouseup"}};var me;!function(e){e[e.RightClick=2]="RightClick"}(me||(me={}));class ye extends de{constructor(e){super(e,ge,(0,o.getOwnerDocument)(e.event.target))}}ye.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==me.RightClick&&(null==r||r({event:n}),!0)}}];const be={move:{name:"touchmove"},end:{name:"touchend"}};class _e extends de{constructor(e){super(e,be)}static setup(){return window.addEventListener(be.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(be.move.name,e)};function e(){}}}var ve,Ee;_e.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ve||(ve={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Ee||(Ee={}));const Se={x:{[W.Backward]:!1,[W.Forward]:!1},y:{[W.Backward]:!1,[W.Forward]:!1}};var Ce,we;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ce||(Ce={})),function(e){e.Optimized="optimized"}(we||(we={}));const Te=new Map;function xe(e,t){return(0,o.useLazyMemo)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Oe(e){let{callback:t,disabled:n}=e;const i=(0,o.useEvent)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)}),[n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}function Ie(e){return new ee(V(e),e)}function De(e,t,n){void 0===t&&(t=Ie);const[i,a]=(0,r.useReducer)((function(r){if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const o=t(e);return JSON.stringify(r)===JSON.stringify(o)?r:o}),null),s=function(e){let{callback:t,disabled:n}=e;const i=(0,o.useEvent)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)}),[i,n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),l=Oe({callback:a});return(0,o.useIsomorphicLayoutEffect)((()=>{a(),e?(null==l||l.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==s||s.disconnect())}),[e]),i}const Re=[];function Ae(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==b;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,o.subtract)(e,n.current):b}function Pe(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ne=[];function ke(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,o.isHTMLElement)(t)?t:e}const Me=[{sensor:fe,options:{}},{sensor:ce,options:{}}],Le={current:{}},Ve={draggable:{measure:F},droppable:{measure:F,strategy:Ce.WhileDragging,frequency:we.Optimized},dragOverlay:{measure:V}};class Fe extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ue={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Fe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:g},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ve,measureDroppableContainers:g,windowRect:null,measuringScheduled:!1},Be={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:g,draggableNodes:new Map,over:null,measureDroppableContainers:g},je=(0,r.createContext)(Be),qe=(0,r.createContext)(Ue);function He(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Fe}}}function ze(e,t){switch(t.type){case f.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case f.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 f.DragEnd:case f.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case f.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Fe(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case f.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Fe(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case f.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Fe(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function We(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=(0,r.useContext)(je),s=(0,o.usePrevious)(i),l=(0,o.usePrevious)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!i&&s&&null!=l){if(!(0,o.isKeyboardEvent)(s))return;if(document.activeElement===s.target)return;const e=a.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,o.findFirstFocusableNode)(e);if(t){t.focus();break}}}))}}),[i,t,a,l,s]),null}function Ge(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Qe=(0,r.createContext)({...b,scaleX:1,scaleY:1});var Ye;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ye||(Ye={}));const Ke=(0,r.memo)((function(e){var t,n,a,s;let{id:l,accessibility:u,autoScroll:p=!0,children:d,sensors:g=Me,collisionDetection:m=D,measuring:y,modifiers:_,...v}=e;const E=(0,r.useReducer)(ze,void 0,He),[S,C]=E,[T,x]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[O,I]=(0,r.useState)(Ye.Uninitialized),R=O===Ye.Initialized,{draggable:{active:A,nodes:N,translate:M},droppable:{containers:L}}=S,F=A?N.get(A):null,q=(0,r.useRef)({initial:null,translated:null}),H=(0,r.useMemo)((()=>{var e;return null!=A?{id:A,data:null!=(e=null==F?void 0:F.data)?e:Le,rect:q}:null}),[A,F]),Q=(0,r.useRef)(null),[Y,$]=(0,r.useState)(null),[X,Z]=(0,r.useState)(null),te=(0,o.useLatestValue)(v,Object.values(v)),ne=(0,o.useUniqueId)("DndDescribedBy",l),re=(0,r.useMemo)((()=>L.getEnabled()),[L]),ie=(oe=y,(0,r.useMemo)((()=>({draggable:{...Ve.draggable,...null==oe?void 0:oe.draggable},droppable:{...Ve.droppable,...null==oe?void 0:oe.droppable},dragOverlay:{...Ve.dragOverlay,...null==oe?void 0:oe.dragOverlay}})),[null==oe?void 0:oe.draggable,null==oe?void 0:oe.droppable,null==oe?void 0:oe.dragOverlay]));var oe;const{droppableRects:ae,measureDroppableContainers:se,measuringScheduled:le}=function(e,t){let{dragging:n,dependencies:i,config:a}=t;const[s,l]=(0,r.useState)(null),{frequency:c,measure:u,strategy:p}=a,d=(0,r.useRef)(e),h=function(){switch(p){case Ce.Always:return!1;case Ce.BeforeDragging:return n;default:return!n}}(),f=(0,o.useLatestValue)(h),g=(0,r.useCallback)((function(e){void 0===e&&(e=[]),f.current||l((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[f]),m=(0,r.useRef)(null),y=(0,o.useLazyMemo)((t=>{if(h&&!n)return Te;if(!t||t===Te||d.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new ee(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,s,n,h,u]);return(0,r.useEffect)((()=>{d.current=e}),[e]),(0,r.useEffect)((()=>{h||g()}),[n,h]),(0,r.useEffect)((()=>{s&&s.length>0&&l(null)}),[JSON.stringify(s)]),(0,r.useEffect)((()=>{h||"number"!=typeof c||null!==m.current||(m.current=setTimeout((()=>{g(),m.current=null}),c))}),[c,h,g,...i]),{droppableRects:y,measureDroppableContainers:g,measuringScheduled:null!=s}}(re,{dragging:R,dependencies:[M.x,M.y],config:ie.droppable}),ce=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,o.useLazyMemo)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(N,A),ue=(0,r.useMemo)((()=>X?(0,o.getEventCoordinates)(X):null),[X]),pe=function(){const e=!1===(null==Y?void 0:Y.autoScrollEnabled),t="object"==typeof p?!1===p.enabled:!1===p,n=R&&!e&&!t;return"object"==typeof p?{...p,enabled:n}:{enabled:n}}(),de=function(e,t){return xe(e,t)}(ce,ie.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:a=!0}=e;const s=(0,r.useRef)(!1),{x:l,y:c}="boolean"==typeof a?{x:a,y:a}:a;(0,o.useIsomorphicLayoutEffect)((()=>{if(!l&&!c||!t)return void(s.current=!1);if(s.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=P(n(e),i);if(l||(r.x=0),c||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=B(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,l,c,i,n])}({activeNode:A?N.get(A):null,config:pe.layoutShiftCompensation,initialRect:de,measure:ie.draggable.measure});const he=De(ce,ie.draggable.measure,de),fe=De(ce?ce.parentElement:null),ge=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),me=L.getNodeFor(null==(t=ge.current.over)?void 0:t.id),ye=function(e){let{measure:t}=e;const[n,i]=(0,r.useState)(null),a=Oe({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,o.isHTMLElement)(n)){i((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),s=(0,r.useCallback)((e=>{const n=ke(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),i(n?t(n):null)}),[t,a]),[l,c]=(0,o.useNodeRef)(s);return(0,r.useMemo)((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}({measure:ie.dragOverlay.measure}),be=null!=(n=ye.nodeRef.current)?n:ce,_e=R?null!=(a=ye.rect)?a:he:null,we=Boolean(ye.nodeRef.current&&ye.rect),Ie=P(Fe=we?null:he,xe(Fe));var Fe;const Ue=Pe(be?(0,o.getWindow)(be):null),Be=function(e){const t=(0,r.useRef)(e),n=(0,o.useLazyMemo)((n=>e?n&&n!==Re&&e&&t.current&&e.parentNode===t.current.parentNode?n:U(e):Re),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(R?null!=me?me:ce:null),Ke=function(e,t){void 0===t&&(t=V);const[n]=e,i=Pe(n?(0,o.getWindow)(n):null),[a,s]=(0,r.useReducer)((function(){return e.length?e.map((e=>G(e)?i:new ee(t(e),e))):Ne}),Ne),l=Oe({callback:s});return e.length>0&&a===Ne&&s(),(0,o.useIsomorphicLayoutEffect)((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),s())}),[e]),a}(Be),$e=Ge(_,{transform:{x:M.x-Ie.x,y:M.y-Ie.y,scaleX:1,scaleY:1},activatorEvent:X,active:H,activeNodeRect:he,containerNodeRect:fe,draggingNodeRect:_e,over:ge.current.over,overlayNodeRect:ye.rect,scrollableAncestors:Be,scrollableAncestorRects:Ke,windowRect:Ue}),Je=ue?(0,o.add)(ue,M):null,Xe=function(e){const[t,n]=(0,r.useState)(null),i=(0,r.useRef)(e),a=(0,r.useCallback)((e=>{const t=j(e.target);t&&n((e=>e?(e.set(t,z(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=i.current;if(e!==t){r(t);const o=e.map((e=>{const t=j(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,z(t)]):null})).filter((e=>null!=e));n(o.length?new Map(o):null),i.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=j(e);null==t||t.removeEventListener("scroll",a)}))}}),[a,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,o.add)(e,t)),b):J(e):b),[e,t])}(Be),Ze=Ae(Xe),et=Ae(Xe,[he]),tt=(0,o.add)($e,Ze),nt=_e?k(_e,$e):null,rt=H&&nt?m({active:H,collisionRect:nt,droppableRects:ae,droppableContainers:re,pointerCoordinates:Je}):null,it=w(rt,"id"),[ot,at]=(0,r.useState)(null),st=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(we?$e:(0,o.add)($e,et),null!=(s=null==ot?void 0:ot.rect)?s:null,he),lt=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==Q.current)return;const o=N.get(Q.current);if(!o)return;const a=e.nativeEvent,s=new n({active:Q.current,activeNode:o,event:a,options:r,context:ge,onStart(e){const t=Q.current;if(null==t)return;const n=N.get(t);if(!n)return;const{onDragStart:r}=te.current,o={active:{id:t,data:n.data,rect:q}};(0,i.unstable_batchedUpdates)((()=>{null==r||r(o),I(Ye.Initializing),C({type:f.DragStart,initialCoordinates:e,active:t}),T({type:"onDragStart",event:o})}))},onMove(e){C({type:f.DragMove,coordinates:e})},onEnd:l(f.DragEnd),onCancel:l(f.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=ge.current;let s=null;if(t&&o){const{cancelDrop:i}=te.current;s={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===f.DragEnd&&"function"==typeof i&&await Promise.resolve(i(s))&&(e=f.DragCancel)}Q.current=null,(0,i.unstable_batchedUpdates)((()=>{C({type:e}),I(Ye.Uninitialized),at(null),$(null),Z(null);const t=e===f.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=te.current[t];null==e||e(s),T({type:t,event:s})}}))}}(0,i.unstable_batchedUpdates)((()=>{$(s),Z(e.nativeEvent)}))}),[N]),ct=(0,r.useCallback)(((e,t)=>(n,r)=>{const i=n.nativeEvent,o=N.get(r);if(null!==Q.current||!o||i.dndKit||i.defaultPrevented)return;const a={active:o};!0===e(n,t.options,a)&&(i.dndKit={capturedBy:t.sensor},Q.current=r,lt(n,t))}),[N,lt]),ut=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(g,ct);!function(e){(0,r.useEffect)((()=>{if(!o.canUseDOM)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(g),(0,o.useIsomorphicLayoutEffect)((()=>{he&&O===Ye.Initializing&&I(Ye.Initialized)}),[he,O]),(0,r.useEffect)((()=>{const{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:r,over:o}=ge.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:o};(0,i.unstable_batchedUpdates)((()=>{null==e||e(a),T({type:"onDragMove",event:a})}))}),[tt.x,tt.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=ge.current;if(!e||null==Q.current||!t||!o)return;const{onDragOver:a}=te.current,s=r.get(it),l=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};(0,i.unstable_batchedUpdates)((()=>{at(l),null==a||a(c),T({type:"onDragOver",event:c})}))}),[it]),(0,o.useIsomorphicLayoutEffect)((()=>{ge.current={activatorEvent:X,active:H,activeNode:ce,collisionRect:nt,collisions:rt,droppableRects:ae,draggableNodes:N,draggingNode:be,draggingNodeRect:_e,droppableContainers:L,over:ot,scrollableAncestors:Be,scrollAdjustedTranslate:tt},q.current={initial:_e,translated:nt}}),[H,ce,rt,nt,N,be,_e,ae,L,ot,Be,tt]),function(e){let{acceleration:t,activator:n=ve.Pointer,canScroll:i,draggingRect:a,enabled:s,interval:l=5,order:c=Ee.TreeOrder,pointerCoordinates:u,scrollableAncestors:p,scrollableAncestorRects:d,delta:h,threshold:f}=e;const g=function(e){let{delta:t,disabled:n}=e;const r=(0,o.usePrevious)(t);return(0,o.useLazyMemo)((e=>{if(n||!r||!e)return Se;const i=Math.sign(t.x-r.x),o=Math.sign(t.y-r.y);return{x:{[W.Backward]:e.x[W.Backward]||-1===i,[W.Forward]:e.x[W.Forward]||1===i},y:{[W.Backward]:e.y[W.Backward]||-1===o,[W.Forward]:e.y[W.Forward]||1===o}}}),[n,t,r])}({delta:h,disabled:!s}),[m,y]=(0,o.useInterval)(),b=(0,r.useRef)({x:0,y:0}),_=(0,r.useRef)({x:0,y:0}),v=(0,r.useMemo)((()=>{switch(n){case ve.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case ve.DraggableRect:return a}}),[n,a,u]),E=(0,r.useRef)(null),S=(0,r.useCallback)((()=>{const e=E.current;if(!e)return;const t=b.current.x*_.current.x,n=b.current.y*_.current.y;e.scrollBy(t,n)}),[]),C=(0,r.useMemo)((()=>c===Ee.TreeOrder?[...p].reverse():p),[c,p]);(0,r.useEffect)((()=>{if(s&&p.length&&v){for(const e of C){if(!1===(null==i?void 0:i(e)))continue;const n=p.indexOf(e),r=d[n];if(!r)continue;const{direction:o,speed:a}=K(e,r,v,t,f);for(const e of["x","y"])g[e][o[e]]||(a[e]=0,o[e]=0);if(a.x>0||a.y>0)return y(),E.current=e,m(S,l),b.current=a,void(_.current=o)}b.current={x:0,y:0},_.current={x:0,y:0},y()}else y()}),[t,S,i,y,s,l,JSON.stringify(v),JSON.stringify(g),m,p,C,d,JSON.stringify(f)])}({...pe,delta:M,draggingRect:nt,pointerCoordinates:Je,scrollableAncestors:Be,scrollableAncestorRects:Ke});const pt=(0,r.useMemo)((()=>({active:H,activeNode:ce,activeNodeRect:he,activatorEvent:X,collisions:rt,containerNodeRect:fe,dragOverlay:ye,draggableNodes:N,droppableContainers:L,droppableRects:ae,over:ot,measureDroppableContainers:se,scrollableAncestors:Be,scrollableAncestorRects:Ke,measuringConfiguration:ie,measuringScheduled:le,windowRect:Ue})),[H,ce,he,X,rt,fe,ye,N,L,ae,ot,se,Be,Ke,ie,le,Ue]),dt=(0,r.useMemo)((()=>({activatorEvent:X,activators:ut,active:H,activeNodeRect:he,ariaDescribedById:{draggable:ne},dispatch:C,draggableNodes:N,over:ot,measureDroppableContainers:se})),[X,ut,H,he,C,ne,N,ot,se]);return r.createElement(c.Provider,{value:x},r.createElement(je.Provider,{value:dt},r.createElement(qe.Provider,{value:pt},r.createElement(Qe.Provider,{value:st},d)),r.createElement(We,{disabled:!1===(null==u?void 0:u.restoreFocus)})),r.createElement(h,{...u,hiddenTextDescribedById:ne}))})),$e=(0,r.createContext)(null),Je="button",Xe="Droppable";function Ze(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const s=(0,o.useUniqueId)(Xe),{activators:l,activatorEvent:c,active:u,activeNodeRect:p,ariaDescribedById:d,draggableNodes:h,over:f}=(0,r.useContext)(je),{role:g=Je,roleDescription:m="draggable",tabIndex:y=0}=null!=a?a:{},b=(null==u?void 0:u.id)===t,_=(0,r.useContext)(b?Qe:$e),[v,E]=(0,o.useNodeRef)(),[S,C]=(0,o.useNodeRef)(),w=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e}),{})),[e,t])}(l,t),T=(0,o.useLatestValue)(n);return(0,o.useIsomorphicLayoutEffect)((()=>(h.set(t,{id:t,key:s,node:v,activatorNode:S,data:T}),()=>{const e=h.get(t);e&&e.key===s&&h.delete(t)})),[h,t]),{active:u,activatorEvent:c,activeNodeRect:p,attributes:(0,r.useMemo)((()=>({role:g,tabIndex:y,"aria-disabled":i,"aria-pressed":!(!b||g!==Je)||void 0,"aria-roledescription":m,"aria-describedby":d.draggable})),[i,g,y,b,m,d.draggable]),isDragging:b,listeners:i?void 0:w,node:v,over:f,setNodeRef:E,setActivatorNodeRef:C,transform:_}}function et(){return(0,r.useContext)(qe)}const tt="Droppable",nt={timeout:25};function rt(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:a}=e;const s=(0,o.useUniqueId)(tt),{active:l,dispatch:c,over:u,measureDroppableContainers:p}=(0,r.useContext)(je),d=(0,r.useRef)({disabled:n}),h=(0,r.useRef)(!1),g=(0,r.useRef)(null),m=(0,r.useRef)(null),{disabled:y,updateMeasurementsFor:b,timeout:_}={...nt,...a},v=(0,o.useLatestValue)(null!=b?b:i),E=Oe({callback:(0,r.useCallback)((()=>{h.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout((()=>{p(Array.isArray(v.current)?v.current:[v.current]),m.current=null}),_)):h.current=!0}),[_]),disabled:y||!l}),S=(0,r.useCallback)(((e,t)=>{E&&(t&&(E.unobserve(t),h.current=!1),e&&E.observe(e))}),[E]),[C,w]=(0,o.useNodeRef)(S),T=(0,o.useLatestValue)(t);return(0,r.useEffect)((()=>{E&&C.current&&(E.disconnect(),h.current=!1,E.observe(C.current))}),[C,E]),(0,o.useIsomorphicLayoutEffect)((()=>(c({type:f.RegisterDroppable,element:{id:i,key:s,disabled:n,node:C,rect:g,data:T}}),()=>c({type:f.UnregisterDroppable,key:s,id:i}))),[i]),(0,r.useEffect)((()=>{n!==d.current.disabled&&(c({type:f.SetDroppableDisabled,id:i,key:s,disabled:n}),d.current.disabled=n)}),[i,s,n,c]),{active:l,rect:g,isOver:(null==u?void 0:u.id)===i,node:C,over:u,setNodeRef:w}}function it(e){let{animation:t,children:n}=e;const[i,a]=(0,r.useState)(null),[s,l]=(0,r.useState)(null),c=(0,o.usePrevious)(n);return n||i||!c||a(c),(0,o.useIsomorphicLayoutEffect)((()=>{if(!s)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,s)).then((()=>{a(null)})):a(null)}),[t,i,s]),r.createElement(r.Fragment,null,n,i?(0,r.cloneElement)(i,{ref:l}):null)}const ot={x:0,y:0,scaleX:1,scaleY:1};function at(e){let{children:t}=e;return r.createElement(je.Provider,{value:Be},r.createElement(Qe.Provider,{value:ot},t))}const st={position:"fixed",touchAction:"none"},lt=e=>(0,o.isKeyboardEvent)(e)?"transform 250ms ease":void 0,ct=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:s,className:l,rect:c,style:u,transform:p,transition:d=lt}=e;if(!c)return null;const h=a?p:{...p,scaleX:1,scaleY:1},f={...st,width:c.width,height:c.height,top:c.top,left:c.left,transform:o.CSS.Transform.toString(h),transformOrigin:a&&i?v(i,c):void 0,transition:"function"==typeof d?d(i):d,...u};return r.createElement(n,{className:l,style:f,ref:t},s)})),ut=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(null!=o&&o.active)for(const[e,t]of Object.entries(o.active))void 0!==t&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(i))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},pt={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:o.CSS.Transform.toString(t)},{transform:o.CSS.Transform.toString(n)}]},sideEffects:ut({styles:{active:{opacity:"0"}}})};let dt=0;function ht(e){return(0,r.useMemo)((()=>{if(null!=e)return dt++,dt}),[e])}const ft=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:s,modifiers:l,wrapperElement:c="div",className:u,zIndex:p=999}=e;const{activatorEvent:d,active:h,activeNodeRect:f,containerNodeRect:g,draggableNodes:m,droppableContainers:y,dragOverlay:b,over:_,measuringConfiguration:v,scrollableAncestors:E,scrollableAncestorRects:S,windowRect:C}=et(),w=(0,r.useContext)(Qe),T=ht(null==h?void 0:h.id),x=Ge(l,{activatorEvent:d,active:h,activeNodeRect:f,containerNodeRect:g,draggingNodeRect:b.rect,over:_,overlayNodeRect:b.rect,scrollableAncestors:E,scrollableAncestorRects:S,transform:w,windowRect:C}),O=xe(f),I=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return(0,o.useEvent)(((e,a)=>{if(null===t)return;const s=n.get(e);if(!s)return;const l=s.node.current;if(!l)return;const c=ke(a);if(!c)return;const{transform:u}=(0,o.getWindow)(a).getComputedStyle(a),p=M(u);if(!p)return;const d="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...pt,...e};return e=>{let{active:o,dragOverlay:a,transform:s,...l}=e;if(!t)return;const c=a.rect.left-o.rect.left,u=a.rect.top-o.rect.top,p={scaleX:1!==s.scaleX?o.rect.width*s.scaleX/a.rect.width:1,scaleY:1!==s.scaleY?o.rect.height*s.scaleY/a.rect.height:1},d={x:s.x-c,y:s.y-u,...p},h=i({...l,active:o,dragOverlay:a,transform:{initial:s,final:d}}),[f]=h,g=h[h.length-1];if(JSON.stringify(f)===JSON.stringify(g))return;const m=null==r?void 0:r({active:o,dragOverlay:a,...l}),y=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{y.onfinish=()=>{null==m||m(),e()}}))}}(t);return X(l,i.draggable.measure),d({active:{id:e,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:p})}))}({config:i,draggableNodes:m,droppableContainers:y,measuringConfiguration:v}),D=O?b.setRef:void 0;return r.createElement(at,null,r.createElement(it,{animation:I},h&&T?r.createElement(ct,{key:T,id:h.id,ref:D,as:c,activatorEvent:d,adjustScale:t,className:u,transition:s,rect:O,style:{zIndex:p,...a},transform:x},n):null))}))},43627:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SortableContext:()=>b,arrayMove:()=>a,arraySwap:()=>s,defaultAnimateLayoutChanges:()=>v,defaultNewIndexGetter:()=>_,hasSortableData:()=>x,horizontalListSortingStrategy:()=>p,rectSortingStrategy:()=>d,rectSwappingStrategy:()=>h,sortableKeyboardCoordinates:()=>I,useSortable:()=>T,verticalListSortingStrategy:()=>g});var r=n(96540),i=n(43375),o=n(74979);function a(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s(e,t,n){const r=e.slice();return r[t]=e[n],r[n]=e[t],r}function l(e,t){return e.reduce(((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e}),Array(e.length))}function c(e){return null!==e&&e>=0}const u={scaleX:1,scaleY:1},p=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:i,overIndex:o,index:a}=e;const s=null!=(t=n[i])?t:r;if(!s)return null;const l=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r&&(i||o)?ni&&a<=o?{x:-s.width-l,y:0,...u}:a=o?{x:s.width+l,y:0,...u}:{x:0,y:0,...u}},d=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=a(t,r,n),s=t[i],l=o[i];return l&&s?{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}:null},h=e=>{let t,n,{activeIndex:r,index:i,rects:o,overIndex:a}=e;return i===r&&(t=o[i],n=o[a]),i===a&&(t=o[i],n=o[r]),n&&t?{x:n.left-t.left,y:n.top-t.top,scaleX:n.width/t.width,scaleY:n.height/t.height}:null},f={scaleX:1,scaleY:1},g=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:a}=e;const s=null!=(t=o[n])?t:r;if(!s)return null;if(i===n){const e=o[a];return e?{x:0,y:nn&&i<=a?{x:0,y:-s.height-l,...f}:i=a?{x:0,y:s.height+l,...f}:{x:0,y:0,...f}},m="Sortable",y=r.createContext({activeIndex:-1,containerId:m,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:d,disabled:{draggable:!1,droppable:!1}});function b(e){let{children:t,id:n,items:a,strategy:s=d,disabled:c=!1}=e;const{active:u,dragOverlay:p,droppableRects:h,over:f,measureDroppableContainers:g}=(0,i.useDndContext)(),b=(0,o.useUniqueId)(m,n),_=Boolean(null!==p.rect),v=(0,r.useMemo)((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),E=null!=u,S=u?v.indexOf(u.id):-1,C=f?v.indexOf(f.id):-1,w=(0,r.useRef)(v),T=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{T&&E&&g(v)}),[T,v,E,g]),(0,r.useEffect)((()=>{w.current=v}),[v]);const I=(0,r.useMemo)((()=>({activeIndex:S,containerId:b,disabled:O,disableTransforms:x,items:v,overIndex:C,useDragOverlay:_,sortedRects:l(v,h),strategy:s})),[S,b,O.draggable,O.droppable,x,v,C,h,_,s]);return r.createElement(y.Provider,{value:I},t)}const _=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return a(n,r,i).indexOf(t)},v=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r||s!==o&&i===a||!n&&(a===i||t!==l))},E={duration:200,easing:"ease"},S="transform",C=o.CSS.Transition.toString({property:S,duration:0,easing:"linear"}),w={roleDescription:"sortable"};function T(e){let{animateLayoutChanges:t=v,attributes:n,disabled:a,data:s,getNewIndex:l=_,id:u,strategy:p,resizeObserverConfig:d,transition:h=E}=e;const{items:f,containerId:g,activeIndex:m,disabled:b,disableTransforms:T,sortedRects:x,overIndex:O,useDragOverlay:I,strategy:D}=(0,r.useContext)(y),R=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(a,b),A=f.indexOf(u),P=(0,r.useMemo)((()=>({sortable:{containerId:g,index:A,items:f},...s})),[g,s,A,f]),N=(0,r.useMemo)((()=>f.slice(f.indexOf(u))),[f,u]),{rect:k,node:M,isOver:L,setNodeRef:V}=(0,i.useDroppable)({id:u,data:P,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...d}}),{active:F,activatorEvent:U,activeNodeRect:B,attributes:j,setNodeRef:q,listeners:H,isDragging:z,over:W,setActivatorNodeRef:G,transform:Q}=(0,i.useDraggable)({id:u,data:P,attributes:{...w,...n},disabled:R.draggable}),Y=(0,o.useCombinedRefs)(V,q),K=Boolean(F),$=K&&!T&&c(m)&&c(O),J=!I&&z,X=J&&$?Q:null,Z=$?null!=X?X:(null!=p?p:D)({rects:x,activeNodeRect:B,activeIndex:m,overIndex:O,index:A}):null,ee=c(m)&&c(O)?l({id:u,items:f,activeIndex:m,overIndex:O}):A,te=null==F?void 0:F.id,ne=(0,r.useRef)({activeId:te,items:f,newIndex:ee,containerId:g}),re=f!==ne.current.items,ie=t({active:F,containerId:g,isDragging:z,isSorting:K,id:u,index:A,items:f,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:h,wasDragging:null!=ne.current.activeId}),oe=function(e){let{disabled:t,index:n,node:a,rect:s}=e;const[l,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,o.useIsomorphicLayoutEffect)((()=>{if(!t&&n!==u.current&&a.current){const e=s.current;if(e){const t=(0,i.getClientRect)(a.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)}),[t,n,a,s]),(0,r.useEffect)((()=>{l&&c(null)}),[l]),l}({disabled:!ie,index:A,node:M,rect:k});return(0,r.useEffect)((()=>{K&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),g!==ne.current.containerId&&(ne.current.containerId=g),f!==ne.current.items&&(ne.current.items=f)}),[K,ee,g,f]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:F,activeIndex:m,attributes:j,data:P,rect:k,index:A,newIndex:ee,items:f,isOver:L,isSorting:K,isDragging:z,listeners:H,node:M,overIndex:O,over:W,setNodeRef:Y,setActivatorNodeRef:G,setDroppableNodeRef:V,setDraggableNodeRef:q,transform:null!=oe?oe:Z,transition:oe||re&&ne.current.newIndex===A?C:J&&!(0,o.isKeyboardEvent)(U)||!h?void 0:K||ie?o.CSS.Transition.toString({...h,property:S}):void 0}}function x(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const O=[i.KeyboardCode.Down,i.KeyboardCode.Right,i.KeyboardCode.Up,i.KeyboardCode.Left],I=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:a,droppableContainers:s,over:l,scrollableAncestors:c}}=t;if(O.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];s.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const o=a.get(n.id);if(o)switch(e.code){case i.KeyboardCode.Down:r.topo.top&&t.push(n);break;case i.KeyboardCode.Left:r.left>o.left&&t.push(n);break;case i.KeyboardCode.Right:r.left1&&(h=d[1].id),null!=h){const e=s.get(n.id),t=s.get(h),l=t?a.get(t.id):null,d=null==t?void 0:t.node.current;if(d&&l&&e&&t){const n=(0,i.getScrollableAncestors)(d).some(((e,t)=>c[t]!==e)),a=D(e,t),s=(p=t,!(!x(u=e)||!x(p))&&!!D(u,p)&&u.data.current.sortable.index{"use strict";n.r(t),n.d(t,{CSS:()=>D,add:()=>C,canUseDOM:()=>o,findFirstFocusableNode:()=>A,getEventCoordinates:()=>I,getOwnerDocument:()=>d,getWindow:()=>l,hasViewportRelativeCoordinates:()=>T,isDocument:()=>c,isHTMLElement:()=>u,isKeyboardEvent:()=>x,isNode:()=>s,isSVGElement:()=>p,isTouchEvent:()=>O,isWindow:()=>a,subtract:()=>w,useCombinedRefs:()=>i,useEvent:()=>f,useInterval:()=>g,useIsomorphicLayoutEffect:()=>h,useLatestValue:()=>m,useLazyMemo:()=>y,useNodeRef:()=>b,usePrevious:()=>_,useUniqueId:()=>E});var r=n(96540);function i(){for(var e=arguments.length,t=new Array(e),n=0;ne=>{t.forEach((t=>t(e)))}),t)}const o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function s(e){return"nodeType"in e}function l(e){var t,n;return e?a(e)?e:s(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=l(e);return e instanceof t}function u(e){return!a(e)&&e instanceof l(e).HTMLElement}function p(e){return e instanceof l(e).SVGElement}function d(e){return e?a(e)?e.document:s(e)?c(e)?e:u(e)||p(e)?e.ownerDocument:document:document:document}const h=o?r.useLayoutEffect:r.useEffect;function f(e){const t=(0,r.useRef)(e);return h((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function m(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return h((()=>{n.current!==e&&(n.current=e)}),t),n}function y(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function b(e){const t=f(e),n=(0,r.useRef)(null),i=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,i]}function _(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let v={};function E(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==v[e]?0:v[e]+1;return v[e]=n,e+"-"+n}),[e,t])}function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t}),{...t})}}const C=S(1),w=S(-1);function T(e){return"clientX"in e&&"clientY"in e}function x(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function O(e){if(!e)return!1;const{TouchEvent:t}=l(e.target);return t&&e instanceof t}function I(e){if(O(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return T(e)?{x:e.clientX,y:e.clientY}:null}const D=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[D.Translate.toString(e),D.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),R="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function A(e){return e.matches(R)?e:e.querySelector(R)}},82535:(e,t,n)=>{"use strict";n.r(t),n.d(t,{arrow:()=>Se,autoPlacement:()=>pe,autoUpdate:()=>ue,computePosition:()=>_e,detectOverflow:()=>O,flip:()=>he,getOverflowAncestors:()=>Y,hide:()=>ge,inline:()=>ye,limitShift:()=>be,offset:()=>A,platform:()=>ce,shift:()=>de,size:()=>fe,useFloating:()=>Ie});const r=["top","right","bottom","left"],i=["start","end"],o=r.reduce(((e,t)=>e.concat(t,t+"-"+i[0],t+"-"+i[1])),[]),a=Math.min,s=Math.max,l=Math.round,c=Math.floor,u=e=>({x:e,y:e}),p={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function h(e,t,n){return s(e,a(t,n))}function f(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function y(e){return"x"===e?"y":"x"}function b(e){return"y"===e?"height":"width"}function _(e){return["top","bottom"].includes(g(e))?"y":"x"}function v(e){return y(_(e))}function E(e,t,n){void 0===n&&(n=!1);const r=m(e),i=v(e),o=b(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=C(a)),[a,C(a)]}function S(e){return e.replace(/start|end/g,(e=>d[e]))}function C(e){return e.replace(/left|right|bottom|top/g,(e=>p[e]))}function w(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function T(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function x(e,t,n){let{reference:r,floating:i}=e;const o=_(t),a=v(t),s=b(a),l=g(t),c="y"===o,u=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,d=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-i.width,y:p};break;default:h={x:r.x,y:r.y}}switch(m(t)){case"start":h[a]-=d*(n&&c?-1:1);break;case"end":h[a]+=d*(n&&c?-1:1)}return h}async function O(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:d=!1,padding:h=0}=f(t,e),g=w(h),m=s[d?"floating"===p?"reference":"floating":p],y=T(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b="floating"===p?{...a.floating,x:r,y:i}:a.reference,_=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=await(null==o.isElement?void 0:o.isElement(_))&&await(null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},E=T(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:_,strategy:l}):b);return{top:(y.top-E.top+g.top)/v.y,bottom:(E.bottom-y.bottom+g.bottom)/v.y,left:(y.left-E.left+g.left)/v.x,right:(E.right-y.right+g.right)/v.x}}function I(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function D(e){return r.some((t=>e[t]>=0))}function R(e){const t=a(...e.map((e=>e.left))),n=a(...e.map((e=>e.top)));return{x:t,y:n,width:s(...e.map((e=>e.right)))-t,height:s(...e.map((e=>e.bottom)))-n}}const A=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=g(n),s=m(n),l="y"===_(n),c=["left","top"].includes(a)?-1:1,u=o&&l?-1:1,p=f(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:y}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&"number"==typeof y&&(h="end"===s?-1*y:y),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}};function P(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function k(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return e instanceof Node||e instanceof N(e).Node}function L(e){return e instanceof Element||e instanceof N(e).Element}function V(e){return e instanceof HTMLElement||e instanceof N(e).HTMLElement}function F(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof N(e).ShadowRoot)}function U(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function B(e){return["table","td","th"].includes(P(e))}function j(e){const t=q(),n=z(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function H(e){return["html","body","#document"].includes(P(e))}function z(e){return N(e).getComputedStyle(e)}function W(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function G(e){if("html"===P(e))return e;const t=e.assignedSlot||e.parentNode||F(e)&&e.host||k(e);return F(t)?t.host:t}function Q(e){const t=G(e);return H(t)?e.ownerDocument?e.ownerDocument.body:e.body:V(t)&&U(t)?t:Q(t)}function Y(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=Q(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=N(i);return o?t.concat(a,a.visualViewport||[],U(i)?i:[],a.frameElement&&n?Y(a.frameElement):[]):t.concat(i,Y(i,[],n))}function K(e){const t=z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=V(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=l(n)!==o||l(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function $(e){return L(e)?e:e.contextElement}function J(e){const t=$(e);if(!V(t))return u(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=K(t);let a=(o?l(n.width):n.width)/r,s=(o?l(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const X=u(0);function Z(e){const t=N(e);return q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:X}function ee(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=$(e);let a=u(1);t&&(r?L(r)&&(a=J(r)):a=J(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==N(e))&&t}(o,n,r)?Z(o):u(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,p=i.width/a.x,d=i.height/a.y;if(o){const e=N(o),t=r&&L(r)?N(r):r;let n=e,i=n.frameElement;for(;i&&r&&t!==n;){const e=J(i),t=i.getBoundingClientRect(),r=z(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,p*=e.x,d*=e.y,l+=o,c+=a,n=N(i),i=n.frameElement}}return T({width:p,height:d,x:l,y:c})}const te=[":popover-open",":modal"];function ne(e){return te.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function re(e){return ee(k(e)).left+W(e).scrollLeft}function ie(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=N(e),r=k(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=q();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=k(e),n=W(e),r=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+re(e);const l=-n.scrollTop;return"rtl"===z(r).direction&&(a+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}(k(e));else if(L(t))r=function(e,t){const n=ee(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=V(e)?J(e):u(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=Z(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return T(r)}function oe(e,t){const n=G(e);return!(n===t||!L(n)||H(n))&&("fixed"===z(n).position||oe(n,t))}function ae(e,t,n){const r=V(t),i=k(t),o="fixed"===n,a=ee(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=u(0);if(r||!r&&!o)if(("body"!==P(t)||U(i))&&(s=W(t)),r){const e=ee(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=re(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function se(e,t){return V(e)&&"fixed"!==z(e).position?t?t(e):e.offsetParent:null}function le(e,t){const n=N(e);if(!V(e)||ne(e))return n;let r=se(e,t);for(;r&&B(r)&&"static"===z(r).position;)r=se(r,t);return r&&("html"===P(r)||"body"===P(r)&&"static"===z(r).position&&!j(r))?n:r||function(e){let t=G(e);for(;V(t)&&!H(t);){if(j(t))return t;t=G(t)}return null}(e)||n}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,a=k(r),s=!!t&&ne(t.floating);if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=u(1);const p=u(0),d=V(r);if((d||!d&&!o)&&(("body"!==P(r)||U(a))&&(l=W(r)),V(r))){const e=ee(r);c=J(r),p.x=e.x+r.clientLeft,p.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+p.x,y:n.y*c.y-l.scrollTop*c.y+p.y}},getDocumentElement:k,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter((e=>L(e)&&"body"!==P(e))),i=null;const o="fixed"===z(e).position;let a=o?G(e):e;for(;L(a)&&!H(a);){const t=z(a),n=j(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||U(a)&&!n&&oe(e,a))?r=r.filter((e=>e!==a)):i=t,a=G(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=o[0],c=o.reduce(((e,n)=>{const r=ie(t,n,i);return e.top=s(r.top,e.top),e.right=a(r.right,e.right),e.bottom=a(r.bottom,e.bottom),e.left=s(r.left,e.left),e}),ie(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,n=this.getDimensions;return{reference:ae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=K(e);return{width:t,height:n}},getScale:J,isElement:L,isRTL:function(e){return"rtl"===z(e).direction}};function ue(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:p=!1}=r,d=$(e),h=i||o?[...d?Y(d):[],...Y(t)]:[];h.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const f=d&&u?function(e,t){let n,r=null;const i=k(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(u,p){void 0===u&&(u=!1),void 0===p&&(p=1),o();const{left:d,top:h,width:f,height:g}=e.getBoundingClientRect();if(u||t(),!f||!g)return;const m={rootMargin:-c(h)+"px "+-c(i.clientWidth-(d+f))+"px "+-c(i.clientHeight-(h+g))+"px "+-c(d)+"px",threshold:s(0,a(1,p))||1};let y=!0;function b(e){const t=e[0].intersectionRatio;if(t!==p){if(!y)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}y=!1}try{r=new IntersectionObserver(b,{...m,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(b,m)}r.observe(e)}(!0),o}(d,n):null;let g,m=-1,y=null;l&&(y=new ResizeObserver((e=>{let[r]=e;r&&r.target===d&&y&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var e;null==(e=y)||e.observe(t)}))),n()})),d&&!p&&y.observe(d),y.observe(t));let b=p?ee(e):null;return p&&function t(){const r=ee(e);!b||r.x===b.x&&r.y===b.y&&r.width===b.width&&r.height===b.height||n(),b=r,g=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==f||f(),null==(e=y)||e.disconnect(),y=null,p&&cancelAnimationFrame(g)}}const pe=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:a,middlewareData:s,placement:l,platform:c,elements:u}=t,{crossAxis:p=!1,alignment:d,allowedPlacements:h=o,autoAlignment:y=!0,...b}=f(e,t),_=void 0!==d||h===o?function(e,t,n){return(e?[...n.filter((t=>m(t)===e)),...n.filter((t=>m(t)!==e))]:n.filter((e=>g(e)===e))).filter((n=>!e||m(n)===e||!!t&&S(n)!==n))}(d||null,y,h):h,v=await O(t,b),C=(null==(n=s.autoPlacement)?void 0:n.index)||0,w=_[C];if(null==w)return{};const T=E(w,a,await(null==c.isRTL?void 0:c.isRTL(u.floating)));if(l!==w)return{reset:{placement:_[0]}};const x=[v[g(w)],v[T[0]],v[T[1]]],I=[...(null==(r=s.autoPlacement)?void 0:r.overflows)||[],{placement:w,overflows:x}],D=_[C+1];if(D)return{data:{index:C+1,overflows:I},reset:{placement:D}};const R=I.map((e=>{const t=m(e.placement);return[e.placement,t&&p?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),A=(null==(i=R.filter((e=>e[2].slice(0,m(e[0])?2:3).every((e=>e<=0))))[0])?void 0:i[0])||R[0][0];return A!==l?{data:{index:C+1,overflows:I},reset:{placement:A}}:{}}}},de=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=f(e,t),c={x:n,y:r},u=await O(t,l),p=_(g(i)),d=y(p);let m=c[d],b=c[p];if(o){const e="y"===d?"bottom":"right";m=h(m+u["y"===d?"top":"left"],m,m-u[e])}if(a){const e="y"===p?"bottom":"right";b=h(b+u["y"===p?"top":"left"],b,b-u[e])}const v=s.fn({...t,[d]:m,[p]:b});return{...v,data:{x:v.x-n,y:v.y-r}}}}},he=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,..._}=f(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const v=g(i),w=g(s)===s,T=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=d||(w||!b?[C(s)]:function(e){const t=C(e);return[S(e),t,S(t)]}(s));d||"none"===y||x.push(...function(e,t,n,r){const i=m(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}(g(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(S)))),o}(s,b,y,T));const I=[s,...x],D=await O(t,_),R=[];let A=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&R.push(D[v]),p){const e=E(i,a,T);R.push(D[e[0]],D[e[1]])}if(A=[...A,{placement:i,overflows:R}],!R.every((e=>e<=0))){var P,N;const e=((null==(P=o.flip)?void 0:P.index)||0)+1,t=I[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(N=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(h){case"bestFit":{var k;const e=null==(k=A.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:k[0];e&&(n=e);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}},fe=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:l=(()=>{}),...c}=f(e,t),u=await O(t,c),p=g(n),d=m(n),h="y"===_(n),{width:y,height:b}=r.floating;let v,E;"top"===p||"bottom"===p?(v=p,E=d===(await(null==i.isRTL?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(E=p,v="end"===d?"top":"bottom");const S=b-u[v],C=y-u[E],w=!t.middlewareData.shift;let T=S,x=C;if(h){const e=y-u.left-u.right;x=d||w?a(C,e):e}else{const e=b-u.top-u.bottom;T=d||w?a(S,e):e}if(w&&!d){const e=s(u.left,0),t=s(u.right,0),n=s(u.top,0),r=s(u.bottom,0);h?x=y-2*(0!==e||0!==t?e+t:s(u.left,u.right)):T=b-2*(0!==n||0!==r?n+r:s(u.top,u.bottom))}await l({...t,availableWidth:x,availableHeight:T});const I=await i.getDimensions(o.floating);return y!==I.width||b!==I.height?{reset:{rects:!0}}:{}}}},ge=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=f(e,t);switch(r){case"referenceHidden":{const e=I(await O(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:D(e)}}}case"escaped":{const e=I(await O(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:D(e)}}}default:return{}}}}},me=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:p=0}=f(e,t)||{};if(null==u)return{};const d=w(p),g={x:n,y:r},y=v(i),_=b(y),E=await s.getDimensions(u),S="y"===y,C=S?"top":"left",T=S?"bottom":"right",x=S?"clientHeight":"clientWidth",O=o.reference[_]+o.reference[y]-g[y]-o.floating[_],I=g[y]-o.reference[y],D=await(null==s.getOffsetParent?void 0:s.getOffsetParent(u));let R=D?D[x]:0;R&&await(null==s.isElement?void 0:s.isElement(D))||(R=l.floating[x]||o.floating[_]);const A=O/2-I/2,P=R/2-E[_]/2-1,N=a(d[C],P),k=a(d[T],P),M=N,L=R-E[_]-k,V=R/2-E[_]/2+A,F=h(M,V,L),U=!c.arrow&&null!=m(i)&&V!==F&&o.reference[_]/2-(Ve.y-t.y)),n=[];let r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map((e=>T(R(e))))}(d),m=T(R(d)),y=w(c),b=await o.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=u&&null!=p)return h.find((e=>u>e.left-y.left&&ue.top-y.top&&p=2){if("y"===_(n)){const e=h[0],t=h[h.length-1],r="top"===g(n),i=e.top,o=t.bottom,a=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:o,left:a,right:s,width:s-a,height:o-i,x:a,y:i}}const e="left"===g(n),t=s(...h.map((e=>e.right))),r=a(...h.map((e=>e.left))),i=h.filter((n=>e?n.left===r:n.right===t)),o=i[0].top,l=i[i.length-1].bottom;return{top:o,bottom:l,left:r,right:t,width:t-r,height:l-o,x:r,y:o}}return m}},floating:r.floating,strategy:l});return i.reference.x!==b.reference.x||i.reference.y!==b.reference.y||i.reference.width!==b.reference.width||i.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},be=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=f(e,t),u={x:n,y:r},p=_(i),d=y(p);let h=u[d],m=u[p];const b=f(s,t),v="number"==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+v.mainAxis,n=o.reference[d]+o.reference[e]-v.mainAxis;hn&&(h=n)}if(c){var E,S;const e="y"===d?"width":"height",t=["top","left"].includes(g(i)),n=o.reference[p]-o.floating[e]+(t&&(null==(E=a.offset)?void 0:E[p])||0)+(t?0:v.crossAxis),r=o.reference[p]+o.reference[e]+(t?0:(null==(S=a.offset)?void 0:S[p])||0)-(t?v.crossAxis:0);mr&&(m=r)}return{[d]:h,[p]:m}}}},_e=(e,t,n)=>{const r=new Map,i={platform:ce,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:p}=x(c,r,l),d=r,h={},f=0;for(let n=0;n({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?me({element:n.current,padding:r}).fn(t):{}:n?me({element:n,padding:r}).fn(t):{};var i}});var Ce="undefined"!=typeof document?ve.useLayoutEffect:ve.useEffect;function we(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!we(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(!("_owner"===n&&e.$$typeof||we(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Te(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xe(e,t){const n=Te(e);return Math.round(t*n)/n}function Oe(e){const t=ve.useRef(e);return Ce((()=>{t.current=e})),t}function Ie(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,p]=ve.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=ve.useState(r);we(d,r)||h(r);const[f,g]=ve.useState(null),[m,y]=ve.useState(null),b=ve.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),_=ve.useCallback((e=>{e!==C.current&&(C.current=e,y(e))}),[]),v=o||f,E=a||m,S=ve.useRef(null),C=ve.useRef(null),w=ve.useRef(u),T=null!=l,x=Oe(l),O=Oe(i),I=ve.useCallback((()=>{if(!S.current||!C.current)return;const e={placement:t,strategy:n,middleware:d};O.current&&(e.platform=O.current),_e(S.current,C.current,e).then((e=>{const t={...e,isPositioned:!0};D.current&&!we(w.current,t)&&(w.current=t,Ee.flushSync((()=>{p(t)})))}))}),[d,t,n,O]);Ce((()=>{!1===c&&w.current.isPositioned&&(w.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[c]);const D=ve.useRef(!1);Ce((()=>(D.current=!0,()=>{D.current=!1})),[]),Ce((()=>{if(v&&(S.current=v),E&&(C.current=E),v&&E){if(x.current)return x.current(v,E,I);I()}}),[v,E,I,x,T]);const R=ve.useMemo((()=>({reference:S,floating:C,setReference:b,setFloating:_})),[b,_]),A=ve.useMemo((()=>({reference:v,floating:E})),[v,E]),P=ve.useMemo((()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=xe(A.floating,u.x),r=xe(A.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Te(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,A.floating,u.x,u.y]);return ve.useMemo((()=>({...u,update:I,refs:R,elements:A,floatingStyles:P})),[u,I,R,A,P])}},98773:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.default=p;var i="\x3c!--",o=[["&","&"],[">",">"]],a="hypernova-key",s="hypernova-id";function l(e,t){var n=e.toLowerCase().replace(/[^0-9a-z_-]/g,""),r=t.replace(/&/g,"&").replace(/"/g,""");return"data-"+String(n)+'="'+String(r)+'"'}function c(e,t){var r,a=Object.keys(e).map((function(t){return l(t,e[t])}));return'