@blockbite/libraries 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libraries.js +2718 -3079
- package/dist/libraries.js.map +1 -1
- package/dist/libraries.umd.cjs +8 -8
- package/dist/libraries.umd.cjs.map +1 -1
- package/package.json +2 -2
package/dist/libraries.umd.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/var Sn,Qn,ei,br=(Zn||(Zn=1,Sn=qn,(function(){var e={}.hasOwnProperty;function t(){for(var n=[],i=0;i<arguments.length;i++){var r=arguments[i];if(r){var o=typeof r;if(o==="string"||o==="number")n.push(r);else if(Array.isArray(r)){if(r.length){var l=t.apply(null,r);l&&n.push(l)}}else if(o==="object")if(r.toString===Object.prototype.toString)for(var a in r)e.call(r,a)&&r[a]&&n.push(a);else n.push(r.toString())}}return n.join(" ")}Sn.exports?(t.default=t,Sn.exports=t):window.classNames=t})()),qn.exports),Rn=It(br),ti,Me=It((function(){if(ei)return Qn;ei=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,r=parseInt,o=Object.prototype.toString;function l(s){var c=typeof s;return!!s&&(c=="object"||c=="function")}function a(s){if(typeof s=="number")return s;if((function(u){return typeof u=="symbol"||(function(v){return!!v&&typeof v=="object"})(u)&&o.call(u)=="[object Symbol]"})(s))return NaN;if(l(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=l(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=s.replace(e,"");var d=n.test(s);return d||i.test(s)?r(s.slice(2),d?2:8):t.test(s)?NaN:+s}return Qn=function(s,c,d){return d===void 0&&(d=c,c=void 0),d!==void 0&&(d=(d=a(d))==d?d:0),c!==void 0&&(c=(c=a(c))==c?c:0),(function(u,v,f){return u==u&&(f!==void 0&&(u=u<=f?u:f),v!==void 0&&(u=u>=v?u:v)),u})(a(s),c,d)}})()),xn={exports:{}},yr=(ti||(ti=1,(function(e,t){var n="__lodash_hash_undefined__",i=9007199254740991,r="[object Arguments]",o="[object Array]",l="[object Boolean]",a="[object Date]",s="[object Error]",c="[object Function]",d="[object Map]",u="[object Number]",v="[object Object]",f="[object Promise]",g="[object RegExp]",w="[object Set]",b="[object String]",y="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",R="[object DataView]",D=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,m={};m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m[r]=m[o]=m[S]=m[l]=m[R]=m[a]=m[s]=m[c]=m[d]=m[u]=m[v]=m[g]=m[w]=m[b]=m[_]=!1;var z=typeof Ze=="object"&&Ze&&Ze.Object===Object&&Ze,V=typeof self=="object"&&self&&self.Object===Object&&self,N=z||V||Function("return this")(),k=t&&!t.nodeType&&t,L=k&&e&&!e.nodeType&&e,A=L&&L.exports===k,F=A&&z.process,P=(function(){try{return F&&F.binding&&F.binding("util")}catch{}})(),$=P&&P.isTypedArray;function T(h,p){for(var x=-1,I=h==null?0:h.length;++x<I;)if(p(h[x],x,h))return!0;return!1}function W(h){var p=-1,x=Array(h.size);return h.forEach(function(I,X){x[++p]=[X,I]}),x}function se(h){var p=-1,x=Array(h.size);return h.forEach(function(I){x[++p]=I}),x}var ge,G,J,U=Array.prototype,ae=Function.prototype,fe=Object.prototype,ee=N["__core-js_shared__"],Le=ae.toString,C=fe.hasOwnProperty,M=(ge=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||""))?"Symbol(src)_1."+ge:"",O=fe.toString,K=RegExp("^"+Le.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=A?N.Buffer:void 0,Ve=N.Symbol,Ee=N.Uint8Array,He=fe.propertyIsEnumerable,et=U.splice,ke=Ve?Ve.toStringTag:void 0,jt=Object.getOwnPropertySymbols,Bt=ye?ye.isBuffer:void 0,je=(G=Object.keys,J=Object,function(h){return G(J(h))}),tt=Se(N,"DataView"),Be=Se(N,"Map"),bt=Se(N,"Promise"),yt=Se(N,"Set"),Ft=Se(N,"WeakMap"),lt=Se(Object,"create"),nt=ce(tt),it=ce(Be),ct=ce(bt),hn=ce(yt),Fe=ce(Ft),$t=Ve?Ve.prototype:void 0,Yt=$t?$t.valueOf:void 0;function Xe(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var I=h[p];this.set(I[0],I[1])}}function _e(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var I=h[p];this.set(I[0],I[1])}}function $e(h){var p=-1,x=h==null?0:h.length;for(this.clear();++p<x;){var I=h[p];this.set(I[0],I[1])}}function _t(h){var p=-1,x=h==null?0:h.length;for(this.__data__=new $e;++p<x;)this.add(h[p])}function Te(h){var p=this.__data__=new _e(h);this.size=p.size}function Wn(h,p){var x=Re(h),I=!x&&dt(h),X=!x&&!I&&We(h),j=!x&&!I&&!X&&pr(h),Z=x||I||X||j,q=Z?(function(re,Ke){for(var Ue=-1,we=Array(re);++Ue<re;)we[Ue]=Ke(Ue);return we})(h.length,String):[],Pe=q.length;for(var ie in h)!C.call(h,ie)||Z&&(ie=="length"||X&&(ie=="offset"||ie=="parent")||j&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||Ce(ie,Pe))||q.push(ie);return q}function St(h,p){for(var x=h.length;x--;)if(rt(h[x][0],p))return x;return-1}function ut(h){return h==null?h===void 0?"[object Undefined]":"[object Null]":ke&&ke in Object(h)?(function(p){var x=C.call(p,ke),I=p[ke];try{p[ke]=void 0;var X=!0}catch{}var j=O.call(p);return X&&(x?p[ke]=I:delete p[ke]),j})(h):(function(p){return O.call(p)})(h)}function te(h){return Kt(h)&&ut(h)==r}function ue(h,p,x,I,X){return h===p||(h==null||p==null||!Kt(h)&&!Kt(p)?h!=h&&p!=p:(function(j,Z,q,Pe,ie,re){var Ke=Re(j),Ue=Re(Z),we=Ke?o:le(j),Ge=Ue?o:le(Z),xt=(we=we==r?v:we)==v,fn=(Ge=Ge==r?v:Ge)==v,zt=we==Ge;if(zt&&We(j)){if(!We(Z))return!1;Ke=!0,xt=!1}if(zt&&!xt)return re||(re=new Te),Ke||pr(j)?pe(j,Z,q,Pe,ie,re):(function(H,Y,vn,ot,Un,Oe,Je){switch(vn){case R:if(H.byteLength!=Y.byteLength||H.byteOffset!=Y.byteOffset)return!1;H=H.buffer,Y=Y.buffer;case S:return!(H.byteLength!=Y.byteLength||!Oe(new Ee(H),new Ee(Y)));case l:case a:case u:return rt(+H,+Y);case s:return H.name==Y.name&&H.message==Y.message;case g:case b:return H==Y+"";case d:var st=W;case w:var Xt=1&ot;if(st||(st=se),H.size!=Y.size&&!Xt)return!1;var pn=Je.get(H);if(pn)return pn==Y;ot|=2,Je.set(H,Y);var Gn=pe(st(H),st(Y),ot,Un,Oe,Je);return Je.delete(H),Gn;case y:if(Yt)return Yt.call(H)==Yt.call(Y)}return!1})(j,Z,we,q,Pe,ie,re);if(!(1&q)){var Ht=xt&&C.call(j,"__wrapped__"),mr=fn&&C.call(Z,"__wrapped__");if(Ht||mr){var Ks=Ht?j.value():j,Hs=mr?Z.value():Z;return re||(re=new Te),ie(Ks,Hs,q,Pe,re)}}return!!zt&&(re||(re=new Te),(function(H,Y,vn,ot,Un,Oe){var Je=1&vn,st=de(H),Xt=st.length,pn=de(Y),Gn=pn.length;if(Xt!=Gn&&!Je)return!1;for(var mn=Xt;mn--;){var ht=st[mn];if(!(Je?ht in Y:C.call(Y,ht)))return!1}var wr=Oe.get(H);if(wr&&Oe.get(Y))return wr==Y;var wn=!0;Oe.set(H,Y),Oe.set(Y,H);for(var Jn=Je;++mn<Xt;){var gn=H[ht=st[mn]],bn=Y[ht];if(ot)var gr=Je?ot(bn,gn,ht,Y,H,Oe):ot(gn,bn,ht,H,Y,Oe);if(!(gr===void 0?gn===bn||Un(gn,bn,vn,ot,Oe):gr)){wn=!1;break}Jn||(Jn=ht=="constructor")}if(wn&&!Jn){var yn=H.constructor,_n=Y.constructor;yn==_n||!("constructor"in H)||!("constructor"in Y)||typeof yn=="function"&&yn instanceof yn&&typeof _n=="function"&&_n instanceof _n||(wn=!1)}return Oe.delete(H),Oe.delete(Y),wn})(j,Z,q,Pe,ie,re))})(h,p,x,I,ue,X))}function ve(h){return!(!vr(h)||(function(p){return!!M&&M in p})(h))&&(Rt(h)?K:D).test(ce(h))}function Ye(h){if(x=(p=h)&&p.constructor,I=typeof x=="function"&&x.prototype||fe,p!==I)return je(h);var p,x,I,X=[];for(var j in Object(h))C.call(h,j)&&j!="constructor"&&X.push(j);return X}function pe(h,p,x,I,X,j){var Z=1&x,q=h.length,Pe=p.length;if(q!=Pe&&!(Z&&Pe>q))return!1;var ie=j.get(h);if(ie&&j.get(p))return ie==p;var re=-1,Ke=!0,Ue=2&x?new _t:void 0;for(j.set(h,p),j.set(p,h);++re<q;){var we=h[re],Ge=p[re];if(I)var xt=Z?I(Ge,we,re,p,h,j):I(we,Ge,re,h,p,j);if(xt!==void 0){if(xt)continue;Ke=!1;break}if(Ue){if(!T(p,function(fn,zt){if(Ht=zt,!Ue.has(Ht)&&(we===fn||X(we,fn,x,I,j)))return Ue.push(zt);var Ht})){Ke=!1;break}}else if(we!==Ge&&!X(we,Ge,x,I,j)){Ke=!1;break}}return j.delete(h),j.delete(p),Ke}function de(h){return(function(p,x,I){var X=x(p);return Re(p)?X:(function(j,Z){for(var q=-1,Pe=Z.length,ie=j.length;++q<Pe;)j[ie+q]=Z[q];return j})(X,I(p))})(h,Ys,ne)}function me(h,p){var x,I,X=h.__data__;return((I=typeof(x=p))=="string"||I=="number"||I=="symbol"||I=="boolean"?x!=="__proto__":x===null)?X[typeof p=="string"?"string":"hash"]:X.map}function Se(h,p){var x=(function(I,X){return I==null?void 0:I[X]})(h,p);return ve(x)?x:void 0}Xe.prototype.clear=function(){this.__data__=lt?lt(null):{},this.size=0},Xe.prototype.delete=function(h){var p=this.has(h)&&delete this.__data__[h];return this.size-=p?1:0,p},Xe.prototype.get=function(h){var p=this.__data__;if(lt){var x=p[h];return x===n?void 0:x}return C.call(p,h)?p[h]:void 0},Xe.prototype.has=function(h){var p=this.__data__;return lt?p[h]!==void 0:C.call(p,h)},Xe.prototype.set=function(h,p){var x=this.__data__;return this.size+=this.has(h)?0:1,x[h]=lt&&p===void 0?n:p,this},_e.prototype.clear=function(){this.__data__=[],this.size=0},_e.prototype.delete=function(h){var p=this.__data__,x=St(p,h);return!(x<0||(x==p.length-1?p.pop():et.call(p,x,1),--this.size,0))},_e.prototype.get=function(h){var p=this.__data__,x=St(p,h);return x<0?void 0:p[x][1]},_e.prototype.has=function(h){return St(this.__data__,h)>-1},_e.prototype.set=function(h,p){var x=this.__data__,I=St(x,h);return I<0?(++this.size,x.push([h,p])):x[I][1]=p,this},$e.prototype.clear=function(){this.size=0,this.__data__={hash:new Xe,map:new(Be||_e),string:new Xe}},$e.prototype.delete=function(h){var p=me(this,h).delete(h);return this.size-=p?1:0,p},$e.prototype.get=function(h){return me(this,h).get(h)},$e.prototype.has=function(h){return me(this,h).has(h)},$e.prototype.set=function(h,p){var x=me(this,h),I=x.size;return x.set(h,p),this.size+=x.size==I?0:1,this},_t.prototype.add=_t.prototype.push=function(h){return this.__data__.set(h,n),this},_t.prototype.has=function(h){return this.__data__.has(h)},Te.prototype.clear=function(){this.__data__=new _e,this.size=0},Te.prototype.delete=function(h){var p=this.__data__,x=p.delete(h);return this.size=p.size,x},Te.prototype.get=function(h){return this.__data__.get(h)},Te.prototype.has=function(h){return this.__data__.has(h)},Te.prototype.set=function(h,p){var x=this.__data__;if(x instanceof _e){var I=x.__data__;if(!Be||I.length<199)return I.push([h,p]),this.size=++x.size,this;x=this.__data__=new $e(I)}return x.set(h,p),this.size=x.size,this};var ne=jt?function(h){return h==null?[]:(h=Object(h),(function(p,x){for(var I=-1,X=p==null?0:p.length,j=0,Z=[];++I<X;){var q=p[I];x(q,I,p)&&(Z[j++]=q)}return Z})(jt(h),function(p){return He.call(h,p)}))}:function(){return[]},le=ut;function Ce(h,p){return!!(p=p??i)&&(typeof h=="number"||E.test(h))&&h>-1&&h%1==0&&h<p}function ce(h){if(h!=null){try{return Le.call(h)}catch{}try{return h+""}catch{}}return""}function rt(h,p){return h===p||h!=h&&p!=p}(tt&&le(new tt(new ArrayBuffer(1)))!=R||Be&&le(new Be)!=d||bt&&le(bt.resolve())!=f||yt&&le(new yt)!=w||Ft&&le(new Ft)!=_)&&(le=function(h){var p=ut(h),x=p==v?h.constructor:void 0,I=x?ce(x):"";if(I)switch(I){case nt:return R;case it:return d;case ct:return f;case hn:return w;case Fe:return _}return p});var dt=te((function(){return arguments})())?te:function(h){return Kt(h)&&C.call(h,"callee")&&!He.call(h,"callee")},Re=Array.isArray,We=Bt||function(){return!1};function Rt(h){if(!vr(h))return!1;var p=ut(h);return p==c||p=="[object GeneratorFunction]"||p=="[object AsyncFunction]"||p=="[object Proxy]"}function fr(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=i}function vr(h){var p=typeof h;return h!=null&&(p=="object"||p=="function")}function Kt(h){return h!=null&&typeof h=="object"}var pr=$?(function(h){return function(p){return h(p)}})($):function(h){return Kt(h)&&fr(h.length)&&!!m[ut(h)]};function Ys(h){return(p=h)!=null&&fr(p.length)&&!Rt(p)?Wn(h):Ye(h);var p}e.exports=function(h,p){return ue(h,p)}})(xn,xn.exports)),xn.exports),_r=It(yr);function ni(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function Sr(e){e===void 0&&(e={});var t=e.onResize,n=window.React.useRef(void 0);n.current=t;var i=e.round||Math.round,r=window.React.useRef(),o=window.React.useState({width:void 0,height:void 0}),l=o[0],a=o[1],s=window.React.useRef(!1);window.React.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);var c=window.React.useRef({width:void 0,height:void 0}),d=(function(u,v){var f=window.React.useRef(null),g=window.React.useRef(null);g.current=v;var w=window.React.useRef(null);window.React.useEffect(function(){b()});var b=window.React.useCallback(function(){var y=w.current,_=g.current,S=y||(_?_ instanceof Element?_:_.current:null);f.current&&f.current.element===S&&f.current.subscriber===u||(f.current&&f.current.cleanup&&f.current.cleanup(),f.current={element:S,subscriber:u,cleanup:S?u(S):void 0})},[u]);return window.React.useEffect(function(){return function(){f.current&&f.current.cleanup&&(f.current.cleanup(),f.current=null)}},[]),window.React.useCallback(function(y){w.current=y,b()},[b])})(window.React.useCallback(function(u){return r.current&&r.current.box===e.box&&r.current.round===i||(r.current={box:e.box,round:i,instance:new ResizeObserver(function(v){var f=v[0],g=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",w=ni(f,g,"inlineSize"),b=ni(f,g,"blockSize"),y=w?i(w):void 0,_=b?i(b):void 0;if(c.current.width!==y||c.current.height!==_){var S={width:y,height:_};c.current.width=y,c.current.height=_,n.current?n.current(S):s.current||a(S)}})}),r.current.instance.observe(u,{box:e.box}),function(){r.current&&r.current.instance.unobserve(u)}},[e.box,i]),e.ref);return window.React.useMemo(function(){return{ref:d,width:l.width,height:l.height}},[d,l.width,l.height])}var Rr="allotment-module_splitView__L-yRc",xr="allotment-module_sashContainer__fzwJF",zr="allotment-module_splitViewContainer__rQnVa",ii="allotment-module_splitViewView__MGZ6O",Dr="allotment-module_vertical__WSwwa",Ir="allotment-module_horizontal__7doS8",Er="allotment-module_separatorBorder__x-rDS";let Et,ri=!1,oi=!1;typeof navigator=="object"&&(Et=navigator.userAgent,oi=Et.indexOf("Macintosh")>=0,ri=(Et.indexOf("Macintosh")>=0||Et.indexOf("iPad")>=0||Et.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0);const si=ri,Cr=oi,ai=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?window.React.useLayoutEffect:window.React.useEffect;class Or{constructor(){this._size=void 0}getSize(){return this._size}setSize(t){this._size=t}}function Wt(e,t){const n=e.length,i=n-t.length;return i>=0&&e.slice(i,n)===t}var li,ci={exports:{}},ui,di,Mr=(li||(li=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(s,c,d){this.fn=s,this.context=c,this.once=d||!1}function o(s,c,d,u,v){if(typeof d!="function")throw new TypeError("The listener must be a function");var f=new r(d,u||s,v),g=n?n+c:c;return s._events[g]?s._events[g].fn?s._events[g]=[s._events[g],f]:s._events[g].push(f):(s._events[g]=f,s._eventsCount++),s}function l(s,c){--s._eventsCount==0?s._events=new i:delete s._events[c]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1)),a.prototype.eventNames=function(){var s,c,d=[];if(this._eventsCount===0)return d;for(c in s=this._events)t.call(s,c)&&d.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(s)):d},a.prototype.listeners=function(s){var c=n?n+s:s,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var u=0,v=d.length,f=new Array(v);u<v;u++)f[u]=d[u].fn;return f},a.prototype.listenerCount=function(s){var c=n?n+s:s,d=this._events[c];return d?d.fn?1:d.length:0},a.prototype.emit=function(s,c,d,u,v,f){var g=n?n+s:s;if(!this._events[g])return!1;var w,b,y=this._events[g],_=arguments.length;if(y.fn){switch(y.once&&this.removeListener(s,y.fn,void 0,!0),_){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,c),!0;case 3:return y.fn.call(y.context,c,d),!0;case 4:return y.fn.call(y.context,c,d,u),!0;case 5:return y.fn.call(y.context,c,d,u,v),!0;case 6:return y.fn.call(y.context,c,d,u,v,f),!0}for(b=1,w=new Array(_-1);b<_;b++)w[b-1]=arguments[b];y.fn.apply(y.context,w)}else{var S,R=y.length;for(b=0;b<R;b++)switch(y[b].once&&this.removeListener(s,y[b].fn,void 0,!0),_){case 1:y[b].fn.call(y[b].context);break;case 2:y[b].fn.call(y[b].context,c);break;case 3:y[b].fn.call(y[b].context,c,d);break;case 4:y[b].fn.call(y[b].context,c,d,u);break;default:if(!w)for(S=1,w=new Array(_-1);S<_;S++)w[S-1]=arguments[S];y[b].fn.apply(y[b].context,w)}}return!0},a.prototype.on=function(s,c,d){return o(this,s,c,d,!1)},a.prototype.once=function(s,c,d){return o(this,s,c,d,!0)},a.prototype.removeListener=function(s,c,d,u){var v=n?n+s:s;if(!this._events[v])return this;if(!c)return l(this,v),this;var f=this._events[v];if(f.fn)f.fn!==c||u&&!f.once||d&&f.context!==d||l(this,v);else{for(var g=0,w=[],b=f.length;g<b;g++)(f[g].fn!==c||u&&!f[g].once||d&&f[g].context!==d)&&w.push(f[g]);w.length?this._events[v]=w.length===1?w[0]:w:l(this,v)}return this},a.prototype.removeAllListeners=function(s){var c;return s?(c=n?n+s:s,this._events[c]&&l(this,c)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(ci)),ci.exports),zn=It(Mr);function hi(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function Dn(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function xe(e,t,n=1){const i=Math.max(0,Math.ceil((t-e)/n)),r=new Array(i);let o=-1;for(;++o<i;)r[o]=e+o*n;return r}var Nr=It((function(){if(di)return ui;di=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,r=parseInt,o=typeof Ze=="object"&&Ze&&Ze.Object===Object&&Ze,l=typeof self=="object"&&self&&self.Object===Object&&self,a=o||l||Function("return this")(),s=Object.prototype.toString,c=Math.max,d=Math.min,u=function(){return a.Date.now()};function v(g){var w=typeof g;return!!g&&(w=="object"||w=="function")}function f(g){if(typeof g=="number")return g;if((function(y){return typeof y=="symbol"||(function(_){return!!_&&typeof _=="object"})(y)&&s.call(y)=="[object Symbol]"})(g))return NaN;if(v(g)){var w=typeof g.valueOf=="function"?g.valueOf():g;g=v(w)?w+"":w}if(typeof g!="string")return g===0?g:+g;g=g.replace(e,"");var b=n.test(g);return b||i.test(g)?r(g.slice(2),b?2:8):t.test(g)?NaN:+g}return ui=function(g,w,b){var y,_,S,R,D,E,m=0,z=!1,V=!1,N=!0;if(typeof g!="function")throw new TypeError("Expected a function");function k($){var T=y,W=_;return y=_=void 0,m=$,R=g.apply(W,T)}function L($){var T=$-E;return E===void 0||T>=w||T<0||V&&$-m>=S}function A(){var $=u();if(L($))return F($);D=setTimeout(A,(function(T){var W=w-(T-E);return V?d(W,S-(T-m)):W})($))}function F($){return D=void 0,N&&y?k($):(y=_=void 0,R)}function P(){var $=u(),T=L($);if(y=arguments,_=this,E=$,T){if(D===void 0)return(function(W){return m=W,D=setTimeout(A,w),z?k(W):R})(E);if(V)return D=setTimeout(A,w),k(E)}return D===void 0&&(D=setTimeout(A,w)),R}return w=f(w)||0,v(b)&&(z=!!b.leading,S=(V="maxWait"in b)?c(f(b.maxWait)||0,w):S,N="trailing"in b?!!b.trailing:N),P.cancel=function(){D!==void 0&&clearTimeout(D),m=0,y=E=_=D=void 0},P.flush=function(){return D===void 0?R:F(u())},P}})()),Ar="sash-module_sash__K-9lB",Lr="sash-module_disabled__Hm-wx",Vr="sash-module_mac__Jf6OJ",fi="sash-module_vertical__pB-rs",Tr="sash-module_minimum__-UKxp",Pr="sash-module_maximum__TCWxD",vi="sash-module_horizontal__kFbiw",In="sash-module_hover__80W6I",En="sash-module_active__bJspD";let ze=(function(e){return e.Vertical="VERTICAL",e.Horizontal="HORIZONTAL",e})({}),be=(function(e){return e.Disabled="DISABLED",e.Minimum="MINIMUM",e.Maximum="MAXIMUM",e.Enabled="ENABLED",e})({}),pi=si?20:8;const mi=new zn;class wi extends zn{get state(){return this._state}set state(t){this._state!==t&&(this.el.classList.toggle(Lr,t===be.Disabled),this.el.classList.toggle("sash-disabled",t===be.Disabled),this.el.classList.toggle(Tr,t===be.Minimum),this.el.classList.toggle("sash-minimum",t===be.Minimum),this.el.classList.toggle(Pr,t===be.Maximum),this.el.classList.toggle("sash-maximum",t===be.Maximum),this._state=t,this.emit("enablementChange",t))}constructor(t,n,i){var r;super(),this.el=void 0,this.layoutProvider=void 0,this.orientation=void 0,this.size=void 0,this.hoverDelay=300,this.hoverDelayer=Nr(o=>o.classList.add("sash-hover",In),this.hoverDelay),this._state=be.Enabled,this.onPointerStart=o=>{const l=o.pageX,a=o.pageY,s={startX:l,currentX:l,startY:a,currentY:a};this.el.classList.add("sash-active",En),this.emit("start",s),this.el.setPointerCapture(o.pointerId);const c=u=>{u.preventDefault();const v={startX:l,currentX:u.pageX,startY:a,currentY:u.pageY};this.emit("change",v)},d=u=>{u.preventDefault(),this.el.classList.remove("sash-active",En),this.hoverDelayer.cancel(),this.emit("end"),this.el.releasePointerCapture(u.pointerId),window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",d)};window.addEventListener("pointermove",c),window.addEventListener("pointerup",d)},this.onPointerDoublePress=()=>{this.emit("reset")},this.onMouseEnter=()=>{this.el.classList.contains(En)?(this.hoverDelayer.cancel(),this.el.classList.add("sash-hover",In)):this.hoverDelayer(this.el)},this.onMouseLeave=()=>{this.hoverDelayer.cancel(),this.el.classList.remove("sash-hover",In)},this.el=document.createElement("div"),this.el.classList.add("sash",Ar),this.el.dataset.testid="sash",t.append(this.el),Cr&&this.el.classList.add("sash-mac",Vr),this.el.addEventListener("pointerdown",this.onPointerStart),this.el.addEventListener("dblclick",this.onPointerDoublePress),this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("mouseleave",this.onMouseLeave),typeof i.size=="number"?(this.size=i.size,i.orientation===ze.Vertical?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=pi,mi.on("onDidChangeGlobalSize",o=>{this.size=o,this.layout()})),this.layoutProvider=n,this.orientation=(r=i.orientation)!=null?r:ze.Vertical,this.orientation===ze.Horizontal?(this.el.classList.add("sash-horizontal",vi),this.el.classList.remove("sash-vertical",fi)):(this.el.classList.remove("sash-horizontal",vi),this.el.classList.add("sash-vertical",fi)),this.layout()}layout(){if(this.orientation===ze.Vertical){const t=this.layoutProvider;this.el.style.left=t.getVerticalSashLeft(this)-this.size/2+"px",t.getVerticalSashTop&&(this.el.style.top=t.getVerticalSashTop(this)+"px"),t.getVerticalSashHeight&&(this.el.style.height=t.getVerticalSashHeight(this)+"px")}else{const t=this.layoutProvider;this.el.style.top=t.getHorizontalSashTop(this)-this.size/2+"px",t.getHorizontalSashLeft&&(this.el.style.left=t.getHorizontalSashLeft(this)+"px"),t.getHorizontalSashWidth&&(this.el.style.width=t.getHorizontalSashWidth(this)+"px")}}dispose(){this.el.removeEventListener("pointerdown",this.onPointerStart),this.el.removeEventListener("dblclick",this.onPointerDoublePress),this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("mouseleave",()=>this.onMouseLeave),this.el.remove()}}let Ut;var Cn;(Cn=Ut||(Ut={})).Distribute={type:"distribute"},Cn.Split=function(e){return{type:"split",index:e}},Cn.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}};let De=(function(e){return e.Normal="NORMAL",e.Low="LOW",e.High="HIGH",e})({});class gi{constructor(t,n,i){this.container=void 0,this.view=void 0,this._size=void 0,this._cachedVisibleSize=void 0,this.container=t,this.view=n,this.container.classList.add("split-view-view",ii),this.container.dataset.testid="split-view-view",typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,t.classList.add("split-view-view-visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(t){this._size=t}get size(){return this._size}get priority(){return this.view.priority}get snap(){return!!this.view.snap}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return this._cachedVisibleSize===void 0}setVisible(t,n){t!==this.visible&&(t?(this.size=Me(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof n=="number"?n:this.size,this.size=0),this.container.classList.toggle("split-view-view-visible",t),this.view.setVisible&&this.view.setVisible(t))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}set enabled(t){this.container.style.pointerEvents=t?"":"none"}layout(t){this.layoutContainer(t),this.view.layout(this.size,t)}}class kr extends gi{layoutContainer(t){this.container.style.left=`${t}px`,this.container.style.width=`${this.size}px`}}class jr extends gi{layoutContainer(t){this.container.style.top=`${t}px`,this.container.style.height=`${this.size}px`}}class Br extends zn{get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(t){this._startSnappingEnabled!==t&&(this._startSnappingEnabled=t,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(t){this._endSnappingEnabled!==t&&(this._endSnappingEnabled=t,this.updateSashEnablement())}constructor(t,n={},i,r,o){var l,a;if(super(),this.onDidChange=void 0,this.onDidDragStart=void 0,this.onDidDragEnd=void 0,this.orientation=void 0,this.sashContainer=void 0,this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.sashDragState=void 0,this.proportionalLayout=void 0,this.getSashOrthogonalSize=void 0,this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onSashEnd=s=>{this.emit("sashchange",s),this.saveProportions();for(const c of this.viewItems)c.enabled=!0},this.orientation=(l=n.orientation)!=null?l:ze.Vertical,this.proportionalLayout=(a=n.proportionalLayout)!=null?a:!0,this.getSashOrthogonalSize=n.getSashOrthogonalSize,i&&(this.onDidChange=i),r&&(this.onDidDragStart=r),o&&(this.onDidDragEnd=o),this.sashContainer=document.createElement("div"),this.sashContainer.classList.add("sash-container",xr),t.prepend(this.sashContainer),n.descriptor){this.size=n.descriptor.size;for(const[s,c]of n.descriptor.views.entries()){const d=c.size,u=c.container,v=c.view;this.addView(u,v,d,s,!0)}this.contentSize=this.viewItems.reduce((s,c)=>s+c.size,0),this.saveProportions()}}addView(t,n,i,r=this.viewItems.length,o){let l;l=typeof i=="number"?i:i.type==="split"?this.getViewSize(i.index)/2:i.type==="invisible"?{cachedVisibleSize:i.cachedVisibleSize}:n.minimumSize;const a=this.orientation===ze.Vertical?new jr(t,n,l):new kr(t,n,l);if(this.viewItems.splice(r,0,a),this.viewItems.length>1){const s=this.orientation===ze.Vertical?new wi(this.sashContainer,{getHorizontalSashTop:u=>this.getSashPosition(u),getHorizontalSashWidth:this.getSashOrthogonalSize},{orientation:ze.Horizontal}):new wi(this.sashContainer,{getVerticalSashLeft:u=>this.getSashPosition(u),getVerticalSashHeight:this.getSashOrthogonalSize},{orientation:ze.Vertical}),c=this.orientation===ze.Vertical?u=>({sash:s,start:u.startY,current:u.currentY}):u=>({sash:s,start:u.startX,current:u.currentX});s.on("start",u=>{var v;this.emit("sashDragStart"),this.onSashStart(c(u));const f=this.viewItems.map(g=>g.size);(v=this.onDidDragStart)==null||v.call(this,f)}),s.on("change",u=>this.onSashChange(c(u))),s.on("end",()=>{var u;this.emit("sashDragEnd"),this.onSashEnd(this.sashItems.findIndex(f=>f.sash===s));const v=this.viewItems.map(f=>f.size);(u=this.onDidDragEnd)==null||u.call(this,v)}),s.on("reset",()=>{const u=this.sashItems.findIndex(b=>b.sash===s),v=xe(u,-1,-1),f=xe(u+1,this.viewItems.length),g=this.findFirstSnapIndex(v),w=this.findFirstSnapIndex(f);(typeof g!="number"||this.viewItems[g].visible)&&(typeof w!="number"||this.viewItems[w].visible)&&this.emit("sashreset",u)});const d={sash:s};this.sashItems.splice(r-1,0,d)}o||this.relayout(),o||typeof i=="number"||i.type!=="distribute"||this.distributeViewSizes()}removeView(t,n){if(t<0||t>=this.viewItems.length)throw new Error("Index out of bounds");const i=this.viewItems.splice(t,1)[0].view;if(this.viewItems.length>=1){const r=Math.max(t-1,0);this.sashItems.splice(r,1)[0].sash.dispose()}return this.relayout(),n&&n.type==="distribute"&&this.distributeViewSizes(),i}moveView(t,n,i){const r=this.getViewCachedVisibleSize(n),o=r===void 0?this.getViewSize(n):Ut.Invisible(r),l=this.removeView(n);this.addView(t,l,o,i)}getViewCachedVisibleSize(t){if(t<0||t>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[t].cachedVisibleSize}layout(t=this.size){const n=Math.max(this.size,this.contentSize);if(this.size=t,this.proportions)for(let i=0;i<this.viewItems.length;i++){const r=this.viewItems[i];r.size=Me(Math.round(this.proportions[i]*t),r.minimumSize,r.maximumSize)}else{const i=xe(0,this.viewItems.length),r=i.filter(l=>this.viewItems[l].priority===De.Low),o=i.filter(l=>this.viewItems[l].priority===De.High);this.resize(this.viewItems.length-1,t-n,void 0,r,o)}this.distributeEmptySpace(),this.layoutViews()}resizeView(t,n){if(t<0||t>=this.viewItems.length)return;const i=xe(0,this.viewItems.length).filter(a=>a!==t),r=[...i.filter(a=>this.viewItems[a].priority===De.Low),t],o=i.filter(a=>this.viewItems[a].priority===De.High),l=this.viewItems[t];n=Math.round(n),n=Me(n,l.minimumSize,Math.min(l.maximumSize,this.size)),l.size=n,this.relayout(r,o)}resizeViews(t){for(let n=0;n<t.length;n++){const i=this.viewItems[n];let r=t[n];r=Math.round(r),r=Me(r,i.minimumSize,Math.min(i.maximumSize,this.size)),i.size=r}this.contentSize=this.viewItems.reduce((n,i)=>n+i.size,0),this.saveProportions(),this.layout(this.size)}getViewSize(t){return t<0||t>=this.viewItems.length?-1:this.viewItems[t].size}isViewVisible(t){if(t<0||t>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[t].visible}setViewVisible(t,n){if(t<0||t>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[t].setVisible(n),this.distributeEmptySpace(t),this.layoutViews(),this.saveProportions()}distributeViewSizes(){const t=[];let n=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(t.push(a),n+=a.size);const i=Math.floor(n/t.length);for(const a of t)a.size=Me(i,a.minimumSize,a.maximumSize);const r=xe(0,this.viewItems.length),o=r.filter(a=>this.viewItems[a].priority===De.Low),l=r.filter(a=>this.viewItems[a].priority===De.High);this.relayout(o,l)}dispose(){this.sashItems.forEach(t=>t.sash.dispose()),this.sashItems=[],this.sashContainer.remove()}relayout(t,n){const i=this.viewItems.reduce((r,o)=>r+o.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,t,n),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}onSashStart({sash:t,start:n}){const i=this.sashItems.findIndex(r=>r.sash===t);(r=>{const o=this.viewItems.map(_=>_.size);let l,a,s=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;const d=xe(i,-1,-1),u=xe(i+1,this.viewItems.length),v=d.reduce((_,S)=>_+(this.viewItems[S].minimumSize-o[S]),0),f=d.reduce((_,S)=>_+(this.viewItems[S].viewMaximumSize-o[S]),0),g=u.length===0?Number.POSITIVE_INFINITY:u.reduce((_,S)=>_+(o[S]-this.viewItems[S].minimumSize),0),w=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((_,S)=>_+(o[S]-this.viewItems[S].viewMaximumSize),0);s=Math.max(v,w),c=Math.min(g,f);const b=this.findFirstSnapIndex(d),y=this.findFirstSnapIndex(u);if(typeof b=="number"){const _=this.viewItems[b],S=Math.floor(_.viewMinimumSize/2);l={index:b,limitDelta:_.visible?s-S:s+S,size:_.size}}if(typeof y=="number"){const _=this.viewItems[y],S=Math.floor(_.viewMinimumSize/2);a={index:y,limitDelta:_.visible?c+S:c-S,size:_.size}}this.sashDragState={start:r,current:r,index:i,sizes:o,minDelta:s,maxDelta:c,snapBefore:l,snapAfter:a}})(n)}onSashChange({current:t}){const{index:n,start:i,sizes:r,minDelta:o,maxDelta:l,snapBefore:a,snapAfter:s}=this.sashDragState;this.sashDragState.current=t;const c=t-i;this.resize(n,c,r,void 0,void 0,o,l,a,s),this.distributeEmptySpace(),this.layoutViews()}getSashPosition(t){let n=0;for(let i=0;i<this.sashItems.length;i++)if(n+=this.viewItems[i].size,this.sashItems[i].sash===t)return n;return 0}resize(t,n,i=this.viewItems.map(d=>d.size),r,o,l=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,s,c){if(t<0||t>=this.viewItems.length)return 0;const d=xe(t,-1,-1),u=xe(t+1,this.viewItems.length);if(o)for(const m of o)hi(d,m),hi(u,m);if(r)for(const m of r)Dn(d,m),Dn(u,m);const v=d.map(m=>this.viewItems[m]),f=d.map(m=>i[m]),g=u.map(m=>this.viewItems[m]),w=u.map(m=>i[m]),b=d.reduce((m,z)=>m+(this.viewItems[z].minimumSize-i[z]),0),y=d.reduce((m,z)=>m+(this.viewItems[z].maximumSize-i[z]),0),_=u.length===0?Number.POSITIVE_INFINITY:u.reduce((m,z)=>m+(i[z]-this.viewItems[z].minimumSize),0),S=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((m,z)=>m+(i[z]-this.viewItems[z].maximumSize),0),R=Math.max(b,S,l),D=Math.min(_,y,a);let E=!1;if(s){const m=this.viewItems[s.index],z=n>=s.limitDelta;E=z!==m.visible,m.setVisible(z,s.size)}if(!E&&c){const m=this.viewItems[c.index],z=n<c.limitDelta;E=z!==m.visible,m.setVisible(z,c.size)}if(E)return this.resize(t,n,i,r,o,l,a);for(let m=0,z=n=Me(n,R,D);m<v.length;m++){const V=v[m],N=Me(f[m]+z,V.minimumSize,V.maximumSize);z-=N-f[m],V.size=N}for(let m=0,z=n;m<g.length;m++){const V=g[m],N=Me(w[m]-z,V.minimumSize,V.maximumSize);z+=N-w[m],V.size=N}return n}distributeEmptySpace(t){const n=this.viewItems.reduce((c,d)=>c+d.size,0);let i=this.size-n;const r=xe(0,this.viewItems.length),o=[],l=r.filter(c=>this.viewItems[c].priority===De.Low),a=r.filter(c=>this.viewItems[c].priority===De.Normal),s=r.filter(c=>this.viewItems[c].priority===De.High);o.push(...s,...a,...l),typeof t=="number"&&Dn(o,t);for(let c=0;i!==0&&c<o.length;c++){const d=this.viewItems[o[c]],u=Me(d.size+i,d.minimumSize,d.maximumSize);i-=u-d.size,d.size=u}}layoutViews(){var t;this.contentSize=this.viewItems.reduce((i,r)=>i+r.size,0);let n=0;for(const i of this.viewItems)i.layout(n),n+=i.size;(t=this.onDidChange)!=null&&t.call(this,this.viewItems.map(i=>i.size)),this.sashItems.forEach(i=>i.sash.layout()),this.updateSashEnablement()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(t=>t.size/this.contentSize))}updateSashEnablement(){let t=!1;const n=this.viewItems.map(s=>t=s.size-s.minimumSize>0||t);t=!1;const i=this.viewItems.map(s=>t=s.maximumSize-s.size>0||t),r=[...this.viewItems].reverse();t=!1;const o=r.map(s=>t=s.size-s.minimumSize>0||t).reverse();t=!1;const l=r.map(s=>t=s.maximumSize-s.size>0||t).reverse();let a=0;for(let s=0;s<this.sashItems.length;s++){const{sash:c}=this.sashItems[s];a+=this.viewItems[s].size;const d=!(n[s]&&l[s+1]),u=!(i[s]&&o[s+1]);if(d&&u){const v=xe(s,-1,-1),f=xe(s+1,this.viewItems.length),g=this.findFirstSnapIndex(v),w=this.findFirstSnapIndex(f),b=typeof g=="number"&&!this.viewItems[g].visible,y=typeof w=="number"&&!this.viewItems[w].visible;b&&o[s]&&(a>0||this.startSnappingEnabled)?c.state=be.Minimum:y&&n[s]&&(a<this.contentSize||this.endSnappingEnabled)?c.state=be.Maximum:c.state=be.Disabled}else c.state=d&&!u?be.Minimum:!d&&u?be.Maximum:be.Enabled}}findFirstSnapIndex(t){for(const n of t){const i=this.viewItems[n];if(i.visible&&i.snap)return n}for(const n of t){const i=this.viewItems[n];if(i.visible&&i.maximumSize-i.minimumSize>0)return;if(!i.visible&&i.snap)return n}}}class vt{constructor(t){this.size=void 0,this.size=t}getPreferredSize(){return this.size}}class bi{constructor(t,n){this.proportion=void 0,this.layoutService=void 0,this.proportion=t,this.layoutService=n}getPreferredSize(){return this.proportion*this.layoutService.getSize()}}class Gt{getPreferredSize(){}}class yi{get preferredSize(){return this.layoutStrategy.getPreferredSize()}set preferredSize(t){if(typeof t=="number")this.layoutStrategy=new vt(t);else if(typeof t=="string"){const n=t.trim();if(Wt(n,"%")){const i=Number(n.slice(0,-1))/100;this.layoutStrategy=new bi(i,this.layoutService)}else if(Wt(n,"px")){const i=Number(n.slice(0,-2))/100;this.layoutStrategy=new vt(i)}else if(typeof Number.parseFloat(n)=="number"){const i=Number.parseFloat(n);this.layoutStrategy=new vt(i)}else this.layoutStrategy=new Gt}else this.layoutStrategy=new Gt}constructor(t,n){var i;if(this.minimumSize=0,this.maximumSize=Number.POSITIVE_INFINITY,this.element=void 0,this.priority=void 0,this.snap=void 0,this.layoutService=void 0,this.layoutStrategy=void 0,this.layoutService=t,this.element=n.element,this.minimumSize=typeof n.minimumSize=="number"?n.minimumSize:30,this.maximumSize=typeof n.maximumSize=="number"?n.maximumSize:Number.POSITIVE_INFINITY,typeof n.preferredSize=="number")this.layoutStrategy=new vt(n.preferredSize);else if(typeof n.preferredSize=="string"){const r=n.preferredSize.trim();if(Wt(r,"%")){const o=Number(r.slice(0,-1))/100;this.layoutStrategy=new bi(o,this.layoutService)}else if(Wt(r,"px")){const o=Number(r.slice(0,-2));this.layoutStrategy=new vt(o)}else if(typeof Number.parseFloat(r)=="number"){const o=Number.parseFloat(r);this.layoutStrategy=new vt(o)}else this.layoutStrategy=new Gt}else this.layoutStrategy=new Gt;this.priority=(i=n.priority)!=null?i:De.Normal,this.snap=typeof n.snap=="boolean"&&n.snap}layout(t){}}function _i(e){return e.minSize!==void 0||e.maxSize!==void 0||e.preferredSize!==void 0||e.priority!==void 0||e.visible!==void 0}const On=window.React.forwardRef(({className:e,children:t},n)=>window.React.createElement("div",{ref:n,className:Rn("split-view-view",ii,e)},t));On.displayName="Allotment.Pane";const Si=window.React.forwardRef(({children:e,className:t,id:n,maxSize:i=1/0,minSize:r=30,proportionalLayout:o=!0,separator:l=!0,sizes:a,defaultSizes:s=a,snap:c=!1,vertical:d=!1,onChange:u,onReset:v,onVisibleChange:f,onDragStart:g,onDragEnd:w},b)=>{const y=window.React.useRef(null),_=window.React.useRef([]),S=window.React.useRef(new Map),R=window.React.useRef(null),D=window.React.useRef(new Map),E=window.React.useRef(new Or),m=window.React.useRef([]),[z,V]=window.React.useState(!1),N=window.React.useMemo(()=>window.React.Children.toArray(e).filter(window.React.isValidElement),[e]),k=window.React.useCallback(L=>{var A,F;const P=(A=m.current)==null?void 0:A[L];return typeof(P==null?void 0:P.preferredSize)=="number"&&((F=R.current)!=null&&F.resizeView(L,Math.round(P.preferredSize)),!0)},[]);return window.React.useImperativeHandle(b,()=>({reset:()=>{if(v)v();else{var L;(L=R.current)==null||L.distributeViewSizes();for(let A=0;A<m.current.length;A++)k(A)}},resize:L=>{var A;(A=R.current)==null||A.resizeViews(L)}})),ai(()=>{let L=!0;s&&D.current.size!==s.length&&(L=!1,console.warn(`Expected ${s.length} children based on defaultSizes but found ${D.current.size}`)),L&&s&&(_.current=N.map(P=>P.key));const A=Dt({orientation:d?ze.Vertical:ze.Horizontal,proportionalLayout:o},L&&s&&{descriptor:{size:s.reduce((P,$)=>P+$,0),views:s.map((P,$)=>{var T,W,se,ge;const G=S.current.get(_.current[$]),J=new yi(E.current,Dt({element:document.createElement("div"),minimumSize:(T=G==null?void 0:G.minSize)!=null?T:r,maximumSize:(W=G==null?void 0:G.maxSize)!=null?W:i,priority:(se=G==null?void 0:G.priority)!=null?se:De.Normal},(G==null?void 0:G.preferredSize)&&{preferredSize:G==null?void 0:G.preferredSize},{snap:(ge=G==null?void 0:G.snap)!=null?ge:c}));return m.current.push(J),{container:[...D.current.values()][$],size:P,view:J}})}});R.current=new Br(y.current,A,u,g,w),R.current.on("sashDragStart",()=>{var P;(P=y.current)==null||P.classList.add("split-view-sash-dragging")}),R.current.on("sashDragEnd",()=>{var P;(P=y.current)==null||P.classList.remove("split-view-sash-dragging")}),R.current.on("sashchange",P=>{if(f&&R.current){const $=N.map(T=>T.key);for(let T=0;T<$.length;T++){const W=S.current.get($[T]);(W==null?void 0:W.visible)!==void 0&&W.visible!==R.current.isViewVisible(T)&&f(T,R.current.isViewVisible(T))}}}),R.current.on("sashreset",P=>{if(v)v();else{var $;if(k(P)||k(P+1))return;($=R.current)==null||$.distributeViewSizes()}});const F=R.current;return()=>{F.dispose()}},[]),ai(()=>{if(z){const U=N.map(C=>C.key),ae=[..._.current],fe=U.filter(C=>!_.current.includes(C)),ee=U.filter(C=>_.current.includes(C)),Le=_.current.map(C=>!U.includes(C));for(let C=Le.length-1;C>=0;C--){var L;Le[C]&&((L=R.current)!=null&&L.removeView(C),ae.splice(C,1),m.current.splice(C,1))}for(const C of fe){var A,F,P,$,T;const M=S.current.get(C),O=new yi(E.current,Dt({element:document.createElement("div"),minimumSize:(A=M==null?void 0:M.minSize)!=null?A:r,maximumSize:(F=M==null?void 0:M.maxSize)!=null?F:i,priority:(P=M==null?void 0:M.priority)!=null?P:De.Normal},(M==null?void 0:M.preferredSize)&&{preferredSize:M==null?void 0:M.preferredSize},{snap:($=M==null?void 0:M.snap)!=null?$:c}));(T=R.current)!=null&&T.addView(D.current.get(C),O,Ut.Distribute,U.findIndex(K=>K===C)),ae.splice(U.findIndex(K=>K===C),0,C),m.current.splice(U.findIndex(K=>K===C),0,O)}for(;!_r(U,ae);)for(const[C,M]of U.entries()){const O=ae.findIndex(K=>K===M);if(O!==C){var W;(W=R.current)==null||W.moveView(D.current.get(M),O,C);const K=ae[O];ae.splice(O,1),ae.splice(C,0,K);break}}for(const C of fe){var se;const M=U.findIndex(K=>K===C),O=m.current[M].preferredSize;O!==void 0&&((se=R.current)==null||se.resizeView(M,O))}for(const C of[...fe,...ee]){var ge,G;const M=S.current.get(C),O=U.findIndex(K=>K===C);M&&_i(M)&&M.visible!==void 0&&((ge=R.current)==null?void 0:ge.isViewVisible(O))!==M.visible&&((G=R.current)==null||G.setViewVisible(O,M.visible))}for(const C of ee){const M=S.current.get(C),O=U.findIndex(K=>K===C);if(M&&_i(M)){var J;M.preferredSize!==void 0&&m.current[O].preferredSize!==M.preferredSize&&(m.current[O].preferredSize=M.preferredSize);let K=!1;M.minSize!==void 0&&m.current[O].minimumSize!==M.minSize&&(m.current[O].minimumSize=M.minSize,K=!0),M.maxSize!==void 0&&m.current[O].maximumSize!==M.maxSize&&(m.current[O].maximumSize=M.maxSize,K=!0),K&&((J=R.current)==null||J.layout())}}(fe.length>0||Le.length>0)&&(_.current=U)}},[N,z,i,r,c]),window.React.useEffect(()=>{R.current&&(R.current.onDidChange=u)},[u]),window.React.useEffect(()=>{R.current&&(R.current.onDidDragStart=g)},[g]),window.React.useEffect(()=>{R.current&&(R.current.onDidDragEnd=w)},[w]),Sr({ref:y,onResize:({width:L,height:A})=>{var F;L&&A&&((F=R.current)!=null&&F.layout(d?A:L),E.current.setSize(d?A:L),V(!0))}}),window.React.useEffect(()=>{si&&Fr(20)},[]),window.React.createElement("div",{ref:y,className:Rn("split-view",d?"split-view-vertical":"split-view-horizontal",{"split-view-separator-border":l},Rr,d?Dr:Ir,{[Er]:l},t),id:n},window.React.createElement("div",{className:Rn("split-view-container",zr)},window.React.Children.toArray(e).map(L=>{if(!window.React.isValidElement(L))return null;const A=L.key;return L.type.displayName==="Allotment.Pane"?(S.current.set(A,L.props),window.React.cloneElement(L,{key:A,ref:F=>{const P=L.ref;P&&(P.current=F),F?D.current.set(A,F):D.current.delete(A)}})):window.React.createElement(On,{key:A,ref:F=>{F?D.current.set(A,F):D.current.delete(A)}},L)})))});function Fr(e){const t=Me(e,4,20),n=Me(e,1,8);document.documentElement.style.setProperty("--sash-size",t+"px"),document.documentElement.style.setProperty("--sash-hover-size",n+"px"),(function(i){pi=i,mi.emit("onDidChangeGlobalSize",i)})(t)}Si.displayName="Allotment";var $r=Object.assign(Si,{Pane:On});function Yr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return window.React.useMemo(()=>i=>{t.forEach(r=>r(i))},t)}const Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Mn(e){return"nodeType"in e}function he(e){var t,n;return e?pt(e)?e:Mn(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Nn(e){const{Document:t}=he(e);return e instanceof t}function Ct(e){return pt(e)?!1:e instanceof he(e).HTMLElement}function Ri(e){return e instanceof he(e).SVGElement}function mt(e){return e?pt(e)?e.document:Mn(e)?Nn(e)?e:Ct(e)||Ri(e)?e.ownerDocument:document:document:document}const Ne=Jt?window.React.useLayoutEffect:window.React.useEffect;function Zt(e){const t=window.React.useRef(e);return Ne(()=>{t.current=e}),window.React.useCallback(function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.current==null?void 0:t.current(...i)},[])}function Kr(){const e=window.React.useRef(null),t=window.React.useCallback((i,r)=>{e.current=setInterval(i,r)},[]),n=window.React.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Ot(e,t){t===void 0&&(t=[e]);const n=window.React.useRef(e);return Ne(()=>{n.current!==e&&(n.current=e)},t),n}function Mt(e,t){const n=window.React.useRef();return window.React.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function qt(e){const t=Zt(e),n=window.React.useRef(null),i=window.React.useCallback(r=>{r!==n.current&&(t==null||t(r,n.current)),n.current=r},[]);return[n,i]}function Qt(e){const t=window.React.useRef();return window.React.useEffect(()=>{t.current=e},[e]),t.current}let An={};function Nt(e,t){return window.React.useMemo(()=>{if(t)return t;const n=An[e]==null?0:An[e]+1;return An[e]=n,e+"-"+n},[e,t])}function xi(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((o,l)=>{const a=Object.entries(l);for(const[s,c]of a){const d=o[s];d!=null&&(o[s]=d+e*c)}return o},{...t})}}const wt=xi(1),At=xi(-1);function Hr(e){return"clientX"in e&&"clientY"in e}function en(e){if(!e)return!1;const{KeyboardEvent:t}=he(e.target);return t&&e instanceof t}function Xr(e){if(!e)return!1;const{TouchEvent:t}=he(e.target);return t&&e instanceof t}function tn(e){if(Xr(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Hr(e)?{x:e.clientX,y:e.clientY}:null}const qe=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[qe.Translate.toString(e),qe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),zi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Wr(e){return e.matches(zi)?e:e.querySelector(zi)}const Ur={display:"none"};function Gr(e){let{id:t,value:n}=e;return window.React.createElement("div",{id:t,style:Ur},n)}function Jr(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return window.React.createElement("div",{id:t,style:r,role:"status","aria-live":i,"aria-atomic":!0},n)}function Zr(){const[e,t]=window.React.useState("");return{announce:window.React.useCallback(i=>{i!=null&&t(i)},[]),announcement:e}}const Di=window.React.createContext(null);function qr(e){const t=window.React.useContext(Di);window.React.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Qr(){const[e]=window.React.useState(()=>new Set),t=window.React.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[window.React.useCallback(i=>{let{type:r,event:o}=i;e.forEach(l=>{var a;return(a=l[r])==null?void 0:a.call(l,o)})},[e]),t]}const eo={draggable:`
|
|
1
|
+
(function(xe,ze){typeof exports=="object"&&typeof module<"u"?ze(exports):typeof define=="function"&&define.amd?define(["exports"],ze):(xe=typeof globalThis<"u"?globalThis:xe||self,ze(xe.BlockBiteLibraries={}))})(this,(function(xe){"use strict";var ze=document.createElement("style");ze.textContent=`:root{--separator-border: rgba(128, 128, 128, .35);--sash-hover-transition-duration: .1s}.allotment-module_splitView__L-yRc{height:100%;overflow:hidden;position:relative;width:100%}.allotment-module_splitView__L-yRc>.allotment-module_sashContainer__fzwJF{height:100%;pointer-events:none;position:absolute;width:100%}.allotment-module_splitView__L-yRc>.allotment-module_sashContainer__fzwJF>.allotment-module_sash__QA-2t{pointer-events:auto}.allotment-module_splitView__L-yRc>.allotment-module_splitViewContainer__rQnVa{height:100%;position:relative;white-space:nowrap;width:100%}.allotment-module_splitView__L-yRc>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O{overflow:hidden;position:absolute;white-space:initial}.allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O{width:100%}.allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O{height:100%}.allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O:not(:first-child):before{background-color:var(--separator-border);content:" ";left:0;pointer-events:none;position:absolute;top:0;z-index:5}.allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS.allotment-module_vertical__WSwwa>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O:not(:first-child):before{height:1px;width:100%}.allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS.allotment-module_horizontal__7doS8>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O:not(:first-child):before{height:100%;width:1px}:root{--focus-border: #007fd4;--sash-size: 8px;--sash-hover-size: 4px}.sash-module_sash__K-9lB{position:absolute;z-index:35;touch-action:none;pointer-events:auto;text-align:initial}.sash-module_sash__K-9lB.sash-module_disabled__Hm-wx{pointer-events:none}.sash-module_sash__K-9lB.sash-module_mac__Jf6OJ.sash-module_vertical__pB-rs{cursor:col-resize}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs.sash-module_minimum__-UKxp{cursor:e-resize}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs.sash-module_maximum__TCWxD{cursor:w-resize}.sash-module_sash__K-9lB.sash-module_mac__Jf6OJ.sash-module_horizontal__kFbiw{cursor:row-resize}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_minimum__-UKxp{cursor:s-resize}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_maximum__TCWxD{cursor:n-resize}.sash-module_sash__K-9lB.sash-module_disabled__Hm-wx{cursor:default!important;pointer-events:none!important}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs{cursor:ew-resize;top:0;width:var(--sash-size);height:100%}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw{cursor:ns-resize;left:0;width:100%;height:var(--sash-size)}.sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-{content:" ";height:calc(var(--sash-size) * 2);width:calc(var(--sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk,.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R{cursor:nwse-resize}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R,.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk{cursor:nesw-resize}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk{left:calc(var(--sash-size) * -.5);top:calc(var(--sash-size) * -1)}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R{left:calc(var(--sash-size) * -.5);bottom:calc(var(--sash-size) * -1)}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk{top:calc(var(--sash-size) * -.5);left:calc(var(--sash-size) * -1)}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R{top:calc(var(--sash-size) * -.5);right:calc(var(--sash-size) * -1)}.sash-module_sash__K-9lB:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;transition:background-color var(--sash-hover-transition-duration) ease-out;background:transparent}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs:before{width:var(--sash-hover-size);left:calc(50% - (var(--sash-hover-size) / 2))}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw:before{height:var(--sash-hover-size);top:calc(50% - (var(--sash-hover-size) / 2))}.sash-module_sash__K-9lB.sash-module_hover__80W6I:before,.sash-module_sash__K-9lB.sash-module_active__bJspD:before{background:var(--focus-border)}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(ze);function De(){return De=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},De.apply(null,arguments)}var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ut,Gt={exports:{}};/*!
|
|
3
|
+
Copyright (c) 2018 Jed Watson.
|
|
4
|
+
Licensed under the MIT License (MIT), see
|
|
5
|
+
http://jedwatson.github.io/classnames
|
|
6
|
+
*/var _t,Jt,Zt,_i=(Ut||(Ut=1,_t=Gt,(function(){var t={}.hasOwnProperty;function e(){for(var r="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(r=i(r,n(l)))}return r}function n(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return e.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var l in r)t.call(r,l)&&r[l]&&(s=i(s,l));return s}function i(r,s){return s?r?r+" "+s:r+s:r}_t.exports?(e.default=e,_t.exports=e):window.classNames=e})()),Gt.exports),St=ke(_i),qt,Qt,Si=(Zt||(Zt=1,Jt=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(e)){if((i=e.length)!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(r of e.entries())if(!n.has(r[0]))return!1;for(r of e.entries())if(!t(r[1],n.get(r[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(r of e.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if((i=e.length)!=n.length)return!1;for(r=i;r--!==0;)if(e[r]!==n[r])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((i=(s=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;r--!==0;){var l=s[r];if(!t(e[l],n[l]))return!1}return!0}return e!=e&&n!=n}),Jt),Ri=ke(Si),en,tn,oe=ke((function(){if(Qt)return qt;Qt=1;var t=/^\s+|\s+$/g,e=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,r=parseInt,s=Object.prototype.toString;function l(o){var c=typeof o;return!!o&&(c=="object"||c=="function")}function a(o){if(typeof o=="number")return o;if((function(u){return typeof u=="symbol"||(function(h){return!!h&&typeof h=="object"})(u)&&s.call(u)=="[object Symbol]"})(o))return NaN;if(l(o)){var c=typeof o.valueOf=="function"?o.valueOf():o;o=l(c)?c+"":c}if(typeof o!="string")return o===0?o:+o;o=o.replace(t,"");var d=n.test(o);return d||i.test(o)?r(o.slice(2),d?2:8):e.test(o)?NaN:+o}return qt=function(o,c,d){return d===void 0&&(d=c,c=void 0),d!==void 0&&(d=(d=a(d))==d?d:0),c!==void 0&&(c=(c=a(c))==c?c:0),(function(u,h,f){return u==u&&(f!==void 0&&(u=u<=f?u:f),h!==void 0&&(u=u>=h?u:h)),u})(a(o),c,d)}})()),xi=ke((function(){if(tn)return en;tn=1;var t=/^\s+|\s+$/g,e=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,r=parseInt,s=typeof et=="object"&&et&&et.Object===Object&&et,l=typeof self=="object"&&self&&self.Object===Object&&self,a=s||l||Function("return this")(),o=Object.prototype.toString,c=Math.max,d=Math.min,u=function(){return a.Date.now()};function h(m){var v=typeof m;return!!m&&(v=="object"||v=="function")}function f(m){if(typeof m=="number")return m;if((function(g){return typeof g=="symbol"||(function(b){return!!b&&typeof b=="object"})(g)&&o.call(g)=="[object Symbol]"})(m))return NaN;if(h(m)){var v=typeof m.valueOf=="function"?m.valueOf():m;m=h(v)?v+"":v}if(typeof m!="string")return m===0?m:+m;m=m.replace(t,"");var p=n.test(m);return p||i.test(m)?r(m.slice(2),p?2:8):e.test(m)?NaN:+m}return en=function(m,v,p){var g,b,y,_,R,x,w=0,S=!1,C=!1,N=!0;if(typeof m!="function")throw new TypeError("Expected a function");function L(T){var M=g,B=b;return g=b=void 0,w=T,_=m.apply(B,M)}function O(T){var M=T-x;return x===void 0||M>=v||M<0||C&&T-w>=y}function I(){var T=u();if(O(T))return P(T);R=setTimeout(I,(function(M){var B=v-(M-x);return C?d(B,y-(M-w)):B})(T))}function P(T){return R=void 0,N&&g?L(T):(g=b=void 0,_)}function A(){var T=u(),M=O(T);if(g=arguments,b=this,x=T,M){if(R===void 0)return(function(B){return w=B,R=setTimeout(I,v),S?L(B):_})(x);if(C)return R=setTimeout(I,v),L(x)}return R===void 0&&(R=setTimeout(I,v)),_}return v=f(v)||0,h(p)&&(S=!!p.leading,y=(C="maxWait"in p)?c(f(p.maxWait)||0,v):y,N="trailing"in p?!!p.trailing:N),A.cancel=function(){R!==void 0&&clearTimeout(R),w=0,g=x=b=R=void 0},A.flush=function(){return R===void 0?_:P(u())},A}})()),nn={width:void 0,height:void 0};function zi(t){const{ref:e,box:n="content-box"}=t,[{width:i,height:r},s]=window.React.useState(nn),l=(function(){const c=window.React.useRef(!1);return window.React.useEffect(()=>(c.current=!0,()=>{c.current=!1}),[]),window.React.useCallback(()=>c.current,[])})(),a=window.React.useRef(De({},nn)),o=window.React.useRef(void 0);return o.current=t.onResize,window.React.useEffect(()=>{if(!e.current||typeof window>"u"||!("ResizeObserver"in window))return;const c=new ResizeObserver(([d])=>{const u=n==="border-box"?"borderBoxSize":n==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",h=rn(d,u,"inlineSize"),f=rn(d,u,"blockSize");if(a.current.width!==h||a.current.height!==f){const m={width:h,height:f};a.current.width=h,a.current.height=f,o.current?o.current(m):l()&&s(m)}});return c.observe(e.current,{box:n}),()=>{c.disconnect()}},[n,e,l]),{width:i,height:r}}function rn(t,e,n){return t[e]?Array.isArray(t[e])?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}var Di="allotment-module_splitView__L-yRc",Ii="allotment-module_sashContainer__fzwJF",Ei="allotment-module_splitViewContainer__rQnVa",sn="allotment-module_splitViewView__MGZ6O",Ci="allotment-module_vertical__WSwwa",Oi="allotment-module_horizontal__7doS8",Ni="allotment-module_separatorBorder__x-rDS";let Be,on=!1,an=!1;typeof navigator=="object"&&(Be=navigator.userAgent,an=Be.indexOf("Macintosh")>=0,on=(Be.indexOf("Macintosh")>=0||Be.indexOf("iPad")>=0||Be.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0);const ln=on,Mi=an,cn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?window.React.useLayoutEffect:window.React.useEffect;class Vi{constructor(){this._size=void 0}getSize(){return this._size}setSize(e){this._size=e}}function tt(t,e){const n=t.length,i=n-e.length;return i>=0&&t.slice(i,n)===e}var un,dn={exports:{}},Ai=(un||(un=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}function r(o,c,d){this.fn=o,this.context=c,this.once=d||!1}function s(o,c,d,u,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var f=new r(d,u||o,h),m=n?n+c:c;return o._events[m]?o._events[m].fn?o._events[m]=[o._events[m],f]:o._events[m].push(f):(o._events[m]=f,o._eventsCount++),o}function l(o,c){--o._eventsCount===0?o._events=new i:delete o._events[c]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1)),a.prototype.eventNames=function(){var o,c,d=[];if(this._eventsCount===0)return d;for(c in o=this._events)e.call(o,c)&&d.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(o)):d},a.prototype.listeners=function(o){var c=n?n+o:o,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var u=0,h=d.length,f=new Array(h);u<h;u++)f[u]=d[u].fn;return f},a.prototype.listenerCount=function(o){var c=n?n+o:o,d=this._events[c];return d?d.fn?1:d.length:0},a.prototype.emit=function(o,c,d,u,h,f){var m=n?n+o:o;if(!this._events[m])return!1;var v,p,g=this._events[m],b=arguments.length;if(g.fn){switch(g.once&&this.removeListener(o,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,d),!0;case 4:return g.fn.call(g.context,c,d,u),!0;case 5:return g.fn.call(g.context,c,d,u,h),!0;case 6:return g.fn.call(g.context,c,d,u,h,f),!0}for(p=1,v=new Array(b-1);p<b;p++)v[p-1]=arguments[p];g.fn.apply(g.context,v)}else{var y,_=g.length;for(p=0;p<_;p++)switch(g[p].once&&this.removeListener(o,g[p].fn,void 0,!0),b){case 1:g[p].fn.call(g[p].context);break;case 2:g[p].fn.call(g[p].context,c);break;case 3:g[p].fn.call(g[p].context,c,d);break;case 4:g[p].fn.call(g[p].context,c,d,u);break;default:if(!v)for(y=1,v=new Array(b-1);y<b;y++)v[y-1]=arguments[y];g[p].fn.apply(g[p].context,v)}}return!0},a.prototype.on=function(o,c,d){return s(this,o,c,d,!1)},a.prototype.once=function(o,c,d){return s(this,o,c,d,!0)},a.prototype.removeListener=function(o,c,d,u){var h=n?n+o:o;if(!this._events[h])return this;if(!c)return l(this,h),this;var f=this._events[h];if(f.fn)f.fn!==c||u&&!f.once||d&&f.context!==d||l(this,h);else{for(var m=0,v=[],p=f.length;m<p;m++)(f[m].fn!==c||u&&!f[m].once||d&&f[m].context!==d)&&v.push(f[m]);v.length?this._events[h]=v.length===1?v[0]:v:l(this,h)}return this},a.prototype.removeAllListeners=function(o){var c;return o?(c=n?n+o:o,this._events[c]&&l(this,c)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(dn)),dn.exports),Rt=ke(Ai);function hn(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.unshift(e))}function xt(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.push(e))}function te(t,e,n=1){const i=Math.max(0,Math.ceil((e-t)/n)),r=new Array(i);let s=-1;for(;++s<i;)r[s]=t+s*n;return r}var Li="sash-module_sash__K-9lB",Ti="sash-module_disabled__Hm-wx",Pi="sash-module_mac__Jf6OJ",fn="sash-module_vertical__pB-rs",ki="sash-module_minimum__-UKxp",Bi="sash-module_maximum__TCWxD",mn="sash-module_horizontal__kFbiw",zt="sash-module_hover__80W6I",Dt="sash-module_active__bJspD";let ne=(function(t){return t.Vertical="VERTICAL",t.Horizontal="HORIZONTAL",t})({}),Z=(function(t){return t.Disabled="DISABLED",t.Minimum="MINIMUM",t.Maximum="MAXIMUM",t.Enabled="ENABLED",t})({}),vn=ln?20:8;const pn=new Rt;class wn extends Rt{get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle(Ti,e===Z.Disabled),this.el.classList.toggle("sash-disabled",e===Z.Disabled),this.el.classList.toggle(ki,e===Z.Minimum),this.el.classList.toggle("sash-minimum",e===Z.Minimum),this.el.classList.toggle(Bi,e===Z.Maximum),this.el.classList.toggle("sash-maximum",e===Z.Maximum),this._state=e,this.emit("enablementChange",e))}constructor(e,n,i){var r;super(),this.el=void 0,this.layoutProvider=void 0,this.orientation=void 0,this.size=void 0,this.hoverDelay=300,this.hoverDelayer=xi(s=>s.classList.add("sash-hover",zt),this.hoverDelay),this._state=Z.Enabled,this.onPointerStart=s=>{const l=s.pageX,a=s.pageY,o={startX:l,currentX:l,startY:a,currentY:a};this.el.classList.add("sash-active",Dt),this.emit("start",o),this.el.setPointerCapture(s.pointerId);const c=u=>{u.preventDefault();const h={startX:l,currentX:u.pageX,startY:a,currentY:u.pageY};this.emit("change",h)},d=u=>{u.preventDefault(),this.el.classList.remove("sash-active",Dt),this.hoverDelayer.cancel(),this.emit("end"),this.el.releasePointerCapture(u.pointerId),window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",d)};window.addEventListener("pointermove",c),window.addEventListener("pointerup",d)},this.onPointerDoublePress=()=>{this.emit("reset")},this.onMouseEnter=()=>{this.el.classList.contains(Dt)?(this.hoverDelayer.cancel(),this.el.classList.add("sash-hover",zt)):this.hoverDelayer(this.el)},this.onMouseLeave=()=>{this.hoverDelayer.cancel(),this.el.classList.remove("sash-hover",zt)},this.el=document.createElement("div"),this.el.classList.add("sash",Li),this.el.dataset.testid="sash",e.append(this.el),Mi&&this.el.classList.add("sash-mac",Pi),this.el.addEventListener("pointerdown",this.onPointerStart),this.el.addEventListener("dblclick",this.onPointerDoublePress),this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("mouseleave",this.onMouseLeave),typeof i.size=="number"?(this.size=i.size,i.orientation===ne.Vertical?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=vn,pn.on("onDidChangeGlobalSize",s=>{this.size=s,this.layout()})),this.layoutProvider=n,this.orientation=(r=i.orientation)!=null?r:ne.Vertical,this.orientation===ne.Horizontal?(this.el.classList.add("sash-horizontal",mn),this.el.classList.remove("sash-vertical",fn)):(this.el.classList.remove("sash-horizontal",mn),this.el.classList.add("sash-vertical",fn)),this.layout()}layout(){if(this.orientation===ne.Vertical){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}dispose(){this.el.removeEventListener("pointerdown",this.onPointerStart),this.el.removeEventListener("dblclick",this.onPointerDoublePress),this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("mouseleave",()=>this.onMouseLeave),this.el.remove()}}let nt;var It;(It=nt||(nt={})).Distribute={type:"distribute"},It.Split=function(t){return{type:"split",index:t}},It.Invisible=function(t){return{type:"invisible",cachedVisibleSize:t}};let ie=(function(t){return t.Normal="NORMAL",t.Low="LOW",t.High="HIGH",t})({});class gn{constructor(e,n,i){this.container=void 0,this.view=void 0,this._size=void 0,this._cachedVisibleSize=void 0,this.container=e,this.view=n,this.container.classList.add("split-view-view",sn),this.container.dataset.testid="split-view-view",typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("split-view-view-visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get priority(){return this.view.priority}get snap(){return!!this.view.snap}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return this._cachedVisibleSize===void 0}setVisible(e,n){e!==this.visible&&(e?(this.size=oe(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof n=="number"?n:this.size,this.size=0),this.container.classList.toggle("split-view-view-visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e){this.layoutContainer(e),this.view.layout(this.size,e)}}class Fi extends gn{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}class ji extends gn{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class Yi extends Rt{get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,n={},i,r,s){var l,a;if(super(),this.onDidChange=void 0,this.onDidDragStart=void 0,this.onDidDragEnd=void 0,this.orientation=void 0,this.sashContainer=void 0,this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.sashDragState=void 0,this.proportionalLayout=void 0,this.getSashOrthogonalSize=void 0,this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onSashEnd=o=>{this.emit("sashchange",o),this.saveProportions();for(const c of this.viewItems)c.enabled=!0},this.orientation=(l=n.orientation)!=null?l:ne.Vertical,this.proportionalLayout=(a=n.proportionalLayout)!=null?a:!0,this.getSashOrthogonalSize=n.getSashOrthogonalSize,i&&(this.onDidChange=i),r&&(this.onDidDragStart=r),s&&(this.onDidDragEnd=s),this.sashContainer=document.createElement("div"),this.sashContainer.classList.add("sash-container",Ii),e.prepend(this.sashContainer),n.descriptor){this.size=n.descriptor.size;for(const[o,c]of n.descriptor.views.entries()){const d=c.size,u=c.container,h=c.view;this.addView(u,h,d,o,!0)}this.contentSize=this.viewItems.reduce((o,c)=>o+c.size,0),this.saveProportions()}}addView(e,n,i,r=this.viewItems.length,s){let l;l=typeof i=="number"?i:i.type==="split"?this.getViewSize(i.index)/2:i.type==="invisible"?{cachedVisibleSize:i.cachedVisibleSize}:n.minimumSize;const a=this.orientation===ne.Vertical?new ji(e,n,l):new Fi(e,n,l);if(this.viewItems.splice(r,0,a),this.viewItems.length>1){const o=this.orientation===ne.Vertical?new wn(this.sashContainer,{getHorizontalSashTop:u=>this.getSashPosition(u),getHorizontalSashWidth:this.getSashOrthogonalSize},{orientation:ne.Horizontal}):new wn(this.sashContainer,{getVerticalSashLeft:u=>this.getSashPosition(u),getVerticalSashHeight:this.getSashOrthogonalSize},{orientation:ne.Vertical}),c=this.orientation===ne.Vertical?u=>({sash:o,start:u.startY,current:u.currentY}):u=>({sash:o,start:u.startX,current:u.currentX});o.on("start",u=>{var h;this.emit("sashDragStart"),this.onSashStart(c(u));const f=this.viewItems.map(m=>m.size);(h=this.onDidDragStart)==null||h.call(this,f)}),o.on("change",u=>this.onSashChange(c(u))),o.on("end",()=>{var u;this.emit("sashDragEnd"),this.onSashEnd(this.sashItems.findIndex(f=>f.sash===o));const h=this.viewItems.map(f=>f.size);(u=this.onDidDragEnd)==null||u.call(this,h)}),o.on("reset",()=>{const u=this.sashItems.findIndex(p=>p.sash===o),h=te(u,-1,-1),f=te(u+1,this.viewItems.length),m=this.findFirstSnapIndex(h),v=this.findFirstSnapIndex(f);(typeof m!="number"||this.viewItems[m].visible)&&(typeof v!="number"||this.viewItems[v].visible)&&this.emit("sashreset",u)});const d={sash:o};this.sashItems.splice(r-1,0,d)}s||this.relayout(),s||typeof i=="number"||i.type!=="distribute"||this.distributeViewSizes()}removeView(e,n){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");const i=this.viewItems.splice(e,1)[0].view;if(this.viewItems.length>=1){const r=Math.max(e-1,0);this.sashItems.splice(r,1)[0].sash.dispose()}return this.relayout(),n&&n.type==="distribute"&&this.distributeViewSizes(),i}moveView(e,n,i){const r=this.getViewCachedVisibleSize(n),s=r===void 0?this.getViewSize(n):nt.Invisible(r),l=this.removeView(n);this.addView(e,l,s,i)}getViewCachedVisibleSize(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].cachedVisibleSize}layout(e=this.size){const n=Math.max(this.size,this.contentSize);if(this.size=e,this.proportions)for(let i=0;i<this.viewItems.length;i++){const r=this.viewItems[i];r.size=oe(Math.round(this.proportions[i]*e),r.minimumSize,r.maximumSize)}else{const i=te(0,this.viewItems.length),r=i.filter(l=>this.viewItems[l].priority===ie.Low),s=i.filter(l=>this.viewItems[l].priority===ie.High);this.resize(this.viewItems.length-1,e-n,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}resizeView(e,n){if(e<0||e>=this.viewItems.length)return;const i=te(0,this.viewItems.length).filter(a=>a!==e),r=[...i.filter(a=>this.viewItems[a].priority===ie.Low),e],s=i.filter(a=>this.viewItems[a].priority===ie.High),l=this.viewItems[e];n=Math.round(n),n=oe(n,l.minimumSize,Math.min(l.maximumSize,this.size)),l.size=n,this.relayout(r,s)}resizeViews(e){for(let n=0;n<e.length;n++){const i=this.viewItems[n];let r=e[n];r=Math.round(r),r=oe(r,i.minimumSize,Math.min(i.maximumSize,this.size)),i.size=r}this.contentSize=this.viewItems.reduce((n,i)=>n+i.size,0),this.saveProportions(),this.layout(this.size)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}isViewVisible(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].visible}setViewVisible(e,n){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[e].setVisible(n),this.distributeEmptySpace(e),this.layoutViews(),this.saveProportions()}distributeViewSizes(){const e=[];let n=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),n+=a.size);const i=Math.floor(n/e.length);for(const a of e)a.size=oe(i,a.minimumSize,a.maximumSize);const r=te(0,this.viewItems.length),s=r.filter(a=>this.viewItems[a].priority===ie.Low),l=r.filter(a=>this.viewItems[a].priority===ie.High);this.relayout(s,l)}dispose(){this.sashItems.forEach(e=>e.sash.dispose()),this.sashItems=[],this.sashContainer.remove()}relayout(e,n){const i=this.viewItems.reduce((r,s)=>r+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,n),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}onSashStart({sash:e,start:n}){const i=this.sashItems.findIndex(r=>r.sash===e);(r=>{const s=this.viewItems.map(b=>b.size);let l,a,o=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;const d=te(i,-1,-1),u=te(i+1,this.viewItems.length),h=d.reduce((b,y)=>b+(this.viewItems[y].minimumSize-s[y]),0),f=d.reduce((b,y)=>b+(this.viewItems[y].viewMaximumSize-s[y]),0),m=u.length===0?Number.POSITIVE_INFINITY:u.reduce((b,y)=>b+(s[y]-this.viewItems[y].minimumSize),0),v=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((b,y)=>b+(s[y]-this.viewItems[y].viewMaximumSize),0);o=Math.max(h,v),c=Math.min(m,f);const p=this.findFirstSnapIndex(d),g=this.findFirstSnapIndex(u);if(typeof p=="number"){const b=this.viewItems[p],y=Math.floor(b.viewMinimumSize/2);l={index:p,limitDelta:b.visible?o-y:o+y,size:b.size}}if(typeof g=="number"){const b=this.viewItems[g],y=Math.floor(b.viewMinimumSize/2);a={index:g,limitDelta:b.visible?c+y:c-y,size:b.size}}this.sashDragState={start:r,current:r,index:i,sizes:s,minDelta:o,maxDelta:c,snapBefore:l,snapAfter:a}})(n)}onSashChange({current:e}){const{index:n,start:i,sizes:r,minDelta:s,maxDelta:l,snapBefore:a,snapAfter:o}=this.sashDragState;this.sashDragState.current=e;const c=e-i;this.resize(n,c,r,void 0,void 0,s,l,a,o),this.distributeEmptySpace(),this.layoutViews()}getSashPosition(e){let n=0;for(let i=0;i<this.sashItems.length;i++)if(n+=this.viewItems[i].size,this.sashItems[i].sash===e)return n;return 0}resize(e,n,i=this.viewItems.map(d=>d.size),r,s,l=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,o,c){if(e<0||e>=this.viewItems.length)return 0;const d=te(e,-1,-1),u=te(e+1,this.viewItems.length);if(s)for(const w of s)hn(d,w),hn(u,w);if(r)for(const w of r)xt(d,w),xt(u,w);const h=d.map(w=>this.viewItems[w]),f=d.map(w=>i[w]),m=u.map(w=>this.viewItems[w]),v=u.map(w=>i[w]),p=d.reduce((w,S)=>w+(this.viewItems[S].minimumSize-i[S]),0),g=d.reduce((w,S)=>w+(this.viewItems[S].maximumSize-i[S]),0),b=u.length===0?Number.POSITIVE_INFINITY:u.reduce((w,S)=>w+(i[S]-this.viewItems[S].minimumSize),0),y=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((w,S)=>w+(i[S]-this.viewItems[S].maximumSize),0),_=Math.max(p,y,l),R=Math.min(b,g,a);let x=!1;if(o){const w=this.viewItems[o.index],S=n>=o.limitDelta;x=S!==w.visible,w.setVisible(S,o.size)}if(!x&&c){const w=this.viewItems[c.index],S=n<c.limitDelta;x=S!==w.visible,w.setVisible(S,c.size)}if(x)return this.resize(e,n,i,r,s,l,a);for(let w=0,S=n=oe(n,_,R);w<h.length;w++){const C=h[w],N=oe(f[w]+S,C.minimumSize,C.maximumSize);S-=N-f[w],C.size=N}for(let w=0,S=n;w<m.length;w++){const C=m[w],N=oe(v[w]-S,C.minimumSize,C.maximumSize);S+=N-v[w],C.size=N}return n}distributeEmptySpace(e){const n=this.viewItems.reduce((c,d)=>c+d.size,0);let i=this.size-n;const r=te(0,this.viewItems.length),s=[],l=r.filter(c=>this.viewItems[c].priority===ie.Low),a=r.filter(c=>this.viewItems[c].priority===ie.Normal),o=r.filter(c=>this.viewItems[c].priority===ie.High);s.push(...o,...a,...l),typeof e=="number"&&xt(s,e);for(let c=0;i!==0&&c<s.length;c++){const d=this.viewItems[s[c]],u=oe(d.size+i,d.minimumSize,d.maximumSize);i-=u-d.size,d.size=u}}layoutViews(){var e;this.contentSize=this.viewItems.reduce((i,r)=>i+r.size,0);let n=0;for(const i of this.viewItems)i.layout(n),n+=i.size;(e=this.onDidChange)!=null&&e.call(this,this.viewItems.map(i=>i.size)),this.sashItems.forEach(i=>i.sash.layout()),this.updateSashEnablement()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}updateSashEnablement(){let e=!1;const n=this.viewItems.map(o=>e=o.size-o.minimumSize>0||e);e=!1;const i=this.viewItems.map(o=>e=o.maximumSize-o.size>0||e),r=[...this.viewItems].reverse();e=!1;const s=r.map(o=>e=o.size-o.minimumSize>0||e).reverse();e=!1;const l=r.map(o=>e=o.maximumSize-o.size>0||e).reverse();let a=0;for(let o=0;o<this.sashItems.length;o++){const{sash:c}=this.sashItems[o];a+=this.viewItems[o].size;const d=!(n[o]&&l[o+1]),u=!(i[o]&&s[o+1]);if(d&&u){const h=te(o,-1,-1),f=te(o+1,this.viewItems.length),m=this.findFirstSnapIndex(h),v=this.findFirstSnapIndex(f),p=typeof m=="number"&&!this.viewItems[m].visible,g=typeof v=="number"&&!this.viewItems[v].visible;p&&s[o]&&(a>0||this.startSnappingEnabled)?c.state=Z.Minimum:g&&n[o]&&(a<this.contentSize||this.endSnappingEnabled)?c.state=Z.Maximum:c.state=Z.Disabled}else c.state=d&&!u?Z.Minimum:!d&&u?Z.Maximum:Z.Enabled}}findFirstSnapIndex(e){for(const n of e){const i=this.viewItems[n];if(i.visible&&i.snap)return n}for(const n of e){const i=this.viewItems[n];if(i.visible&&i.maximumSize-i.minimumSize>0)return;if(!i.visible&&i.snap)return n}}}class Ie{constructor(e){this.size=void 0,this.size=e}getPreferredSize(){return this.size}}class bn{constructor(e,n){this.proportion=void 0,this.layoutService=void 0,this.proportion=e,this.layoutService=n}getPreferredSize(){return this.proportion*this.layoutService.getSize()}}class it{getPreferredSize(){}}class yn{get preferredSize(){return this.layoutStrategy.getPreferredSize()}set preferredSize(e){if(typeof e=="number")this.layoutStrategy=new Ie(e);else if(typeof e=="string"){const n=e.trim();if(tt(n,"%")){const i=Number(n.slice(0,-1))/100;this.layoutStrategy=new bn(i,this.layoutService)}else if(tt(n,"px")){const i=Number(n.slice(0,-2))/100;this.layoutStrategy=new Ie(i)}else if(typeof Number.parseFloat(n)=="number"){const i=Number.parseFloat(n);this.layoutStrategy=new Ie(i)}else this.layoutStrategy=new it}else this.layoutStrategy=new it}constructor(e,n){var i;if(this.minimumSize=0,this.maximumSize=Number.POSITIVE_INFINITY,this.element=void 0,this.priority=void 0,this.snap=void 0,this.layoutService=void 0,this.layoutStrategy=void 0,this.layoutService=e,this.element=n.element,this.minimumSize=typeof n.minimumSize=="number"?n.minimumSize:30,this.maximumSize=typeof n.maximumSize=="number"?n.maximumSize:Number.POSITIVE_INFINITY,typeof n.preferredSize=="number")this.layoutStrategy=new Ie(n.preferredSize);else if(typeof n.preferredSize=="string"){const r=n.preferredSize.trim();if(tt(r,"%")){const s=Number(r.slice(0,-1))/100;this.layoutStrategy=new bn(s,this.layoutService)}else if(tt(r,"px")){const s=Number(r.slice(0,-2));this.layoutStrategy=new Ie(s)}else if(typeof Number.parseFloat(r)=="number"){const s=Number.parseFloat(r);this.layoutStrategy=new Ie(s)}else this.layoutStrategy=new it}else this.layoutStrategy=new it;this.priority=(i=n.priority)!=null?i:ie.Normal,this.snap=typeof n.snap=="boolean"&&n.snap}layout(e){}}function _n(t){return t.minSize!==void 0||t.maxSize!==void 0||t.preferredSize!==void 0||t.priority!==void 0||t.visible!==void 0}const Et=window.React.forwardRef(({className:t,children:e},n)=>window.React.createElement("div",{ref:n,className:St("split-view-view",sn,t)},e));Et.displayName="Allotment.Pane";const Sn=window.React.forwardRef(({children:t,className:e,id:n,maxSize:i=1/0,minSize:r=30,proportionalLayout:s=!0,separator:l=!0,sizes:a,defaultSizes:o=a,snap:c=!1,vertical:d=!1,onChange:u,onReset:h,onVisibleChange:f,onDragStart:m,onDragEnd:v},p)=>{const g=window.React.useRef(null),b=window.React.useRef([]),y=window.React.useRef(new Map),_=window.React.useRef(null),R=window.React.useRef(new Map),x=window.React.useRef(new Vi),w=window.React.useRef([]),[S,C]=window.React.useState(!1),N=window.React.useMemo(()=>window.React.Children.toArray(t).filter(window.React.isValidElement),[t]),L=window.React.useCallback(O=>{var I,P;const A=(I=w.current)==null?void 0:I[O];return typeof(A==null?void 0:A.preferredSize)=="number"&&((P=_.current)!=null&&P.resizeView(O,Math.round(A.preferredSize)),!0)},[]);return window.React.useImperativeHandle(p,()=>({reset:()=>{if(h)h();else{var O;(O=_.current)==null||O.distributeViewSizes();for(let I=0;I<w.current.length;I++)L(I)}},resize:O=>{var I;(I=_.current)==null||I.resizeViews(O)}})),cn(()=>{let O=!0;o&&R.current.size!==o.length&&(O=!1,console.warn(`Expected ${o.length} children based on defaultSizes but found ${R.current.size}`)),O&&o&&(b.current=N.map(A=>A.key));const I=De({orientation:d?ne.Vertical:ne.Horizontal,proportionalLayout:s},O&&o&&{descriptor:{size:o.reduce((A,T)=>A+T,0),views:o.map((A,T)=>{var M,B,U,ce;const j=y.current.get(b.current[T]),Y=new yn(x.current,De({element:document.createElement("div"),minimumSize:(M=j==null?void 0:j.minSize)!=null?M:r,maximumSize:(B=j==null?void 0:j.maxSize)!=null?B:i,priority:(U=j==null?void 0:j.priority)!=null?U:ie.Normal},(j==null?void 0:j.preferredSize)&&{preferredSize:j==null?void 0:j.preferredSize},{snap:(ce=j==null?void 0:j.snap)!=null?ce:c}));return w.current.push(Y),{container:[...R.current.values()][T],size:A,view:Y}})}});_.current=new Yi(g.current,I,u,m,v),_.current.on("sashDragStart",()=>{var A;(A=g.current)==null||A.classList.add("split-view-sash-dragging")}),_.current.on("sashDragEnd",()=>{var A;(A=g.current)==null||A.classList.remove("split-view-sash-dragging")}),_.current.on("sashchange",A=>{if(f&&_.current){const T=N.map(M=>M.key);for(let M=0;M<T.length;M++){const B=y.current.get(T[M]);(B==null?void 0:B.visible)!==void 0&&B.visible!==_.current.isViewVisible(M)&&f(M,_.current.isViewVisible(M))}}}),_.current.on("sashreset",A=>{if(h)h();else{var T;if(L(A)||L(A+1))return;(T=_.current)==null||T.distributeViewSizes()}});const P=_.current;return()=>{P.dispose()}},[]),cn(()=>{if(S){const F=N.map(E=>E.key),G=[...b.current],ue=F.filter(E=>!b.current.includes(E)),J=F.filter(E=>b.current.includes(E)),ge=b.current.map(E=>!F.includes(E));for(let E=ge.length-1;E>=0;E--){var O;ge[E]&&((O=_.current)!=null&&O.removeView(E),G.splice(E,1),w.current.splice(E,1))}for(const E of ue){var I,P,A,T,M;const D=y.current.get(E),z=new yn(x.current,De({element:document.createElement("div"),minimumSize:(I=D==null?void 0:D.minSize)!=null?I:r,maximumSize:(P=D==null?void 0:D.maxSize)!=null?P:i,priority:(A=D==null?void 0:D.priority)!=null?A:ie.Normal},(D==null?void 0:D.preferredSize)&&{preferredSize:D==null?void 0:D.preferredSize},{snap:(T=D==null?void 0:D.snap)!=null?T:c}));(M=_.current)!=null&&M.addView(R.current.get(E),z,nt.Distribute,F.findIndex(k=>k===E)),G.splice(F.findIndex(k=>k===E),0,E),w.current.splice(F.findIndex(k=>k===E),0,z)}for(;!Ri(F,G);)for(const[E,D]of F.entries()){const z=G.findIndex(k=>k===D);if(z!==E){var B;(B=_.current)==null||B.moveView(R.current.get(D),z,E);const k=G[z];G.splice(z,1),G.splice(E,0,k);break}}for(const E of ue){var U;const D=F.findIndex(k=>k===E),z=w.current[D].preferredSize;z!==void 0&&((U=_.current)==null||U.resizeView(D,z))}for(const E of[...ue,...J]){var ce,j;const D=y.current.get(E),z=F.findIndex(k=>k===E);D&&_n(D)&&D.visible!==void 0&&((ce=_.current)==null?void 0:ce.isViewVisible(z))!==D.visible&&((j=_.current)==null||j.setViewVisible(z,D.visible))}for(const E of J){const D=y.current.get(E),z=F.findIndex(k=>k===E);if(D&&_n(D)){var Y;D.preferredSize!==void 0&&w.current[z].preferredSize!==D.preferredSize&&(w.current[z].preferredSize=D.preferredSize);let k=!1;D.minSize!==void 0&&w.current[z].minimumSize!==D.minSize&&(w.current[z].minimumSize=D.minSize,k=!0),D.maxSize!==void 0&&w.current[z].maximumSize!==D.maxSize&&(w.current[z].maximumSize=D.maxSize,k=!0),k&&((Y=_.current)==null||Y.layout())}}(ue.length>0||ge.length>0)&&(b.current=F)}},[N,S,i,r,c]),window.React.useEffect(()=>{_.current&&(_.current.onDidChange=u)},[u]),window.React.useEffect(()=>{_.current&&(_.current.onDidDragStart=m)},[m]),window.React.useEffect(()=>{_.current&&(_.current.onDidDragEnd=v)},[v]),zi({ref:g,onResize:({width:O,height:I})=>{var P;O&&I&&((P=_.current)!=null&&P.layout(d?I:O),x.current.setSize(d?I:O),C(!0))}}),window.React.useEffect(()=>{ln&&$i(20)},[]),window.React.createElement("div",{ref:g,className:St("split-view",d?"split-view-vertical":"split-view-horizontal",{"split-view-separator-border":l},Di,d?Ci:Oi,{[Ni]:l},e),id:n},window.React.createElement("div",{className:St("split-view-container",Ei)},window.React.Children.toArray(t).map(O=>{if(!window.React.isValidElement(O))return null;const I=O.key;return O.type.displayName==="Allotment.Pane"?(y.current.set(I,O.props),window.React.cloneElement(O,{key:I,ref:P=>{const A=O.ref;A&&(A.current=P),P?R.current.set(I,P):R.current.delete(I)}})):window.React.createElement(Et,{key:I,ref:P=>{P?R.current.set(I,P):R.current.delete(I)}},O)})))});function $i(t){const e=oe(t,4,20),n=oe(t,1,8);document.documentElement.style.setProperty("--sash-size",e+"px"),document.documentElement.style.setProperty("--sash-hover-size",n+"px"),(function(i){vn=i,pn.emit("onDidChangeGlobalSize",i)})(e)}Sn.displayName="Allotment";var Ki=Object.assign(Sn,{Pane:Et});function Hi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return window.React.useMemo(()=>i=>{e.forEach(r=>r(i))},e)}const rt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ee(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Ct(t){return"nodeType"in t}function W(t){var e,n;return t?Ee(t)?t:Ct(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function Ot(t){const{Document:e}=W(t);return t instanceof e}function Fe(t){return Ee(t)?!1:t instanceof W(t).HTMLElement}function Rn(t){return t instanceof W(t).SVGElement}function Ce(t){return t?Ee(t)?t.document:Ct(t)?Ot(t)?t:Fe(t)||Rn(t)?t.ownerDocument:document:document:document}const ae=rt?window.React.useLayoutEffect:window.React.useEffect;function st(t){const e=window.React.useRef(t);return ae(()=>{e.current=t}),window.React.useCallback(function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.current==null?void 0:e.current(...i)},[])}function Xi(){const t=window.React.useRef(null),e=window.React.useCallback((i,r)=>{t.current=setInterval(i,r)},[]),n=window.React.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function je(t,e){e===void 0&&(e=[t]);const n=window.React.useRef(t);return ae(()=>{n.current!==t&&(n.current=t)},e),n}function Ye(t,e){const n=window.React.useRef();return window.React.useMemo(()=>{const i=t(n.current);return n.current=i,i},[...e])}function ot(t){const e=st(t),n=window.React.useRef(null),i=window.React.useCallback(r=>{r!==n.current&&(e==null||e(r,n.current)),n.current=r},[]);return[n,i]}function at(t){const e=window.React.useRef();return window.React.useEffect(()=>{e.current=t},[t]),e.current}let Nt={};function $e(t,e){return window.React.useMemo(()=>{if(e)return e;const n=Nt[t]==null?0:Nt[t]+1;return Nt[t]=n,t+"-"+n},[t,e])}function xn(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((s,l)=>{const a=Object.entries(l);for(const[o,c]of a){const d=s[o];d!=null&&(s[o]=d+t*c)}return s},{...e})}}const Oe=xn(1),Ke=xn(-1);function Wi(t){return"clientX"in t&&"clientY"in t}function lt(t){if(!t)return!1;const{KeyboardEvent:e}=W(t.target);return e&&t instanceof e}function Ui(t){if(!t)return!1;const{TouchEvent:e}=W(t.target);return e&&t instanceof e}function ct(t){if(Ui(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return Wi(t)?{x:t.clientX,y:t.clientY}:null}const pe=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[pe.Translate.toString(t),pe.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:i}=t;return e+" "+n+"ms "+i}}}),zn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Gi(t){return t.matches(zn)?t:t.querySelector(zn)}const Ji={display:"none"};function Zi(t){let{id:e,value:n}=t;return window.React.createElement("div",{id:e,style:Ji},n)}function qi(t){let{id:e,announcement:n,ariaLiveType:i="assertive"}=t;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return window.React.createElement("div",{id:e,style:r,role:"status","aria-live":i,"aria-atomic":!0},n)}function Qi(){const[t,e]=window.React.useState("");return{announce:window.React.useCallback(i=>{i!=null&&e(i)},[]),announcement:t}}const Dn=window.React.createContext(null);function er(t){const e=window.React.useContext(Dn);window.React.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function tr(){const[t]=window.React.useState(()=>new Set),e=window.React.useCallback(i=>(t.add(i),()=>t.delete(i)),[t]);return[window.React.useCallback(i=>{let{type:r,event:s}=i;t.forEach(l=>{var a;return(a=l[r])==null?void 0:a.call(l,s)})},[t]),e]}const nr={draggable:`
|
|
7
7
|
To pick up a draggable item, press the space bar.
|
|
8
8
|
While dragging, use the arrow keys to move the item.
|
|
9
9
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
10
|
-
`},to={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function no(e){let{announcements:t=to,container:n,hiddenTextDescribedById:i,screenReaderInstructions:r=eo}=e;const{announce:o,announcement:l}=Zr(),a=Nt("DndLiveRegion"),[s,c]=window.React.useState(!1);if(window.React.useEffect(()=>{c(!0)},[]),qr(window.React.useMemo(()=>({onDragStart(u){let{active:v}=u;o(t.onDragStart({active:v}))},onDragMove(u){let{active:v,over:f}=u;t.onDragMove&&o(t.onDragMove({active:v,over:f}))},onDragOver(u){let{active:v,over:f}=u;o(t.onDragOver({active:v,over:f}))},onDragEnd(u){let{active:v,over:f}=u;o(t.onDragEnd({active:v,over:f}))},onDragCancel(u){let{active:v,over:f}=u;o(t.onDragCancel({active:v,over:f}))}}),[o,t])),!s)return null;const d=window.React.createElement(window.React.Fragment,null,window.React.createElement(Gr,{id:i,value:r.draggable}),window.React.createElement(Jr,{id:a,announcement:l}));return n?window.ReactDOM.createPortal(d,n):d}var Q;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Q||(Q={}));function nn(){}function Ii(e,t){return window.React.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function io(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return window.React.useMemo(()=>[...t].filter(i=>i!=null),[...t])}const Ae=Object.freeze({x:0,y:0});function Ei(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ro(e,t){const n=tn(e);if(!n)return"0 0";const i={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return i.x+"% "+i.y+"%"}function Ci(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function oo(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Oi(e){let{left:t,top:n,height:i,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+i},{x:t+r,y:n+i}]}function Mi(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Ni(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const so=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=Ni(t,t.left,t.top),o=[];for(const l of i){const{id:a}=l,s=n.get(a);if(s){const c=Ei(Ni(s),r);o.push({id:a,data:{droppableContainer:l,value:c}})}}return o.sort(Ci)},ao=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=Oi(t),o=[];for(const l of i){const{id:a}=l,s=n.get(a);if(s){const c=Oi(s),d=r.reduce((v,f,g)=>v+Ei(c[g],f),0),u=Number((d/4).toFixed(4));o.push({id:a,data:{droppableContainer:l,value:u}})}}return o.sort(Ci)};function lo(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),l=r-i,a=o-n;if(i<r&&n<o){const s=t.width*t.height,c=e.width*e.height,d=l*a,u=d/(s+c-d);return Number(u.toFixed(4))}return 0}const co=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const r=[];for(const o of i){const{id:l}=o,a=n.get(l);if(a){const s=lo(a,t);s>0&&r.push({id:l,data:{droppableContainer:o,value:s}})}}return r.sort(oo)};function uo(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ai(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ae}function ho(e){return function(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return r.reduce((l,a)=>({...l,top:l.top+e*a.y,bottom:l.bottom+e*a.y,left:l.left+e*a.x,right:l.right+e*a.x}),{...n})}}const fo=ho(1);function Li(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function vo(e,t,n){const i=Li(t);if(!i)return e;const{scaleX:r,scaleY:o,x:l,y:a}=i,s=e.left-l-(1-r)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?e.width/r:e.width,u=o?e.height/o:e.height;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s}}const po={ignoreTransform:!1};function gt(e,t){t===void 0&&(t=po);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=he(e).getComputedStyle(e);c&&(n=vo(n,c,d))}const{top:i,left:r,width:o,height:l,bottom:a,right:s}=n;return{top:i,left:r,width:o,height:l,bottom:a,right:s}}function Vi(e){return gt(e,{ignoreTransform:!0})}function mo(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function wo(e,t){return t===void 0&&(t=he(e).getComputedStyle(e)),t.position==="fixed"}function go(e,t){t===void 0&&(t=he(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const o=t[r];return typeof o=="string"?n.test(o):!1})}function rn(e,t){const n=[];function i(r){if(t!=null&&n.length>=t||!r)return n;if(Nn(r)&&r.scrollingElement!=null&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Ct(r)||Ri(r)||n.includes(r))return n;const o=he(e).getComputedStyle(r);return r!==e&&go(r,o)&&n.push(r),wo(r,o)?n:i(r.parentNode)}return e?i(e):n}function Ti(e){const[t]=rn(e,1);return t??null}function Ln(e){return!Jt||!e?null:pt(e)?e:Mn(e)?Nn(e)||e===mt(e).scrollingElement?window:Ct(e)?e:null:null}function Pi(e){return pt(e)?e.scrollX:e.scrollLeft}function ki(e){return pt(e)?e.scrollY:e.scrollTop}function Vn(e){return{x:Pi(e),y:ki(e)}}var oe;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(oe||(oe={}));function ji(e){return!Jt||!e?!1:e===document.scrollingElement}function Bi(e){const t={x:0,y:0},n=ji(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},r=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,l=e.scrollTop>=i.y,a=e.scrollLeft>=i.x;return{isTop:r,isLeft:o,isBottom:l,isRight:a,maxScroll:i,minScroll:t}}const bo={x:.2,y:.2};function yo(e,t,n,i,r){let{top:o,left:l,right:a,bottom:s}=n;i===void 0&&(i=10),r===void 0&&(r=bo);const{isTop:c,isBottom:d,isLeft:u,isRight:v}=Bi(e),f={x:0,y:0},g={x:0,y:0},w={height:t.height*r.y,width:t.width*r.x};return!c&&o<=t.top+w.height?(f.y=oe.Backward,g.y=i*Math.abs((t.top+w.height-o)/w.height)):!d&&s>=t.bottom-w.height&&(f.y=oe.Forward,g.y=i*Math.abs((t.bottom-w.height-s)/w.height)),!v&&a>=t.right-w.width?(f.x=oe.Forward,g.x=i*Math.abs((t.right-w.width-a)/w.width)):!u&&l<=t.left+w.width&&(f.x=oe.Backward,g.x=i*Math.abs((t.left+w.width-l)/w.width)),{direction:f,speed:g}}function _o(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:l}=window;return{top:0,left:0,right:o,bottom:l,width:o,height:l}}const{top:t,left:n,right:i,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Fi(e){return e.reduce((t,n)=>wt(t,Vn(n)),Ae)}function So(e){return e.reduce((t,n)=>t+Pi(n),0)}function Ro(e){return e.reduce((t,n)=>t+ki(n),0)}function $i(e,t){if(t===void 0&&(t=gt),!e)return;const{top:n,left:i,bottom:r,right:o}=t(e);Ti(e)&&(r<=0||o<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const xo=[["x",["left","right"],So],["y",["top","bottom"],Ro]];class Tn{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=rn(n),r=Fi(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,l,a]of xo)for(const s of l)Object.defineProperty(this,s,{get:()=>{const c=a(i),d=r[o]-c;return this.rect[s]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Lt{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var r;(r=this.target)==null||r.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function zo(e){const{EventTarget:t}=he(e);return e instanceof t?e:mt(e)}function Pn(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t?i>t.y:!1}var Ie;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ie||(Ie={}));function Yi(e){e.preventDefault()}function Do(e){e.stopPropagation()}var B;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(B||(B={}));const Ki={start:[B.Space,B.Enter],cancel:[B.Esc],end:[B.Space,B.Enter,B.Tab]},Io=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case B.Right:return{...n,x:n.x+25};case B.Left:return{...n,x:n.x-25};case B.Down:return{...n,y:n.y+25};case B.Up:return{...n,y:n.y-25}}};class kn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Lt(mt(n)),this.windowListeners=new Lt(he(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ie.Resize,this.handleCancel),this.windowListeners.add(Ie.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ie.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&$i(i),n(Ae)}handleKeyDown(t){if(en(t)){const{active:n,context:i,options:r}=this.props,{keyboardCodes:o=Ki,coordinateGetter:l=Io,scrollBehavior:a="smooth"}=r,{code:s}=t;if(o.end.includes(s)){this.handleEnd(t);return}if(o.cancel.includes(s)){this.handleCancel(t);return}const{collisionRect:c}=i.current,d=c?{x:c.left,y:c.top}:Ae;this.referenceCoordinates||(this.referenceCoordinates=d);const u=l(t,{active:n,context:i.current,currentCoordinates:d});if(u){const v=At(u,d),f={x:0,y:0},{scrollableAncestors:g}=i.current;for(const w of g){const b=t.code,{isTop:y,isRight:_,isLeft:S,isBottom:R,maxScroll:D,minScroll:E}=Bi(w),m=_o(w),z={x:Math.min(b===B.Right?m.right-m.width/2:m.right,Math.max(b===B.Right?m.left:m.left+m.width/2,u.x)),y:Math.min(b===B.Down?m.bottom-m.height/2:m.bottom,Math.max(b===B.Down?m.top:m.top+m.height/2,u.y))},V=b===B.Right&&!_||b===B.Left&&!S,N=b===B.Down&&!R||b===B.Up&&!y;if(V&&z.x!==u.x){const k=w.scrollLeft+v.x,L=b===B.Right&&k<=D.x||b===B.Left&&k>=E.x;if(L&&!v.y){w.scrollTo({left:k,behavior:a});return}L?f.x=w.scrollLeft-k:f.x=b===B.Right?w.scrollLeft-D.x:w.scrollLeft-E.x,f.x&&w.scrollBy({left:-f.x,behavior:a});break}else if(N&&z.y!==u.y){const k=w.scrollTop+v.y,L=b===B.Down&&k<=D.y||b===B.Up&&k>=E.y;if(L&&!v.x){w.scrollTo({top:k,behavior:a});return}L?f.y=w.scrollTop-k:f.y=b===B.Down?w.scrollTop-D.y:w.scrollTop-E.y,f.y&&w.scrollBy({top:-f.y,behavior:a});break}}this.handleMove(t,wt(At(u,this.referenceCoordinates),f))}}}handleMove(t,n){const{onMove:i}=this.props;t.preventDefault(),i(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}kn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=Ki,onActivation:r}=t,{active:o}=n;const{code:l}=e.nativeEvent;if(i.start.includes(l)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),r==null||r({event:e.nativeEvent}),!0)}return!1}}];function Hi(e){return!!(e&&"distance"in e)}function Xi(e){return!!(e&&"delay"in e)}class jn{constructor(t,n,i){var r;i===void 0&&(i=zo(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:l}=o;this.props=t,this.events=n,this.document=mt(l),this.documentListeners=new Lt(this.document),this.listeners=new Lt(i),this.windowListeners=new Lt(he(l)),this.initialCoordinates=(r=tn(o))!=null?r:Ae,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Ie.Resize,this.handleCancel),this.windowListeners.add(Ie.DragStart,Yi),this.windowListeners.add(Ie.VisibilityChange,this.handleCancel),this.windowListeners.add(Ie.ContextMenu,Yi),this.documentListeners.add(Ie.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Xi(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Hi(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:i,onPending:r}=this.props;r(i,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ie.Click,Do,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ie.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:r,props:o}=this,{onMove:l,options:{activationConstraint:a}}=o;if(!r)return;const s=(n=tn(t))!=null?n:Ae,c=At(r,s);if(!i&&a){if(Hi(a)){if(a.tolerance!=null&&Pn(c,a.tolerance))return this.handleCancel();if(Pn(c,a.distance))return this.handleStart()}if(Xi(a)&&Pn(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),l(s)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===B.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Eo={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Bn extends jn{constructor(t){const{event:n}=t,i=mt(n.target);super(t,Eo,i)}}Bn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!n.isPrimary||n.button!==0?!1:(i==null||i({event:n}),!0)}}];const Co={move:{name:"mousemove"},end:{name:"mouseup"}};var Fn;(function(e){e[e.RightClick=2]="RightClick"})(Fn||(Fn={}));class Oo extends jn{constructor(t){super(t,Co,mt(t.event.target))}}Oo.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button===Fn.RightClick?!1:(i==null||i({event:n}),!0)}}];const $n={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Mo extends jn{constructor(t){super(t,$n)}static setup(){return window.addEventListener($n.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener($n.move.name,t)};function t(){}}}Mo.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:r}=n;return r.length>1?!1:(i==null||i({event:n}),!0)}}];var Vt;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Vt||(Vt={}));var on;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(on||(on={}));function No(e){let{acceleration:t,activator:n=Vt.Pointer,canScroll:i,draggingRect:r,enabled:o,interval:l=5,order:a=on.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:v}=e;const f=Lo({delta:u,disabled:!o}),[g,w]=Kr(),b=window.React.useRef({x:0,y:0}),y=window.React.useRef({x:0,y:0}),_=window.React.useMemo(()=>{switch(n){case Vt.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case Vt.DraggableRect:return r}},[n,r,s]),S=window.React.useRef(null),R=window.React.useCallback(()=>{const E=S.current;if(!E)return;const m=b.current.x*y.current.x,z=b.current.y*y.current.y;E.scrollBy(m,z)},[]),D=window.React.useMemo(()=>a===on.TreeOrder?[...c].reverse():c,[a,c]);window.React.useEffect(()=>{if(!o||!c.length||!_){w();return}for(const E of D){if((i==null?void 0:i(E))===!1)continue;const m=c.indexOf(E),z=d[m];if(!z)continue;const{direction:V,speed:N}=yo(E,z,_,t,v);for(const k of["x","y"])f[k][V[k]]||(N[k]=0,V[k]=0);if(N.x>0||N.y>0){w(),S.current=E,g(R,l),b.current=N,y.current=V;return}}b.current={x:0,y:0},y.current={x:0,y:0},w()},[t,R,i,w,o,l,JSON.stringify(_),JSON.stringify(f),g,c,D,d,JSON.stringify(v)])}const Ao={x:{[oe.Backward]:!1,[oe.Forward]:!1},y:{[oe.Backward]:!1,[oe.Forward]:!1}};function Lo(e){let{delta:t,disabled:n}=e;const i=Qt(t);return Mt(r=>{if(n||!i||!r)return Ao;const o={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[oe.Backward]:r.x[oe.Backward]||o.x===-1,[oe.Forward]:r.x[oe.Forward]||o.x===1},y:{[oe.Backward]:r.y[oe.Backward]||o.y===-1,[oe.Forward]:r.y[oe.Forward]||o.y===1}}},[n,t,i])}function Vo(e,t){const n=t!=null?e.get(t):void 0,i=n?n.node.current:null;return Mt(r=>{var o;return t==null?null:(o=i??r)!=null?o:null},[i,t])}function To(e,t){return window.React.useMemo(()=>e.reduce((n,i)=>{const{sensor:r}=i,o=r.activators.map(l=>({eventName:l.eventName,handler:t(l.handler,i)}));return[...n,...o]},[]),[e,t])}var Tt;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Tt||(Tt={}));var Yn;(function(e){e.Optimized="optimized"})(Yn||(Yn={}));const Wi=new Map;function Po(e,t){let{dragging:n,dependencies:i,config:r}=t;const[o,l]=window.React.useState(null),{frequency:a,measure:s,strategy:c}=r,d=window.React.useRef(e),u=b(),v=Ot(u),f=window.React.useCallback(function(y){y===void 0&&(y=[]),!v.current&&l(_=>_===null?y:_.concat(y.filter(S=>!_.includes(S))))},[v]),g=window.React.useRef(null),w=Mt(y=>{if(u&&!n)return Wi;if(!y||y===Wi||d.current!==e||o!=null){const _=new Map;for(let S of e){if(!S)continue;if(o&&o.length>0&&!o.includes(S.id)&&S.rect.current){_.set(S.id,S.rect.current);continue}const R=S.node.current,D=R?new Tn(s(R),R):null;S.rect.current=D,D&&_.set(S.id,D)}return _}return y},[e,o,n,u,s]);return window.React.useEffect(()=>{d.current=e},[e]),window.React.useEffect(()=>{u||f()},[n,u]),window.React.useEffect(()=>{o&&o.length>0&&l(null)},[JSON.stringify(o)]),window.React.useEffect(()=>{u||typeof a!="number"||g.current!==null||(g.current=setTimeout(()=>{f(),g.current=null},a))},[a,u,f,...i]),{droppableRects:w,measureDroppableContainers:f,measuringScheduled:o!=null};function b(){switch(c){case Tt.Always:return!1;case Tt.BeforeDragging:return n;default:return!n}}}function Kn(e,t){return Mt(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function ko(e,t){return Kn(e,t)}function jo(e){let{callback:t,disabled:n}=e;const i=Zt(t),r=window.React.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(i)},[i,n]);return window.React.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function sn(e){let{callback:t,disabled:n}=e;const i=Zt(t),r=window.React.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(i)},[n]);return window.React.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Bo(e){return new Tn(gt(e),e)}function Ui(e,t,n){t===void 0&&(t=Bo);const[i,r]=window.React.useState(null);function o(){r(s=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=s??n)!=null?c:null}const d=t(e);return JSON.stringify(s)===JSON.stringify(d)?s:d})}const l=jo({callback(s){if(e)for(const c of s){const{type:d,target:u}=c;if(d==="childList"&&u instanceof HTMLElement&&u.contains(e)){o();break}}}}),a=sn({callback:o});return Ne(()=>{o(),e?(a==null||a.observe(e),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),l==null||l.disconnect())},[e]),i}function Fo(e){const t=Kn(e);return Ai(e,t)}const Gi=[];function $o(e){const t=window.React.useRef(e),n=Mt(i=>e?i&&i!==Gi&&e&&t.current&&e.parentNode===t.current.parentNode?i:rn(e):Gi,[e]);return window.React.useEffect(()=>{t.current=e},[e]),n}function Yo(e){const[t,n]=window.React.useState(null),i=window.React.useRef(e),r=window.React.useCallback(o=>{const l=Ln(o.target);l&&n(a=>a?(a.set(l,Vn(l)),new Map(a)):null)},[]);return window.React.useEffect(()=>{const o=i.current;if(e!==o){l(o);const a=e.map(s=>{const c=Ln(s);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,Vn(c)]):null}).filter(s=>s!=null);n(a.length?new Map(a):null),i.current=e}return()=>{l(e),l(o)};function l(a){a.forEach(s=>{const c=Ln(s);c==null||c.removeEventListener("scroll",r)})}},[r,e]),window.React.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,l)=>wt(o,l),Ae):Fi(e):Ae,[e,t])}function Ji(e,t){t===void 0&&(t=[]);const n=window.React.useRef(null);return window.React.useEffect(()=>{n.current=null},t),window.React.useEffect(()=>{const i=e!==Ae;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?At(e,n.current):Ae}function Ko(e){window.React.useEffect(()=>{if(!Jt)return;const t=e.map(n=>{let{sensor:i}=n;return i.setup==null?void 0:i.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Ho(e,t){return window.React.useMemo(()=>e.reduce((n,i)=>{let{eventName:r,handler:o}=i;return n[r]=l=>{o(l,t)},n},{}),[e,t])}function Zi(e){return window.React.useMemo(()=>e?mo(e):null,[e])}const qi=[];function Xo(e,t){t===void 0&&(t=gt);const[n]=e,i=Zi(n?he(n):null),[r,o]=window.React.useState(qi);function l(){o(()=>e.length?e.map(s=>ji(s)?i:new Tn(t(s),s)):qi)}const a=sn({callback:l});return Ne(()=>{a==null||a.disconnect(),l(),e.forEach(s=>a==null?void 0:a.observe(s))},[e]),r}function Qi(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ct(t)?t:e}function Wo(e){let{measure:t}=e;const[n,i]=window.React.useState(null),r=window.React.useCallback(c=>{for(const{target:d}of c)if(Ct(d)){i(u=>{const v=t(d);return u?{...u,width:v.width,height:v.height}:v});break}},[t]),o=sn({callback:r}),l=window.React.useCallback(c=>{const d=Qi(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),i(d?t(d):null)},[t,o]),[a,s]=qt(l);return window.React.useMemo(()=>({nodeRef:a,rect:n,setRef:s}),[n,a,s])}const Uo=[{sensor:Bn,options:{}},{sensor:kn,options:{}}],Go={current:{}},an={draggable:{measure:Vi},droppable:{measure:Vi,strategy:Tt.WhileDragging,frequency:Yn.Optimized},dragOverlay:{measure:gt}};class Pt extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,i;return(n=(i=this.get(t))==null?void 0:i.node.current)!=null?n:void 0}}const Jo={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Pt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:nn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:an,measureDroppableContainers:nn,windowRect:null,measuringScheduled:!1},er={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:nn,draggableNodes:new Map,over:null,measureDroppableContainers:nn},kt=window.React.createContext(er),tr=window.React.createContext(Jo);function Zo(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Pt}}}function qo(e,t){switch(t.type){case Q.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Q.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Q.DragEnd:case Q.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Q.RegisterDroppable:{const{element:n}=t,{id:i}=n,r=new Pt(e.droppable.containers);return r.set(i,n),{...e,droppable:{...e.droppable,containers:r}}}case Q.SetDroppableDisabled:{const{id:n,key:i,disabled:r}=t,o=e.droppable.containers.get(n);if(!o||i!==o.key)return e;const l=new Pt(e.droppable.containers);return l.set(n,{...o,disabled:r}),{...e,droppable:{...e.droppable,containers:l}}}case Q.UnregisterDroppable:{const{id:n,key:i}=t,r=e.droppable.containers.get(n);if(!r||i!==r.key)return e;const o=new Pt(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Qo(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:r}=window.React.useContext(kt),o=Qt(i),l=Qt(n==null?void 0:n.id);return window.React.useEffect(()=>{if(!t&&!i&&o&&l!=null){if(!en(o)||document.activeElement===o.target)return;const a=r.get(l);if(!a)return;const{activatorNode:s,node:c}=a;if(!s.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[s.current,c.current]){if(!d)continue;const u=Wr(d);if(u){u.focus();break}}})}},[i,t,r,l,o]),null}function nr(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((r,o)=>o({transform:r,...i}),n):n}function es(e){return window.React.useMemo(()=>({draggable:{...an.draggable,...e==null?void 0:e.draggable},droppable:{...an.droppable,...e==null?void 0:e.droppable},dragOverlay:{...an.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function ts(e){let{activeNode:t,measure:n,initialRect:i,config:r=!0}=e;const o=window.React.useRef(!1),{x:l,y:a}=typeof r=="boolean"?{x:r,y:r}:r;Ne(()=>{if(!l&&!a||!t){o.current=!1;return}if(o.current||!i)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=n(c),u=Ai(d,i);if(l||(u.x=0),a||(u.y=0),o.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const v=Ti(c);v&&v.scrollBy({top:u.y,left:u.x})}},[t,l,a,i,n])}const ln=window.React.createContext({...Ae,scaleX:1,scaleY:1});var Qe;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Qe||(Qe={}));const ns=window.React.memo(function(t){var n,i,r,o;let{id:l,accessibility:a,autoScroll:s=!0,children:c,sensors:d=Uo,collisionDetection:u=co,measuring:v,modifiers:f,...g}=t;const w=window.React.useReducer(qo,void 0,Zo),[b,y]=w,[_,S]=Qr(),[R,D]=window.React.useState(Qe.Uninitialized),E=R===Qe.Initialized,{draggable:{active:m,nodes:z,translate:V},droppable:{containers:N}}=b,k=m!=null?z.get(m):null,L=window.React.useRef({initial:null,translated:null}),A=window.React.useMemo(()=>{var te;return m!=null?{id:m,data:(te=k==null?void 0:k.data)!=null?te:Go,rect:L}:null},[m,k]),F=window.React.useRef(null),[P,$]=window.React.useState(null),[T,W]=window.React.useState(null),se=Ot(g,Object.values(g)),ge=Nt("DndDescribedBy",l),G=window.React.useMemo(()=>N.getEnabled(),[N]),J=es(v),{droppableRects:U,measureDroppableContainers:ae,measuringScheduled:fe}=Po(G,{dragging:E,dependencies:[V.x,V.y],config:J.droppable}),ee=Vo(z,m),Le=window.React.useMemo(()=>T?tn(T):null,[T]),C=ut(),M=ko(ee,J.draggable.measure);ts({activeNode:m!=null?z.get(m):null,config:C.layoutShiftCompensation,initialRect:M,measure:J.draggable.measure});const O=Ui(ee,J.draggable.measure,M),K=Ui(ee?ee.parentElement:null),ye=window.React.useRef({activatorEvent:null,active:null,activeNode:ee,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:z,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ve=N.getNodeFor((n=ye.current.over)==null?void 0:n.id),Ee=Wo({measure:J.dragOverlay.measure}),He=(i=Ee.nodeRef.current)!=null?i:ee,et=E?(r=Ee.rect)!=null?r:O:null,ke=!!(Ee.nodeRef.current&&Ee.rect),jt=Fo(ke?null:O),Bt=Zi(He?he(He):null),je=$o(E?Ve??ee:null),tt=Xo(je),Be=nr(f,{transform:{x:V.x-jt.x,y:V.y-jt.y,scaleX:1,scaleY:1},activatorEvent:T,active:A,activeNodeRect:O,containerNodeRect:K,draggingNodeRect:et,over:ye.current.over,overlayNodeRect:Ee.rect,scrollableAncestors:je,scrollableAncestorRects:tt,windowRect:Bt}),bt=Le?wt(Le,V):null,yt=Yo(je),Ft=Ji(yt),lt=Ji(yt,[O]),nt=wt(Be,Ft),it=et?fo(et,Be):null,ct=A&&it?u({active:A,collisionRect:it,droppableRects:U,droppableContainers:G,pointerCoordinates:bt}):null,hn=Mi(ct,"id"),[Fe,$t]=window.React.useState(null),Yt=ke?Be:wt(Be,lt),Xe=uo(Yt,(o=Fe==null?void 0:Fe.rect)!=null?o:null,O),_e=window.React.useRef(null),$e=window.React.useCallback((te,ue)=>{let{sensor:ve,options:Ye}=ue;if(F.current==null)return;const pe=z.get(F.current);if(!pe)return;const de=te.nativeEvent,me=new ve({active:F.current,activeNode:pe,event:de,options:Ye,context:ye,onAbort(ne){if(!z.get(ne))return;const{onDragAbort:Ce}=se.current,ce={id:ne};Ce==null||Ce(ce),_({type:"onDragAbort",event:ce})},onPending(ne,le,Ce,ce){if(!z.get(ne))return;const{onDragPending:dt}=se.current,Re={id:ne,constraint:le,initialCoordinates:Ce,offset:ce};dt==null||dt(Re),_({type:"onDragPending",event:Re})},onStart(ne){const le=F.current;if(le==null)return;const Ce=z.get(le);if(!Ce)return;const{onDragStart:ce}=se.current,rt={activatorEvent:de,active:{id:le,data:Ce.data,rect:L}};window.ReactDOM.unstable_batchedUpdates(()=>{ce==null||ce(rt),D(Qe.Initializing),y({type:Q.DragStart,initialCoordinates:ne,active:le}),_({type:"onDragStart",event:rt}),$(_e.current),W(de)})},onMove(ne){y({type:Q.DragMove,coordinates:ne})},onEnd:Se(Q.DragEnd),onCancel:Se(Q.DragCancel)});_e.current=me;function Se(ne){return async function(){const{active:Ce,collisions:ce,over:rt,scrollAdjustedTranslate:dt}=ye.current;let Re=null;if(Ce&&dt){const{cancelDrop:We}=se.current;Re={activatorEvent:de,active:Ce,collisions:ce,delta:dt,over:rt},ne===Q.DragEnd&&typeof We=="function"&&await Promise.resolve(We(Re))&&(ne=Q.DragCancel)}F.current=null,window.ReactDOM.unstable_batchedUpdates(()=>{y({type:ne}),D(Qe.Uninitialized),$t(null),$(null),W(null),_e.current=null;const We=ne===Q.DragEnd?"onDragEnd":"onDragCancel";if(Re){const Rt=se.current[We];Rt==null||Rt(Re),_({type:We,event:Re})}})}}},[z]),_t=window.React.useCallback((te,ue)=>(ve,Ye)=>{const pe=ve.nativeEvent,de=z.get(Ye);if(F.current!==null||!de||pe.dndKit||pe.defaultPrevented)return;const me={active:de};te(ve,ue.options,me)===!0&&(pe.dndKit={capturedBy:ue.sensor},F.current=Ye,$e(ve,ue))},[z,$e]),Te=To(d,_t);Ko(d),Ne(()=>{O&&R===Qe.Initializing&&D(Qe.Initialized)},[O,R]),window.React.useEffect(()=>{const{onDragMove:te}=se.current,{active:ue,activatorEvent:ve,collisions:Ye,over:pe}=ye.current;if(!ue||!ve)return;const de={active:ue,activatorEvent:ve,collisions:Ye,delta:{x:nt.x,y:nt.y},over:pe};window.ReactDOM.unstable_batchedUpdates(()=>{te==null||te(de),_({type:"onDragMove",event:de})})},[nt.x,nt.y]),window.React.useEffect(()=>{const{active:te,activatorEvent:ue,collisions:ve,droppableContainers:Ye,scrollAdjustedTranslate:pe}=ye.current;if(!te||F.current==null||!ue||!pe)return;const{onDragOver:de}=se.current,me=Ye.get(hn),Se=me&&me.rect.current?{id:me.id,rect:me.rect.current,data:me.data,disabled:me.disabled}:null,ne={active:te,activatorEvent:ue,collisions:ve,delta:{x:pe.x,y:pe.y},over:Se};window.ReactDOM.unstable_batchedUpdates(()=>{$t(Se),de==null||de(ne),_({type:"onDragOver",event:ne})})},[hn]),Ne(()=>{ye.current={activatorEvent:T,active:A,activeNode:ee,collisionRect:it,collisions:ct,droppableRects:U,draggableNodes:z,draggingNode:He,draggingNodeRect:et,droppableContainers:N,over:Fe,scrollableAncestors:je,scrollAdjustedTranslate:nt},L.current={initial:et,translated:it}},[A,ee,ct,it,z,He,et,U,N,Fe,je,nt]),No({...C,delta:V,draggingRect:it,pointerCoordinates:bt,scrollableAncestors:je,scrollableAncestorRects:tt});const Wn=window.React.useMemo(()=>({active:A,activeNode:ee,activeNodeRect:O,activatorEvent:T,collisions:ct,containerNodeRect:K,dragOverlay:Ee,draggableNodes:z,droppableContainers:N,droppableRects:U,over:Fe,measureDroppableContainers:ae,scrollableAncestors:je,scrollableAncestorRects:tt,measuringConfiguration:J,measuringScheduled:fe,windowRect:Bt}),[A,ee,O,T,ct,K,Ee,z,N,U,Fe,ae,je,tt,J,fe,Bt]),St=window.React.useMemo(()=>({activatorEvent:T,activators:Te,active:A,activeNodeRect:O,ariaDescribedById:{draggable:ge},dispatch:y,draggableNodes:z,over:Fe,measureDroppableContainers:ae}),[T,Te,A,O,y,ge,z,Fe,ae]);return window.React.createElement(Di.Provider,{value:S},window.React.createElement(kt.Provider,{value:St},window.React.createElement(tr.Provider,{value:Wn},window.React.createElement(ln.Provider,{value:Xe},c)),window.React.createElement(Qo,{disabled:(a==null?void 0:a.restoreFocus)===!1})),window.React.createElement(no,{...a,hiddenTextDescribedById:ge}));function ut(){const te=(P==null?void 0:P.autoScrollEnabled)===!1,ue=typeof s=="object"?s.enabled===!1:s===!1,ve=E&&!te&&!ue;return typeof s=="object"?{...s,enabled:ve}:{enabled:ve}}}),is=window.React.createContext(null),ir="button",rs="Draggable";function os(e){let{id:t,data:n,disabled:i=!1,attributes:r}=e;const o=Nt(rs),{activators:l,activatorEvent:a,active:s,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:v}=window.React.useContext(kt),{role:f=ir,roleDescription:g="draggable",tabIndex:w=0}=r??{},b=(s==null?void 0:s.id)===t,y=window.React.useContext(b?ln:is),[_,S]=qt(),[R,D]=qt(),E=Ho(l,t),m=Ot(n);Ne(()=>(u.set(t,{id:t,key:o,node:_,activatorNode:R,data:m}),()=>{const V=u.get(t);V&&V.key===o&&u.delete(t)}),[u,t]);const z=window.React.useMemo(()=>({role:f,tabIndex:w,"aria-disabled":i,"aria-pressed":b&&f===ir?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[i,f,w,b,g,d.draggable]);return{active:s,activatorEvent:a,activeNodeRect:c,attributes:z,isDragging:b,listeners:i?void 0:E,node:_,over:v,setNodeRef:S,setActivatorNodeRef:D,transform:y}}function rr(){return window.React.useContext(tr)}const ss="Droppable",as={timeout:25};function ls(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:r}=e;const o=Nt(ss),{active:l,dispatch:a,over:s,measureDroppableContainers:c}=window.React.useContext(kt),d=window.React.useRef({disabled:n}),u=window.React.useRef(!1),v=window.React.useRef(null),f=window.React.useRef(null),{disabled:g,updateMeasurementsFor:w,timeout:b}={...as,...r},y=Ot(w??i),_=window.React.useCallback(()=>{if(!u.current){u.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),f.current=null},b)},[b]),S=sn({callback:_,disabled:g||!l}),R=window.React.useCallback((z,V)=>{S&&(V&&(S.unobserve(V),u.current=!1),z&&S.observe(z))},[S]),[D,E]=qt(R),m=Ot(t);return window.React.useEffect(()=>{!S||!D.current||(S.disconnect(),u.current=!1,S.observe(D.current))},[D,S]),window.React.useEffect(()=>(a({type:Q.RegisterDroppable,element:{id:i,key:o,disabled:n,node:D,rect:v,data:m}}),()=>a({type:Q.UnregisterDroppable,key:o,id:i})),[i]),window.React.useEffect(()=>{n!==d.current.disabled&&(a({type:Q.SetDroppableDisabled,id:i,key:o,disabled:n}),d.current.disabled=n)},[i,o,n,a]),{active:l,rect:v,isOver:(s==null?void 0:s.id)===i,node:D,over:s,setNodeRef:E}}function cs(e){let{animation:t,children:n}=e;const[i,r]=window.React.useState(null),[o,l]=window.React.useState(null),a=Qt(n);return!n&&!i&&a&&r(a),Ne(()=>{if(!o)return;const s=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(s==null||c==null){r(null);return}Promise.resolve(t(c,o)).then(()=>{r(null)})},[t,i,o]),window.React.createElement(window.React.Fragment,null,n,i?window.React.cloneElement(i,{ref:l}):null)}const us={x:0,y:0,scaleX:1,scaleY:1};function ds(e){let{children:t}=e;return window.React.createElement(kt.Provider,{value:er},window.React.createElement(ln.Provider,{value:us},t))}const hs={position:"fixed",touchAction:"none"},fs=e=>en(e)?"transform 250ms ease":void 0,vs=window.React.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:r,children:o,className:l,rect:a,style:s,transform:c,transition:d=fs}=e;if(!a)return null;const u=r?c:{...c,scaleX:1,scaleY:1},v={...hs,width:a.width,height:a.height,top:a.top,left:a.left,transform:qe.Transform.toString(u),transformOrigin:r&&i?ro(i,a):void 0,transition:typeof d=="function"?d(i):d,...s};return window.React.createElement(n,{className:l,style:v,ref:t},o)}),ps={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:qe.Transform.toString(t)},{transform:qe.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:i}=t;const r={},{styles:o,className:l}=e;if(o!=null&&o.active)for(const[a,s]of Object.entries(o.active))s!==void 0&&(r[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,s));if(o!=null&&o.dragOverlay)for(const[a,s]of Object.entries(o.dragOverlay))s!==void 0&&i.node.style.setProperty(a,s);return l!=null&&l.active&&n.node.classList.add(l.active),l!=null&&l.dragOverlay&&i.node.classList.add(l.dragOverlay),function(){for(const[s,c]of Object.entries(r))n.node.style.setProperty(s,c);l!=null&&l.active&&n.node.classList.remove(l.active)}})({styles:{active:{opacity:"0"}}})};function ms(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:r}=e;return Zt((o,l)=>{if(t===null)return;const a=n.get(o);if(!a)return;const s=a.node.current;if(!s)return;const c=Qi(l);if(!c)return;const{transform:d}=he(l).getComputedStyle(l),u=Li(d);if(!u)return;const v=typeof t=="function"?t:ws(t);return $i(s,r.draggable.measure),v({active:{id:o,data:a.data,node:s,rect:r.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:l,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:u})})}function ws(e){const{duration:t,easing:n,sideEffects:i,keyframes:r}={...ps,...e};return o=>{let{active:l,dragOverlay:a,transform:s,...c}=o;if(!t)return;const d={x:a.rect.left-l.rect.left,y:a.rect.top-l.rect.top},u={scaleX:s.scaleX!==1?l.rect.width*s.scaleX/a.rect.width:1,scaleY:s.scaleY!==1?l.rect.height*s.scaleY/a.rect.height:1},v={x:s.x-d.x,y:s.y-d.y,...u},f=r({...c,active:l,dragOverlay:a,transform:{initial:s,final:v}}),[g]=f,w=f[f.length-1];if(JSON.stringify(g)===JSON.stringify(w))return;const b=i==null?void 0:i({active:l,dragOverlay:a,...c}),y=a.node.animate(f,{duration:t,easing:n,fill:"forwards"});return new Promise(_=>{y.onfinish=()=>{b==null||b(),_()}})}}let or=0;function gs(e){return window.React.useMemo(()=>{if(e!=null)return or++,or},[e])}const bs=window.React.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:r,transition:o,modifiers:l,wrapperElement:a="div",className:s,zIndex:c=999}=e;const{activatorEvent:d,active:u,activeNodeRect:v,containerNodeRect:f,draggableNodes:g,droppableContainers:w,dragOverlay:b,over:y,measuringConfiguration:_,scrollableAncestors:S,scrollableAncestorRects:R,windowRect:D}=rr(),E=window.React.useContext(ln),m=gs(u==null?void 0:u.id),z=nr(l,{activatorEvent:d,active:u,activeNodeRect:v,containerNodeRect:f,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:S,scrollableAncestorRects:R,transform:E,windowRect:D}),V=Kn(v),N=ms({config:i,draggableNodes:g,droppableContainers:w,measuringConfiguration:_}),k=V?b.setRef:void 0;return window.React.createElement(ds,null,window.React.createElement(cs,{animation:N},u&&m?window.React.createElement(vs,{key:m,id:u.id,ref:k,as:a,activatorEvent:d,adjustScale:t,className:s,transition:o,rect:V,style:{zIndex:c,...r},transform:z},n):null))});function Hn(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function ys(e,t){return e.reduce((n,i,r)=>{const o=t.get(i);return o&&(n[r]=o),n},Array(e.length))}function cn(e){return e!==null&&e>=0}function _s(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ss(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const sr=e=>{let{rects:t,activeIndex:n,overIndex:i,index:r}=e;const o=Hn(t,i,n),l=t[r],a=o[r];return!a||!l?null:{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}},un={scaleX:1,scaleY:1},Rs=e=>{var t;let{activeIndex:n,activeNodeRect:i,index:r,rects:o,overIndex:l}=e;const a=(t=o[n])!=null?t:i;if(!a)return null;if(r===n){const c=o[l];return c?{x:0,y:n<l?c.top+c.height-(a.top+a.height):c.top-a.top,...un}:null}const s=xs(o,r,n);return r>n&&r<=l?{x:0,y:-a.height-s,...un}:r<n&&r>=l?{x:0,y:a.height+s,...un}:{x:0,y:0,...un}};function xs(e,t,n){const i=e[t],r=e[t-1],o=e[t+1];return i?n<t?r?i.top-(r.top+r.height):o?o.top-(i.top+i.height):0:o?o.top-(i.top+i.height):r?i.top-(r.top+r.height):0:0}const ar="Sortable",lr=window.React.createContext({activeIndex:-1,containerId:ar,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:sr,disabled:{draggable:!1,droppable:!1}});function zs(e){let{children:t,id:n,items:i,strategy:r=sr,disabled:o=!1}=e;const{active:l,dragOverlay:a,droppableRects:s,over:c,measureDroppableContainers:d}=rr(),u=Nt(ar,n),v=a.rect!==null,f=window.React.useMemo(()=>i.map(E=>typeof E=="object"&&"id"in E?E.id:E),[i]),g=l!=null,w=l?f.indexOf(l.id):-1,b=c?f.indexOf(c.id):-1,y=window.React.useRef(f),_=!_s(f,y.current),S=b!==-1&&w===-1||_,R=Ss(o);Ne(()=>{_&&g&&d(f)},[_,f,g,d]),window.React.useEffect(()=>{y.current=f},[f]);const D=window.React.useMemo(()=>({activeIndex:w,containerId:u,disabled:R,disableTransforms:S,items:f,overIndex:b,useDragOverlay:v,sortedRects:ys(f,s),strategy:r}),[w,u,R.draggable,R.droppable,S,f,b,s,v,r]);return window.React.createElement(lr.Provider,{value:D},t)}const Ds=e=>{let{id:t,items:n,activeIndex:i,overIndex:r}=e;return Hn(n,i,r).indexOf(t)},Is=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:r,items:o,newIndex:l,previousItems:a,previousContainerId:s,transition:c}=e;return!c||!i||a!==o&&r===l?!1:n?!0:l!==r&&t===s},Es={duration:200,easing:"ease"},cr="transform",Cs=qe.Transition.toString({property:cr,duration:0,easing:"linear"}),Os={roleDescription:"sortable"};function Ms(e){let{disabled:t,index:n,node:i,rect:r}=e;const[o,l]=window.React.useState(null),a=window.React.useRef(n);return Ne(()=>{if(!t&&n!==a.current&&i.current){const s=r.current;if(s){const c=gt(i.current,{ignoreTransform:!0}),d={x:s.left-c.left,y:s.top-c.top,scaleX:s.width/c.width,scaleY:s.height/c.height};(d.x||d.y)&&l(d)}}n!==a.current&&(a.current=n)},[t,n,i,r]),window.React.useEffect(()=>{o&&l(null)},[o]),o}function Ns(e){let{animateLayoutChanges:t=Is,attributes:n,disabled:i,data:r,getNewIndex:o=Ds,id:l,strategy:a,resizeObserverConfig:s,transition:c=Es}=e;const{items:d,containerId:u,activeIndex:v,disabled:f,disableTransforms:g,sortedRects:w,overIndex:b,useDragOverlay:y,strategy:_}=window.React.useContext(lr),S=As(i,f),R=d.indexOf(l),D=window.React.useMemo(()=>({sortable:{containerId:u,index:R,items:d},...r}),[u,r,R,d]),E=window.React.useMemo(()=>d.slice(d.indexOf(l)),[d,l]),{rect:m,node:z,isOver:V,setNodeRef:N}=ls({id:l,data:D,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...s}}),{active:k,activatorEvent:L,activeNodeRect:A,attributes:F,setNodeRef:P,listeners:$,isDragging:T,over:W,setActivatorNodeRef:se,transform:ge}=os({id:l,data:D,attributes:{...Os,...n},disabled:S.draggable}),G=Yr(N,P),J=!!k,U=J&&!g&&cn(v)&&cn(b),ae=!y&&T,fe=ae&&U?ge:null,Le=U?fe??(a??_)({rects:w,activeNodeRect:A,activeIndex:v,overIndex:b,index:R}):null,C=cn(v)&&cn(b)?o({id:l,items:d,activeIndex:v,overIndex:b}):R,M=k==null?void 0:k.id,O=window.React.useRef({activeId:M,items:d,newIndex:C,containerId:u}),K=d!==O.current.items,ye=t({active:k,containerId:u,isDragging:T,isSorting:J,id:l,index:R,items:d,newIndex:O.current.newIndex,previousItems:O.current.items,previousContainerId:O.current.containerId,transition:c,wasDragging:O.current.activeId!=null}),Ve=Ms({disabled:!ye,index:R,node:z,rect:m});return window.React.useEffect(()=>{J&&O.current.newIndex!==C&&(O.current.newIndex=C),u!==O.current.containerId&&(O.current.containerId=u),d!==O.current.items&&(O.current.items=d)},[J,C,u,d]),window.React.useEffect(()=>{if(M===O.current.activeId)return;if(M!=null&&O.current.activeId==null){O.current.activeId=M;return}const He=setTimeout(()=>{O.current.activeId=M},50);return()=>clearTimeout(He)},[M]),{active:k,activeIndex:v,attributes:F,data:D,rect:m,index:R,newIndex:C,items:d,isOver:V,isSorting:J,isDragging:T,listeners:$,node:z,overIndex:b,over:W,setNodeRef:G,setActivatorNodeRef:se,setDroppableNodeRef:N,setDraggableNodeRef:P,transform:Ve??Le,transition:Ee()};function Ee(){if(Ve||K&&O.current.newIndex===R)return Cs;if(!(ae&&!en(L)||!c)&&(J||ye))return qe.Transition.toString({...c,property:cr})}}function As(e,t){var n,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:t.droppable}}function dn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Ls=[B.Down,B.Right,B.Up,B.Left],Vs=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:r,droppableContainers:o,over:l,scrollableAncestors:a}}=t;if(Ls.includes(e.code)){if(e.preventDefault(),!n||!i)return;const s=[];o.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const v=r.get(u.id);if(v)switch(e.code){case B.Down:i.top<v.top&&s.push(u);break;case B.Up:i.top>v.top&&s.push(u);break;case B.Left:i.left>v.left&&s.push(u);break;case B.Right:i.left<v.left&&s.push(u);break}});const c=ao({collisionRect:i,droppableRects:r,droppableContainers:s});let d=Mi(c,"id");if(d===(l==null?void 0:l.id)&&c.length>1&&(d=c[1].id),d!=null){const u=o.get(n.id),v=o.get(d),f=v?r.get(v.id):null,g=v==null?void 0:v.node.current;if(g&&f&&u&&v){const b=rn(g).some((E,m)=>a[m]!==E),y=ur(u,v),_=Ts(u,v),S=b||!y?{x:0,y:0}:{x:_?i.width-f.width:0,y:_?i.height-f.height:0},R={x:f.left,y:f.top};return S.x&&S.y?R:At(R,S)}}}};function ur(e,t){return!dn(e)||!dn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Ts(e,t){return!dn(e)||!dn(t)||!ur(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Ps(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xn={exports:{}};/*!
|
|
10
|
+
`},ir={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function rr(t){let{announcements:e=ir,container:n,hiddenTextDescribedById:i,screenReaderInstructions:r=nr}=t;const{announce:s,announcement:l}=Qi(),a=$e("DndLiveRegion"),[o,c]=window.React.useState(!1);if(window.React.useEffect(()=>{c(!0)},[]),er(window.React.useMemo(()=>({onDragStart(u){let{active:h}=u;s(e.onDragStart({active:h}))},onDragMove(u){let{active:h,over:f}=u;e.onDragMove&&s(e.onDragMove({active:h,over:f}))},onDragOver(u){let{active:h,over:f}=u;s(e.onDragOver({active:h,over:f}))},onDragEnd(u){let{active:h,over:f}=u;s(e.onDragEnd({active:h,over:f}))},onDragCancel(u){let{active:h,over:f}=u;s(e.onDragCancel({active:h,over:f}))}}),[s,e])),!o)return null;const d=window.React.createElement(window.React.Fragment,null,window.React.createElement(Zi,{id:i,value:r.draggable}),window.React.createElement(qi,{id:a,announcement:l}));return n?window.ReactDOM.createPortal(d,n):d}var $;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})($||($={}));function ut(){}function In(t,e){return window.React.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function sr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return window.React.useMemo(()=>[...e].filter(i=>i!=null),[...e])}const le=Object.freeze({x:0,y:0});function En(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function or(t,e){const n=ct(t);if(!n)return"0 0";const i={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return i.x+"% "+i.y+"%"}function Cn(t,e){let{data:{value:n}}=t,{data:{value:i}}=e;return n-i}function ar(t,e){let{data:{value:n}}=t,{data:{value:i}}=e;return i-n}function On(t){let{left:e,top:n,height:i,width:r}=t;return[{x:e,y:n},{x:e+r,y:n},{x:e,y:n+i},{x:e+r,y:n+i}]}function Nn(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function Mn(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const lr=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const r=Mn(e,e.left,e.top),s=[];for(const l of i){const{id:a}=l,o=n.get(a);if(o){const c=En(Mn(o),r);s.push({id:a,data:{droppableContainer:l,value:c}})}}return s.sort(Cn)},cr=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const r=On(e),s=[];for(const l of i){const{id:a}=l,o=n.get(a);if(o){const c=On(o),d=r.reduce((h,f,m)=>h+En(c[m],f),0),u=Number((d/4).toFixed(4));s.push({id:a,data:{droppableContainer:l,value:u}})}}return s.sort(Cn)};function ur(t,e){const n=Math.max(e.top,t.top),i=Math.max(e.left,t.left),r=Math.min(e.left+e.width,t.left+t.width),s=Math.min(e.top+e.height,t.top+t.height),l=r-i,a=s-n;if(i<r&&n<s){const o=e.width*e.height,c=t.width*t.height,d=l*a,u=d/(o+c-d);return Number(u.toFixed(4))}return 0}const dr=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const r=[];for(const s of i){const{id:l}=s,a=n.get(l);if(a){const o=ur(a,e);o>0&&r.push({id:l,data:{droppableContainer:s,value:o}})}}return r.sort(ar)};function hr(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function Vn(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:le}function fr(t){return function(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];return r.reduce((l,a)=>({...l,top:l.top+t*a.y,bottom:l.bottom+t*a.y,left:l.left+t*a.x,right:l.right+t*a.x}),{...n})}}const mr=fr(1);function An(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function vr(t,e,n){const i=An(e);if(!i)return t;const{scaleX:r,scaleY:s,x:l,y:a}=i,o=t.left-l-(1-r)*parseFloat(n),c=t.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?t.width/r:t.width,u=s?t.height/s:t.height;return{width:d,height:u,top:c,right:o+d,bottom:c+u,left:o}}const pr={ignoreTransform:!1};function Ne(t,e){e===void 0&&(e=pr);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:d}=W(t).getComputedStyle(t);c&&(n=vr(n,c,d))}const{top:i,left:r,width:s,height:l,bottom:a,right:o}=n;return{top:i,left:r,width:s,height:l,bottom:a,right:o}}function Ln(t){return Ne(t,{ignoreTransform:!0})}function wr(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function gr(t,e){return e===void 0&&(e=W(t).getComputedStyle(t)),e.position==="fixed"}function br(t,e){e===void 0&&(e=W(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const s=e[r];return typeof s=="string"?n.test(s):!1})}function dt(t,e){const n=[];function i(r){if(e!=null&&n.length>=e||!r)return n;if(Ot(r)&&r.scrollingElement!=null&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Fe(r)||Rn(r)||n.includes(r))return n;const s=W(t).getComputedStyle(r);return r!==t&&br(r,s)&&n.push(r),gr(r,s)?n:i(r.parentNode)}return t?i(t):n}function Tn(t){const[e]=dt(t,1);return e??null}function Mt(t){return!rt||!t?null:Ee(t)?t:Ct(t)?Ot(t)||t===Ce(t).scrollingElement?window:Fe(t)?t:null:null}function Pn(t){return Ee(t)?t.scrollX:t.scrollLeft}function kn(t){return Ee(t)?t.scrollY:t.scrollTop}function Vt(t){return{x:Pn(t),y:kn(t)}}var K;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(K||(K={}));function Bn(t){return!rt||!t?!1:t===document.scrollingElement}function Fn(t){const e={x:0,y:0},n=Bn(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},i={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},r=t.scrollTop<=e.y,s=t.scrollLeft<=e.x,l=t.scrollTop>=i.y,a=t.scrollLeft>=i.x;return{isTop:r,isLeft:s,isBottom:l,isRight:a,maxScroll:i,minScroll:e}}const yr={x:.2,y:.2};function _r(t,e,n,i,r){let{top:s,left:l,right:a,bottom:o}=n;i===void 0&&(i=10),r===void 0&&(r=yr);const{isTop:c,isBottom:d,isLeft:u,isRight:h}=Fn(t),f={x:0,y:0},m={x:0,y:0},v={height:e.height*r.y,width:e.width*r.x};return!c&&s<=e.top+v.height?(f.y=K.Backward,m.y=i*Math.abs((e.top+v.height-s)/v.height)):!d&&o>=e.bottom-v.height&&(f.y=K.Forward,m.y=i*Math.abs((e.bottom-v.height-o)/v.height)),!h&&a>=e.right-v.width?(f.x=K.Forward,m.x=i*Math.abs((e.right-v.width-a)/v.width)):!u&&l<=e.left+v.width&&(f.x=K.Backward,m.x=i*Math.abs((e.left+v.width-l)/v.width)),{direction:f,speed:m}}function Sr(t){if(t===document.scrollingElement){const{innerWidth:s,innerHeight:l}=window;return{top:0,left:0,right:s,bottom:l,width:s,height:l}}const{top:e,left:n,right:i,bottom:r}=t.getBoundingClientRect();return{top:e,left:n,right:i,bottom:r,width:t.clientWidth,height:t.clientHeight}}function jn(t){return t.reduce((e,n)=>Oe(e,Vt(n)),le)}function Rr(t){return t.reduce((e,n)=>e+Pn(n),0)}function xr(t){return t.reduce((e,n)=>e+kn(n),0)}function Yn(t,e){if(e===void 0&&(e=Ne),!t)return;const{top:n,left:i,bottom:r,right:s}=e(t);Tn(t)&&(r<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const zr=[["x",["left","right"],Rr],["y",["top","bottom"],xr]];class At{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=dt(n),r=jn(i);this.rect={...e},this.width=e.width,this.height=e.height;for(const[s,l,a]of zr)for(const o of l)Object.defineProperty(this,o,{get:()=>{const c=a(i),d=r[s]-c;return this.rect[o]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class He{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=e}add(e,n,i){var r;(r=this.target)==null||r.addEventListener(e,n,i),this.listeners.push([e,n,i])}}function Dr(t){const{EventTarget:e}=W(t);return t instanceof e?t:Ce(t)}function Lt(t,e){const n=Math.abs(t.x),i=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+i**2)>e:"x"in e&&"y"in e?n>e.x&&i>e.y:"x"in e?n>e.x:"y"in e?i>e.y:!1}var re;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(re||(re={}));function $n(t){t.preventDefault()}function Ir(t){t.stopPropagation()}var V;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(V||(V={}));const Kn={start:[V.Space,V.Enter],cancel:[V.Esc],end:[V.Space,V.Enter,V.Tab]},Er=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case V.Right:return{...n,x:n.x+25};case V.Left:return{...n,x:n.x-25};case V.Down:return{...n,y:n.y+25};case V.Up:return{...n,y:n.y-25}}};class Tt{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new He(Ce(n)),this.windowListeners=new He(W(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(re.Resize,this.handleCancel),this.windowListeners.add(re.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(re.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,i=e.node.current;i&&Yn(i),n(le)}handleKeyDown(e){if(lt(e)){const{active:n,context:i,options:r}=this.props,{keyboardCodes:s=Kn,coordinateGetter:l=Er,scrollBehavior:a="smooth"}=r,{code:o}=e;if(s.end.includes(o)){this.handleEnd(e);return}if(s.cancel.includes(o)){this.handleCancel(e);return}const{collisionRect:c}=i.current,d=c?{x:c.left,y:c.top}:le;this.referenceCoordinates||(this.referenceCoordinates=d);const u=l(e,{active:n,context:i.current,currentCoordinates:d});if(u){const h=Ke(u,d),f={x:0,y:0},{scrollableAncestors:m}=i.current;for(const v of m){const p=e.code,{isTop:g,isRight:b,isLeft:y,isBottom:_,maxScroll:R,minScroll:x}=Fn(v),w=Sr(v),S={x:Math.min(p===V.Right?w.right-w.width/2:w.right,Math.max(p===V.Right?w.left:w.left+w.width/2,u.x)),y:Math.min(p===V.Down?w.bottom-w.height/2:w.bottom,Math.max(p===V.Down?w.top:w.top+w.height/2,u.y))},C=p===V.Right&&!b||p===V.Left&&!y,N=p===V.Down&&!_||p===V.Up&&!g;if(C&&S.x!==u.x){const L=v.scrollLeft+h.x,O=p===V.Right&&L<=R.x||p===V.Left&&L>=x.x;if(O&&!h.y){v.scrollTo({left:L,behavior:a});return}O?f.x=v.scrollLeft-L:f.x=p===V.Right?v.scrollLeft-R.x:v.scrollLeft-x.x,f.x&&v.scrollBy({left:-f.x,behavior:a});break}else if(N&&S.y!==u.y){const L=v.scrollTop+h.y,O=p===V.Down&&L<=R.y||p===V.Up&&L>=x.y;if(O&&!h.x){v.scrollTo({top:L,behavior:a});return}O?f.y=v.scrollTop-L:f.y=p===V.Down?v.scrollTop-R.y:v.scrollTop-x.y,f.y&&v.scrollBy({top:-f.y,behavior:a});break}}this.handleMove(e,Oe(Ke(u,this.referenceCoordinates),f))}}}handleMove(e,n){const{onMove:i}=this.props;e.preventDefault(),i(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Tt.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:i=Kn,onActivation:r}=e,{active:s}=n;const{code:l}=t.nativeEvent;if(i.start.includes(l)){const a=s.activatorNode.current;return a&&t.target!==a?!1:(t.preventDefault(),r==null||r({event:t.nativeEvent}),!0)}return!1}}];function Hn(t){return!!(t&&"distance"in t)}function Xn(t){return!!(t&&"delay"in t)}class Pt{constructor(e,n,i){var r;i===void 0&&(i=Dr(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:s}=e,{target:l}=s;this.props=e,this.events=n,this.document=Ce(l),this.documentListeners=new He(this.document),this.listeners=new He(i),this.windowListeners=new He(W(l)),this.initialCoordinates=(r=ct(s))!=null?r:le,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(re.Resize,this.handleCancel),this.windowListeners.add(re.DragStart,$n),this.windowListeners.add(re.VisibilityChange,this.handleCancel),this.windowListeners.add(re.ContextMenu,$n),this.documentListeners.add(re.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Xn(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Hn(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:i,onPending:r}=this.props;r(i,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(re.Click,Ir,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(re.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:i,initialCoordinates:r,props:s}=this,{onMove:l,options:{activationConstraint:a}}=s;if(!r)return;const o=(n=ct(e))!=null?n:le,c=Ke(r,o);if(!i&&a){if(Hn(a)){if(a.tolerance!=null&&Lt(c,a.tolerance))return this.handleCancel();if(Lt(c,a.distance))return this.handleStart()}if(Xn(a)&&Lt(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}e.cancelable&&e.preventDefault(),l(o)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===V.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const Cr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class kt extends Pt{constructor(e){const{event:n}=e,i=Ce(n.target);super(e,Cr,i)}}kt.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;return!n.isPrimary||n.button!==0?!1:(i==null||i({event:n}),!0)}}];const Or={move:{name:"mousemove"},end:{name:"mouseup"}};var Bt;(function(t){t[t.RightClick=2]="RightClick"})(Bt||(Bt={}));class Nr extends Pt{constructor(e){super(e,Or,Ce(e.event.target))}}Nr.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;return n.button===Bt.RightClick?!1:(i==null||i({event:n}),!0)}}];const Ft={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Mr extends Pt{constructor(e){super(e,Ft)}static setup(){return window.addEventListener(Ft.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ft.move.name,e)};function e(){}}}Mr.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;const{touches:r}=n;return r.length>1?!1:(i==null||i({event:n}),!0)}}];var Xe;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Xe||(Xe={}));var ht;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(ht||(ht={}));function Vr(t){let{acceleration:e,activator:n=Xe.Pointer,canScroll:i,draggingRect:r,enabled:s,interval:l=5,order:a=ht.TreeOrder,pointerCoordinates:o,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:h}=t;const f=Lr({delta:u,disabled:!s}),[m,v]=Xi(),p=window.React.useRef({x:0,y:0}),g=window.React.useRef({x:0,y:0}),b=window.React.useMemo(()=>{switch(n){case Xe.Pointer:return o?{top:o.y,bottom:o.y,left:o.x,right:o.x}:null;case Xe.DraggableRect:return r}},[n,r,o]),y=window.React.useRef(null),_=window.React.useCallback(()=>{const x=y.current;if(!x)return;const w=p.current.x*g.current.x,S=p.current.y*g.current.y;x.scrollBy(w,S)},[]),R=window.React.useMemo(()=>a===ht.TreeOrder?[...c].reverse():c,[a,c]);window.React.useEffect(()=>{if(!s||!c.length||!b){v();return}for(const x of R){if((i==null?void 0:i(x))===!1)continue;const w=c.indexOf(x),S=d[w];if(!S)continue;const{direction:C,speed:N}=_r(x,S,b,e,h);for(const L of["x","y"])f[L][C[L]]||(N[L]=0,C[L]=0);if(N.x>0||N.y>0){v(),y.current=x,m(_,l),p.current=N,g.current=C;return}}p.current={x:0,y:0},g.current={x:0,y:0},v()},[e,_,i,v,s,l,JSON.stringify(b),JSON.stringify(f),m,c,R,d,JSON.stringify(h)])}const Ar={x:{[K.Backward]:!1,[K.Forward]:!1},y:{[K.Backward]:!1,[K.Forward]:!1}};function Lr(t){let{delta:e,disabled:n}=t;const i=at(e);return Ye(r=>{if(n||!i||!r)return Ar;const s={x:Math.sign(e.x-i.x),y:Math.sign(e.y-i.y)};return{x:{[K.Backward]:r.x[K.Backward]||s.x===-1,[K.Forward]:r.x[K.Forward]||s.x===1},y:{[K.Backward]:r.y[K.Backward]||s.y===-1,[K.Forward]:r.y[K.Forward]||s.y===1}}},[n,e,i])}function Tr(t,e){const n=e!=null?t.get(e):void 0,i=n?n.node.current:null;return Ye(r=>{var s;return e==null?null:(s=i??r)!=null?s:null},[i,e])}function Pr(t,e){return window.React.useMemo(()=>t.reduce((n,i)=>{const{sensor:r}=i,s=r.activators.map(l=>({eventName:l.eventName,handler:e(l.handler,i)}));return[...n,...s]},[]),[t,e])}var We;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(We||(We={}));var jt;(function(t){t.Optimized="optimized"})(jt||(jt={}));const Wn=new Map;function kr(t,e){let{dragging:n,dependencies:i,config:r}=e;const[s,l]=window.React.useState(null),{frequency:a,measure:o,strategy:c}=r,d=window.React.useRef(t),u=p(),h=je(u),f=window.React.useCallback(function(g){g===void 0&&(g=[]),!h.current&&l(b=>b===null?g:b.concat(g.filter(y=>!b.includes(y))))},[h]),m=window.React.useRef(null),v=Ye(g=>{if(u&&!n)return Wn;if(!g||g===Wn||d.current!==t||s!=null){const b=new Map;for(let y of t){if(!y)continue;if(s&&s.length>0&&!s.includes(y.id)&&y.rect.current){b.set(y.id,y.rect.current);continue}const _=y.node.current,R=_?new At(o(_),_):null;y.rect.current=R,R&&b.set(y.id,R)}return b}return g},[t,s,n,u,o]);return window.React.useEffect(()=>{d.current=t},[t]),window.React.useEffect(()=>{u||f()},[n,u]),window.React.useEffect(()=>{s&&s.length>0&&l(null)},[JSON.stringify(s)]),window.React.useEffect(()=>{u||typeof a!="number"||m.current!==null||(m.current=setTimeout(()=>{f(),m.current=null},a))},[a,u,f,...i]),{droppableRects:v,measureDroppableContainers:f,measuringScheduled:s!=null};function p(){switch(c){case We.Always:return!1;case We.BeforeDragging:return n;default:return!n}}}function Yt(t,e){return Ye(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function Br(t,e){return Yt(t,e)}function Fr(t){let{callback:e,disabled:n}=t;const i=st(e),r=window.React.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(i)},[i,n]);return window.React.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function ft(t){let{callback:e,disabled:n}=t;const i=st(e),r=window.React.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(i)},[n]);return window.React.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function jr(t){return new At(Ne(t),t)}function Un(t,e,n){e===void 0&&(e=jr);const[i,r]=window.React.useState(null);function s(){r(o=>{if(!t)return null;if(t.isConnected===!1){var c;return(c=o??n)!=null?c:null}const d=e(t);return JSON.stringify(o)===JSON.stringify(d)?o:d})}const l=Fr({callback(o){if(t)for(const c of o){const{type:d,target:u}=c;if(d==="childList"&&u instanceof HTMLElement&&u.contains(t)){s();break}}}}),a=ft({callback:s});return ae(()=>{s(),t?(a==null||a.observe(t),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),l==null||l.disconnect())},[t]),i}function Yr(t){const e=Yt(t);return Vn(t,e)}const Gn=[];function $r(t){const e=window.React.useRef(t),n=Ye(i=>t?i&&i!==Gn&&t&&e.current&&t.parentNode===e.current.parentNode?i:dt(t):Gn,[t]);return window.React.useEffect(()=>{e.current=t},[t]),n}function Kr(t){const[e,n]=window.React.useState(null),i=window.React.useRef(t),r=window.React.useCallback(s=>{const l=Mt(s.target);l&&n(a=>a?(a.set(l,Vt(l)),new Map(a)):null)},[]);return window.React.useEffect(()=>{const s=i.current;if(t!==s){l(s);const a=t.map(o=>{const c=Mt(o);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,Vt(c)]):null}).filter(o=>o!=null);n(a.length?new Map(a):null),i.current=t}return()=>{l(t),l(s)};function l(a){a.forEach(o=>{const c=Mt(o);c==null||c.removeEventListener("scroll",r)})}},[r,t]),window.React.useMemo(()=>t.length?e?Array.from(e.values()).reduce((s,l)=>Oe(s,l),le):jn(t):le,[t,e])}function Jn(t,e){e===void 0&&(e=[]);const n=window.React.useRef(null);return window.React.useEffect(()=>{n.current=null},e),window.React.useEffect(()=>{const i=t!==le;i&&!n.current&&(n.current=t),!i&&n.current&&(n.current=null)},[t]),n.current?Ke(t,n.current):le}function Hr(t){window.React.useEffect(()=>{if(!rt)return;const e=t.map(n=>{let{sensor:i}=n;return i.setup==null?void 0:i.setup()});return()=>{for(const n of e)n==null||n()}},t.map(e=>{let{sensor:n}=e;return n}))}function Xr(t,e){return window.React.useMemo(()=>t.reduce((n,i)=>{let{eventName:r,handler:s}=i;return n[r]=l=>{s(l,e)},n},{}),[t,e])}function Zn(t){return window.React.useMemo(()=>t?wr(t):null,[t])}const qn=[];function Wr(t,e){e===void 0&&(e=Ne);const[n]=t,i=Zn(n?W(n):null),[r,s]=window.React.useState(qn);function l(){s(()=>t.length?t.map(o=>Bn(o)?i:new At(e(o),o)):qn)}const a=ft({callback:l});return ae(()=>{a==null||a.disconnect(),l(),t.forEach(o=>a==null?void 0:a.observe(o))},[t]),r}function Qn(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Fe(e)?e:t}function Ur(t){let{measure:e}=t;const[n,i]=window.React.useState(null),r=window.React.useCallback(c=>{for(const{target:d}of c)if(Fe(d)){i(u=>{const h=e(d);return u?{...u,width:h.width,height:h.height}:h});break}},[e]),s=ft({callback:r}),l=window.React.useCallback(c=>{const d=Qn(c);s==null||s.disconnect(),d&&(s==null||s.observe(d)),i(d?e(d):null)},[e,s]),[a,o]=ot(l);return window.React.useMemo(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}const Gr=[{sensor:kt,options:{}},{sensor:Tt,options:{}}],Jr={current:{}},mt={draggable:{measure:Ln},droppable:{measure:Ln,strategy:We.WhileDragging,frequency:jt.Optimized},dragOverlay:{measure:Ne}};class Ue extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,i;return(n=(i=this.get(e))==null?void 0:i.node.current)!=null?n:void 0}}const Zr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ue,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ut},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:mt,measureDroppableContainers:ut,windowRect:null,measuringScheduled:!1},ei={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ut,draggableNodes:new Map,over:null,measureDroppableContainers:ut},Ge=window.React.createContext(ei),ti=window.React.createContext(Zr);function qr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ue}}}function Qr(t,e){switch(e.type){case $.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case $.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case $.DragEnd:case $.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case $.RegisterDroppable:{const{element:n}=e,{id:i}=n,r=new Ue(t.droppable.containers);return r.set(i,n),{...t,droppable:{...t.droppable,containers:r}}}case $.SetDroppableDisabled:{const{id:n,key:i,disabled:r}=e,s=t.droppable.containers.get(n);if(!s||i!==s.key)return t;const l=new Ue(t.droppable.containers);return l.set(n,{...s,disabled:r}),{...t,droppable:{...t.droppable,containers:l}}}case $.UnregisterDroppable:{const{id:n,key:i}=e,r=t.droppable.containers.get(n);if(!r||i!==r.key)return t;const s=new Ue(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function es(t){let{disabled:e}=t;const{active:n,activatorEvent:i,draggableNodes:r}=window.React.useContext(Ge),s=at(i),l=at(n==null?void 0:n.id);return window.React.useEffect(()=>{if(!e&&!i&&s&&l!=null){if(!lt(s)||document.activeElement===s.target)return;const a=r.get(l);if(!a)return;const{activatorNode:o,node:c}=a;if(!o.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[o.current,c.current]){if(!d)continue;const u=Gi(d);if(u){u.focus();break}}})}},[i,e,r,l,s]),null}function ni(t,e){let{transform:n,...i}=e;return t!=null&&t.length?t.reduce((r,s)=>s({transform:r,...i}),n):n}function ts(t){return window.React.useMemo(()=>({draggable:{...mt.draggable,...t==null?void 0:t.draggable},droppable:{...mt.droppable,...t==null?void 0:t.droppable},dragOverlay:{...mt.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function ns(t){let{activeNode:e,measure:n,initialRect:i,config:r=!0}=t;const s=window.React.useRef(!1),{x:l,y:a}=typeof r=="boolean"?{x:r,y:r}:r;ae(()=>{if(!l&&!a||!e){s.current=!1;return}if(s.current||!i)return;const c=e==null?void 0:e.node.current;if(!c||c.isConnected===!1)return;const d=n(c),u=Vn(d,i);if(l||(u.x=0),a||(u.y=0),s.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const h=Tn(c);h&&h.scrollBy({top:u.y,left:u.x})}},[e,l,a,i,n])}const vt=window.React.createContext({...le,scaleX:1,scaleY:1});var we;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(we||(we={}));const is=window.React.memo(function(e){var n,i,r,s;let{id:l,accessibility:a,autoScroll:o=!0,children:c,sensors:d=Gr,collisionDetection:u=dr,measuring:h,modifiers:f,...m}=e;const v=window.React.useReducer(Qr,void 0,qr),[p,g]=v,[b,y]=tr(),[_,R]=window.React.useState(we.Uninitialized),x=_===we.Initialized,{draggable:{active:w,nodes:S,translate:C},droppable:{containers:N}}=p,L=w!=null?S.get(w):null,O=window.React.useRef({initial:null,translated:null}),I=window.React.useMemo(()=>{var X;return w!=null?{id:w,data:(X=L==null?void 0:L.data)!=null?X:Jr,rect:O}:null},[w,L]),P=window.React.useRef(null),[A,T]=window.React.useState(null),[M,B]=window.React.useState(null),U=je(m,Object.values(m)),ce=$e("DndDescribedBy",l),j=window.React.useMemo(()=>N.getEnabled(),[N]),Y=ts(h),{droppableRects:F,measureDroppableContainers:G,measuringScheduled:ue}=kr(j,{dragging:x,dependencies:[C.x,C.y],config:Y.droppable}),J=Tr(S,w),ge=window.React.useMemo(()=>M?ct(M):null,[M]),E=Zs(),D=Br(J,Y.draggable.measure);ns({activeNode:w!=null?S.get(w):null,config:E.layoutShiftCompensation,initialRect:D,measure:Y.draggable.measure});const z=Un(J,Y.draggable.measure,D),k=Un(J?J.parentElement:null),de=window.React.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Me=N.getNodeFor((n=de.current.over)==null?void 0:n.id),me=Ur({measure:Y.dragOverlay.measure}),Ve=(i=me.nodeRef.current)!=null?i:J,Ae=x?(r=me.rect)!=null?r:z:null,fi=!!(me.nodeRef.current&&me.rect),mi=Yr(fi?null:z),Ht=Zn(Ve?W(Ve):null),be=$r(x?Me??J:null),bt=Wr(be),yt=ni(f,{transform:{x:C.x-mi.x,y:C.y-mi.y,scaleX:1,scaleY:1},activatorEvent:M,active:I,activeNodeRect:z,containerNodeRect:k,draggingNodeRect:Ae,over:de.current.over,overlayNodeRect:me.rect,scrollableAncestors:be,scrollableAncestorRects:bt,windowRect:Ht}),vi=ge?Oe(ge,C):null,pi=Kr(be),Ks=Jn(pi),Hs=Jn(pi,[z]),Le=Oe(yt,Ks),Te=Ae?mr(Ae,yt):null,Je=I&&Te?u({active:I,collisionRect:Te,droppableRects:F,droppableContainers:j,pointerCoordinates:vi}):null,wi=Nn(Je,"id"),[ye,gi]=window.React.useState(null),Xs=fi?yt:Oe(yt,Hs),Ws=hr(Xs,(s=ye==null?void 0:ye.rect)!=null?s:null,z),Xt=window.React.useRef(null),bi=window.React.useCallback((X,q)=>{let{sensor:Q,options:_e}=q;if(P.current==null)return;const se=S.get(P.current);if(!se)return;const ee=X.nativeEvent,he=new Q({active:P.current,activeNode:se,event:ee,options:_e,context:de,onAbort(H){if(!S.get(H))return;const{onDragAbort:fe}=U.current,ve={id:H};fe==null||fe(ve),b({type:"onDragAbort",event:ve})},onPending(H,Se,fe,ve){if(!S.get(H))return;const{onDragPending:qe}=U.current,Re={id:H,constraint:Se,initialCoordinates:fe,offset:ve};qe==null||qe(Re),b({type:"onDragPending",event:Re})},onStart(H){const Se=P.current;if(Se==null)return;const fe=S.get(Se);if(!fe)return;const{onDragStart:ve}=U.current,Ze={activatorEvent:ee,active:{id:Se,data:fe.data,rect:O}};window.ReactDOM.unstable_batchedUpdates(()=>{ve==null||ve(Ze),R(we.Initializing),g({type:$.DragStart,initialCoordinates:H,active:Se}),b({type:"onDragStart",event:Ze}),T(Xt.current),B(ee)})},onMove(H){g({type:$.DragMove,coordinates:H})},onEnd:Pe($.DragEnd),onCancel:Pe($.DragCancel)});Xt.current=he;function Pe(H){return async function(){const{active:fe,collisions:ve,over:Ze,scrollAdjustedTranslate:qe}=de.current;let Re=null;if(fe&&qe){const{cancelDrop:Qe}=U.current;Re={activatorEvent:ee,active:fe,collisions:ve,delta:qe,over:Ze},H===$.DragEnd&&typeof Qe=="function"&&await Promise.resolve(Qe(Re))&&(H=$.DragCancel)}P.current=null,window.ReactDOM.unstable_batchedUpdates(()=>{g({type:H}),R(we.Uninitialized),gi(null),T(null),B(null),Xt.current=null;const Qe=H===$.DragEnd?"onDragEnd":"onDragCancel";if(Re){const Wt=U.current[Qe];Wt==null||Wt(Re),b({type:Qe,event:Re})}})}}},[S]),Us=window.React.useCallback((X,q)=>(Q,_e)=>{const se=Q.nativeEvent,ee=S.get(_e);if(P.current!==null||!ee||se.dndKit||se.defaultPrevented)return;const he={active:ee};X(Q,q.options,he)===!0&&(se.dndKit={capturedBy:q.sensor},P.current=_e,bi(Q,q))},[S,bi]),yi=Pr(d,Us);Hr(d),ae(()=>{z&&_===we.Initializing&&R(we.Initialized)},[z,_]),window.React.useEffect(()=>{const{onDragMove:X}=U.current,{active:q,activatorEvent:Q,collisions:_e,over:se}=de.current;if(!q||!Q)return;const ee={active:q,activatorEvent:Q,collisions:_e,delta:{x:Le.x,y:Le.y},over:se};window.ReactDOM.unstable_batchedUpdates(()=>{X==null||X(ee),b({type:"onDragMove",event:ee})})},[Le.x,Le.y]),window.React.useEffect(()=>{const{active:X,activatorEvent:q,collisions:Q,droppableContainers:_e,scrollAdjustedTranslate:se}=de.current;if(!X||P.current==null||!q||!se)return;const{onDragOver:ee}=U.current,he=_e.get(wi),Pe=he&&he.rect.current?{id:he.id,rect:he.rect.current,data:he.data,disabled:he.disabled}:null,H={active:X,activatorEvent:q,collisions:Q,delta:{x:se.x,y:se.y},over:Pe};window.ReactDOM.unstable_batchedUpdates(()=>{gi(Pe),ee==null||ee(H),b({type:"onDragOver",event:H})})},[wi]),ae(()=>{de.current={activatorEvent:M,active:I,activeNode:J,collisionRect:Te,collisions:Je,droppableRects:F,draggableNodes:S,draggingNode:Ve,draggingNodeRect:Ae,droppableContainers:N,over:ye,scrollableAncestors:be,scrollAdjustedTranslate:Le},O.current={initial:Ae,translated:Te}},[I,J,Je,Te,S,Ve,Ae,F,N,ye,be,Le]),Vr({...E,delta:C,draggingRect:Te,pointerCoordinates:vi,scrollableAncestors:be,scrollableAncestorRects:bt});const Gs=window.React.useMemo(()=>({active:I,activeNode:J,activeNodeRect:z,activatorEvent:M,collisions:Je,containerNodeRect:k,dragOverlay:me,draggableNodes:S,droppableContainers:N,droppableRects:F,over:ye,measureDroppableContainers:G,scrollableAncestors:be,scrollableAncestorRects:bt,measuringConfiguration:Y,measuringScheduled:ue,windowRect:Ht}),[I,J,z,M,Je,k,me,S,N,F,ye,G,be,bt,Y,ue,Ht]),Js=window.React.useMemo(()=>({activatorEvent:M,activators:yi,active:I,activeNodeRect:z,ariaDescribedById:{draggable:ce},dispatch:g,draggableNodes:S,over:ye,measureDroppableContainers:G}),[M,yi,I,z,g,ce,S,ye,G]);return window.React.createElement(Dn.Provider,{value:y},window.React.createElement(Ge.Provider,{value:Js},window.React.createElement(ti.Provider,{value:Gs},window.React.createElement(vt.Provider,{value:Ws},c)),window.React.createElement(es,{disabled:(a==null?void 0:a.restoreFocus)===!1})),window.React.createElement(rr,{...a,hiddenTextDescribedById:ce}));function Zs(){const X=(A==null?void 0:A.autoScrollEnabled)===!1,q=typeof o=="object"?o.enabled===!1:o===!1,Q=x&&!X&&!q;return typeof o=="object"?{...o,enabled:Q}:{enabled:Q}}}),rs=window.React.createContext(null),ii="button",ss="Draggable";function os(t){let{id:e,data:n,disabled:i=!1,attributes:r}=t;const s=$e(ss),{activators:l,activatorEvent:a,active:o,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:h}=window.React.useContext(Ge),{role:f=ii,roleDescription:m="draggable",tabIndex:v=0}=r??{},p=(o==null?void 0:o.id)===e,g=window.React.useContext(p?vt:rs),[b,y]=ot(),[_,R]=ot(),x=Xr(l,e),w=je(n);ae(()=>(u.set(e,{id:e,key:s,node:b,activatorNode:_,data:w}),()=>{const C=u.get(e);C&&C.key===s&&u.delete(e)}),[u,e]);const S=window.React.useMemo(()=>({role:f,tabIndex:v,"aria-disabled":i,"aria-pressed":p&&f===ii?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[i,f,v,p,m,d.draggable]);return{active:o,activatorEvent:a,activeNodeRect:c,attributes:S,isDragging:p,listeners:i?void 0:x,node:b,over:h,setNodeRef:y,setActivatorNodeRef:R,transform:g}}function ri(){return window.React.useContext(ti)}const as="Droppable",ls={timeout:25};function cs(t){let{data:e,disabled:n=!1,id:i,resizeObserverConfig:r}=t;const s=$e(as),{active:l,dispatch:a,over:o,measureDroppableContainers:c}=window.React.useContext(Ge),d=window.React.useRef({disabled:n}),u=window.React.useRef(!1),h=window.React.useRef(null),f=window.React.useRef(null),{disabled:m,updateMeasurementsFor:v,timeout:p}={...ls,...r},g=je(v??i),b=window.React.useCallback(()=>{if(!u.current){u.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(g.current)?g.current:[g.current]),f.current=null},p)},[p]),y=ft({callback:b,disabled:m||!l}),_=window.React.useCallback((S,C)=>{y&&(C&&(y.unobserve(C),u.current=!1),S&&y.observe(S))},[y]),[R,x]=ot(_),w=je(e);return window.React.useEffect(()=>{!y||!R.current||(y.disconnect(),u.current=!1,y.observe(R.current))},[R,y]),window.React.useEffect(()=>(a({type:$.RegisterDroppable,element:{id:i,key:s,disabled:n,node:R,rect:h,data:w}}),()=>a({type:$.UnregisterDroppable,key:s,id:i})),[i]),window.React.useEffect(()=>{n!==d.current.disabled&&(a({type:$.SetDroppableDisabled,id:i,key:s,disabled:n}),d.current.disabled=n)},[i,s,n,a]),{active:l,rect:h,isOver:(o==null?void 0:o.id)===i,node:R,over:o,setNodeRef:x}}function us(t){let{animation:e,children:n}=t;const[i,r]=window.React.useState(null),[s,l]=window.React.useState(null),a=at(n);return!n&&!i&&a&&r(a),ae(()=>{if(!s)return;const o=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(o==null||c==null){r(null);return}Promise.resolve(e(c,s)).then(()=>{r(null)})},[e,i,s]),window.React.createElement(window.React.Fragment,null,n,i?window.React.cloneElement(i,{ref:l}):null)}const ds={x:0,y:0,scaleX:1,scaleY:1};function hs(t){let{children:e}=t;return window.React.createElement(Ge.Provider,{value:ei},window.React.createElement(vt.Provider,{value:ds},e))}const fs={position:"fixed",touchAction:"none"},ms=t=>lt(t)?"transform 250ms ease":void 0,vs=window.React.forwardRef((t,e)=>{let{as:n,activatorEvent:i,adjustScale:r,children:s,className:l,rect:a,style:o,transform:c,transition:d=ms}=t;if(!a)return null;const u=r?c:{...c,scaleX:1,scaleY:1},h={...fs,width:a.width,height:a.height,top:a.top,left:a.left,transform:pe.Transform.toString(u),transformOrigin:r&&i?or(i,a):void 0,transition:typeof d=="function"?d(i):d,...o};return window.React.createElement(n,{className:l,style:h,ref:e},s)}),ps={duration:250,easing:"ease",keyframes:t=>{let{transform:{initial:e,final:n}}=t;return[{transform:pe.Transform.toString(e)},{transform:pe.Transform.toString(n)}]},sideEffects:(t=>e=>{let{active:n,dragOverlay:i}=e;const r={},{styles:s,className:l}=t;if(s!=null&&s.active)for(const[a,o]of Object.entries(s.active))o!==void 0&&(r[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,o));if(s!=null&&s.dragOverlay)for(const[a,o]of Object.entries(s.dragOverlay))o!==void 0&&i.node.style.setProperty(a,o);return l!=null&&l.active&&n.node.classList.add(l.active),l!=null&&l.dragOverlay&&i.node.classList.add(l.dragOverlay),function(){for(const[o,c]of Object.entries(r))n.node.style.setProperty(o,c);l!=null&&l.active&&n.node.classList.remove(l.active)}})({styles:{active:{opacity:"0"}}})};function ws(t){let{config:e,draggableNodes:n,droppableContainers:i,measuringConfiguration:r}=t;return st((s,l)=>{if(e===null)return;const a=n.get(s);if(!a)return;const o=a.node.current;if(!o)return;const c=Qn(l);if(!c)return;const{transform:d}=W(l).getComputedStyle(l),u=An(d);if(!u)return;const h=typeof e=="function"?e:gs(e);return Yn(o,r.draggable.measure),h({active:{id:s,data:a.data,node:o,rect:r.draggable.measure(o)},draggableNodes:n,dragOverlay:{node:l,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:u})})}function gs(t){const{duration:e,easing:n,sideEffects:i,keyframes:r}={...ps,...t};return s=>{let{active:l,dragOverlay:a,transform:o,...c}=s;if(!e)return;const d={x:a.rect.left-l.rect.left,y:a.rect.top-l.rect.top},u={scaleX:o.scaleX!==1?l.rect.width*o.scaleX/a.rect.width:1,scaleY:o.scaleY!==1?l.rect.height*o.scaleY/a.rect.height:1},h={x:o.x-d.x,y:o.y-d.y,...u},f=r({...c,active:l,dragOverlay:a,transform:{initial:o,final:h}}),[m]=f,v=f[f.length-1];if(JSON.stringify(m)===JSON.stringify(v))return;const p=i==null?void 0:i({active:l,dragOverlay:a,...c}),g=a.node.animate(f,{duration:e,easing:n,fill:"forwards"});return new Promise(b=>{g.onfinish=()=>{p==null||p(),b()}})}}let si=0;function bs(t){return window.React.useMemo(()=>{if(t!=null)return si++,si},[t])}const ys=window.React.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:i,style:r,transition:s,modifiers:l,wrapperElement:a="div",className:o,zIndex:c=999}=t;const{activatorEvent:d,active:u,activeNodeRect:h,containerNodeRect:f,draggableNodes:m,droppableContainers:v,dragOverlay:p,over:g,measuringConfiguration:b,scrollableAncestors:y,scrollableAncestorRects:_,windowRect:R}=ri(),x=window.React.useContext(vt),w=bs(u==null?void 0:u.id),S=ni(l,{activatorEvent:d,active:u,activeNodeRect:h,containerNodeRect:f,draggingNodeRect:p.rect,over:g,overlayNodeRect:p.rect,scrollableAncestors:y,scrollableAncestorRects:_,transform:x,windowRect:R}),C=Yt(h),N=ws({config:i,draggableNodes:m,droppableContainers:v,measuringConfiguration:b}),L=C?p.setRef:void 0;return window.React.createElement(hs,null,window.React.createElement(us,{animation:N},u&&w?window.React.createElement(vs,{key:w,id:u.id,ref:L,as:a,activatorEvent:d,adjustScale:e,className:o,transition:s,rect:C,style:{zIndex:c,...r},transform:S},n):null))});function $t(t,e,n){const i=t.slice();return i.splice(n<0?i.length+n:n,0,i.splice(e,1)[0]),i}function _s(t,e){return t.reduce((n,i,r)=>{const s=e.get(i);return s&&(n[r]=s),n},Array(t.length))}function pt(t){return t!==null&&t>=0}function Ss(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Rs(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const oi=t=>{let{rects:e,activeIndex:n,overIndex:i,index:r}=t;const s=$t(e,i,n),l=e[r],a=s[r];return!a||!l?null:{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}},wt={scaleX:1,scaleY:1},xs=t=>{var e;let{activeIndex:n,activeNodeRect:i,index:r,rects:s,overIndex:l}=t;const a=(e=s[n])!=null?e:i;if(!a)return null;if(r===n){const c=s[l];return c?{x:0,y:n<l?c.top+c.height-(a.top+a.height):c.top-a.top,...wt}:null}const o=zs(s,r,n);return r>n&&r<=l?{x:0,y:-a.height-o,...wt}:r<n&&r>=l?{x:0,y:a.height+o,...wt}:{x:0,y:0,...wt}};function zs(t,e,n){const i=t[e],r=t[e-1],s=t[e+1];return i?n<e?r?i.top-(r.top+r.height):s?s.top-(i.top+i.height):0:s?s.top-(i.top+i.height):r?i.top-(r.top+r.height):0:0}const ai="Sortable",li=window.React.createContext({activeIndex:-1,containerId:ai,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:oi,disabled:{draggable:!1,droppable:!1}});function Ds(t){let{children:e,id:n,items:i,strategy:r=oi,disabled:s=!1}=t;const{active:l,dragOverlay:a,droppableRects:o,over:c,measureDroppableContainers:d}=ri(),u=$e(ai,n),h=a.rect!==null,f=window.React.useMemo(()=>i.map(x=>typeof x=="object"&&"id"in x?x.id:x),[i]),m=l!=null,v=l?f.indexOf(l.id):-1,p=c?f.indexOf(c.id):-1,g=window.React.useRef(f),b=!Ss(f,g.current),y=p!==-1&&v===-1||b,_=Rs(s);ae(()=>{b&&m&&d(f)},[b,f,m,d]),window.React.useEffect(()=>{g.current=f},[f]);const R=window.React.useMemo(()=>({activeIndex:v,containerId:u,disabled:_,disableTransforms:y,items:f,overIndex:p,useDragOverlay:h,sortedRects:_s(f,o),strategy:r}),[v,u,_.draggable,_.droppable,y,f,p,o,h,r]);return window.React.createElement(li.Provider,{value:R},e)}const Is=t=>{let{id:e,items:n,activeIndex:i,overIndex:r}=t;return $t(n,i,r).indexOf(e)},Es=t=>{let{containerId:e,isSorting:n,wasDragging:i,index:r,items:s,newIndex:l,previousItems:a,previousContainerId:o,transition:c}=t;return!c||!i||a!==s&&r===l?!1:n?!0:l!==r&&e===o},Cs={duration:200,easing:"ease"},ci="transform",Os=pe.Transition.toString({property:ci,duration:0,easing:"linear"}),Ns={roleDescription:"sortable"};function Ms(t){let{disabled:e,index:n,node:i,rect:r}=t;const[s,l]=window.React.useState(null),a=window.React.useRef(n);return ae(()=>{if(!e&&n!==a.current&&i.current){const o=r.current;if(o){const c=Ne(i.current,{ignoreTransform:!0}),d={x:o.left-c.left,y:o.top-c.top,scaleX:o.width/c.width,scaleY:o.height/c.height};(d.x||d.y)&&l(d)}}n!==a.current&&(a.current=n)},[e,n,i,r]),window.React.useEffect(()=>{s&&l(null)},[s]),s}function Vs(t){let{animateLayoutChanges:e=Es,attributes:n,disabled:i,data:r,getNewIndex:s=Is,id:l,strategy:a,resizeObserverConfig:o,transition:c=Cs}=t;const{items:d,containerId:u,activeIndex:h,disabled:f,disableTransforms:m,sortedRects:v,overIndex:p,useDragOverlay:g,strategy:b}=window.React.useContext(li),y=As(i,f),_=d.indexOf(l),R=window.React.useMemo(()=>({sortable:{containerId:u,index:_,items:d},...r}),[u,r,_,d]),x=window.React.useMemo(()=>d.slice(d.indexOf(l)),[d,l]),{rect:w,node:S,isOver:C,setNodeRef:N}=cs({id:l,data:R,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:x,...o}}),{active:L,activatorEvent:O,activeNodeRect:I,attributes:P,setNodeRef:A,listeners:T,isDragging:M,over:B,setActivatorNodeRef:U,transform:ce}=os({id:l,data:R,attributes:{...Ns,...n},disabled:y.draggable}),j=Hi(N,A),Y=!!L,F=Y&&!m&&pt(h)&&pt(p),G=!g&&M,ue=G&&F?ce:null,ge=F?ue??(a??b)({rects:v,activeNodeRect:I,activeIndex:h,overIndex:p,index:_}):null,E=pt(h)&&pt(p)?s({id:l,items:d,activeIndex:h,overIndex:p}):_,D=L==null?void 0:L.id,z=window.React.useRef({activeId:D,items:d,newIndex:E,containerId:u}),k=d!==z.current.items,de=e({active:L,containerId:u,isDragging:M,isSorting:Y,id:l,index:_,items:d,newIndex:z.current.newIndex,previousItems:z.current.items,previousContainerId:z.current.containerId,transition:c,wasDragging:z.current.activeId!=null}),Me=Ms({disabled:!de,index:_,node:S,rect:w});return window.React.useEffect(()=>{Y&&z.current.newIndex!==E&&(z.current.newIndex=E),u!==z.current.containerId&&(z.current.containerId=u),d!==z.current.items&&(z.current.items=d)},[Y,E,u,d]),window.React.useEffect(()=>{if(D===z.current.activeId)return;if(D!=null&&z.current.activeId==null){z.current.activeId=D;return}const Ve=setTimeout(()=>{z.current.activeId=D},50);return()=>clearTimeout(Ve)},[D]),{active:L,activeIndex:h,attributes:P,data:R,rect:w,index:_,newIndex:E,items:d,isOver:C,isSorting:Y,isDragging:M,listeners:T,node:S,overIndex:p,over:B,setNodeRef:j,setActivatorNodeRef:U,setDroppableNodeRef:N,setDraggableNodeRef:A,transform:Me??ge,transition:me()};function me(){if(Me||k&&z.current.newIndex===_)return Os;if(!(G&&!lt(O)||!c)&&(Y||de))return pe.Transition.toString({...c,property:ci})}}function As(t,e){var n,i;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t==null?void 0:t.draggable)!=null?n:e.draggable,droppable:(i=t==null?void 0:t.droppable)!=null?i:e.droppable}}function gt(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const Ls=[V.Down,V.Right,V.Up,V.Left],Ts=(t,e)=>{let{context:{active:n,collisionRect:i,droppableRects:r,droppableContainers:s,over:l,scrollableAncestors:a}}=e;if(Ls.includes(t.code)){if(t.preventDefault(),!n||!i)return;const o=[];s.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const h=r.get(u.id);if(h)switch(t.code){case V.Down:i.top<h.top&&o.push(u);break;case V.Up:i.top>h.top&&o.push(u);break;case V.Left:i.left>h.left&&o.push(u);break;case V.Right:i.left<h.left&&o.push(u);break}});const c=cr({collisionRect:i,droppableRects:r,droppableContainers:o});let d=Nn(c,"id");if(d===(l==null?void 0:l.id)&&c.length>1&&(d=c[1].id),d!=null){const u=s.get(n.id),h=s.get(d),f=h?r.get(h.id):null,m=h==null?void 0:h.node.current;if(m&&f&&u&&h){const p=dt(m).some((x,w)=>a[w]!==x),g=ui(u,h),b=Ps(u,h),y=p||!g?{x:0,y:0}:{x:b?i.width-f.width:0,y:b?i.height-f.height:0},_={x:f.left,y:f.top};return y.x&&y.y?_:Ke(_,y)}}}};function ui(t,e){return!gt(t)||!gt(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function Ps(t,e){return!gt(t)||!gt(e)||!ui(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}function ks(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Kt={exports:{}};/*!
|
|
11
11
|
Copyright (c) 2018 Jed Watson.
|
|
12
12
|
Licensed under the MIT License (MIT), see
|
|
13
13
|
http://jedwatson.github.io/classnames
|
|
14
|
-
*/var
|
|
14
|
+
*/var di;function Bs(){return di||(di=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",l=0;l<arguments.length;l++){var a=arguments[l];a&&(s=r(s,i(a)))}return s}function i(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var l="";for(var a in s)e.call(s,a)&&s[a]&&(l=r(l,a));return l}function r(s,l){return l?s?s+" "+l:s+l:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Kt)),Kt.exports}var Fs=Bs();const hi=ks(Fs);function js({id:t,item:e,renderItem:n,disabled:i,itemWrapperClassName:r,activeId:s}){const{attributes:l,listeners:a,setNodeRef:o,setActivatorNodeRef:c,transform:d,transition:u,isDragging:h,over:f}=Vs({id:t,disabled:i}),m={transform:pe.Transform.toString(d),transition:u,opacity:h?.5:1,zIndex:h?1:0},v=(f==null?void 0:f.id)===t&&s!==t,p={ref:c,...a,...l};return React.createElement("div",{ref:o,style:m,className:hi(r),"data-sortable-wrapper":"true"},n(e,{dragHandleProps:p,isDragging:h,isDragOver:v}))}function Ys({item:t,renderItem:e,itemWrapperClassName:n}){const i={};return React.createElement("div",{className:hi(n,"bg-white"),style:{boxShadow:"0 4px 12px rgba(0,0,0,0.15)",transform:"scale(1.02)",cursor:"grabbing"}},e(t,{dragHandleProps:i,isDragging:!0,isDragOver:!1}))}function $s(t){const{items:e,onChange:n,getId:i,renderItem:r,validateReorder:s,renderError:l,disabled:a=!1,className:o,itemWrapperClassName:c}=t,[d,u]=window.wp.element.useState(null),[h,f]=window.wp.element.useState(null),m=window.wp.element.useMemo(()=>e.map(i),[e,i]),v=sr(In(kt,{activationConstraint:{distance:5}}),In(Tt,{coordinateGetter:Ts})),p=_=>{u(_.active.id),f(null)},g=_=>{const{active:R,over:x}=_;if(u(null),!x||R.id===x.id)return;const w=m.indexOf(R.id),S=m.indexOf(x.id);if(w===-1||S===-1)return;const C=$t(e,w,S);if(s){const N=s(C);if(N){f(N);return}}f(null),n(C)},b=()=>{u(null)},y=d!==null?e.find(_=>i(_)===d):null;return React.createElement("div",{className:o},h&&l?l(h):null,React.createElement(is,{sensors:v,collisionDetection:lr,onDragStart:p,onDragEnd:g,onDragCancel:b},React.createElement(Ds,{items:m,strategy:xs},React.createElement("div",{className:"flex flex-col gap-2"},e.map(_=>{const R=i(_);return React.createElement(js,{key:R,id:R,item:_,renderItem:r,disabled:a,itemWrapperClassName:c,activeId:d})}))),React.createElement(ys,null,y?React.createElement(Ys,{item:y,renderItem:r,itemWrapperClassName:c}):null)))}xe.Allotment=Ki,xe.SortableList=$s,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})}));
|
|
15
15
|
//# sourceMappingURL=libraries.umd.cjs.map
|