@kangtae49/just-layout 0.0.8 → 0.0.10
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/index.d.ts +1 -1
- package/dist/index.es.js +5 -3
- package/dist/index.umd.js +3 -3
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -449,7 +449,7 @@ declare interface SplitSizePiexels {
|
|
|
449
449
|
|
|
450
450
|
export declare function stableStringify(obj: any): string;
|
|
451
451
|
|
|
452
|
-
export declare const
|
|
452
|
+
export declare const storeLayout: Map<string, any>;
|
|
453
453
|
|
|
454
454
|
export declare interface TabTitleProps {
|
|
455
455
|
justId: JustId;
|
package/dist/index.es.js
CHANGED
|
@@ -10906,7 +10906,7 @@ ql.load(
|
|
|
10906
10906
|
...Zx
|
|
10907
10907
|
);
|
|
10908
10908
|
const Ns = /* @__PURE__ */ new Map();
|
|
10909
|
-
window.
|
|
10909
|
+
window.storeLayout = Ns;
|
|
10910
10910
|
window.toJS = Ax;
|
|
10911
10911
|
const Cr = (t) => {
|
|
10912
10912
|
const [e] = Et(() => ql.get(to.JustLayoutFactory)(t));
|
|
@@ -17335,7 +17335,9 @@ var T2 = {
|
|
|
17335
17335
|
function D2({ layoutId: t, justId: e, winInfo: n }) {
|
|
17336
17336
|
console.log("TabTitle justId", e);
|
|
17337
17337
|
const [i, a] = nd(), [s] = Et({ x: 0, y: 0 }), c = Cr(t), f = c.getTabTitleTooltip(e), d = (v) => {
|
|
17338
|
-
|
|
17338
|
+
c.removeWin({
|
|
17339
|
+
justId: v
|
|
17340
|
+
});
|
|
17339
17341
|
}, p = (v, b) => {
|
|
17340
17342
|
c.activeWin({
|
|
17341
17343
|
justId: b
|
|
@@ -18683,6 +18685,6 @@ export {
|
|
|
18683
18685
|
ql as container,
|
|
18684
18686
|
Jx as justLayoutModule,
|
|
18685
18687
|
FA as stableStringify,
|
|
18686
|
-
Ns as
|
|
18688
|
+
Ns as storeLayout,
|
|
18687
18689
|
Cr as useJustLayoutStore
|
|
18688
18690
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -93,7 +93,7 @@ The target is already observable of different type.
|
|
|
93
93
|
Extending builtins is not supported.`),n;process.env.NODE_ENV!=="production"&&!Object.isExtensible(n)&&ie("Cannot make the designated object observable; it is not extensible");var r=(t=e?.name)!=null?t:process.env.NODE_ENV!=="production"?(Jt(n)?"ObservableObject":n.constructor.name)+"@"+Bn():"ObservableObject",o=new rc(n,new Map,String(r),iw(e));return Ao(n,be,o),n}var aS=kr("ObservableObjectAdministration",rc);function Zh(n){return Kh[n]||(Kh[n]={get:function(){return this[be].getObservablePropValue_(n)},set:function(t){return this[be].setObservablePropValue_(n,t)}})}function hi(n){return Ca(n)?aS(n[be]):!1}function Qh(n,e,t){var r;process.env.NODE_ENV!=="production"&&(n.appliedAnnotations_[t]=e),(r=n.target_[Ft])==null||delete r[t]}function ep(n,e,t){if(process.env.NODE_ENV!=="production"&&!cp(e)&&ie("Cannot annotate '"+n.name_+"."+t.toString()+"': Invalid annotation."),process.env.NODE_ENV!=="production"&&!La(e)&&vn(n.appliedAnnotations_,t)){var r=n.name_+"."+t.toString(),o=n.appliedAnnotations_[t].annotationType_,s=e.annotationType_;ie("Cannot apply '"+s+"' to '"+r+"':"+(`
|
|
94
94
|
The field is already annotated with '`+o+"'.")+`
|
|
95
95
|
Re-annotating fields is not allowed.
|
|
96
|
-
Use 'override' annotation for methods overridden by subclass.`)}}var sS=np(0),uS=(function(){var n=!1,e={};return Object.defineProperty(e,"0",{set:function(){n=!0}}),Object.create(e)[0]=1,n===!1})(),ic=0,tp=function(){};function cS(n,e){Object.setPrototypeOf?Object.setPrototypeOf(n.prototype,e):n.prototype.__proto__!==void 0?n.prototype.__proto__=e:n.prototype=e}cS(tp,Array.prototype);var oc=(function(n){function e(r,o,s,c){var f;return s===void 0&&(s=process.env.NODE_ENV!=="production"?"ObservableArray@"+Bn():"ObservableArray"),c===void 0&&(c=!1),f=n.call(this)||this,$r(function(){var d=new nc(s,o,c,!0);d.proxy_=f,ah(f,be,d),r&&r.length&&f.spliceWithArray(0,0,r),uS&&Object.defineProperty(f,"0",sS)}),f}fh(e,n);var t=e.prototype;return t.concat=function(){this[be].atom_.reportObserved();for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return Array.prototype.concat.apply(this.slice(),s.map(function(f){return ko(f)?f.slice():f}))},t[Symbol.iterator]=function(){var r=this,o=0;return sc({next:function(){return o<r.length?{value:r[o++],done:!1}:{done:!0,value:void 0}}})},Pi(e,[{key:"length",get:function(){return this[be].getArrayLength_()},set:function(o){this[be].setArrayLength_(o)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])})(tp);Object.entries(Ya).forEach(function(n){var e=n[0],t=n[1];e!=="concat"&&Ao(oc.prototype,e,t)});function np(n){return{enumerable:!1,configurable:!0,get:function(){return this[be].get_(n)},set:function(t){this[be].set_(n,t)}}}function fS(n){Qn(oc.prototype,""+n,np(n))}function rp(n){if(n>ic){for(var e=ic;e<n+100;e++)fS(e);ic=n}}rp(1e3);function lS(n,e,t){return new oc(n,e,t)}function ji(n,e){if(typeof n=="object"&&n!==null){if(ko(n))return e!==void 0&&ie(23),n[be].atom_;if(Wn(n))return n.atom_;if(pr(n)){if(e===void 0)return n.keysAtom_;var t=n.data_.get(e)||n.hasMap_.get(e);return t||ie(25,e,Ka(n)),t}if(hi(n)){if(!e)return ie(26);var r=n[be].values_.get(e);return r||ie(27,e,Ka(n)),r}if(Vu(n)||Do(n)||Ha(n))return n}else if(gt(n)&&Ha(n[be]))return n[be];ie(28)}function ip(n,e){if(n||ie(29),Vu(n)||Do(n)||Ha(n)||pr(n)||Wn(n))return n;if(n[be])return n[be];ie(24,n)}function Ka(n,e){var t;if(e!==void 0)t=ji(n,e);else{if(fi(n))return n.name;hi(n)||pr(n)||Wn(n)?t=ip(n):t=ji(n)}return t.name_}function $r(n){var e=ui(),t=Hu(!0);bn();try{return n()}finally{yn(),qu(t),lr(e)}}var op=Eo.toString;function ap(n,e,t){return t===void 0&&(t=-1),ac(n,e,t)}function ac(n,e,t,r,o){if(n===e)return n!==0||1/n===1/e;if(n==null||e==null)return!1;if(n!==n)return e!==e;var s=typeof n;if(s!=="function"&&s!=="object"&&typeof e!="object")return!1;var c=op.call(n);if(c!==op.call(e))return!1;switch(c){case"[object RegExp]":case"[object String]":return""+n==""+e;case"[object Number]":return+n!=+n?+e!=+e:+n==0?1/+n===1/e:+n==+e;case"[object Date]":case"[object Boolean]":return+n==+e;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(n)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":t>=0&&t++;break}n=sp(n),e=sp(e);var f=c==="[object Array]";if(!f){if(typeof n!="object"||typeof e!="object")return!1;var d=n.constructor,p=e.constructor;if(d!==p&&!(gt(d)&&d instanceof d&>(p)&&p instanceof p)&&"constructor"in n&&"constructor"in e)return!1}if(t===0)return!1;t<0&&(t=-1),r=r||[],o=o||[];for(var v=r.length;v--;)if(r[v]===n)return o[v]===e;if(r.push(n),o.push(e),f){if(v=n.length,v!==e.length)return!1;for(;v--;)if(!ac(n[v],e[v],t-1,r,o))return!1}else{var b=Object.keys(n),w=b.length;if(Object.keys(e).length!==w)return!1;for(var y=0;y<w;y++){var O=b[y];if(!(vn(e,O)&&ac(n[O],e[O],t-1,r,o)))return!1}}return r.pop(),o.pop(),!0}function sp(n){return ko(n)?n.slice():Di(n)||pr(n)||cr(n)||Wn(n)?Array.from(n.entries()):n}var up,dS=((up=xa().Iterator)==null?void 0:up.prototype)||{};function sc(n){return n[Symbol.iterator]=hS,Object.assign(Object.create(dS),n)}function hS(){return this}function cp(n){return n instanceof Object&&typeof n.annotationType_=="string"&>(n.make_)&>(n.extend_)}["Symbol","Map","Set"].forEach(function(n){var e=xa();typeof e[n]>"u"&&ie("MobX requires global '"+n+"' to be available or polyfilled")}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Aw,extras:{getDebugName:Ka},$mobx:be});var pS=Object.getOwnPropertyDescriptor,vS=(n,e,t,r)=>{for(var o=r>1?void 0:r?pS(e,t):e,s=n.length-1,c;s>=0;s--)(c=n[s])&&(o=c(o)||o);return o},gS=(n,e)=>(t,r)=>e(t,r,n);Fe.JustLayoutStore=class{service;layout=null;lastActiveId=null;lastActiveTm=new Date().getTime();fullScreenLayout=null;fullScreenHideTitle=!1;tabTitleMap=new Map;tabTitleTooltipMap=new Map;constructor(e){this.service=e,Zw(this,{service:!1},{autoBind:!0})}setLayout=e=>{this.layout=e};setTabTitle=(e,t)=>{this.tabTitleMap.set($e.toString(e),t)};getTabTitle=e=>this.tabTitleMap.get($e.toString(e));setTabTitleTooltip=(e,t)=>{this.tabTitleTooltipMap.set($e.toString(e),t)};getTabTitleTooltip=e=>this.tabTitleTooltipMap.get($e.toString(e));setFullScreenLayoutByBranch=e=>{e===null?this.fullScreenLayout=null:this.fullScreenLayout=this.service.getNodeAtBranch(this.layout,e)};setFullScreenHideTitle=e=>{this.fullScreenHideTitle=e};addTab=e=>{const t=this.service.getTabBranch(this.layout,[]);t!=null&&(this.service.hasWinId(this.layout,e.justId)?this.layout=this.service.activeWinId(this.layout,e.justId):this.layout=this.service.addTabWin(this.layout,t,e.justId,-1),this.lastActiveId=e.justId,this.lastActiveTm=new Date().getTime())};addTabByNodeName=e=>{const t=this.service.getTabNodeInfoByNodeName(this.layout,e.nodeName,[]);t!=null&&(this.service.hasWinId(this.layout,e.justId)?this.layout=this.service.activeWinId(this.layout,e.justId):this.layout=this.service.addTabWin(this.layout,t.branch,e.justId,-1),this.lastActiveId=e.justId,this.lastActiveTm=new Date().getTime())};queryWinIdsByViewId=e=>this.service.queryWinIdsByViewId(this.layout??null,e,[]);cloneTab=e=>{const t=this.service.getBranchByWinId(this.layout,e.justId);if(t==null)return;const r=this.service.getNodeAtBranch(this.layout,t);let o=0;r?.type==="stack"&&r.active!=null&&(o=$e.indexOf(r.tabs,e.justId)+1),this.layout=this.service.addTabWin(this.layout,t,e.cloneJustId,o),this.lastActiveId=e.cloneJustId,this.lastActiveTm=new Date().getTime()};removeWin=e=>{this.layout=this.service.removeEmpty(this.service.removeWinId(this.layout,e.justId))};removeAllTabs=e=>{this.layout=this.service.removeEmpty(this.service.removeAllTabs(this.layout,e.branch))};activeWin=e=>{this.layout=this.service.activeWinId(this.layout,e.justId),this.lastActiveId=e.justId,this.lastActiveTm=new Date().getTime()};activePrevWin=()=>{const e=this.lastActiveId;if(e==null)return;const t=this.service.getNodeByWinId(this.layout,e);if(t?.type!=="stack"||t.tabs.length===0)return;const o=($e.indexOf(t.tabs,e)-1+t.tabs.length)%t.tabs.length,s=t.tabs[o];this.activeWin({justId:s})};activeNextWin=()=>{const e=this.lastActiveId;if(e==null)return;const t=this.service.getNodeByWinId(this.layout,e);if(t?.type!=="stack"||t.tabs.length===0)return;const o=($e.indexOf(t.tabs,e)+1)%t.tabs.length,s=t.tabs[o];this.activeWin({justId:s})};updateResize=e=>{this.layout=this.service.updateSplitSize(this.layout,e.branch,e.size)};moveWin=e=>{e.pos==="stack"?this.layout=this.service.removeEmpty(this.service.moveWinIdToStack(this.layout,e)):this.layout=this.service.removeEmpty(this.service.moveWinIdToSplit(this.layout,e)),this.lastActiveId=e.justId,this.lastActiveTm=new Date().getTime()};toggleSideMenu=()=>{if(this.layout===null||this.layout.type!=="split-pixels")return;const e=this.layout.size<=0?this.layout.primaryDefaultSize:0;this.updateResize({branch:[],size:e})};toggleWin=({nodeName:e})=>{const t=this.layout,r=this.service.getNodeInfoByNodeName(t,e,[]);if(r==null||r.node.type!=="split-pixels")return;const o=r.node.primaryHide!==!0,s=!o||r.node.size<10?r.node.primaryDefaultSize:0,c=this.service.buildSpecFromUpdateSpec(r.branch,{$merge:{size:s,primaryHide:o}}),f=this.service.updateNode(t,c);f!=null&&this.setLayout(f)};showWin=({nodeName:e,show:t})=>{const r=this.layout,o=this.service.getNodeInfoByNodeName(r,e,[]);if(o!=null&&o.node.type==="split-pixels"&&t===(o.node.size===0)){const s=t?o.node.primaryDefaultSize:0,c=this.service.buildSpecFromUpdateSpec(o.branch,{$merge:{size:s}}),f=this.service.updateNode(r,c);if(f==null)return;this.setLayout(f)}};getSizeByNodeName=({nodeName:e})=>{const t=this.layout,r=this.service.getNodeInfoByNodeName(t,e,[]);if(r!=null)return r.node.type==="split-pixels"||r.node.type==="split-percentage"?r.node.size:null};getBranchByJustId=({justId:e})=>{const t=this.layout;return this.service.getBranchByWinId(t,e)};isPrimaryHide=({nodeName:e})=>{const t=this.layout,r=this.service.getNodeInfoByNodeName(t,e,[]);if(r!=null)return r.node.type==="split-pixels"?r.node.primaryHide:null};openWin=({justId:e})=>{this.service.hasWinId(this.layout??null,e)?this.activeWin({justId:e}):this.addTab({justId:e})};openWinByNodeName=({justId:e,nodeName:t})=>{this.service.hasWinId(this.layout??null,e)?this.activeWin({justId:e}):this.addTabByNodeName({justId:e,nodeName:t})};getWinIds=({viewId:e})=>this.service.queryWinIdsByViewId(this.layout??null,e,[]);getDupWinIds=({justId:e})=>this.service.queryDupWinIdsByWinId(this.layout??null,e,[]);getWinIdsByBranch=({branch:e})=>this.service.queryWinIdsByStack(this.layout??null,e);getNodeAtBranch=({branch:e})=>this.service.getNodeAtBranch(this.layout??null,e);openWinMenu=({justId:e,nodeName:t})=>{const r=e.viewId,o=this.getWinIds({viewId:r});if(o.length===0)console.log("openWinMenu1",o,e),this.openWinByNodeName({justId:e,nodeName:t});else{const s=o.toSorted((c,f)=>(c.dupId??"")<=(f.dupId??"")?-1:1).at(-1);s&&(console.log("openWinMenu2",o,s),this.openWinByNodeName({justId:s,nodeName:t}))}};fullScreenWin=async(e,t,r=!1)=>{t?this.setLayout(null):(this.setFullScreenLayoutByBranch(e),this.setFullScreenHideTitle(r))}},Fe.JustLayoutStore=vS([gd(),gS(0,h_(ii.JustLayoutService))],Fe.JustLayoutStore);const fp=new H_(({bind:n})=>{n(ii.JustLayoutService).to(Fe.JustLayoutService).inSingletonScope(),n(ii.JustLayoutStore).to(Fe.JustLayoutStore).inTransientScope(),n(ii.JustLayoutFactory).toFactory(e=>t=>{if(!Bo.has(t)){const r=Xa.get(ii.JustLayoutStore);Bo.set(t,r)}return Bo.get(t)})}),Xa=new r0,mS=[fp];Xa.load(...mS);const Bo=new Map;window.storeCache=Bo,window.toJS=qw;const nr=n=>{const[e]=R.useState(()=>Xa.get(ii.JustLayoutFactory)(n));return e},lp=R.createContext({dragDropManager:void 0});function Sn(n){return"Minified Redux error #"+n+"; visit https://redux.js.org/Errors?code="+n+" for the full message or use the non-minified dev environment for full errors. "}var dp=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),hp=function(){return Math.random().toString(36).substring(7).split("").join(".")},pp={INIT:"@@redux/INIT"+hp(),REPLACE:"@@redux/REPLACE"+hp()};function bS(n){if(typeof n!="object"||n===null)return!1;for(var e=n;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(n)===e}function yS(n){if(n===void 0)return"undefined";if(n===null)return"null";var e=typeof n;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(n))return"array";if(SS(n))return"date";if(wS(n))return"error";var t=_S(n);switch(t){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return t}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function _S(n){return typeof n.constructor=="function"?n.constructor.name:null}function wS(n){return n instanceof Error||typeof n.message=="string"&&n.constructor&&typeof n.constructor.stackTraceLimit=="number"}function SS(n){return n instanceof Date?!0:typeof n.toDateString=="function"&&typeof n.getDate=="function"&&typeof n.setDate=="function"}function Fi(n){var e=typeof n;return process.env.NODE_ENV!=="production"&&(e=yS(n)),e}function vp(n,e,t){var r;if(typeof e=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Sn(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof t>"u"&&(t=e,e=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Sn(1):"Expected the enhancer to be a function. Instead, received: '"+Fi(t)+"'");return t(vp)(n,e)}if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Sn(2):"Expected the root reducer to be a function. Instead, received: '"+Fi(n)+"'");var o=n,s=e,c=[],f=c,d=!1;function p(){f===c&&(f=c.slice())}function v(){if(d)throw new Error(process.env.NODE_ENV==="production"?Sn(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function b(S){if(typeof S!="function")throw new Error(process.env.NODE_ENV==="production"?Sn(4):"Expected the listener to be a function. Instead, received: '"+Fi(S)+"'");if(d)throw new Error(process.env.NODE_ENV==="production"?Sn(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var A=!0;return p(),f.push(S),function(){if(A){if(d)throw new Error(process.env.NODE_ENV==="production"?Sn(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");A=!1,p();var k=f.indexOf(S);f.splice(k,1),c=null}}}function w(S){if(!bS(S))throw new Error(process.env.NODE_ENV==="production"?Sn(7):"Actions must be plain objects. Instead, the actual type was: '"+Fi(S)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof S.type>"u")throw new Error(process.env.NODE_ENV==="production"?Sn(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(d)throw new Error(process.env.NODE_ENV==="production"?Sn(9):"Reducers may not dispatch actions.");try{d=!0,s=o(s,S)}finally{d=!1}for(var A=c=f,x=0;x<A.length;x++){var k=A[x];k()}return S}function y(S){if(typeof S!="function")throw new Error(process.env.NODE_ENV==="production"?Sn(10):"Expected the nextReducer to be a function. Instead, received: '"+Fi(S));o=S,w({type:pp.REPLACE})}function O(){var S,A=b;return S={subscribe:function(k){if(typeof k!="object"||k===null)throw new Error(process.env.NODE_ENV==="production"?Sn(11):"Expected the observer to be an object. Instead, received: '"+Fi(k)+"'");function G(){k.next&&k.next(v())}G();var oe=A(G);return{unsubscribe:oe}}},S[dp]=function(){return this},S}return w({type:pp.INIT}),r={dispatch:w,subscribe:b,getState:v,replaceReducer:y},r[dp]=O,r}function Ae(n,e,...t){if(OS()&&e===void 0)throw new Error("invariant requires an error message argument");if(!n){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;r=new Error(e.replace(/%s/g,function(){return t[o++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function OS(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function ES(n,e,t){return e.split(".").reduce((r,o)=>r&&r[o]?r[o]:t||null,n)}function IS(n,e){return n.filter(t=>t!==e)}function gp(n){return typeof n=="object"}function AS(n,e){const t=new Map,r=s=>{t.set(s,t.has(s)?t.get(s)+1:1)};n.forEach(r),e.forEach(r);const o=[];return t.forEach((s,c)=>{s===1&&o.push(c)}),o}function TS(n,e){return n.filter(t=>e.indexOf(t)>-1)}const uc="dnd-core/INIT_COORDS",Za="dnd-core/BEGIN_DRAG",cc="dnd-core/PUBLISH_DRAG_SOURCE",Qa="dnd-core/HOVER",es="dnd-core/DROP",ts="dnd-core/END_DRAG";function mp(n,e){return{type:uc,payload:{sourceClientOffset:e||null,clientOffset:n||null}}}const xS={type:uc,payload:{clientOffset:null,sourceClientOffset:null}};function NS(n){return function(t=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:s,getSourceClientOffset:c}=r,f=n.getMonitor(),d=n.getRegistry();n.dispatch(mp(s)),DS(t,f,d);const p=MS(t,f);if(p==null){n.dispatch(xS);return}let v=null;if(s){if(!c)throw new Error("getSourceClientOffset must be defined");CS(c),v=c(p)}n.dispatch(mp(s,v));const w=d.getSource(p).beginDrag(f,p);if(w==null)return;PS(w),d.pinSource(p);const y=d.getSourceType(p);return{type:Za,payload:{itemType:y,item:w,sourceId:p,clientOffset:s||null,sourceClientOffset:v||null,isSourcePublic:!!o}}}}function DS(n,e,t){Ae(!e.isDragging(),"Cannot call beginDrag while dragging."),n.forEach(function(r){Ae(t.getSource(r),"Expected sourceIds to be registered.")})}function CS(n){Ae(typeof n=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function PS(n){Ae(gp(n),"Item must be an object.")}function MS(n,e){let t=null;for(let r=n.length-1;r>=0;r--)if(e.canDragSource(n[r])){t=n[r];break}return t}function RS(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function LS(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){RS(n,o,t[o])})}return n}function kS(n){return function(t={}){const r=n.getMonitor(),o=n.getRegistry();BS(r),$S(r).forEach((c,f)=>{const d=jS(c,f,o,r),p={type:es,payload:{dropResult:LS({},t,d)}};n.dispatch(p)})}}function BS(n){Ae(n.isDragging(),"Cannot call drop while not dragging."),Ae(!n.didDrop(),"Cannot call drop twice during one drag operation.")}function jS(n,e,t,r){const o=t.getTarget(n);let s=o?o.drop(r,n):void 0;return FS(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function FS(n){Ae(typeof n>"u"||gp(n),"Drop result must either be an object or undefined.")}function $S(n){const e=n.getTargetIds().filter(n.canDropOnTarget,n);return e.reverse(),e}function VS(n){return function(){const t=n.getMonitor(),r=n.getRegistry();WS(t);const o=t.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(t,o),r.unpinSource()),{type:ts}}}function WS(n){Ae(n.isDragging(),"Cannot call endDrag while not dragging.")}function fc(n,e){return e===null?n===null:Array.isArray(n)?n.some(t=>t===e):n===e}function US(n){return function(t,{clientOffset:r}={}){zS(t);const o=t.slice(0),s=n.getMonitor(),c=n.getRegistry(),f=s.getItemType();return qS(o,c,f),HS(o,s,c),GS(o,s,c),{type:Qa,payload:{targetIds:o,clientOffset:r||null}}}}function zS(n){Ae(Array.isArray(n),"Expected targetIds to be an array.")}function HS(n,e,t){Ae(e.isDragging(),"Cannot call hover while not dragging."),Ae(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<n.length;r++){const o=n[r];Ae(n.lastIndexOf(o)===r,"Expected targetIds to be unique in the passed array.");const s=t.getTarget(o);Ae(s,"Expected targetIds to be registered.")}}function qS(n,e,t){for(let r=n.length-1;r>=0;r--){const o=n[r],s=e.getTargetType(o);fc(s,t)||n.splice(r,1)}}function GS(n,e,t){n.forEach(function(r){t.getTarget(r).hover(e,r)})}function YS(n){return function(){if(n.getMonitor().isDragging())return{type:cc}}}function JS(n){return{beginDrag:NS(n),publishDragSource:YS(n),hover:US(n),drop:kS(n),endDrag:VS(n)}}class KS{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;function r(s){return(...c)=>{const f=s.apply(e,c);typeof f<"u"&&t(f)}}const o=JS(this);return Object.keys(o).reduce((s,c)=>{const f=o[c];return s[c]=r(f),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function XS(n,e){return{x:n.x+e.x,y:n.y+e.y}}function bp(n,e){return{x:n.x-e.x,y:n.y-e.y}}function ZS(n){const{clientOffset:e,initialClientOffset:t,initialSourceClientOffset:r}=n;return!e||!t||!r?null:bp(XS(e,r),t)}function QS(n){const{clientOffset:e,initialClientOffset:t}=n;return!e||!t?null:bp(e,t)}const jo=[],lc=[];jo.__IS_NONE__=!0,lc.__IS_ALL__=!0;function eO(n,e){return n===jo?!1:n===lc||typeof e>"u"?!0:TS(e,n).length>0}class tO{subscribeToStateChange(e,t={}){const{handlerIds:r}=t;Ae(typeof e=="function","listener must be a function."),Ae(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const s=()=>{const c=this.store.getState(),f=c.stateId;try{f===o||f===o+1&&!eO(c.dirtyHandlerIds,r)||e()}finally{o=f}};return this.store.subscribe(s)}subscribeToOffsetChange(e){Ae(typeof e=="function","listener must be a function.");let t=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==t&&(t=o,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Ae(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(Ae(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();return fc(r,o)&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(Ae(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),o=this.getItemType();return r!==o?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:r}=t;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),s=this.getItemType();if(s&&!fc(o,s))return!1;const c=this.getTargetIds();if(!c.length)return!1;const f=c.indexOf(e);return r?f===c.length-1:f>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return ZS(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return QS(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const yp=typeof global<"u"?global:self,_p=yp.MutationObserver||yp.WebKitMutationObserver;function wp(n){return function(){const t=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(t),clearInterval(r),n()}}}function nO(n){let e=1;const t=new _p(n),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const rO=typeof _p=="function"?nO:wp;class iO{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let r=0,o=e.length-this.index;r<o;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=rO(this.flush),this.requestErrorThrow=wp(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class oO{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}class aO{create(e){const t=this.freeTasks,r=t.length?t.pop():new oO(this.onError,o=>t[t.length]=o);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Sp=new iO,sO=new aO(Sp.registerPendingError);function uO(n){Sp.enqueueTask(sO.create(n))}const dc="dnd-core/ADD_SOURCE",hc="dnd-core/ADD_TARGET",pc="dnd-core/REMOVE_SOURCE",ns="dnd-core/REMOVE_TARGET";function cO(n){return{type:dc,payload:{sourceId:n}}}function fO(n){return{type:hc,payload:{targetId:n}}}function lO(n){return{type:pc,payload:{sourceId:n}}}function dO(n){return{type:ns,payload:{targetId:n}}}function hO(n){Ae(typeof n.canDrag=="function","Expected canDrag to be a function."),Ae(typeof n.beginDrag=="function","Expected beginDrag to be a function."),Ae(typeof n.endDrag=="function","Expected endDrag to be a function.")}function pO(n){Ae(typeof n.canDrop=="function","Expected canDrop to be a function."),Ae(typeof n.hover=="function","Expected hover to be a function."),Ae(typeof n.drop=="function","Expected beginDrag to be a function.")}function vc(n,e){if(e&&Array.isArray(n)){n.forEach(t=>vc(t,!1));return}Ae(typeof n=="string"||typeof n=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var On;(function(n){n.SOURCE="SOURCE",n.TARGET="TARGET"})(On||(On={}));let vO=0;function gO(){return vO++}function mO(n){const e=gO().toString();switch(n){case On.SOURCE:return`S${e}`;case On.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${n}`)}}function Op(n){switch(n[0]){case"S":return On.SOURCE;case"T":return On.TARGET;default:throw new Error(`Cannot parse handler ID: ${n}`)}}function Ep(n,e){const t=n.entries();let r=!1;do{const{done:o,value:[,s]}=t.next();if(s===e)return!0;r=!!o}while(!r);return!1}class bO{addSource(e,t){vc(e),hO(t);const r=this.addHandler(On.SOURCE,e,t);return this.store.dispatch(cO(r)),r}addTarget(e,t){vc(e,!0),pO(t);const r=this.addHandler(On.TARGET,e,t);return this.store.dispatch(fO(r)),r}containsHandler(e){return Ep(this.dragSources,e)||Ep(this.dropTargets,e)}getSource(e,t=!1){return Ae(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Ae(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Ae(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Ae(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Op(e)===On.SOURCE}isTargetId(e){return Op(e)===On.TARGET}removeSource(e){Ae(this.getSource(e),"Expected an existing source."),this.store.dispatch(lO(e)),uO(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){Ae(this.getTarget(e),"Expected an existing target."),this.store.dispatch(dO(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Ae(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Ae(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){const o=mO(e);return this.types.set(o,t),e===On.SOURCE?this.dragSources.set(o,r):e===On.TARGET&&this.dropTargets.set(o,r),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const yO=(n,e)=>n===e;function _O(n,e){return!n&&!e?!0:!n||!e?!1:n.x===e.x&&n.y===e.y}function wO(n,e,t=yO){if(n.length!==e.length)return!1;for(let r=0;r<n.length;++r)if(!t(n[r],e[r]))return!1;return!0}function SO(n=jo,e){switch(e.type){case Qa:break;case dc:case hc:case ns:case pc:return jo;case Za:case cc:case ts:case es:default:return lc}const{targetIds:t=[],prevTargetIds:r=[]}=e.payload,o=AS(t,r);if(!(o.length>0||!wO(t,r)))return jo;const c=r[r.length-1],f=t[t.length-1];return c!==f&&(c&&o.push(c),f&&o.push(f)),o}function OO(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function EO(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){OO(n,o,t[o])})}return n}const Ip={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function IO(n=Ip,e){const{payload:t}=e;switch(e.type){case uc:case Za:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case Qa:return _O(n.clientOffset,t.clientOffset)?n:EO({},n,{clientOffset:t.clientOffset});case ts:case es:return Ip;default:return n}}function AO(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function $i(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){AO(n,o,t[o])})}return n}const TO={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function xO(n=TO,e){const{payload:t}=e;switch(e.type){case Za:return $i({},n,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case cc:return $i({},n,{isSourcePublic:!0});case Qa:return $i({},n,{targetIds:t.targetIds});case ns:return n.targetIds.indexOf(t.targetId)===-1?n:$i({},n,{targetIds:IS(n.targetIds,t.targetId)});case es:return $i({},n,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case ts:return $i({},n,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return n}}function NO(n=0,e){switch(e.type){case dc:case hc:return n+1;case pc:case ns:return n-1;default:return n}}function DO(n=0){return n+1}function CO(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function PO(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){CO(n,o,t[o])})}return n}function MO(n={},e){return{dirtyHandlerIds:SO(n.dirtyHandlerIds,{type:e.type,payload:PO({},e.payload,{prevTargetIds:ES(n,"dragOperation.targetIds",[])})}),dragOffset:IO(n.dragOffset,e),refCount:NO(n.refCount,e),dragOperation:xO(n.dragOperation,e),stateId:DO(n.stateId)}}function RO(n,e=void 0,t={},r=!1){const o=LO(r),s=new tO(o,new bO(o)),c=new KS(o,s),f=n(c,e,t);return c.receiveBackend(f),c}function LO(n){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return vp(MO,n&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function kO(n,e){if(n==null)return{};var t=BO(n,e),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)r=s[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function BO(n,e){if(n==null)return{};var t={},r=Object.keys(n),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(t[o]=n[o]);return t}let Ap=0;const rs=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var jO=R.memo(function(e){var{children:t}=e,r=kO(e,["children"]);const[o,s]=FO(r);return R.useEffect(()=>{if(s){const c=Tp();return++Ap,()=>{--Ap===0&&(c[rs]=null)}}},[]),Q.jsx(lp.Provider,{value:o,children:t})});function FO(n){if("manager"in n)return[{dragDropManager:n.manager},!1];const e=$O(n.backend,n.context,n.options,n.debugMode),t=!n.context;return[e,t]}function $O(n,e=Tp(),t,r){const o=e;return o[rs]||(o[rs]={dragDropManager:RO(n,e,t,r)}),o[rs]}function Tp(){return typeof global<"u"?global:window}var gc,xp;function VO(){return xp||(xp=1,gc=function n(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,o,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!n(e[o],t[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=r;o--!==0;){var c=s[o];if(!n(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}),gc}var WO=VO();const UO=po(WO),pi=typeof window<"u"?R.useLayoutEffect:R.useEffect;function zO(n,e,t){const[r,o]=R.useState(()=>e(n)),s=R.useCallback(()=>{const c=e(n);UO(r,c)||(o(c),t&&t())},[r,n,t]);return pi(s),[r,s]}function HO(n,e,t){const[r,o]=zO(n,e,t);return pi(function(){const c=n.getHandlerId();if(c!=null)return n.subscribeToStateChange(o,{handlerIds:[c]})},[n,o]),r}function Np(n,e,t){return HO(e,n||(()=>({})),()=>t.reconnect())}function Dp(n,e){const t=[...e||[]];return e==null&&typeof n!="function"&&t.push(n),R.useMemo(()=>typeof n=="function"?n():n,t)}function qO(n){return R.useMemo(()=>n.hooks.dragSource(),[n])}function GO(n){return R.useMemo(()=>n.hooks.dragPreview(),[n])}let mc=!1,bc=!1;class YO{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Ae(!mc,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return mc=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{mc=!1}}isDragging(){if(!this.sourceId)return!1;Ae(!bc,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return bc=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{bc=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let yc=!1;class JO{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;Ae(!yc,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return yc=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{yc=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function KO(n,e,t){const r=t.getRegistry(),o=r.addTarget(n,e);return[o,()=>r.removeTarget(o)]}function XO(n,e,t){const r=t.getRegistry(),o=r.addSource(n,e);return[o,()=>r.removeSource(o)]}function _c(n,e,t,r){let o;if(o!==void 0)return!!o;if(n===e)return!0;if(typeof n!="object"||!n||typeof e!="object"||!e)return!1;const s=Object.keys(n),c=Object.keys(e);if(s.length!==c.length)return!1;const f=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d<s.length;d++){const p=s[d];if(!f(p))return!1;const v=n[p],b=e[p];if(o=void 0,o===!1||o===void 0&&v!==b)return!1}return!0}function wc(n){return n!==null&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function ZO(n){if(typeof n.type=="string")return;const e=n.type.displayName||n.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function QO(n){return(e=null,t=null)=>{if(!R.isValidElement(e)){const s=e;return n(s,t),s}const r=e;return ZO(r),eE(r,t?s=>n(s,t):n)}}function Cp(n){const e={};return Object.keys(n).forEach(t=>{const r=n[t];if(t.endsWith("Ref"))e[t]=n[t];else{const o=QO(r);e[t]=()=>o}}),e}function Pp(n,e){typeof n=="function"?n(e):n.current=e}function eE(n,e){const t=n.ref;return Ae(typeof t!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),t?R.cloneElement(n,{ref:r=>{Pp(t,r),Pp(e,r)}}):R.cloneElement(n,{ref:e})}class tE{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!_c(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!_c(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Cp({dragSource:(t,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,wc(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,wc(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class nE{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!_c(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Cp({dropTarget:(t,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,wc(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Vi(){const{dragDropManager:n}=R.useContext(lp);return Ae(n!=null,"Expected drag drop context"),n}function rE(n,e){const t=Vi(),r=R.useMemo(()=>new tE(t.getBackend()),[t]);return pi(()=>(r.dragSourceOptions=n||null,r.reconnect(),()=>r.disconnectDragSource()),[r,n]),pi(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function iE(){const n=Vi();return R.useMemo(()=>new YO(n),[n])}class oE{beginDrag(){const e=this.spec,t=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(t):r={},r??null}canDrag(){const e=this.spec,t=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(t):!0}isDragging(e,t){const r=this.spec,o=this.monitor,{isDragging:s}=r;return s?s(o):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,r=this.connector,{end:o}=e;o&&o(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}}function aE(n,e,t){const r=R.useMemo(()=>new oE(n,e,t),[e,t]);return R.useEffect(()=>{r.spec=n},[n]),r}function sE(n){return R.useMemo(()=>{const e=n.type;return Ae(e!=null,"spec.type must be defined"),e},[n])}function uE(n,e,t){const r=Vi(),o=aE(n,e,t),s=sE(n);pi(function(){if(s!=null){const[f,d]=XO(s,o,r);return e.receiveHandlerId(f),t.receiveHandlerId(f),d}},[r,e,t,o,s])}function cE(n,e){const t=Dp(n,e);Ae(!t.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=iE(),o=rE(t.options,t.previewOptions);return uE(t,r,o),[Np(t.collect,r,o),qO(o),GO(o)]}function fE(n){return R.useMemo(()=>n.hooks.dropTarget(),[n])}function lE(n){const e=Vi(),t=R.useMemo(()=>new nE(e.getBackend()),[e]);return pi(()=>(t.dropTargetOptions=n||null,t.reconnect(),()=>t.disconnectDropTarget()),[n]),t}function dE(){const n=Vi();return R.useMemo(()=>new JO(n),[n])}function hE(n){const{accept:e}=n;return R.useMemo(()=>(Ae(n.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class pE{canDrop(){const e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function vE(n,e){const t=R.useMemo(()=>new pE(n,e),[e]);return R.useEffect(()=>{t.spec=n},[n]),t}function gE(n,e,t){const r=Vi(),o=vE(n,e),s=hE(n);pi(function(){const[f,d]=KO(s,o,r);return e.receiveHandlerId(f),t.receiveHandlerId(f),d},[r,e,o,t,s.map(c=>c.toString()).join("|")])}function Sc(n,e){const t=Dp(n,e),r=dE(),o=lE(t.options);return gE(t,r,o),[Np(t.collect,r,o),fE(o)]}var Oc={exports:{}};var Mp;function mE(){return Mp||(Mp=1,(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",c=0;c<arguments.length;c++){var f=arguments[c];f&&(s=o(s,r(f)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var c="";for(var f in s)e.call(s,f)&&s[f]&&(c=o(c,f));return c}function o(s,c){return c?s?s+" "+c:s+c:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()})(Oc)),Oc.exports}var bE=mE();const Un=po(bE),Rp=n=>!!n&&n[0]==="o",Lp=ho.unstable_batchedUpdates,Fo=(n,e)=>n===!0||!!(n&&n[e]),En=(n,e)=>typeof n=="function"?n(e):n,yE="_szhsinMenu",_E=n=>n[yE],is=(n,e)=>(e&&Object.keys(e).forEach(t=>{const r=n[t],o=e[t];typeof o=="function"&&r?n[t]=(...s)=>{o(...s),r(...s)}:n[t]=o}),n),wE=n=>{if(typeof n!="string")return{top:0,right:0,bottom:0,left:0};const e=n.trim().split(/\s+/,4).map(parseFloat),t=isNaN(e[0])?0:e[0],r=isNaN(e[1])?t:e[1];return{top:t,right:r,bottom:isNaN(e[2])?t:e[2],left:isNaN(e[3])?r:e[3]}},Ec=n=>{for(;n;){if(n=n.parentNode,!n||n===document.body||!n.parentNode)return;const{overflow:e,overflowX:t,overflowY:r}=getComputedStyle(n);if(/auto|scroll|overlay|hidden/.test(e+r+t))return n}};function kp(n,e){return{"aria-disabled":n||void 0,tabIndex:e?0:-1}}function Bp(n,e){for(let t=0;t<n.length;t++)if(n[t]===e)return t;return-1}const os=({block:n,element:e,modifiers:t,className:r})=>R.useMemo(()=>{const o=e?`${n}__${e}`:n;let s=o;t&&Object.keys(t).forEach(f=>{const d=t[f];d&&(s+=` ${o}--${d===!0?f:`${f}-${d}`}`)});let c=typeof r=="function"?r(t):r;return typeof c=="string"&&(c=c.trim(),c&&(s+=` ${c}`)),s},[n,e,t,r]),SE="szh-menu-container",as="szh-menu",OE="arrow",EE="item",jp=R.createContext(),Fp=R.createContext({}),$p=R.createContext({}),Vp=R.createContext({}),IE=R.createContext({}),Ic=R.createContext({}),zn=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),mt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),$o=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Vo=Object.freeze({FIRST:"first",LAST:"last"}),AE=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Wp="absolute",TE="none",xE="menuitem",Ac={preventScroll:!0},NE=({className:n,containerRef:e,containerProps:t,children:r,isOpen:o,theming:s,transition:c,onClose:f})=>{const d=Fo(c,"item"),p=({key:b})=>{b===zn.ESC&&En(f,{key:b,reason:$o.CANCEL})},v=b=>{o&&!b.currentTarget.contains(b.relatedTarget)&&En(f,{reason:$o.BLUR})};return Q.jsx("div",{...is({onKeyDown:p,onBlur:v},t),className:os({block:SE,modifiers:R.useMemo(()=>({theme:s,itemTransition:d}),[s,d]),className:n}),style:{position:"absolute",...t?.style},ref:e,children:r})},DE=()=>{let n,e=0;return{toggle:t=>{t?e++:e--,e=Math.max(e,0)},on:(t,r,o)=>{e?n||(n=setTimeout(()=>{n=0,r()},t)):o?.()},off:()=>{n&&(clearTimeout(n),n=0)}}},CE=n=>{const[e,t]=R.useState(),o=R.useRef({items:[],hoverIndex:-1,sorted:!1}).current,s=R.useCallback((f,d)=>{const{items:p}=o;if(!f)o.items=[];else if(d)p.push(f);else{const v=p.indexOf(f);v>-1&&(p.splice(v,1),f.contains(document.activeElement)&&(n.current.focus(Ac),t()))}o.hoverIndex=-1,o.sorted=!1},[o,n]),c=R.useCallback((f,d,p)=>{const{items:v,hoverIndex:b}=o,w=()=>{if(o.sorted)return;const S=n.current.querySelectorAll(".szh-menu__item");v.sort((A,x)=>Bp(S,A)-Bp(S,x)),o.sorted=!0};let y=-1,O;switch(f){case mt.RESET:break;case mt.SET:O=d;break;case mt.UNSET:O=S=>S===d?void 0:S;break;case mt.FIRST:w(),y=0,O=v[y];break;case mt.LAST:w(),y=v.length-1,O=v[y];break;case mt.SET_INDEX:w(),y=p,O=v[y];break;case mt.INCREASE:w(),y=b,y<0&&(y=v.indexOf(d)),y++,y>=v.length&&(y=0),O=v[y];break;case mt.DECREASE:w(),y=b,y<0&&(y=v.indexOf(d)),y--,y<0&&(y=v.length-1),O=v[y];break;default:if(process.env.NODE_ENV!=="production")throw new Error(`[React-Menu] Unknown hover action type: ${f}`)}O||(y=-1),t(O),o.hoverIndex=y},[n,o]);return{hoverItem:e,dispatch:c,updateItems:s}},Up=(n,e)=>Math.round(n)===e?n:e,PE=n=>{const e=n.getBoundingClientRect();return e.width=Up(e.width,n.offsetWidth),e.height=Up(e.height,n.offsetHeight),e},ME=(n,e,t,r)=>{const o=PE(e),s=n.getBoundingClientRect(),c=t===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:t.getBoundingClientRect(),f=wE(r),d=O=>O+s.left-c.left-f.left,p=O=>O+s.left+o.width-c.right+f.right,v=O=>O+s.top-c.top-f.top,b=O=>O+s.top+o.height-c.bottom+f.bottom;return{menuRect:o,containerRect:s,getLeftOverflow:d,getRightOverflow:p,getTopOverflow:v,getBottomOverflow:b,confineHorizontally:O=>{let S=d(O);if(S<0)O-=S;else{const A=p(O);A>0&&(O-=A,S=d(O),S<0&&(O-=S))}return O},confineVertically:O=>{let S=v(O);if(S<0)O-=S;else{const A=b(O);A>0&&(O-=A,S=v(O),S<0&&(O-=S))}return O}}},RE=({arrowRef:n,menuY:e,anchorRect:t,containerRect:r,menuRect:o})=>{let s=t.top-r.top-e+t.height/2;const c=n.current.offsetHeight*1.25;return s=Math.max(c,s),s=Math.min(s,o.height-c),s},LE=({anchorRect:n,containerRect:e,menuRect:t,placeLeftorRightY:r,placeLeftX:o,placeRightX:s,getLeftOverflow:c,getRightOverflow:f,confineHorizontally:d,confineVertically:p,arrowRef:v,arrow:b,direction:w,position:y})=>{let O=w,S=r;y!=="initial"&&(S=p(S),y==="anchor"&&(S=Math.min(S,n.bottom-e.top),S=Math.max(S,n.top-e.top-t.height)));let A,x,k;return O==="left"?(A=o,y!=="initial"&&(x=c(A),x<0&&(k=f(s),(k<=0||-x>k)&&(A=s,O="right")))):(A=s,y!=="initial"&&(k=f(A),k>0&&(x=c(o),(x>=0||-x<k)&&(A=o,O="left")))),y==="auto"&&(A=d(A)),{arrowY:b?RE({menuY:S,arrowRef:v,anchorRect:n,containerRect:e,menuRect:t}):void 0,x:A,y:S,computedDirection:O}},kE=({arrowRef:n,menuX:e,anchorRect:t,containerRect:r,menuRect:o})=>{let s=t.left-r.left-e+t.width/2;const c=n.current.offsetWidth*1.25;return s=Math.max(c,s),s=Math.min(s,o.width-c),s},BE=({anchorRect:n,containerRect:e,menuRect:t,placeToporBottomX:r,placeTopY:o,placeBottomY:s,getTopOverflow:c,getBottomOverflow:f,confineHorizontally:d,confineVertically:p,arrowRef:v,arrow:b,direction:w,position:y})=>{let O=w==="top"?"top":"bottom",S=r;y!=="initial"&&(S=d(S),y==="anchor"&&(S=Math.min(S,n.right-e.left),S=Math.max(S,n.left-e.left-t.width)));let A,x,k;return O==="top"?(A=o,y!=="initial"&&(x=c(A),x<0&&(k=f(s),(k<=0||-x>k)&&(A=s,O="bottom")))):(A=s,y!=="initial"&&(k=f(A),k>0&&(x=c(o),(x>=0||-x<k)&&(A=o,O="top")))),y==="auto"&&(A=p(A)),{arrowX:b?kE({menuX:S,arrowRef:v,anchorRect:n,containerRect:e,menuRect:t}):void 0,x:S,y:A,computedDirection:O}},jE=({arrow:n,align:e,direction:t,gap:r,shift:o,position:s,anchorRect:c,arrowRef:f,positionHelpers:d})=>{const{menuRect:p,containerRect:v}=d,b=t==="left"||t==="right";let w=b?r:o,y=b?o:r;if(n){const q=f.current;b?w+=q.offsetWidth:y+=q.offsetHeight}const O=c.left-v.left-p.width-w,S=c.right-v.left+w,A=c.top-v.top-p.height-y,x=c.bottom-v.top+y;let k,G;e==="end"?(k=c.right-v.left-p.width,G=c.bottom-v.top-p.height):e==="center"?(k=c.left-v.left-(p.width-c.width)/2,G=c.top-v.top-(p.height-c.height)/2):(k=c.left-v.left,G=c.top-v.top),k+=w,G+=y;const oe={...d,anchorRect:c,placeLeftX:O,placeRightX:S,placeLeftorRightY:G,placeTopY:A,placeBottomY:x,placeToporBottomX:k,arrowRef:f,arrow:n,direction:t,position:s};switch(t){case"left":case"right":return LE(oe);default:return BE(oe)}},ss=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?R.useLayoutEffect:R.useEffect;function zp(n,e){typeof n=="function"?n(e):n.current=e}const Tc=(n,e)=>R.useMemo(()=>n?e?t=>{zp(n,t),zp(e,t)}:n:e,[n,e]),Hp=-9999,FE=({ariaLabel:n,menuClassName:e,menuStyle:t,arrow:r,arrowProps:o={},anchorPoint:s,anchorRef:c,containerRef:f,containerProps:d,externalRef:p,parentScrollingRef:v,align:b="start",direction:w="bottom",position:y="auto",overflow:O="visible",setDownOverflow:S,repositionFlag:A,captureFocus:x=!0,state:k,endTransition:G,isDisabled:oe,menuItemFocus:q,gap:ye=0,shift:L=0,children:F,onClose:ae,focusProps:we,...ce})=>{const[Se,he]=R.useState({x:Hp,y:Hp}),[ct,ht]=R.useState({}),[ft,xt]=R.useState(),[ue,nn]=R.useState(w),[Pt]=R.useState(DE),[Le,wr]=R.useReducer(ne=>ne+1,1),{transition:pe,boundingBoxRef:Lt,boundingBoxPadding:rn,rootMenuRef:Ce,rootAnchorRef:ir,scrollNodesRef:$t,reposition:Vt,viewScroll:Sr,submenuCloseDelay:pt}=R.useContext(Ic),{submenuCtx:In,reposSubmenu:An=A}=R.useContext($p),Ke=R.useRef(),on=R.useRef(),Tn=R.useRef(!1),{hoverItem:at,dispatch:vt,updateItems:Gn}=CE(Ke),Qe=Rp(k),bt=Fo(pe,"open"),St=Fo(pe,"close"),P=$t.current,W=ne=>{switch(ne.key){case zn.HOME:vt(mt.FIRST);break;case zn.END:vt(mt.LAST);break;case zn.UP:vt(mt.DECREASE,at);break;case zn.DOWN:vt(mt.INCREASE,at);break;case zn.SPACE:ne.target&&ne.target.className.indexOf(as)!==-1&&ne.preventDefault();return;default:return}ne.preventDefault(),ne.stopPropagation()},U=()=>{k==="closing"&&xt(),En(G)},ee=ne=>{ne.stopPropagation(),Pt.on(pt,()=>{vt(mt.RESET),Ke.current.focus(Ac)})},le=ne=>{ne.target===ne.currentTarget&&Pt.off()},Be=R.useCallback(ne=>{const Y=Ke.current,K=f.current;if(!Y||!K)return;const te=c?c.current?.getBoundingClientRect():s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0,height:0}:null;if(!te){process.env.NODE_ENV!=="production"&&console.warn("[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open.");return}P.menu||(P.menu=(Lt?Lt.current:Ec(Ce.current))||window);const X=ME(K,Y,P.menu,rn);let{arrowX:Ee,arrowY:He,x:et,y:yt,computedDirection:Ji}=jE({arrow:r,align:b,direction:w,gap:ye,shift:L,position:y,anchorRect:te,arrowRef:on,positionHelpers:X});const{menuRect:Xo}=X,Ki=Xo.height;if(!ne&&O!=="visible"){const{getTopOverflow:Zo,getBottomOverflow:zf}=X;let Or,Qo;const ea=zf(yt);if(ea>0)Or=Ki-ea,Qo=ea;else{const Xi=Zo(yt);Xi<0&&(Or=Ki+Xi,Qo=0-Xi,Or>=0&&(yt-=Xi))}Or>=0&&xt({height:Or,overflowAmt:Qo})}r&&ht({x:Ee,y:He}),he({x:et,y:yt}),nn(Ji)},[r,b,rn,w,ye,L,y,O,s,c,f,Lt,Ce,P]);ss(()=>{Qe&&(Be(),Tn.current&&wr()),Tn.current=Qe},[Qe,Be,An]),ss(()=>{ft&&!S&&(Ke.current.scrollTop=0)},[ft,S]),ss(()=>Gn,[Gn]),R.useEffect(()=>{let{menu:ne}=P;if(!Qe||!ne)return;if(ne=ne.addEventListener?ne:window,!P.anchors){P.anchors=[];let X=Ec(ir&&ir.current);for(;X&&X!==ne;)P.anchors.push(X),X=Ec(X)}let Y=Sr;if(P.anchors.length&&Y==="initial"&&(Y="auto"),Y==="initial")return;const K=()=>{Y==="auto"?Lp(()=>Be(!0)):En(ae,{reason:$o.SCROLL})},te=P.anchors.concat(Sr!=="initial"?ne:[]);return te.forEach(X=>X.addEventListener("scroll",K)),()=>te.forEach(X=>X.removeEventListener("scroll",K))},[ir,P,Qe,ae,Sr,Be]);const nt=!!ft&&ft.overflowAmt>0;R.useEffect(()=>{if(nt||!Qe||!v)return;const ne=()=>Lp(Be),Y=v.current;return Y.addEventListener("scroll",ne),()=>Y.removeEventListener("scroll",ne)},[Qe,nt,v,Be]),R.useEffect(()=>{if(!Qe||typeof ResizeObserver!="function"||Vt==="initial")return;const ne=[],Y=new ResizeObserver(X=>X.forEach(({target:Ee})=>{ne.indexOf(Ee)<0?ne.push(Ee):ho.flushSync(()=>{Be(),wr()})})),K={box:"border-box"};Y.observe(Ke.current,K);const te=c?.current;return te&&Y.observe(te,K),()=>Y.disconnect()},[Qe,Vt,c,Be]),R.useEffect(()=>{if(!Qe){vt(mt.RESET),St||xt();return}const{position:ne,alwaysUpdate:Y}=q||{},K=()=>{ne===Vo.FIRST?vt(mt.FIRST):ne===Vo.LAST?vt(mt.LAST):ne>=-1&&vt(mt.SET_INDEX,void 0,ne)};if(Y)K();else if(x){const te=setTimeout(()=>{const X=Ke.current;X&&!X.contains(document.activeElement)&&(X.focus(Ac),K())},bt?170:100);return()=>clearTimeout(te)}},[Qe,bt,St,x,q,vt]);const Nt=R.useMemo(()=>({isParentOpen:Qe,submenuCtx:Pt,dispatch:vt,updateItems:Gn}),[Qe,Pt,vt,Gn]);let it,I;ft&&(S?I=ft.overflowAmt:it=ft.height);const N=R.useMemo(()=>({reposSubmenu:Le,submenuCtx:Pt,overflow:O,overflowAmt:I,parentMenuRef:Ke,parentDir:ue}),[Le,Pt,O,I,ue]),C=it>=0?{maxHeight:it,overflow:O}:void 0,j=R.useMemo(()=>({state:k,align:b,dir:ue}),[k,b,ue]),Z=R.useMemo(()=>({dir:ue}),[ue]),_e=os({block:as,element:OE,modifiers:Z,className:o.className}),Me=Q.jsxs("ul",{role:"menu","aria-label":n,...kp(oe),...is({onPointerEnter:In?.off,onPointerMove:ee,onPointerLeave:le,onKeyDown:W,onAnimationEnd:U},ce),ref:Tc(p,Ke),className:os({block:as,modifiers:j,className:e}),style:{...t,...C,margin:0,display:k==="closed"?"none":void 0,position:Wp,left:Se.x,top:Se.y},children:[r&&Q.jsx("li",{"aria-hidden":!0,...o,className:_e,style:{display:"block",position:Wp,left:ct.x,top:ct.y,...o.style},ref:on}),Q.jsx($p.Provider,{value:N,children:Q.jsx(Fp.Provider,{value:Nt,children:Q.jsx(jp.Provider,{value:at,children:En(F,j)})})})]});return d?Q.jsx(NE,{...d,isOpen:Qe,children:Me}):Me},qp=R.forwardRef(function({"aria-label":e,className:t,containerProps:r,initialMounted:o,unmountOnClose:s,transition:c,transitionTimeout:f,boundingBoxRef:d,boundingBoxPadding:p,reposition:v="auto",submenuOpenDelay:b=300,submenuCloseDelay:w=150,viewScroll:y="initial",portal:O,theming:S,onItemClick:A,...x},k){const G=R.useRef(null),oe=R.useRef({}),{anchorRef:q,state:ye,onClose:L}=x,F=R.useMemo(()=>({initialMounted:o,unmountOnClose:s,transition:c,transitionTimeout:f,boundingBoxRef:d,boundingBoxPadding:p,rootMenuRef:G,rootAnchorRef:q,scrollNodesRef:oe,reposition:v,viewScroll:y,submenuOpenDelay:b,submenuCloseDelay:w}),[o,s,c,f,q,d,p,v,y,b,w]),ae=R.useMemo(()=>({handleClick(ce,Se){ce.stopPropagation||En(A,ce);let he=ce.keepOpen;he===void 0&&(he=Se&&ce.key===zn.SPACE),he||En(L,{value:ce.value,key:ce.key,reason:$o.CLICK})},handleClose(ce){En(L,{key:ce,reason:$o.CLICK})}}),[A,L]);if(!ye)return null;const we=Q.jsx(Ic.Provider,{value:F,children:Q.jsx(Vp.Provider,{value:ae,children:Q.jsx(FE,{...x,ariaLabel:e||"Menu",externalRef:k,containerRef:G,containerProps:{className:t,containerRef:G,containerProps:r,theming:S,transition:c,onClose:L}})})});return O===!0&&typeof document<"u"?ho.createPortal(we,document.body):O?O.target?ho.createPortal(we,O.target):O.stablePosition?null:we:we}),xc=0,Nc=1,us=2,cs=3,fs=4,$E=5,Gp=6,VE=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Yp=n=>({_s:n,status:VE[n],isEnter:n<cs,isMounted:n!==Gp,isResolved:n===us||n>fs}),Dc=n=>n?Gp:$E,WE=(n,e)=>{switch(n){case Nc:case xc:return us;case fs:case cs:return Dc(e)}},UE=n=>typeof n=="object"?[n.enter,n.exit]:[n,n],Cc=setTimeout,zE=(n,e)=>Cc(()=>{isNaN(document.body.offsetTop)||n(e+1)},0),Jp=(n,e,t,r,o)=>{clearTimeout(r.current);const s=Yp(n);e(s),t.current=s,o&&o({current:s})},HE=({enter:n=!0,exit:e=!0,preEnter:t,preExit:r,timeout:o,initialEntered:s,mountOnEnter:c,unmountOnExit:f,onStateChange:d}={})=>{const[p,v]=R.useState(()=>Yp(s?us:Dc(c))),b=R.useRef(p),w=R.useRef(0),[y,O]=UE(o),S=R.useCallback(()=>{const A=WE(b.current._s,f);A&&Jp(A,v,b,w,d)},[d,f]);return[p,R.useCallback(A=>{const x=G=>{switch(Jp(G,v,b,w,d),G){case Nc:y>=0&&(w.current=Cc(S,y));break;case fs:O>=0&&(w.current=Cc(S,O));break;case xc:case cs:w.current=zE(x,G);break}},k=b.current.isEnter;typeof A!="boolean"&&(A=!k),A?!k&&x(n?t?xc:Nc:us):k&&x(e?r?cs:fs:Dc(f))},[S,d,n,e,t,r,y,O,f]),S]},Pc=({initialOpen:n,initialMounted:e,unmountOnClose:t,transition:r,transitionTimeout:o=500,onMenuChange:s}={})=>{const c=Fo(r,"open"),f=Fo(r,"close"),[{status:d},p,v]=HE({initialEntered:n,mountOnEnter:!e,unmountOnExit:t,timeout:o,enter:c,exit:f,onStateChange:R.useCallback(({current:{isEnter:b,isResolved:w}})=>{!s||b&&c&&w||!b&&f&&w||s({open:b})},[s,c,f])});return[{state:AE[d],endTransition:v},p]},qE=n=>{const[e,t]=Pc(n),[r,o]=R.useState(),s=(c,f)=>{o({position:c,alwaysUpdate:f}),t(!0)};return[{menuItemFocus:r,...e},t,s]},GE=(n,e)=>{if(process.env.NODE_ENV!=="production"&&typeof e!="function")throw new Error("[React-Menu] useClick/useHover requires a function in the second parameter.");const[t]=R.useState({});return{onMouseDown:()=>{t.v=n&&n!=="closed"},onClick:r=>t.v?t.v=!1:e(!0,r)}},YE=parseInt(R.version)<19,Kp=R.forwardRef(function({"aria-label":e,captureFocus:t,initialOpen:r,menuButton:o,instanceRef:s,onMenuChange:c,...f},d){const[p,v,b]=qE({...f,onMenuChange:c}),{state:w}=p,y=Rp(w),O=R.useRef(null),S=GE(w,(q,ye)=>b(ye.detail?void 0:Vo.FIRST)),A=R.useCallback(q=>{v(!1),q.key&&O.current.focus()},[v]),x=q=>{switch(q.key){case zn.UP:b(Vo.LAST);break;case zn.DOWN:b(Vo.FIRST);break;default:return}q.preventDefault()},k=En(o,{open:y});if(!k||!k.type)throw new Error("Menu requires a menuButton prop.");const G={...is({onKeyDown:x,...S},k.props),ref:Tc(YE?k.ref:k.props.ref,O)};_E(k.type)==="MenuButton"&&(G.isOpen=y);const oe=R.cloneElement(k,G);return R.useImperativeHandle(s,()=>({openMenu:b,closeMenu:()=>v(!1)})),Q.jsxs(R.Fragment,{children:[oe,Q.jsx(qp,{...f,...p,"aria-label":e||(typeof k.props.children=="string"?k.props.children:"Menu"),anchorRef:O,ref:d,onClose:A})]})}),JE=(n,e)=>{const t=R.memo(e),r=R.forwardRef((o,s)=>{const c=R.useRef(null);return Q.jsx(t,{...o,itemRef:c,externalRef:s,isHovering:R.useContext(jp)===c.current})});return r.displayName=`WithHovering(${n})`,r},KE=n=>{const[e,t]=R.useState(!1);return R.useEffect(()=>{!n&&t(!1)},[n]),[e,()=>!e&&t(!0),()=>t(!1)]},XE=(n,e,t)=>{ss(()=>{if(process.env.NODE_ENV!=="production"&&!t)throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${e.current.outerHTML}`);if(n)return;const r=e.current;return t(r,!0),()=>{t(r)}},[n,e,t])},ZE=(n,e,t,r)=>{const[o,s,c]=KE(t),{submenuCloseDelay:f}=R.useContext(Ic),{isParentOpen:d,submenuCtx:p,dispatch:v,updateItems:b}=R.useContext(Fp),w=()=>{!t&&!r&&v(mt.SET,n.current)},y=()=>{!r&&v(mt.UNSET,n.current)},O=x=>{t&&!x.currentTarget.contains(x.relatedTarget)&&y()},S=x=>{r||(x.stopPropagation(),s(),p.on(f,w,w))},A=(x,k)=>{c(),p.off(),!k&&y()};return XE(r,n,b),R.useEffect(()=>{t&&d&&e.current&&e.current.focus()},[e,t,d]),{mouseOver:o,setHover:w,onBlur:O,onPointerMove:S,onPointerLeave:A}},ls=JE("MenuItem",function({className:e,value:t,href:r,type:o,checked:s,disabled:c,children:f,onClick:d,isHovering:p,itemRef:v,externalRef:b,...w}){const y=!!c,{mouseOver:O,setHover:S,...A}=ZE(v,v,p,y),x=R.useContext(Vp),k=R.useContext(IE),G=o==="radio",oe=o==="checkbox",q=!!r&&!y&&!G&&!oe,ye=G?k.value===t:oe?!!s:!1,L=Se=>{if(y){Se.stopPropagation(),Se.preventDefault();return}const he={value:t,syntheticEvent:Se};Se.key!==void 0&&(he.key=Se.key),oe&&(he.checked=!ye),G&&(he.name=k.name),En(d,he),G&&En(k.onRadioChange,he),x.handleClick(he,oe||G)},F=Se=>{if(p)switch(Se.key){case zn.ENTER:Se.preventDefault();case zn.SPACE:q?v.current.click():L(Se)}},ae=R.useMemo(()=>({type:o,disabled:y,hover:O||p,checked:ye,anchor:q}),[o,y,O,p,ye,q]),we=is({...A,onPointerDown:S,onKeyDown:F,onClick:L},w),ce={role:G?"menuitemradio":oe?"menuitemcheckbox":xE,"aria-checked":G||oe?ye:void 0,...kp(y,p),...we,ref:Tc(b,v),className:os({block:as,element:EE,modifiers:ae,className:e}),children:R.useMemo(()=>En(f,ae),[f,ae])};return q?Q.jsx("li",{role:TE,children:Q.jsx("a",{href:r,...ce})}):Q.jsx("li",{...ce})});if(!R.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Xw)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function QE(n){n()}function e1(n){n||(n=QE,process.env.NODE_ENV!=="production"&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),$w({reactionScheduler:n})}function t1(n){return $h(n)}var n1=1e4,r1=1e4,i1=(function(){function n(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=n1),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var o=Date.now();t.registrations.forEach(function(s,c){o-s.registeredAt>=r&&(t.finalize(s.value),t.registrations.delete(c))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(n.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(n.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(n.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,r1))}}),n})(),o1=typeof FinalizationRegistry<"u"?FinalizationRegistry:i1,Mc=new o1(function(n){var e;(e=n.reaction)===null||e===void 0||e.dispose(),n.reaction=null}),ds={exports:{}},Rc={};var Xp;function a1(){if(Xp)return Rc;Xp=1;var n=R;function e(b,w){return b===w&&(b!==0||1/b===1/w)||b!==b&&w!==w}var t=typeof Object.is=="function"?Object.is:e,r=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function f(b,w){var y=w(),O=r({inst:{value:y,getSnapshot:w}}),S=O[0].inst,A=O[1];return s(function(){S.value=y,S.getSnapshot=w,d(S)&&A({inst:S})},[b,y,w]),o(function(){return d(S)&&A({inst:S}),b(function(){d(S)&&A({inst:S})})},[b]),c(y),y}function d(b){var w=b.getSnapshot;b=b.value;try{var y=w();return!t(b,y)}catch{return!0}}function p(b,w){return w()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return Rc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,Rc}var Lc={};var Zp;function s1(){return Zp||(Zp=1,process.env.NODE_ENV!=="production"&&(function(){function n(y,O){return y===O&&(y!==0||1/y===1/O)||y!==y&&O!==O}function e(y,O){v||o.startTransition===void 0||(v=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var S=O();if(!b){var A=O();s(S,A)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),b=!0)}A=c({inst:{value:S,getSnapshot:O}});var x=A[0].inst,k=A[1];return d(function(){x.value=S,x.getSnapshot=O,t(x)&&k({inst:x})},[y,S,O]),f(function(){return t(x)&&k({inst:x}),y(function(){t(x)&&k({inst:x})})},[y]),p(S),S}function t(y){var O=y.getSnapshot;y=y.value;try{var S=O();return!s(y,S)}catch{return!0}}function r(y,O){return O()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=R,s=typeof Object.is=="function"?Object.is:n,c=o.useState,f=o.useEffect,d=o.useLayoutEffect,p=o.useDebugValue,v=!1,b=!1,w=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Lc.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Lc}var Qp;function u1(){return Qp||(Qp=1,process.env.NODE_ENV==="production"?ds.exports=a1():ds.exports=s1()),ds.exports}var c1=u1();function ev(n){n.reaction=new dr("observer".concat(n.name),function(){var e;n.stateVersion=Symbol(),(e=n.onStoreChange)===null||e===void 0||e.call(n)})}function f1(n,e){e===void 0&&(e="observed");var t=R.useRef(null);if(!t.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:e,subscribe:function(f){return Mc.unregister(r),r.onStoreChange=f,r.reaction||(ev(r),r.stateVersion=Symbol()),function(){var d;r.onStoreChange=null,(d=r.reaction)===null||d===void 0||d.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};t.current=r}var o=t.current;o.reaction||(ev(o),Mc.register(t,o,o)),R.useDebugValue(o.reaction,t1),c1.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot);var s,c;if(o.reaction.track(function(){try{s=n()}catch(f){c=f}}),c)throw c;return s}var kc,Bc,l1=!0,tv=!0,nv=typeof Symbol=="function"&&Symbol.for,d1=(Bc=(kc=Object.getOwnPropertyDescriptor(function(){},"name"))===null||kc===void 0?void 0:kc.configurable)!==null&&Bc!==void 0?Bc:!1,rv=nv?Symbol.for("react.forward_ref"):typeof R.forwardRef=="function"&&R.forwardRef(function(n){return null}).$$typeof,iv=nv?Symbol.for("react.memo"):typeof R.memo=="function"&&R.memo(function(n){return null}).$$typeof;function vr(n,e){var t;if(process.env.NODE_ENV,iv&&n.$$typeof===iv)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var r=(t=void 0)!==null&&t!==void 0?t:!1,o=n,s=n.displayName||n.name;if(rv&&n.$$typeof===rv&&(r=!0,o=n.render,typeof o!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var c=function(f,d){return f1(function(){return o(f,d)},s)};return c.displayName=n.displayName,d1&&Object.defineProperty(c,"name",{value:n.name,writable:!0,configurable:!0}),n.contextTypes&&(c.contextTypes=n.contextTypes,process.env.NODE_ENV!=="production"&&tv&&(tv=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),r&&(c=R.forwardRef(c)),c=R.memo(c),p1(n,c),process.env.NODE_ENV!=="production"&&Object.defineProperty(c,"contextTypes",{set:function(){var f,d;throw new Error("[mobx-react-lite] `".concat(this.displayName||((f=this.type)===null||f===void 0?void 0:f.displayName)||((d=this.type)===null||d===void 0?void 0:d.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),c}var h1={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function p1(n,e){Object.keys(n).forEach(function(t){h1[t]||Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}process.env.NODE_ENV;var jc;e1(ho.unstable_batchedUpdates),jc=Mc.finalizeAllImmediately;function Fc(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function v1(n){if(Array.isArray(n))return n}function g1(n){if(Array.isArray(n))return Fc(n)}function m1(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function b1(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,av(r.key),r)}}function y1(n,e,t){return e&&b1(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function hs(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=$c(n))||e){t&&(n=t);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(d){throw d},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
96
|
+
Use 'override' annotation for methods overridden by subclass.`)}}var sS=np(0),uS=(function(){var n=!1,e={};return Object.defineProperty(e,"0",{set:function(){n=!0}}),Object.create(e)[0]=1,n===!1})(),ic=0,tp=function(){};function cS(n,e){Object.setPrototypeOf?Object.setPrototypeOf(n.prototype,e):n.prototype.__proto__!==void 0?n.prototype.__proto__=e:n.prototype=e}cS(tp,Array.prototype);var oc=(function(n){function e(r,o,s,c){var f;return s===void 0&&(s=process.env.NODE_ENV!=="production"?"ObservableArray@"+Bn():"ObservableArray"),c===void 0&&(c=!1),f=n.call(this)||this,$r(function(){var d=new nc(s,o,c,!0);d.proxy_=f,ah(f,be,d),r&&r.length&&f.spliceWithArray(0,0,r),uS&&Object.defineProperty(f,"0",sS)}),f}fh(e,n);var t=e.prototype;return t.concat=function(){this[be].atom_.reportObserved();for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return Array.prototype.concat.apply(this.slice(),s.map(function(f){return ko(f)?f.slice():f}))},t[Symbol.iterator]=function(){var r=this,o=0;return sc({next:function(){return o<r.length?{value:r[o++],done:!1}:{done:!0,value:void 0}}})},Pi(e,[{key:"length",get:function(){return this[be].getArrayLength_()},set:function(o){this[be].setArrayLength_(o)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])})(tp);Object.entries(Ya).forEach(function(n){var e=n[0],t=n[1];e!=="concat"&&Ao(oc.prototype,e,t)});function np(n){return{enumerable:!1,configurable:!0,get:function(){return this[be].get_(n)},set:function(t){this[be].set_(n,t)}}}function fS(n){Qn(oc.prototype,""+n,np(n))}function rp(n){if(n>ic){for(var e=ic;e<n+100;e++)fS(e);ic=n}}rp(1e3);function lS(n,e,t){return new oc(n,e,t)}function ji(n,e){if(typeof n=="object"&&n!==null){if(ko(n))return e!==void 0&&ie(23),n[be].atom_;if(Wn(n))return n.atom_;if(pr(n)){if(e===void 0)return n.keysAtom_;var t=n.data_.get(e)||n.hasMap_.get(e);return t||ie(25,e,Ka(n)),t}if(hi(n)){if(!e)return ie(26);var r=n[be].values_.get(e);return r||ie(27,e,Ka(n)),r}if(Vu(n)||Do(n)||Ha(n))return n}else if(gt(n)&&Ha(n[be]))return n[be];ie(28)}function ip(n,e){if(n||ie(29),Vu(n)||Do(n)||Ha(n)||pr(n)||Wn(n))return n;if(n[be])return n[be];ie(24,n)}function Ka(n,e){var t;if(e!==void 0)t=ji(n,e);else{if(fi(n))return n.name;hi(n)||pr(n)||Wn(n)?t=ip(n):t=ji(n)}return t.name_}function $r(n){var e=ui(),t=Hu(!0);bn();try{return n()}finally{yn(),qu(t),lr(e)}}var op=Eo.toString;function ap(n,e,t){return t===void 0&&(t=-1),ac(n,e,t)}function ac(n,e,t,r,o){if(n===e)return n!==0||1/n===1/e;if(n==null||e==null)return!1;if(n!==n)return e!==e;var s=typeof n;if(s!=="function"&&s!=="object"&&typeof e!="object")return!1;var c=op.call(n);if(c!==op.call(e))return!1;switch(c){case"[object RegExp]":case"[object String]":return""+n==""+e;case"[object Number]":return+n!=+n?+e!=+e:+n==0?1/+n===1/e:+n==+e;case"[object Date]":case"[object Boolean]":return+n==+e;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(n)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":t>=0&&t++;break}n=sp(n),e=sp(e);var f=c==="[object Array]";if(!f){if(typeof n!="object"||typeof e!="object")return!1;var d=n.constructor,p=e.constructor;if(d!==p&&!(gt(d)&&d instanceof d&>(p)&&p instanceof p)&&"constructor"in n&&"constructor"in e)return!1}if(t===0)return!1;t<0&&(t=-1),r=r||[],o=o||[];for(var v=r.length;v--;)if(r[v]===n)return o[v]===e;if(r.push(n),o.push(e),f){if(v=n.length,v!==e.length)return!1;for(;v--;)if(!ac(n[v],e[v],t-1,r,o))return!1}else{var b=Object.keys(n),w=b.length;if(Object.keys(e).length!==w)return!1;for(var y=0;y<w;y++){var O=b[y];if(!(vn(e,O)&&ac(n[O],e[O],t-1,r,o)))return!1}}return r.pop(),o.pop(),!0}function sp(n){return ko(n)?n.slice():Di(n)||pr(n)||cr(n)||Wn(n)?Array.from(n.entries()):n}var up,dS=((up=xa().Iterator)==null?void 0:up.prototype)||{};function sc(n){return n[Symbol.iterator]=hS,Object.assign(Object.create(dS),n)}function hS(){return this}function cp(n){return n instanceof Object&&typeof n.annotationType_=="string"&>(n.make_)&>(n.extend_)}["Symbol","Map","Set"].forEach(function(n){var e=xa();typeof e[n]>"u"&&ie("MobX requires global '"+n+"' to be available or polyfilled")}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Aw,extras:{getDebugName:Ka},$mobx:be});var pS=Object.getOwnPropertyDescriptor,vS=(n,e,t,r)=>{for(var o=r>1?void 0:r?pS(e,t):e,s=n.length-1,c;s>=0;s--)(c=n[s])&&(o=c(o)||o);return o},gS=(n,e)=>(t,r)=>e(t,r,n);Fe.JustLayoutStore=class{service;layout=null;lastActiveId=null;lastActiveTm=new Date().getTime();fullScreenLayout=null;fullScreenHideTitle=!1;tabTitleMap=new Map;tabTitleTooltipMap=new Map;constructor(e){this.service=e,Zw(this,{service:!1},{autoBind:!0})}setLayout=e=>{this.layout=e};setTabTitle=(e,t)=>{this.tabTitleMap.set($e.toString(e),t)};getTabTitle=e=>this.tabTitleMap.get($e.toString(e));setTabTitleTooltip=(e,t)=>{this.tabTitleTooltipMap.set($e.toString(e),t)};getTabTitleTooltip=e=>this.tabTitleTooltipMap.get($e.toString(e));setFullScreenLayoutByBranch=e=>{e===null?this.fullScreenLayout=null:this.fullScreenLayout=this.service.getNodeAtBranch(this.layout,e)};setFullScreenHideTitle=e=>{this.fullScreenHideTitle=e};addTab=e=>{const t=this.service.getTabBranch(this.layout,[]);t!=null&&(this.service.hasWinId(this.layout,e.justId)?this.layout=this.service.activeWinId(this.layout,e.justId):this.layout=this.service.addTabWin(this.layout,t,e.justId,-1),this.lastActiveId=e.justId,this.lastActiveTm=new Date().getTime())};addTabByNodeName=e=>{const t=this.service.getTabNodeInfoByNodeName(this.layout,e.nodeName,[]);t!=null&&(this.service.hasWinId(this.layout,e.justId)?this.layout=this.service.activeWinId(this.layout,e.justId):this.layout=this.service.addTabWin(this.layout,t.branch,e.justId,-1),this.lastActiveId=e.justId,this.lastActiveTm=new Date().getTime())};queryWinIdsByViewId=e=>this.service.queryWinIdsByViewId(this.layout??null,e,[]);cloneTab=e=>{const t=this.service.getBranchByWinId(this.layout,e.justId);if(t==null)return;const r=this.service.getNodeAtBranch(this.layout,t);let o=0;r?.type==="stack"&&r.active!=null&&(o=$e.indexOf(r.tabs,e.justId)+1),this.layout=this.service.addTabWin(this.layout,t,e.cloneJustId,o),this.lastActiveId=e.cloneJustId,this.lastActiveTm=new Date().getTime()};removeWin=e=>{this.layout=this.service.removeEmpty(this.service.removeWinId(this.layout,e.justId))};removeAllTabs=e=>{this.layout=this.service.removeEmpty(this.service.removeAllTabs(this.layout,e.branch))};activeWin=e=>{this.layout=this.service.activeWinId(this.layout,e.justId),this.lastActiveId=e.justId,this.lastActiveTm=new Date().getTime()};activePrevWin=()=>{const e=this.lastActiveId;if(e==null)return;const t=this.service.getNodeByWinId(this.layout,e);if(t?.type!=="stack"||t.tabs.length===0)return;const o=($e.indexOf(t.tabs,e)-1+t.tabs.length)%t.tabs.length,s=t.tabs[o];this.activeWin({justId:s})};activeNextWin=()=>{const e=this.lastActiveId;if(e==null)return;const t=this.service.getNodeByWinId(this.layout,e);if(t?.type!=="stack"||t.tabs.length===0)return;const o=($e.indexOf(t.tabs,e)+1)%t.tabs.length,s=t.tabs[o];this.activeWin({justId:s})};updateResize=e=>{this.layout=this.service.updateSplitSize(this.layout,e.branch,e.size)};moveWin=e=>{e.pos==="stack"?this.layout=this.service.removeEmpty(this.service.moveWinIdToStack(this.layout,e)):this.layout=this.service.removeEmpty(this.service.moveWinIdToSplit(this.layout,e)),this.lastActiveId=e.justId,this.lastActiveTm=new Date().getTime()};toggleSideMenu=()=>{if(this.layout===null||this.layout.type!=="split-pixels")return;const e=this.layout.size<=0?this.layout.primaryDefaultSize:0;this.updateResize({branch:[],size:e})};toggleWin=({nodeName:e})=>{const t=this.layout,r=this.service.getNodeInfoByNodeName(t,e,[]);if(r==null||r.node.type!=="split-pixels")return;const o=r.node.primaryHide!==!0,s=!o||r.node.size<10?r.node.primaryDefaultSize:0,c=this.service.buildSpecFromUpdateSpec(r.branch,{$merge:{size:s,primaryHide:o}}),f=this.service.updateNode(t,c);f!=null&&this.setLayout(f)};showWin=({nodeName:e,show:t})=>{const r=this.layout,o=this.service.getNodeInfoByNodeName(r,e,[]);if(o!=null&&o.node.type==="split-pixels"&&t===(o.node.size===0)){const s=t?o.node.primaryDefaultSize:0,c=this.service.buildSpecFromUpdateSpec(o.branch,{$merge:{size:s}}),f=this.service.updateNode(r,c);if(f==null)return;this.setLayout(f)}};getSizeByNodeName=({nodeName:e})=>{const t=this.layout,r=this.service.getNodeInfoByNodeName(t,e,[]);if(r!=null)return r.node.type==="split-pixels"||r.node.type==="split-percentage"?r.node.size:null};getBranchByJustId=({justId:e})=>{const t=this.layout;return this.service.getBranchByWinId(t,e)};isPrimaryHide=({nodeName:e})=>{const t=this.layout,r=this.service.getNodeInfoByNodeName(t,e,[]);if(r!=null)return r.node.type==="split-pixels"?r.node.primaryHide:null};openWin=({justId:e})=>{this.service.hasWinId(this.layout??null,e)?this.activeWin({justId:e}):this.addTab({justId:e})};openWinByNodeName=({justId:e,nodeName:t})=>{this.service.hasWinId(this.layout??null,e)?this.activeWin({justId:e}):this.addTabByNodeName({justId:e,nodeName:t})};getWinIds=({viewId:e})=>this.service.queryWinIdsByViewId(this.layout??null,e,[]);getDupWinIds=({justId:e})=>this.service.queryDupWinIdsByWinId(this.layout??null,e,[]);getWinIdsByBranch=({branch:e})=>this.service.queryWinIdsByStack(this.layout??null,e);getNodeAtBranch=({branch:e})=>this.service.getNodeAtBranch(this.layout??null,e);openWinMenu=({justId:e,nodeName:t})=>{const r=e.viewId,o=this.getWinIds({viewId:r});if(o.length===0)console.log("openWinMenu1",o,e),this.openWinByNodeName({justId:e,nodeName:t});else{const s=o.toSorted((c,f)=>(c.dupId??"")<=(f.dupId??"")?-1:1).at(-1);s&&(console.log("openWinMenu2",o,s),this.openWinByNodeName({justId:s,nodeName:t}))}};fullScreenWin=async(e,t,r=!1)=>{t?this.setLayout(null):(this.setFullScreenLayoutByBranch(e),this.setFullScreenHideTitle(r))}},Fe.JustLayoutStore=vS([gd(),gS(0,h_(ii.JustLayoutService))],Fe.JustLayoutStore);const fp=new H_(({bind:n})=>{n(ii.JustLayoutService).to(Fe.JustLayoutService).inSingletonScope(),n(ii.JustLayoutStore).to(Fe.JustLayoutStore).inTransientScope(),n(ii.JustLayoutFactory).toFactory(e=>t=>{if(!Bo.has(t)){const r=Xa.get(ii.JustLayoutStore);Bo.set(t,r)}return Bo.get(t)})}),Xa=new r0,mS=[fp];Xa.load(...mS);const Bo=new Map;window.storeLayout=Bo,window.toJS=qw;const nr=n=>{const[e]=R.useState(()=>Xa.get(ii.JustLayoutFactory)(n));return e},lp=R.createContext({dragDropManager:void 0});function Sn(n){return"Minified Redux error #"+n+"; visit https://redux.js.org/Errors?code="+n+" for the full message or use the non-minified dev environment for full errors. "}var dp=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),hp=function(){return Math.random().toString(36).substring(7).split("").join(".")},pp={INIT:"@@redux/INIT"+hp(),REPLACE:"@@redux/REPLACE"+hp()};function bS(n){if(typeof n!="object"||n===null)return!1;for(var e=n;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(n)===e}function yS(n){if(n===void 0)return"undefined";if(n===null)return"null";var e=typeof n;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(n))return"array";if(SS(n))return"date";if(wS(n))return"error";var t=_S(n);switch(t){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return t}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function _S(n){return typeof n.constructor=="function"?n.constructor.name:null}function wS(n){return n instanceof Error||typeof n.message=="string"&&n.constructor&&typeof n.constructor.stackTraceLimit=="number"}function SS(n){return n instanceof Date?!0:typeof n.toDateString=="function"&&typeof n.getDate=="function"&&typeof n.setDate=="function"}function Fi(n){var e=typeof n;return process.env.NODE_ENV!=="production"&&(e=yS(n)),e}function vp(n,e,t){var r;if(typeof e=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Sn(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof t>"u"&&(t=e,e=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Sn(1):"Expected the enhancer to be a function. Instead, received: '"+Fi(t)+"'");return t(vp)(n,e)}if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Sn(2):"Expected the root reducer to be a function. Instead, received: '"+Fi(n)+"'");var o=n,s=e,c=[],f=c,d=!1;function p(){f===c&&(f=c.slice())}function v(){if(d)throw new Error(process.env.NODE_ENV==="production"?Sn(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function b(S){if(typeof S!="function")throw new Error(process.env.NODE_ENV==="production"?Sn(4):"Expected the listener to be a function. Instead, received: '"+Fi(S)+"'");if(d)throw new Error(process.env.NODE_ENV==="production"?Sn(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var A=!0;return p(),f.push(S),function(){if(A){if(d)throw new Error(process.env.NODE_ENV==="production"?Sn(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");A=!1,p();var k=f.indexOf(S);f.splice(k,1),c=null}}}function w(S){if(!bS(S))throw new Error(process.env.NODE_ENV==="production"?Sn(7):"Actions must be plain objects. Instead, the actual type was: '"+Fi(S)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof S.type>"u")throw new Error(process.env.NODE_ENV==="production"?Sn(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(d)throw new Error(process.env.NODE_ENV==="production"?Sn(9):"Reducers may not dispatch actions.");try{d=!0,s=o(s,S)}finally{d=!1}for(var A=c=f,x=0;x<A.length;x++){var k=A[x];k()}return S}function y(S){if(typeof S!="function")throw new Error(process.env.NODE_ENV==="production"?Sn(10):"Expected the nextReducer to be a function. Instead, received: '"+Fi(S));o=S,w({type:pp.REPLACE})}function O(){var S,A=b;return S={subscribe:function(k){if(typeof k!="object"||k===null)throw new Error(process.env.NODE_ENV==="production"?Sn(11):"Expected the observer to be an object. Instead, received: '"+Fi(k)+"'");function G(){k.next&&k.next(v())}G();var oe=A(G);return{unsubscribe:oe}}},S[dp]=function(){return this},S}return w({type:pp.INIT}),r={dispatch:w,subscribe:b,getState:v,replaceReducer:y},r[dp]=O,r}function Ae(n,e,...t){if(OS()&&e===void 0)throw new Error("invariant requires an error message argument");if(!n){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;r=new Error(e.replace(/%s/g,function(){return t[o++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function OS(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function ES(n,e,t){return e.split(".").reduce((r,o)=>r&&r[o]?r[o]:t||null,n)}function IS(n,e){return n.filter(t=>t!==e)}function gp(n){return typeof n=="object"}function AS(n,e){const t=new Map,r=s=>{t.set(s,t.has(s)?t.get(s)+1:1)};n.forEach(r),e.forEach(r);const o=[];return t.forEach((s,c)=>{s===1&&o.push(c)}),o}function TS(n,e){return n.filter(t=>e.indexOf(t)>-1)}const uc="dnd-core/INIT_COORDS",Za="dnd-core/BEGIN_DRAG",cc="dnd-core/PUBLISH_DRAG_SOURCE",Qa="dnd-core/HOVER",es="dnd-core/DROP",ts="dnd-core/END_DRAG";function mp(n,e){return{type:uc,payload:{sourceClientOffset:e||null,clientOffset:n||null}}}const xS={type:uc,payload:{clientOffset:null,sourceClientOffset:null}};function NS(n){return function(t=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:s,getSourceClientOffset:c}=r,f=n.getMonitor(),d=n.getRegistry();n.dispatch(mp(s)),DS(t,f,d);const p=MS(t,f);if(p==null){n.dispatch(xS);return}let v=null;if(s){if(!c)throw new Error("getSourceClientOffset must be defined");CS(c),v=c(p)}n.dispatch(mp(s,v));const w=d.getSource(p).beginDrag(f,p);if(w==null)return;PS(w),d.pinSource(p);const y=d.getSourceType(p);return{type:Za,payload:{itemType:y,item:w,sourceId:p,clientOffset:s||null,sourceClientOffset:v||null,isSourcePublic:!!o}}}}function DS(n,e,t){Ae(!e.isDragging(),"Cannot call beginDrag while dragging."),n.forEach(function(r){Ae(t.getSource(r),"Expected sourceIds to be registered.")})}function CS(n){Ae(typeof n=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function PS(n){Ae(gp(n),"Item must be an object.")}function MS(n,e){let t=null;for(let r=n.length-1;r>=0;r--)if(e.canDragSource(n[r])){t=n[r];break}return t}function RS(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function LS(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){RS(n,o,t[o])})}return n}function kS(n){return function(t={}){const r=n.getMonitor(),o=n.getRegistry();BS(r),$S(r).forEach((c,f)=>{const d=jS(c,f,o,r),p={type:es,payload:{dropResult:LS({},t,d)}};n.dispatch(p)})}}function BS(n){Ae(n.isDragging(),"Cannot call drop while not dragging."),Ae(!n.didDrop(),"Cannot call drop twice during one drag operation.")}function jS(n,e,t,r){const o=t.getTarget(n);let s=o?o.drop(r,n):void 0;return FS(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function FS(n){Ae(typeof n>"u"||gp(n),"Drop result must either be an object or undefined.")}function $S(n){const e=n.getTargetIds().filter(n.canDropOnTarget,n);return e.reverse(),e}function VS(n){return function(){const t=n.getMonitor(),r=n.getRegistry();WS(t);const o=t.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(t,o),r.unpinSource()),{type:ts}}}function WS(n){Ae(n.isDragging(),"Cannot call endDrag while not dragging.")}function fc(n,e){return e===null?n===null:Array.isArray(n)?n.some(t=>t===e):n===e}function US(n){return function(t,{clientOffset:r}={}){zS(t);const o=t.slice(0),s=n.getMonitor(),c=n.getRegistry(),f=s.getItemType();return qS(o,c,f),HS(o,s,c),GS(o,s,c),{type:Qa,payload:{targetIds:o,clientOffset:r||null}}}}function zS(n){Ae(Array.isArray(n),"Expected targetIds to be an array.")}function HS(n,e,t){Ae(e.isDragging(),"Cannot call hover while not dragging."),Ae(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<n.length;r++){const o=n[r];Ae(n.lastIndexOf(o)===r,"Expected targetIds to be unique in the passed array.");const s=t.getTarget(o);Ae(s,"Expected targetIds to be registered.")}}function qS(n,e,t){for(let r=n.length-1;r>=0;r--){const o=n[r],s=e.getTargetType(o);fc(s,t)||n.splice(r,1)}}function GS(n,e,t){n.forEach(function(r){t.getTarget(r).hover(e,r)})}function YS(n){return function(){if(n.getMonitor().isDragging())return{type:cc}}}function JS(n){return{beginDrag:NS(n),publishDragSource:YS(n),hover:US(n),drop:kS(n),endDrag:VS(n)}}class KS{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;function r(s){return(...c)=>{const f=s.apply(e,c);typeof f<"u"&&t(f)}}const o=JS(this);return Object.keys(o).reduce((s,c)=>{const f=o[c];return s[c]=r(f),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function XS(n,e){return{x:n.x+e.x,y:n.y+e.y}}function bp(n,e){return{x:n.x-e.x,y:n.y-e.y}}function ZS(n){const{clientOffset:e,initialClientOffset:t,initialSourceClientOffset:r}=n;return!e||!t||!r?null:bp(XS(e,r),t)}function QS(n){const{clientOffset:e,initialClientOffset:t}=n;return!e||!t?null:bp(e,t)}const jo=[],lc=[];jo.__IS_NONE__=!0,lc.__IS_ALL__=!0;function eO(n,e){return n===jo?!1:n===lc||typeof e>"u"?!0:TS(e,n).length>0}class tO{subscribeToStateChange(e,t={}){const{handlerIds:r}=t;Ae(typeof e=="function","listener must be a function."),Ae(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const s=()=>{const c=this.store.getState(),f=c.stateId;try{f===o||f===o+1&&!eO(c.dirtyHandlerIds,r)||e()}finally{o=f}};return this.store.subscribe(s)}subscribeToOffsetChange(e){Ae(typeof e=="function","listener must be a function.");let t=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==t&&(t=o,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Ae(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(Ae(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();return fc(r,o)&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(Ae(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),o=this.getItemType();return r!==o?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:r}=t;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),s=this.getItemType();if(s&&!fc(o,s))return!1;const c=this.getTargetIds();if(!c.length)return!1;const f=c.indexOf(e);return r?f===c.length-1:f>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return ZS(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return QS(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const yp=typeof global<"u"?global:self,_p=yp.MutationObserver||yp.WebKitMutationObserver;function wp(n){return function(){const t=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(t),clearInterval(r),n()}}}function nO(n){let e=1;const t=new _p(n),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const rO=typeof _p=="function"?nO:wp;class iO{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let r=0,o=e.length-this.index;r<o;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=rO(this.flush),this.requestErrorThrow=wp(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class oO{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}class aO{create(e){const t=this.freeTasks,r=t.length?t.pop():new oO(this.onError,o=>t[t.length]=o);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Sp=new iO,sO=new aO(Sp.registerPendingError);function uO(n){Sp.enqueueTask(sO.create(n))}const dc="dnd-core/ADD_SOURCE",hc="dnd-core/ADD_TARGET",pc="dnd-core/REMOVE_SOURCE",ns="dnd-core/REMOVE_TARGET";function cO(n){return{type:dc,payload:{sourceId:n}}}function fO(n){return{type:hc,payload:{targetId:n}}}function lO(n){return{type:pc,payload:{sourceId:n}}}function dO(n){return{type:ns,payload:{targetId:n}}}function hO(n){Ae(typeof n.canDrag=="function","Expected canDrag to be a function."),Ae(typeof n.beginDrag=="function","Expected beginDrag to be a function."),Ae(typeof n.endDrag=="function","Expected endDrag to be a function.")}function pO(n){Ae(typeof n.canDrop=="function","Expected canDrop to be a function."),Ae(typeof n.hover=="function","Expected hover to be a function."),Ae(typeof n.drop=="function","Expected beginDrag to be a function.")}function vc(n,e){if(e&&Array.isArray(n)){n.forEach(t=>vc(t,!1));return}Ae(typeof n=="string"||typeof n=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var On;(function(n){n.SOURCE="SOURCE",n.TARGET="TARGET"})(On||(On={}));let vO=0;function gO(){return vO++}function mO(n){const e=gO().toString();switch(n){case On.SOURCE:return`S${e}`;case On.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${n}`)}}function Op(n){switch(n[0]){case"S":return On.SOURCE;case"T":return On.TARGET;default:throw new Error(`Cannot parse handler ID: ${n}`)}}function Ep(n,e){const t=n.entries();let r=!1;do{const{done:o,value:[,s]}=t.next();if(s===e)return!0;r=!!o}while(!r);return!1}class bO{addSource(e,t){vc(e),hO(t);const r=this.addHandler(On.SOURCE,e,t);return this.store.dispatch(cO(r)),r}addTarget(e,t){vc(e,!0),pO(t);const r=this.addHandler(On.TARGET,e,t);return this.store.dispatch(fO(r)),r}containsHandler(e){return Ep(this.dragSources,e)||Ep(this.dropTargets,e)}getSource(e,t=!1){return Ae(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Ae(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Ae(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Ae(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Op(e)===On.SOURCE}isTargetId(e){return Op(e)===On.TARGET}removeSource(e){Ae(this.getSource(e),"Expected an existing source."),this.store.dispatch(lO(e)),uO(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){Ae(this.getTarget(e),"Expected an existing target."),this.store.dispatch(dO(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Ae(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Ae(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){const o=mO(e);return this.types.set(o,t),e===On.SOURCE?this.dragSources.set(o,r):e===On.TARGET&&this.dropTargets.set(o,r),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const yO=(n,e)=>n===e;function _O(n,e){return!n&&!e?!0:!n||!e?!1:n.x===e.x&&n.y===e.y}function wO(n,e,t=yO){if(n.length!==e.length)return!1;for(let r=0;r<n.length;++r)if(!t(n[r],e[r]))return!1;return!0}function SO(n=jo,e){switch(e.type){case Qa:break;case dc:case hc:case ns:case pc:return jo;case Za:case cc:case ts:case es:default:return lc}const{targetIds:t=[],prevTargetIds:r=[]}=e.payload,o=AS(t,r);if(!(o.length>0||!wO(t,r)))return jo;const c=r[r.length-1],f=t[t.length-1];return c!==f&&(c&&o.push(c),f&&o.push(f)),o}function OO(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function EO(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){OO(n,o,t[o])})}return n}const Ip={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function IO(n=Ip,e){const{payload:t}=e;switch(e.type){case uc:case Za:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case Qa:return _O(n.clientOffset,t.clientOffset)?n:EO({},n,{clientOffset:t.clientOffset});case ts:case es:return Ip;default:return n}}function AO(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function $i(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){AO(n,o,t[o])})}return n}const TO={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function xO(n=TO,e){const{payload:t}=e;switch(e.type){case Za:return $i({},n,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case cc:return $i({},n,{isSourcePublic:!0});case Qa:return $i({},n,{targetIds:t.targetIds});case ns:return n.targetIds.indexOf(t.targetId)===-1?n:$i({},n,{targetIds:IS(n.targetIds,t.targetId)});case es:return $i({},n,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case ts:return $i({},n,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return n}}function NO(n=0,e){switch(e.type){case dc:case hc:return n+1;case pc:case ns:return n-1;default:return n}}function DO(n=0){return n+1}function CO(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function PO(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){CO(n,o,t[o])})}return n}function MO(n={},e){return{dirtyHandlerIds:SO(n.dirtyHandlerIds,{type:e.type,payload:PO({},e.payload,{prevTargetIds:ES(n,"dragOperation.targetIds",[])})}),dragOffset:IO(n.dragOffset,e),refCount:NO(n.refCount,e),dragOperation:xO(n.dragOperation,e),stateId:DO(n.stateId)}}function RO(n,e=void 0,t={},r=!1){const o=LO(r),s=new tO(o,new bO(o)),c=new KS(o,s),f=n(c,e,t);return c.receiveBackend(f),c}function LO(n){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return vp(MO,n&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function kO(n,e){if(n==null)return{};var t=BO(n,e),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)r=s[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function BO(n,e){if(n==null)return{};var t={},r=Object.keys(n),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(t[o]=n[o]);return t}let Ap=0;const rs=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var jO=R.memo(function(e){var{children:t}=e,r=kO(e,["children"]);const[o,s]=FO(r);return R.useEffect(()=>{if(s){const c=Tp();return++Ap,()=>{--Ap===0&&(c[rs]=null)}}},[]),Q.jsx(lp.Provider,{value:o,children:t})});function FO(n){if("manager"in n)return[{dragDropManager:n.manager},!1];const e=$O(n.backend,n.context,n.options,n.debugMode),t=!n.context;return[e,t]}function $O(n,e=Tp(),t,r){const o=e;return o[rs]||(o[rs]={dragDropManager:RO(n,e,t,r)}),o[rs]}function Tp(){return typeof global<"u"?global:window}var gc,xp;function VO(){return xp||(xp=1,gc=function n(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,o,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!n(e[o],t[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=r;o--!==0;){var c=s[o];if(!n(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}),gc}var WO=VO();const UO=po(WO),pi=typeof window<"u"?R.useLayoutEffect:R.useEffect;function zO(n,e,t){const[r,o]=R.useState(()=>e(n)),s=R.useCallback(()=>{const c=e(n);UO(r,c)||(o(c),t&&t())},[r,n,t]);return pi(s),[r,s]}function HO(n,e,t){const[r,o]=zO(n,e,t);return pi(function(){const c=n.getHandlerId();if(c!=null)return n.subscribeToStateChange(o,{handlerIds:[c]})},[n,o]),r}function Np(n,e,t){return HO(e,n||(()=>({})),()=>t.reconnect())}function Dp(n,e){const t=[...e||[]];return e==null&&typeof n!="function"&&t.push(n),R.useMemo(()=>typeof n=="function"?n():n,t)}function qO(n){return R.useMemo(()=>n.hooks.dragSource(),[n])}function GO(n){return R.useMemo(()=>n.hooks.dragPreview(),[n])}let mc=!1,bc=!1;class YO{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Ae(!mc,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return mc=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{mc=!1}}isDragging(){if(!this.sourceId)return!1;Ae(!bc,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return bc=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{bc=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let yc=!1;class JO{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;Ae(!yc,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return yc=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{yc=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function KO(n,e,t){const r=t.getRegistry(),o=r.addTarget(n,e);return[o,()=>r.removeTarget(o)]}function XO(n,e,t){const r=t.getRegistry(),o=r.addSource(n,e);return[o,()=>r.removeSource(o)]}function _c(n,e,t,r){let o;if(o!==void 0)return!!o;if(n===e)return!0;if(typeof n!="object"||!n||typeof e!="object"||!e)return!1;const s=Object.keys(n),c=Object.keys(e);if(s.length!==c.length)return!1;const f=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d<s.length;d++){const p=s[d];if(!f(p))return!1;const v=n[p],b=e[p];if(o=void 0,o===!1||o===void 0&&v!==b)return!1}return!0}function wc(n){return n!==null&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function ZO(n){if(typeof n.type=="string")return;const e=n.type.displayName||n.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function QO(n){return(e=null,t=null)=>{if(!R.isValidElement(e)){const s=e;return n(s,t),s}const r=e;return ZO(r),eE(r,t?s=>n(s,t):n)}}function Cp(n){const e={};return Object.keys(n).forEach(t=>{const r=n[t];if(t.endsWith("Ref"))e[t]=n[t];else{const o=QO(r);e[t]=()=>o}}),e}function Pp(n,e){typeof n=="function"?n(e):n.current=e}function eE(n,e){const t=n.ref;return Ae(typeof t!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),t?R.cloneElement(n,{ref:r=>{Pp(t,r),Pp(e,r)}}):R.cloneElement(n,{ref:e})}class tE{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!_c(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!_c(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Cp({dragSource:(t,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,wc(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,wc(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class nE{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!_c(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Cp({dropTarget:(t,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,wc(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Vi(){const{dragDropManager:n}=R.useContext(lp);return Ae(n!=null,"Expected drag drop context"),n}function rE(n,e){const t=Vi(),r=R.useMemo(()=>new tE(t.getBackend()),[t]);return pi(()=>(r.dragSourceOptions=n||null,r.reconnect(),()=>r.disconnectDragSource()),[r,n]),pi(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function iE(){const n=Vi();return R.useMemo(()=>new YO(n),[n])}class oE{beginDrag(){const e=this.spec,t=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(t):r={},r??null}canDrag(){const e=this.spec,t=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(t):!0}isDragging(e,t){const r=this.spec,o=this.monitor,{isDragging:s}=r;return s?s(o):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,r=this.connector,{end:o}=e;o&&o(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}}function aE(n,e,t){const r=R.useMemo(()=>new oE(n,e,t),[e,t]);return R.useEffect(()=>{r.spec=n},[n]),r}function sE(n){return R.useMemo(()=>{const e=n.type;return Ae(e!=null,"spec.type must be defined"),e},[n])}function uE(n,e,t){const r=Vi(),o=aE(n,e,t),s=sE(n);pi(function(){if(s!=null){const[f,d]=XO(s,o,r);return e.receiveHandlerId(f),t.receiveHandlerId(f),d}},[r,e,t,o,s])}function cE(n,e){const t=Dp(n,e);Ae(!t.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=iE(),o=rE(t.options,t.previewOptions);return uE(t,r,o),[Np(t.collect,r,o),qO(o),GO(o)]}function fE(n){return R.useMemo(()=>n.hooks.dropTarget(),[n])}function lE(n){const e=Vi(),t=R.useMemo(()=>new nE(e.getBackend()),[e]);return pi(()=>(t.dropTargetOptions=n||null,t.reconnect(),()=>t.disconnectDropTarget()),[n]),t}function dE(){const n=Vi();return R.useMemo(()=>new JO(n),[n])}function hE(n){const{accept:e}=n;return R.useMemo(()=>(Ae(n.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class pE{canDrop(){const e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function vE(n,e){const t=R.useMemo(()=>new pE(n,e),[e]);return R.useEffect(()=>{t.spec=n},[n]),t}function gE(n,e,t){const r=Vi(),o=vE(n,e),s=hE(n);pi(function(){const[f,d]=KO(s,o,r);return e.receiveHandlerId(f),t.receiveHandlerId(f),d},[r,e,o,t,s.map(c=>c.toString()).join("|")])}function Sc(n,e){const t=Dp(n,e),r=dE(),o=lE(t.options);return gE(t,r,o),[Np(t.collect,r,o),fE(o)]}var Oc={exports:{}};var Mp;function mE(){return Mp||(Mp=1,(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",c=0;c<arguments.length;c++){var f=arguments[c];f&&(s=o(s,r(f)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var c="";for(var f in s)e.call(s,f)&&s[f]&&(c=o(c,f));return c}function o(s,c){return c?s?s+" "+c:s+c:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()})(Oc)),Oc.exports}var bE=mE();const Un=po(bE),Rp=n=>!!n&&n[0]==="o",Lp=ho.unstable_batchedUpdates,Fo=(n,e)=>n===!0||!!(n&&n[e]),En=(n,e)=>typeof n=="function"?n(e):n,yE="_szhsinMenu",_E=n=>n[yE],is=(n,e)=>(e&&Object.keys(e).forEach(t=>{const r=n[t],o=e[t];typeof o=="function"&&r?n[t]=(...s)=>{o(...s),r(...s)}:n[t]=o}),n),wE=n=>{if(typeof n!="string")return{top:0,right:0,bottom:0,left:0};const e=n.trim().split(/\s+/,4).map(parseFloat),t=isNaN(e[0])?0:e[0],r=isNaN(e[1])?t:e[1];return{top:t,right:r,bottom:isNaN(e[2])?t:e[2],left:isNaN(e[3])?r:e[3]}},Ec=n=>{for(;n;){if(n=n.parentNode,!n||n===document.body||!n.parentNode)return;const{overflow:e,overflowX:t,overflowY:r}=getComputedStyle(n);if(/auto|scroll|overlay|hidden/.test(e+r+t))return n}};function kp(n,e){return{"aria-disabled":n||void 0,tabIndex:e?0:-1}}function Bp(n,e){for(let t=0;t<n.length;t++)if(n[t]===e)return t;return-1}const os=({block:n,element:e,modifiers:t,className:r})=>R.useMemo(()=>{const o=e?`${n}__${e}`:n;let s=o;t&&Object.keys(t).forEach(f=>{const d=t[f];d&&(s+=` ${o}--${d===!0?f:`${f}-${d}`}`)});let c=typeof r=="function"?r(t):r;return typeof c=="string"&&(c=c.trim(),c&&(s+=` ${c}`)),s},[n,e,t,r]),SE="szh-menu-container",as="szh-menu",OE="arrow",EE="item",jp=R.createContext(),Fp=R.createContext({}),$p=R.createContext({}),Vp=R.createContext({}),IE=R.createContext({}),Ic=R.createContext({}),zn=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),mt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),$o=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Vo=Object.freeze({FIRST:"first",LAST:"last"}),AE=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Wp="absolute",TE="none",xE="menuitem",Ac={preventScroll:!0},NE=({className:n,containerRef:e,containerProps:t,children:r,isOpen:o,theming:s,transition:c,onClose:f})=>{const d=Fo(c,"item"),p=({key:b})=>{b===zn.ESC&&En(f,{key:b,reason:$o.CANCEL})},v=b=>{o&&!b.currentTarget.contains(b.relatedTarget)&&En(f,{reason:$o.BLUR})};return Q.jsx("div",{...is({onKeyDown:p,onBlur:v},t),className:os({block:SE,modifiers:R.useMemo(()=>({theme:s,itemTransition:d}),[s,d]),className:n}),style:{position:"absolute",...t?.style},ref:e,children:r})},DE=()=>{let n,e=0;return{toggle:t=>{t?e++:e--,e=Math.max(e,0)},on:(t,r,o)=>{e?n||(n=setTimeout(()=>{n=0,r()},t)):o?.()},off:()=>{n&&(clearTimeout(n),n=0)}}},CE=n=>{const[e,t]=R.useState(),o=R.useRef({items:[],hoverIndex:-1,sorted:!1}).current,s=R.useCallback((f,d)=>{const{items:p}=o;if(!f)o.items=[];else if(d)p.push(f);else{const v=p.indexOf(f);v>-1&&(p.splice(v,1),f.contains(document.activeElement)&&(n.current.focus(Ac),t()))}o.hoverIndex=-1,o.sorted=!1},[o,n]),c=R.useCallback((f,d,p)=>{const{items:v,hoverIndex:b}=o,w=()=>{if(o.sorted)return;const S=n.current.querySelectorAll(".szh-menu__item");v.sort((A,x)=>Bp(S,A)-Bp(S,x)),o.sorted=!0};let y=-1,O;switch(f){case mt.RESET:break;case mt.SET:O=d;break;case mt.UNSET:O=S=>S===d?void 0:S;break;case mt.FIRST:w(),y=0,O=v[y];break;case mt.LAST:w(),y=v.length-1,O=v[y];break;case mt.SET_INDEX:w(),y=p,O=v[y];break;case mt.INCREASE:w(),y=b,y<0&&(y=v.indexOf(d)),y++,y>=v.length&&(y=0),O=v[y];break;case mt.DECREASE:w(),y=b,y<0&&(y=v.indexOf(d)),y--,y<0&&(y=v.length-1),O=v[y];break;default:if(process.env.NODE_ENV!=="production")throw new Error(`[React-Menu] Unknown hover action type: ${f}`)}O||(y=-1),t(O),o.hoverIndex=y},[n,o]);return{hoverItem:e,dispatch:c,updateItems:s}},Up=(n,e)=>Math.round(n)===e?n:e,PE=n=>{const e=n.getBoundingClientRect();return e.width=Up(e.width,n.offsetWidth),e.height=Up(e.height,n.offsetHeight),e},ME=(n,e,t,r)=>{const o=PE(e),s=n.getBoundingClientRect(),c=t===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:t.getBoundingClientRect(),f=wE(r),d=O=>O+s.left-c.left-f.left,p=O=>O+s.left+o.width-c.right+f.right,v=O=>O+s.top-c.top-f.top,b=O=>O+s.top+o.height-c.bottom+f.bottom;return{menuRect:o,containerRect:s,getLeftOverflow:d,getRightOverflow:p,getTopOverflow:v,getBottomOverflow:b,confineHorizontally:O=>{let S=d(O);if(S<0)O-=S;else{const A=p(O);A>0&&(O-=A,S=d(O),S<0&&(O-=S))}return O},confineVertically:O=>{let S=v(O);if(S<0)O-=S;else{const A=b(O);A>0&&(O-=A,S=v(O),S<0&&(O-=S))}return O}}},RE=({arrowRef:n,menuY:e,anchorRect:t,containerRect:r,menuRect:o})=>{let s=t.top-r.top-e+t.height/2;const c=n.current.offsetHeight*1.25;return s=Math.max(c,s),s=Math.min(s,o.height-c),s},LE=({anchorRect:n,containerRect:e,menuRect:t,placeLeftorRightY:r,placeLeftX:o,placeRightX:s,getLeftOverflow:c,getRightOverflow:f,confineHorizontally:d,confineVertically:p,arrowRef:v,arrow:b,direction:w,position:y})=>{let O=w,S=r;y!=="initial"&&(S=p(S),y==="anchor"&&(S=Math.min(S,n.bottom-e.top),S=Math.max(S,n.top-e.top-t.height)));let A,x,k;return O==="left"?(A=o,y!=="initial"&&(x=c(A),x<0&&(k=f(s),(k<=0||-x>k)&&(A=s,O="right")))):(A=s,y!=="initial"&&(k=f(A),k>0&&(x=c(o),(x>=0||-x<k)&&(A=o,O="left")))),y==="auto"&&(A=d(A)),{arrowY:b?RE({menuY:S,arrowRef:v,anchorRect:n,containerRect:e,menuRect:t}):void 0,x:A,y:S,computedDirection:O}},kE=({arrowRef:n,menuX:e,anchorRect:t,containerRect:r,menuRect:o})=>{let s=t.left-r.left-e+t.width/2;const c=n.current.offsetWidth*1.25;return s=Math.max(c,s),s=Math.min(s,o.width-c),s},BE=({anchorRect:n,containerRect:e,menuRect:t,placeToporBottomX:r,placeTopY:o,placeBottomY:s,getTopOverflow:c,getBottomOverflow:f,confineHorizontally:d,confineVertically:p,arrowRef:v,arrow:b,direction:w,position:y})=>{let O=w==="top"?"top":"bottom",S=r;y!=="initial"&&(S=d(S),y==="anchor"&&(S=Math.min(S,n.right-e.left),S=Math.max(S,n.left-e.left-t.width)));let A,x,k;return O==="top"?(A=o,y!=="initial"&&(x=c(A),x<0&&(k=f(s),(k<=0||-x>k)&&(A=s,O="bottom")))):(A=s,y!=="initial"&&(k=f(A),k>0&&(x=c(o),(x>=0||-x<k)&&(A=o,O="top")))),y==="auto"&&(A=p(A)),{arrowX:b?kE({menuX:S,arrowRef:v,anchorRect:n,containerRect:e,menuRect:t}):void 0,x:S,y:A,computedDirection:O}},jE=({arrow:n,align:e,direction:t,gap:r,shift:o,position:s,anchorRect:c,arrowRef:f,positionHelpers:d})=>{const{menuRect:p,containerRect:v}=d,b=t==="left"||t==="right";let w=b?r:o,y=b?o:r;if(n){const q=f.current;b?w+=q.offsetWidth:y+=q.offsetHeight}const O=c.left-v.left-p.width-w,S=c.right-v.left+w,A=c.top-v.top-p.height-y,x=c.bottom-v.top+y;let k,G;e==="end"?(k=c.right-v.left-p.width,G=c.bottom-v.top-p.height):e==="center"?(k=c.left-v.left-(p.width-c.width)/2,G=c.top-v.top-(p.height-c.height)/2):(k=c.left-v.left,G=c.top-v.top),k+=w,G+=y;const oe={...d,anchorRect:c,placeLeftX:O,placeRightX:S,placeLeftorRightY:G,placeTopY:A,placeBottomY:x,placeToporBottomX:k,arrowRef:f,arrow:n,direction:t,position:s};switch(t){case"left":case"right":return LE(oe);default:return BE(oe)}},ss=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?R.useLayoutEffect:R.useEffect;function zp(n,e){typeof n=="function"?n(e):n.current=e}const Tc=(n,e)=>R.useMemo(()=>n?e?t=>{zp(n,t),zp(e,t)}:n:e,[n,e]),Hp=-9999,FE=({ariaLabel:n,menuClassName:e,menuStyle:t,arrow:r,arrowProps:o={},anchorPoint:s,anchorRef:c,containerRef:f,containerProps:d,externalRef:p,parentScrollingRef:v,align:b="start",direction:w="bottom",position:y="auto",overflow:O="visible",setDownOverflow:S,repositionFlag:A,captureFocus:x=!0,state:k,endTransition:G,isDisabled:oe,menuItemFocus:q,gap:ye=0,shift:L=0,children:F,onClose:ae,focusProps:we,...ce})=>{const[Se,he]=R.useState({x:Hp,y:Hp}),[ct,ht]=R.useState({}),[ft,xt]=R.useState(),[ue,nn]=R.useState(w),[Pt]=R.useState(DE),[Le,wr]=R.useReducer(ne=>ne+1,1),{transition:pe,boundingBoxRef:Lt,boundingBoxPadding:rn,rootMenuRef:Ce,rootAnchorRef:ir,scrollNodesRef:$t,reposition:Vt,viewScroll:Sr,submenuCloseDelay:pt}=R.useContext(Ic),{submenuCtx:In,reposSubmenu:An=A}=R.useContext($p),Ke=R.useRef(),on=R.useRef(),Tn=R.useRef(!1),{hoverItem:at,dispatch:vt,updateItems:Gn}=CE(Ke),Qe=Rp(k),bt=Fo(pe,"open"),St=Fo(pe,"close"),P=$t.current,W=ne=>{switch(ne.key){case zn.HOME:vt(mt.FIRST);break;case zn.END:vt(mt.LAST);break;case zn.UP:vt(mt.DECREASE,at);break;case zn.DOWN:vt(mt.INCREASE,at);break;case zn.SPACE:ne.target&&ne.target.className.indexOf(as)!==-1&&ne.preventDefault();return;default:return}ne.preventDefault(),ne.stopPropagation()},U=()=>{k==="closing"&&xt(),En(G)},ee=ne=>{ne.stopPropagation(),Pt.on(pt,()=>{vt(mt.RESET),Ke.current.focus(Ac)})},le=ne=>{ne.target===ne.currentTarget&&Pt.off()},Be=R.useCallback(ne=>{const Y=Ke.current,K=f.current;if(!Y||!K)return;const te=c?c.current?.getBoundingClientRect():s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0,height:0}:null;if(!te){process.env.NODE_ENV!=="production"&&console.warn("[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open.");return}P.menu||(P.menu=(Lt?Lt.current:Ec(Ce.current))||window);const X=ME(K,Y,P.menu,rn);let{arrowX:Ee,arrowY:He,x:et,y:yt,computedDirection:Ji}=jE({arrow:r,align:b,direction:w,gap:ye,shift:L,position:y,anchorRect:te,arrowRef:on,positionHelpers:X});const{menuRect:Xo}=X,Ki=Xo.height;if(!ne&&O!=="visible"){const{getTopOverflow:Zo,getBottomOverflow:zf}=X;let Or,Qo;const ea=zf(yt);if(ea>0)Or=Ki-ea,Qo=ea;else{const Xi=Zo(yt);Xi<0&&(Or=Ki+Xi,Qo=0-Xi,Or>=0&&(yt-=Xi))}Or>=0&&xt({height:Or,overflowAmt:Qo})}r&&ht({x:Ee,y:He}),he({x:et,y:yt}),nn(Ji)},[r,b,rn,w,ye,L,y,O,s,c,f,Lt,Ce,P]);ss(()=>{Qe&&(Be(),Tn.current&&wr()),Tn.current=Qe},[Qe,Be,An]),ss(()=>{ft&&!S&&(Ke.current.scrollTop=0)},[ft,S]),ss(()=>Gn,[Gn]),R.useEffect(()=>{let{menu:ne}=P;if(!Qe||!ne)return;if(ne=ne.addEventListener?ne:window,!P.anchors){P.anchors=[];let X=Ec(ir&&ir.current);for(;X&&X!==ne;)P.anchors.push(X),X=Ec(X)}let Y=Sr;if(P.anchors.length&&Y==="initial"&&(Y="auto"),Y==="initial")return;const K=()=>{Y==="auto"?Lp(()=>Be(!0)):En(ae,{reason:$o.SCROLL})},te=P.anchors.concat(Sr!=="initial"?ne:[]);return te.forEach(X=>X.addEventListener("scroll",K)),()=>te.forEach(X=>X.removeEventListener("scroll",K))},[ir,P,Qe,ae,Sr,Be]);const nt=!!ft&&ft.overflowAmt>0;R.useEffect(()=>{if(nt||!Qe||!v)return;const ne=()=>Lp(Be),Y=v.current;return Y.addEventListener("scroll",ne),()=>Y.removeEventListener("scroll",ne)},[Qe,nt,v,Be]),R.useEffect(()=>{if(!Qe||typeof ResizeObserver!="function"||Vt==="initial")return;const ne=[],Y=new ResizeObserver(X=>X.forEach(({target:Ee})=>{ne.indexOf(Ee)<0?ne.push(Ee):ho.flushSync(()=>{Be(),wr()})})),K={box:"border-box"};Y.observe(Ke.current,K);const te=c?.current;return te&&Y.observe(te,K),()=>Y.disconnect()},[Qe,Vt,c,Be]),R.useEffect(()=>{if(!Qe){vt(mt.RESET),St||xt();return}const{position:ne,alwaysUpdate:Y}=q||{},K=()=>{ne===Vo.FIRST?vt(mt.FIRST):ne===Vo.LAST?vt(mt.LAST):ne>=-1&&vt(mt.SET_INDEX,void 0,ne)};if(Y)K();else if(x){const te=setTimeout(()=>{const X=Ke.current;X&&!X.contains(document.activeElement)&&(X.focus(Ac),K())},bt?170:100);return()=>clearTimeout(te)}},[Qe,bt,St,x,q,vt]);const Nt=R.useMemo(()=>({isParentOpen:Qe,submenuCtx:Pt,dispatch:vt,updateItems:Gn}),[Qe,Pt,vt,Gn]);let it,I;ft&&(S?I=ft.overflowAmt:it=ft.height);const N=R.useMemo(()=>({reposSubmenu:Le,submenuCtx:Pt,overflow:O,overflowAmt:I,parentMenuRef:Ke,parentDir:ue}),[Le,Pt,O,I,ue]),C=it>=0?{maxHeight:it,overflow:O}:void 0,j=R.useMemo(()=>({state:k,align:b,dir:ue}),[k,b,ue]),Z=R.useMemo(()=>({dir:ue}),[ue]),_e=os({block:as,element:OE,modifiers:Z,className:o.className}),Me=Q.jsxs("ul",{role:"menu","aria-label":n,...kp(oe),...is({onPointerEnter:In?.off,onPointerMove:ee,onPointerLeave:le,onKeyDown:W,onAnimationEnd:U},ce),ref:Tc(p,Ke),className:os({block:as,modifiers:j,className:e}),style:{...t,...C,margin:0,display:k==="closed"?"none":void 0,position:Wp,left:Se.x,top:Se.y},children:[r&&Q.jsx("li",{"aria-hidden":!0,...o,className:_e,style:{display:"block",position:Wp,left:ct.x,top:ct.y,...o.style},ref:on}),Q.jsx($p.Provider,{value:N,children:Q.jsx(Fp.Provider,{value:Nt,children:Q.jsx(jp.Provider,{value:at,children:En(F,j)})})})]});return d?Q.jsx(NE,{...d,isOpen:Qe,children:Me}):Me},qp=R.forwardRef(function({"aria-label":e,className:t,containerProps:r,initialMounted:o,unmountOnClose:s,transition:c,transitionTimeout:f,boundingBoxRef:d,boundingBoxPadding:p,reposition:v="auto",submenuOpenDelay:b=300,submenuCloseDelay:w=150,viewScroll:y="initial",portal:O,theming:S,onItemClick:A,...x},k){const G=R.useRef(null),oe=R.useRef({}),{anchorRef:q,state:ye,onClose:L}=x,F=R.useMemo(()=>({initialMounted:o,unmountOnClose:s,transition:c,transitionTimeout:f,boundingBoxRef:d,boundingBoxPadding:p,rootMenuRef:G,rootAnchorRef:q,scrollNodesRef:oe,reposition:v,viewScroll:y,submenuOpenDelay:b,submenuCloseDelay:w}),[o,s,c,f,q,d,p,v,y,b,w]),ae=R.useMemo(()=>({handleClick(ce,Se){ce.stopPropagation||En(A,ce);let he=ce.keepOpen;he===void 0&&(he=Se&&ce.key===zn.SPACE),he||En(L,{value:ce.value,key:ce.key,reason:$o.CLICK})},handleClose(ce){En(L,{key:ce,reason:$o.CLICK})}}),[A,L]);if(!ye)return null;const we=Q.jsx(Ic.Provider,{value:F,children:Q.jsx(Vp.Provider,{value:ae,children:Q.jsx(FE,{...x,ariaLabel:e||"Menu",externalRef:k,containerRef:G,containerProps:{className:t,containerRef:G,containerProps:r,theming:S,transition:c,onClose:L}})})});return O===!0&&typeof document<"u"?ho.createPortal(we,document.body):O?O.target?ho.createPortal(we,O.target):O.stablePosition?null:we:we}),xc=0,Nc=1,us=2,cs=3,fs=4,$E=5,Gp=6,VE=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Yp=n=>({_s:n,status:VE[n],isEnter:n<cs,isMounted:n!==Gp,isResolved:n===us||n>fs}),Dc=n=>n?Gp:$E,WE=(n,e)=>{switch(n){case Nc:case xc:return us;case fs:case cs:return Dc(e)}},UE=n=>typeof n=="object"?[n.enter,n.exit]:[n,n],Cc=setTimeout,zE=(n,e)=>Cc(()=>{isNaN(document.body.offsetTop)||n(e+1)},0),Jp=(n,e,t,r,o)=>{clearTimeout(r.current);const s=Yp(n);e(s),t.current=s,o&&o({current:s})},HE=({enter:n=!0,exit:e=!0,preEnter:t,preExit:r,timeout:o,initialEntered:s,mountOnEnter:c,unmountOnExit:f,onStateChange:d}={})=>{const[p,v]=R.useState(()=>Yp(s?us:Dc(c))),b=R.useRef(p),w=R.useRef(0),[y,O]=UE(o),S=R.useCallback(()=>{const A=WE(b.current._s,f);A&&Jp(A,v,b,w,d)},[d,f]);return[p,R.useCallback(A=>{const x=G=>{switch(Jp(G,v,b,w,d),G){case Nc:y>=0&&(w.current=Cc(S,y));break;case fs:O>=0&&(w.current=Cc(S,O));break;case xc:case cs:w.current=zE(x,G);break}},k=b.current.isEnter;typeof A!="boolean"&&(A=!k),A?!k&&x(n?t?xc:Nc:us):k&&x(e?r?cs:fs:Dc(f))},[S,d,n,e,t,r,y,O,f]),S]},Pc=({initialOpen:n,initialMounted:e,unmountOnClose:t,transition:r,transitionTimeout:o=500,onMenuChange:s}={})=>{const c=Fo(r,"open"),f=Fo(r,"close"),[{status:d},p,v]=HE({initialEntered:n,mountOnEnter:!e,unmountOnExit:t,timeout:o,enter:c,exit:f,onStateChange:R.useCallback(({current:{isEnter:b,isResolved:w}})=>{!s||b&&c&&w||!b&&f&&w||s({open:b})},[s,c,f])});return[{state:AE[d],endTransition:v},p]},qE=n=>{const[e,t]=Pc(n),[r,o]=R.useState(),s=(c,f)=>{o({position:c,alwaysUpdate:f}),t(!0)};return[{menuItemFocus:r,...e},t,s]},GE=(n,e)=>{if(process.env.NODE_ENV!=="production"&&typeof e!="function")throw new Error("[React-Menu] useClick/useHover requires a function in the second parameter.");const[t]=R.useState({});return{onMouseDown:()=>{t.v=n&&n!=="closed"},onClick:r=>t.v?t.v=!1:e(!0,r)}},YE=parseInt(R.version)<19,Kp=R.forwardRef(function({"aria-label":e,captureFocus:t,initialOpen:r,menuButton:o,instanceRef:s,onMenuChange:c,...f},d){const[p,v,b]=qE({...f,onMenuChange:c}),{state:w}=p,y=Rp(w),O=R.useRef(null),S=GE(w,(q,ye)=>b(ye.detail?void 0:Vo.FIRST)),A=R.useCallback(q=>{v(!1),q.key&&O.current.focus()},[v]),x=q=>{switch(q.key){case zn.UP:b(Vo.LAST);break;case zn.DOWN:b(Vo.FIRST);break;default:return}q.preventDefault()},k=En(o,{open:y});if(!k||!k.type)throw new Error("Menu requires a menuButton prop.");const G={...is({onKeyDown:x,...S},k.props),ref:Tc(YE?k.ref:k.props.ref,O)};_E(k.type)==="MenuButton"&&(G.isOpen=y);const oe=R.cloneElement(k,G);return R.useImperativeHandle(s,()=>({openMenu:b,closeMenu:()=>v(!1)})),Q.jsxs(R.Fragment,{children:[oe,Q.jsx(qp,{...f,...p,"aria-label":e||(typeof k.props.children=="string"?k.props.children:"Menu"),anchorRef:O,ref:d,onClose:A})]})}),JE=(n,e)=>{const t=R.memo(e),r=R.forwardRef((o,s)=>{const c=R.useRef(null);return Q.jsx(t,{...o,itemRef:c,externalRef:s,isHovering:R.useContext(jp)===c.current})});return r.displayName=`WithHovering(${n})`,r},KE=n=>{const[e,t]=R.useState(!1);return R.useEffect(()=>{!n&&t(!1)},[n]),[e,()=>!e&&t(!0),()=>t(!1)]},XE=(n,e,t)=>{ss(()=>{if(process.env.NODE_ENV!=="production"&&!t)throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${e.current.outerHTML}`);if(n)return;const r=e.current;return t(r,!0),()=>{t(r)}},[n,e,t])},ZE=(n,e,t,r)=>{const[o,s,c]=KE(t),{submenuCloseDelay:f}=R.useContext(Ic),{isParentOpen:d,submenuCtx:p,dispatch:v,updateItems:b}=R.useContext(Fp),w=()=>{!t&&!r&&v(mt.SET,n.current)},y=()=>{!r&&v(mt.UNSET,n.current)},O=x=>{t&&!x.currentTarget.contains(x.relatedTarget)&&y()},S=x=>{r||(x.stopPropagation(),s(),p.on(f,w,w))},A=(x,k)=>{c(),p.off(),!k&&y()};return XE(r,n,b),R.useEffect(()=>{t&&d&&e.current&&e.current.focus()},[e,t,d]),{mouseOver:o,setHover:w,onBlur:O,onPointerMove:S,onPointerLeave:A}},ls=JE("MenuItem",function({className:e,value:t,href:r,type:o,checked:s,disabled:c,children:f,onClick:d,isHovering:p,itemRef:v,externalRef:b,...w}){const y=!!c,{mouseOver:O,setHover:S,...A}=ZE(v,v,p,y),x=R.useContext(Vp),k=R.useContext(IE),G=o==="radio",oe=o==="checkbox",q=!!r&&!y&&!G&&!oe,ye=G?k.value===t:oe?!!s:!1,L=Se=>{if(y){Se.stopPropagation(),Se.preventDefault();return}const he={value:t,syntheticEvent:Se};Se.key!==void 0&&(he.key=Se.key),oe&&(he.checked=!ye),G&&(he.name=k.name),En(d,he),G&&En(k.onRadioChange,he),x.handleClick(he,oe||G)},F=Se=>{if(p)switch(Se.key){case zn.ENTER:Se.preventDefault();case zn.SPACE:q?v.current.click():L(Se)}},ae=R.useMemo(()=>({type:o,disabled:y,hover:O||p,checked:ye,anchor:q}),[o,y,O,p,ye,q]),we=is({...A,onPointerDown:S,onKeyDown:F,onClick:L},w),ce={role:G?"menuitemradio":oe?"menuitemcheckbox":xE,"aria-checked":G||oe?ye:void 0,...kp(y,p),...we,ref:Tc(b,v),className:os({block:as,element:EE,modifiers:ae,className:e}),children:R.useMemo(()=>En(f,ae),[f,ae])};return q?Q.jsx("li",{role:TE,children:Q.jsx("a",{href:r,...ce})}):Q.jsx("li",{...ce})});if(!R.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Xw)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function QE(n){n()}function e1(n){n||(n=QE,process.env.NODE_ENV!=="production"&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),$w({reactionScheduler:n})}function t1(n){return $h(n)}var n1=1e4,r1=1e4,i1=(function(){function n(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=n1),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var o=Date.now();t.registrations.forEach(function(s,c){o-s.registeredAt>=r&&(t.finalize(s.value),t.registrations.delete(c))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(n.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(n.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(n.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,r1))}}),n})(),o1=typeof FinalizationRegistry<"u"?FinalizationRegistry:i1,Mc=new o1(function(n){var e;(e=n.reaction)===null||e===void 0||e.dispose(),n.reaction=null}),ds={exports:{}},Rc={};var Xp;function a1(){if(Xp)return Rc;Xp=1;var n=R;function e(b,w){return b===w&&(b!==0||1/b===1/w)||b!==b&&w!==w}var t=typeof Object.is=="function"?Object.is:e,r=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function f(b,w){var y=w(),O=r({inst:{value:y,getSnapshot:w}}),S=O[0].inst,A=O[1];return s(function(){S.value=y,S.getSnapshot=w,d(S)&&A({inst:S})},[b,y,w]),o(function(){return d(S)&&A({inst:S}),b(function(){d(S)&&A({inst:S})})},[b]),c(y),y}function d(b){var w=b.getSnapshot;b=b.value;try{var y=w();return!t(b,y)}catch{return!0}}function p(b,w){return w()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return Rc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,Rc}var Lc={};var Zp;function s1(){return Zp||(Zp=1,process.env.NODE_ENV!=="production"&&(function(){function n(y,O){return y===O&&(y!==0||1/y===1/O)||y!==y&&O!==O}function e(y,O){v||o.startTransition===void 0||(v=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var S=O();if(!b){var A=O();s(S,A)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),b=!0)}A=c({inst:{value:S,getSnapshot:O}});var x=A[0].inst,k=A[1];return d(function(){x.value=S,x.getSnapshot=O,t(x)&&k({inst:x})},[y,S,O]),f(function(){return t(x)&&k({inst:x}),y(function(){t(x)&&k({inst:x})})},[y]),p(S),S}function t(y){var O=y.getSnapshot;y=y.value;try{var S=O();return!s(y,S)}catch{return!0}}function r(y,O){return O()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=R,s=typeof Object.is=="function"?Object.is:n,c=o.useState,f=o.useEffect,d=o.useLayoutEffect,p=o.useDebugValue,v=!1,b=!1,w=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Lc.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Lc}var Qp;function u1(){return Qp||(Qp=1,process.env.NODE_ENV==="production"?ds.exports=a1():ds.exports=s1()),ds.exports}var c1=u1();function ev(n){n.reaction=new dr("observer".concat(n.name),function(){var e;n.stateVersion=Symbol(),(e=n.onStoreChange)===null||e===void 0||e.call(n)})}function f1(n,e){e===void 0&&(e="observed");var t=R.useRef(null);if(!t.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:e,subscribe:function(f){return Mc.unregister(r),r.onStoreChange=f,r.reaction||(ev(r),r.stateVersion=Symbol()),function(){var d;r.onStoreChange=null,(d=r.reaction)===null||d===void 0||d.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};t.current=r}var o=t.current;o.reaction||(ev(o),Mc.register(t,o,o)),R.useDebugValue(o.reaction,t1),c1.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot);var s,c;if(o.reaction.track(function(){try{s=n()}catch(f){c=f}}),c)throw c;return s}var kc,Bc,l1=!0,tv=!0,nv=typeof Symbol=="function"&&Symbol.for,d1=(Bc=(kc=Object.getOwnPropertyDescriptor(function(){},"name"))===null||kc===void 0?void 0:kc.configurable)!==null&&Bc!==void 0?Bc:!1,rv=nv?Symbol.for("react.forward_ref"):typeof R.forwardRef=="function"&&R.forwardRef(function(n){return null}).$$typeof,iv=nv?Symbol.for("react.memo"):typeof R.memo=="function"&&R.memo(function(n){return null}).$$typeof;function vr(n,e){var t;if(process.env.NODE_ENV,iv&&n.$$typeof===iv)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var r=(t=void 0)!==null&&t!==void 0?t:!1,o=n,s=n.displayName||n.name;if(rv&&n.$$typeof===rv&&(r=!0,o=n.render,typeof o!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var c=function(f,d){return f1(function(){return o(f,d)},s)};return c.displayName=n.displayName,d1&&Object.defineProperty(c,"name",{value:n.name,writable:!0,configurable:!0}),n.contextTypes&&(c.contextTypes=n.contextTypes,process.env.NODE_ENV!=="production"&&tv&&(tv=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),r&&(c=R.forwardRef(c)),c=R.memo(c),p1(n,c),process.env.NODE_ENV!=="production"&&Object.defineProperty(c,"contextTypes",{set:function(){var f,d;throw new Error("[mobx-react-lite] `".concat(this.displayName||((f=this.type)===null||f===void 0?void 0:f.displayName)||((d=this.type)===null||d===void 0?void 0:d.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),c}var h1={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function p1(n,e){Object.keys(n).forEach(function(t){h1[t]||Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}process.env.NODE_ENV;var jc;e1(ho.unstable_batchedUpdates),jc=Mc.finalizeAllImmediately;function Fc(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function v1(n){if(Array.isArray(n))return n}function g1(n){if(Array.isArray(n))return Fc(n)}function m1(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function b1(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,av(r.key),r)}}function y1(n,e,t){return e&&b1(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function hs(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=$c(n))||e){t&&(n=t);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(d){throw d},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
97
97
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,c=!0,f=!1;return{s:function(){t=t.call(n)},n:function(){var d=t.next();return c=d.done,d},e:function(d){f=!0,s=d},f:function(){try{c||t.return==null||t.return()}finally{if(f)throw s}}}}function Te(n,e,t){return(e=av(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function _1(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function w1(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,o,s,c,f=[],d=!0,p=!1;try{if(s=(t=t.call(n)).next,e===0){if(Object(t)!==t)return;d=!1}else for(;!(d=(r=s.call(t)).done)&&(f.push(r.value),f.length!==e);d=!0);}catch(v){p=!0,o=v}finally{try{if(!d&&t.return!=null&&(c=t.return(),Object(c)!==c))return}finally{if(p)throw o}}return f}}function S1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
98
98
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
99
99
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ov(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function J(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ov(Object(t),!0).forEach(function(r){Te(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ov(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function ps(n,e){return v1(n)||w1(n,e)||$c(n,e)||S1()}function Hn(n){return g1(n)||_1(n)||$c(n)||O1()}function E1(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function av(n){var e=E1(n,"string");return typeof e=="symbol"?e:e+""}function vs(n){"@babel/helpers - typeof";return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vs(n)}function $c(n,e){if(n){if(typeof n=="string")return Fc(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Fc(n,e):void 0}}var sv=function(){},Vc={},uv={},cv=null,fv={mark:sv,measure:sv};try{typeof window<"u"&&(Vc=window),typeof document<"u"&&(uv=document),typeof MutationObserver<"u"&&(cv=MutationObserver),typeof performance<"u"&&(fv=performance)}catch{}var I1=Vc.navigator||{},lv=I1.userAgent,dv=lv===void 0?"":lv,Vr=Vc,Ze=uv,hv=cv,gs=fv;Vr.document;var gr=!!Ze.documentElement&&!!Ze.head&&typeof Ze.addEventListener=="function"&&typeof Ze.createElement=="function",pv=~dv.indexOf("MSIE")||~dv.indexOf("Trident/"),Wc,A1=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,T1=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,vv={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},x1={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},gv=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],Tt="classic",Wo="duotone",mv="sharp",bv="sharp-duotone",yv="chisel",_v="etch",wv="jelly",Sv="jelly-duo",Ov="jelly-fill",Ev="notdog",Iv="notdog-duo",Av="slab",Tv="slab-press",xv="thumbprint",Nv="utility",Dv="utility-duo",Cv="utility-fill",Pv="whiteboard",N1="Classic",D1="Duotone",C1="Sharp",P1="Sharp Duotone",M1="Chisel",R1="Etch",L1="Jelly",k1="Jelly Duo",B1="Jelly Fill",j1="Notdog",F1="Notdog Duo",$1="Slab",V1="Slab Press",W1="Thumbprint",U1="Utility",z1="Utility Duo",H1="Utility Fill",q1="Whiteboard",Mv=[Tt,Wo,mv,bv,yv,_v,wv,Sv,Ov,Ev,Iv,Av,Tv,xv,Nv,Dv,Cv,Pv];Wc={},Te(Te(Te(Te(Te(Te(Te(Te(Te(Te(Wc,Tt,N1),Wo,D1),mv,C1),bv,P1),yv,M1),_v,R1),wv,L1),Sv,k1),Ov,B1),Ev,j1),Te(Te(Te(Te(Te(Te(Te(Te(Wc,Iv,F1),Av,$1),Tv,V1),xv,W1),Nv,U1),Dv,z1),Cv,H1),Pv,q1);var G1={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}},Y1={"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}},J1=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),K1={chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}},Rv=["fak","fa-kit","fakd","fa-kit-duotone"],Lv={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},X1=["kit"],Z1="kit",Q1="kit-duotone",eI="Kit",tI="Kit Duotone";Te(Te({},Z1,eI),Q1,tI);var nI={kit:{"fa-kit":"fak"}},rI={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},iI={kit:{fak:"fa-kit"}},kv={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},Uc,ms={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},oI=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],aI="classic",sI="duotone",uI="sharp",cI="sharp-duotone",fI="chisel",lI="etch",dI="jelly",hI="jelly-duo",pI="jelly-fill",vI="notdog",gI="notdog-duo",mI="slab",bI="slab-press",yI="thumbprint",_I="utility",wI="utility-duo",SI="utility-fill",OI="whiteboard",EI="Classic",II="Duotone",AI="Sharp",TI="Sharp Duotone",xI="Chisel",NI="Etch",DI="Jelly",CI="Jelly Duo",PI="Jelly Fill",MI="Notdog",RI="Notdog Duo",LI="Slab",kI="Slab Press",BI="Thumbprint",jI="Utility",FI="Utility Duo",$I="Utility Fill",VI="Whiteboard";Uc={},Te(Te(Te(Te(Te(Te(Te(Te(Te(Te(Uc,aI,EI),sI,II),uI,AI),cI,TI),fI,xI),lI,NI),dI,DI),hI,CI),pI,PI),vI,MI),Te(Te(Te(Te(Te(Te(Te(Te(Uc,gI,RI),mI,LI),bI,kI),yI,BI),_I,jI),wI,FI),SI,$I),OI,VI);var WI="kit",UI="kit-duotone",zI="Kit",HI="Kit Duotone";Te(Te({},WI,zI),UI,HI);var qI={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}},GI={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]},zc={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},YI=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],Bv=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(oI,YI),JI=["solid","regular","light","thin","duotone","brands","semibold"],jv=[1,2,3,4,5,6,7,8,9,10],KI=jv.concat([11,12,13,14,15,16,17,18,19,20]),XI=["aw","fw","pull-left","pull-right"],ZI=[].concat(Hn(Object.keys(GI)),JI,XI,["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",ms.GROUP,ms.SWAP_OPACITY,ms.PRIMARY,ms.SECONDARY]).concat(jv.map(function(n){return"".concat(n,"x")})).concat(KI.map(function(n){return"w-".concat(n)})),QI={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},mr="___FONT_AWESOME___",Hc=16,Fv="fa",$v="svg-inline--fa",vi="data-fa-i2svg",qc="data-fa-pseudo-element",eA="data-fa-pseudo-element-pending",Gc="data-prefix",Yc="data-icon",Vv="fontawesome-i2svg",tA="async",nA=["HTML","HEAD","STYLE","SCRIPT"],Wv=["::before","::after",":before",":after"],Uv=(function(){try{return process.env.NODE_ENV==="production"}catch{return!1}})();function Uo(n){return new Proxy(n,{get:function(t,r){return r in t?t[r]:t[Tt]}})}var zv=J({},vv);zv[Tt]=J(J(J(J({},{"fa-duotone":"duotone"}),vv[Tt]),Lv.kit),Lv["kit-duotone"]);var rA=Uo(zv),Jc=J({},K1);Jc[Tt]=J(J(J(J({},{duotone:"fad"}),Jc[Tt]),kv.kit),kv["kit-duotone"]);var Hv=Uo(Jc),Kc=J({},zc);Kc[Tt]=J(J({},Kc[Tt]),iI.kit);var Xc=Uo(Kc),Zc=J({},qI);Zc[Tt]=J(J({},Zc[Tt]),nI.kit),Uo(Zc);var iA=A1,qv="fa-layers-text",oA=T1,aA=J({},G1);Uo(aA);var sA=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Qc=x1,uA=[].concat(Hn(X1),Hn(ZI)),zo=Vr.FontAwesomeConfig||{};function cA(n){var e=Ze.querySelector("script["+n+"]");if(e)return e.getAttribute(n)}function fA(n){return n===""?!0:n==="false"?!1:n==="true"?!0:n}if(Ze&&typeof Ze.querySelector=="function"){var lA=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];lA.forEach(function(n){var e=ps(n,2),t=e[0],r=e[1],o=fA(cA(t));o!=null&&(zo[r]=o)})}var Gv={styleDefault:"solid",familyDefault:Tt,cssPrefix:Fv,replacementClass:$v,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};zo.familyPrefix&&(zo.cssPrefix=zo.familyPrefix);var Wi=J(J({},Gv),zo);Wi.autoReplaceSvg||(Wi.observeMutations=!1);var de={};Object.keys(Gv).forEach(function(n){Object.defineProperty(de,n,{enumerable:!0,set:function(t){Wi[n]=t,Ho.forEach(function(r){return r(de)})},get:function(){return Wi[n]}})}),Object.defineProperty(de,"familyPrefix",{enumerable:!0,set:function(e){Wi.cssPrefix=e,Ho.forEach(function(t){return t(de)})},get:function(){return Wi.cssPrefix}}),Vr.FontAwesomeConfig=de;var Ho=[];function dA(n){return Ho.push(n),function(){Ho.splice(Ho.indexOf(n),1)}}var Ui=Hc,rr={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function hA(n){if(!(!n||!gr)){var e=Ze.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=n;for(var t=Ze.head.childNodes,r=null,o=t.length-1;o>-1;o--){var s=t[o],c=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(c)>-1&&(r=s)}return Ze.head.insertBefore(e,r),n}}var pA="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Yv(){for(var n=12,e="";n-- >0;)e+=pA[Math.random()*62|0];return e}function zi(n){for(var e=[],t=(n||[]).length>>>0;t--;)e[t]=n[t];return e}function ef(n){return n.classList?zi(n.classList):(n.getAttribute("class")||"").split(" ").filter(function(e){return e})}function Jv(n){return"".concat(n).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function vA(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,'="').concat(Jv(n[t]),'" ')},"").trim()}function bs(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,": ").concat(n[t].trim(),";")},"")}function tf(n){return n.size!==rr.size||n.x!==rr.x||n.y!==rr.y||n.rotate!==rr.rotate||n.flipX||n.flipY}function gA(n){var e=n.transform,t=n.containerWidth,r=n.iconWidth,o={transform:"translate(".concat(t/2," 256)")},s="translate(".concat(e.x*32,", ").concat(e.y*32,") "),c="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),f="rotate(".concat(e.rotate," 0 0)"),d={transform:"".concat(s," ").concat(c," ").concat(f)},p={transform:"translate(".concat(r/2*-1," -256)")};return{outer:o,inner:d,path:p}}function mA(n){var e=n.transform,t=n.width,r=t===void 0?Hc:t,o=n.height,s=o===void 0?Hc:o,c="";return pv?c+="translate(".concat(e.x/Ui-r/2,"em, ").concat(e.y/Ui-s/2,"em) "):c+="translate(calc(-50% + ".concat(e.x/Ui,"em), calc(-50% + ").concat(e.y/Ui,"em)) "),c+="scale(".concat(e.size/Ui*(e.flipX?-1:1),", ").concat(e.size/Ui*(e.flipY?-1:1),") "),c+="rotate(".concat(e.rotate,"deg) "),c}var bA=`:root, :host {
|
|
@@ -649,5 +649,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
649
649
|
}`;function Kv(){var n=Fv,e=$v,t=de.cssPrefix,r=de.replacementClass,o=bA;if(t!==n||r!==e){var s=new RegExp("\\.".concat(n,"\\-"),"g"),c=new RegExp("\\--".concat(n,"\\-"),"g"),f=new RegExp("\\.".concat(e),"g");o=o.replace(s,".".concat(t,"-")).replace(c,"--".concat(t,"-")).replace(f,".".concat(r))}return o}var Xv=!1;function nf(){de.autoAddCss&&!Xv&&(hA(Kv()),Xv=!0)}var yA={mixout:function(){return{dom:{css:Kv,insertCss:nf}}},hooks:function(){return{beforeDOMElementCreation:function(){nf()},beforeI2svg:function(){nf()}}}},br=Vr||{};br[mr]||(br[mr]={}),br[mr].styles||(br[mr].styles={}),br[mr].hooks||(br[mr].hooks={}),br[mr].shims||(br[mr].shims=[]);var qn=br[mr],Zv=[],Qv=function(){Ze.removeEventListener("DOMContentLoaded",Qv),ys=1,Zv.map(function(e){return e()})},ys=!1;gr&&(ys=(Ze.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Ze.readyState),ys||Ze.addEventListener("DOMContentLoaded",Qv));function _A(n){gr&&(ys?setTimeout(n,0):Zv.push(n))}function qo(n){var e=n.tag,t=n.attributes,r=t===void 0?{}:t,o=n.children,s=o===void 0?[]:o;return typeof n=="string"?Jv(n):"<".concat(e," ").concat(vA(r),">").concat(s.map(qo).join(""),"</").concat(e,">")}function eg(n,e,t){if(n&&n[e]&&n[e][t])return{prefix:e,iconName:t,icon:n[e][t]}}var rf=function(e,t,r,o){var s=Object.keys(e),c=s.length,f=t,d,p,v;for(r===void 0?(d=1,v=e[s[0]]):(d=0,v=r);d<c;d++)p=s[d],v=f(v,e[p],p,e);return v};function tg(n){return Hn(n).length!==1?null:n.codePointAt(0).toString(16)}function ng(n){return Object.keys(n).reduce(function(e,t){var r=n[t],o=!!r.icon;return o?e[r.iconName]=r.icon:e[t]=r,e},{})}function of(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.skipHooks,o=r===void 0?!1:r,s=ng(e);typeof qn.hooks.addPack=="function"&&!o?qn.hooks.addPack(n,ng(e)):qn.styles[n]=J(J({},qn.styles[n]||{}),s),n==="fas"&&of("fa",e)}var Go=qn.styles,wA=qn.shims,rg=Object.keys(Xc),SA=rg.reduce(function(n,e){return n[e]=Object.keys(Xc[e]),n},{}),af=null,ig={},og={},ag={},sg={},ug={};function OA(n){return~uA.indexOf(n)}function EA(n,e){var t=e.split("-"),r=t[0],o=t.slice(1).join("-");return r===n&&o!==""&&!OA(o)?o:null}var cg=function(){var e=function(s){return rf(Go,function(c,f,d){return c[d]=rf(f,s,{}),c},{})};ig=e(function(o,s,c){if(s[3]&&(o[s[3]]=c),s[2]){var f=s[2].filter(function(d){return typeof d=="number"});f.forEach(function(d){o[d.toString(16)]=c})}return o}),og=e(function(o,s,c){if(o[c]=c,s[2]){var f=s[2].filter(function(d){return typeof d=="string"});f.forEach(function(d){o[d]=c})}return o}),ug=e(function(o,s,c){var f=s[2];return o[c]=c,f.forEach(function(d){o[d]=c}),o});var t="far"in Go||de.autoFetchSvg,r=rf(wA,function(o,s){var c=s[0],f=s[1],d=s[2];return f==="far"&&!t&&(f="fas"),typeof c=="string"&&(o.names[c]={prefix:f,iconName:d}),typeof c=="number"&&(o.unicodes[c.toString(16)]={prefix:f,iconName:d}),o},{names:{},unicodes:{}});ag=r.names,sg=r.unicodes,af=_s(de.styleDefault,{family:de.familyDefault})};dA(function(n){af=_s(n.styleDefault,{family:de.familyDefault})}),cg();function sf(n,e){return(ig[n]||{})[e]}function IA(n,e){return(og[n]||{})[e]}function gi(n,e){return(ug[n]||{})[e]}function fg(n){return ag[n]||{prefix:null,iconName:null}}function AA(n){var e=sg[n],t=sf("fas",n);return e||(t?{prefix:"fas",iconName:t}:null)||{prefix:null,iconName:null}}function Wr(){return af}var lg=function(){return{prefix:null,iconName:null,rest:[]}};function TA(n){var e=Tt,t=rg.reduce(function(r,o){return r[o]="".concat(de.cssPrefix,"-").concat(o),r},{});return Mv.forEach(function(r){(n.includes(t[r])||n.some(function(o){return SA[r].includes(o)}))&&(e=r)}),e}function _s(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.family,r=t===void 0?Tt:t,o=rA[r][n];if(r===Wo&&!n)return"fad";var s=Hv[r][n]||Hv[r][o],c=n in qn.styles?n:null,f=s||c||null;return f}function xA(n){var e=[],t=null;return n.forEach(function(r){var o=EA(de.cssPrefix,r);o?t=o:r&&e.push(r)}),{iconName:t,rest:e}}function dg(n){return n.sort().filter(function(e,t,r){return r.indexOf(e)===t})}var hg=Bv.concat(Rv);function ws(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.skipLookups,r=t===void 0?!1:t,o=null,s=dg(n.filter(function(y){return hg.includes(y)})),c=dg(n.filter(function(y){return!hg.includes(y)})),f=s.filter(function(y){return o=y,!gv.includes(y)}),d=ps(f,1),p=d[0],v=p===void 0?null:p,b=TA(s),w=J(J({},xA(c)),{},{prefix:_s(v,{family:b})});return J(J(J({},w),PA({values:n,family:b,styles:Go,config:de,canonical:w,givenPrefix:o})),NA(r,o,w))}function NA(n,e,t){var r=t.prefix,o=t.iconName;if(n||!r||!o)return{prefix:r,iconName:o};var s=e==="fa"?fg(o):{},c=gi(r,o);return o=s.iconName||c||o,r=s.prefix||r,r==="far"&&!Go.far&&Go.fas&&!de.autoFetchSvg&&(r="fas"),{prefix:r,iconName:o}}var DA=Mv.filter(function(n){return n!==Tt||n!==Wo}),CA=Object.keys(zc).filter(function(n){return n!==Tt}).map(function(n){return Object.keys(zc[n])}).flat();function PA(n){var e=n.values,t=n.family,r=n.canonical,o=n.givenPrefix,s=o===void 0?"":o,c=n.styles,f=c===void 0?{}:c,d=n.config,p=d===void 0?{}:d,v=t===Wo,b=e.includes("fa-duotone")||e.includes("fad"),w=p.familyDefault==="duotone",y=r.prefix==="fad"||r.prefix==="fa-duotone";if(!v&&(b||w||y)&&(r.prefix="fad"),(e.includes("fa-brands")||e.includes("fab"))&&(r.prefix="fab"),!r.prefix&&DA.includes(t)){var O=Object.keys(f).find(function(A){return CA.includes(A)});if(O||p.autoFetchSvg){var S=J1.get(t).defaultShortPrefixId;r.prefix=S,r.iconName=gi(r.prefix,r.iconName)||r.iconName}}return(r.prefix==="fa"||s==="fa")&&(r.prefix=Wr()||"fas"),r}var MA=(function(){function n(){m1(this,n),this.definitions={}}return y1(n,[{key:"add",value:function(){for(var t=this,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];var c=o.reduce(this._pullDefinitions,{});Object.keys(c).forEach(function(f){t.definitions[f]=J(J({},t.definitions[f]||{}),c[f]),of(f,c[f]);var d=Xc[Tt][f];d&&of(d,c[f]),cg()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(t,r){var o=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(o).map(function(s){var c=o[s],f=c.prefix,d=c.iconName,p=c.icon,v=p[2];t[f]||(t[f]={}),v.length>0&&v.forEach(function(b){typeof b=="string"&&(t[f][b]=p)}),t[f][d]=p}),t}}])})(),pg=[],Hi={},qi={},RA=Object.keys(qi);function LA(n,e){var t=e.mixoutsTo;return pg=n,Hi={},Object.keys(qi).forEach(function(r){RA.indexOf(r)===-1&&delete qi[r]}),pg.forEach(function(r){var o=r.mixout?r.mixout():{};if(Object.keys(o).forEach(function(c){typeof o[c]=="function"&&(t[c]=o[c]),vs(o[c])==="object"&&Object.keys(o[c]).forEach(function(f){t[c]||(t[c]={}),t[c][f]=o[c][f]})}),r.hooks){var s=r.hooks();Object.keys(s).forEach(function(c){Hi[c]||(Hi[c]=[]),Hi[c].push(s[c])})}r.provides&&r.provides(qi)}),t}function uf(n,e){for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];var s=Hi[n]||[];return s.forEach(function(c){e=c.apply(null,[e].concat(r))}),e}function mi(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];var o=Hi[n]||[];o.forEach(function(s){s.apply(null,t)})}function Ur(){var n=arguments[0],e=Array.prototype.slice.call(arguments,1);return qi[n]?qi[n].apply(null,e):void 0}function cf(n){n.prefix==="fa"&&(n.prefix="fas");var e=n.iconName,t=n.prefix||Wr();if(e)return e=gi(t,e)||e,eg(vg.definitions,t,e)||eg(qn.styles,t,e)}var vg=new MA,kA=function(){de.autoReplaceSvg=!1,de.observeMutations=!1,mi("noAuto")},BA={i2svg:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return gr?(mi("beforeI2svg",e),Ur("pseudoElements2svg",e),Ur("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.autoReplaceSvgRoot;de.autoReplaceSvg===!1&&(de.autoReplaceSvg=!0),de.observeMutations=!0,_A(function(){FA({autoReplaceSvgRoot:t}),mi("watch",e)})}},jA={icon:function(e){if(e===null)return null;if(vs(e)==="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:gi(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){var t=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],r=_s(e[0]);return{prefix:r,iconName:gi(r,t)||t}}if(typeof e=="string"&&(e.indexOf("".concat(de.cssPrefix,"-"))>-1||e.match(iA))){var o=ws(e.split(" "),{skipLookups:!0});return{prefix:o.prefix||Wr(),iconName:gi(o.prefix,o.iconName)||o.iconName}}if(typeof e=="string"){var s=Wr();return{prefix:s,iconName:gi(s,e)||e}}}},tn={noAuto:kA,config:de,dom:BA,parse:jA,library:vg,findIconDefinition:cf,toHtml:qo},FA=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.autoReplaceSvgRoot,r=t===void 0?Ze:t;(Object.keys(qn.styles).length>0||de.autoFetchSvg)&&gr&&de.autoReplaceSvg&&tn.dom.i2svg({node:r})};function Ss(n,e){return Object.defineProperty(n,"abstract",{get:e}),Object.defineProperty(n,"html",{get:function(){return n.abstract.map(function(r){return qo(r)})}}),Object.defineProperty(n,"node",{get:function(){if(gr){var r=Ze.createElement("div");return r.innerHTML=n.html,r.children}}}),n}function $A(n){var e=n.children,t=n.main,r=n.mask,o=n.attributes,s=n.styles,c=n.transform;if(tf(c)&&t.found&&!r.found){var f=t.width,d=t.height,p={x:f/d/2,y:.5};o.style=bs(J(J({},s),{},{"transform-origin":"".concat(p.x+c.x/16,"em ").concat(p.y+c.y/16,"em")}))}return[{tag:"svg",attributes:o,children:e}]}function VA(n){var e=n.prefix,t=n.iconName,r=n.children,o=n.attributes,s=n.symbol,c=s===!0?"".concat(e,"-").concat(de.cssPrefix,"-").concat(t):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:J(J({},o),{},{id:c}),children:r}]}]}function WA(n){var e=["aria-label","aria-labelledby","title","role"];return e.some(function(t){return t in n})}function ff(n){var e=n.icons,t=e.main,r=e.mask,o=n.prefix,s=n.iconName,c=n.transform,f=n.symbol,d=n.maskId,p=n.extra,v=n.watchable,b=v===void 0?!1:v,w=r.found?r:t,y=w.width,O=w.height,S=[de.replacementClass,s?"".concat(de.cssPrefix,"-").concat(s):""].filter(function(q){return p.classes.indexOf(q)===-1}).filter(function(q){return q!==""||!!q}).concat(p.classes).join(" "),A={children:[],attributes:J(J({},p.attributes),{},{"data-prefix":o,"data-icon":s,class:S,role:p.attributes.role||"img",viewBox:"0 0 ".concat(y," ").concat(O)})};!WA(p.attributes)&&!p.attributes["aria-hidden"]&&(A.attributes["aria-hidden"]="true"),b&&(A.attributes[vi]="");var x=J(J({},A),{},{prefix:o,iconName:s,main:t,mask:r,maskId:d,transform:c,symbol:f,styles:J({},p.styles)}),k=r.found&&t.found?Ur("generateAbstractMask",x)||{children:[],attributes:{}}:Ur("generateAbstractIcon",x)||{children:[],attributes:{}},G=k.children,oe=k.attributes;return x.children=G,x.attributes=oe,f?VA(x):$A(x)}function gg(n){var e=n.content,t=n.width,r=n.height,o=n.transform,s=n.extra,c=n.watchable,f=c===void 0?!1:c,d=J(J({},s.attributes),{},{class:s.classes.join(" ")});f&&(d[vi]="");var p=J({},s.styles);tf(o)&&(p.transform=mA({transform:o,width:t,height:r}),p["-webkit-transform"]=p.transform);var v=bs(p);v.length>0&&(d.style=v);var b=[];return b.push({tag:"span",attributes:d,children:[e]}),b}function UA(n){var e=n.content,t=n.extra,r=J(J({},t.attributes),{},{class:t.classes.join(" ")}),o=bs(t.styles);o.length>0&&(r.style=o);var s=[];return s.push({tag:"span",attributes:r,children:[e]}),s}var lf=qn.styles;function df(n){var e=n[0],t=n[1],r=n.slice(4),o=ps(r,1),s=o[0],c=null;return Array.isArray(s)?c={tag:"g",attributes:{class:"".concat(de.cssPrefix,"-").concat(Qc.GROUP)},children:[{tag:"path",attributes:{class:"".concat(de.cssPrefix,"-").concat(Qc.SECONDARY),fill:"currentColor",d:s[0]}},{tag:"path",attributes:{class:"".concat(de.cssPrefix,"-").concat(Qc.PRIMARY),fill:"currentColor",d:s[1]}}]}:c={tag:"path",attributes:{fill:"currentColor",d:s}},{found:!0,width:e,height:t,icon:c}}var zA={found:!1,width:512,height:512};function HA(n,e){!Uv&&!de.showMissingIcons&&n&&console.error('Icon with name "'.concat(n,'" and prefix "').concat(e,'" is missing.'))}function hf(n,e){var t=e;return e==="fa"&&de.styleDefault!==null&&(e=Wr()),new Promise(function(r,o){if(t==="fa"){var s=fg(n)||{};n=s.iconName||n,e=s.prefix||e}if(n&&e&&lf[e]&&lf[e][n]){var c=lf[e][n];return r(df(c))}HA(n,e),r(J(J({},zA),{},{icon:de.showMissingIcons&&n?Ur("missingIconAbstract")||{}:{}}))})}var mg=function(){},pf=de.measurePerformance&&gs&&gs.mark&&gs.measure?gs:{mark:mg,measure:mg},Yo='FA "7.1.0"',qA=function(e){return pf.mark("".concat(Yo," ").concat(e," begins")),function(){return bg(e)}},bg=function(e){pf.mark("".concat(Yo," ").concat(e," ends")),pf.measure("".concat(Yo," ").concat(e),"".concat(Yo," ").concat(e," begins"),"".concat(Yo," ").concat(e," ends"))},vf={begin:qA,end:bg},Os=function(){};function yg(n){var e=n.getAttribute?n.getAttribute(vi):null;return typeof e=="string"}function GA(n){var e=n.getAttribute?n.getAttribute(Gc):null,t=n.getAttribute?n.getAttribute(Yc):null;return e&&t}function YA(n){return n&&n.classList&&n.classList.contains&&n.classList.contains(de.replacementClass)}function JA(){if(de.autoReplaceSvg===!0)return Es.replace;var n=Es[de.autoReplaceSvg];return n||Es.replace}function KA(n){return Ze.createElementNS("http://www.w3.org/2000/svg",n)}function XA(n){return Ze.createElement(n)}function _g(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.ceFn,r=t===void 0?n.tag==="svg"?KA:XA:t;if(typeof n=="string")return Ze.createTextNode(n);var o=r(n.tag);Object.keys(n.attributes||[]).forEach(function(c){o.setAttribute(c,n.attributes[c])});var s=n.children||[];return s.forEach(function(c){o.appendChild(_g(c,{ceFn:r}))}),o}function ZA(n){var e=" ".concat(n.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var Es={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(o){t.parentNode.insertBefore(_g(o),t)}),t.getAttribute(vi)===null&&de.keepOriginalSource){var r=Ze.createComment(ZA(t));t.parentNode.replaceChild(r,t)}else t.remove()},nest:function(e){var t=e[0],r=e[1];if(~ef(t).indexOf(de.replacementClass))return Es.replace(e);var o=new RegExp("".concat(de.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var s=r[0].attributes.class.split(" ").reduce(function(f,d){return d===de.replacementClass||d.match(o)?f.toSvg.push(d):f.toNode.push(d),f},{toNode:[],toSvg:[]});r[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?t.removeAttribute("class"):t.setAttribute("class",s.toNode.join(" "))}var c=r.map(function(f){return qo(f)}).join(`
|
|
650
650
|
`);t.setAttribute(vi,""),t.innerHTML=c}};function wg(n){n()}function Sg(n,e){var t=typeof e=="function"?e:Os;if(n.length===0)t();else{var r=wg;de.mutateApproach===tA&&(r=Vr.requestAnimationFrame||wg),r(function(){var o=JA(),s=vf.begin("mutate");n.map(o),s(),t()})}}var gf=!1;function Og(){gf=!0}function mf(){gf=!1}var Is=null;function Eg(n){if(hv&&de.observeMutations){var e=n.treeCallback,t=e===void 0?Os:e,r=n.nodeCallback,o=r===void 0?Os:r,s=n.pseudoElementsCallback,c=s===void 0?Os:s,f=n.observeMutationsRoot,d=f===void 0?Ze:f;Is=new hv(function(p){if(!gf){var v=Wr();zi(p).forEach(function(b){if(b.type==="childList"&&b.addedNodes.length>0&&!yg(b.addedNodes[0])&&(de.searchPseudoElements&&c(b.target),t(b.target)),b.type==="attributes"&&b.target.parentNode&&de.searchPseudoElements&&c([b.target],!0),b.type==="attributes"&&yg(b.target)&&~sA.indexOf(b.attributeName))if(b.attributeName==="class"&&GA(b.target)){var w=ws(ef(b.target)),y=w.prefix,O=w.iconName;b.target.setAttribute(Gc,y||v),O&&b.target.setAttribute(Yc,O)}else YA(b.target)&&o(b.target)})}}),gr&&Is.observe(d,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function QA(){Is&&Is.disconnect()}function eT(n){var e=n.getAttribute("style"),t=[];return e&&(t=e.split(";").reduce(function(r,o){var s=o.split(":"),c=s[0],f=s.slice(1);return c&&f.length>0&&(r[c]=f.join(":").trim()),r},{})),t}function tT(n){var e=n.getAttribute("data-prefix"),t=n.getAttribute("data-icon"),r=n.innerText!==void 0?n.innerText.trim():"",o=ws(ef(n));return o.prefix||(o.prefix=Wr()),e&&t&&(o.prefix=e,o.iconName=t),o.iconName&&o.prefix||(o.prefix&&r.length>0&&(o.iconName=IA(o.prefix,n.innerText)||sf(o.prefix,tg(n.innerText))),!o.iconName&&de.autoFetchSvg&&n.firstChild&&n.firstChild.nodeType===Node.TEXT_NODE&&(o.iconName=n.firstChild.data)),o}function nT(n){var e=zi(n.attributes).reduce(function(t,r){return t.name!=="class"&&t.name!=="style"&&(t[r.name]=r.value),t},{});return e}function rT(){return{iconName:null,prefix:null,transform:rr,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Ig(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},t=tT(n),r=t.iconName,o=t.prefix,s=t.rest,c=nT(n),f=uf("parseNodeAttributes",{},n),d=e.styleParser?eT(n):[];return J({iconName:r,prefix:o,transform:rr,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:s,styles:d,attributes:c}},f)}var iT=qn.styles;function Ag(n){var e=de.autoReplaceSvg==="nest"?Ig(n,{styleParser:!1}):Ig(n);return~e.extra.classes.indexOf(qv)?Ur("generateLayersText",n,e):Ur("generateSvgReplacementMutation",n,e)}function oT(){return[].concat(Hn(Rv),Hn(Bv))}function Tg(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!gr)return Promise.resolve();var t=Ze.documentElement.classList,r=function(b){return t.add("".concat(Vv,"-").concat(b))},o=function(b){return t.remove("".concat(Vv,"-").concat(b))},s=de.autoFetchSvg?oT():gv.concat(Object.keys(iT));s.includes("fa")||s.push("fa");var c=[".".concat(qv,":not([").concat(vi,"])")].concat(s.map(function(v){return".".concat(v,":not([").concat(vi,"])")})).join(", ");if(c.length===0)return Promise.resolve();var f=[];try{f=zi(n.querySelectorAll(c))}catch{}if(f.length>0)r("pending"),o("complete");else return Promise.resolve();var d=vf.begin("onTree"),p=f.reduce(function(v,b){try{var w=Ag(b);w&&v.push(w)}catch(y){Uv||y.name==="MissingIcon"&&console.error(y)}return v},[]);return new Promise(function(v,b){Promise.all(p).then(function(w){Sg(w,function(){r("active"),r("complete"),o("pending"),typeof e=="function"&&e(),d(),v()})}).catch(function(w){d(),b(w)})})}function aT(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Ag(n).then(function(t){t&&Sg([t],e)})}function sT(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(e||{}).icon?e:cf(e||{}),o=t.mask;return o&&(o=(o||{}).icon?o:cf(o||{})),n(r,J(J({},t),{},{mask:o}))}}var uT=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.transform,o=r===void 0?rr:r,s=t.symbol,c=s===void 0?!1:s,f=t.mask,d=f===void 0?null:f,p=t.maskId,v=p===void 0?null:p,b=t.classes,w=b===void 0?[]:b,y=t.attributes,O=y===void 0?{}:y,S=t.styles,A=S===void 0?{}:S;if(e){var x=e.prefix,k=e.iconName,G=e.icon;return Ss(J({type:"icon"},e),function(){return mi("beforeDOMElementCreation",{iconDefinition:e,params:t}),ff({icons:{main:df(G),mask:d?df(d.icon):{found:!1,width:null,height:null,icon:{}}},prefix:x,iconName:k,transform:J(J({},rr),o),symbol:c,maskId:v,extra:{attributes:O,styles:A,classes:w}})})}},cT={mixout:function(){return{icon:sT(uT)}},hooks:function(){return{mutationObserverCallbacks:function(t){return t.treeCallback=Tg,t.nodeCallback=aT,t}}},provides:function(e){e.i2svg=function(t){var r=t.node,o=r===void 0?Ze:r,s=t.callback,c=s===void 0?function(){}:s;return Tg(o,c)},e.generateSvgReplacementMutation=function(t,r){var o=r.iconName,s=r.prefix,c=r.transform,f=r.symbol,d=r.mask,p=r.maskId,v=r.extra;return new Promise(function(b,w){Promise.all([hf(o,s),d.iconName?hf(d.iconName,d.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var O=ps(y,2),S=O[0],A=O[1];b([t,ff({icons:{main:S,mask:A},prefix:s,iconName:o,transform:c,symbol:f,maskId:p,extra:v,watchable:!0})])}).catch(w)})},e.generateAbstractIcon=function(t){var r=t.children,o=t.attributes,s=t.main,c=t.transform,f=t.styles,d=bs(f);d.length>0&&(o.style=d);var p;return tf(c)&&(p=Ur("generateAbstractTransformGrouping",{main:s,transform:c,containerWidth:s.width,iconWidth:s.width})),r.push(p||s.icon),{children:r,attributes:o}}}},fT={mixout:function(){return{layer:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.classes,s=o===void 0?[]:o;return Ss({type:"layer"},function(){mi("beforeDOMElementCreation",{assembler:t,params:r});var c=[];return t(function(f){Array.isArray(f)?f.map(function(d){c=c.concat(d.abstract)}):c=c.concat(f.abstract)}),[{tag:"span",attributes:{class:["".concat(de.cssPrefix,"-layers")].concat(Hn(s)).join(" ")},children:c}]})}}}},lT={mixout:function(){return{counter:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r.title;var o=r.classes,s=o===void 0?[]:o,c=r.attributes,f=c===void 0?{}:c,d=r.styles,p=d===void 0?{}:d;return Ss({type:"counter",content:t},function(){return mi("beforeDOMElementCreation",{content:t,params:r}),UA({content:t.toString(),extra:{attributes:f,styles:p,classes:["".concat(de.cssPrefix,"-layers-counter")].concat(Hn(s))}})})}}}},dT={mixout:function(){return{text:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.transform,s=o===void 0?rr:o,c=r.classes,f=c===void 0?[]:c,d=r.attributes,p=d===void 0?{}:d,v=r.styles,b=v===void 0?{}:v;return Ss({type:"text",content:t},function(){return mi("beforeDOMElementCreation",{content:t,params:r}),gg({content:t,transform:J(J({},rr),s),extra:{attributes:p,styles:b,classes:["".concat(de.cssPrefix,"-layers-text")].concat(Hn(f))}})})}}},provides:function(e){e.generateLayersText=function(t,r){var o=r.transform,s=r.extra,c=null,f=null;if(pv){var d=parseInt(getComputedStyle(t).fontSize,10),p=t.getBoundingClientRect();c=p.width/d,f=p.height/d}return Promise.resolve([t,gg({content:t.innerHTML,width:c,height:f,transform:o,extra:s,watchable:!0})])}}},xg=new RegExp('"',"ug"),Ng=[1105920,1112319],Dg=J(J(J(J({},{FontAwesome:{normal:"fas",400:"fas"}}),Y1),QI),rI),bf=Object.keys(Dg).reduce(function(n,e){return n[e.toLowerCase()]=Dg[e],n},{}),hT=Object.keys(bf).reduce(function(n,e){var t=bf[e];return n[e]=t[900]||Hn(Object.entries(t))[0][1],n},{});function pT(n){var e=n.replace(xg,"");return tg(Hn(e)[0]||"")}function vT(n){var e=n.getPropertyValue("font-feature-settings").includes("ss01"),t=n.getPropertyValue("content"),r=t.replace(xg,""),o=r.codePointAt(0),s=o>=Ng[0]&&o<=Ng[1],c=r.length===2?r[0]===r[1]:!1;return s||c||e}function gT(n,e){var t=n.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(e),o=isNaN(r)?"normal":r;return(bf[t]||{})[o]||hT[t]}function Cg(n,e){var t="".concat(eA).concat(e.replace(":","-"));return new Promise(function(r,o){if(n.getAttribute(t)!==null)return r();var s=zi(n.children),c=s.filter(function(ye){return ye.getAttribute(qc)===e})[0],f=Vr.getComputedStyle(n,e),d=f.getPropertyValue("font-family"),p=d.match(oA),v=f.getPropertyValue("font-weight"),b=f.getPropertyValue("content");if(c&&!p)return n.removeChild(c),r();if(p&&b!=="none"&&b!==""){var w=f.getPropertyValue("content"),y=gT(d,v),O=pT(w),S=p[0].startsWith("FontAwesome"),A=vT(f),x=sf(y,O),k=x;if(S){var G=AA(O);G.iconName&&G.prefix&&(x=G.iconName,y=G.prefix)}if(x&&!A&&(!c||c.getAttribute(Gc)!==y||c.getAttribute(Yc)!==k)){n.setAttribute(t,k),c&&n.removeChild(c);var oe=rT(),q=oe.extra;q.attributes[qc]=e,hf(x,y).then(function(ye){var L=ff(J(J({},oe),{},{icons:{main:ye,mask:lg()},prefix:y,iconName:k,extra:q,watchable:!0})),F=Ze.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?n.insertBefore(F,n.firstChild):n.appendChild(F),F.outerHTML=L.map(function(ae){return qo(ae)}).join(`
|
|
651
651
|
`),n.removeAttribute(t),r()}).catch(o)}else r()}else r()})}function mT(n){return Promise.all([Cg(n,"::before"),Cg(n,"::after")])}function bT(n){return n.parentNode!==document.head&&!~nA.indexOf(n.tagName.toUpperCase())&&!n.getAttribute(qc)&&(!n.parentNode||n.parentNode.tagName!=="svg")}var yT=function(e){return!!e&&Wv.some(function(t){return e.includes(t)})},_T=function(e){if(!e)return[];var t=new Set,r=e.split(/,(?![^()]*\))/).map(function(d){return d.trim()});r=r.flatMap(function(d){return d.includes("(")?d:d.split(",").map(function(p){return p.trim()})});var o=hs(r),s;try{for(o.s();!(s=o.n()).done;){var c=s.value;if(yT(c)){var f=Wv.reduce(function(d,p){return d.replace(p,"")},c);f!==""&&f!=="*"&&t.add(f)}}}catch(d){o.e(d)}finally{o.f()}return t};function Pg(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(gr){var t;if(e)t=n;else if(de.searchPseudoElementsFullScan)t=n.querySelectorAll("*");else{var r=new Set,o=hs(document.styleSheets),s;try{for(o.s();!(s=o.n()).done;){var c=s.value;try{var f=hs(c.cssRules),d;try{for(f.s();!(d=f.n()).done;){var p=d.value,v=_T(p.selectorText),b=hs(v),w;try{for(b.s();!(w=b.n()).done;){var y=w.value;r.add(y)}}catch(S){b.e(S)}finally{b.f()}}}catch(S){f.e(S)}finally{f.f()}}catch(S){de.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(c.href," (").concat(S.message,`)
|
|
652
|
-
If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(S){o.e(S)}finally{o.f()}if(!r.size)return;var O=Array.from(r).join(", ");try{t=n.querySelectorAll(O)}catch{}}return new Promise(function(S,A){var x=zi(t).filter(bT).map(mT),k=vf.begin("searchPseudoElements");Og(),Promise.all(x).then(function(){k(),mf(),S()}).catch(function(){k(),mf(),A()})})}}var wT={hooks:function(){return{mutationObserverCallbacks:function(t){return t.pseudoElementsCallback=Pg,t}}},provides:function(e){e.pseudoElements2svg=function(t){var r=t.node,o=r===void 0?Ze:r;de.searchPseudoElements&&Pg(o)}}},Mg=!1,ST={mixout:function(){return{dom:{unwatch:function(){Og(),Mg=!0}}}},hooks:function(){return{bootstrap:function(){Eg(uf("mutationObserverCallbacks",{}))},noAuto:function(){QA()},watch:function(t){var r=t.observeMutationsRoot;Mg?mf():Eg(uf("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},Rg=function(e){var t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(r,o){var s=o.toLowerCase().split("-"),c=s[0],f=s.slice(1).join("-");if(c&&f==="h")return r.flipX=!0,r;if(c&&f==="v")return r.flipY=!0,r;if(f=parseFloat(f),isNaN(f))return r;switch(c){case"grow":r.size=r.size+f;break;case"shrink":r.size=r.size-f;break;case"left":r.x=r.x-f;break;case"right":r.x=r.x+f;break;case"up":r.y=r.y-f;break;case"down":r.y=r.y+f;break;case"rotate":r.rotate=r.rotate+f;break}return r},t)},OT={mixout:function(){return{parse:{transform:function(t){return Rg(t)}}}},hooks:function(){return{parseNodeAttributes:function(t,r){var o=r.getAttribute("data-fa-transform");return o&&(t.transform=Rg(o)),t}}},provides:function(e){e.generateAbstractTransformGrouping=function(t){var r=t.main,o=t.transform,s=t.containerWidth,c=t.iconWidth,f={transform:"translate(".concat(s/2," 256)")},d="translate(".concat(o.x*32,", ").concat(o.y*32,") "),p="scale(".concat(o.size/16*(o.flipX?-1:1),", ").concat(o.size/16*(o.flipY?-1:1),") "),v="rotate(".concat(o.rotate," 0 0)"),b={transform:"".concat(d," ").concat(p," ").concat(v)},w={transform:"translate(".concat(c/2*-1," -256)")},y={outer:f,inner:b,path:w};return{tag:"g",attributes:J({},y.outer),children:[{tag:"g",attributes:J({},y.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:J(J({},r.icon.attributes),y.path)}]}]}}}},yf={x:0,y:0,width:"100%",height:"100%"};function Lg(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.attributes&&(n.attributes.fill||e)&&(n.attributes.fill="black"),n}function ET(n){return n.tag==="g"?n.children:[n]}var IT={hooks:function(){return{parseNodeAttributes:function(t,r){var o=r.getAttribute("data-fa-mask"),s=o?ws(o.split(" ").map(function(c){return c.trim()})):lg();return s.prefix||(s.prefix=Wr()),t.mask=s,t.maskId=r.getAttribute("data-fa-mask-id"),t}}},provides:function(e){e.generateAbstractMask=function(t){var r=t.children,o=t.attributes,s=t.main,c=t.mask,f=t.maskId,d=t.transform,p=s.width,v=s.icon,b=c.width,w=c.icon,y=gA({transform:d,containerWidth:b,iconWidth:p}),O={tag:"rect",attributes:J(J({},yf),{},{fill:"white"})},S=v.children?{children:v.children.map(Lg)}:{},A={tag:"g",attributes:J({},y.inner),children:[Lg(J({tag:v.tag,attributes:J(J({},v.attributes),y.path)},S))]},x={tag:"g",attributes:J({},y.outer),children:[A]},k="mask-".concat(f||Yv()),G="clip-".concat(f||Yv()),oe={tag:"mask",attributes:J(J({},yf),{},{id:k,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[O,x]},q={tag:"defs",children:[{tag:"clipPath",attributes:{id:G},children:ET(w)},oe]};return r.push(q,{tag:"rect",attributes:J({fill:"currentColor","clip-path":"url(#".concat(G,")"),mask:"url(#".concat(k,")")},yf)}),{children:r,attributes:o}}}},AT={provides:function(e){var t=!1;Vr.matchMedia&&(t=Vr.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var r=[],o={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:J(J({},o),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var c=J(J({},s),{},{attributeName:"opacity"}),f={tag:"circle",attributes:J(J({},o),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||f.children.push({tag:"animate",attributes:J(J({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:J(J({},c),{},{values:"1;0;1;1;0;1;"})}),r.push(f),r.push({tag:"path",attributes:J(J({},o),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:J(J({},c),{},{values:"1;0;0;0;0;1;"})}]}),t||r.push({tag:"path",attributes:J(J({},o),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:J(J({},c),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},TT={hooks:function(){return{parseNodeAttributes:function(t,r){var o=r.getAttribute("data-fa-symbol"),s=o===null?!1:o===""?!0:o;return t.symbol=s,t}}}},xT=[yA,cT,fT,lT,dT,wT,ST,OT,IT,AT,TT];LA(xT,{mixoutsTo:tn}),tn.noAuto;var Jo=tn.config;tn.library,tn.dom;var kg=tn.parse;tn.findIconDefinition,tn.toHtml;var NT=tn.icon;tn.layer,tn.text,tn.counter;function DT(n){return n=n-0,n===n}function Bg(n){return DT(n)?n:(n=n.replace(/[_-]+(.)?/g,(e,t)=>t?t.toUpperCase():""),n.charAt(0).toLowerCase()+n.slice(1))}function CT(n){return n.charAt(0).toUpperCase()+n.slice(1)}var Gi=new Map,PT=1e3;function MT(n){if(Gi.has(n))return Gi.get(n);const e={};let t=0;const r=n.length;for(;t<r;){const o=n.indexOf(";",t),s=o===-1?r:o,c=n.slice(t,s).trim();if(c){const f=c.indexOf(":");if(f>0){const d=c.slice(0,f).trim(),p=c.slice(f+1).trim();if(d&&p){const v=Bg(d);e[v.startsWith("webkit")?CT(v):v]=p}}}t=s+1}if(Gi.size===PT){const o=Gi.keys().next().value;o&&Gi.delete(o)}return Gi.set(n,e),e}function jg(n,e,t={}){if(typeof e=="string")return e;const r=(e.children||[]).map(v=>jg(n,v)),o=e.attributes||{},s={};for(const[v,b]of Object.entries(o))switch(!0){case v==="class":{s.className=b;break}case v==="style":{s.style=MT(String(b));break}case v.startsWith("aria-"):case v.startsWith("data-"):{s[v.toLowerCase()]=b;break}default:s[Bg(v)]=b}const{style:c,role:f,"aria-label":d,...p}=t;return c&&(s.style=s.style?{...s.style,...c}:c),f&&(s.role=f),d&&(s["aria-label"]=d,s["aria-hidden"]="false"),n(e.tag,{...p,...s},...r)}var RT=jg.bind(null,R.createElement),Fg=(n,e)=>{const t=R.useId();return n||(e?t:void 0)},LT=class{constructor(n="react-fontawesome"){this.enabled=!1;let e=!1;try{e=typeof process<"u"&&process.env.NODE_ENV==="development"}catch{}this.scope=n,this.enabled=e}log(...n){this.enabled&&console.log(`[${this.scope}]`,...n)}warn(...n){this.enabled&&console.warn(`[${this.scope}]`,...n)}error(...n){this.enabled&&console.error(`[${this.scope}]`,...n)}};typeof process<"u"&&process.env.FA_VERSION;var kT="searchPseudoElementsFullScan"in Jo?"7.0.0":"6.0.0",BT=Number.parseInt(kT)>=7,Ko="fa",yr={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},jT={left:"fa-pull-left",right:"fa-pull-right"},FT={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},$T={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},_r={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function VT(n){const e=Jo.cssPrefix||Jo.familyPrefix||Ko;return e===Ko?n:n.replace(new RegExp(String.raw`(?<=^|\s)${Ko}-`,"g"),`${e}-`)}function WT(n){const{beat:e,fade:t,beatFade:r,bounce:o,shake:s,spin:c,spinPulse:f,spinReverse:d,pulse:p,fixedWidth:v,inverse:b,border:w,flip:y,size:O,rotation:S,pull:A,swapOpacity:x,rotateBy:k,widthAuto:G,className:oe}=n,q=[];return oe&&q.push(...oe.split(" ")),e&&q.push(yr.beat),t&&q.push(yr.fade),r&&q.push(yr.beatFade),o&&q.push(yr.bounce),s&&q.push(yr.shake),c&&q.push(yr.spin),d&&q.push(yr.spinReverse),f&&q.push(yr.spinPulse),p&&q.push(yr.pulse),v&&q.push(_r.fixedWidth),b&&q.push(_r.inverse),w&&q.push(_r.border),y===!0&&q.push(_r.flip),(y==="horizontal"||y==="both")&&q.push(_r.flipHorizontal),(y==="vertical"||y==="both")&&q.push(_r.flipVertical),O!=null&&q.push($T[O]),S!=null&&S!==0&&q.push(FT[S]),A!=null&&q.push(jT[A]),x&&q.push(_r.swapOpacity),BT?(k&&q.push(_r.rotateBy),G&&q.push(_r.widthAuto),(Jo.cssPrefix||Jo.familyPrefix||Ko)===Ko?q:q.map(VT)):q}var UT=n=>typeof n=="object"&&"icon"in n&&!!n.icon;function $g(n){if(n)return UT(n)?n:kg.icon(n)}function zT(n){return Object.keys(n)}var Vg=new LT("FontAwesomeIcon"),Wg={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},HT=new Set(Object.keys(Wg)),Yi=R.forwardRef((n,e)=>{const t={...Wg,...n},{icon:r,mask:o,symbol:s,title:c,titleId:f,maskId:d,transform:p}=t,v=Fg(d,!!o),b=Fg(f,!!c),w=$g(r);if(!w)return Vg.error("Icon lookup is undefined",r),null;const y=WT(t),O=typeof p=="string"?kg.transform(p):p,S=$g(o),A=NT(w,{...y.length>0&&{classes:y},...O&&{transform:O},...S&&{mask:S},symbol:s,title:c,titleId:b,maskId:v});if(!A)return Vg.error("Could not find icon",w),null;const{abstract:x}=A,k={ref:e};for(const G of zT(t))HT.has(G)||(k[G]=t[G]);return RT(x[0],k)});Yi.displayName="FontAwesomeIcon";var qT={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32S0 334.3 0 352l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},GT={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z"]},Ug={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM167 167c9.4-9.4 24.6-9.4 33.9 0l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9z"]},YT={prefix:"fas",iconName:"angle-down",icon:[384,512,[8964],"f107","M169.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 306.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]};function JT({layoutId:n,justId:e,winInfo:t}){console.log("TabTitle justId",e);const[r,o]=Pc(),[s]=R.useState({x:0,y:0}),c=nr(n),f=c.getTabTitleTooltip(e),d=v=>{console.log("closeWin!!!",v)},p=(v,b)=>{c.activeWin({justId:b})};return Q.jsxs(Q.Fragment,{children:[Q.jsx("div",{className:"just-icon",onClick:v=>p(v,e),title:f,children:t.getTabIcon(e,n)}),Q.jsx("div",{className:"just-title",onClick:v=>p(v,e),title:f,children:c.getTabTitle(e)??e.title}),Q.jsx("div",{className:"just-icon just-close",onClick:()=>d(e),children:Q.jsx(Yi,{icon:Ug})}),Q.jsx(qp,{state:r.state,endTransition:r.endTransition,anchorPoint:s,onClose:()=>o(!1),children:Q.jsxs(ls,{onClick:()=>d(e),children:[Q.jsx("div",{className:"just-icon"}),Q.jsx("div",{className:"just-title",children:"Close"}),Q.jsx("div",{className:"just-icon"})]})})]})}const zg=vr(JT);function KT(n){const{layoutId:e,isFullScreenView:t,dndAccept:r,winInfo:o,justBranch:s,justId:c,justStack:f,rect:d}=n,p=R.useRef(null),[,v]=Pc(),[,b]=R.useState({x:0,y:0}),w=nr(e),[{isDragging:y},O]=cE({type:c.viewId,item:{justBranch:s,justId:c,index:-1},collect:x=>({isDragging:x.isDragging()})}),[,S]=Sc({accept:r,collect(x){return{handlerId:x.getHandlerId()}},hover(x,k){if(!p.current||c===x.justId)return;const G=p.current.getBoundingClientRect(),oe=k.getClientOffset(),q=(G.right-G.left)/2,ye=oe.x-G.left,L=x.justId,F=c,ae=f.tabs.filter(ce=>!$e.isEquals(ce,L));let we=$e.indexOf(ae,F);ye>q&&(we+=1),x.pos="stack",x.index=we}});R.useEffect(()=>{if($e.isEquals(c,w.lastActiveId??null)){if(p.current==null||d==null)return;const x=p.current.getBoundingClientRect();(d.left>x.left||d.right<x.right)&&p.current.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}},[w.lastActiveTm]),R.useLayoutEffect(()=>{p.current&&O(S(p))},[S,O]);const A=R.useCallback(x=>{x.preventDefault(),b({x:x.clientX,y:x.clientY}),v(!0)},[v]);return Q.jsx("div",{className:Un("just-draggable-title","just-title-menus",{dragging:y,"just-active":$e.isEquals(f.active,c),"last-active":$e.isEquals(w.lastActiveId,c)}),ref:p,onContextMenu:A,children:o.getTabTitle?o.getTabTitle({justId:c,layoutId:e,justBranch:s,isFullScreenView:t,winInfo:o}):Q.jsx(zg,{justId:c,layoutId:e,justBranch:s,isFullScreenView:t,winInfo:o})})}const Hg=vr(KT);function qg(n){let e=null;return()=>(e==null&&(e=n()),e)}function XT(n,e){return n.filter(t=>t!==e)}function ZT(n,e){const t=new Set,r=s=>t.add(s);n.forEach(r),e.forEach(r);const o=[];return t.forEach(s=>o.push(s)),o}class QT{enter(e){const t=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(e));return this.entered=ZT(this.entered.filter(r),[e]),t===0&&this.entered.length>0}leave(e){const t=this.entered.length;return this.entered=XT(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ex{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(t[r]={value:o(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Gg="__NATIVE_FILE__",Yg="__NATIVE_URL__",Jg="__NATIVE_TEXT__",Kg="__NATIVE_HTML__",Xg=Object.freeze(Object.defineProperty({__proto__:null,FILE:Gg,HTML:Kg,TEXT:Jg,URL:Yg},Symbol.toStringTag,{value:"Module"}));function _f(n,e,t){const r=e.reduce((o,s)=>o||n.getData(s),"");return r??t}const wf={[Gg]:{exposeProperties:{files:n=>Array.prototype.slice.call(n.files),items:n=>n.items,dataTransfer:n=>n},matchesTypes:["Files"]},[Kg]:{exposeProperties:{html:(n,e)=>_f(n,e,""),dataTransfer:n=>n},matchesTypes:["Html","text/html"]},[Yg]:{exposeProperties:{urls:(n,e)=>_f(n,e,"").split(`
|
|
653
|
-
`),dataTransfer:n=>n},matchesTypes:["Url","text/uri-list"]},[Jg]:{exposeProperties:{text:(n,e)=>_f(n,e,""),dataTransfer:n=>n},matchesTypes:["Text","text/plain"]}};function tx(n,e){const t=wf[n];if(!t)throw new Error(`native type ${n} has no configuration`);const r=new ex(t);return r.loadDataTransfer(e),r}function Sf(n){if(!n)return null;const e=Array.prototype.slice.call(n.types||[]);return Object.keys(wf).filter(t=>{const r=wf[t];return r?.matchesTypes?r.matchesTypes.some(o=>e.indexOf(o)>-1):!1})[0]||null}const nx=qg(()=>/firefox/i.test(navigator.userAgent)),Zg=qg(()=>!!window.safari);class Qg{interpolate(e){const{xs:t,ys:r,c1s:o,c2s:s,c3s:c}=this;let f=t.length-1;if(e===t[f])return r[f];let d=0,p=c.length-1,v;for(;d<=p;){v=Math.floor(.5*(d+p));const y=t[v];if(y<e)d=v+1;else if(y>e)p=v-1;else return r[v]}f=Math.max(0,p);const b=e-t[f],w=b*b;return r[f]+o[f]*b+s[f]*w+c[f]*b*w}constructor(e,t){const{length:r}=e,o=[];for(let y=0;y<r;y++)o.push(y);o.sort((y,O)=>e[y]<e[O]?-1:1);const s=[],c=[];let f,d;for(let y=0;y<r-1;y++)f=e[y+1]-e[y],d=t[y+1]-t[y],s.push(f),c.push(d/f);const p=[c[0]];for(let y=0;y<s.length-1;y++){const O=c[y],S=c[y+1];if(O*S<=0)p.push(0);else{f=s[y];const A=s[y+1],x=f+A;p.push(3*x/((x+A)/O+(x+f)/S))}}p.push(c[c.length-1]);const v=[],b=[];let w;for(let y=0;y<p.length-1;y++){w=c[y];const O=p[y],S=1/s[y],A=O+p[y+1]-w-w;v.push((w-O-A)*S),b.push(A*S*S)}this.xs=e,this.ys=t,this.c1s=p,this.c2s=v,this.c3s=b}}const rx=1;function em(n){const e=n.nodeType===rx?n:n.parentElement;if(!e)return null;const{top:t,left:r}=e.getBoundingClientRect();return{x:r,y:t}}function As(n){return{x:n.clientX,y:n.clientY}}function ix(n){var e;return n.nodeName==="IMG"&&(nx()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(n)))}function ox(n,e,t,r){let o=n?e.width:t,s=n?e.height:r;return Zg()&&n&&(s/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:s}}function ax(n,e,t,r,o){const s=ix(e),f=em(s?n:e),d={x:t.x-f.x,y:t.y-f.y},{offsetWidth:p,offsetHeight:v}=n,{anchorX:b,anchorY:w}=r,{dragPreviewWidth:y,dragPreviewHeight:O}=ox(s,e,p,v),S=()=>{let ye=new Qg([0,.5,1],[d.y,d.y/v*O,d.y+O-v]).interpolate(w);return Zg()&&s&&(ye+=(window.devicePixelRatio-1)*O),ye},A=()=>new Qg([0,.5,1],[d.x,d.x/p*y,d.x+y-p]).interpolate(b),{offsetX:x,offsetY:k}=o,G=x===0||x,oe=k===0||k;return{x:G?x:A(),y:oe?k:S()}}class sx{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function ux(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function tm(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){ux(n,o,t[o])})}return n}class cx{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)===null||t===void 0||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);const o=c=>this.handleDragStart(c,e),s=c=>this.handleSelectStart(c);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",s),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const r=c=>this.handleDragEnter(c,e),o=c=>this.handleDragOver(c,e),s=c=>this.handleDrop(c,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",s),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",s)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return tm({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions.get(e);return tm({anchorX:.5,anchorY:.5,captureDraggingState:!1},t||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Xg).some(t=>Xg[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=tx(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const t=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},t)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const s=this.sourceNodes.get(o);return s&&em(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const c=As(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:c});const{dataTransfer:f}=o,d=Sf(f);if(this.monitor.isDragging()){if(f&&typeof f.setDragImage=="function"){const v=this.monitor.getSourceId(),b=this.sourceNodes.get(v),w=this.sourcePreviewNodes.get(v)||b;if(w){const{anchorX:y,anchorY:O,offsetX:S,offsetY:A}=this.getCurrentSourcePreviewNodeOptions(),G=ax(b,w,c,{anchorX:y,anchorY:O},{offsetX:S,offsetY:A});f.setDragImage(w,G.x,G.y)}}try{f?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:p}=this.getCurrentSourcePreviewNodeOptions();p?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(f&&!f.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:f}=o,d=Sf(f);d&&this.beginDragNativeItem(d,f)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,s.length>0&&this.actions.hover(s,{clientOffset:As(o)}),s.some(f=>this.monitor.canDropOnTarget(f))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=As(o),this.scheduleHover(s),(s||[]).some(f=>this.monitor.canDropOnTarget(f))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;o.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}else Sf(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:As(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const s=o.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(o.preventDefault(),s.dragDrop()))},this.options=new sx(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new QT(this.isNodeInDocument)}}const fx=function(e,t,r){return new cx(e,t,r)};function lx({layoutId:n,justBranch:e,isFullScreenView:t}){const r=nr(n),o=()=>{console.log("closeAllTabs justBranch",e),r.removeAllTabs({branch:e})},s=async(c=!1)=>{t?r.setLayout(null):(r.setFullScreenLayoutByBranch(e),r.setFullScreenHideTitle(c))};return Q.jsxs(Q.Fragment,{children:[Q.jsxs(ls,{className:"just-menu-item",onClick:()=>o(),children:[Q.jsx("div",{className:"just-icon"}),Q.jsx("div",{className:"just-title",children:"Close All"}),Q.jsx("div",{className:"just-icon"})]}),Q.jsxs(ls,{className:"just-menu-item",onClick:()=>s(!0),children:[Q.jsx("div",{className:"just-icon",children:Q.jsx(Yi,{icon:qT})}),Q.jsx("div",{className:"just-title",children:t?"F11":"Full"}),Q.jsx("div",{className:"just-icon"})]})]})}const nm=vr(lx);function dx({layoutId:n,isFullScreenView:e,dndAccept:t,justBranch:r,justStack:o,getWinInfo:s,getTabMenu:c}){const f=R.useRef(null),[d,p]=R.useState(null),v=nr(n),b=A=>{v.removeWin({justId:A})},w=A=>{v.activeWin({justId:A})},y=(A,x)=>{v.moveWin({pos:"stack",justId:x.justId,branch:r,index:x.index??-1})},[{isOver:O},S]=Sc(()=>({accept:t,collect:A=>({isOver:A.isOver()}),drop(A,x){y(x.getItemType(),x.getItem())},hover(A,x){f.current&&(A.index=-1)}}),[o]);return R.useLayoutEffect(()=>{f.current&&S(f)},[S]),R.useEffect(()=>{if(f.current===null)return;function A(){if(f.current===null)return;const k=f.current.getBoundingClientRect()??null;p(k)}A();const x=new ResizeObserver(A);return x.observe(f.current),window.addEventListener("scroll",A,!0),()=>{x.disconnect(),window.removeEventListener("scroll",A,!0)}},[]),Q.jsxs("div",{className:Un("just-win-title"),tabIndex:1,children:[Q.jsx("div",{className:Un("just-title-list",{"is-over":O}),ref:f,children:o.tabs.map(A=>Q.jsx(Hg,{layoutId:n,isFullScreenView:e,dndAccept:t,rect:d,justId:A,justBranch:r,justStack:o,winInfo:s(A)},[...r,$e.toString(A)].join(",")))}),Q.jsxs("div",{className:"just-title-menus",children:[Q.jsx(Kp,{menuButton:Q.jsx("div",{className:"just-title-menu",children:Q.jsx(Yi,{icon:YT})}),children:o.tabs.map(A=>Q.jsxs(ls,{className:Un("just-menu-item",{active:$e.isEquals(o.active,A)}),children:[Q.jsx("div",{className:"just-icon",onClick:()=>w(A),children:s(A).getTabIcon(A,n)}),Q.jsx("div",{className:"just-title",onClick:()=>w(A),children:v.getTabTitle(A)??A.title}),Q.jsx("div",{className:"just-icon just-close",onClick:x=>{x.stopPropagation(),b(A)},children:Q.jsx(Yi,{icon:Ug})})]},$e.toString(A)))}),Q.jsx(Kp,{menuButton:Q.jsx("div",{className:"just-title-menu",children:Q.jsx(Yi,{icon:GT})}),children:c?c(n,r,o,e):Q.jsx(nm,{layoutId:n,justBranch:r,justStack:o,isFullScreenView:e})})]})]})}const rm=vr(dx);function hx(n){const e=R.useRef(null),{layoutId:t,dndAccept:r,getWinInfo:o,justBranch:s,justStack:c}=n,[f,d]=R.useState(null),p=nr(t),v=(y,O)=>{O.pos&&(O.pos==="stack"?p.moveWin({pos:O.pos,justId:O.justId,branch:s,index:O.index??-1}):p.moveWin({pos:O.pos,justId:O.justId,branch:s,direction:O.direction??"row"}))},[{isOver:b},w]=Sc(()=>({accept:r,collect:y=>({isOver:y.isOver()}),drop(y,O){e.current&&v(O.getItemType(),O.getItem())},hover(y,O){if(!e.current)return;const S=e.current.getBoundingClientRect(),A=O.getClientOffset(),x=(S.right-S.left)/2,k=(S.bottom-S.top)/2,G=A.x-S.left,oe=A.y-S.top,q=G-x,ye=oe-k,L=Math.abs(q*100/x),F=Math.abs(ye*100/k);if(L<60&&F<60){y.pos="stack";const ae={top:S.top,left:S.left,width:S.width,height:S.height};d(ae)}else{const ae=L>F?"row":"column",ce=Math.sign(ae==="row"?q:ye)>0?"second":"first";y.direction=ae,y.pos=ce;const Se={top:ce==="second"&&ae==="column"?S.top+S.height/2:S.top,left:ce==="second"&&ae==="row"?S.left+S.width/2:S.left,width:ae==="row"?S.width/2:S.width,height:ae==="column"?S.height/2:S.height};d(Se)}}}),[c]);return R.useLayoutEffect(()=>{e.current&&w(e)},[w]),Q.jsxs("div",{className:Un("just-win-body",{isOver:b,"last-active":$e.isEquals(c.active,p.lastActiveId)}),ref:e,children:[c.tabs.map(y=>Q.jsx(R.Activity,{mode:$e.isEquals(c.active,y)?"visible":"hidden",children:o(y).getView(y,t)},$e.toString(y))),b&&f!=null&&Q.jsx("div",{className:"just-overlay",style:{top:f.top,left:f.left,width:`${f.width}px`,height:`${f.height}px`}})]})}const im=vr(hx);function px({layoutId:n,isFullScreenView:e,hideTitle:t,dndAccept:r,justBranch:o,justStack:s,getWinInfo:c,getTabMenu:f}){const d=nr(n),p=d.fullScreenHideTitle,v=t!==!0,b=()=>{s.active&&d.activeWin({justId:s.active})};return Q.jsxs("div",{className:"just-win",onFocusCapture:b,tabIndex:1,children:[v&&!p&&Q.jsx(rm,{layoutId:n,isFullScreenView:e,dndAccept:r,justBranch:o,justStack:s,getWinInfo:c,getTabMenu:f}),Q.jsx(im,{layoutId:n,dndAccept:r,justBranch:o,justStack:s,getWinInfo:c})]})}const om=vr(px);var Of,am;function Ef(){if(am)return Of;am=1;function n(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return Of=n,Of}var If,sm;function vx(){if(sm)return If;sm=1;var n=typeof dn=="object"&&dn&&dn.Object===Object&&dn;return If=n,If}var Af,um;function cm(){if(um)return Af;um=1;var n=vx(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return Af=t,Af}var Tf,fm;function gx(){if(fm)return Tf;fm=1;var n=cm(),e=function(){return n.Date.now()};return Tf=e,Tf}var xf,lm;function mx(){if(lm)return xf;lm=1;var n=/\s/;function e(t){for(var r=t.length;r--&&n.test(t.charAt(r)););return r}return xf=e,xf}var Nf,dm;function bx(){if(dm)return Nf;dm=1;var n=mx(),e=/^\s+/;function t(r){return r&&r.slice(0,n(r)+1).replace(e,"")}return Nf=t,Nf}var Df,hm;function pm(){if(hm)return Df;hm=1;var n=cm(),e=n.Symbol;return Df=e,Df}var Cf,vm;function yx(){if(vm)return Cf;vm=1;var n=pm(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,o=n?n.toStringTag:void 0;function s(c){var f=t.call(c,o),d=c[o];try{c[o]=void 0;var p=!0}catch{}var v=r.call(c);return p&&(f?c[o]=d:delete c[o]),v}return Cf=s,Cf}var Pf,gm;function _x(){if(gm)return Pf;gm=1;var n=Object.prototype,e=n.toString;function t(r){return e.call(r)}return Pf=t,Pf}var Mf,mm;function wx(){if(mm)return Mf;mm=1;var n=pm(),e=yx(),t=_x(),r="[object Null]",o="[object Undefined]",s=n?n.toStringTag:void 0;function c(f){return f==null?f===void 0?o:r:s&&s in Object(f)?e(f):t(f)}return Mf=c,Mf}var Rf,bm;function Sx(){if(bm)return Rf;bm=1;function n(e){return e!=null&&typeof e=="object"}return Rf=n,Rf}var Lf,ym;function Ox(){if(ym)return Lf;ym=1;var n=wx(),e=Sx(),t="[object Symbol]";function r(o){return typeof o=="symbol"||e(o)&&n(o)==t}return Lf=r,Lf}var kf,_m;function wm(){if(_m)return kf;_m=1;var n=bx(),e=Ef(),t=Ox(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;function d(p){if(typeof p=="number")return p;if(t(p))return r;if(e(p)){var v=typeof p.valueOf=="function"?p.valueOf():p;p=e(v)?v+"":v}if(typeof p!="string")return p===0?p:+p;p=n(p);var b=s.test(p);return b||c.test(p)?f(p.slice(2),b?2:8):o.test(p)?r:+p}return kf=d,kf}var Bf,Sm;function Ex(){if(Sm)return Bf;Sm=1;var n=Ef(),e=gx(),t=wm(),r="Expected a function",o=Math.max,s=Math.min;function c(f,d,p){var v,b,w,y,O,S,A=0,x=!1,k=!1,G=!0;if(typeof f!="function")throw new TypeError(r);d=t(d)||0,n(p)&&(x=!!p.leading,k="maxWait"in p,w=k?o(t(p.maxWait)||0,d):w,G="trailing"in p?!!p.trailing:G);function oe(he){var ct=v,ht=b;return v=b=void 0,A=he,y=f.apply(ht,ct),y}function q(he){return A=he,O=setTimeout(F,d),x?oe(he):y}function ye(he){var ct=he-S,ht=he-A,ft=d-ct;return k?s(ft,w-ht):ft}function L(he){var ct=he-S,ht=he-A;return S===void 0||ct>=d||ct<0||k&&ht>=w}function F(){var he=e();if(L(he))return ae(he);O=setTimeout(F,ye(he))}function ae(he){return O=void 0,G&&v?oe(he):(v=b=void 0,y)}function we(){O!==void 0&&clearTimeout(O),A=0,v=S=b=O=void 0}function ce(){return O===void 0?y:ae(e())}function Se(){var he=e(),ct=L(he);if(v=arguments,b=this,S=he,ct){if(O===void 0)return q(S);if(k)return clearTimeout(O),O=setTimeout(F,d),oe(S)}return O===void 0&&(O=setTimeout(F,d)),y}return Se.cancel=we,Se.flush=ce,Se}return Bf=c,Bf}var jf,Om;function Ix(){if(Om)return jf;Om=1;var n=Ex(),e=Ef(),t="Expected a function";function r(o,s,c){var f=!0,d=!0;if(typeof o!="function")throw new TypeError(t);return e(c)&&(f="leading"in c?!!c.leading:f,d="trailing"in c?!!c.trailing:d),n(o,s,{leading:f,maxWait:s,trailing:d})}return jf=r,jf}var Ax=Ix();const Tx=po(Ax);var Ff,Em;function xx(){if(Em)return Ff;Em=1;function n(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}return Ff=n,Ff}var $f,Im;function Nx(){if(Im)return $f;Im=1;var n=xx(),e=wm();function t(r,o,s){return s===void 0&&(s=o,o=void 0),s!==void 0&&(s=e(s),s=s===s?s:0),o!==void 0&&(o=e(o),o=o===o?o:0),n(e(r),o,s)}return $f=t,$f}var Dx=Nx();const Vf=po(Dx),Cx=1e3/30;function Px({node:n,containerRef:e,onChange:t,onRelease:r}){const o=R.useRef(null),[s,c]=R.useState(!1),f=()=>{s||(o.current.ownerDocument.addEventListener("mousemove",b,!0),o.current.ownerDocument.addEventListener("mouseup",v,!0),c(!0))},d=()=>{o.current&&(o.current.ownerDocument.removeEventListener("mousemove",b,!0),o.current.ownerDocument.removeEventListener("mouseup",v,!0),c(!1))},p=O=>{O.button===0&&(O.preventDefault(),f())},v=O=>{if(d(),e==null)return;const S=w(O,n,e);S!==null&&r(S)},b=O=>{O.preventDefault(),e!=null&&y(O,n,e)},w=(O,S,A)=>{if(A.current==null)return null;const x=A.current.getBoundingClientRect(),k=S.direction==="row"?O.clientX:O.clientY,G=S.direction==="row"?x.left:x.top,oe=S.direction==="row"?x.width:x.height,q=Vf(k-G,0,oe),ye=Vf(oe-q,0,oe),L=Vf(q*100/oe,0,100);return S.type==="split-percentage"?{type:S.type,size:L}:S.type==="split-pixels"?S.primary==="first"?{type:"split-pixels",primary:"first",size:q}:{type:"split-pixels",primary:"second",size:ye}:null},y=Tx((O,S,A)=>{if(A.current==null)return null;const x=w(O,S,A);x!==null&&t(x)},Cx);return R.useEffect(()=>{}),Q.jsx("div",{ref:o,className:Un("just-splitter"),onMouseDown:p})}const Am=vr(Px);function Wf({layoutId:n,isFullScreenView:e,hideTitle:t,dndAccept:r,node:o,justBranch:s,getWinInfo:c,getTabMenu:f}){const d=R.useRef(null),p=nr(n),v=({size:w})=>{p.updateResize({branch:s,size:w})},b=(w,y)=>w.type==="split-percentage"&&y==="first"?{flexBasis:`calc(${w.size}% - 3px)`,[w.direction==="row"?"minWidth":"minHeight"]:`${w.minSize??0}%`}:w.type==="split-pixels"&&y===w.primary?{flexBasis:`${w.size}px`,[w.direction==="row"?"minWidth":"minHeight"]:`${w.minSize??0}px`}:{};return Q.jsxs("div",{ref:d,className:Un("just-node"),children:[o?.type==="stack"&&Q.jsx(om,{hideTitle:o.hideTitle??t,layoutId:n,isFullScreenView:e,dndAccept:o.dndAccept??r,justStack:o,justBranch:s,getWinInfo:c,getTabMenu:f}),(o?.type==="split-percentage"||o?.type==="split-pixels")&&Q.jsxs("div",{className:Un(o.type,{"just-column":o.direction==="column","just-row":o.direction==="row"}),children:[Q.jsx(R.Activity,{mode:o.type==="split-pixels"&&o.primary==="first"&&o.primaryHide===!0?"hidden":"visible",children:Q.jsx("div",{className:Un("just-first",{"just-primary":o.type==="split-percentage"||o.type==="split-pixels"&&o.primary==="first","just-secondary":!(o.type==="split-percentage"||o.type==="split-pixels"&&o.primary==="first")}),style:b(o,"first"),children:Q.jsx(Wf,{layoutId:n,isFullScreenView:e,hideTitle:o.hideTitle??t,dndAccept:o.dndAccept??r,node:o.first,justBranch:[...s,"first"],getWinInfo:c,getTabMenu:f})})}),!(o.type==="split-pixels"&&(o.noSplitter===!0||o.primaryHide===!0))&&Q.jsx(Am,{layoutId:n,node:o,justBranch:s,containerRef:d,onChange:v,onRelease:v}),Q.jsx(R.Activity,{mode:o.type==="split-pixels"&&o.primary==="second"&&o.primaryHide===!0?"hidden":"visible",children:Q.jsx("div",{className:Un("just-second",{"just-primary":!(o.type==="split-percentage"||o.type==="split-pixels"&&o.primary==="first"),"just-secondary":o.type==="split-percentage"||o.type==="split-pixels"&&o.primary==="first"}),style:b(o,"second"),children:Q.jsx(Wf,{layoutId:n,isFullScreenView:e,hideTitle:o.hideTitle??t,dndAccept:o.dndAccept??r,node:o.second,justBranch:[...s,"second"],getWinInfo:c,getTabMenu:f})})})]},`JustNode-${s.join(",")}`)]})}const Uf=vr(Wf);function Mx({layoutId:n,getWinInfo:e,getTabMenu:t,initialValue:r}){const o=`${n}_FULLSCREEN`,s=nr(n),c=nr(o);return R.useEffect(()=>{c.layout===null&&(s.setFullScreenLayoutByBranch(null),s.setFullScreenHideTitle(!1))},[c.layout]),R.useEffect(()=>{s.setLayout(r),s.setFullScreenLayoutByBranch(null),c.setLayout(null)},[]),R.useEffect(()=>{const f=()=>{},d=async p=>{p.key==="Escape"?(console.log("esc"),s.setFullScreenLayoutByBranch(null)):p.key==="F11"&&(console.log("F11"),s.fullScreenLayout!==null&&s.setFullScreenLayoutByBranch(null)),p.altKey&&(p.key==="ArrowRight"?c.layout!==null?c.activeNextWin():s.activeNextWin():p.key==="ArrowLeft"&&(c.layout!==null?c.activePrevWin():s.activePrevWin()))};return window.addEventListener("keydown",d),document.addEventListener("fullscreenchange",f),()=>{window.removeEventListener("keydown",d),document.removeEventListener("fullscreenchange",f)}},[]),R.useEffect(()=>{console.log("useEffect justLayoutStore.fullScreenLayout",s.fullScreenLayout),c.setLayout(s.fullScreenLayout),s.lastActiveId&&c.activeWin({justId:s.lastActiveId})},[s.fullScreenLayout]),R.useEffect(()=>{c.setFullScreenHideTitle(s.fullScreenHideTitle)},[s.fullScreenHideTitle]),Q.jsx(jO,{backend:fx,children:Q.jsxs("div",{className:Un("just-layout"),children:[s.fullScreenLayout===null&&Q.jsx(Uf,{layoutId:n,isFullScreenView:!1,hideTitle:s.layout?.hideTitle,dndAccept:s.layout?.dndAccept??[],node:s.layout,justBranch:[],getWinInfo:e,getTabMenu:t}),s.fullScreenLayout!==null&&Q.jsx(Uf,{layoutId:o,isFullScreenView:!0,hideTitle:s.layout?.hideTitle,dndAccept:s.layout?.dndAccept??[],node:c.layout,justBranch:[],getWinInfo:e,getTabMenu:t})]})})}const Rx=vr(Mx);Fe.JUST_LAYOUT_TYPES=ii,Fe.JustDraggableTitle=Hg,Fe.JustLayoutView=Rx,Fe.JustNodeView=Uf,Fe.JustSplitter=Am,Fe.JustTabMenu=nm,Fe.JustTabTitle=zg,Fe.JustUtil=$e,Fe.JustWinBodyView=im,Fe.JustWinTitleView=rm,Fe.JustWinView=om,Fe.container=Xa,Fe.justLayoutModule=fp,Fe.stableStringify=eh,Fe.storeCache=Bo,Fe.useJustLayoutStore=nr,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
|
|
652
|
+
If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(S){o.e(S)}finally{o.f()}if(!r.size)return;var O=Array.from(r).join(", ");try{t=n.querySelectorAll(O)}catch{}}return new Promise(function(S,A){var x=zi(t).filter(bT).map(mT),k=vf.begin("searchPseudoElements");Og(),Promise.all(x).then(function(){k(),mf(),S()}).catch(function(){k(),mf(),A()})})}}var wT={hooks:function(){return{mutationObserverCallbacks:function(t){return t.pseudoElementsCallback=Pg,t}}},provides:function(e){e.pseudoElements2svg=function(t){var r=t.node,o=r===void 0?Ze:r;de.searchPseudoElements&&Pg(o)}}},Mg=!1,ST={mixout:function(){return{dom:{unwatch:function(){Og(),Mg=!0}}}},hooks:function(){return{bootstrap:function(){Eg(uf("mutationObserverCallbacks",{}))},noAuto:function(){QA()},watch:function(t){var r=t.observeMutationsRoot;Mg?mf():Eg(uf("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},Rg=function(e){var t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(r,o){var s=o.toLowerCase().split("-"),c=s[0],f=s.slice(1).join("-");if(c&&f==="h")return r.flipX=!0,r;if(c&&f==="v")return r.flipY=!0,r;if(f=parseFloat(f),isNaN(f))return r;switch(c){case"grow":r.size=r.size+f;break;case"shrink":r.size=r.size-f;break;case"left":r.x=r.x-f;break;case"right":r.x=r.x+f;break;case"up":r.y=r.y-f;break;case"down":r.y=r.y+f;break;case"rotate":r.rotate=r.rotate+f;break}return r},t)},OT={mixout:function(){return{parse:{transform:function(t){return Rg(t)}}}},hooks:function(){return{parseNodeAttributes:function(t,r){var o=r.getAttribute("data-fa-transform");return o&&(t.transform=Rg(o)),t}}},provides:function(e){e.generateAbstractTransformGrouping=function(t){var r=t.main,o=t.transform,s=t.containerWidth,c=t.iconWidth,f={transform:"translate(".concat(s/2," 256)")},d="translate(".concat(o.x*32,", ").concat(o.y*32,") "),p="scale(".concat(o.size/16*(o.flipX?-1:1),", ").concat(o.size/16*(o.flipY?-1:1),") "),v="rotate(".concat(o.rotate," 0 0)"),b={transform:"".concat(d," ").concat(p," ").concat(v)},w={transform:"translate(".concat(c/2*-1," -256)")},y={outer:f,inner:b,path:w};return{tag:"g",attributes:J({},y.outer),children:[{tag:"g",attributes:J({},y.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:J(J({},r.icon.attributes),y.path)}]}]}}}},yf={x:0,y:0,width:"100%",height:"100%"};function Lg(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.attributes&&(n.attributes.fill||e)&&(n.attributes.fill="black"),n}function ET(n){return n.tag==="g"?n.children:[n]}var IT={hooks:function(){return{parseNodeAttributes:function(t,r){var o=r.getAttribute("data-fa-mask"),s=o?ws(o.split(" ").map(function(c){return c.trim()})):lg();return s.prefix||(s.prefix=Wr()),t.mask=s,t.maskId=r.getAttribute("data-fa-mask-id"),t}}},provides:function(e){e.generateAbstractMask=function(t){var r=t.children,o=t.attributes,s=t.main,c=t.mask,f=t.maskId,d=t.transform,p=s.width,v=s.icon,b=c.width,w=c.icon,y=gA({transform:d,containerWidth:b,iconWidth:p}),O={tag:"rect",attributes:J(J({},yf),{},{fill:"white"})},S=v.children?{children:v.children.map(Lg)}:{},A={tag:"g",attributes:J({},y.inner),children:[Lg(J({tag:v.tag,attributes:J(J({},v.attributes),y.path)},S))]},x={tag:"g",attributes:J({},y.outer),children:[A]},k="mask-".concat(f||Yv()),G="clip-".concat(f||Yv()),oe={tag:"mask",attributes:J(J({},yf),{},{id:k,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[O,x]},q={tag:"defs",children:[{tag:"clipPath",attributes:{id:G},children:ET(w)},oe]};return r.push(q,{tag:"rect",attributes:J({fill:"currentColor","clip-path":"url(#".concat(G,")"),mask:"url(#".concat(k,")")},yf)}),{children:r,attributes:o}}}},AT={provides:function(e){var t=!1;Vr.matchMedia&&(t=Vr.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var r=[],o={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:J(J({},o),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var c=J(J({},s),{},{attributeName:"opacity"}),f={tag:"circle",attributes:J(J({},o),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||f.children.push({tag:"animate",attributes:J(J({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:J(J({},c),{},{values:"1;0;1;1;0;1;"})}),r.push(f),r.push({tag:"path",attributes:J(J({},o),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:J(J({},c),{},{values:"1;0;0;0;0;1;"})}]}),t||r.push({tag:"path",attributes:J(J({},o),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:J(J({},c),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},TT={hooks:function(){return{parseNodeAttributes:function(t,r){var o=r.getAttribute("data-fa-symbol"),s=o===null?!1:o===""?!0:o;return t.symbol=s,t}}}},xT=[yA,cT,fT,lT,dT,wT,ST,OT,IT,AT,TT];LA(xT,{mixoutsTo:tn}),tn.noAuto;var Jo=tn.config;tn.library,tn.dom;var kg=tn.parse;tn.findIconDefinition,tn.toHtml;var NT=tn.icon;tn.layer,tn.text,tn.counter;function DT(n){return n=n-0,n===n}function Bg(n){return DT(n)?n:(n=n.replace(/[_-]+(.)?/g,(e,t)=>t?t.toUpperCase():""),n.charAt(0).toLowerCase()+n.slice(1))}function CT(n){return n.charAt(0).toUpperCase()+n.slice(1)}var Gi=new Map,PT=1e3;function MT(n){if(Gi.has(n))return Gi.get(n);const e={};let t=0;const r=n.length;for(;t<r;){const o=n.indexOf(";",t),s=o===-1?r:o,c=n.slice(t,s).trim();if(c){const f=c.indexOf(":");if(f>0){const d=c.slice(0,f).trim(),p=c.slice(f+1).trim();if(d&&p){const v=Bg(d);e[v.startsWith("webkit")?CT(v):v]=p}}}t=s+1}if(Gi.size===PT){const o=Gi.keys().next().value;o&&Gi.delete(o)}return Gi.set(n,e),e}function jg(n,e,t={}){if(typeof e=="string")return e;const r=(e.children||[]).map(v=>jg(n,v)),o=e.attributes||{},s={};for(const[v,b]of Object.entries(o))switch(!0){case v==="class":{s.className=b;break}case v==="style":{s.style=MT(String(b));break}case v.startsWith("aria-"):case v.startsWith("data-"):{s[v.toLowerCase()]=b;break}default:s[Bg(v)]=b}const{style:c,role:f,"aria-label":d,...p}=t;return c&&(s.style=s.style?{...s.style,...c}:c),f&&(s.role=f),d&&(s["aria-label"]=d,s["aria-hidden"]="false"),n(e.tag,{...p,...s},...r)}var RT=jg.bind(null,R.createElement),Fg=(n,e)=>{const t=R.useId();return n||(e?t:void 0)},LT=class{constructor(n="react-fontawesome"){this.enabled=!1;let e=!1;try{e=typeof process<"u"&&process.env.NODE_ENV==="development"}catch{}this.scope=n,this.enabled=e}log(...n){this.enabled&&console.log(`[${this.scope}]`,...n)}warn(...n){this.enabled&&console.warn(`[${this.scope}]`,...n)}error(...n){this.enabled&&console.error(`[${this.scope}]`,...n)}};typeof process<"u"&&process.env.FA_VERSION;var kT="searchPseudoElementsFullScan"in Jo?"7.0.0":"6.0.0",BT=Number.parseInt(kT)>=7,Ko="fa",yr={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},jT={left:"fa-pull-left",right:"fa-pull-right"},FT={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},$T={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},_r={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function VT(n){const e=Jo.cssPrefix||Jo.familyPrefix||Ko;return e===Ko?n:n.replace(new RegExp(String.raw`(?<=^|\s)${Ko}-`,"g"),`${e}-`)}function WT(n){const{beat:e,fade:t,beatFade:r,bounce:o,shake:s,spin:c,spinPulse:f,spinReverse:d,pulse:p,fixedWidth:v,inverse:b,border:w,flip:y,size:O,rotation:S,pull:A,swapOpacity:x,rotateBy:k,widthAuto:G,className:oe}=n,q=[];return oe&&q.push(...oe.split(" ")),e&&q.push(yr.beat),t&&q.push(yr.fade),r&&q.push(yr.beatFade),o&&q.push(yr.bounce),s&&q.push(yr.shake),c&&q.push(yr.spin),d&&q.push(yr.spinReverse),f&&q.push(yr.spinPulse),p&&q.push(yr.pulse),v&&q.push(_r.fixedWidth),b&&q.push(_r.inverse),w&&q.push(_r.border),y===!0&&q.push(_r.flip),(y==="horizontal"||y==="both")&&q.push(_r.flipHorizontal),(y==="vertical"||y==="both")&&q.push(_r.flipVertical),O!=null&&q.push($T[O]),S!=null&&S!==0&&q.push(FT[S]),A!=null&&q.push(jT[A]),x&&q.push(_r.swapOpacity),BT?(k&&q.push(_r.rotateBy),G&&q.push(_r.widthAuto),(Jo.cssPrefix||Jo.familyPrefix||Ko)===Ko?q:q.map(VT)):q}var UT=n=>typeof n=="object"&&"icon"in n&&!!n.icon;function $g(n){if(n)return UT(n)?n:kg.icon(n)}function zT(n){return Object.keys(n)}var Vg=new LT("FontAwesomeIcon"),Wg={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},HT=new Set(Object.keys(Wg)),Yi=R.forwardRef((n,e)=>{const t={...Wg,...n},{icon:r,mask:o,symbol:s,title:c,titleId:f,maskId:d,transform:p}=t,v=Fg(d,!!o),b=Fg(f,!!c),w=$g(r);if(!w)return Vg.error("Icon lookup is undefined",r),null;const y=WT(t),O=typeof p=="string"?kg.transform(p):p,S=$g(o),A=NT(w,{...y.length>0&&{classes:y},...O&&{transform:O},...S&&{mask:S},symbol:s,title:c,titleId:b,maskId:v});if(!A)return Vg.error("Could not find icon",w),null;const{abstract:x}=A,k={ref:e};for(const G of zT(t))HT.has(G)||(k[G]=t[G]);return RT(x[0],k)});Yi.displayName="FontAwesomeIcon";var qT={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32S0 334.3 0 352l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},GT={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z"]},Ug={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM167 167c9.4-9.4 24.6-9.4 33.9 0l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9z"]},YT={prefix:"fas",iconName:"angle-down",icon:[384,512,[8964],"f107","M169.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 306.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]};function JT({layoutId:n,justId:e,winInfo:t}){console.log("TabTitle justId",e);const[r,o]=Pc(),[s]=R.useState({x:0,y:0}),c=nr(n),f=c.getTabTitleTooltip(e),d=v=>{c.removeWin({justId:v})},p=(v,b)=>{c.activeWin({justId:b})};return Q.jsxs(Q.Fragment,{children:[Q.jsx("div",{className:"just-icon",onClick:v=>p(v,e),title:f,children:t.getTabIcon(e,n)}),Q.jsx("div",{className:"just-title",onClick:v=>p(v,e),title:f,children:c.getTabTitle(e)??e.title}),Q.jsx("div",{className:"just-icon just-close",onClick:()=>d(e),children:Q.jsx(Yi,{icon:Ug})}),Q.jsx(qp,{state:r.state,endTransition:r.endTransition,anchorPoint:s,onClose:()=>o(!1),children:Q.jsxs(ls,{onClick:()=>d(e),children:[Q.jsx("div",{className:"just-icon"}),Q.jsx("div",{className:"just-title",children:"Close"}),Q.jsx("div",{className:"just-icon"})]})})]})}const zg=vr(JT);function KT(n){const{layoutId:e,isFullScreenView:t,dndAccept:r,winInfo:o,justBranch:s,justId:c,justStack:f,rect:d}=n,p=R.useRef(null),[,v]=Pc(),[,b]=R.useState({x:0,y:0}),w=nr(e),[{isDragging:y},O]=cE({type:c.viewId,item:{justBranch:s,justId:c,index:-1},collect:x=>({isDragging:x.isDragging()})}),[,S]=Sc({accept:r,collect(x){return{handlerId:x.getHandlerId()}},hover(x,k){if(!p.current||c===x.justId)return;const G=p.current.getBoundingClientRect(),oe=k.getClientOffset(),q=(G.right-G.left)/2,ye=oe.x-G.left,L=x.justId,F=c,ae=f.tabs.filter(ce=>!$e.isEquals(ce,L));let we=$e.indexOf(ae,F);ye>q&&(we+=1),x.pos="stack",x.index=we}});R.useEffect(()=>{if($e.isEquals(c,w.lastActiveId??null)){if(p.current==null||d==null)return;const x=p.current.getBoundingClientRect();(d.left>x.left||d.right<x.right)&&p.current.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}},[w.lastActiveTm]),R.useLayoutEffect(()=>{p.current&&O(S(p))},[S,O]);const A=R.useCallback(x=>{x.preventDefault(),b({x:x.clientX,y:x.clientY}),v(!0)},[v]);return Q.jsx("div",{className:Un("just-draggable-title","just-title-menus",{dragging:y,"just-active":$e.isEquals(f.active,c),"last-active":$e.isEquals(w.lastActiveId,c)}),ref:p,onContextMenu:A,children:o.getTabTitle?o.getTabTitle({justId:c,layoutId:e,justBranch:s,isFullScreenView:t,winInfo:o}):Q.jsx(zg,{justId:c,layoutId:e,justBranch:s,isFullScreenView:t,winInfo:o})})}const Hg=vr(KT);function qg(n){let e=null;return()=>(e==null&&(e=n()),e)}function XT(n,e){return n.filter(t=>t!==e)}function ZT(n,e){const t=new Set,r=s=>t.add(s);n.forEach(r),e.forEach(r);const o=[];return t.forEach(s=>o.push(s)),o}class QT{enter(e){const t=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(e));return this.entered=ZT(this.entered.filter(r),[e]),t===0&&this.entered.length>0}leave(e){const t=this.entered.length;return this.entered=XT(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ex{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(t[r]={value:o(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Gg="__NATIVE_FILE__",Yg="__NATIVE_URL__",Jg="__NATIVE_TEXT__",Kg="__NATIVE_HTML__",Xg=Object.freeze(Object.defineProperty({__proto__:null,FILE:Gg,HTML:Kg,TEXT:Jg,URL:Yg},Symbol.toStringTag,{value:"Module"}));function _f(n,e,t){const r=e.reduce((o,s)=>o||n.getData(s),"");return r??t}const wf={[Gg]:{exposeProperties:{files:n=>Array.prototype.slice.call(n.files),items:n=>n.items,dataTransfer:n=>n},matchesTypes:["Files"]},[Kg]:{exposeProperties:{html:(n,e)=>_f(n,e,""),dataTransfer:n=>n},matchesTypes:["Html","text/html"]},[Yg]:{exposeProperties:{urls:(n,e)=>_f(n,e,"").split(`
|
|
653
|
+
`),dataTransfer:n=>n},matchesTypes:["Url","text/uri-list"]},[Jg]:{exposeProperties:{text:(n,e)=>_f(n,e,""),dataTransfer:n=>n},matchesTypes:["Text","text/plain"]}};function tx(n,e){const t=wf[n];if(!t)throw new Error(`native type ${n} has no configuration`);const r=new ex(t);return r.loadDataTransfer(e),r}function Sf(n){if(!n)return null;const e=Array.prototype.slice.call(n.types||[]);return Object.keys(wf).filter(t=>{const r=wf[t];return r?.matchesTypes?r.matchesTypes.some(o=>e.indexOf(o)>-1):!1})[0]||null}const nx=qg(()=>/firefox/i.test(navigator.userAgent)),Zg=qg(()=>!!window.safari);class Qg{interpolate(e){const{xs:t,ys:r,c1s:o,c2s:s,c3s:c}=this;let f=t.length-1;if(e===t[f])return r[f];let d=0,p=c.length-1,v;for(;d<=p;){v=Math.floor(.5*(d+p));const y=t[v];if(y<e)d=v+1;else if(y>e)p=v-1;else return r[v]}f=Math.max(0,p);const b=e-t[f],w=b*b;return r[f]+o[f]*b+s[f]*w+c[f]*b*w}constructor(e,t){const{length:r}=e,o=[];for(let y=0;y<r;y++)o.push(y);o.sort((y,O)=>e[y]<e[O]?-1:1);const s=[],c=[];let f,d;for(let y=0;y<r-1;y++)f=e[y+1]-e[y],d=t[y+1]-t[y],s.push(f),c.push(d/f);const p=[c[0]];for(let y=0;y<s.length-1;y++){const O=c[y],S=c[y+1];if(O*S<=0)p.push(0);else{f=s[y];const A=s[y+1],x=f+A;p.push(3*x/((x+A)/O+(x+f)/S))}}p.push(c[c.length-1]);const v=[],b=[];let w;for(let y=0;y<p.length-1;y++){w=c[y];const O=p[y],S=1/s[y],A=O+p[y+1]-w-w;v.push((w-O-A)*S),b.push(A*S*S)}this.xs=e,this.ys=t,this.c1s=p,this.c2s=v,this.c3s=b}}const rx=1;function em(n){const e=n.nodeType===rx?n:n.parentElement;if(!e)return null;const{top:t,left:r}=e.getBoundingClientRect();return{x:r,y:t}}function As(n){return{x:n.clientX,y:n.clientY}}function ix(n){var e;return n.nodeName==="IMG"&&(nx()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(n)))}function ox(n,e,t,r){let o=n?e.width:t,s=n?e.height:r;return Zg()&&n&&(s/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:s}}function ax(n,e,t,r,o){const s=ix(e),f=em(s?n:e),d={x:t.x-f.x,y:t.y-f.y},{offsetWidth:p,offsetHeight:v}=n,{anchorX:b,anchorY:w}=r,{dragPreviewWidth:y,dragPreviewHeight:O}=ox(s,e,p,v),S=()=>{let ye=new Qg([0,.5,1],[d.y,d.y/v*O,d.y+O-v]).interpolate(w);return Zg()&&s&&(ye+=(window.devicePixelRatio-1)*O),ye},A=()=>new Qg([0,.5,1],[d.x,d.x/p*y,d.x+y-p]).interpolate(b),{offsetX:x,offsetY:k}=o,G=x===0||x,oe=k===0||k;return{x:G?x:A(),y:oe?k:S()}}class sx{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function ux(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function tm(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.forEach(function(o){ux(n,o,t[o])})}return n}class cx{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)===null||t===void 0||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);const o=c=>this.handleDragStart(c,e),s=c=>this.handleSelectStart(c);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",s),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const r=c=>this.handleDragEnter(c,e),o=c=>this.handleDragOver(c,e),s=c=>this.handleDrop(c,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",s),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",s)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return tm({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions.get(e);return tm({anchorX:.5,anchorY:.5,captureDraggingState:!1},t||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Xg).some(t=>Xg[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=tx(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const t=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},t)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const s=this.sourceNodes.get(o);return s&&em(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const c=As(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:c});const{dataTransfer:f}=o,d=Sf(f);if(this.monitor.isDragging()){if(f&&typeof f.setDragImage=="function"){const v=this.monitor.getSourceId(),b=this.sourceNodes.get(v),w=this.sourcePreviewNodes.get(v)||b;if(w){const{anchorX:y,anchorY:O,offsetX:S,offsetY:A}=this.getCurrentSourcePreviewNodeOptions(),G=ax(b,w,c,{anchorX:y,anchorY:O},{offsetX:S,offsetY:A});f.setDragImage(w,G.x,G.y)}}try{f?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:p}=this.getCurrentSourcePreviewNodeOptions();p?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(f&&!f.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:f}=o,d=Sf(f);d&&this.beginDragNativeItem(d,f)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,s.length>0&&this.actions.hover(s,{clientOffset:As(o)}),s.some(f=>this.monitor.canDropOnTarget(f))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=As(o),this.scheduleHover(s),(s||[]).some(f=>this.monitor.canDropOnTarget(f))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;o.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}else Sf(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:As(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const s=o.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(o.preventDefault(),s.dragDrop()))},this.options=new sx(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new QT(this.isNodeInDocument)}}const fx=function(e,t,r){return new cx(e,t,r)};function lx({layoutId:n,justBranch:e,isFullScreenView:t}){const r=nr(n),o=()=>{console.log("closeAllTabs justBranch",e),r.removeAllTabs({branch:e})},s=async(c=!1)=>{t?r.setLayout(null):(r.setFullScreenLayoutByBranch(e),r.setFullScreenHideTitle(c))};return Q.jsxs(Q.Fragment,{children:[Q.jsxs(ls,{className:"just-menu-item",onClick:()=>o(),children:[Q.jsx("div",{className:"just-icon"}),Q.jsx("div",{className:"just-title",children:"Close All"}),Q.jsx("div",{className:"just-icon"})]}),Q.jsxs(ls,{className:"just-menu-item",onClick:()=>s(!0),children:[Q.jsx("div",{className:"just-icon",children:Q.jsx(Yi,{icon:qT})}),Q.jsx("div",{className:"just-title",children:t?"F11":"Full"}),Q.jsx("div",{className:"just-icon"})]})]})}const nm=vr(lx);function dx({layoutId:n,isFullScreenView:e,dndAccept:t,justBranch:r,justStack:o,getWinInfo:s,getTabMenu:c}){const f=R.useRef(null),[d,p]=R.useState(null),v=nr(n),b=A=>{v.removeWin({justId:A})},w=A=>{v.activeWin({justId:A})},y=(A,x)=>{v.moveWin({pos:"stack",justId:x.justId,branch:r,index:x.index??-1})},[{isOver:O},S]=Sc(()=>({accept:t,collect:A=>({isOver:A.isOver()}),drop(A,x){y(x.getItemType(),x.getItem())},hover(A,x){f.current&&(A.index=-1)}}),[o]);return R.useLayoutEffect(()=>{f.current&&S(f)},[S]),R.useEffect(()=>{if(f.current===null)return;function A(){if(f.current===null)return;const k=f.current.getBoundingClientRect()??null;p(k)}A();const x=new ResizeObserver(A);return x.observe(f.current),window.addEventListener("scroll",A,!0),()=>{x.disconnect(),window.removeEventListener("scroll",A,!0)}},[]),Q.jsxs("div",{className:Un("just-win-title"),tabIndex:1,children:[Q.jsx("div",{className:Un("just-title-list",{"is-over":O}),ref:f,children:o.tabs.map(A=>Q.jsx(Hg,{layoutId:n,isFullScreenView:e,dndAccept:t,rect:d,justId:A,justBranch:r,justStack:o,winInfo:s(A)},[...r,$e.toString(A)].join(",")))}),Q.jsxs("div",{className:"just-title-menus",children:[Q.jsx(Kp,{menuButton:Q.jsx("div",{className:"just-title-menu",children:Q.jsx(Yi,{icon:YT})}),children:o.tabs.map(A=>Q.jsxs(ls,{className:Un("just-menu-item",{active:$e.isEquals(o.active,A)}),children:[Q.jsx("div",{className:"just-icon",onClick:()=>w(A),children:s(A).getTabIcon(A,n)}),Q.jsx("div",{className:"just-title",onClick:()=>w(A),children:v.getTabTitle(A)??A.title}),Q.jsx("div",{className:"just-icon just-close",onClick:x=>{x.stopPropagation(),b(A)},children:Q.jsx(Yi,{icon:Ug})})]},$e.toString(A)))}),Q.jsx(Kp,{menuButton:Q.jsx("div",{className:"just-title-menu",children:Q.jsx(Yi,{icon:GT})}),children:c?c(n,r,o,e):Q.jsx(nm,{layoutId:n,justBranch:r,justStack:o,isFullScreenView:e})})]})]})}const rm=vr(dx);function hx(n){const e=R.useRef(null),{layoutId:t,dndAccept:r,getWinInfo:o,justBranch:s,justStack:c}=n,[f,d]=R.useState(null),p=nr(t),v=(y,O)=>{O.pos&&(O.pos==="stack"?p.moveWin({pos:O.pos,justId:O.justId,branch:s,index:O.index??-1}):p.moveWin({pos:O.pos,justId:O.justId,branch:s,direction:O.direction??"row"}))},[{isOver:b},w]=Sc(()=>({accept:r,collect:y=>({isOver:y.isOver()}),drop(y,O){e.current&&v(O.getItemType(),O.getItem())},hover(y,O){if(!e.current)return;const S=e.current.getBoundingClientRect(),A=O.getClientOffset(),x=(S.right-S.left)/2,k=(S.bottom-S.top)/2,G=A.x-S.left,oe=A.y-S.top,q=G-x,ye=oe-k,L=Math.abs(q*100/x),F=Math.abs(ye*100/k);if(L<60&&F<60){y.pos="stack";const ae={top:S.top,left:S.left,width:S.width,height:S.height};d(ae)}else{const ae=L>F?"row":"column",ce=Math.sign(ae==="row"?q:ye)>0?"second":"first";y.direction=ae,y.pos=ce;const Se={top:ce==="second"&&ae==="column"?S.top+S.height/2:S.top,left:ce==="second"&&ae==="row"?S.left+S.width/2:S.left,width:ae==="row"?S.width/2:S.width,height:ae==="column"?S.height/2:S.height};d(Se)}}}),[c]);return R.useLayoutEffect(()=>{e.current&&w(e)},[w]),Q.jsxs("div",{className:Un("just-win-body",{isOver:b,"last-active":$e.isEquals(c.active,p.lastActiveId)}),ref:e,children:[c.tabs.map(y=>Q.jsx(R.Activity,{mode:$e.isEquals(c.active,y)?"visible":"hidden",children:o(y).getView(y,t)},$e.toString(y))),b&&f!=null&&Q.jsx("div",{className:"just-overlay",style:{top:f.top,left:f.left,width:`${f.width}px`,height:`${f.height}px`}})]})}const im=vr(hx);function px({layoutId:n,isFullScreenView:e,hideTitle:t,dndAccept:r,justBranch:o,justStack:s,getWinInfo:c,getTabMenu:f}){const d=nr(n),p=d.fullScreenHideTitle,v=t!==!0,b=()=>{s.active&&d.activeWin({justId:s.active})};return Q.jsxs("div",{className:"just-win",onFocusCapture:b,tabIndex:1,children:[v&&!p&&Q.jsx(rm,{layoutId:n,isFullScreenView:e,dndAccept:r,justBranch:o,justStack:s,getWinInfo:c,getTabMenu:f}),Q.jsx(im,{layoutId:n,dndAccept:r,justBranch:o,justStack:s,getWinInfo:c})]})}const om=vr(px);var Of,am;function Ef(){if(am)return Of;am=1;function n(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return Of=n,Of}var If,sm;function vx(){if(sm)return If;sm=1;var n=typeof dn=="object"&&dn&&dn.Object===Object&&dn;return If=n,If}var Af,um;function cm(){if(um)return Af;um=1;var n=vx(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return Af=t,Af}var Tf,fm;function gx(){if(fm)return Tf;fm=1;var n=cm(),e=function(){return n.Date.now()};return Tf=e,Tf}var xf,lm;function mx(){if(lm)return xf;lm=1;var n=/\s/;function e(t){for(var r=t.length;r--&&n.test(t.charAt(r)););return r}return xf=e,xf}var Nf,dm;function bx(){if(dm)return Nf;dm=1;var n=mx(),e=/^\s+/;function t(r){return r&&r.slice(0,n(r)+1).replace(e,"")}return Nf=t,Nf}var Df,hm;function pm(){if(hm)return Df;hm=1;var n=cm(),e=n.Symbol;return Df=e,Df}var Cf,vm;function yx(){if(vm)return Cf;vm=1;var n=pm(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,o=n?n.toStringTag:void 0;function s(c){var f=t.call(c,o),d=c[o];try{c[o]=void 0;var p=!0}catch{}var v=r.call(c);return p&&(f?c[o]=d:delete c[o]),v}return Cf=s,Cf}var Pf,gm;function _x(){if(gm)return Pf;gm=1;var n=Object.prototype,e=n.toString;function t(r){return e.call(r)}return Pf=t,Pf}var Mf,mm;function wx(){if(mm)return Mf;mm=1;var n=pm(),e=yx(),t=_x(),r="[object Null]",o="[object Undefined]",s=n?n.toStringTag:void 0;function c(f){return f==null?f===void 0?o:r:s&&s in Object(f)?e(f):t(f)}return Mf=c,Mf}var Rf,bm;function Sx(){if(bm)return Rf;bm=1;function n(e){return e!=null&&typeof e=="object"}return Rf=n,Rf}var Lf,ym;function Ox(){if(ym)return Lf;ym=1;var n=wx(),e=Sx(),t="[object Symbol]";function r(o){return typeof o=="symbol"||e(o)&&n(o)==t}return Lf=r,Lf}var kf,_m;function wm(){if(_m)return kf;_m=1;var n=bx(),e=Ef(),t=Ox(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;function d(p){if(typeof p=="number")return p;if(t(p))return r;if(e(p)){var v=typeof p.valueOf=="function"?p.valueOf():p;p=e(v)?v+"":v}if(typeof p!="string")return p===0?p:+p;p=n(p);var b=s.test(p);return b||c.test(p)?f(p.slice(2),b?2:8):o.test(p)?r:+p}return kf=d,kf}var Bf,Sm;function Ex(){if(Sm)return Bf;Sm=1;var n=Ef(),e=gx(),t=wm(),r="Expected a function",o=Math.max,s=Math.min;function c(f,d,p){var v,b,w,y,O,S,A=0,x=!1,k=!1,G=!0;if(typeof f!="function")throw new TypeError(r);d=t(d)||0,n(p)&&(x=!!p.leading,k="maxWait"in p,w=k?o(t(p.maxWait)||0,d):w,G="trailing"in p?!!p.trailing:G);function oe(he){var ct=v,ht=b;return v=b=void 0,A=he,y=f.apply(ht,ct),y}function q(he){return A=he,O=setTimeout(F,d),x?oe(he):y}function ye(he){var ct=he-S,ht=he-A,ft=d-ct;return k?s(ft,w-ht):ft}function L(he){var ct=he-S,ht=he-A;return S===void 0||ct>=d||ct<0||k&&ht>=w}function F(){var he=e();if(L(he))return ae(he);O=setTimeout(F,ye(he))}function ae(he){return O=void 0,G&&v?oe(he):(v=b=void 0,y)}function we(){O!==void 0&&clearTimeout(O),A=0,v=S=b=O=void 0}function ce(){return O===void 0?y:ae(e())}function Se(){var he=e(),ct=L(he);if(v=arguments,b=this,S=he,ct){if(O===void 0)return q(S);if(k)return clearTimeout(O),O=setTimeout(F,d),oe(S)}return O===void 0&&(O=setTimeout(F,d)),y}return Se.cancel=we,Se.flush=ce,Se}return Bf=c,Bf}var jf,Om;function Ix(){if(Om)return jf;Om=1;var n=Ex(),e=Ef(),t="Expected a function";function r(o,s,c){var f=!0,d=!0;if(typeof o!="function")throw new TypeError(t);return e(c)&&(f="leading"in c?!!c.leading:f,d="trailing"in c?!!c.trailing:d),n(o,s,{leading:f,maxWait:s,trailing:d})}return jf=r,jf}var Ax=Ix();const Tx=po(Ax);var Ff,Em;function xx(){if(Em)return Ff;Em=1;function n(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}return Ff=n,Ff}var $f,Im;function Nx(){if(Im)return $f;Im=1;var n=xx(),e=wm();function t(r,o,s){return s===void 0&&(s=o,o=void 0),s!==void 0&&(s=e(s),s=s===s?s:0),o!==void 0&&(o=e(o),o=o===o?o:0),n(e(r),o,s)}return $f=t,$f}var Dx=Nx();const Vf=po(Dx),Cx=1e3/30;function Px({node:n,containerRef:e,onChange:t,onRelease:r}){const o=R.useRef(null),[s,c]=R.useState(!1),f=()=>{s||(o.current.ownerDocument.addEventListener("mousemove",b,!0),o.current.ownerDocument.addEventListener("mouseup",v,!0),c(!0))},d=()=>{o.current&&(o.current.ownerDocument.removeEventListener("mousemove",b,!0),o.current.ownerDocument.removeEventListener("mouseup",v,!0),c(!1))},p=O=>{O.button===0&&(O.preventDefault(),f())},v=O=>{if(d(),e==null)return;const S=w(O,n,e);S!==null&&r(S)},b=O=>{O.preventDefault(),e!=null&&y(O,n,e)},w=(O,S,A)=>{if(A.current==null)return null;const x=A.current.getBoundingClientRect(),k=S.direction==="row"?O.clientX:O.clientY,G=S.direction==="row"?x.left:x.top,oe=S.direction==="row"?x.width:x.height,q=Vf(k-G,0,oe),ye=Vf(oe-q,0,oe),L=Vf(q*100/oe,0,100);return S.type==="split-percentage"?{type:S.type,size:L}:S.type==="split-pixels"?S.primary==="first"?{type:"split-pixels",primary:"first",size:q}:{type:"split-pixels",primary:"second",size:ye}:null},y=Tx((O,S,A)=>{if(A.current==null)return null;const x=w(O,S,A);x!==null&&t(x)},Cx);return R.useEffect(()=>{}),Q.jsx("div",{ref:o,className:Un("just-splitter"),onMouseDown:p})}const Am=vr(Px);function Wf({layoutId:n,isFullScreenView:e,hideTitle:t,dndAccept:r,node:o,justBranch:s,getWinInfo:c,getTabMenu:f}){const d=R.useRef(null),p=nr(n),v=({size:w})=>{p.updateResize({branch:s,size:w})},b=(w,y)=>w.type==="split-percentage"&&y==="first"?{flexBasis:`calc(${w.size}% - 3px)`,[w.direction==="row"?"minWidth":"minHeight"]:`${w.minSize??0}%`}:w.type==="split-pixels"&&y===w.primary?{flexBasis:`${w.size}px`,[w.direction==="row"?"minWidth":"minHeight"]:`${w.minSize??0}px`}:{};return Q.jsxs("div",{ref:d,className:Un("just-node"),children:[o?.type==="stack"&&Q.jsx(om,{hideTitle:o.hideTitle??t,layoutId:n,isFullScreenView:e,dndAccept:o.dndAccept??r,justStack:o,justBranch:s,getWinInfo:c,getTabMenu:f}),(o?.type==="split-percentage"||o?.type==="split-pixels")&&Q.jsxs("div",{className:Un(o.type,{"just-column":o.direction==="column","just-row":o.direction==="row"}),children:[Q.jsx(R.Activity,{mode:o.type==="split-pixels"&&o.primary==="first"&&o.primaryHide===!0?"hidden":"visible",children:Q.jsx("div",{className:Un("just-first",{"just-primary":o.type==="split-percentage"||o.type==="split-pixels"&&o.primary==="first","just-secondary":!(o.type==="split-percentage"||o.type==="split-pixels"&&o.primary==="first")}),style:b(o,"first"),children:Q.jsx(Wf,{layoutId:n,isFullScreenView:e,hideTitle:o.hideTitle??t,dndAccept:o.dndAccept??r,node:o.first,justBranch:[...s,"first"],getWinInfo:c,getTabMenu:f})})}),!(o.type==="split-pixels"&&(o.noSplitter===!0||o.primaryHide===!0))&&Q.jsx(Am,{layoutId:n,node:o,justBranch:s,containerRef:d,onChange:v,onRelease:v}),Q.jsx(R.Activity,{mode:o.type==="split-pixels"&&o.primary==="second"&&o.primaryHide===!0?"hidden":"visible",children:Q.jsx("div",{className:Un("just-second",{"just-primary":!(o.type==="split-percentage"||o.type==="split-pixels"&&o.primary==="first"),"just-secondary":o.type==="split-percentage"||o.type==="split-pixels"&&o.primary==="first"}),style:b(o,"second"),children:Q.jsx(Wf,{layoutId:n,isFullScreenView:e,hideTitle:o.hideTitle??t,dndAccept:o.dndAccept??r,node:o.second,justBranch:[...s,"second"],getWinInfo:c,getTabMenu:f})})})]},`JustNode-${s.join(",")}`)]})}const Uf=vr(Wf);function Mx({layoutId:n,getWinInfo:e,getTabMenu:t,initialValue:r}){const o=`${n}_FULLSCREEN`,s=nr(n),c=nr(o);return R.useEffect(()=>{c.layout===null&&(s.setFullScreenLayoutByBranch(null),s.setFullScreenHideTitle(!1))},[c.layout]),R.useEffect(()=>{s.setLayout(r),s.setFullScreenLayoutByBranch(null),c.setLayout(null)},[]),R.useEffect(()=>{const f=()=>{},d=async p=>{p.key==="Escape"?(console.log("esc"),s.setFullScreenLayoutByBranch(null)):p.key==="F11"&&(console.log("F11"),s.fullScreenLayout!==null&&s.setFullScreenLayoutByBranch(null)),p.altKey&&(p.key==="ArrowRight"?c.layout!==null?c.activeNextWin():s.activeNextWin():p.key==="ArrowLeft"&&(c.layout!==null?c.activePrevWin():s.activePrevWin()))};return window.addEventListener("keydown",d),document.addEventListener("fullscreenchange",f),()=>{window.removeEventListener("keydown",d),document.removeEventListener("fullscreenchange",f)}},[]),R.useEffect(()=>{console.log("useEffect justLayoutStore.fullScreenLayout",s.fullScreenLayout),c.setLayout(s.fullScreenLayout),s.lastActiveId&&c.activeWin({justId:s.lastActiveId})},[s.fullScreenLayout]),R.useEffect(()=>{c.setFullScreenHideTitle(s.fullScreenHideTitle)},[s.fullScreenHideTitle]),Q.jsx(jO,{backend:fx,children:Q.jsxs("div",{className:Un("just-layout"),children:[s.fullScreenLayout===null&&Q.jsx(Uf,{layoutId:n,isFullScreenView:!1,hideTitle:s.layout?.hideTitle,dndAccept:s.layout?.dndAccept??[],node:s.layout,justBranch:[],getWinInfo:e,getTabMenu:t}),s.fullScreenLayout!==null&&Q.jsx(Uf,{layoutId:o,isFullScreenView:!0,hideTitle:s.layout?.hideTitle,dndAccept:s.layout?.dndAccept??[],node:c.layout,justBranch:[],getWinInfo:e,getTabMenu:t})]})})}const Rx=vr(Mx);Fe.JUST_LAYOUT_TYPES=ii,Fe.JustDraggableTitle=Hg,Fe.JustLayoutView=Rx,Fe.JustNodeView=Uf,Fe.JustSplitter=Am,Fe.JustTabMenu=nm,Fe.JustTabTitle=zg,Fe.JustUtil=$e,Fe.JustWinBodyView=im,Fe.JustWinTitleView=rm,Fe.JustWinView=om,Fe.container=Xa,Fe.justLayoutModule=fp,Fe.stableStringify=eh,Fe.storeLayout=Bo,Fe.useJustLayoutStore=nr,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kangtae49/just-layout",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"dev": "vite",
|
|
53
53
|
"build": "tsc -b && vite build",
|
|
54
54
|
"lint": "eslint .",
|
|
55
|
-
"preview": "vite preview"
|
|
55
|
+
"preview": "vite preview",
|
|
56
|
+
"release": "pnpm publish --access public"
|
|
56
57
|
}
|
|
57
58
|
}
|