import{g as lo,r as Wi,l as A,a as x,b as Hi}from"./analytics-Sn9U7rkE.js";import{R as ki,r as co}from"./vendors-CPAgzkcs.js";function en(e,t){return en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},en(e,t)}function he(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,en(e,t)}var Nt={exports:{}},Bt,zn;function Vi(){if(zn)return Bt;zn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bt=e,Bt}var Lt,Yn;function ji(){if(Yn)return Lt;Yn=1;var e=Vi();function t(){}function n(){}return n.resetWarningCache=t,Lt=function(){function r(a,s,l,c,d,u){if(u!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Lt}var Kn;function qi(){return Kn||(Kn=1,Nt.exports=ji()()),Nt.exports}var zi=qi();const Jn=lo(zi);function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(null,arguments)}function rt(e){return e.charAt(0)==="/"}function Mt(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}function Yi(e,t){t===void 0&&(t="");var n=e&&e.split("/")||[],r=t&&t.split("/")||[],o=e&&rt(e),i=t&&rt(t),a=o||i;if(e&&rt(e)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s;if(r.length){var l=r[r.length-1];s=l==="."||l===".."||l===""}else s=!1;for(var c=0,d=r.length;d>=0;d--){var u=r[d];u==="."?Mt(r,d):u===".."?(Mt(r,d),c++):c&&(Mt(r,d),c--)}if(!a)for(;c--;c)r.unshift("..");a&&r[0]!==""&&(!r[0]||!rt(r[0]))&&r.unshift("");var f=r.join("/");return s&&f.substr(-1)!=="/"&&(f+="/"),f}function Xn(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function st(e,t){if(e===t)return!0;if(e==null||t==null)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(o,i){return st(o,t[i])});if(typeof e=="object"||typeof t=="object"){var n=Xn(e),r=Xn(t);return n!==e||r!==t?st(n,r):Object.keys(Object.assign({},e,t)).every(function(o){return st(e[o],t[o])})}return!1}function Zf(e,t){}var Ki="Invariant failed";function Se(e,t){throw new Error(Ki)}function ke(e){return e.charAt(0)==="/"?e:"/"+e}function Zn(e){return e.charAt(0)==="/"?e.substr(1):e}function Ji(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function uo(e,t){return Ji(e,t)?e.substr(t.length):e}function fo(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function Xi(e){var t=e||"/",n="",r="",o=t.indexOf("#");o!==-1&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return i!==-1&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:n==="?"?"":n,hash:r==="#"?"":r}}function re(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&n!=="?"&&(o+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(o+=r.charAt(0)==="#"?r:"#"+r),o}function ne(e,t,n,r){var o;typeof e=="string"?(o=Xi(e),o.state=t):(o=z({},e),o.pathname===void 0&&(o.pathname=""),o.search?o.search.charAt(0)!=="?"&&(o.search="?"+o.search):o.search="",o.hash?o.hash.charAt(0)!=="#"&&(o.hash="#"+o.hash):o.hash="",t!==void 0&&o.state===void 0&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(i){throw i instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):i}return n&&(o.key=n),r?o.pathname?o.pathname.charAt(0)!=="/"&&(o.pathname=Yi(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function Zi(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&st(e.state,t.state)}function mn(){var e=null;function t(a){return e=a,function(){e===a&&(e=null)}}function n(a,s,l,c){if(e!=null){var d=typeof e=="function"?e(a,s):e;typeof d=="string"?typeof l=="function"?l(d,c):c(!0):c(d!==!1)}else c(!0)}var r=[];function o(a){var s=!0;function l(){s&&a.apply(void 0,arguments)}return r.push(l),function(){s=!1,r=r.filter(function(c){return c!==l})}}function i(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];r.forEach(function(c){return c.apply(void 0,s)})}return{setPrompt:t,confirmTransitionTo:n,appendListener:o,notifyListeners:i}}var po=!!(typeof window<"u"&&window.document&&window.document.createElement);function ho(e,t){t(window.confirm(e))}function Qi(){var e=window.navigator.userAgent;return(e.indexOf("Android 2.")!==-1||e.indexOf("Android 4.0")!==-1)&&e.indexOf("Mobile Safari")!==-1&&e.indexOf("Chrome")===-1&&e.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function ea(){return window.navigator.userAgent.indexOf("Trident")===-1}function ta(){return window.navigator.userAgent.indexOf("Firefox")===-1}function na(e){return e.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var Qn="popstate",er="hashchange";function tr(){try{return window.history.state||{}}catch{return{}}}function ra(e){e===void 0&&(e={}),po||Se();var t=window.history,n=Qi(),r=!ea(),o=e,i=o.forceRefresh,a=i===void 0?!1:i,s=o.getUserConfirmation,l=s===void 0?ho:s,c=o.keyLength,d=c===void 0?6:c,u=e.basename?fo(ke(e.basename)):"";function f(B){var O=B||{},M=O.key,L=O.state,F=window.location,j=F.pathname,J=F.search,Z=F.hash,Q=j+J+Z;return u&&(Q=uo(Q,u)),ne(Q,L,M)}function p(){return Math.random().toString(36).substr(2,d)}var h=mn();function v(B){z(V,B),V.length=t.length,h.notifyListeners(V.location,V.action)}function g(B){na(B)||y(f(B.state))}function m(){y(f(tr()))}var b=!1;function y(B){if(b)b=!1,v();else{var O="POP";h.confirmTransitionTo(B,O,l,function(M){M?v({action:O,location:B}):E(B)})}}function E(B){var O=V.location,M=S.indexOf(O.key);M===-1&&(M=0);var L=S.indexOf(B.key);L===-1&&(L=0);var F=M-L;F&&(b=!0,P(F))}var w=f(tr()),S=[w.key];function I(B){return u+re(B)}function D(B,O){var M="PUSH",L=ne(B,O,p(),V.location);h.confirmTransitionTo(L,M,l,function(F){if(F){var j=I(L),J=L.key,Z=L.state;if(n)if(t.pushState({key:J,state:Z},null,j),a)window.location.href=j;else{var Q=S.indexOf(V.location.key),ve=S.slice(0,Q+1);ve.push(L.key),S=ve,v({action:M,location:L})}else window.location.href=j}})}function $(B,O){var M="REPLACE",L=ne(B,O,p(),V.location);h.confirmTransitionTo(L,M,l,function(F){if(F){var j=I(L),J=L.key,Z=L.state;if(n)if(t.replaceState({key:J,state:Z},null,j),a)window.location.replace(j);else{var Q=S.indexOf(V.location.key);Q!==-1&&(S[Q]=L.key),v({action:M,location:L})}else window.location.replace(j)}})}function P(B){t.go(B)}function T(){P(-1)}function N(){P(1)}var U=0;function k(B){U+=B,U===1&&B===1?(window.addEventListener(Qn,g),r&&window.addEventListener(er,m)):U===0&&(window.removeEventListener(Qn,g),r&&window.removeEventListener(er,m))}var _=!1;function fe(B){B===void 0&&(B=!1);var O=h.setPrompt(B);return _||(k(1),_=!0),function(){return _&&(_=!1,k(-1)),O()}}function se(B){var O=h.appendListener(B);return k(1),function(){k(-1),O()}}var V={length:t.length,action:"POP",location:w,createHref:I,push:D,replace:$,go:P,goBack:T,goForward:N,block:fe,listen:se};return V}var nr="hashchange",oa={hashbang:{encodePath:function(t){return t.charAt(0)==="!"?t:"!/"+Zn(t)},decodePath:function(t){return t.charAt(0)==="!"?t.substr(1):t}},noslash:{encodePath:Zn,decodePath:ke},slash:{encodePath:ke,decodePath:ke}};function go(e){var t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function Ge(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.substring(t+1)}function ia(e){window.location.hash=e}function $t(e){window.location.replace(go(window.location.href)+"#"+e)}function aa(e){e===void 0&&(e={}),po||Se();var t=window.history;ta();var n=e,r=n.getUserConfirmation,o=r===void 0?ho:r,i=n.hashType,a=i===void 0?"slash":i,s=e.basename?fo(ke(e.basename)):"",l=oa[a],c=l.encodePath,d=l.decodePath;function u(){var O=d(Ge());return s&&(O=uo(O,s)),ne(O)}var f=mn();function p(O){z(B,O),B.length=t.length,f.notifyListeners(B.location,B.action)}var h=!1,v=null;function g(O,M){return O.pathname===M.pathname&&O.search===M.search&&O.hash===M.hash}function m(){var O=Ge(),M=c(O);if(O!==M)$t(M);else{var L=u(),F=B.location;if(!h&&g(F,L)||v===re(L))return;v=null,b(L)}}function b(O){if(h)h=!1,p();else{var M="POP";f.confirmTransitionTo(O,M,o,function(L){L?p({action:M,location:O}):y(O)})}}function y(O){var M=B.location,L=I.lastIndexOf(re(M));L===-1&&(L=0);var F=I.lastIndexOf(re(O));F===-1&&(F=0);var j=L-F;j&&(h=!0,T(j))}var E=Ge(),w=c(E);E!==w&&$t(w);var S=u(),I=[re(S)];function D(O){var M=document.querySelector("base"),L="";return M&&M.getAttribute("href")&&(L=go(window.location.href)),L+"#"+c(s+re(O))}function $(O,M){var L="PUSH",F=ne(O,void 0,void 0,B.location);f.confirmTransitionTo(F,L,o,function(j){if(j){var J=re(F),Z=c(s+J),Q=Ge()!==Z;if(Q){v=J,ia(Z);var ve=I.lastIndexOf(re(B.location)),we=I.slice(0,ve+1);we.push(J),I=we,p({action:L,location:F})}else p()}})}function P(O,M){var L="REPLACE",F=ne(O,void 0,void 0,B.location);f.confirmTransitionTo(F,L,o,function(j){if(j){var J=re(F),Z=c(s+J),Q=Ge()!==Z;Q&&(v=J,$t(Z));var ve=I.indexOf(re(B.location));ve!==-1&&(I[ve]=J),p({action:L,location:F})}})}function T(O){t.go(O)}function N(){T(-1)}function U(){T(1)}var k=0;function _(O){k+=O,k===1&&O===1?window.addEventListener(nr,m):k===0&&window.removeEventListener(nr,m)}var fe=!1;function se(O){O===void 0&&(O=!1);var M=f.setPrompt(O);return fe||(_(1),fe=!0),function(){return fe&&(fe=!1,_(-1)),M()}}function V(O){var M=f.appendListener(O);return _(1),function(){_(-1),M()}}var B={length:t.length,action:"POP",location:S,createHref:D,push:$,replace:P,go:T,goBack:N,goForward:U,block:se,listen:V};return B}function rr(e,t,n){return Math.min(Math.max(e,t),n)}function sa(e){e===void 0&&(e={});var t=e,n=t.getUserConfirmation,r=t.initialEntries,o=r===void 0?["/"]:r,i=t.initialIndex,a=i===void 0?0:i,s=t.keyLength,l=s===void 0?6:s,c=mn();function d(D){z(I,D),I.length=I.entries.length,c.notifyListeners(I.location,I.action)}function u(){return Math.random().toString(36).substr(2,l)}var f=rr(a,0,o.length-1),p=o.map(function(D){return typeof D=="string"?ne(D,void 0,u()):ne(D,void 0,D.key||u())}),h=re;function v(D,$){var P="PUSH",T=ne(D,$,u(),I.location);c.confirmTransitionTo(T,P,n,function(N){if(N){var U=I.index,k=U+1,_=I.entries.slice(0);_.length>k?_.splice(k,_.length-k,T):_.push(T),d({action:P,location:T,index:k,entries:_})}})}function g(D,$){var P="REPLACE",T=ne(D,$,u(),I.location);c.confirmTransitionTo(T,P,n,function(N){N&&(I.entries[I.index]=T,d({action:P,location:T}))})}function m(D){var $=rr(I.index+D,0,I.entries.length-1),P="POP",T=I.entries[$];c.confirmTransitionTo(T,P,n,function(N){N?d({action:P,location:T,index:$}):d()})}function b(){m(-1)}function y(){m(1)}function E(D){var $=I.index+D;return $>=0&&$<I.entries.length}function w(D){return D===void 0&&(D=!1),c.setPrompt(D)}function S(D){return c.appendListener(D)}var I={length:p.length,action:"POP",location:p[f],index:f,entries:p,createHref:h,push:v,replace:g,go:m,goBack:b,goForward:y,canGo:E,block:w,listen:S};return I}var De={exports:{}},_t,or;function la(){return or||(or=1,_t=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}),_t}var ir;function ca(){if(ir)return De.exports;ir=1;var e=la();De.exports=g,De.exports.parse=n,De.exports.compile=o,De.exports.tokensToFunction=s,De.exports.tokensToRegExp=v;var t=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function n(m,b){for(var y=[],E=0,w=0,S="",I=b&&b.delimiter||"/",D;(D=t.exec(m))!=null;){var $=D[0],P=D[1],T=D.index;if(S+=m.slice(w,T),w=T+$.length,P){S+=P[1];continue}var N=m[w],U=D[2],k=D[3],_=D[4],fe=D[5],se=D[6],V=D[7];S&&(y.push(S),S="");var B=U!=null&&N!=null&&N!==U,O=se==="+"||se==="*",M=se==="?"||se==="*",L=U||I,F=_||fe,j=U||(typeof y[y.length-1]=="string"?y[y.length-1]:"");y.push({name:k||E++,prefix:U||"",delimiter:L,optional:M,repeat:O,partial:B,asterisk:!!V,pattern:F?c(F):V?".*":r(L,j)})}return w<m.length&&(S+=m.substr(w)),S&&y.push(S),y}function r(m,b){return!b||b.indexOf(m)>-1?"[^"+l(m)+"]+?":l(b)+"|(?:(?!"+l(b)+")[^"+l(m)+"])+?"}function o(m,b){return s(n(m,b),b)}function i(m){return encodeURI(m).replace(/[\/?#]/g,function(b){return"%"+b.charCodeAt(0).toString(16).toUpperCase()})}function a(m){return encodeURI(m).replace(/[?#]/g,function(b){return"%"+b.charCodeAt(0).toString(16).toUpperCase()})}function s(m,b){for(var y=new Array(m.length),E=0;E<m.length;E++)typeof m[E]=="object"&&(y[E]=new RegExp("^(?:"+m[E].pattern+")$",u(b)));return function(w,S){for(var I="",D=w||{},$=S||{},P=$.pretty?i:encodeURIComponent,T=0;T<m.length;T++){var N=m[T];if(typeof N=="string"){I+=N;continue}var U=D[N.name],k;if(U==null)if(N.optional){N.partial&&(I+=N.prefix);continue}else throw new TypeError('Expected "'+N.name+'" to be defined');if(e(U)){if(!N.repeat)throw new TypeError('Expected "'+N.name+'" to not repeat, but received `'+JSON.stringify(U)+"`");if(U.length===0){if(N.optional)continue;throw new TypeError('Expected "'+N.name+'" to not be empty')}for(var _=0;_<U.length;_++){if(k=P(U[_]),!y[T].test(k))throw new TypeError('Expected all "'+N.name+'" to match "'+N.pattern+'", but received `'+JSON.stringify(k)+"`");I+=(_===0?N.prefix:N.delimiter)+k}continue}if(k=N.asterisk?a(U):P(U),!y[T].test(k))throw new TypeError('Expected "'+N.name+'" to match "'+N.pattern+'", but received "'+k+'"');I+=N.prefix+k}return I}}function l(m){return m.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(m){return m.replace(/([=!:$\/()])/g,"\\$1")}function d(m,b){return m.keys=b,m}function u(m){return m&&m.sensitive?"":"i"}function f(m,b){var y=m.source.match(/\((?!\?)/g);if(y)for(var E=0;E<y.length;E++)b.push({name:E,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return d(m,b)}function p(m,b,y){for(var E=[],w=0;w<m.length;w++)E.push(g(m[w],b,y).source);var S=new RegExp("(?:"+E.join("|")+")",u(y));return d(S,b)}function h(m,b,y){return v(n(m,y),b,y)}function v(m,b,y){e(b)||(y=b||y,b=[]),y=y||{};for(var E=y.strict,w=y.end!==!1,S="",I=0;I<m.length;I++){var D=m[I];if(typeof D=="string")S+=l(D);else{var $=l(D.prefix),P="(?:"+D.pattern+")";b.push(D),D.repeat&&(P+="(?:"+$+P+")*"),D.optional?D.partial?P=$+"("+P+")?":P="(?:"+$+"("+P+"))?":P=$+"("+P+")",S+=P}}var T=l(y.delimiter||"/"),N=S.slice(-T.length)===T;return E||(S=(N?S.slice(0,-T.length):S)+"(?:"+T+"(?=$))?"),w?S+="$":S+=E&&N?"":"(?="+T+"|$)",d(new RegExp("^"+S,u(y)),b)}function g(m,b,y){return e(b)||(y=b||y,b=[]),y=y||{},m instanceof RegExp?f(m,b):e(m)?p(m,b,y):h(m,b,y)}return De.exports}var ua=ca();const mo=lo(ua);var Qf=Wi();function yt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ft=1073741823,ar=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function da(){var e="__global_unique_id__";return ar[e]=(ar[e]||0)+1}function fa(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function pa(e){var t=[];return{on:function(r){t.push(r)},off:function(r){t=t.filter(function(o){return o!==r})},get:function(){return e},set:function(r,o){e=r,t.forEach(function(i){return i(e,o)})}}}function ha(e){return Array.isArray(e)?e[0]:e}function ga(e,t){var n,r,o="__create-react-context-"+da()+"__",i=function(s){he(l,s);function l(){for(var d,u=arguments.length,f=new Array(u),p=0;p<u;p++)f[p]=arguments[p];return d=s.call.apply(s,[this].concat(f))||this,d.emitter=pa(d.props.value),d}var c=l.prototype;return c.getChildContext=function(){var u;return u={},u[o]=this.emitter,u},c.componentWillReceiveProps=function(u){if(this.props.value!==u.value){var f=this.props.value,p=u.value,h;fa(f,p)?h=0:(h=typeof t=="function"?t(f,p):Ft,h|=0,h!==0&&this.emitter.set(u.value,h))}},c.render=function(){return this.props.children},l}(A.Component);i.childContextTypes=(n={},n[o]=Jn.object.isRequired,n);var a=function(s){he(l,s);function l(){for(var d,u=arguments.length,f=new Array(u),p=0;p<u;p++)f[p]=arguments[p];return d=s.call.apply(s,[this].concat(f))||this,d.observedBits=void 0,d.state={value:d.getValue()},d.onUpdate=function(h,v){var g=d.observedBits|0;(g&v)!==0&&d.setState({value:d.getValue()})},d}var c=l.prototype;return c.componentWillReceiveProps=function(u){var f=u.observedBits;this.observedBits=f??Ft},c.componentDidMount=function(){this.context[o]&&this.context[o].on(this.onUpdate);var u=this.props.observedBits;this.observedBits=u??Ft},c.componentWillUnmount=function(){this.context[o]&&this.context[o].off(this.onUpdate)},c.getValue=function(){return this.context[o]?this.context[o].get():e},c.render=function(){return ha(this.props.children)(this.state.value)},l}(A.Component);return a.contextTypes=(r={},r[o]=Jn.object,r),{Provider:i,Consumer:a}}var ma=A.createContext||ga,vo=function(t){var n=ma();return n.displayName=t,n},bo=vo("Router-History"),ge=vo("Router"),xt=function(e){he(t,e),t.computeRootMatch=function(o){return{path:"/",url:"/",params:{},isExact:o==="/"}};function t(r){var o;return o=e.call(this,r)||this,o.state={location:r.history.location},o._isMounted=!1,o._pendingLocation=null,r.staticContext||(o.unlisten=r.history.listen(function(i){o._pendingLocation=i})),o}var n=t.prototype;return n.componentDidMount=function(){var o=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(i){o._isMounted&&o.setState({location:i})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return A.createElement(ge.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},A.createElement(bo.Provider,{children:this.props.children||null,value:this.props.history}))},t}(A.Component),ep=function(e){he(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.history=sa(r.props),r}var n=t.prototype;return n.render=function(){return A.createElement(xt,{history:this.history,children:this.props.children})},t}(A.Component),va=function(e){he(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(o){this.props.onUpdate&&this.props.onUpdate.call(this,this,o)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(A.Component),Gt={},ba=1e4,sr=0;function ya(e){if(Gt[e])return Gt[e];var t=mo.compile(e);return sr<ba&&(Gt[e]=t,sr++),t}function lr(e,t){return e===void 0&&(e="/"),t===void 0&&(t={}),e==="/"?e:ya(e)(t,{pretty:!0})}function tp(e){var t=e.computedMatch,n=e.to,r=e.push,o=r===void 0?!1:r;return A.createElement(ge.Consumer,null,function(i){i||Se();var a=i.history,s=i.staticContext,l=o?a.push:a.replace,c=ne(t?typeof n=="string"?lr(n,t.params):z({},n,{pathname:lr(n.pathname,t.params)}):n);return s?(l(c),null):A.createElement(va,{onMount:function(){l(c)},onUpdate:function(u,f){var p=ne(f.to);Zi(p,z({},c,{key:p.key}))||l(c)},to:n})})}var cr={},xa=1e4,ur=0;function Ea(e,t){var n=""+t.end+t.strict+t.sensitive,r=cr[n]||(cr[n]={});if(r[e])return r[e];var o=[],i=mo(e,o,t),a={regexp:i,keys:o};return ur<xa&&(r[e]=a,ur++),a}function Et(e,t){t===void 0&&(t={}),(typeof t=="string"||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=o===void 0?!1:o,a=n.strict,s=a===void 0?!1:a,l=n.sensitive,c=l===void 0?!1:l,d=[].concat(r);return d.reduce(function(u,f){if(!f&&f!=="")return null;if(u)return u;var p=Ea(f,{end:i,strict:s,sensitive:c}),h=p.regexp,v=p.keys,g=h.exec(e);if(!g)return null;var m=g[0],b=g.slice(1),y=e===m;return i&&!y?null:{path:f,url:f==="/"&&m===""?"/":m,isExact:y,params:v.reduce(function(E,w,S){return E[w.name]=b[S],E},{})}},null)}function Sa(e){return A.Children.count(e)===0}var np=function(e){he(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.render=function(){var o=this;return A.createElement(ge.Consumer,null,function(i){i||Se();var a=o.props.location||i.location,s=o.props.computedMatch?o.props.computedMatch:o.props.path?Et(a.pathname,o.props):i.match,l=z({},i,{location:a,match:s}),c=o.props,d=c.children,u=c.component,f=c.render;return Array.isArray(d)&&Sa(d)&&(d=null),A.createElement(ge.Provider,{value:l},l.match?d?typeof d=="function"?d(l):d:u?A.createElement(u,l):f?f(l):null:typeof d=="function"?d(l):null)})},t}(A.Component);function vn(e){return e.charAt(0)==="/"?e:"/"+e}function Ca(e,t){return e?z({},t,{pathname:vn(e)+t.pathname}):t}function wa(e,t){if(!e)return t;var n=vn(e);return t.pathname.indexOf(n)!==0?t:z({},t,{pathname:t.pathname.substr(n.length)})}function dr(e){return typeof e=="string"?e:re(e)}function Ut(e){return function(){Se()}}function fr(){}A.Component;var rp=function(e){he(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.render=function(){var o=this;return A.createElement(ge.Consumer,null,function(i){i||Se();var a=o.props.location||i.location,s,l;return A.Children.forEach(o.props.children,function(c){if(l==null&&A.isValidElement(c)){s=c;var d=c.props.path||c.props.from;l=d?Et(a.pathname,z({},c.props,{path:d})):i.match}}),l?A.cloneElement(s,{location:a,computedMatch:l}):null})},t}(A.Component),St=A.useContext;function Da(){return St(bo)}function Ia(){return St(ge).location}function op(){var e=St(ge).match;return e?e.params:{}}function ip(e){var t=Ia(),n=St(ge).match;return e?Et(t.pathname,e):n}var ap=function(e){he(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.history=ra(r.props),r}var n=t.prototype;return n.render=function(){return A.createElement(xt,{history:this.history,children:this.props.children})},t}(A.Component);A.Component;var tn=function(t,n){return typeof t=="function"?t(n):t},nn=function(t,n){return typeof t=="string"?ne(t,null,null,n):t},bn=function(t){return t},Ae=A.forwardRef;typeof Ae>"u"&&(Ae=bn);function Pa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Ra=Ae(function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=yt(e,["innerRef","navigate","onClick"]),a=i.target,s=z({},i,{onClick:function(c){try{o&&o(c)}catch(d){throw c.preventDefault(),d}!c.defaultPrevented&&c.button===0&&(!a||a==="_self")&&!Pa(c)&&(c.preventDefault(),r())}});return bn!==Ae?s.ref=t||n:s.ref=n,A.createElement("a",s)}),Aa=Ae(function(e,t){var n=e.component,r=n===void 0?Ra:n,o=e.replace,i=e.to,a=e.innerRef,s=yt(e,["component","replace","to","innerRef"]);return A.createElement(ge.Consumer,null,function(l){l||Se();var c=l.history,d=nn(tn(i,l.location),l.location),u=d?c.createHref(d):"",f=z({},s,{href:u,navigate:function(){var h=tn(i,l.location),v=re(l.location)===re(nn(h)),g=o||v?c.replace:c.push;g(h)}});return bn!==Ae?f.ref=t||a:f.innerRef=a,A.createElement(r,f)})}),yo=function(t){return t},ct=A.forwardRef;typeof ct>"u"&&(ct=yo);function Oa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(r){return r}).join(" ")}var sp=ct(function(e,t){var n=e["aria-current"],r=n===void 0?"page":n,o=e.activeClassName,i=o===void 0?"active":o,a=e.activeStyle,s=e.className,l=e.exact,c=e.isActive,d=e.location,u=e.sensitive,f=e.strict,p=e.style,h=e.to,v=e.innerRef,g=yt(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return A.createElement(ge.Consumer,null,function(m){m||Se();var b=d||m.location,y=nn(tn(h,b),b),E=y.pathname,w=E&&E.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),S=w?Et(b.pathname,{path:w,exact:l,sensitive:u,strict:f}):null,I=!!(c?c(S,b):S),D=typeof s=="function"?s(I):s,$=typeof p=="function"?p(I):p;I&&(D=Oa(D,i),$=z({},$,a));var P=z({"aria-current":I&&r||null,className:D,style:$,to:y},g);return yo!==ct?P.ref=t||v:P.innerRef=v,A.createElement(Aa,P)})});/**
* @remix-run/router v1.23.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function rn(){return rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rn.apply(this,arguments)}var ut;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ut||(ut={}));function q(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pr(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function et(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var hr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(hr||(hr={}));function Ta(e,t,n){return n===void 0&&(n="/"),Na(e,t,n)}function Na(e,t,n,r){let o=typeof t=="string"?et(t):t,i=xn(o.pathname||"/",n);if(i==null)return null;let a=xo(e);Ba(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let c=ja(i);s=Ha(a[l],c)}return s}function xo(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,a,s)=>{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(q(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=be([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(q(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),xo(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Ua(c,i.index),routesMeta:d})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of Eo(i.path))o(i,a,l)}),t}function Eo(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=Eo(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ba(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Wa(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const La=/^:[\w-]+$/,Ma=3,$a=2,_a=1,Fa=10,Ga=-2,gr=e=>e==="*";function Ua(e,t){let n=e.split("/"),r=n.length;return n.some(gr)&&(r+=Ga),t&&(r+=$a),n.filter(o=>!gr(o)).reduce((o,i)=>o+(La.test(i)?Ma:i===""?_a:Fa),r)}function Wa(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Ha(e,t,n){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s<r.length;++s){let l=r[s],c=s===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",u=ka({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),f=l.route;if(!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:be([i,u.pathname]),pathnameBase:Ja(be([i,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(i=be([i,u.pathnameBase]))}return a}function ka(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Va(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((c,d,u)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let v=s[u]||"";a=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const h=s[u];return p&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function Va(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),yn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function ja(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return yn(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function xn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const qa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,za=e=>qa.test(e);function Ya(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?et(e):e,i;if(n)if(za(n))i=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),yn(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?i=mr(n.substring(1),"/"):i=mr(n,t)}else i=t;return{pathname:i,search:Xa(r),hash:Za(o)}}function mr(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Wt(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Ka(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function En(e,t){let n=Ka(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Sn(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=et(e):(o=rn({},e),q(!o.pathname||!o.pathname.includes("?"),Wt("?","pathname","search",o)),q(!o.pathname||!o.pathname.includes("#"),Wt("#","pathname","hash",o)),q(!o.search||!o.search.includes("#"),Wt("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let u=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),u-=1;o.pathname=f.join("/")}s=u>=0?t[u]:"/"}let l=Ya(o,s),c=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const be=e=>e.join("/").replace(/\/\/+/g,"/"),Ja=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Xa=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Za=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Qa(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const So=["post","put","patch","delete"];new Set(So);const es=["get",...So];new Set(es);/**
* React Router v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe.apply(this,arguments)}const Cn=x.createContext(null),ts=x.createContext(null),Ce=x.createContext(null),Ct=x.createContext(null),me=x.createContext({outlet:null,matches:[],isDataRoute:!1}),Co=x.createContext(null);function ns(e,t){let{relative:n}=t===void 0?{}:t;Be()||q(!1);let{basename:r,navigator:o}=x.useContext(Ce),{hash:i,pathname:a,search:s}=Do(e,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:be([r,a])),o.createHref({pathname:l,search:s,hash:i})}function Be(){return x.useContext(Ct)!=null}function Le(){return Be()||q(!1),x.useContext(Ct).location}function wo(e){x.useContext(Ce).static||x.useLayoutEffect(e)}function wn(){let{isDataRoute:e}=x.useContext(me);return e?vs():rs()}function rs(){Be()||q(!1);let e=x.useContext(Cn),{basename:t,future:n,navigator:r}=x.useContext(Ce),{matches:o}=x.useContext(me),{pathname:i}=Le(),a=JSON.stringify(En(o,n.v7_relativeSplatPath)),s=x.useRef(!1);return wo(()=>{s.current=!0}),x.useCallback(function(c,d){if(d===void 0&&(d={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let u=Sn(c,JSON.parse(a),i,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:be([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,a,i,e])}const os=x.createContext(null);function is(e){let t=x.useContext(me).outlet;return t&&x.createElement(os.Provider,{value:e},t)}function lp(){let{matches:e}=x.useContext(me),t=e[e.length-1];return t?t.params:{}}function Do(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Ce),{matches:o}=x.useContext(me),{pathname:i}=Le(),a=JSON.stringify(En(o,r.v7_relativeSplatPath));return x.useMemo(()=>Sn(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function as(e,t){return ss(e,t)}function ss(e,t,n,r){Be()||q(!1);let{navigator:o}=x.useContext(Ce),{matches:i}=x.useContext(me),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=Le(),d;if(t){var u;let g=typeof t=="string"?et(t):t;l==="/"||(u=g.pathname)!=null&&u.startsWith(l)||q(!1),d=g}else d=c;let f=d.pathname||"/",p=f;if(l!=="/"){let g=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let h=Ta(e,{pathname:p}),v=fs(h&&h.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:be([l,o.encodeLocation?o.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:be([l,o.encodeLocation?o.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,n,r);return t&&v?x.createElement(Ct.Provider,{value:{location:qe({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ut.Pop}},v):v}function ls(){let e=ms(),t=Qa(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:o},n):null,null)}const cs=x.createElement(ls,null);class us extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(me.Provider,{value:this.props.routeContext},x.createElement(Co.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ds(e){let{routeContext:t,match:n,children:r}=e,o=x.useContext(Cn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(me.Provider,{value:t},r)}function fs(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let d=a.findIndex(u=>u.route.id&&s?.[u.route.id]!==void 0);d>=0||q(!1),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let u=a[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=d),u.route.id){let{loaderData:f,errors:p}=n,h=u.route.loader&&f[u.route.id]===void 0&&(!p||p[u.route.id]===void 0);if(u.route.lazy||h){l=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((d,u,f)=>{let p,h=!1,v=null,g=null;n&&(p=s&&u.route.id?s[u.route.id]:void 0,v=u.route.errorElement||cs,l&&(c<0&&f===0?(bs("route-fallback"),h=!0,g=null):c===f&&(h=!0,g=u.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,f+1)),b=()=>{let y;return p?y=v:h?y=g:u.route.Component?y=x.createElement(u.route.Component,null):u.route.element?y=u.route.element:y=d,x.createElement(ds,{match:u,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:y})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?x.createElement(us,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}var Io=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Io||{}),Po=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Po||{});function ps(e){let t=x.useContext(Cn);return t||q(!1),t}function hs(e){let t=x.useContext(ts);return t||q(!1),t}function gs(e){let t=x.useContext(me);return t||q(!1),t}function Ro(e){let t=gs(),n=t.matches[t.matches.length-1];return n.route.id||q(!1),n.route.id}function ms(){var e;let t=x.useContext(Co),n=hs(),r=Ro();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function vs(){let{router:e}=ps(Io.UseNavigateStable),t=Ro(Po.UseNavigateStable),n=x.useRef(!1);return wo(()=>{n.current=!0}),x.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,qe({fromRouteId:t},i)))},[e,t])}const vr={};function bs(e,t,n){vr[e]||(vr[e]=!0)}function cp(e){let{to:t,replace:n,state:r,relative:o}=e;Be()||q(!1);let{future:i,static:a}=x.useContext(Ce),{matches:s}=x.useContext(me),{pathname:l}=Le(),c=wn(),d=Sn(t,En(s,i.v7_relativeSplatPath),l,o==="path"),u=JSON.stringify(d);return x.useEffect(()=>c(JSON.parse(u),{replace:n,state:r,relative:o}),[c,u,o,n,r]),null}function up(e){return is(e.context)}function Ao(e){q(!1)}function ys(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ut.Pop,navigator:i,static:a=!1,future:s}=e;Be()&&q(!1);let l=t.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:l,navigator:i,static:a,future:qe({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);typeof r=="string"&&(r=et(r));let{pathname:d="/",search:u="",hash:f="",state:p=null,key:h="default"}=r,v=x.useMemo(()=>{let g=xn(d,l);return g==null?null:{location:{pathname:g,search:u,hash:f,state:p,key:h},navigationType:o}},[l,d,u,f,p,h,o]);return v==null?null:x.createElement(Ce.Provider,{value:c},x.createElement(Ct.Provider,{children:n,value:v}))}function xs(e){let{children:t,location:n}=e;return as(on(t),n)}new Promise(()=>{});function on(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,o)=>{if(!x.isValidElement(r))return;let i=[...t,o];if(r.type===x.Fragment){n.push.apply(n,on(r.props.children,i));return}r.type!==Ao&&q(!1),!r.props.index||!r.props.children||q(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=on(r.props.children,i)),n.push(a)}),n}/**
* React Router DOM v5 Compat v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function an(){return an=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},an.apply(this,arguments)}function Es(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ss(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Cs(e,t){return e.button===0&&(!t||t==="_self")&&!Ss(e)}function sn(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function ws(e,t){let n=sn(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const Ds=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Is="6";try{window.__reactRouterVersion=Is}catch{}const Ps=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Rs=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dp=x.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:d,viewTransition:u}=t,f=Es(t,Ds),{basename:p}=x.useContext(Ce),h,v=!1;if(typeof c=="string"&&Rs.test(c)&&(h=c,Ps))try{let y=new URL(window.location.href),E=c.startsWith("//")?new URL(y.protocol+c):new URL(c),w=xn(E.pathname,p);E.origin===y.origin&&w!=null?c=w+E.search+E.hash:v=!0}catch{}let g=ns(c,{relative:o}),m=As(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:o,viewTransition:u});function b(y){r&&r(y),y.defaultPrevented||m(y)}return x.createElement("a",an({},f,{href:h||g,onClick:v||i?r:b,ref:n,target:l}))});var br;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(br||(br={}));var yr;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(yr||(yr={}));function As(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=t===void 0?{}:t,l=wn(),c=Le(),d=Do(e,{relative:a});return x.useCallback(u=>{if(Cs(u,n)){u.preventDefault();let f=r!==void 0?r:pr(c)===pr(d);l(e,{replace:f,state:o,preventScrollReset:i,relative:a,viewTransition:s})}},[c,l,d,r,o,n,e,i,a,s])}function fp(e){let t=x.useRef(sn(e)),n=x.useRef(!1),r=Le(),o=x.useMemo(()=>ws(r.search,n.current?null:t.current),[r.search]),i=wn(),a=x.useCallback((s,l)=>{const c=sn(typeof s=="function"?s(o):s);n.current=!0,i("?"+c,l)},[i,o]);return[o,a]}const Os=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ts=Os?x.useLayoutEffect:()=>{};function pp(e){let{children:t}=e,n=Da(),[r,o]=x.useState(()=>({location:n.location,action:n.action}));return Ts(()=>{n.listen((i,a)=>o({location:i,action:a}))},[n]),x.createElement(ys,{navigationType:r.action,location:r.location,navigator:n},x.createElement(xs,null,x.createElement(Ao,{path:"*",element:t})))}function te(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 Ns=typeof Symbol=="function"&&Symbol.observable||"@@observable",xr=Ns,Er=()=>Math.random().toString(36).substring(7).split("").join("."),Bs={INIT:`@@redux/INIT${Er()}`,REPLACE:`@@redux/REPLACE${Er()}`},Sr=Bs;function Ls(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 Oo(e,t,n){if(typeof e!="function")throw new Error(te(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(te(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(te(1));return n(Oo)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((g,m)=>{a.set(m,g)}))}function d(){if(l)throw new Error(te(3));return o}function u(g){if(typeof g!="function")throw new Error(te(4));if(l)throw new Error(te(5));let m=!0;c();const b=s++;return a.set(b,g),function(){if(m){if(l)throw new Error(te(6));m=!1,c(),a.delete(b),i=null}}}function f(g){if(!Ls(g))throw new Error(te(7));if(typeof g.type>"u")throw new Error(te(8));if(typeof g.type!="string")throw new Error(te(17));if(l)throw new Error(te(9));try{l=!0,o=r(o,g)}finally{l=!1}return(i=a).forEach(b=>{b()}),g}function p(g){if(typeof g!="function")throw new Error(te(10));r=g,f({type:Sr.REPLACE})}function h(){const g=u;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(te(11));function b(){const E=m;E.next&&E.next(d())}return b(),{unsubscribe:g(b)}},[xr](){return this}}}return f({type:Sr.INIT}),{dispatch:f,subscribe:u,getState:d,replaceReducer:p,[xr]:h}}function Cr(e,t){return function(...n){return t(e.apply(this,n))}}function wr(e,t){if(typeof e=="function")return Cr(e,t);if(typeof e!="object"||e===null)throw new Error(te(16));const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=Cr(o,t))}return n}function To(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Ms(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(te(15))};const a={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},s=e.map(l=>l(a));return i=To(...s)(o.dispatch),{...o,dispatch:i}}}var Ht={exports:{}},kt={};/**
* @license React
* use-sync-external-store-with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Dr;function $s(){if(Dr)return kt;Dr=1;var e=Hi();function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;return kt.useSyncExternalStoreWithSelector=function(l,c,d,u,f){var p=o(null);if(p.current===null){var h={hasValue:!1,value:null};p.current=h}else h=p.current;p=a(function(){function g(w){if(!m){if(m=!0,b=w,w=u(w),f!==void 0&&h.hasValue){var S=h.value;if(f(S,w))return y=S}return y=w}if(S=y,n(b,w))return S;var I=u(w);return f!==void 0&&f(S,I)?S:(b=w,y=I)}var m=!1,b,y,E=d===void 0?null:d;return[function(){return g(c())},E===null?void 0:function(){return g(E())}]},[c,d,u,f]);var v=r(l,p[0],p[1]);return i(function(){h.hasValue=!0,h.value=v},[v]),s(v),v},kt}var Ir;function _s(){return Ir||(Ir=1,Ht.exports=$s()),Ht.exports}_s();var W=A,Pr=Symbol.for("react-redux-context"),Rr=typeof globalThis<"u"?globalThis:{};function Fs(){if(!W.createContext)return{};const e=Rr[Pr]??(Rr[Pr]=new Map);let t=e.get(W.createContext);return t||(t=W.createContext(null),e.set(W.createContext,t)),t}var No=Fs(),Gs=()=>{throw new Error("uSES not initialized!")},Us=Symbol.for("react.element"),Ws=Symbol.for("react.portal"),Hs=Symbol.for("react.fragment"),ks=Symbol.for("react.strict_mode"),Vs=Symbol.for("react.profiler"),js=Symbol.for("react.provider"),qs=Symbol.for("react.context"),zs=Symbol.for("react.server_context"),Bo=Symbol.for("react.forward_ref"),Ys=Symbol.for("react.suspense"),Ks=Symbol.for("react.suspense_list"),Dn=Symbol.for("react.memo"),Js=Symbol.for("react.lazy"),Xs=Bo,Zs=Dn;function Qs(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case Us:{const n=e.type;switch(n){case Hs:case Vs:case ks:case Ys:case Ks:return n;default:{const r=n&&n.$$typeof;switch(r){case zs:case qs:case Bo:case Js:case Dn:case js:return r;default:return t}}}}case Ws:return t}}}function el(e){return Qs(e)===Dn}function tl(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s=!1,l,c,d,u,f;function p(b,y){return l=b,c=y,d=e(l,c),u=t(r,c),f=n(d,u,c),s=!0,f}function h(){return d=e(l,c),t.dependsOnOwnProps&&(u=t(r,c)),f=n(d,u,c),f}function v(){return e.dependsOnOwnProps&&(d=e(l,c)),t.dependsOnOwnProps&&(u=t(r,c)),f=n(d,u,c),f}function g(){const b=e(l,c),y=!a(b,d);return d=b,y&&(f=n(d,u,c)),f}function m(b,y){const E=!i(y,c),w=!o(b,l,y,c);return l=b,c=y,E&&w?h():E?v():w?g():f}return function(y,E){return s?m(y,E):p(y,E)}}function nl(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),a=n(e,o),s=r(e,o);return tl(i,a,s,e,o)}function rl(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function ln(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Ar(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Lo(e,t){return function(r,{displayName:o}){const i=function(s,l){return i.dependsOnOwnProps?i.mapToProps(s,l):i.mapToProps(s,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(s,l){i.mapToProps=e,i.dependsOnOwnProps=Ar(e);let c=i(s,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=Ar(c),c=i(s,l)),c},i}}function In(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function ol(e){return e&&typeof e=="object"?ln(t=>rl(e,t)):e?typeof e=="function"?Lo(e):In(e,"mapDispatchToProps"):ln(t=>({dispatch:t}))}function il(e){return e?typeof e=="function"?Lo(e):In(e,"mapStateToProps"):ln(()=>({}))}function al(e,t,n){return{...n,...e,...t}}function sl(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,a;return function(l,c,d){const u=e(l,c,d);return i?o(u,a)||(a=u):(i=!0,a=u),a}}}function ll(e){return e?typeof e=="function"?sl(e):In(e,"mergeProps"):()=>al}function cl(e){e()}function ul(){let e=null,t=null;return{clear(){e=null,t=null},notify(){cl(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Or={notify(){},get:()=>[]};function Mo(e,t){let n,r=Or,o=0,i=!1;function a(v){d();const g=r.subscribe(v);let m=!1;return()=>{m||(m=!0,g(),u())}}function s(){r.notify()}function l(){h.onStateChange&&h.onStateChange()}function c(){return i}function d(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=ul())}function u(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Or)}function f(){i||(i=!0,d())}function p(){i&&(i=!1,u())}const h={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return h}var dl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fl=typeof navigator<"u"&&navigator.product==="ReactNative",dt=dl||fl?W.useLayoutEffect:W.useEffect;function Tr(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Vt(e,t){if(Tr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Tr(e[n[o]],t[n[o]]))return!1;return!0}var pl={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},hl={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},gl={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ml={[Xs]:gl,[Zs]:$o};function Nr(e){return el(e)?$o:ml[e.$$typeof]||pl}var vl=Object.defineProperty,bl=Object.getOwnPropertyNames,Br=Object.getOwnPropertySymbols,yl=Object.getOwnPropertyDescriptor,xl=Object.getPrototypeOf,Lr=Object.prototype;function cn(e,t){if(typeof t!="string"){if(Lr){const i=xl(t);i&&i!==Lr&&cn(e,i)}let n=bl(t);Br&&(n=n.concat(Br(t)));const r=Nr(e),o=Nr(t);for(let i=0;i<n.length;++i){const a=n[i];if(!hl[a]&&!(o&&o[a])&&!(r&&r[a])){const s=yl(t,a);try{vl(e,a,s)}catch{}}}}return e}var _o=Gs,El=e=>{_o=e},Sl=[null,null];function Cl(e,t,n){dt(()=>e(...t),n)}function wl(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Dl(e,t,n,r,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,f=null;const p=()=>{if(u||!s.current)return;const v=t.getState();let g,m;try{g=r(v,o.current)}catch(b){m=b,f=b}m||(f=null),g===i.current?a.current||c():(i.current=g,l.current=g,a.current=!0,d())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function Il(e,t){return e===t}function Pl(e,t,n,{pure:r,areStatesEqual:o=Il,areOwnPropsEqual:i=Vt,areStatePropsEqual:a=Vt,areMergedPropsEqual:s=Vt,forwardRef:l=!1,context:c=No}={}){const d=c,u=il(e),f=ol(t),p=ll(n),h=!!e;return g=>{const m=g.displayName||g.name||"Component",b=`Connect(${m})`,y={shouldHandleStateChanges:h,displayName:b,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:u,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function E(I){const[D,$,P]=W.useMemo(()=>{const{reactReduxForwardedRef:le,...Fe}=I;return[I.context,le,Fe]},[I]),T=W.useMemo(()=>{let le=d;return D?.Consumer,le},[D,d]),N=W.useContext(T),U=!!I.store&&!!I.store.getState&&!!I.store.dispatch,k=!!N&&!!N.store,_=U?I.store:N.store,fe=k?N.getServerState:_.getState,se=W.useMemo(()=>nl(_.dispatch,y),[_]),[V,B]=W.useMemo(()=>{if(!h)return Sl;const le=Mo(_,U?void 0:N.subscription),Fe=le.notifyNestedSubs.bind(le);return[le,Fe]},[_,U,N]),O=W.useMemo(()=>U?N:{...N,subscription:V},[U,N,V]),M=W.useRef(void 0),L=W.useRef(P),F=W.useRef(void 0),j=W.useRef(!1),J=W.useRef(!1),Z=W.useRef(void 0);dt(()=>(J.current=!0,()=>{J.current=!1}),[]);const Q=W.useMemo(()=>()=>F.current&&P===L.current?F.current:se(_.getState(),P),[_,P]),ve=W.useMemo(()=>Fe=>V?Dl(h,_,V,se,L,M,j,J,F,B,Fe):()=>{},[V]);Cl(wl,[L,M,j,P,F,B]);let we;try{we=_o(ve,Q,fe?()=>se(fe(),P):Q)}catch(le){throw Z.current&&(le.message+=`
The error may be correlated with this previous error:
${Z.current.stack}
`),le}dt(()=>{Z.current=void 0,F.current=void 0,M.current=we});const Tt=W.useMemo(()=>W.createElement(g,{...we,ref:$}),[$,g,we]);return W.useMemo(()=>h?W.createElement(T.Provider,{value:O},Tt):Tt,[T,Tt,O])}const S=W.memo(E);if(S.WrappedComponent=g,S.displayName=E.displayName=b,l){const D=W.forwardRef(function(P,T){return W.createElement(S,{...P,reactReduxForwardedRef:T})});return D.displayName=b,D.WrappedComponent=g,cn(D,g)}return cn(S,g)}}var Fo=Pl;function Rl({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const a=W.useMemo(()=>{const c=Mo(e);return{store:e,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,r,o,i]),s=W.useMemo(()=>e.getState(),[e]);dt(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=t||No;return W.createElement(l.Provider,{value:a},n)}var Al=Rl;El(x.useSyncExternalStore);function Ol(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Go(e,t){var n=x.useState(function(){return{inputs:t,result:e()}})[0],r=x.useRef(!0),o=x.useRef(n),i=r.current||!!(t&&o.current.inputs&&Ol(t,o.current.inputs)),a=i?o.current:{inputs:t,result:e()};return x.useEffect(function(){r.current=!1,o.current=a},[a]),a.result}function Tl(e,t){return Go(function(){return e},t)}var G=Go,R=Tl,Nl="Invariant failed";function Bl(e,t){throw new Error(Nl)}var pe=function(t){var n=t.top,r=t.right,o=t.bottom,i=t.left,a=r-i,s=o-n,l={top:n,right:r,bottom:o,left:i,width:a,height:s,x:i,y:n,center:{x:(r+i)/2,y:(o+n)/2}};return l},Pn=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},Mr=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Ll=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},jt={top:0,right:0,bottom:0,left:0},Rn=function(t){var n=t.borderBox,r=t.margin,o=r===void 0?jt:r,i=t.border,a=i===void 0?jt:i,s=t.padding,l=s===void 0?jt:s,c=pe(Pn(n,o)),d=pe(Mr(n,a)),u=pe(Mr(d,l));return{marginBox:c,borderBox:pe(n),paddingBox:d,contentBox:u,margin:o,border:a,padding:l}},ce=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var o=Number(n);return isNaN(o)&&Bl(),o},Ml=function(){return{x:window.pageXOffset,y:window.pageYOffset}},ft=function(t,n){var r=t.borderBox,o=t.border,i=t.margin,a=t.padding,s=Ll(r,n);return Rn({borderBox:s,border:o,margin:i,padding:a})},pt=function(t,n){return n===void 0&&(n=Ml()),ft(t,n)},Uo=function(t,n){var r={top:ce(n.marginTop),right:ce(n.marginRight),bottom:ce(n.marginBottom),left:ce(n.marginLeft)},o={top:ce(n.paddingTop),right:ce(n.paddingRight),bottom:ce(n.paddingBottom),left:ce(n.paddingLeft)},i={top:ce(n.borderTopWidth),right:ce(n.borderRightWidth),bottom:ce(n.borderBottomWidth),left:ce(n.borderLeftWidth)};return Rn({borderBox:t,margin:r,padding:o,border:i})},Wo=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return Uo(n,r)},$r=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function $l(e,t){return!!(e===t||$r(e)&&$r(t))}function _l(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!$l(e[n],t[n]))return!1;return!0}function Y(e,t){t===void 0&&(t=_l);var n=null;function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}var ze=function(t){var n=[],r=null,o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return o.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},o};function Ho(e,t){}Ho.bind(null,"warn");Ho.bind(null,"error");function ye(){}function Fl(e,t){return{...e,...t}}function ue(e,t,n){const r=t.map(o=>{const i=Fl(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){r.forEach(i=>{i()})}}const Gl="Invariant failed";class ht extends Error{}ht.prototype.toString=function(){return this.message};function C(e,t){throw new ht(Gl)}class Ul extends A.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=ye,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof ht&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=ue(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof ht){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Wl=`
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
`,gt=e=>e+1,Hl=e=>`
You have lifted an item in position ${gt(e.source.index)}
`,ko=(e,t)=>{const n=e.droppableId===t.droppableId,r=gt(e.index),o=gt(t.index);return n?`
You have moved the item from position ${r}
to position ${o}
`:`
You have moved the item from position ${r}
in list ${e.droppableId}
to list ${t.droppableId}
in position ${o}
`},Vo=(e,t,n)=>t.droppableId===n.droppableId?`
The item ${e}
has been combined with ${n.draggableId}`:`
The item ${e}
in list ${t.droppableId}
has been combined with ${n.draggableId}
in list ${n.droppableId}
`,kl=e=>{const t=e.destination;if(t)return ko(e.source,t);const n=e.combine;return n?Vo(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},_r=e=>`
The item has returned to its starting position
of ${gt(e.index)}
`,Vl=e=>{if(e.reason==="CANCEL")return`
Movement cancelled.
${_r(e.source)}
`;const t=e.destination,n=e.combine;return t?`
You have dropped the item.
${ko(e.source,t)}
`:n?`
You have dropped the item.
${Vo(e.draggableId,e.source,n)}
`:`
The item has been dropped while not over a drop area.
${_r(e.source)}
`},lt={dragHandleUsageInstructions:Wl,onDragStart:Hl,onDragUpdate:kl,onDragEnd:Vl},K={x:0,y:0},X=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),oe=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),xe=(e,t)=>e.x===t.x&&e.y===t.y,Me=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Re=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},Ye=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Fr=(e,t)=>Math.min(...t.map(n=>Ye(e,n))),jo=e=>t=>({x:e(t.x),y:e(t.y)});var jl=(e,t)=>{const n=pe({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 n.width<=0||n.height<=0?null:n};const tt=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Gr=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}],ql={top:0,right:0,bottom:0,left:0},zl=(e,t)=>t?tt(e,t.scroll.diff.displacement):e,Yl=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,Kl=(e,t)=>t&&t.shouldClipSubject?jl(t.pageMarginBox,e):pe(e);var Oe=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=zl(e.marginBox,r),i=Yl(o,n,t),a=Kl(i,r);return{page:e,withPlaceholder:t,active:a}},An=(e,t)=>{e.frame||C();const n=e.frame,r=oe(t,n.scroll.initial),o=Me(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=Oe({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};const qo=Y(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),zo=Y(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),wt=Y(e=>Object.values(e)),Jl=Y(e=>Object.values(e));var $e=Y((e,t)=>Jl(t).filter(r=>e===r.descriptor.droppableId).sort((r,o)=>r.descriptor.index-o.descriptor.index));function On(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Dt(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var It=Y((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),Xl=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled||!On(o))return null;function a(p){const h={type:"COMBINE",combine:{draggableId:p,droppableId:n.descriptor.id}};return{...o,at:h}}const s=o.displaced.all,l=s.length?s[0]:null;if(e)return l?a(l):null;const c=It(t,r);if(!l){if(!c.length)return null;const p=c[c.length-1];return a(p.descriptor.id)}const d=c.findIndex(p=>p.descriptor.id===l);d===-1&&C();const u=d-1;if(u<0)return null;const f=c[u];return a(f.descriptor.id)},_e=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Yo={point:K,value:0},Ke={invisible:{},visible:{},all:[]},Zl={displaced:Ke,displacedBy:Yo,at:null};var de=(e,t)=>n=>e<=n&&n<=t,Ko=e=>{const t=de(e.top,e.bottom),n=de(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const i=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(i&&a)return!0;const l=r.top<e.top&&r.bottom>e.bottom,c=r.left<e.left&&r.right>e.right;return l&&c?!0:l&&a||c&&i}},Ql=e=>{const t=de(e.top,e.bottom),n=de(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const Tn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Jo={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var ec=e=>t=>{const n=de(t.top,t.bottom),r=de(t.left,t.right);return o=>e===Tn?n(o.top)&&n(o.bottom):r(o.left)&&r(o.right)};const tc=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:K;return tt(e,n)},nc=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,rc=(e,t,n)=>n(t)(e),Nn=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?tc(e,t):e;return nc(i,t,o)&&rc(i,n,o)},oc=e=>Nn({...e,isVisibleThroughFrameFn:Ko}),Xo=e=>Nn({...e,isVisibleThroughFrameFn:Ql}),ic=e=>Nn({...e,isVisibleThroughFrameFn:ec(e.destination.axis)}),ac=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return i?i.shouldAnimate:!0};function sc(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return pe(Pn(n,r))}function Je({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(s,l){const c=sc(l,n),d=l.descriptor.id;if(s.all.push(d),!oc({target:c,destination:t,viewport:r,withDroppableDisplacement:!0}))return s.invisible[l.descriptor.id]=!0,s;const f=ac(d,i,o),p={draggableId:d,shouldAnimate:f};return s.visible[d]=p,s},{all:[],visible:{},invisible:{}})}function lc(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Ur({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=lc(e,{inHomeList:t});return{displaced:Ke,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function mt({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=_e(e,n);if(a==null)return Ur({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(h=>h.descriptor.index===a);if(!c)return Ur({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const d=It(e,t),u=t.indexOf(c),f=d.slice(u);return{displaced:Je({afterDragging:f,destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function Ee(e,t){return!!t.effected[e]}var cc=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,s=n[i].descriptor.index;return Ee(i,o)?e?s:s-1:e?s+1:s},uc=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[0].descriptor.index,s=n[n.length-1].descriptor.index,l=t?s:s+1;return i<a||i>l?null:i},dc=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||C(),c.type==="REORDER"){const u=uc({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return u==null?null:mt({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})}const d=cc({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return d==null?null:mt({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})},fc=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=!!(e.visible[n]||e.invisible[n]);return Ee(n,t)?o?K:Me(r.point):o?r.point:K},pc=({afterCritical:e,impact:t,draggables:n})=>{const r=Dt(t);r||C();const o=r.draggableId,i=n[o].page.borderBox.center,a=fc({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return X(i,a)};const Zo=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,hc=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,Bn=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,Wr=({axis:e,moveRelativeTo:t,isMoving:n})=>Re(e.line,t.marginBox[e.end]+Zo(e,n),Bn(e,t.marginBox,n)),Hr=({axis:e,moveRelativeTo:t,isMoving:n})=>Re(e.line,t.marginBox[e.start]-hc(e,n),Bn(e,t.marginBox,n)),gc=({axis:e,moveInto:t,isMoving:n})=>Re(e.line,t.contentBox[e.start]+Zo(e,n),Bn(e,t.contentBox,n));var mc=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=$e(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return gc({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,d=l.all[0];if(d){const f=n[d];if(Ee(d,o))return Hr({axis:s,moveRelativeTo:f.page,isMoving:a});const p=ft(f.page,c.point);return Hr({axis:s,moveRelativeTo:p,isMoving:a})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return a.borderBox.center;if(Ee(u.descriptor.id,o)){const f=ft(u.page,Me(o.displacedBy.point));return Wr({axis:s,moveRelativeTo:f,isMoving:a})}return Wr({axis:s,moveRelativeTo:u.page,isMoving:a})},un=(e,t)=>{const n=e.frame;return n?X(t,n.scroll.diff.displacement):t};const vc=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return!n||!a?i:a.type==="REORDER"?mc({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):pc({impact:e,draggables:r,afterCritical:o})};var Pt=e=>{const t=vc(e),n=e.droppable;return n?un(n,t):t},Qo=(e,t)=>{const n=oe(t,e.scroll.initial),r=Me(n);return{frame:pe({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:n,displacement:r}}}};function kr(e,t){return e.map(n=>t[n])}function bc(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}var yc=({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Qo(t,X(t.scroll.current,o)),a=n.frame?An(n,X(n.frame.scroll.current,o)):n,s=e.displaced,l=Je({afterDragging:kr(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=Je({afterDragging:kr(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),d={},u={},f=[s,l,c];return s.all.forEach(h=>{const v=bc(h,f);if(v){u[h]=v;return}d[h]=!0}),{...e,displaced:{all:s.all,invisible:d,visible:u}}},xc=(e,t)=>X(e.scroll.diff.displacement,t),Ln=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=xc(n,e),o=oe(r,t.page.borderBox.center);return X(t.client.borderBox.center,o)},ei=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=oe(n,e.page.borderBox.center),l={target:tt(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?ic(l):Xo(l)},Ec=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=$e(n.descriptor.id,r),d=_e(t,n),u=Xl({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||dc({isMovingForward:e,isInHomeList:d,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!u)return null;const f=Pt({impact:u,draggable:t,droppable:n,draggables:r,afterCritical:l});if(ei({draggable:t,destination:n,newPageBorderBoxCenter:f,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Ln({pageBorderBoxCenter:f,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null};const h=oe(f,a),v=yc({impact:u,viewport:i,destination:n,draggables:r,maxScrollChange:h});return{clientSelection:s,impact:v,scrollJumpRequest:h}};const ee=e=>{const t=e.subject.active;return t||C(),t};var Sc=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=de(i[a.start],i[a.end]),l=wt(r).filter(d=>d!==n).filter(d=>d.isEnabled).filter(d=>!!d.subject.active).filter(d=>Ko(o.frame)(ee(d))).filter(d=>{const u=ee(d);return e?i[a.crossAxisEnd]<u[a.crossAxisEnd]:u[a.crossAxisStart]<i[a.crossAxisStart]}).filter(d=>{const u=ee(d),f=de(u[a.start],u[a.end]);return s(u[a.start])||s(u[a.end])||f(i[a.start])||f(i[a.end])}).sort((d,u)=>{const f=ee(d)[a.crossAxisStart],p=ee(u)[a.crossAxisStart];return e?f-p:p-f}).filter((d,u,f)=>ee(d)[a.crossAxisStart]===ee(f[0])[a.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const c=l.filter(d=>de(ee(d)[a.start],ee(d)[a.end])(t[a.line]));return c.length===1?c[0]:c.length>1?c.sort((d,u)=>ee(d)[a.start]-ee(u)[a.start])[0]:l.sort((d,u)=>{const f=Fr(t,Gr(ee(d))),p=Fr(t,Gr(ee(u)));return f!==p?f-p:ee(d)[a.start]-ee(u)[a.start]})[0]};const Vr=(e,t)=>{const n=e.page.borderBox.center;return Ee(e.descriptor.id,t)?oe(n,t.displacedBy.point):n},Cc=(e,t)=>{const n=e.page.borderBox;return Ee(e.descriptor.id,t)?tt(n,Me(t.displacedBy.point)):n};var wc=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>r.filter(a=>Xo({target:Cc(a,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((a,s)=>{const l=Ye(e,un(n,Vr(a,o))),c=Ye(e,un(n,Vr(s,o)));return l<c?-1:c<l?1:a.descriptor.index-s.descriptor.index})[0]||null,nt=Y(function(t,n){const r=n[t.line];return{value:r,point:Re(t.line,r)}});const Dc=(e,t,n)=>{const r=e.axis;if(e.descriptor.mode==="virtual")return Re(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],l=$e(e.descriptor.id,n).reduce((c,d)=>c+d.client.marginBox[r.size],0)+t[r.line]-o;return l<=0?null:Re(r.line,l)},ti=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),ni=(e,t,n)=>{const r=e.frame;_e(t,e)&&C(),e.subject.withPlaceholder&&C();const o=nt(e.axis,t.displaceBy).point,i=Dc(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const d=Oe({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:d}}const s=i?X(r.scroll.max,i):r.scroll.max,l=ti(r,s),c=Oe({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}},Ic=e=>{const t=e.subject.withPlaceholder;t||C();const n=e.frame;if(!n){const a=Oe({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:a}}const r=t.oldFrameMaxScroll;r||C();const o=ti(n,r),i=Oe({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var Pc=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const u={displaced:Ke,displacedBy:Yo,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},f=Pt({impact:u,draggable:r,droppable:i,draggables:o,afterCritical:s}),p=_e(r,i)?i:ni(i,r,o);return ei({draggable:r,destination:p,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?u:null}const l=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],c=(()=>{const u=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?u:u+1})(),d=nt(i.axis,r.displaceBy);return mt({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:d,last:Ke,index:c})},Rc=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=Sc({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=$e(l.descriptor.id,o),d=wc({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),u=Pc({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:a,afterCritical:s});if(!u)return null;const f=Pt({impact:u,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:Ln({pageBorderBoxCenter:f,draggable:n,viewport:a}),impact:u,scrollJumpRequest:null}},ie=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const Ac=(e,t)=>{const n=ie(e);return n?t[n]:null};var Oc=({state:e,type:t})=>{const n=Ac(e.impact,e.dimensions.droppables),r=!!n,o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,a=i.axis.direction,s=a==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||a==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(s&&!r)return null;const l=t==="MOVE_DOWN"||t==="MOVE_RIGHT",c=e.dimensions.draggables[e.critical.draggable.id],d=e.current.page.borderBoxCenter,{draggables:u,droppables:f}=e.dimensions;return s?Ec({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,destination:i,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Rc({isMovingForward:l,previousPageBorderBoxCenter:d,draggable:c,isOver:i,draggables:u,droppables:f,viewport:e.viewport,afterCritical:e.afterCritical})};function Pe(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function ri(e){const t=de(e.top,e.bottom),n=de(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function Tc(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Nc({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(i=>{const a=i.axis,s=Re(i.axis.line,e.center[a.line],i.page.borderBox.center[a.crossAxisLine]);return{id:i.descriptor.id,distance:Ye(r,s)}}).sort((i,a)=>a.distance-i.distance);return o[0]?o[0].id:null}function Bc({pageBorderBox:e,draggable:t,droppables:n}){const r=wt(n).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!Tc(e,i))return!1;if(ri(i)(e.center))return!0;const a=o.axis,s=i.center[a.crossAxisLine],l=e[a.crossAxisStart],c=e[a.crossAxisEnd],d=de(i[a.crossAxisStart],i[a.crossAxisEnd]),u=d(l),f=d(c);return!u&&!f?!0:u?l<s:c>s});return r.length?r.length===1?r[0].descriptor.id:Nc({pageBorderBox:e,draggable:t,candidates:r}):null}const oi=(e,t)=>pe(tt(e,t));var Lc=(e,t)=>{const n=e.frame;return n?oi(t,n.scroll.diff.value):t};function ii({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function Mc({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var $c=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=nt(n.axis,t.displaceBy),c=l.value,d=e[s.start],u=e[s.end],p=It(t,r).find(v=>{const g=v.descriptor.id,m=v.page.borderBox.center[s.line],b=Ee(g,a),y=ii({displaced:o,id:g});return b?y?u<=m:d<m-c:y?u<=m+c:d<m})||null,h=Mc({draggable:t,closest:p,inHomeList:_e(t,n)});return mt({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:l,index:h})};const _c=4;var Fc=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=nt(r.axis,e.displaceBy),l=s.value,c=t[a.start],d=t[a.end],f=It(e,o).find(h=>{const v=h.descriptor.id,g=h.page.borderBox,b=g[a.size]/_c,y=Ee(v,i),E=ii({displaced:n.displaced,id:v});return y?E?d>g[a.start]+b&&d<g[a.end]-b:c>g[a.start]-l+b&&c<g[a.end]-l-b:E?d>g[a.start]+l+b&&d<g[a.end]+l-b:c>g[a.start]+b&&c<g[a.end]-b});return f?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:f.descriptor.id,droppableId:r.descriptor.id}}}:null},ai=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=oi(t.page.borderBox,e),l=Bc({pageBorderBox:s,draggable:t,droppables:r});if(!l)return Zl;const c=r[l],d=$e(c.descriptor.id,n),u=Lc(c,s);return Fc({pageBorderBoxWithDroppableScroll:u,draggable:t,previousImpact:o,destination:c,insideDestination:d,afterCritical:a})||$c({pageBorderBoxWithDroppableScroll:u,draggable:t,destination:c,insideDestination:d,last:o.displaced,viewport:i,afterCritical:a})},Mn=(e,t)=>({...e,[t.descriptor.id]:t});const Gc=({previousImpact:e,impact:t,droppables:n})=>{const r=ie(e),o=ie(t);if(!r||r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=Ic(i);return Mn(n,a)};var Uc=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=Gc({previousImpact:r,impact:o,droppables:n}),a=ie(o);if(!a)return i;const s=n[a];if(_e(e,s)||s.subject.withPlaceholder)return i;const l=ni(s,e,t);return Mn(i,l)},Ve=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=oe(l,e.initial.client.selection),d={offset:c,selection:l,borderBoxCenter:X(e.initial.client.borderBoxCenter,c)},u={selection:X(d.selection,a.scroll.current),borderBoxCenter:X(d.borderBoxCenter,a.scroll.current),offset:X(d.offset,a.scroll.diff.value)},f={client:d,page:u};if(e.phase==="COLLECTING")return{...e,dimensions:s,viewport:a,current:f};const p=s.draggables[e.critical.draggable.id],h=o||ai({pageOffset:u.offset,draggable:p,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),v=Uc({draggable:p,impact:h,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:f,dimensions:{draggables:s.draggables,droppables:v},impact:h,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function Wc(e,t){return e.map(n=>t[n])}var si=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=Wc(i.all,n),s=Je({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},li=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=Pt({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return Ln({pageBorderBoxCenter:a,draggable:t,viewport:o})},ci=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&C();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=ie(r);c||C();const d=s[c],u=si({impact:r,viewport:o,destination:d,draggables:a}),f=li({impact:u,draggable:l,droppable:d,draggables:a,viewport:o,afterCritical:e.afterCritical});return Ve({impact:u,clientSelection:f,state:e,dimensions:i,viewport:o})},Hc=e=>({index:e.index,droppableId:e.droppableId}),ui=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=nt(t.axis,e.displaceBy),i=$e(t.descriptor.id,n),a=i.indexOf(e);a===-1&&C();const s=i.slice(a+1),l=s.reduce((f,p)=>(f[p.descriptor.id]=!0,f),{}),c={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:l};return{impact:{displaced:Je({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:Hc(e.descriptor)}},afterCritical:c}},kc=(e,t)=>({draggables:e.draggables,droppables:Mn(e.droppables,t)}),Vc=({draggable:e,offset:t,initialWindowScroll:n})=>{const r=ft(e.client,t),o=pt(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}},jc=e=>{const t=e.frame;return t||C(),t},qc=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,a=t[i],l=jc(a).scroll.diff.value,c=X(r,l);return Vc({draggable:o,offset:c,initialWindowScroll:n.scroll.initial})})},zc=({state:e,published:t})=>{const n=t.modified.map(m=>{const b=e.dimensions.droppables[m.droppableId];return An(b,m.scroll)}),r={...e.dimensions.droppables,...qo(n)},o=zo(qc({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(m=>{delete i[m]});const a={droppables:r,draggables:i},s=ie(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],d=a.droppables[e.critical.droppable.id],{impact:u,afterCritical:f}=ui({draggable:c,home:d,draggables:i,viewport:e.viewport}),p=l&&l.isCombineEnabled?e.impact:u,h=ai({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:p,viewport:e.viewport,afterCritical:f}),v={...e,phase:"DRAGGING",impact:h,onLiftImpact:u,dimensions:a,afterCritical:f,forceShouldAnimate:!1};return e.phase==="COLLECTING"?v:{...v,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const dn=e=>e.movementMode==="SNAP",qt=(e,t,n)=>{const r=kc(e.dimensions,t);return!dn(e)||n?Ve({state:e,dimensions:r}):ci({state:e,dimensions:r})};function zt(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const jr={phase:"IDLE",completed:null,shouldFlush:!1};var Yc=(e=jr,t)=>{if(t.type==="FLUSH")return{...jr,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&C();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:K},d={client:c,page:{selection:X(c.selection,o.scroll.initial),borderBoxCenter:X(c.selection,o.scroll.initial),offset:X(c.selection,o.scroll.diff.value)}},u=wt(i.droppables).every(v=>!v.isFixedOnPage),{impact:f,afterCritical:p}=ui({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:d,current:d,isWindowScrollAllowed:u,impact:f,afterCritical:p,onLiftImpact:f,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&C(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||C(),zc({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Pe(e)||C();const{client:n}=t.payload;return xe(n,e.current.client.selection)?e:Ve({state:e,clientSelection:n,impact:dn(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return zt(e);Pe(e)||C();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=An(o,r);return qt(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Pe(e)||C();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||C(),o.isEnabled===r&&C();const i={...o,isEnabled:r};return qt(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Pe(e)||C();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||C(),o.isCombineEnabled===r&&C();const i={...o,isCombineEnabled:r};return qt(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Pe(e)||C(),e.isWindowScrollAllowed||C();const n=t.payload.newScroll;if(xe(e.viewport.scroll.current,n))return zt(e);const r=Qo(e.viewport,n);return dn(e)?ci({state:e,viewport:r}):Ve({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Pe(e))return e;const n=t.payload.maxScroll;if(xe(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}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"&&C();const n=Oc({state:e,type:t.type});return n?Ve({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&C(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||C(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function H(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Kc=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),Jc=e=>({type:"LIFT",payload:e}),Xc=e=>({type:"INITIAL_PUBLISH",payload:e}),Zc=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Qc=()=>({type:"COLLECTION_STARTING",payload:null}),eu=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),tu=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),nu=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),di=e=>({type:"MOVE",payload:e}),ru=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),ou=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),iu=()=>({type:"MOVE_UP",payload:null}),au=()=>({type:"MOVE_DOWN",payload:null}),su=()=>({type:"MOVE_RIGHT",payload:null}),lu=()=>({type:"MOVE_LEFT",payload:null}),$n=()=>({type:"FLUSH",payload:null}),cu=e=>({type:"DROP_ANIMATE",payload:e}),_n=e=>({type:"DROP_COMPLETE",payload:e}),fi=e=>({type:"DROP",payload:e}),uu=e=>({type:"DROP_PENDING",payload:e}),pi=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var du=e=>({getState:t,dispatch:n})=>r=>o=>{if(!H(o,"LIFT")){r(o);return}const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();l.phase==="DROP_ANIMATING"&&n(_n({completed:l.completed})),t().phase!=="IDLE"&&C(),n($n()),n(Kc({draggableId:i,movementMode:s}));const d={draggableId:i,scrollOptions:{shouldPublishImmediately:s==="SNAP"}},{critical:u,dimensions:f,viewport:p}=e.startPublishing(d);n(Xc({critical:u,dimensions:f,clientSelection:a,movementMode:s,viewport:p}))},fu=e=>()=>t=>n=>{H(n,"INITIAL_PUBLISH")&&e.dragging(),H(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(H(n,"FLUSH")||H(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const Fn={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Xe={opacity:{drop:0,combining:.7},scale:{drop:.75}},hi={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Ie=`${hi.outOfTheWay}s ${Fn.outOfTheWay}`,je={fluid:`opacity ${Ie}`,snap:`transform ${Ie}, opacity ${Ie}`,drop:e=>{const t=`${e}s ${Fn.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Ie}`,placeholder:`height ${Ie}, width ${Ie}, margin ${Ie}`},qr=e=>xe(e,K)?void 0:`translate(${e.x}px, ${e.y}px)`,fn={moveTo:qr,drop:(e,t)=>{const n=qr(e);if(n)return t?`${n} scale(${Xe.scale.drop})`:n}},{minDropTime:pn,maxDropTime:gi}=hi,pu=gi-pn,zr=1500,hu=.6;var gu=({current:e,destination:t,reason:n})=>{const r=Ye(e,t);if(r<=0)return pn;if(r>=zr)return gi;const o=r/zr,i=pn+pu*o,a=n==="CANCEL"?i*hu:i;return Number(a.toFixed(2))},mu=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=ie(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],d=li({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||c,viewport:r});return oe(d,t.client.borderBox.center)},vu=({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>!n.at||t!=="DROP"?{impact:si({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:Ke},didDropInsideDroppable:!0};const bu=({getState:e,dispatch:t})=>n=>r=>{if(!H(r,"DROP")){n(r);return}const o=e(),i=r.payload.reason;if(o.phase==="COLLECTING"){t(uu({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&C(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||C();const s=o.critical,l=o.dimensions,c=l.draggables[o.critical.draggable.id],{impact:d,didDropInsideDroppable:u}=vu({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}),f=u?On(d):null,p=u?Dt(d):null,h={index:s.draggable.index,droppableId:s.droppable.id},v={draggableId:c.descriptor.id,type:c.descriptor.type,source:h,reason:i,mode:o.movementMode,destination:f,combine:p},g=mu({impact:d,draggable:c,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),m={critical:o.critical,afterCritical:o.afterCritical,result:v,impact:d};if(!(!xe(o.current.client.offset,g)||!!v.combine)){t(_n({completed:m}));return}const y=gu({current:o.current.client.offset,destination:g,reason:i});t(cu({newHomeClientOffset:g,dropDuration:y,completed:m}))};var mi=()=>({x:window.pageXOffset,y:window.pageYOffset});function yu(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function xu({onWindowScroll:e}){function t(){e(mi())}const n=ze(t),r=yu(n);let o=ye;function i(){return o!==ye}function a(){i()&&C(),o=ue(window,[r])}function s(){i()||C(),n.cancel(),o(),o=ye}return{start:a,stop:s,isActive:i}}const Eu=e=>H(e,"DROP_COMPLETE")||H(e,"DROP_ANIMATE")||H(e,"FLUSH"),Su=e=>{const t=xu({onWindowScroll:n=>{e.dispatch(ru({newScroll:n}))}});return n=>r=>{!t.isActive()&&H(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&Eu(r)&&t.stop(),n(r)}};var Cu=e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return o.wasCalled=()=>t,o},wu=()=>{const e=[],t=o=>{const i=e.findIndex(s=>s.timerId===o);i===-1&&C();const[a]=e.splice(i,1);a.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),a={timerId:i,callback:o};e.push(a)},flush:()=>{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const Du=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,Iu=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,Pu=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},Ue=(e,t)=>{t()},ot=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Yt(e,t,n,r){if(!e){n(r(t));return}const o=Cu(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var Ru=(e,t)=>{const n=wu();let r=null;const o=(u,f)=>{r&&C(),Ue("onBeforeCapture",()=>{const p=e().onBeforeCapture;p&&p({draggableId:u,mode:f})})},i=(u,f)=>{r&&C(),Ue("onBeforeDragStart",()=>{const p=e().onBeforeDragStart;p&&p(ot(u,f))})},a=(u,f)=>{r&&C();const p=ot(u,f);r={mode:f,lastCritical:u,lastLocation:p.source,lastCombine:null},n.add(()=>{Ue("onDragStart",()=>Yt(e().onDragStart,p,t,lt.onDragStart))})},s=(u,f)=>{const p=On(f),h=Dt(f);r||C();const v=!Pu(u,r.lastCritical);v&&(r.lastCritical=u);const g=!Du(r.lastLocation,p);g&&(r.lastLocation=p);const m=!Iu(r.lastCombine,h);if(m&&(r.lastCombine=h),!v&&!g&&!m)return;const b={...ot(u,r.mode),combine:h,destination:p};n.add(()=>{Ue("onDragUpdate",()=>Yt(e().onDragUpdate,b,t,lt.onDragUpdate))})},l=()=>{r||C(),n.flush()},c=u=>{r||C(),r=null,Ue("onDragEnd",()=>Yt(e().onDragEnd,u,t,lt.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:()=>{if(!r)return;const u={...ot(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};c(u)}}},Au=(e,t)=>{const n=Ru(e,t);return r=>o=>i=>{if(H(i,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(H(i,"INITIAL_PUBLISH")){const s=i.payload.critical;n.beforeStart(s,i.payload.movementMode),o(i),n.start(s,i.payload.movementMode);return}if(H(i,"DROP_COMPLETE")){const s=i.payload.completed.result;n.flush(),o(i),n.drop(s);return}if(o(i),H(i,"FLUSH")){n.abort();return}const a=r.getState();a.phase==="DRAGGING"&&n.update(a.critical,a.impact)}};const Ou=e=>t=>n=>{if(!H(n,"DROP_ANIMATION_FINISHED")){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&C(),e.dispatch(_n({completed:r.completed}))},Tu=e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return o=>i=>{if((H(i,"FLUSH")||H(i,"DROP_COMPLETE")||H(i,"DROP_ANIMATION_FINISHED"))&&r(),o(i),!H(i,"DROP_ANIMATE"))return;const a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(pi())}};n=requestAnimationFrame(()=>{n=null,t=ue(window,[a])})}};var Nu=e=>()=>t=>n=>{(H(n,"DROP_COMPLETE")||H(n,"FLUSH")||H(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},Bu=e=>{let t=!1;return()=>n=>r=>{if(H(r,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(H(r,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(H(r,"DROP_COMPLETE")){t=!1;const o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const Lu=e=>H(e,"DROP_COMPLETE")||H(e,"DROP_ANIMATE")||H(e,"FLUSH");var Mu=e=>t=>n=>r=>{if(Lu(r)){e.stop(),n(r);return}if(H(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();o.phase!=="DRAGGING"&&C(),e.start(o);return}n(r),e.scroll(t.getState())};const $u=e=>t=>n=>{if(t(n),!H(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(fi({reason:r.reason})))},_u=To;var Fu=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>Oo(Yc,_u(Ms(fu(n),Nu(e),du(e),bu,Ou,Tu,$u,Mu(i),Su,Bu(t),Au(r,o))));const Kt=()=>({additions:{},removals:{},modified:{}});function Gu({registry:e,callbacks:t}){let n=Kt(),r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:l,removals:c,modified:d}=n,u=Object.keys(l).map(h=>e.draggable.getById(h).getDimension(K)).sort((h,v)=>h.descriptor.index-v.descriptor.index),f=Object.keys(d).map(h=>{const g=e.droppable.getById(h).callbacks.getScrollWhileDragging();return{droppableId:h,scroll:g}}),p={additions:u,removals:Object.keys(c),modified:f};n=Kt(),t.publish(p)}))};return{add:l=>{const c=l.descriptor.id;n.additions[c]=l,n.modified[l.descriptor.droppableId]=!0,n.removals[c]&&delete n.removals[c],o()},remove:l=>{const c=l.descriptor;n.removals[c.id]=!0,n.modified[c.droppableId]=!0,n.additions[c.id]&&delete n.additions[c.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=Kt())}}}var vi=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=oe({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},bi=()=>{const e=document.documentElement;return e||C(),e},yi=()=>{const e=bi();return vi({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Uu=()=>{const e=mi(),t=yi(),n=e.y,r=e.x,o=bi(),i=o.clientWidth,a=o.clientHeight,s=r+i,l=n+a;return{frame:pe({top:n,left:r,right:s,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:K,displacement:K}}}},Wu=({critical:e,scrollOptions:t,registry:n})=>{const r=Uu(),o=r.scroll.current,i=e.droppable,a=n.droppable.getAllByType(i.type).map(d=>d.callbacks.getDimensionAndWatchScroll(o,t)),s=n.draggable.getAllByType(e.draggable.type).map(d=>d.getDimension(o));return{dimensions:{draggables:zo(s),droppables:qo(a)},critical:e,viewport:r}};function Yr(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var Hu=(e,t)=>{let n=null;const r=Gu({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(f,p)=>{e.droppable.exists(f)||C(),n&&t.updateDroppableIsEnabled({id:f,isEnabled:p})},i=(f,p)=>{n&&(e.droppable.exists(f)||C(),t.updateDroppableIsCombineEnabled({id:f,isCombineEnabled:p}))},a=(f,p)=>{n&&(e.droppable.exists(f)||C(),t.updateDroppableScroll({id:f,newScroll:p}))},s=(f,p)=>{n&&e.droppable.getById(f).callbacks.scroll(p)},l=()=>{if(!n)return;r.stop();const f=n.critical.droppable;e.droppable.getAllByType(f.type).forEach(p=>p.callbacks.dragStopped()),n.unsubscribe(),n=null},c=f=>{n||C();const p=n.critical.draggable;f.type==="ADDITION"&&Yr(e,p,f.value)&&r.add(f.value),f.type==="REMOVAL"&&Yr(e,p,f.value)&&r.remove(f.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:f=>{n&&C();const p=e.draggable.getById(f.draggableId),h=e.droppable.getById(p.descriptor.droppableId),v={draggable:p.descriptor,droppable:h.descriptor},g=e.subscribe(c);return n={critical:v,unsubscribe:g},Wu({critical:v,registry:e,scrollOptions:f.scrollOptions})},stopPublishing:l}},xi=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",ku=e=>{window.scrollBy(e.x,e.y)};const Vu=Y(e=>wt(e).filter(t=>!(!t.isEnabled||!t.frame))),ju=(e,t)=>Vu(t).find(r=>(r.frame||C(),ri(r.frame.pageMarginBox)(e)))||null;var qu=({center:e,destination:t,droppables:n})=>{if(t){const o=n[t];return o.frame?o:null}return ju(e,n)};const Ze={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var zu=(e,t,n=()=>Ze)=>{const r=n(),o=e[t.size]*r.startFromPercentage,i=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},Ei=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return r===0?0:(n-e)/r},Gn=1,Yu=(e,t,n=()=>Ze)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return Gn;const i=1-Ei({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=r.maxPixelScroll*r.ease(i);return Math.ceil(a)},Ku=(e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,c=Date.now()-a;if(c>=i)return e;if(c<o)return Gn;const d=Ei({startOfRange:o,endOfRange:s,current:c}),u=e*r.ease(d);return Math.ceil(u)},Kr=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=Yu(e,t,o);return i===0?0:r?Math.max(Ku(i,n,o),Gn):i},Jr=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=zu(e,r,i);return t[r.end]<t[r.start]?Kr({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*Kr({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})},Ju=({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return!o&&!r?n:o&&r?null:{x:o?0:n.x,y:r?0:n.y}};const Xu=jo(e=>e===0?0:e);var Si=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=Jr({container:t,distanceToEdges:a,dragStartTime:e,axis:Tn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=Jr({container:t,distanceToEdges:a,dragStartTime:e,axis:Jo,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=Xu({x:l,y:s});if(xe(c,K))return null;const d=Ju({container:t,subject:n,proposedScroll:c});return d?xe(d,K)?null:d:null};const Zu=jo(e=>e===0?0:e>0?1:-1),Un=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:r})=>{const o=X(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return xe(i,K)?null:i}})(),Ci=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=Zu(n),i=Un({max:r,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},Wn=(e,t)=>Ci({current:e.scroll.current,max:e.scroll.max,change:t}),Qu=(e,t)=>{if(!Wn(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return Un({current:r,max:n,change:t})},Hn=(e,t)=>{const n=e.frame;return n?Ci({current:n.scroll.current,max:n.scroll.max,change:t}):!1},ed=(e,t)=>{const n=e.frame;return!n||!Hn(e,t)?null:Un({current:n.scroll.current,max:n.scroll.max,change:t})};var td=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=Si({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&Wn(e,a)?a:null},nd=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=Si({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Hn(e,s)?s:null},Xr=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const u=e.viewport,f=td({dragStartTime:t,viewport:u,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(f){r(f);return}}const c=qu({center:a,destination:ie(e.impact),droppables:e.dimensions.droppables});if(!c)return;const d=nd({dragStartTime:t,droppable:c,subject:l,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});d&&o(c.descriptor.id,d)},rd=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>Ze})=>{const r=ze(e),o=ze(t);let i=null;const a=c=>{i||C();const{shouldUseTimeDampening:d,dragStartTime:u}=i;Xr({state:c,scrollWindow:r,scrollDroppable:o,dragStartTime:u,shouldUseTimeDampening:d,getAutoScrollerOptions:n})};return{start:c=>{i&&C();const d=Date.now();let u=!1;const f=()=>{u=!0};Xr({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:f,scrollDroppable:f,getAutoScrollerOptions:n}),i={dragStartTime:d,shouldUseTimeDampening:u},u&&a(c)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}},od=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(s,l)=>{const c=X(s.current.client.selection,l);e({client:c})},o=(s,l)=>{if(!Hn(s,l))return l;const c=ed(s,l);if(!c)return t(s.descriptor.id,l),null;const d=oe(l,c);return t(s.descriptor.id,d),oe(l,d)},i=(s,l,c)=>{if(!s||!Wn(l,c))return c;const d=Qu(l,c);if(!d)return n(c),null;const u=oe(c,d);return n(u),oe(c,u)};return s=>{const l=s.scrollJumpRequest;if(!l)return;const c=ie(s.impact);c||C();const d=o(s.dimensions.droppables[c],l);if(!d)return;const u=s.viewport,f=i(s.isWindowScrollAllowed,u,d);f&&r(s,f)}},id=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=rd({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=od({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:l=>{if(!(r().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){o.scroll(l);return}l.scrollJumpRequest&&i(l)}},start:o.start,stop:o.stop}};const Te="data-rfd",Ne=(()=>{const e=`${Te}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),hn=(()=>{const e=`${Te}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),ad=(()=>{const e=`${Te}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Zr={contextId:`${Te}-scroll-container-context-id`},sd=e=>t=>`[${t}="${e}"]`,We=(e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),ld="pointer-events: none;";var cd=e=>{const t=sd(e),n=(()=>{const s=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:t(Ne.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:s,dragging:ld,dropAnimating:s}}})(),r=(()=>{const s=`
transition: ${je.outOfTheWay};
`;return{selector:t(hn.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}})(),o={selector:t(ad.contextId),styles:{always:"overflow-anchor: none;"}},a=[r,n,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:We(a,"always"),resting:We(a,"resting"),dragging:We(a,"dragging"),dropAnimating:We(a,"dropAnimating"),userCancel:We(a,"userCancel")}};const ae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,Jt=()=>{const e=document.querySelector("head");return e||C(),e},Qr=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function ud(e,t){const n=G(()=>cd(e),[e]),r=x.useRef(null),o=x.useRef(null),i=R(Y(u=>{const f=o.current;f||C(),f.textContent=u}),[]),a=R(u=>{const f=r.current;f||C(),f.textContent=u},[]);ae(()=>{!r.current&&!o.current||C();const u=Qr(t),f=Qr(t);return r.current=u,o.current=f,u.setAttribute(`${Te}-always`,e),f.setAttribute(`${Te}-dynamic`,e),Jt().appendChild(u),Jt().appendChild(f),a(n.always),i(n.resting),()=>{const p=h=>{const v=h.current;v||C(),Jt().removeChild(v),h.current=null};p(r),p(o)}},[t,a,i,n.always,n.resting,e]);const s=R(()=>i(n.dragging),[i,n.dragging]),l=R(u=>{if(u==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),c=R(()=>{o.current&&i(n.resting)},[i,n.resting]);return G(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function wi(e,t){return Array.from(e.querySelectorAll(t))}var Di=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Rt(e){return e instanceof Di(e).HTMLElement}function dd(e,t){const n=`[${Ne.contextId}="${e}"]`,r=wi(document,n);if(!r.length)return null;const o=r.find(i=>i.getAttribute(Ne.draggableId)===t);return!o||!Rt(o)?null:o}function fd(e){const t=x.useRef({}),n=x.useRef(null),r=x.useRef(null),o=x.useRef(!1),i=R(function(f,p){const h={id:f,focus:p};return t.current[f]=h,function(){const g=t.current;g[f]!==h&&delete g[f]}},[]),a=R(function(f){const p=dd(e,f);p&&p!==document.activeElement&&p.focus()},[e]),s=R(function(f,p){n.current===f&&(n.current=p)},[]),l=R(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const f=n.current;f&&a(f)}))},[a]),c=R(function(f){n.current=null;const p=document.activeElement;p&&p.getAttribute(Ne.draggableId)===f&&(n.current=f)},[]);return ae(()=>(o.current=!0,function(){o.current=!1;const f=r.current;f&&cancelAnimationFrame(f)}),[]),G(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function pd(){const e={draggables:{},droppables:{}},t=[];function n(u){return t.push(u),function(){const p=t.indexOf(u);p!==-1&&t.splice(p,1)}}function r(u){t.length&&t.forEach(f=>f(u))}function o(u){return e.draggables[u]||null}function i(u){const f=o(u);return f||C(),f}const a={register:u=>{e.draggables[u.descriptor.id]=u,r({type:"ADDITION",value:u})},update:(u,f)=>{const p=e.draggables[f.descriptor.id];p&&p.uniqueId===u.uniqueId&&(delete e.draggables[f.descriptor.id],e.draggables[u.descriptor.id]=u)},unregister:u=>{const f=u.descriptor.id,p=o(f);p&&u.uniqueId===p.uniqueId&&(delete e.draggables[f],e.droppables[u.descriptor.droppableId]&&r({type:"REMOVAL",value:u}))},getById:i,findById:o,exists:u=>!!o(u),getAllByType:u=>Object.values(e.draggables).filter(f=>f.descriptor.type===u)};function s(u){return e.droppables[u]||null}function l(u){const f=s(u);return f||C(),f}const c={register:u=>{e.droppables[u.descriptor.id]=u},unregister:u=>{const f=s(u.descriptor.id);f&&u.uniqueId===f.uniqueId&&delete e.droppables[u.descriptor.id]},getById:l,findById:s,exists:u=>!!s(u),getAllByType:u=>Object.values(e.droppables).filter(f=>f.descriptor.type===u)};function d(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:n,clean:d}}function hd(){const e=G(pd,[]);return x.useEffect(()=>function(){e.clean()},[e]),e}var kn=A.createContext(null),vt=()=>{const e=document.body;return e||C(),e};const gd={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},md=e=>`rfd-announcement-${e}`;function vd(e){const t=G(()=>md(e),[e]),n=x.useRef(null);return x.useEffect(function(){const i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),z(i.style,gd),vt().appendChild(i),function(){setTimeout(function(){const l=vt();l.contains(i)&&l.removeChild(i),i===n.current&&(n.current=null)})}},[t]),R(o=>{const i=n.current;if(i){i.textContent=o;return}},[])}const bd={separator:"::"};function Vn(e,t=bd){const n=A.useId();return G(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function yd({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function xd({contextId:e,text:t}){const n=Vn("hidden-text",{separator:"-"}),r=G(()=>yd({contextId:e,uniqueId:n}),[n,e]);return x.useEffect(function(){const i=document.createElement("div");return i.id=r,i.textContent=t,i.style.display="none",vt().appendChild(i),function(){const s=vt();s.contains(i)&&s.removeChild(i)}},[r,t]),r}var At=A.createContext(null);function Ii(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),t}function Ed(){let e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&C();const s={abandon:a};return e=s,s}function o(){e||C(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:i}}function Qe(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const Sd=9,Cd=13,jn=27,Pi=32,wd=33,Dd=34,Id=35,Pd=36,Rd=37,Ad=38,Od=39,Td=40,Nd={[Cd]:!0,[Sd]:!0};var Ri=e=>{Nd[e.keyCode]&&e.preventDefault()};const Ot=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),Ai=0,eo=5;function Bd(e,t){return Math.abs(t.x-e.x)>=eo||Math.abs(t.y-e.y)>=eo}const to={type:"IDLE"};function Ld({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:a,clientY:s}=o;if(i!==Ai)return;const l={x:a,y:s},c=n();if(c.type==="DRAGGING"){o.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&C();const d=c.point;if(!Bd(d,l))return;o.preventDefault();const u=c.actions.fluidLift(l);r({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:o=>{const i=n();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{n().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>{if(n().type==="PENDING"){e();return}if(o.keyCode===jn){o.preventDefault(),e();return}Ri(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=n();if(i.type==="IDLE"&&C(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:Ot,fn:e}]}function Md(e){const t=x.useRef(to),n=x.useRef(ye),r=G(()=>({eventName:"mousedown",fn:function(u){if(u.defaultPrevented||u.button!==Ai||u.ctrlKey||u.metaKey||u.shiftKey||u.altKey)return;const f=e.findClosestDraggableId(u);if(!f)return;const p=e.tryGetLock(f,a,{sourceEvent:u});if(!p)return;u.preventDefault();const h={x:u.clientX,y:u.clientY};n.current(),c(p,h)}}),[e]),o=G(()=>({eventName:"webkitmouseforcewillbegin",fn:d=>{if(d.defaultPrevented)return;const u=e.findClosestDraggableId(d);if(!u)return;const f=e.findOptionsForDraggable(u);f&&(f.shouldRespectForcePress||e.canGetLock(u)&&d.preventDefault())}}),[e]),i=R(function(){const u={passive:!1,capture:!0};n.current=ue(window,[o,r],u)},[o,r]),a=R(()=>{t.current.type!=="IDLE"&&(t.current=to,n.current(),i())},[i]),s=R(()=>{const d=t.current;a(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[a]),l=R(function(){const u={capture:!0,passive:!1},f=Ld({cancel:s,completed:a,getPhase:()=>t.current,setPhase:p=>{t.current=p}});n.current=ue(window,f,u)},[s,a]),c=R(function(u,f){t.current.type!=="IDLE"&&C(),t.current={type:"PENDING",point:f,actions:u},l()},[l]);ae(function(){return i(),function(){n.current()}},[i])}function $d(){}const _d={[Dd]:!0,[wd]:!0,[Pd]:!0,[Id]:!0};function Fd(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===jn){o.preventDefault(),n();return}if(o.keyCode===Pi){o.preventDefault(),r();return}if(o.keyCode===Td){o.preventDefault(),e.moveDown();return}if(o.keyCode===Ad){o.preventDefault(),e.moveUp();return}if(o.keyCode===Od){o.preventDefault(),e.moveRight();return}if(o.keyCode===Rd){o.preventDefault(),e.moveLeft();return}if(_d[o.keyCode]){o.preventDefault();return}Ri(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Ot,fn:n}]}function Gd(e){const t=x.useRef($d),n=G(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Pi)return;const a=e.findClosestDraggableId(i);if(!a)return;const s=e.tryGetLock(a,d,{sourceEvent:i});if(!s)return;i.preventDefault();let l=!0;const c=s.snapLift();t.current();function d(){l||C(),l=!1,t.current(),r()}t.current=ue(window,Fd(c,d),{capture:!0,passive:!1})}}),[e]),r=R(function(){const i={passive:!1,capture:!0};t.current=ue(window,[n],i)},[n]);ae(function(){return r(),function(){t.current()}},[r])}const Xt={type:"IDLE"},Ud=120,Wd=.15;function Hd({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===jn&&n.preventDefault(),e()}},{eventName:Ot,fn:e}]}function kd({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:a}=r.touches[0],s={x:i,y:a};r.preventDefault(),o.actions.move(s)}},{eventName:"touchend",fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const o=n();o.type==="IDLE"&&C();const i=r.touches[0];if(!i||!(i.force>=Wd))return;const s=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){s&&e();return}if(s){if(o.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:Ot,fn:e}]}function Vd(e){const t=x.useRef(Xt),n=x.useRef(ye),r=R(function(){return t.current},[]),o=R(function(p){t.current=p},[]),i=G(()=>({eventName:"touchstart",fn:function(p){if(p.defaultPrevented)return;const h=e.findClosestDraggableId(p);if(!h)return;const v=e.tryGetLock(h,s,{sourceEvent:p});if(!v)return;const g=p.touches[0],{clientX:m,clientY:b}=g,y={x:m,y:b};n.current(),u(v,y)}}),[e]),a=R(function(){const p={capture:!0,passive:!1};n.current=ue(window,[i],p)},[i]),s=R(()=>{const f=t.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),o(Xt),n.current(),a())},[a,o]),l=R(()=>{const f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=R(function(){const p={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:r},v=ue(window,kd(h),p),g=ue(window,Hd(h),p);n.current=function(){v(),g()}},[l,r,s]),d=R(function(){const p=r();p.type!=="PENDING"&&C();const h=p.actions.fluidLift(p.point);o({type:"DRAGGING",actions:h,hasMoved:!1})},[r,o]),u=R(function(p,h){r().type!=="IDLE"&&C();const v=setTimeout(d,Ud);o({type:"PENDING",point:h,actions:p,longPressTimerId:v}),c()},[c,r,o,d]);ae(function(){return a(),function(){n.current();const h=r();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),o(Xt))}},[r,a,o]),ae(function(){return ue(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const jd=["input","button","textarea","select","option","optgroup","video","audio"];function Oi(e,t){if(t==null)return!1;if(jd.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Oi(e,t.parentElement)}function qd(e,t){const n=t.target;return Rt(n)?Oi(e,n):!1}var zd=e=>pe(e.getBoundingClientRect()).center;function Yd(e){return e instanceof Di(e).Element}const Kd=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function Ti(e,t){return e==null?null:e[Kd](t)?e:Ti(e.parentElement,t)}function Jd(e,t){return e.closest?e.closest(t):Ti(e,t)}function Xd(e){return`[${Ne.contextId}="${e}"]`}function Zd(e,t){const n=t.target;if(!Yd(n))return null;const r=Xd(e),o=Jd(n,r);return!o||!Rt(o)?null:o}function Qd(e,t){const n=Zd(e,t);return n?n.getAttribute(Ne.draggableId):null}function ef(e,t){const n=`[${hn.contextId}="${e}"]`,o=wi(document,n).find(i=>i.getAttribute(hn.id)===t);return!o||!Rt(o)?null:o}function tf(e){e.preventDefault()}function it({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function Ni({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!(!o||!o.options.isEnabled||!xi(t.getState(),r))}function nf({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Ni({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const l=r.draggable.getById(o),c=ef(t,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&qd(c,a))return null;const d=e.claim(i||ye);let u="PRE_DRAG";function f(){return l.options.shouldRespectForcePress}function p(){return e.isActive(d)}function h(w,S){it({expected:w,phase:u,isLockActive:p,shouldWarn:!0})&&n.dispatch(S())}const v=h.bind(null,"DRAGGING");function g(w){function S(){e.release(),u="COMPLETED"}u!=="PRE_DRAG"&&(S(),C()),n.dispatch(Jc(w.liftActionArgs)),u="DRAGGING";function I(D,$={shouldBlockNextClick:!1}){if(w.cleanup(),$.shouldBlockNextClick){const P=ue(window,[{eventName:"click",fn:tf,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(P)}S(),n.dispatch(fi({reason:D}))}return{isActive:()=>it({expected:"DRAGGING",phase:u,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:f,drop:D=>I("DROP",D),cancel:D=>I("CANCEL",D),...w.actions}}function m(w){const S=ze(D=>{v(()=>di({client:D}))});return{...g({liftActionArgs:{id:o,clientSelection:w,movementMode:"FLUID"},cleanup:()=>S.cancel(),actions:{move:S}}),move:S}}function b(){const w={moveUp:()=>v(iu),moveRight:()=>v(su),moveDown:()=>v(au),moveLeft:()=>v(lu)};return g({liftActionArgs:{id:o,clientSelection:zd(c),movementMode:"SNAP"},cleanup:ye,actions:w})}function y(){it({expected:"PRE_DRAG",phase:u,isLockActive:p,shouldWarn:!0})&&e.release()}return{isActive:()=>it({expected:"PRE_DRAG",phase:u,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:f,fluidLift:m,snapLift:b,abort:y}}const rf=[Md,Gd,Vd];function of({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?rf:[],...r||[]],a=x.useState(()=>Ed())[0],s=R(function(g,m){Qe(g)&&!Qe(m)&&a.tryAbandon()},[a]);ae(function(){let g=t.getState();return t.subscribe(()=>{const b=t.getState();s(g,b),g=b})},[a,t,s]),ae(()=>a.tryAbandon,[a.tryAbandon]);const l=R(v=>Ni({lockAPI:a,registry:n,store:t,draggableId:v}),[a,n,t]),c=R((v,g,m)=>nf({lockAPI:a,registry:n,contextId:e,store:t,draggableId:v,forceSensorStop:g||null,sourceEvent:m&&m.sourceEvent?m.sourceEvent:null}),[e,a,n,t]),d=R(v=>Qd(e,v),[e]),u=R(v=>{const g=n.draggable.findById(v);return g?g.options:null},[n.draggable]),f=R(function(){a.isClaimed()&&(a.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch($n()))},[a,t]),p=R(()=>a.isClaimed(),[a]),h=G(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:u,tryReleaseLock:f,isLockClaimed:p}),[l,c,d,u,f,p]);for(let v=0;v<i.length;v++)i[v](h)}const af=e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};co.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),sf=e=>({...Ze,...e.autoScrollerOptions,durationDampening:{...Ze.durationDampening,...e.autoScrollerOptions}});function He(e){return e.current||C(),e.current}function lf(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,a=x.useRef(null),s=Ii(e),l=R(()=>af(s.current),[s]),c=R(()=>sf(s.current),[s]),d=vd(t),u=xd({contextId:t,text:i}),f=ud(t,o),p=R(P=>{He(a).dispatch(P)},[]),h=G(()=>wr({publishWhileDragging:Zc,updateDroppableScroll:eu,updateDroppableIsEnabled:tu,updateDroppableIsCombineEnabled:nu,collectionStarting:Qc},p),[p]),v=hd(),g=G(()=>Hu(v,h),[v,h]),m=G(()=>id({scrollWindow:ku,scrollDroppable:g.scrollDroppable,getAutoScrollerOptions:c,...wr({move:di},p)}),[g.scrollDroppable,p,c]),b=fd(t),y=G(()=>Fu({announce:d,autoScroller:m,dimensionMarshal:g,focusMarshal:b,getResponders:l,styleMarshal:f}),[d,m,g,b,l,f]);a.current=y;const E=R(()=>{const P=He(a);P.getState().phase!=="IDLE"&&P.dispatch($n())},[]),w=R(()=>{const P=He(a).getState();return P.phase==="DROP_ANIMATING"?!0:P.phase==="IDLE"?!1:P.isDragging},[]),S=G(()=>({isDragging:w,tryAbort:E}),[w,E]);n(S);const I=R(P=>xi(He(a).getState(),P),[]),D=R(()=>Pe(He(a).getState()),[]),$=G(()=>({marshal:g,focus:b,contextId:t,canLift:I,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:v}),[t,g,u,b,I,D,v]);return of({contextId:t,store:y,registry:v,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),x.useEffect(()=>E,[E]),A.createElement(At.Provider,{value:$},A.createElement(Al,{context:kn,store:y},e.children))}function cf(){return A.useId()}function hp(e){const t=cf(),n=e.dragHandleUsageInstructions||lt.dragHandleUsageInstructions;return A.createElement(Ul,null,r=>A.createElement(lf,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,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 no={dragging:5e3,dropAnimating:4500},uf=(e,t)=>t?je.drop(t.duration):e?je.snap:je.fluid,df=(e,t)=>{if(e)return t?Xe.opacity.drop:Xe.opacity.combining},ff=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function pf(e){const n=e.dimension.client,{offset:r,combineWith:o,dropping:i}=e,a=!!o,s=ff(e),l=!!i,c=l?fn.drop(r,a):fn.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:uf(s,i),transform:c,opacity:df(a,l),zIndex:l?no.dropAnimating:no.dragging,pointerEvents:"none"}}function hf(e){return{transform:fn.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function gf(e){return e.type==="DRAGGING"?pf(e):hf(e)}function mf(e,t,n=K){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Uo(o,r),a=pt(i,n),s={client:i,tagName:t.tagName.toLowerCase(),display:r.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:s,displaceBy:l,client:i,page:a}}function vf(e){const t=Vn("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=G(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=R(p=>{const h=o();return h||C(),mf(n,h,p)},[n,o]),d=G(()=>({uniqueId:t,descriptor:n,options:l,getDimension:c}),[n,c,l,t]),u=x.useRef(d),f=x.useRef(!0);ae(()=>(r.draggable.register(u.current),()=>r.draggable.unregister(u.current)),[r.draggable]),ae(()=>{if(f.current){f.current=!1;return}const p=u.current;u.current=d,r.draggable.update(d,p)},[d,r.draggable])}var qn=A.createContext(null);function bt(e){const t=x.useContext(e);return t||C(),t}function bf(e){e.preventDefault()}const yf=e=>{const t=x.useRef(null),n=R((S=null)=>{t.current=S},[]),r=R(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:a}=bt(At),{type:s,droppableId:l}=bt(qn),c=G(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:d,draggableId:u,isEnabled:f,shouldRespectForcePress:p,canDragInteractiveElements:h,isClone:v,mapped:g,dropAnimationFinished:m}=e;if(!v){const S=G(()=>({descriptor:c,registry:a,getDraggableRef:r,canDragInteractiveElements:h,shouldRespectForcePress:p,isEnabled:f}),[c,a,r,h,p,f]);vf(S)}const b=G(()=>f?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:bf}:null,[o,i,u,f]),y=R(S=>{g.type==="DRAGGING"&&g.dropping&&S.propertyName==="transform"&&co.flushSync(m)},[m,g]),E=G(()=>{const S=gf(g),I=g.type==="DRAGGING"&&g.dropping?y:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":u,style:S,onTransitionEnd:I},dragHandleProps:b}},[o,b,u,g,y,n]),w=G(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return A.createElement(A.Fragment,null,d(E,g.snapshot,w))};var Bi=(e,t)=>e===t,Li=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const xf=e=>e.combine?e.combine.draggableId:null,Ef=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function Sf(){const e=Y((o,i)=>({x:o,y:i})),t=Y((o,i,a=null,s=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:o,draggingOver:a,combineWith:s,combineTargetFor:null})),n=Y((o,i,a,s,l=null,c=null,d=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:i,offset:o,dimension:a,forceShouldAnimate:d,snapshot:t(i,s,l,c,null)}}));return(o,i)=>{if(Qe(o)){if(o.critical.draggable.id!==i.draggableId)return null;const a=o.current.client.offset,s=o.dimensions.draggables[i.draggableId],l=ie(o.impact),c=Ef(o.impact),d=o.forceShouldAnimate;return n(e(a.x,a.y),o.movementMode,s,i.isClone,l,c,d)}if(o.phase==="DROP_ANIMATING"){const a=o.completed;if(a.result.draggableId!==i.draggableId)return null;const s=i.isClone,l=o.dimensions.draggables[i.draggableId],c=a.result,d=c.mode,u=Li(c),f=xf(c),h={duration:o.dropDuration,curve:Fn.drop,moveTo:o.newHomeClientOffset,opacity:f?Xe.opacity.drop:null,scale:f?Xe.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:l,dropping:h,draggingOver:u,combineWith:f,mode:d,forceShouldAnimate:null,snapshot:t(d,s,u,f,h)}}}return null}}function Mi(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Cf={mapped:{type:"SECONDARY",offset:K,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Mi(null)}};function wf(){const e=Y((a,s)=>({x:a,y:s})),t=Y(Mi),n=Y((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:t(s)}})),r=a=>a?n(K,a,!0):null,o=(a,s,l,c)=>{const d=l.displaced.visible[a],u=!!(c.inVirtualList&&c.effected[a]),f=Dt(l),p=f&&f.draggableId===a?s:null;if(!d){if(!u)return r(p);if(l.displaced.invisible[a])return null;const g=Me(c.displacedBy.point),m=e(g.x,g.y);return n(m,p,!0)}if(u)return r(p);const h=l.displacedBy.point,v=e(h.x,h.y);return n(v,p,d.shouldAnimate)};return(a,s)=>{if(Qe(a))return a.critical.draggable.id===s.draggableId?null:o(s.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){const l=a.completed;return l.result.draggableId===s.draggableId?null:o(s.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const Df=()=>{const e=Sf(),t=wf();return(r,o)=>e(r,o)||t(r,o)||Cf},If={dropAnimationFinished:pi},Pf=Fo(Df,If,null,{context:kn,areStatePropsEqual:Bi})(yf);function $i(e){return bt(qn).isUsingCloneFor===e.draggableId&&!e.isClone?null:A.createElement(Pf,e)}function gp(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return A.createElement($i,z({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const _i=e=>t=>e===t,Rf=_i("scroll"),Af=_i("auto"),ro=(e,t)=>t(e.overflowX)||t(e.overflowY),Of=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return ro(n,Rf)||ro(n,Af)},Tf=()=>!1,Fi=e=>e==null?null:e===document.body?Tf()?e:null:e===document.documentElement?null:Of(e)?e:Fi(e.parentElement);var gn=e=>({x:e.scrollLeft,y:e.scrollTop});const Gi=e=>e?window.getComputedStyle(e).position==="fixed"?!0:Gi(e.parentElement):!1;var Nf=e=>{const t=Fi(e),n=Gi(e);return{closestScrollable:t,isFixedOnPage:n}},Bf=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:f,client:p}=s,h=vi({scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,height:p.paddingBox.height,width:p.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:p,scrollSize:f,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:h,diff:{value:K,displacement:K}}}})(),c=o==="vertical"?Tn:Jo,d=Oe({page:a,withPlaceholder:null,axis:c,frame:l});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:d}};const Lf=(e,t)=>{const n=Wo(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,l=Pn({top:r,right:a,bottom:i,left:o},n.border);return Rn({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})};var Mf=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=Lf(e,l),d=pt(c,r),u=(()=>{if(!l)return null;const p=Wo(l),h={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:p,page:pt(p,r),scroll:gn(l),scrollSize:h,shouldClipSubject:s}})();return Bf({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:d,closest:u})};const $f={passive:!1},_f={passive:!0};var oo=e=>e.shouldPublishImmediately?$f:_f;const at=e=>e&&e.env.closestScrollable||null;function Ff(e){const t=x.useRef(null),n=bt(At),r=Vn("droppable"),{registry:o,marshal:i}=n,a=Ii(e),s=G(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=x.useRef(s),c=G(()=>Y((E,w)=>{t.current||C();const S={x:E,y:w};i.updateDroppableScroll(s.id,S)}),[s.id,i]),d=R(()=>{const E=t.current;return!E||!E.env.closestScrollable?K:gn(E.env.closestScrollable)},[]),u=R(()=>{const E=d();c(E.x,E.y)},[d,c]),f=G(()=>ze(u),[u]),p=R(()=>{const E=t.current,w=at(E);if(E&&w||C(),E.scrollOptions.shouldPublishImmediately){u();return}f()},[f,u]),h=R((E,w)=>{t.current&&C();const S=a.current,I=S.getDroppableRef();I||C();const D=Nf(I),$={ref:I,descriptor:s,env:D,scrollOptions:w};t.current=$;const P=Mf({ref:I,descriptor:s,env:D,windowScroll:E,direction:S.direction,isDropDisabled:S.isDropDisabled,isCombineEnabled:S.isCombineEnabled,shouldClipSubject:!S.ignoreContainerClipping}),T=D.closestScrollable;return T&&(T.setAttribute(Zr.contextId,n.contextId),T.addEventListener("scroll",p,oo($.scrollOptions))),P},[n.contextId,s,p,a]),v=R(()=>{const E=t.current,w=at(E);return E&&w||C(),gn(w)},[]),g=R(()=>{const E=t.current;E||C();const w=at(E);t.current=null,w&&(f.cancel(),w.removeAttribute(Zr.contextId),w.removeEventListener("scroll",p,oo(E.scrollOptions)))},[p,f]),m=R(E=>{const w=t.current;w||C();const S=at(w);S||C(),S.scrollTop+=E.y,S.scrollLeft+=E.x},[]),b=G(()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:v,dragStopped:g,scroll:m}),[g,h,v,m]),y=G(()=>({uniqueId:r,descriptor:s,callbacks:b}),[b,s,r]);ae(()=>(l.current=y.descriptor,o.droppable.register(y),()=>{t.current&&g(),o.droppable.unregister(y)}),[b,s,g,y,i,o.droppable]),ae(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),ae(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function Zt(){}const io={width:0,height:0,margin:ql},Gf=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?io:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},Uf=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=Gf({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?je.placeholder:null}},Wf=e=>{const t=x.useRef(null),n=R(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:a}=e,[s,l]=x.useState(e.animate==="open");x.useEffect(()=>s?r!=="open"?(n(),l(!1),Zt):t.current?Zt:(t.current=setTimeout(()=>{t.current=null,l(!1)}),n):Zt,[r,s,n]);const c=R(u=>{u.propertyName==="height"&&(o(),r==="close"&&i())},[r,i,o]),d=Uf({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return A.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})};var Hf=A.memo(Wf);class kf extends A.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,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.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 Vf=e=>{const t=x.useContext(At);t||C();const{contextId:n,isMovementAllowed:r}=t,o=x.useRef(null),i=x.useRef(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:f,isCombineEnabled:p,snapshot:h,useClone:v,updateViewportMaxScroll:g,getContainerForClone:m}=e,b=R(()=>o.current,[]),y=R((T=null)=>{o.current=T},[]);R(()=>i.current,[]);const E=R((T=null)=>{i.current=T},[]),w=R(()=>{r()&&g({maxScroll:yi()})},[r,g]);Ff({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:u,getDroppableRef:b});const S=G(()=>A.createElement(kf,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:T,data:N,animate:U})=>A.createElement(Hf,{placeholder:N,onClose:T,innerRef:E,animate:U,contextId:n,onTransitionEnd:w})),[n,w,e.placeholder,e.shouldAnimatePlaceholder,E]),I=G(()=>({innerRef:y,placeholder:S,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,S,y]),D=v?v.dragging.draggableId:null,$=G(()=>({droppableId:s,type:l,isUsingCloneFor:D}),[s,D,l]);function P(){if(!v)return null;const{dragging:T,render:N}=v,U=A.createElement($i,{draggableId:T.draggableId,index:T.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(k,_)=>N(k,_,T));return ki.createPortal(U,m())}return A.createElement(qn.Provider,{value:$},a(I,h),P())};function jf(){return document.body||C(),document.body}const ao={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:jf},Ui=e=>{let t={...e},n;for(n in ao)e[n]===void 0&&(t={...t,[n]:ao[n]});return t},Qt=(e,t)=>e===t.droppable.type,so=(e,t)=>t.draggables[e.draggable.id],qf=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=Y(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=Y((i,a,s,l,c,d)=>{const u=c.descriptor.id;if(c.descriptor.droppableId===i){const h=d?{render:d,dragging:n(c.descriptor)}:null,v={isDraggingOver:s,draggingOverWith:s?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:v,useClone:h}}if(!a)return t;if(!l)return e;const p={isDraggingOver:s,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}});return(i,a)=>{const s=Ui(a),l=s.droppableId,c=s.type,d=!s.isDropDisabled,u=s.renderClone;if(Qe(i)){const f=i.critical;if(!Qt(c,f))return t;const p=so(f,i.dimensions),h=ie(i.impact)===l;return r(l,d,h,h,p,u)}if(i.phase==="DROP_ANIMATING"){const f=i.completed;if(!Qt(c,f.critical))return t;const p=so(f.critical,i.dimensions);return r(l,d,Li(f.result)===l,ie(f.impact)===l,p,u)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const f=i.completed;if(!Qt(c,f.critical))return t;const p=ie(f.impact)===l,h=!!(f.impact.at&&f.impact.at.type==="COMBINE"),v=f.critical.droppable.id===l;return p?h?e:t:v?e:t}return t}},zf={updateViewportMaxScroll:ou},Yf=Fo(qf,zf,(e,t,n)=>({...Ui(n),...e,...t}),{context:kn,areStatePropsEqual:Bi})(Vf);var mp=Yf;export{ap as B,mp as C,hp as D,Aa as L,ep as M,sp as N,up as O,gp as P,tp as R,rp as S,z as _,yt as a,he as b,Da as c,np as d,Qf as e,op as f,wn as g,Le as h,lp as i,dp as j,fp as k,xs as l,Et as m,Ao as n,cp as o,en as p,ne as q,qi as r,ip as s,pp as t,Ia as u,Zf as w};