import{ef as Hn,ed as v,b0 as N,c7 as Or,b2 as qn,ec as Nr}from"./index-BJCd-jqX.js";function F(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var zn=typeof Symbol=="function"&&Symbol.observable||"@@observable",qt=zn,zt=()=>Math.random().toString(36).substring(7).split("").join("."),Yn={INIT:`@@redux/INIT${zt()}`,REPLACE:`@@redux/REPLACE${zt()}`},Yt=Yn;function jn(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Br(e,t,r){if(typeof e!="function")throw new Error(F(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(F(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(F(1));return r(Br)(e,t)}let n=e,o=t,i=new Map,s=i,c=0,l=!1;function u(){s===i&&(s=new Map,i.forEach((m,y)=>{s.set(y,m)}))}function p(){if(l)throw new Error(F(3));return o}function a(m){if(typeof m!="function")throw new Error(F(4));if(l)throw new Error(F(5));let y=!0;u();const D=c++;return s.set(D,m),function(){if(y){if(l)throw new Error(F(6));y=!1,u(),s.delete(D),i=null}}}function d(m){if(!jn(m))throw new Error(F(7));if(typeof m.type>"u")throw new Error(F(8));if(typeof m.type!="string")throw new Error(F(17));if(l)throw new Error(F(9));try{l=!0,o=n(o,m)}finally{l=!1}return(i=s).forEach(D=>{D()}),m}function f(m){if(typeof m!="function")throw new Error(F(10));n=m,d({type:Yt.REPLACE})}function g(){const m=a;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(F(11));function D(){const I=y;I.next&&I.next(p())}return D(),{unsubscribe:m(D)}},[qt](){return this}}}return d({type:Yt.INIT}),{dispatch:d,subscribe:a,getState:p,replaceReducer:f,[qt]:g}}function jt(e,t){return function(...r){return t(e.apply(this,r))}}function Kt(e,t){if(typeof e=="function")return jt(e,t);if(typeof e!="object"||e===null)throw new Error(F(16));const r={};for(const n in e){const o=e[n];typeof o=="function"&&(r[n]=jt(o,t))}return r}function Tr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Kn(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(F(15))};const s={getState:o.getState,dispatch:(l,...u)=>i(l,...u)},c=e.map(l=>l(s));return i=Tr(...c)(o.dispatch),{...o,dispatch:i}}}var Ze={exports:{}},Qe={};var Jt;function Jn(){if(Jt)return Qe;Jt=1;var e=Hn();function t(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,c=e.useDebugValue;return Qe.useSyncExternalStoreWithSelector=function(l,u,p,a,d){var f=o(null);if(f.current===null){var g={hasValue:!1,value:null};f.current=g}else g=f.current;f=s(function(){function m(S){if(!y){if(y=!0,D=S,S=a(S),d!==void 0&&g.hasValue){var C=g.value;if(d(C,S))return E=C}return E=S}if(C=E,r(D,S))return C;var R=a(S);return d!==void 0&&d(C,R)?(D=S,C):(D=S,E=R)}var y=!1,D,E,I=p===void 0?null:p;return[function(){return m(u())},I===null?void 0:function(){return m(I())}]},[u,p,a,d]);var b=n(l,f[0],f[1]);return i(function(){g.hasValue=!0,g.value=b},[b]),c(b),b},Qe}var Xt;function Xn(){return Xt||(Xt=1,Ze.exports=Jn()),Ze.exports}Xn();var Zn=v.version.startsWith("19"),Qn=Symbol.for(Zn?"react.transitional.element":"react.element"),eo=Symbol.for("react.portal"),to=Symbol.for("react.fragment"),ro=Symbol.for("react.strict_mode"),no=Symbol.for("react.profiler"),oo=Symbol.for("react.consumer"),io=Symbol.for("react.context"),Lr=Symbol.for("react.forward_ref"),so=Symbol.for("react.suspense"),co=Symbol.for("react.suspense_list"),vt=Symbol.for("react.memo"),lo=Symbol.for("react.lazy"),ao=Lr,uo=vt;function po(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case Qn:switch(e=e.type,e){case to:case no:case ro:case so:case co:return e;default:switch(e=e&&e.$$typeof,e){case io:case Lr:case lo:case vt:return e;case oo:return e;default:return t}}case eo:return t}}}function fo(e){return po(e)===vt}function go(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let c=!1,l,u,p,a,d;function f(D,E){return l=D,u=E,p=e(l,u),a=t(n,u),d=r(p,a,u),c=!0,d}function g(){return p=e(l,u),t.dependsOnOwnProps&&(a=t(n,u)),d=r(p,a,u),d}function b(){return e.dependsOnOwnProps&&(p=e(l,u)),t.dependsOnOwnProps&&(a=t(n,u)),d=r(p,a,u),d}function m(){const D=e(l,u),E=!s(D,p);return p=D,E&&(d=r(p,a,u)),d}function y(D,E){const I=!i(E,u),S=!o(D,l,E,u);return l=D,u=E,I&&S?g():I?b():S?m():d}return function(E,I){return c?y(E,I):f(E,I)}}function mo(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...o}){const i=t(e,o),s=r(e,o),c=n(e,o);return go(i,s,c,e,o)}function bo(e,t){const r={};for(const n in e){const o=e[n];typeof o=="function"&&(r[n]=(...i)=>t(o(...i)))}return r}function ut(e){return function(r){const n=e(r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function Zt(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Mr(e,t){return function(n,{displayName:o}){const i=function(c,l){return i.dependsOnOwnProps?i.mapToProps(c,l):i.mapToProps(c,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(c,l){i.mapToProps=e,i.dependsOnOwnProps=Zt(e);let u=i(c,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Zt(u),u=i(c,l)),u},i}}function yt(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function ho(e){return e&&typeof e=="object"?ut(t=>bo(e,t)):e?typeof e=="function"?Mr(e):yt(e,"mapDispatchToProps"):ut(t=>({dispatch:t}))}function vo(e){return e?typeof e=="function"?Mr(e):yt(e,"mapStateToProps"):ut(()=>({}))}function yo(e,t,r){return{...r,...e,...t}}function Do(e){return function(r,{displayName:n,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,p){const a=e(l,u,p);return i?o(a,s)||(s=a):(i=!0,s=a),s}}}function xo(e){return e?typeof e=="function"?Do(e):yt(e,"mergeProps"):()=>yo}function Io(e){e()}function So(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Io(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Qt={notify(){},get:()=>[]};function Gr(e,t){let r,n=Qt,o=0,i=!1;function s(b){p();const m=n.subscribe(b);let y=!1;return()=>{y||(y=!0,m(),a())}}function c(){n.notify()}function l(){g.onStateChange&&g.onStateChange()}function u(){return i}function p(){o++,r||(r=t?t.addNestedSub(l):e.subscribe(l),n=So())}function a(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=Qt)}function d(){i||(i=!0,p())}function f(){i&&(i=!1,a())}const g={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:l,isSubscribed:u,trySubscribe:d,tryUnsubscribe:f,getListeners:()=>n};return g}var Eo=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Co=Eo(),wo=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Ao=wo(),Ro=()=>Co||Ao?v.useLayoutEffect:v.useEffect,Oe=Ro();function er(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function et(e,t){if(er(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;oe(...t),r)}function Uo(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function Vo(e,t,r,n,o,i,s,c,l,u,p){if(!e)return()=>{};let a=!1,d=null;const f=()=>{if(a||!c.current)return;const b=t.getState();let m,y;try{m=n(b,o.current)}catch(D){y=D,d=D}y||(d=null),m===i.current?s.current||u():(i.current=m,l.current=m,s.current=!0,p())};return r.onStateChange=f,r.trySubscribe(),f(),()=>{if(a=!0,r.tryUnsubscribe(),r.onStateChange=null,d)throw d}}function Ho(e,t){return e===t}function qo(e,t,r,{pure:n,areStatesEqual:o=Ho,areOwnPropsEqual:i=et,areStatePropsEqual:s=et,areMergedPropsEqual:c=et,forwardRef:l=!1,context:u=_r}={}){const p=u,a=vo(e),d=ho(t),f=xo(r),g=!!e;return m=>{const y=m.displayName||m.name||"Component",D=`Connect(${y})`,E={shouldHandleStateChanges:g,displayName:D,wrappedComponentName:y,WrappedComponent:m,initMapStateToProps:a,initMapDispatchToProps:d,initMergeProps:f,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:c};function I(R){const[P,U,O]=v.useMemo(()=>{const{reactReduxForwardedRef:V,...ue}=R;return[R.context,V,ue]},[R]),B=v.useMemo(()=>{let V=p;return P?.Consumer,V},[P,p]),_=v.useContext(B),K=!!R.store&&!!R.store.getState&&!!R.store.dispatch,qe=!!_&&!!_.store,j=K?R.store:_.store,$t=qe?_.getServerState:j.getState,ze=v.useMemo(()=>mo(j.dispatch,E),[j]),[le,kt]=v.useMemo(()=>{if(!g)return $o;const V=Gr(j,K?void 0:_.subscription),ue=V.notifyNestedSubs.bind(V);return[V,ue]},[j,K,_]),Ut=v.useMemo(()=>K?_:{..._,subscription:le},[K,_,le]),Ye=v.useRef(void 0),je=v.useRef(O),ae=v.useRef(void 0),Vt=v.useRef(!1),Ke=v.useRef(!1),Je=v.useRef(void 0);Oe(()=>(Ke.current=!0,()=>{Ke.current=!1}),[]);const Ht=v.useMemo(()=>()=>ae.current&&O===je.current?ae.current:ze(j.getState(),O),[j,O]),Vn=v.useMemo(()=>ue=>le?Vo(g,j,le,ze,je,Ye,Vt,Ke,ae,kt,ue):()=>{},[le]);ko(Uo,[je,Ye,Vt,O,ae,kt]);let Ce;try{Ce=v.useSyncExternalStore(Vn,Ht,$t?()=>ze($t(),O):Ht)}catch(V){throw Je.current&&(V.message+=` The error may be correlated with this previous error: ${Je.current.stack} `),V}Oe(()=>{Je.current=void 0,ae.current=void 0,Ye.current=Ce});const Xe=v.useMemo(()=>v.createElement(m,{...Ce,ref:U}),[U,m,Ce]);return v.useMemo(()=>g?v.createElement(B.Provider,{value:Ut},Xe):Xe,[B,Xe,Ut])}const C=v.memo(I);if(C.WrappedComponent=m,C.displayName=I.displayName=D,l){const P=v.forwardRef(function(O,B){return v.createElement(C,{...O,reactReduxForwardedRef:B})});return P.displayName=D,P.WrappedComponent=m,dt(P,m)}return dt(C,m)}}var Wr=qo;function zo(e){const{children:t,context:r,serverState:n,store:o}=e,i=v.useMemo(()=>{const l=Gr(o);return{store:o,subscription:l,getServerState:n?()=>n:void 0}},[o,n]),s=v.useMemo(()=>o.getState(),[o]);Oe(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]);const c=r||_r;return v.createElement(c.Provider,{value:i},t)}var Yo=zo,jo="Invariant failed";function Ko(e,t){throw new Error(jo)}var Y=function(t){var r=t.top,n=t.right,o=t.bottom,i=t.left,s=n-i,c=o-r,l={top:r,right:n,bottom:o,left:i,width:s,height:c,x:i,y:r,center:{x:(n+i)/2,y:(o+r)/2}};return l},Dt=function(t,r){return{top:t.top-r.top,left:t.left-r.left,bottom:t.bottom+r.bottom,right:t.right+r.right}},or=function(t,r){return{top:t.top+r.top,left:t.left+r.left,bottom:t.bottom-r.bottom,right:t.right-r.right}},Jo=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},tt={top:0,right:0,bottom:0,left:0},xt=function(t){var r=t.borderBox,n=t.margin,o=n===void 0?tt:n,i=t.border,s=i===void 0?tt:i,c=t.padding,l=c===void 0?tt:c,u=Y(Dt(r,o)),p=Y(or(r,s)),a=Y(or(p,l));return{marginBox:u,borderBox:Y(r),paddingBox:p,contentBox:a,margin:o,border:s,padding:l}},H=function(t){var r=t.slice(0,-2),n=t.slice(-2);if(n!=="px")return 0;var o=Number(r);return isNaN(o)&&Ko(),o},Xo=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Ne=function(t,r){var n=t.borderBox,o=t.border,i=t.margin,s=t.padding,c=Jo(n,r);return xt({borderBox:c,border:o,margin:i,padding:s})},Be=function(t,r){return r===void 0&&(r=Xo()),Ne(t,r)},$r=function(t,r){var n={top:H(r.marginTop),right:H(r.marginRight),bottom:H(r.marginBottom),left:H(r.marginLeft)},o={top:H(r.paddingTop),right:H(r.paddingRight),bottom:H(r.paddingBottom),left:H(r.paddingLeft)},i={top:H(r.borderTopWidth),right:H(r.borderRightWidth),bottom:H(r.borderBottomWidth),left:H(r.borderLeftWidth)};return xt({borderBox:t,margin:n,padding:o,border:i})},kr=function(t){var r=t.getBoundingClientRect(),n=window.getComputedStyle(t);return $r(r,n)},be=function(t){var r=[],n=null,o=function(){for(var s=arguments.length,c=new Array(s),l=0;l{const i=Zo(r,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){n.forEach(i=>{i()})}}const Qo="Invariant failed";class Te extends Error{}Te.prototype.toString=function(){return this.message};function h(e,t){throw new Te(Qo)}class ei extends N.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=J,this.onWindowError=r=>{const n=this.getCallbacks();n.isDragging()&&n.tryAbort(),r.error instanceof Te&&r.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in ");return this.callbacks},this.setCallbacks=r=>{this.callbacks=r}}componentDidMount(){this.unbind=q(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof Te){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const ti=` Press space bar to start a drag. When dragging you can use the arrow keys to move the item around and escape to cancel. Some screen readers may require you to be in focus mode or to use your pass through key `,Le=e=>e+1,ri=e=>` You have lifted an item in position ${Le(e.source.index)} `,Vr=(e,t)=>{const r=e.droppableId===t.droppableId,n=Le(e.index),o=Le(t.index);return r?` You have moved the item from position ${n} to position ${o} `:` You have moved the item from position ${n} in list ${e.droppableId} to list ${t.droppableId} in position ${o} `},Hr=(e,t,r)=>t.droppableId===r.droppableId?` The item ${e} has been combined with ${r.draggableId}`:` The item ${e} in list ${t.droppableId} has been combined with ${r.draggableId} in list ${r.droppableId} `,ni=e=>{const t=e.destination;if(t)return Vr(e.source,t);const r=e.combine;return r?Hr(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},ir=e=>` The item has returned to its starting position of ${Le(e.index)} `,oi=e=>{if(e.reason==="CANCEL")return` Movement cancelled. ${ir(e.source)} `;const t=e.destination,r=e.combine;return t?` You have dropped the item. ${Vr(e.source,t)} `:r?` You have dropped the item. ${Hr(e.draggableId,e.source,r)} `:` The item has been dropped while not over a drop area. ${ir(e.source)} `},Pe={dragHandleUsageInstructions:ti,onDragStart:ri,onDragUpdate:ni,onDragEnd:oi};function ii(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function qr(e,t){if(e.length!==t.length)return!1;for(let r=0;r({inputs:t,result:e()}))[0],n=v.useRef(!0),o=v.useRef(r),s=n.current||!!(t&&o.current.inputs&&qr(t,o.current.inputs))?o.current:{inputs:t,result:e()};return v.useEffect(()=>{n.current=!1,o.current=s},[s]),s.result}function x(e,t){return w(()=>e,t)}const L={x:0,y:0},M=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),W=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),X=(e,t)=>e.x===t.x&&e.y===t.y,ie=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),te=(e,t,r=0)=>e==="x"?{x:t,y:r}:{x:r,y:t},he=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),sr=(e,t)=>Math.min(...t.map(r=>he(e,r))),zr=e=>t=>({x:e(t.x),y:e(t.y)});var si=(e,t)=>{const r=Y({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r};const Se=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),cr=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],ci={top:0,right:0,bottom:0,left:0},li=(e,t)=>t?Se(e,t.scroll.diff.displacement):e,ai=(e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e,ui=(e,t)=>t&&t.shouldClipSubject?si(t.pageMarginBox,e):Y(e);var re=({page:e,withPlaceholder:t,axis:r,frame:n})=>{const o=li(e.marginBox,n),i=ai(o,r,t),s=ui(i,n);return{page:e,withPlaceholder:t,active:s}},It=(e,t)=>{e.frame||h();const r=e.frame,n=W(t,r.scroll.initial),o=ie(n),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}},s=re({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:s}};function T(e,t=qr){let r=null;function n(...o){if(r&&r.lastThis===this&&t(o,r.lastArgs))return r.lastResult;const i=e.apply(this,o);return r={lastResult:i,lastArgs:o,lastThis:this},i}return n.clear=function(){r=null},n}const Yr=T(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),jr=T(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),_e=T(e=>Object.values(e)),di=T(e=>Object.values(e));var se=T((e,t)=>di(t).filter(n=>e===n.descriptor.droppableId).sort((n,o)=>n.descriptor.index-o.descriptor.index));function St(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function We(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var $e=T((e,t)=>t.filter(r=>r.descriptor.id!==e.descriptor.id)),pi=({isMovingForward:e,draggable:t,destination:r,insideDestination:n,previousImpact:o})=>{if(!r.isCombineEnabled||!St(o))return null;function s(f){const g={type:"COMBINE",combine:{draggableId:f,droppableId:r.descriptor.id}};return{...o,at:g}}const c=o.displaced.all,l=c.length?c[0]:null;if(e)return l?s(l):null;const u=$e(t,n);if(!l){if(!u.length)return null;const f=u[u.length-1];return s(f.descriptor.id)}const p=u.findIndex(f=>f.descriptor.id===l);p===-1&&h();const a=p-1;if(a<0)return null;const d=u[a];return s(d.descriptor.id)},ce=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Kr={point:L,value:0},ve={invisible:{},visible:{},all:[]},fi={displaced:ve,displacedBy:Kr,at:null};var z=(e,t)=>r=>e<=r&&r<=t,Jr=e=>{const t=z(e.top,e.bottom),r=z(e.left,e.right);return n=>{if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;const i=t(n.top)||t(n.bottom),s=r(n.left)||r(n.right);if(i&&s)return!0;const l=n.tope.bottom,u=n.lefte.right;return l&&u?!0:l&&s||u&&i}},gi=e=>{const t=z(e.top,e.bottom),r=z(e.left,e.right);return n=>t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right)};const Et={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Xr={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var mi=e=>t=>{const r=z(t.top,t.bottom),n=z(t.left,t.right);return o=>e===Et?r(o.top)&&r(o.bottom):n(o.left)&&n(o.right)};const bi=(e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:L;return Se(e,r)},hi=(e,t,r)=>t.subject.active?r(t.subject.active)(e):!1,vi=(e,t,r)=>r(t)(e),Ct=({target:e,destination:t,viewport:r,withDroppableDisplacement:n,isVisibleThroughFrameFn:o})=>{const i=n?bi(e,t):e;return hi(i,t,o)&&vi(i,r,o)},yi=e=>Ct({...e,isVisibleThroughFrameFn:Jr}),Zr=e=>Ct({...e,isVisibleThroughFrameFn:gi}),Di=e=>Ct({...e,isVisibleThroughFrameFn:mi(e.destination.axis)}),xi=(e,t,r)=>{if(typeof r=="boolean")return r;if(!t)return!0;const{invisible:n,visible:o}=t;if(n[e])return!1;const i=o[e];return i?i.shouldAnimate:!0};function Ii(e,t){const r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Y(Dt(r,n))}function ye({afterDragging:e,destination:t,displacedBy:r,viewport:n,forceShouldAnimate:o,last:i}){return e.reduce(function(c,l){const u=Ii(l,r),p=l.descriptor.id;if(c.all.push(p),!yi({target:u,destination:t,viewport:n,withDroppableDisplacement:!0}))return c.invisible[l.descriptor.id]=!0,c;const d=xi(p,i,o),f={draggableId:p,shouldAnimate:d};return c.visible[p]=f,c},{all:[],visible:{},invisible:{}})}function Si(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function lr({insideDestination:e,inHomeList:t,displacedBy:r,destination:n}){const o=Si(e,{inHomeList:t});return{displaced:ve,displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function Me({draggable:e,insideDestination:t,destination:r,viewport:n,displacedBy:o,last:i,index:s,forceShouldAnimate:c}){const l=ce(e,r);if(s==null)return lr({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const u=t.find(g=>g.descriptor.index===s);if(!u)return lr({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const p=$e(e,t),a=t.indexOf(u),d=p.slice(a);return{displaced:ye({afterDragging:d,destination:r,displacedBy:o,last:i,viewport:n.frame,forceShouldAnimate:c}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function Z(e,t){return!!t.effected[e]}var Ei=({isMovingForward:e,destination:t,draggables:r,combine:n,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=n.draggableId,c=r[i].descriptor.index;return Z(i,o)?e?c:c-1:e?c+1:c},Ci=({isMovingForward:e,isInHomeList:t,insideDestination:r,location:n})=>{if(!r.length)return null;const o=n.index,i=e?o+1:o-1,s=r[0].descriptor.index,c=r[r.length-1].descriptor.index,l=t?c:c+1;return il?null:i},wi=({isMovingForward:e,isInHomeList:t,draggable:r,draggables:n,destination:o,insideDestination:i,previousImpact:s,viewport:c,afterCritical:l})=>{const u=s.at;if(u||h(),u.type==="REORDER"){const a=Ci({isMovingForward:e,isInHomeList:t,location:u.destination,insideDestination:i});return a==null?null:Me({draggable:r,insideDestination:i,destination:o,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:a})}const p=Ei({isMovingForward:e,destination:o,displaced:s.displaced,draggables:n,combine:u.combine,afterCritical:l});return p==null?null:Me({draggable:r,insideDestination:i,destination:o,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:p})},Ai=({displaced:e,afterCritical:t,combineWith:r,displacedBy:n})=>{const o=!!(e.visible[r]||e.invisible[r]);return Z(r,t)?o?L:ie(n.point):o?n.point:L},Ri=({afterCritical:e,impact:t,draggables:r})=>{const n=We(t);n||h();const o=n.draggableId,i=r[o].page.borderBox.center,s=Ai({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return M(i,s)};const Qr=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Pi=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,wt=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,ar=({axis:e,moveRelativeTo:t,isMoving:r})=>te(e.line,t.marginBox[e.end]+Qr(e,r),wt(e,t.marginBox,r)),ur=({axis:e,moveRelativeTo:t,isMoving:r})=>te(e.line,t.marginBox[e.start]-Pi(e,r),wt(e,t.marginBox,r)),Oi=({axis:e,moveInto:t,isMoving:r})=>te(e.line,t.contentBox[e.start]+Qr(e,r),wt(e,t.contentBox,r));var Ni=({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o})=>{const i=se(n.descriptor.id,r),s=t.page,c=n.axis;if(!i.length)return Oi({axis:c,moveInto:n.page,isMoving:s});const{displaced:l,displacedBy:u}=e,p=l.all[0];if(p){const d=r[p];if(Z(p,o))return ur({axis:c,moveRelativeTo:d.page,isMoving:s});const f=Ne(d.page,u.point);return ur({axis:c,moveRelativeTo:f,isMoving:s})}const a=i[i.length-1];if(a.descriptor.id===t.descriptor.id)return s.borderBox.center;if(Z(a.descriptor.id,o)){const d=Ne(a.page,ie(o.displacedBy.point));return ar({axis:c,moveRelativeTo:d,isMoving:s})}return ar({axis:c,moveRelativeTo:a.page,isMoving:s})},pt=(e,t)=>{const r=e.frame;return r?M(t,r.scroll.diff.displacement):t};const Bi=({impact:e,draggable:t,droppable:r,draggables:n,afterCritical:o})=>{const i=t.page.borderBox.center,s=e.at;return!r||!s?i:s.type==="REORDER"?Ni({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o}):Ri({impact:e,draggables:n,afterCritical:o})};var ke=e=>{const t=Bi(e),r=e.droppable;return r?pt(r,t):t},en=(e,t)=>{const r=W(t,e.scroll.initial),n=ie(r);return{frame:Y({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}}};function dr(e,t){return e.map(r=>t[r])}function Ti(e,t){for(let r=0;r{const i=en(t,M(t.scroll.current,o)),s=r.frame?It(r,M(r.frame.scroll.current,o)):r,c=e.displaced,l=ye({afterDragging:dr(c.all,n),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:c,forceShouldAnimate:!1}),u=ye({afterDragging:dr(c.all,n),destination:s,displacedBy:e.displacedBy,viewport:t.frame,last:c,forceShouldAnimate:!1}),p={},a={},d=[c,l,u];return c.all.forEach(g=>{const b=Ti(g,d);if(b){a[g]=b;return}p[g]=!0}),{...e,displaced:{all:c.all,invisible:p,visible:a}}},Mi=(e,t)=>M(e.scroll.diff.displacement,t),At=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const n=Mi(r,e),o=W(n,t.page.borderBox.center);return M(t.client.borderBox.center,o)},tn=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:n,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const s=W(r,e.page.borderBox.center),l={target:Se(e.page.borderBox,s),destination:t,withDroppableDisplacement:o,viewport:n};return i?Di(l):Zr(l)},Gi=({isMovingForward:e,draggable:t,destination:r,draggables:n,previousImpact:o,viewport:i,previousPageBorderBoxCenter:s,previousClientSelection:c,afterCritical:l})=>{if(!r.isEnabled)return null;const u=se(r.descriptor.id,n),p=ce(t,r),a=pi({isMovingForward:e,draggable:t,destination:r,insideDestination:u,previousImpact:o})||wi({isMovingForward:e,isInHomeList:p,draggable:t,draggables:n,destination:r,insideDestination:u,previousImpact:o,viewport:i,afterCritical:l});if(!a)return null;const d=ke({impact:a,draggable:t,droppable:r,draggables:n,afterCritical:l});if(tn({draggable:t,destination:r,newPageBorderBoxCenter:d,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:At({pageBorderBoxCenter:d,draggable:t,viewport:i}),impact:a,scrollJumpRequest:null};const g=W(d,s),b=Li({impact:a,viewport:i,destination:r,draggables:n,maxScrollChange:g});return{clientSelection:c,impact:b,scrollJumpRequest:g}};const G=e=>{const t=e.subject.active;return t||h(),t};var Fi=({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:n,viewport:o})=>{const i=r.subject.active;if(!i)return null;const s=r.axis,c=z(i[s.start],i[s.end]),l=_e(n).filter(p=>p!==r).filter(p=>p.isEnabled).filter(p=>!!p.subject.active).filter(p=>Jr(o.frame)(G(p))).filter(p=>{const a=G(p);return e?i[s.crossAxisEnd]{const a=G(p),d=z(a[s.start],a[s.end]);return c(a[s.start])||c(a[s.end])||d(i[s.start])||d(i[s.end])}).sort((p,a)=>{const d=G(p)[s.crossAxisStart],f=G(a)[s.crossAxisStart];return e?d-f:f-d}).filter((p,a,d)=>G(p)[s.crossAxisStart]===G(d[0])[s.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const u=l.filter(p=>z(G(p)[s.start],G(p)[s.end])(t[s.line]));return u.length===1?u[0]:u.length>1?u.sort((p,a)=>G(p)[s.start]-G(a)[s.start])[0]:l.sort((p,a)=>{const d=sr(t,cr(G(p))),f=sr(t,cr(G(a)));return d!==f?d-f:G(p)[s.start]-G(a)[s.start]})[0]};const pr=(e,t)=>{const r=e.page.borderBox.center;return Z(e.descriptor.id,t)?W(r,t.displacedBy.point):r},_i=(e,t)=>{const r=e.page.borderBox;return Z(e.descriptor.id,t)?Se(r,ie(t.displacedBy.point)):r};var Wi=({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:n,afterCritical:o})=>n.filter(s=>Zr({target:_i(s,o),destination:r,viewport:t.frame,withDroppableDisplacement:!0})).sort((s,c)=>{const l=he(e,pt(r,pr(s,o))),u=he(e,pt(r,pr(c,o)));return l{const n=e.axis;if(e.descriptor.mode==="virtual")return te(n.line,t[n.line]);const o=e.subject.page.contentBox[n.size],l=se(e.descriptor.id,r).reduce((u,p)=>u+p.client.marginBox[n.size],0)+t[n.line]-o;return l<=0?null:te(n.line,l)},rn=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),nn=(e,t,r)=>{const n=e.frame;ce(t,e)&&h(),e.subject.withPlaceholder&&h();const o=Ee(e.axis,t.displaceBy).point,i=$i(e,o,r),s={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n){const p=re({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame});return{...e,subject:p}}const c=i?M(n.scroll.max,i):n.scroll.max,l=rn(n,c),u=re({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:l});return{...e,subject:u,frame:l}},ki=e=>{const t=e.subject.withPlaceholder;t||h();const r=e.frame;if(!r){const s=re({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:s}}const n=t.oldFrameMaxScroll;n||h();const o=rn(r,n),i=re({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var Ui=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:r,draggable:n,draggables:o,destination:i,viewport:s,afterCritical:c})=>{if(!t){if(r.length)return null;const a={displaced:ve,displacedBy:Kr,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},d=ke({impact:a,draggable:n,droppable:i,draggables:o,afterCritical:c}),f=ce(n,i)?i:nn(i,n,o);return tn({draggable:n,destination:f,newPageBorderBoxCenter:d,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?a:null}const l=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],u=(()=>{const a=t.descriptor.index;return t.descriptor.id===n.descriptor.id||l?a:a+1})(),p=Ee(i.axis,n.displaceBy);return Me({draggable:n,insideDestination:r,destination:i,viewport:s,displacedBy:p,last:ve,index:u})},Vi=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:n,draggables:o,droppables:i,viewport:s,afterCritical:c})=>{const l=Fi({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:i,viewport:s});if(!l)return null;const u=se(l.descriptor.id,o),p=Wi({pageBorderBoxCenter:t,viewport:s,destination:l,insideDestination:u,afterCritical:c}),a=Ui({previousPageBorderBoxCenter:t,destination:l,draggable:r,draggables:o,moveRelativeTo:p,insideDestination:u,viewport:s,afterCritical:c});if(!a)return null;const d=ke({impact:a,draggable:r,droppable:l,draggables:o,afterCritical:c});return{clientSelection:At({pageBorderBoxCenter:d,draggable:r,viewport:s}),impact:a,scrollJumpRequest:null}},$=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const Hi=(e,t)=>{const r=$(e);return r?t[r]:null};var qi=({state:e,type:t})=>{const r=Hi(e.impact,e.dimensions.droppables),n=!!r,o=e.dimensions.droppables[e.critical.droppable.id],i=r||o,s=i.axis.direction,c=s==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||s==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(c&&!n)return null;const l=t==="MOVE_DOWN"||t==="MOVE_RIGHT",u=e.dimensions.draggables[e.critical.draggable.id],p=e.current.page.borderBoxCenter,{draggables:a,droppables:d}=e.dimensions;return c?Gi({isMovingForward:l,previousPageBorderBoxCenter:p,draggable:u,destination:i,draggables:a,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Vi({isMovingForward:l,previousPageBorderBoxCenter:p,draggable:u,isOver:i,draggables:a,droppables:d,viewport:e.viewport,afterCritical:e.afterCritical})};function ee(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function on(e){const t=z(e.top,e.bottom),r=z(e.left,e.right);return function(o){return t(o.y)&&r(o.x)}}function zi(e,t){return e.leftt.left&&e.topt.top}function Yi({pageBorderBox:e,draggable:t,candidates:r}){const n=t.page.borderBox.center,o=r.map(i=>{const s=i.axis,c=te(i.axis.line,e.center[s.line],i.page.borderBox.center[s.crossAxisLine]);return{id:i.descriptor.id,distance:he(n,c)}}).sort((i,s)=>s.distance-i.distance);return o[0]?o[0].id:null}function ji({pageBorderBox:e,draggable:t,droppables:r}){const n=_e(r).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!zi(e,i))return!1;if(on(i)(e.center))return!0;const s=o.axis,c=i.center[s.crossAxisLine],l=e[s.crossAxisStart],u=e[s.crossAxisEnd],p=z(i[s.crossAxisStart],i[s.crossAxisEnd]),a=p(l),d=p(u);return!a&&!d?!0:a?lc});return n.length?n.length===1?n[0].descriptor.id:Yi({pageBorderBox:e,draggable:t,candidates:n}):null}const sn=(e,t)=>Y(Se(e,t));var Ki=(e,t)=>{const r=e.frame;return r?sn(t,r.scroll.diff.value):t};function cn({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function Ji({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var Xi=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:n,last:o,viewport:i,afterCritical:s})=>{const c=r.axis,l=Ee(r.axis,t.displaceBy),u=l.value,p=e[c.start],a=e[c.end],f=$e(t,n).find(b=>{const m=b.descriptor.id,y=b.page.borderBox.center[c.line],D=Z(m,s),E=cn({displaced:o,id:m});return D?E?a<=y:p{if(!n.isCombineEnabled)return null;const s=n.axis,c=Ee(n.axis,e.displaceBy),l=c.value,u=t[s.start],p=t[s.end],d=$e(e,o).find(g=>{const b=g.descriptor.id,m=g.page.borderBox,D=m[s.size]/Zi,E=Z(b,i),I=cn({displaced:r.displaced,id:b});return E?I?p>m[s.start]+D&&pm[s.start]-l+D&&um[s.start]+l+D&&pm[s.start]+D&&u{const c=sn(t.page.borderBox,e),l=ji({pageBorderBox:c,draggable:t,droppables:n});if(!l)return fi;const u=n[l],p=se(u.descriptor.id,r),a=Ki(u,c);return Qi({pageBorderBoxWithDroppableScroll:a,draggable:t,previousImpact:o,destination:u,insideDestination:p,afterCritical:s})||Xi({pageBorderBoxWithDroppableScroll:a,draggable:t,destination:u,insideDestination:p,last:o.displaced,viewport:i,afterCritical:s})},Rt=(e,t)=>({...e,[t.descriptor.id]:t});const es=({previousImpact:e,impact:t,droppables:r})=>{const n=$(e),o=$(t);if(!n||n===o)return r;const i=r[n];if(!i.subject.withPlaceholder)return r;const s=ki(i);return Rt(r,s)};var ts=({draggable:e,draggables:t,droppables:r,previousImpact:n,impact:o})=>{const i=es({previousImpact:n,impact:o,droppables:r}),s=$(o);if(!s)return i;const c=r[s];if(ce(e,c)||c.subject.withPlaceholder)return i;const l=nn(c,e,t);return Rt(i,l)},ge=({state:e,clientSelection:t,dimensions:r,viewport:n,impact:o,scrollJumpRequest:i})=>{const s=n||e.viewport,c=r||e.dimensions,l=t||e.current.client.selection,u=W(l,e.initial.client.selection),p={offset:u,selection:l,borderBoxCenter:M(e.initial.client.borderBoxCenter,u)},a={selection:M(p.selection,s.scroll.current),borderBoxCenter:M(p.borderBoxCenter,s.scroll.current),offset:M(p.offset,s.scroll.diff.value)},d={client:p,page:a};if(e.phase==="COLLECTING")return{...e,dimensions:c,viewport:s,current:d};const f=c.draggables[e.critical.draggable.id],g=o||ln({pageOffset:a.offset,draggable:f,draggables:c.draggables,droppables:c.droppables,previousImpact:e.impact,viewport:s,afterCritical:e.afterCritical}),b=ts({draggable:f,impact:g,previousImpact:e.impact,draggables:c.draggables,droppables:c.droppables});return{...e,current:d,dimensions:{draggables:c.draggables,droppables:b},impact:g,viewport:s,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function rs(e,t){return e.map(r=>t[r])}var an=({impact:e,viewport:t,draggables:r,destination:n,forceShouldAnimate:o})=>{const i=e.displaced,s=rs(i.all,r),c=ye({afterDragging:s,destination:n,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:c}},un=({impact:e,draggable:t,droppable:r,draggables:n,viewport:o,afterCritical:i})=>{const s=ke({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i});return At({pageBorderBoxCenter:s,draggable:t,viewport:o})},dn=({state:e,dimensions:t,viewport:r})=>{e.movementMode!=="SNAP"&&h();const n=e.impact,o=r||e.viewport,i=t||e.dimensions,{draggables:s,droppables:c}=i,l=s[e.critical.draggable.id],u=$(n);u||h();const p=c[u],a=an({impact:n,viewport:o,destination:p,draggables:s}),d=un({impact:a,draggable:l,droppable:p,draggables:s,viewport:o,afterCritical:e.afterCritical});return ge({impact:a,clientSelection:d,state:e,dimensions:i,viewport:o})},ns=e=>({index:e.index,droppableId:e.droppableId}),pn=({draggable:e,home:t,draggables:r,viewport:n})=>{const o=Ee(t.axis,e.displaceBy),i=se(t.descriptor.id,r),s=i.indexOf(e);s===-1&&h();const c=i.slice(s+1),l=c.reduce((d,f)=>(d[f.descriptor.id]=!0,d),{}),u={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:l};return{impact:{displaced:ye({afterDragging:c,destination:t,displacedBy:o,last:null,viewport:n.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:ns(e.descriptor)}},afterCritical:u}},os=(e,t)=>({draggables:e.draggables,droppables:Rt(e.droppables,t)}),is=({draggable:e,offset:t,initialWindowScroll:r})=>{const n=Ne(e.client,t),o=Be(n,r);return{...e,placeholder:{...e.placeholder,client:n},client:n,page:o}},ss=e=>{const t=e.frame;return t||h(),t},cs=({additions:e,updatedDroppables:t,viewport:r})=>{const n=r.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,s=t[i],l=ss(s).scroll.diff.value,u=M(n,l);return is({draggable:o,offset:u,initialWindowScroll:r.scroll.initial})})},ls=({state:e,published:t})=>{const r=t.modified.map(y=>{const D=e.dimensions.droppables[y.droppableId];return It(D,y.scroll)}),n={...e.dimensions.droppables,...Yr(r)},o=jr(cs({additions:t.additions,updatedDroppables:n,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(y=>{delete i[y]});const s={droppables:n,draggables:i},c=$(e.impact),l=c?s.droppables[c]:null,u=s.draggables[e.critical.draggable.id],p=s.droppables[e.critical.droppable.id],{impact:a,afterCritical:d}=pn({draggable:u,home:p,draggables:i,viewport:e.viewport}),f=l&&l.isCombineEnabled?e.impact:a,g=ln({pageOffset:e.current.page.offset,draggable:s.draggables[e.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:f,viewport:e.viewport,afterCritical:d}),b={...e,phase:"DRAGGING",impact:g,onLiftImpact:a,dimensions:s,afterCritical:d,forceShouldAnimate:!1};return e.phase==="COLLECTING"?b:{...b,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const ft=e=>e.movementMode==="SNAP",rt=(e,t,r)=>{const n=os(e.dimensions,t);return!ft(e)||r?ge({state:e,dimensions:n}):dn({state:e,dimensions:n})};function nt(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const fr={phase:"IDLE",completed:null,shouldFlush:!1};var as=(e=fr,t)=>{if(t.type==="FLUSH")return{...fr,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&h();const{critical:r,clientSelection:n,viewport:o,dimensions:i,movementMode:s}=t.payload,c=i.draggables[r.draggable.id],l=i.droppables[r.droppable.id],u={selection:n,borderBoxCenter:c.client.borderBox.center,offset:L},p={client:u,page:{selection:M(u.selection,o.scroll.initial),borderBoxCenter:M(u.selection,o.scroll.initial),offset:M(u.selection,o.scroll.diff.value)}},a=_e(i.droppables).every(b=>!b.isFixedOnPage),{impact:d,afterCritical:f}=pn({draggable:c,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:s,dimensions:i,initial:p,current:p,isWindowScrollAllowed:a,impact:d,afterCritical:f,onLiftImpact:d,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&h(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||h(),ls({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;ee(e)||h();const{client:r}=t.payload;return X(r,e.current.client.selection)?e:ge({state:e,clientSelection:r,impact:ft(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return nt(e);ee(e)||h();const{id:r,newScroll:n}=t.payload,o=e.dimensions.droppables[r];if(!o)return e;const i=It(o,n);return rt(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;ee(e)||h();const{id:r,isEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||h(),o.isEnabled===n&&h();const i={...o,isEnabled:n};return rt(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;ee(e)||h();const{id:r,isCombineEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||h(),o.isCombineEnabled===n&&h();const i={...o,isCombineEnabled:n};return rt(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;ee(e)||h(),e.isWindowScrollAllowed||h();const r=t.payload.newScroll;if(X(e.viewport.scroll.current,r))return nt(e);const n=en(e.viewport,r);return ft(e)?dn({state:e,viewport:n}):ge({state:e,viewport:n})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!ee(e))return e;const r=t.payload.maxScroll;if(X(r,e.viewport.scroll.max))return e;const n={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:n}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&h();const r=qi({state:e,type:t.type});return r?ge({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const r=t.payload.reason;return e.phase!=="COLLECTING"&&h(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if(t.type==="DROP_ANIMATE"){const{completed:r,dropDuration:n,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||h(),{phase:"DROP_ANIMATING",completed:r,dropDuration:n,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:r}=t.payload;return{phase:"IDLE",completed:r,shouldFlush:!1}}return e};function A(e,t){return e instanceof Object&&"type"in e&&e.type===t}const us=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),ds=e=>({type:"LIFT",payload:e}),ps=e=>({type:"INITIAL_PUBLISH",payload:e}),fs=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),gs=()=>({type:"COLLECTION_STARTING",payload:null}),ms=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),bs=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),hs=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),fn=e=>({type:"MOVE",payload:e}),vs=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),ys=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),Ds=()=>({type:"MOVE_UP",payload:null}),xs=()=>({type:"MOVE_DOWN",payload:null}),Is=()=>({type:"MOVE_RIGHT",payload:null}),Ss=()=>({type:"MOVE_LEFT",payload:null}),Pt=()=>({type:"FLUSH",payload:null}),Es=e=>({type:"DROP_ANIMATE",payload:e}),Ot=e=>({type:"DROP_COMPLETE",payload:e}),gn=e=>({type:"DROP",payload:e}),Cs=e=>({type:"DROP_PENDING",payload:e}),mn=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var ws=e=>({getState:t,dispatch:r})=>n=>o=>{if(!A(o,"LIFT")){n(o);return}const{id:i,clientSelection:s,movementMode:c}=o.payload,l=t();l.phase==="DROP_ANIMATING"&&r(Ot({completed:l.completed})),t().phase!=="IDLE"&&h(),r(Pt()),r(us({draggableId:i,movementMode:c}));const p={draggableId:i,scrollOptions:{shouldPublishImmediately:c==="SNAP"}},{critical:a,dimensions:d,viewport:f}=e.startPublishing(p);r(ps({critical:a,dimensions:d,clientSelection:s,movementMode:c,viewport:f}))},As=e=>()=>t=>r=>{A(r,"INITIAL_PUBLISH")&&e.dragging(),A(r,"DROP_ANIMATE")&&e.dropping(r.payload.completed.result.reason),(A(r,"FLUSH")||A(r,"DROP_COMPLETE"))&&e.resting(),t(r)};const Nt={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},De={opacity:{drop:0,combining:.7},scale:{drop:.75}},bn={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Q=`${bn.outOfTheWay}s ${Nt.outOfTheWay}`,me={fluid:`opacity ${Q}`,snap:`transform ${Q}, opacity ${Q}`,drop:e=>{const t=`${e}s ${Nt.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Q}`,placeholder:`height ${Q}, width ${Q}, margin ${Q}`},gr=e=>X(e,L)?void 0:`translate(${e.x}px, ${e.y}px)`,gt={moveTo:gr,drop:(e,t)=>{const r=gr(e);if(r)return t?`${r} scale(${De.scale.drop})`:r}},{minDropTime:mt,maxDropTime:hn}=bn,Rs=hn-mt,mr=1500,Ps=.6;var Os=({current:e,destination:t,reason:r})=>{const n=he(e,t);if(n<=0)return mt;if(n>=mr)return hn;const o=n/mr,i=mt+Rs*o,s=r==="CANCEL"?i*Ps:i;return Number(s.toFixed(2))},Ns=({impact:e,draggable:t,dimensions:r,viewport:n,afterCritical:o})=>{const{draggables:i,droppables:s}=r,c=$(e),l=c?s[c]:null,u=s[t.descriptor.droppableId],p=un({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||u,viewport:n});return W(p,t.client.borderBox.center)},Bs=({draggables:e,reason:t,lastImpact:r,home:n,viewport:o,onLiftImpact:i})=>!r.at||t!=="DROP"?{impact:an({draggables:e,impact:i,destination:n,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:r.at.type==="REORDER"?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:ve},didDropInsideDroppable:!0};const Ts=({getState:e,dispatch:t})=>r=>n=>{if(!A(n,"DROP")){r(n);return}const o=e(),i=n.payload.reason;if(o.phase==="COLLECTING"){t(Cs({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&h(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||h();const c=o.critical,l=o.dimensions,u=l.draggables[o.critical.draggable.id],{impact:p,didDropInsideDroppable:a}=Bs({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),d=a?St(p):null,f=a?We(p):null,g={index:c.draggable.index,droppableId:c.droppable.id},b={draggableId:u.descriptor.id,type:u.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:d,combine:f},m=Ns({impact:p,draggable:u,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),y={critical:o.critical,afterCritical:o.afterCritical,result:b,impact:p};if(!(!X(o.current.client.offset,m)||!!b.combine)){t(Ot({completed:y}));return}const E=Os({current:o.current.client.offset,destination:m,reason:i});t(Es({newHomeClientOffset:m,dropDuration:E,completed:y}))};var vn=()=>({x:window.pageXOffset,y:window.pageYOffset});function Ls(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function Ms({onWindowScroll:e}){function t(){e(vn())}const r=be(t),n=Ls(r);let o=J;function i(){return o!==J}function s(){i()&&h(),o=q(window,[n])}function c(){i()||h(),r.cancel(),o(),o=J}return{start:s,stop:c,isActive:i}}const Gs=e=>A(e,"DROP_COMPLETE")||A(e,"DROP_ANIMATE")||A(e,"FLUSH"),Fs=e=>{const t=Ms({onWindowScroll:r=>{e.dispatch(vs({newScroll:r}))}});return r=>n=>{!t.isActive()&&A(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&Gs(n)&&t.stop(),r(n)}};var _s=e=>{let t=!1,r=!1;const n=setTimeout(()=>{r=!0}),o=i=>{t||r||(t=!0,e(i),clearTimeout(n))};return o.wasCalled=()=>t,o},Ws=()=>{const e=[],t=o=>{const i=e.findIndex(c=>c.timerId===o);i===-1&&h();const[s]=e.splice(i,1);s.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),s={timerId:i,callback:o};e.push(s)},flush:()=>{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const $s=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,ks=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,Us=(e,t)=>{if(e===t)return!0;const r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n},de=(e,t)=>{t()},we=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function ot(e,t,r,n){if(!e){r(n(t));return}const o=_s(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}var Vs=(e,t)=>{const r=Ws();let n=null;const o=(a,d)=>{n&&h(),de("onBeforeCapture",()=>{const f=e().onBeforeCapture;f&&f({draggableId:a,mode:d})})},i=(a,d)=>{n&&h(),de("onBeforeDragStart",()=>{const f=e().onBeforeDragStart;f&&f(we(a,d))})},s=(a,d)=>{n&&h();const f=we(a,d);n={mode:d,lastCritical:a,lastLocation:f.source,lastCombine:null},r.add(()=>{de("onDragStart",()=>ot(e().onDragStart,f,t,Pe.onDragStart))})},c=(a,d)=>{const f=St(d),g=We(d);n||h();const b=!Us(a,n.lastCritical);b&&(n.lastCritical=a);const m=!$s(n.lastLocation,f);m&&(n.lastLocation=f);const y=!ks(n.lastCombine,g);if(y&&(n.lastCombine=g),!b&&!m&&!y)return;const D={...we(a,n.mode),combine:g,destination:f};r.add(()=>{de("onDragUpdate",()=>ot(e().onDragUpdate,D,t,Pe.onDragUpdate))})},l=()=>{n||h(),r.flush()},u=a=>{n||h(),n=null,de("onDragEnd",()=>ot(e().onDragEnd,a,t,Pe.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:s,update:c,flush:l,drop:u,abort:()=>{if(!n)return;const a={...we(n.lastCritical,n.mode),combine:null,destination:null,reason:"CANCEL"};u(a)}}},Hs=(e,t)=>{const r=Vs(e,t);return n=>o=>i=>{if(A(i,"BEFORE_INITIAL_CAPTURE")){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(A(i,"INITIAL_PUBLISH")){const c=i.payload.critical;r.beforeStart(c,i.payload.movementMode),o(i),r.start(c,i.payload.movementMode);return}if(A(i,"DROP_COMPLETE")){const c=i.payload.completed.result;r.flush(),o(i),r.drop(c);return}if(o(i),A(i,"FLUSH")){r.abort();return}const s=n.getState();s.phase==="DRAGGING"&&r.update(s.critical,s.impact)}};const qs=e=>t=>r=>{if(!A(r,"DROP_ANIMATION_FINISHED")){t(r);return}const n=e.getState();n.phase!=="DROP_ANIMATING"&&h(),e.dispatch(Ot({completed:n.completed}))},zs=e=>{let t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return o=>i=>{if((A(i,"FLUSH")||A(i,"DROP_COMPLETE")||A(i,"DROP_ANIMATION_FINISHED"))&&n(),o(i),!A(i,"DROP_ANIMATE"))return;const s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(mn())}};r=requestAnimationFrame(()=>{r=null,t=q(window,[s])})}};var Ys=e=>()=>t=>r=>{(A(r,"DROP_COMPLETE")||A(r,"FLUSH")||A(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)},js=e=>{let t=!1;return()=>r=>n=>{if(A(n,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(A(n,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(A(n,"DROP_COMPLETE")){t=!1;const o=n.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const Ks=e=>A(e,"DROP_COMPLETE")||A(e,"DROP_ANIMATE")||A(e,"FLUSH");var Js=e=>t=>r=>n=>{if(Ks(n)){e.stop(),r(n);return}if(A(n,"INITIAL_PUBLISH")){r(n);const o=t.getState();o.phase!=="DRAGGING"&&h(),e.start(o);return}r(n),e.scroll(t.getState())};const Xs=e=>t=>r=>{if(t(r),!A(r,"PUBLISH_WHILE_DRAGGING"))return;const n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(gn({reason:n.reason})))},Zs=Tr;var Qs=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:o,autoScroller:i})=>Br(as,Zs(Kn(As(r),Ys(e),ws(e),Ts,qs,zs,Xs,Js(i),Fs,js(t),Hs(n,o))));const it=()=>({additions:{},removals:{},modified:{}});function ec({registry:e,callbacks:t}){let r=it(),n=null;const o=()=>{n||(t.collectionStarting(),n=requestAnimationFrame(()=>{n=null;const{additions:l,removals:u,modified:p}=r,a=Object.keys(l).map(g=>e.draggable.getById(g).getDimension(L)).sort((g,b)=>g.descriptor.index-b.descriptor.index),d=Object.keys(p).map(g=>{const m=e.droppable.getById(g).callbacks.getScrollWhileDragging();return{droppableId:g,scroll:m}}),f={additions:a,removals:Object.keys(u),modified:d};r=it(),t.publish(f)}))};return{add:l=>{const u=l.descriptor.id;r.additions[u]=l,r.modified[l.descriptor.droppableId]=!0,r.removals[u]&&delete r.removals[u],o()},remove:l=>{const u=l.descriptor;r.removals[u.id]=!0,r.modified[u.droppableId]=!0,r.additions[u.id]&&delete r.additions[u.id],o()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r=it())}}}var yn=({scrollHeight:e,scrollWidth:t,height:r,width:n})=>{const o=W({x:t,y:e},{x:n,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Dn=()=>{const e=document.documentElement;return e||h(),e},xn=()=>{const e=Dn();return yn({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},tc=()=>{const e=vn(),t=xn(),r=e.y,n=e.x,o=Dn(),i=o.clientWidth,s=o.clientHeight,c=n+i,l=r+s;return{frame:Y({top:r,left:n,right:c,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:L,displacement:L}}}},rc=({critical:e,scrollOptions:t,registry:r})=>{const n=tc(),o=n.scroll.current,i=e.droppable,s=r.droppable.getAllByType(i.type).map(p=>p.callbacks.getDimensionAndWatchScroll(o,t)),c=r.draggable.getAllByType(e.draggable.type).map(p=>p.getDimension(o));return{dimensions:{draggables:jr(c),droppables:Yr(s)},critical:e,viewport:n}};function br(e,t,r){return!(r.descriptor.id===t.id||r.descriptor.type!==t.type||e.droppable.getById(r.descriptor.droppableId).descriptor.mode!=="virtual")}var nc=(e,t)=>{let r=null;const n=ec({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(d,f)=>{e.droppable.exists(d)||h(),r&&t.updateDroppableIsEnabled({id:d,isEnabled:f})},i=(d,f)=>{r&&(e.droppable.exists(d)||h(),t.updateDroppableIsCombineEnabled({id:d,isCombineEnabled:f}))},s=(d,f)=>{r&&(e.droppable.exists(d)||h(),t.updateDroppableScroll({id:d,newScroll:f}))},c=(d,f)=>{r&&e.droppable.getById(d).callbacks.scroll(f)},l=()=>{if(!r)return;n.stop();const d=r.critical.droppable;e.droppable.getAllByType(d.type).forEach(f=>f.callbacks.dragStopped()),r.unsubscribe(),r=null},u=d=>{r||h();const f=r.critical.draggable;d.type==="ADDITION"&&br(e,f,d.value)&&n.add(d.value),d.type==="REMOVAL"&&br(e,f,d.value)&&n.remove(d.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:c,updateDroppableScroll:s,startPublishing:d=>{r&&h();const f=e.draggable.getById(d.draggableId),g=e.droppable.getById(f.descriptor.droppableId),b={draggable:f.descriptor,droppable:g.descriptor},m=e.subscribe(u);return r={critical:b,unsubscribe:m},rc({critical:b,registry:e,scrollOptions:d.scrollOptions})},stopPublishing:l}},In=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",oc=e=>{window.scrollBy(e.x,e.y)};const ic=T(e=>_e(e).filter(t=>!(!t.isEnabled||!t.frame))),sc=(e,t)=>ic(t).find(n=>(n.frame||h(),on(n.frame.pageMarginBox)(e)))||null;var cc=({center:e,destination:t,droppables:r})=>{if(t){const o=r[t];return o.frame?o:null}return sc(e,r)};const xe={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var lc=(e,t,r=()=>xe)=>{const n=r(),o=e[t.size]*n.startFromPercentage,i=e[t.size]*n.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},Sn=({startOfRange:e,endOfRange:t,current:r})=>{const n=t-e;return n===0?0:(r-e)/n},Bt=1,ac=(e,t,r=()=>xe)=>{const n=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return n.maxPixelScroll;if(e===t.startScrollingFrom)return Bt;const i=1-Sn({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),s=n.maxPixelScroll*n.ease(i);return Math.ceil(s)},uc=(e,t,r)=>{const n=r(),o=n.durationDampening.accelerateAt,i=n.durationDampening.stopDampeningAt,s=t,c=i,u=Date.now()-s;if(u>=i)return e;if(u{const i=ac(e,t,o);return i===0?0:n?Math.max(uc(i,r,o),Bt):i},vr=({container:e,distanceToEdges:t,dragStartTime:r,axis:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=lc(e,n,i);return t[n.end]{const n=t.height>e.height,o=t.width>e.width;return!o&&!n?r:o&&n?null:{x:o?0:r.x,y:n?0:r.y}};const pc=zr(e=>e===0?0:e);var En=({dragStartTime:e,container:t,subject:r,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s={top:n.y-t.top,right:t.right-n.x,bottom:t.bottom-n.y,left:n.x-t.left},c=vr({container:t,distanceToEdges:s,dragStartTime:e,axis:Et,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=vr({container:t,distanceToEdges:s,dragStartTime:e,axis:Xr,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),u=pc({x:l,y:c});if(X(u,L))return null;const p=dc({container:t,subject:r,proposedScroll:u});return p?X(p,L)?null:p:null};const fc=zr(e=>e===0?0:e>0?1:-1),Tt=(()=>{const e=(t,r)=>t<0?t:t>r?t-r:0;return({current:t,max:r,change:n})=>{const o=M(t,n),i={x:e(o.x,r.x),y:e(o.y,r.y)};return X(i,L)?null:i}})(),Cn=({max:e,current:t,change:r})=>{const n={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=fc(r),i=Tt({max:n,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},Lt=(e,t)=>Cn({current:e.scroll.current,max:e.scroll.max,change:t}),gc=(e,t)=>{if(!Lt(e,t))return null;const r=e.scroll.max,n=e.scroll.current;return Tt({current:n,max:r,change:t})},Mt=(e,t)=>{const r=e.frame;return r?Cn({current:r.scroll.current,max:r.scroll.max,change:t}):!1},mc=(e,t)=>{const r=e.frame;return!r||!Mt(e,t)?null:Tt({current:r.scroll.current,max:r.scroll.max,change:t})};var bc=({viewport:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=En({dragStartTime:n,container:e.frame,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Lt(e,s)?s:null},hc=({droppable:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=e.frame;if(!s)return null;const c=En({dragStartTime:n,container:s.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return c&&Mt(e,c)?c:null},yr=({state:e,dragStartTime:t,shouldUseTimeDampening:r,scrollWindow:n,scrollDroppable:o,getAutoScrollerOptions:i})=>{const s=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const a=e.viewport,d=bc({dragStartTime:t,viewport:a,subject:l,center:s,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(d){n(d);return}}const u=cc({center:s,destination:$(e.impact),droppables:e.dimensions.droppables});if(!u)return;const p=hc({dragStartTime:t,droppable:u,subject:l,center:s,shouldUseTimeDampening:r,getAutoScrollerOptions:i});p&&o(u.descriptor.id,p)},vc=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>xe})=>{const n=be(e),o=be(t);let i=null;const s=u=>{i||h();const{shouldUseTimeDampening:p,dragStartTime:a}=i;yr({state:u,scrollWindow:n,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:p,getAutoScrollerOptions:r})};return{start:u=>{i&&h();const p=Date.now();let a=!1;const d=()=>{a=!0};yr({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:d,scrollDroppable:d,getAutoScrollerOptions:r}),i={dragStartTime:p,shouldUseTimeDampening:a},a&&s(u)},stop:()=>{i&&(n.cancel(),o.cancel(),i=null)},scroll:s}},yc=({move:e,scrollDroppable:t,scrollWindow:r})=>{const n=(c,l)=>{const u=M(c.current.client.selection,l);e({client:u})},o=(c,l)=>{if(!Mt(c,l))return l;const u=mc(c,l);if(!u)return t(c.descriptor.id,l),null;const p=W(l,u);return t(c.descriptor.id,p),W(l,p)},i=(c,l,u)=>{if(!c||!Lt(l,u))return u;const p=gc(l,u);if(!p)return r(u),null;const a=W(u,p);return r(a),W(u,a)};return c=>{const l=c.scrollJumpRequest;if(!l)return;const u=$(c.impact);u||h();const p=o(c.dimensions.droppables[u],l);if(!p)return;const a=c.viewport,d=i(c.isWindowScrollAllowed,a,p);d&&n(c,d)}},Dc=({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{const o=vc({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=yc({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:l=>{if(!(n().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){o.scroll(l);return}l.scrollJumpRequest&&i(l)}},start:o.start,stop:o.stop}};const ne="data-rfd",oe=(()=>{const e=`${ne}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),bt=(()=>{const e=`${ne}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),xc=(()=>{const e=`${ne}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Dr={contextId:`${ne}-scroll-container-context-id`},Ic=e=>t=>`[${t}="${e}"]`,pe=(e,t)=>e.map(r=>{const n=r.styles[t];return n?`${r.selector} { ${n} }`:""}).join(" "),Sc="pointer-events: none;";var Ec=e=>{const t=Ic(e),r=(()=>{const c=` cursor: -webkit-grab; cursor: grab; `;return{selector:t(oe.contextId),styles:{always:` -webkit-touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); touch-action: manipulation; `,resting:c,dragging:Sc,dropAnimating:c}}})(),n=(()=>{const c=` transition: ${me.outOfTheWay}; `;return{selector:t(bt.contextId),styles:{dragging:c,dropAnimating:c,userCancel:c}}})(),o={selector:t(xc.contextId),styles:{always:"overflow-anchor: none;"}},s=[n,r,o,{selector:"body",styles:{dragging:` cursor: grabbing; cursor: -webkit-grabbing; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; overflow-anchor: none; `}}];return{always:pe(s,"always"),resting:pe(s,"resting"),dragging:pe(s,"dragging"),dropAnimating:pe(s,"dropAnimating"),userCancel:pe(s,"userCancel")}};const k=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect,st=()=>{const e=document.querySelector("head");return e||h(),e},xr=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Cc(e,t){const r=w(()=>Ec(e),[e]),n=v.useRef(null),o=v.useRef(null),i=x(T(a=>{const d=o.current;d||h(),d.textContent=a}),[]),s=x(a=>{const d=n.current;d||h(),d.textContent=a},[]);k(()=>{!n.current&&!o.current||h();const a=xr(t),d=xr(t);return n.current=a,o.current=d,a.setAttribute(`${ne}-always`,e),d.setAttribute(`${ne}-dynamic`,e),st().appendChild(a),st().appendChild(d),s(r.always),i(r.resting),()=>{const f=g=>{const b=g.current;b||h(),st().removeChild(b),g.current=null};f(n),f(o)}},[t,s,i,r.always,r.resting,e]);const c=x(()=>i(r.dragging),[i,r.dragging]),l=x(a=>{if(a==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),u=x(()=>{o.current&&i(r.resting)},[i,r.resting]);return w(()=>({dragging:c,dropping:l,resting:u}),[c,l,u])}function wn(e,t){return Array.from(e.querySelectorAll(t))}var An=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Ue(e){return e instanceof An(e).HTMLElement}function wc(e,t){const r=`[${oe.contextId}="${e}"]`,n=wn(document,r);if(!n.length)return null;const o=n.find(i=>i.getAttribute(oe.draggableId)===t);return!o||!Ue(o)?null:o}function Ac(e){const t=v.useRef({}),r=v.useRef(null),n=v.useRef(null),o=v.useRef(!1),i=x(function(d,f){const g={id:d,focus:f};return t.current[d]=g,function(){const m=t.current;m[d]!==g&&delete m[d]}},[]),s=x(function(d){const f=wc(e,d);f&&f!==document.activeElement&&f.focus()},[e]),c=x(function(d,f){r.current===d&&(r.current=f)},[]),l=x(function(){n.current||o.current&&(n.current=requestAnimationFrame(()=>{n.current=null;const d=r.current;d&&s(d)}))},[s]),u=x(function(d){r.current=null;const f=document.activeElement;f&&f.getAttribute(oe.draggableId)===d&&(r.current=d)},[]);return k(()=>(o.current=!0,function(){o.current=!1;const d=n.current;d&&cancelAnimationFrame(d)}),[]),w(()=>({register:i,tryRecordFocus:u,tryRestoreFocusRecorded:l,tryShiftRecord:c}),[i,u,l,c])}function Rc(){const e={draggables:{},droppables:{}},t=[];function r(a){return t.push(a),function(){const f=t.indexOf(a);f!==-1&&t.splice(f,1)}}function n(a){t.length&&t.forEach(d=>d(a))}function o(a){return e.draggables[a]||null}function i(a){const d=o(a);return d||h(),d}const s={register:a=>{e.draggables[a.descriptor.id]=a,n({type:"ADDITION",value:a})},update:(a,d)=>{const f=e.draggables[d.descriptor.id];f&&f.uniqueId===a.uniqueId&&(delete e.draggables[d.descriptor.id],e.draggables[a.descriptor.id]=a)},unregister:a=>{const d=a.descriptor.id,f=o(d);f&&a.uniqueId===f.uniqueId&&(delete e.draggables[d],e.droppables[a.descriptor.droppableId]&&n({type:"REMOVAL",value:a}))},getById:i,findById:o,exists:a=>!!o(a),getAllByType:a=>Object.values(e.draggables).filter(d=>d.descriptor.type===a)};function c(a){return e.droppables[a]||null}function l(a){const d=c(a);return d||h(),d}const u={register:a=>{e.droppables[a.descriptor.id]=a},unregister:a=>{const d=c(a.descriptor.id);d&&a.uniqueId===d.uniqueId&&delete e.droppables[a.descriptor.id]},getById:l,findById:c,exists:a=>!!c(a),getAllByType:a=>Object.values(e.droppables).filter(d=>d.descriptor.type===a)};function p(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:u,subscribe:r,clean:p}}function Pc(){const e=w(Rc,[]);return v.useEffect(()=>function(){e.clean()},[e]),e}var Gt=N.createContext(null),Ge=()=>{const e=document.body;return e||h(),e};const Oc={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Nc=e=>`rfd-announcement-${e}`;function Bc(e){const t=w(()=>Nc(e),[e]),r=v.useRef(null);return v.useEffect(function(){const i=document.createElement("div");return r.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),Or(i.style,Oc),Ge().appendChild(i),function(){setTimeout(function(){const l=Ge();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[t]),x(o=>{const i=r.current;if(i){i.textContent=o;return}},[])}const Tc={separator:"::"};function Ft(e,t=Tc){const r=N.useId();return w(()=>`${e}${t.separator}${r}`,[t.separator,e,r])}function Lc({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Mc({contextId:e,text:t}){const r=Ft("hidden-text",{separator:"-"}),n=w(()=>Lc({contextId:e,uniqueId:r}),[r,e]);return v.useEffect(function(){const i=document.createElement("div");return i.id=n,i.textContent=t,i.style.display="none",Ge().appendChild(i),function(){const c=Ge();c.contains(i)&&c.removeChild(i)}},[n,t]),n}var Ve=N.createContext(null);function Rn(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),t}function Gc(){let e=null;function t(){return!!e}function r(s){return s===e}function n(s){e&&h();const c={abandon:s};return e=c,c}function o(){e||h(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:r,claim:n,release:o,tryAbandon:i}}function Ie(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const Fc=9,_c=13,_t=27,Pn=32,Wc=33,$c=34,kc=35,Uc=36,Vc=37,Hc=38,qc=39,zc=40,Yc={[_c]:!0,[Fc]:!0};var On=e=>{Yc[e.keyCode]&&e.preventDefault()};const He=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(n=>`on${n}`in document)||e})(),Nn=0,Ir=5;function jc(e,t){return Math.abs(t.x-e.x)>=Ir||Math.abs(t.y-e.y)>=Ir}const Sr={type:"IDLE"};function Kc({cancel:e,completed:t,getPhase:r,setPhase:n}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:s,clientY:c}=o;if(i!==Nn)return;const l={x:s,y:c},u=r();if(u.type==="DRAGGING"){o.preventDefault(),u.actions.move(l);return}u.type!=="PENDING"&&h();const p=u.point;if(!jc(p,l))return;o.preventDefault();const a=u.actions.fluidLift(l);n({type:"DRAGGING",actions:a})}},{eventName:"mouseup",fn:o=>{const i=r();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{r().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>{if(r().type==="PENDING"){e();return}if(o.keyCode===_t){o.preventDefault(),e();return}On(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{r().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=r();if(i.type==="IDLE"&&h(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:He,fn:e}]}function Jc(e){const t=v.useRef(Sr),r=v.useRef(J),n=w(()=>({eventName:"mousedown",fn:function(a){if(a.defaultPrevented||a.button!==Nn||a.ctrlKey||a.metaKey||a.shiftKey||a.altKey)return;const d=e.findClosestDraggableId(a);if(!d)return;const f=e.tryGetLock(d,s,{sourceEvent:a});if(!f)return;a.preventDefault();const g={x:a.clientX,y:a.clientY};r.current(),u(f,g)}}),[e]),o=w(()=>({eventName:"webkitmouseforcewillbegin",fn:p=>{if(p.defaultPrevented)return;const a=e.findClosestDraggableId(p);if(!a)return;const d=e.findOptionsForDraggable(a);d&&(d.shouldRespectForcePress||e.canGetLock(a)&&p.preventDefault())}}),[e]),i=x(function(){const a={passive:!1,capture:!0};r.current=q(window,[o,n],a)},[o,n]),s=x(()=>{t.current.type!=="IDLE"&&(t.current=Sr,r.current(),i())},[i]),c=x(()=>{const p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),l=x(function(){const a={capture:!0,passive:!1},d=Kc({cancel:c,completed:s,getPhase:()=>t.current,setPhase:f=>{t.current=f}});r.current=q(window,d,a)},[c,s]),u=x(function(a,d){t.current.type!=="IDLE"&&h(),t.current={type:"PENDING",point:d,actions:a},l()},[l]);k(function(){return i(),function(){r.current()}},[i])}function Xc(){}const Zc={[$c]:!0,[Wc]:!0,[Uc]:!0,[kc]:!0};function Qc(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===_t){o.preventDefault(),r();return}if(o.keyCode===Pn){o.preventDefault(),n();return}if(o.keyCode===zc){o.preventDefault(),e.moveDown();return}if(o.keyCode===Hc){o.preventDefault(),e.moveUp();return}if(o.keyCode===qc){o.preventDefault(),e.moveRight();return}if(o.keyCode===Vc){o.preventDefault(),e.moveLeft();return}if(Zc[o.keyCode]){o.preventDefault();return}On(o)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:He,fn:r}]}function el(e){const t=v.useRef(Xc),r=w(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Pn)return;const s=e.findClosestDraggableId(i);if(!s)return;const c=e.tryGetLock(s,p,{sourceEvent:i});if(!c)return;i.preventDefault();let l=!0;const u=c.snapLift();t.current();function p(){l||h(),l=!1,t.current(),n()}t.current=q(window,Qc(u,p),{capture:!0,passive:!1})}}),[e]),n=x(function(){const i={passive:!1,capture:!0};t.current=q(window,[r],i)},[r]);k(function(){return n(),function(){t.current()}},[n])}const ct={type:"IDLE"},tl=120,rl=.15;function nl({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:r=>{r.preventDefault()}},{eventName:"keydown",fn:r=>{if(t().type!=="DRAGGING"){e();return}r.keyCode===_t&&r.preventDefault(),e()}},{eventName:He,fn:e}]}function ol({cancel:e,completed:t,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:n=>{const o=r();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:s}=n.touches[0],c={x:i,y:s};n.preventDefault(),o.actions.move(c)}},{eventName:"touchend",fn:n=>{const o=r();if(o.type!=="DRAGGING"){e();return}n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:n=>{if(r().type!=="DRAGGING"){e();return}n.preventDefault(),e()}},{eventName:"touchforcechange",fn:n=>{const o=r();o.type==="IDLE"&&h();const i=n.touches[0];if(!i||!(i.force>=rl))return;const c=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){c&&e();return}if(c){if(o.hasMoved){n.preventDefault();return}e();return}n.preventDefault()}},{eventName:He,fn:e}]}function il(e){const t=v.useRef(ct),r=v.useRef(J),n=x(function(){return t.current},[]),o=x(function(f){t.current=f},[]),i=w(()=>({eventName:"touchstart",fn:function(f){if(f.defaultPrevented)return;const g=e.findClosestDraggableId(f);if(!g)return;const b=e.tryGetLock(g,c,{sourceEvent:f});if(!b)return;const m=f.touches[0],{clientX:y,clientY:D}=m,E={x:y,y:D};r.current(),a(b,E)}}),[e]),s=x(function(){const f={capture:!0,passive:!1};r.current=q(window,[i],f)},[i]),c=x(()=>{const d=t.current;d.type!=="IDLE"&&(d.type==="PENDING"&&clearTimeout(d.longPressTimerId),o(ct),r.current(),s())},[s,o]),l=x(()=>{const d=t.current;c(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[c]),u=x(function(){const f={capture:!0,passive:!1},g={cancel:l,completed:c,getPhase:n},b=q(window,ol(g),f),m=q(window,nl(g),f);r.current=function(){b(),m()}},[l,n,c]),p=x(function(){const f=n();f.type!=="PENDING"&&h();const g=f.actions.fluidLift(f.point);o({type:"DRAGGING",actions:g,hasMoved:!1})},[n,o]),a=x(function(f,g){n().type!=="IDLE"&&h();const b=setTimeout(p,tl);o({type:"PENDING",point:g,actions:f,longPressTimerId:b}),u()},[u,n,o,p]);k(function(){return s(),function(){r.current();const g=n();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),o(ct))}},[n,s,o]),k(function(){return q(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const sl=["input","button","textarea","select","option","optgroup","video","audio"];function Bn(e,t){if(t==null)return!1;if(sl.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:Bn(e,t.parentElement)}function cl(e,t){const r=t.target;return Ue(r)?Bn(e,r):!1}var ll=e=>Y(e.getBoundingClientRect()).center;function al(e){return e instanceof An(e).Element}const ul=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(n=>n in Element.prototype)||e})();function Tn(e,t){return e==null?null:e[ul](t)?e:Tn(e.parentElement,t)}function dl(e,t){return e.closest?e.closest(t):Tn(e,t)}function pl(e){return`[${oe.contextId}="${e}"]`}function fl(e,t){const r=t.target;if(!al(r))return null;const n=pl(e),o=dl(r,n);return!o||!Ue(o)?null:o}function gl(e,t){const r=fl(e,t);return r?r.getAttribute(oe.draggableId):null}function ml(e,t){const r=`[${bt.contextId}="${e}"]`,o=wn(document,r).find(i=>i.getAttribute(bt.id)===t);return!o||!Ue(o)?null:o}function bl(e){e.preventDefault()}function Ae({expected:e,phase:t,isLockActive:r,shouldWarn:n}){return!(!r()||e!==t)}function Ln({lockAPI:e,store:t,registry:r,draggableId:n}){if(e.isClaimed())return!1;const o=r.draggable.findById(n);return!(!o||!o.options.isEnabled||!In(t.getState(),n))}function hl({lockAPI:e,contextId:t,store:r,registry:n,draggableId:o,forceSensorStop:i,sourceEvent:s}){if(!Ln({lockAPI:e,store:r,registry:n,draggableId:o}))return null;const l=n.draggable.getById(o),u=ml(t,l.descriptor.id);if(!u||s&&!l.options.canDragInteractiveElements&&cl(u,s))return null;const p=e.claim(i||J);let a="PRE_DRAG";function d(){return l.options.shouldRespectForcePress}function f(){return e.isActive(p)}function g(S,C){Ae({expected:S,phase:a,isLockActive:f,shouldWarn:!0})&&r.dispatch(C())}const b=g.bind(null,"DRAGGING");function m(S){function C(){e.release(),a="COMPLETED"}a!=="PRE_DRAG"&&(C(),h()),r.dispatch(ds(S.liftActionArgs)),a="DRAGGING";function R(P,U={shouldBlockNextClick:!1}){if(S.cleanup(),U.shouldBlockNextClick){const O=q(window,[{eventName:"click",fn:bl,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}C(),r.dispatch(gn({reason:P}))}return{isActive:()=>Ae({expected:"DRAGGING",phase:a,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:d,drop:P=>R("DROP",P),cancel:P=>R("CANCEL",P),...S.actions}}function y(S){const C=be(P=>{b(()=>fn({client:P}))});return{...m({liftActionArgs:{id:o,clientSelection:S,movementMode:"FLUID"},cleanup:()=>C.cancel(),actions:{move:C}}),move:C}}function D(){const S={moveUp:()=>b(Ds),moveRight:()=>b(Is),moveDown:()=>b(xs),moveLeft:()=>b(Ss)};return m({liftActionArgs:{id:o,clientSelection:ll(u),movementMode:"SNAP"},cleanup:J,actions:S})}function E(){Ae({expected:"PRE_DRAG",phase:a,isLockActive:f,shouldWarn:!0})&&e.release()}return{isActive:()=>Ae({expected:"PRE_DRAG",phase:a,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:d,fluidLift:y,snapLift:D,abort:E}}const vl=[Jc,el,il];function yl({contextId:e,store:t,registry:r,customSensors:n,enableDefaultSensors:o}){const i=[...o?vl:[],...n||[]],s=v.useState(()=>Gc())[0],c=x(function(m,y){Ie(m)&&!Ie(y)&&s.tryAbandon()},[s]);k(function(){let m=t.getState();return t.subscribe(()=>{const D=t.getState();c(m,D),m=D})},[s,t,c]),k(()=>s.tryAbandon,[s.tryAbandon]);const l=x(b=>Ln({lockAPI:s,registry:r,store:t,draggableId:b}),[s,r,t]),u=x((b,m,y)=>hl({lockAPI:s,registry:r,contextId:e,store:t,draggableId:b,forceSensorStop:m||null,sourceEvent:y&&y.sourceEvent?y.sourceEvent:null}),[e,s,r,t]),p=x(b=>gl(e,b),[e]),a=x(b=>{const m=r.draggable.findById(b);return m?m.options:null},[r.draggable]),d=x(function(){s.isClaimed()&&(s.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(Pt()))},[s,t]),f=x(()=>s.isClaimed(),[s]),g=w(()=>({canGetLock:l,tryGetLock:u,findClosestDraggableId:p,findOptionsForDraggable:a,tryReleaseLock:d,isLockClaimed:f}),[l,u,p,a,d,f]);for(let b=0;b({onBeforeCapture:t=>{const r=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Nr.flushSync(r)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),xl=e=>({...xe,...e.autoScrollerOptions,durationDampening:{...xe.durationDampening,...e.autoScrollerOptions}});function fe(e){return e.current||h(),e.current}function Il(e){const{contextId:t,setCallbacks:r,sensors:n,nonce:o,dragHandleUsageInstructions:i}=e,s=v.useRef(null),c=Rn(e),l=x(()=>Dl(c.current),[c]),u=x(()=>xl(c.current),[c]),p=Bc(t),a=Mc({contextId:t,text:i}),d=Cc(t,o),f=x(O=>{fe(s).dispatch(O)},[]),g=w(()=>Kt({publishWhileDragging:fs,updateDroppableScroll:ms,updateDroppableIsEnabled:bs,updateDroppableIsCombineEnabled:hs,collectionStarting:gs},f),[f]),b=Pc(),m=w(()=>nc(b,g),[b,g]),y=w(()=>Dc({scrollWindow:oc,scrollDroppable:m.scrollDroppable,getAutoScrollerOptions:u,...Kt({move:fn},f)}),[m.scrollDroppable,f,u]),D=Ac(t),E=w(()=>Qs({announce:p,autoScroller:y,dimensionMarshal:m,focusMarshal:D,getResponders:l,styleMarshal:d}),[p,y,m,D,l,d]);s.current=E;const I=x(()=>{const O=fe(s);O.getState().phase!=="IDLE"&&O.dispatch(Pt())},[]),S=x(()=>{const O=fe(s).getState();return O.phase==="DROP_ANIMATING"?!0:O.phase==="IDLE"?!1:O.isDragging},[]),C=w(()=>({isDragging:S,tryAbort:I}),[S,I]);r(C);const R=x(O=>In(fe(s).getState(),O),[]),P=x(()=>ee(fe(s).getState()),[]),U=w(()=>({marshal:m,focus:D,contextId:t,canLift:R,isMovementAllowed:P,dragHandleUsageInstructionsId:a,registry:b}),[t,m,a,D,R,P,b]);return yl({contextId:t,store:E,registry:b,customSensors:n||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),v.useEffect(()=>I,[I]),N.createElement(Ve.Provider,{value:U},N.createElement(Yo,{context:Gt,store:E},e.children))}function Sl(){return N.useId()}function ua(e){const t=Sl(),r=e.dragHandleUsageInstructions||Pe.dragHandleUsageInstructions;return N.createElement(ei,null,n=>N.createElement(Il,{nonce:e.nonce,contextId:t,setCallbacks:n,dragHandleUsageInstructions:r,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const Er={dragging:5e3,dropAnimating:4500},El=(e,t)=>t?me.drop(t.duration):e?me.snap:me.fluid,Cl=(e,t)=>{if(e)return t?De.opacity.drop:De.opacity.combining},wl=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function Al(e){const r=e.dimension.client,{offset:n,combineWith:o,dropping:i}=e,s=!!o,c=wl(e),l=!!i,u=l?gt.drop(n,s):gt.moveTo(n);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:El(c,i),transform:u,opacity:Cl(s,l),zIndex:l?Er.dropAnimating:Er.dragging,pointerEvents:"none"}}function Rl(e){return{transform:gt.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function Pl(e){return e.type==="DRAGGING"?Al(e):Rl(e)}function Ol(e,t,r=L){const n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=$r(o,n),s=Be(i,r),c={client:i,tagName:t.tagName.toLowerCase(),display:n.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:c,displaceBy:l,client:i,page:s}}function Nl(e){const t=Ft("draggable"),{descriptor:r,registry:n,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:c}=e,l=w(()=>({canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:c}),[i,c,s]),u=x(f=>{const g=o();return g||h(),Ol(r,g,f)},[r,o]),p=w(()=>({uniqueId:t,descriptor:r,options:l,getDimension:u}),[r,u,l,t]),a=v.useRef(p),d=v.useRef(!0);k(()=>(n.draggable.register(a.current),()=>n.draggable.unregister(a.current)),[n.draggable]),k(()=>{if(d.current){d.current=!1;return}const f=a.current;a.current=p,n.draggable.update(p,f)},[p,n.draggable])}var Wt=N.createContext(null);function Fe(e){const t=v.useContext(e);return t||h(),t}function Bl(e){e.preventDefault()}const Tl=e=>{const t=v.useRef(null),r=x((C=null)=>{t.current=C},[]),n=x(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:s}=Fe(Ve),{type:c,droppableId:l}=Fe(Wt),u=w(()=>({id:e.draggableId,index:e.index,type:c,droppableId:l}),[e.draggableId,e.index,c,l]),{children:p,draggableId:a,isEnabled:d,shouldRespectForcePress:f,canDragInteractiveElements:g,isClone:b,mapped:m,dropAnimationFinished:y}=e;if(!b){const C=w(()=>({descriptor:u,registry:s,getDraggableRef:n,canDragInteractiveElements:g,shouldRespectForcePress:f,isEnabled:d}),[u,s,n,g,f,d]);Nl(C)}const D=w(()=>d?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":a,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:Bl}:null,[o,i,a,d]),E=x(C=>{m.type==="DRAGGING"&&m.dropping&&C.propertyName==="transform"&&Nr.flushSync(y)},[y,m]),I=w(()=>{const C=Pl(m),R=m.type==="DRAGGING"&&m.dropping?E:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":a,style:C,onTransitionEnd:R},dragHandleProps:D}},[o,D,a,m,E,r]),S=w(()=>({draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}),[u.droppableId,u.id,u.index,u.type]);return N.createElement(N.Fragment,null,p(I,m.snapshot,S))};var Mn=(e,t)=>e===t,Gn=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};const Ll=e=>e.combine?e.combine.draggableId:null,Ml=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function Gl(){const e=T((o,i)=>({x:o,y:i})),t=T((o,i,s=null,c=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:o,draggingOver:s,combineWith:c,combineTargetFor:null})),r=T((o,i,s,c,l=null,u=null,p=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:u,mode:i,offset:o,dimension:s,forceShouldAnimate:p,snapshot:t(i,c,l,u,null)}}));return(o,i)=>{if(Ie(o)){if(o.critical.draggable.id!==i.draggableId)return null;const s=o.current.client.offset,c=o.dimensions.draggables[i.draggableId],l=$(o.impact),u=Ml(o.impact),p=o.forceShouldAnimate;return r(e(s.x,s.y),o.movementMode,c,i.isClone,l,u,p)}if(o.phase==="DROP_ANIMATING"){const s=o.completed;if(s.result.draggableId!==i.draggableId)return null;const c=i.isClone,l=o.dimensions.draggables[i.draggableId],u=s.result,p=u.mode,a=Gn(u),d=Ll(u),g={duration:o.dropDuration,curve:Nt.drop,moveTo:o.newHomeClientOffset,opacity:d?De.opacity.drop:null,scale:d?De.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:l,dropping:g,draggingOver:a,combineWith:d,mode:p,forceShouldAnimate:null,snapshot:t(p,c,a,d,g)}}}return null}}function Fn(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Fl={mapped:{type:"SECONDARY",offset:L,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Fn(null)}};function _l(){const e=T((s,c)=>({x:s,y:c})),t=T(Fn),r=T((s,c=null,l)=>({mapped:{type:"SECONDARY",offset:s,combineTargetFor:c,shouldAnimateDisplacement:l,snapshot:t(c)}})),n=s=>s?r(L,s,!0):null,o=(s,c,l,u)=>{const p=l.displaced.visible[s],a=!!(u.inVirtualList&&u.effected[s]),d=We(l),f=d&&d.draggableId===s?c:null;if(!p){if(!a)return n(f);if(l.displaced.invisible[s])return null;const m=ie(u.displacedBy.point),y=e(m.x,m.y);return r(y,f,!0)}if(a)return n(f);const g=l.displacedBy.point,b=e(g.x,g.y);return r(b,f,p.shouldAnimate)};return(s,c)=>{if(Ie(s))return s.critical.draggable.id===c.draggableId?null:o(c.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){const l=s.completed;return l.result.draggableId===c.draggableId?null:o(c.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const Wl=()=>{const e=Gl(),t=_l();return(n,o)=>e(n,o)||t(n,o)||Fl},$l={dropAnimationFinished:mn},kl=Wr(Wl,$l,null,{context:Gt,areStatePropsEqual:Mn})(Tl);function _n(e){return Fe(Wt).isUsingCloneFor===e.draggableId&&!e.isClone?null:N.createElement(kl,e)}function da(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,r=!!e.disableInteractiveElementBlocking,n=!!e.shouldRespectForcePress;return N.createElement(_n,Or({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))}const Wn=e=>t=>e===t,Ul=Wn("scroll"),Vl=Wn("auto"),Cr=(e,t)=>t(e.overflowX)||t(e.overflowY),Hl=e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return Cr(r,Ul)||Cr(r,Vl)},ql=()=>!1,$n=e=>e==null?null:e===document.body?ql()?e:null:e===document.documentElement?null:Hl(e)?e:$n(e.parentElement);var ht=e=>({x:e.scrollLeft,y:e.scrollTop});const kn=e=>e?window.getComputedStyle(e).position==="fixed"?!0:kn(e.parentElement):!1;var zl=e=>{const t=$n(e),r=kn(e);return{closestScrollable:t,isFixedOnPage:r}},Yl=({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:o,client:i,page:s,closest:c})=>{const l=(()=>{if(!c)return null;const{scrollSize:d,client:f}=c,g=yn({scrollHeight:d.scrollHeight,scrollWidth:d.scrollWidth,height:f.paddingBox.height,width:f.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:f,scrollSize:d,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:g,diff:{value:L,displacement:L}}}})(),u=o==="vertical"?Et:Xr,p=re({page:s,withPlaceholder:null,axis:u,frame:l});return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:u,isEnabled:t,client:i,page:s,frame:l,subject:p}};const jl=(e,t)=>{const r=kr(e);if(!t||e!==t)return r;const n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,s=o+t.scrollWidth,l=Dt({top:n,right:s,bottom:i,left:o},r.border);return xt({borderBox:l,margin:r.margin,border:r.border,padding:r.padding})};var Kl=({ref:e,descriptor:t,env:r,windowScroll:n,direction:o,isDropDisabled:i,isCombineEnabled:s,shouldClipSubject:c})=>{const l=r.closestScrollable,u=jl(e,l),p=Be(u,n),a=(()=>{if(!l)return null;const f=kr(l),g={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:f,page:Be(f,n),scroll:ht(l),scrollSize:g,shouldClipSubject:c}})();return Yl({descriptor:t,isEnabled:!i,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:o,client:u,page:p,closest:a})};const Jl={passive:!1},Xl={passive:!0};var wr=e=>e.shouldPublishImmediately?Jl:Xl;const Re=e=>e&&e.env.closestScrollable||null;function Zl(e){const t=v.useRef(null),r=Fe(Ve),n=Ft("droppable"),{registry:o,marshal:i}=r,s=Rn(e),c=w(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=v.useRef(c),u=w(()=>T((I,S)=>{t.current||h();const C={x:I,y:S};i.updateDroppableScroll(c.id,C)}),[c.id,i]),p=x(()=>{const I=t.current;return!I||!I.env.closestScrollable?L:ht(I.env.closestScrollable)},[]),a=x(()=>{const I=p();u(I.x,I.y)},[p,u]),d=w(()=>be(a),[a]),f=x(()=>{const I=t.current,S=Re(I);if(I&&S||h(),I.scrollOptions.shouldPublishImmediately){a();return}d()},[d,a]),g=x((I,S)=>{t.current&&h();const C=s.current,R=C.getDroppableRef();R||h();const P=zl(R),U={ref:R,descriptor:c,env:P,scrollOptions:S};t.current=U;const O=Kl({ref:R,descriptor:c,env:P,windowScroll:I,direction:C.direction,isDropDisabled:C.isDropDisabled,isCombineEnabled:C.isCombineEnabled,shouldClipSubject:!C.ignoreContainerClipping}),B=P.closestScrollable;return B&&(B.setAttribute(Dr.contextId,r.contextId),B.addEventListener("scroll",f,wr(U.scrollOptions))),O},[r.contextId,c,f,s]),b=x(()=>{const I=t.current,S=Re(I);return I&&S||h(),ht(S)},[]),m=x(()=>{const I=t.current;I||h();const S=Re(I);t.current=null,S&&(d.cancel(),S.removeAttribute(Dr.contextId),S.removeEventListener("scroll",f,wr(I.scrollOptions)))},[f,d]),y=x(I=>{const S=t.current;S||h();const C=Re(S);C||h(),C.scrollTop+=I.y,C.scrollLeft+=I.x},[]),D=w(()=>({getDimensionAndWatchScroll:g,getScrollWhileDragging:b,dragStopped:m,scroll:y}),[m,g,b,y]),E=w(()=>({uniqueId:n,descriptor:c,callbacks:D}),[D,c,n]);k(()=>(l.current=E.descriptor,o.droppable.register(E),()=>{t.current&&m(),o.droppable.unregister(E)}),[D,c,m,E,i,o.droppable]),k(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),k(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function lt(){}const Ar={width:0,height:0,margin:ci},Ql=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||r==="close"?Ar:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},ea=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const n=Ql({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:r!=="none"?me.placeholder:null}},ta=e=>{const t=v.useRef(null),r=x(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:o,onClose:i,contextId:s}=e,[c,l]=v.useState(e.animate==="open");v.useEffect(()=>c?n!=="open"?(r(),l(!1),lt):t.current?lt:(t.current=setTimeout(()=>{t.current=null,l(!1)}),r):lt,[n,c,r]);const u=x(a=>{a.propertyName==="height"&&(o(),n==="close"&&i())},[n,i,o]),p=ea({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return N.createElement(e.placeholder.tagName,{style:p,"data-rfd-placeholder-context-id":s,onTransitionEnd:u,ref:e.innerRef})};var ra=N.memo(ta);class na extends N.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,r){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const oa=e=>{const t=v.useContext(Ve);t||h();const{contextId:r,isMovementAllowed:n}=t,o=v.useRef(null),i=v.useRef(null),{children:s,droppableId:c,type:l,mode:u,direction:p,ignoreContainerClipping:a,isDropDisabled:d,isCombineEnabled:f,snapshot:g,useClone:b,updateViewportMaxScroll:m,getContainerForClone:y}=e,D=x(()=>o.current,[]),E=x((B=null)=>{o.current=B},[]);x(()=>i.current,[]);const I=x((B=null)=>{i.current=B},[]),S=x(()=>{n()&&m({maxScroll:xn()})},[n,m]);Zl({droppableId:c,type:l,mode:u,direction:p,isDropDisabled:d,isCombineEnabled:f,ignoreContainerClipping:a,getDroppableRef:D});const C=w(()=>N.createElement(na,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:B,data:_,animate:K})=>N.createElement(ra,{placeholder:_,onClose:B,innerRef:I,animate:K,contextId:r,onTransitionEnd:S})),[r,S,e.placeholder,e.shouldAnimatePlaceholder,I]),R=w(()=>({innerRef:E,placeholder:C,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":r}}),[r,c,C,E]),P=b?b.dragging.draggableId:null,U=w(()=>({droppableId:c,type:l,isUsingCloneFor:P}),[c,P,l]);function O(){if(!b)return null;const{dragging:B,render:_}=b,K=N.createElement(_n,{draggableId:B.draggableId,index:B.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(qe,j)=>_(qe,j,B));return qn.createPortal(K,y())}return N.createElement(Wt.Provider,{value:U},s(R,g),O())};function ia(){return document.body||h(),document.body}const Rr={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ia},Un=e=>{let t={...e},r;for(r in Rr)e[r]===void 0&&(t={...t,[r]:Rr[r]});return t},at=(e,t)=>e===t.droppable.type,Pr=(e,t)=>t.draggables[e.draggable.id],sa=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=T(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),n=T((i,s,c,l,u,p)=>{const a=u.descriptor.id;if(u.descriptor.droppableId===i){const g=p?{render:p,dragging:r(u.descriptor)}:null,b={isDraggingOver:c,draggingOverWith:c?a:null,draggingFromThisWith:a,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:b,useClone:g}}if(!s)return t;if(!l)return e;const f={isDraggingOver:c,draggingOverWith:a,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:f,useClone:null}});return(i,s)=>{const c=Un(s),l=c.droppableId,u=c.type,p=!c.isDropDisabled,a=c.renderClone;if(Ie(i)){const d=i.critical;if(!at(u,d))return t;const f=Pr(d,i.dimensions),g=$(i.impact)===l;return n(l,p,g,g,f,a)}if(i.phase==="DROP_ANIMATING"){const d=i.completed;if(!at(u,d.critical))return t;const f=Pr(d.critical,i.dimensions);return n(l,p,Gn(d.result)===l,$(d.impact)===l,f,a)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const d=i.completed;if(!at(u,d.critical))return t;const f=$(d.impact)===l,g=!!(d.impact.at&&d.impact.at.type==="COMBINE"),b=d.critical.droppable.id===l;return f?g?e:t:b?e:t}return t}},ca={updateViewportMaxScroll:ys},pa=Wr(sa,ca,(e,t,r)=>({...Un(r),...e,...t}),{context:Gt,areStatePropsEqual:Mn})(oa);export{pa as C,ua as D,da as P};